@uniformdev/mesh-sdk-react 19.79.1-alpha.11 → 19.79.1-alpha.18

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.esm.js CHANGED
@@ -988,7 +988,7 @@ var searchRowPopover = css6`
988
988
  border-left: 4px solid var(--brand-secondary-3);
989
989
  border-radius: var(--rounded-base);
990
990
  box-shadow: var(--shadow-base);
991
- color: var(--brand-secondary-1);
991
+ color: var(--typography-base);
992
992
  padding: var(--spacing-base);
993
993
  position: absolute;
994
994
  top: var(--spacing-base);
@@ -1122,7 +1122,7 @@ var selectedItemCopy = css8`
1122
1122
  position: relative;
1123
1123
  `;
1124
1124
  var selectedItemTitle = css8`
1125
- color: var(--brand-secondary-1);
1125
+ color: var(--typography-base);
1126
1126
  font-size: var(--fs-base);
1127
1127
  font-weight: var(--fw-bold);
1128
1128
  line-height: 1;
@@ -1375,8 +1375,8 @@ import {
1375
1375
  scrollbarStyles as scrollbarStyles2
1376
1376
  } from "@uniformdev/design-system";
1377
1377
  import * as React5 from "react";
1378
- import { DragDropContext, Draggable, Droppable } from "react-beautiful-dnd";
1379
- import { useDebounce as useDebounce2 } from "react-use";
1378
+ import { Draggable, Droppable } from "react-beautiful-dnd";
1379
+ import { useDebounce as useDebounce3 } from "react-use";
1380
1380
  import { v4 } from "uuid";
1381
1381
 
1382
1382
  // src/hooks/useLoadingDelay.ts
@@ -1412,6 +1412,23 @@ function useLoadingDelay(loading, { delay = 500, minDuration = 200 } = {
1412
1412
  return state === "DISPLAY" || state === "EXPIRE";
1413
1413
  }
1414
1414
 
1415
+ // src/components/DragDropContext.tsx
1416
+ import { useState as useState4 } from "react";
1417
+ import { DragDropContext as BaseDragDropContext } from "react-beautiful-dnd";
1418
+ import { useDebounce as useDebounce2 } from "react-use";
1419
+ import { jsx as jsx21 } from "@emotion/react/jsx-runtime";
1420
+ function DragDropContext({ children, ...props }) {
1421
+ const [isReady, setIsReady] = useState4(false);
1422
+ useDebounce2(
1423
+ () => {
1424
+ setIsReady(true);
1425
+ },
1426
+ 300,
1427
+ []
1428
+ );
1429
+ return /* @__PURE__ */ jsx21(BaseDragDropContext, { ...props, children: isReady ? children : null });
1430
+ }
1431
+
1415
1432
  // src/components/legacy/EntrySearch/styles/EntrySearch.styles.ts
1416
1433
  import { css as css10 } from "@emotion/react";
1417
1434
  var entrySearchWrapper = css10`
@@ -1431,7 +1448,7 @@ var entrySearchBtn = css10`
1431
1448
  border: 0;
1432
1449
  `;
1433
1450
  var entrySearchLoadMoreBtn = css10`
1434
- color: var(--brand-secondary-1);
1451
+ color: var(--typography-base);
1435
1452
  display: block;
1436
1453
  font-weight: var(--fw-bold);
1437
1454
  font-size: var(--fs-sm);
@@ -1480,7 +1497,7 @@ var entrySearchSelectIcon = css10`
1480
1497
  padding-right: var(--spacing-sm);
1481
1498
  `;
1482
1499
  var entrySearchSelectImg = css10`
1483
- color: var(--brand-secondary-1);
1500
+ color: var(--typography-base);
1484
1501
  width: 1.25rem;
1485
1502
  height: 1.25rem;
1486
1503
  transition: transform var(--duration-fast) var(--timing-ease-out);
@@ -1488,7 +1505,7 @@ var entrySearchSelectImg = css10`
1488
1505
  `;
1489
1506
  var entrySearchSelectOption = css10`
1490
1507
  background: var(--white);
1491
- color: var(--brand-secondary-1);
1508
+ color: var(--typography-base);
1492
1509
  `;
1493
1510
  var draggableContainer = css10`
1494
1511
  position: relative;
@@ -1512,7 +1529,7 @@ var draggableIconWrapper = css10`
1512
1529
  opacity: 0;
1513
1530
  `;
1514
1531
  var draggableIcon = css10`
1515
- color: var(--brand-secondary-1);
1532
+ color: var(--typography-base);
1516
1533
  `;
1517
1534
  var draggableIconOffset = css10`
1518
1535
  position: absolute;
@@ -1524,7 +1541,7 @@ var badgeIcon = css10`
1524
1541
  `;
1525
1542
 
1526
1543
  // src/components/legacy/EntrySearch/EntrySearch.tsx
1527
- import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs10 } from "@emotion/react/jsx-runtime";
1544
+ import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs10 } from "@emotion/react/jsx-runtime";
1528
1545
  var DefaultNoResults = ({ searchText, selectedContentType }) => {
1529
1546
  let message = "No content found";
1530
1547
  if (selectedContentType && selectedContentType !== "any") {
@@ -1533,7 +1550,7 @@ var DefaultNoResults = ({ searchText, selectedContentType }) => {
1533
1550
  if (searchText) {
1534
1551
  message = `${message} for keyword '${searchText}'.`;
1535
1552
  }
1536
- return /* @__PURE__ */ jsx21(Callout, { type: "info", children: message });
1553
+ return /* @__PURE__ */ jsx22(Callout, { type: "info", children: message });
1537
1554
  };
1538
1555
  var EntrySearch = ({
1539
1556
  search,
@@ -1577,7 +1594,7 @@ var EntrySearch = ({
1577
1594
  const [selectedListItems, setSelectedListItems] = React5.useState([]);
1578
1595
  const [loadingMore, setLoadingMore] = React5.useState(false);
1579
1596
  const listBoxId = React5.useRef(`x${v4()}`);
1580
- useDebounce2(
1597
+ useDebounce3(
1581
1598
  () => {
1582
1599
  search(textInput, {
1583
1600
  count: pageSize,
@@ -1656,7 +1673,7 @@ var EntrySearch = ({
1656
1673
  const ResolvedSelectedItemComponent = selectedItemComponent || DefaultSelectedItem;
1657
1674
  const ResolvedNoResultsComponent = noResultsComponent || DefaultNoResults;
1658
1675
  const CompIcon = logoIcon && typeof logoIcon !== "string" ? logoIcon : null;
1659
- const resolvedIcon = CompIcon ? /* @__PURE__ */ jsx21(CompIcon, { css: badgeIcon }) : /* @__PURE__ */ jsx21("img", { src: logoIcon, alt: "Logo", css: badgeIcon });
1676
+ const resolvedIcon = CompIcon ? /* @__PURE__ */ jsx22(CompIcon, { css: badgeIcon }) : /* @__PURE__ */ jsx22("img", { src: logoIcon, alt: "Logo", css: badgeIcon });
1660
1677
  const onDragEnd = (res) => {
1661
1678
  var _a2, _b2;
1662
1679
  if (res.destination && res.source.droppableId === ((_a2 = res.destination) == null ? void 0 : _a2.droppableId)) {
@@ -1670,7 +1687,7 @@ var EntrySearch = ({
1670
1687
  return result;
1671
1688
  }
1672
1689
  };
1673
- return /* @__PURE__ */ jsx21(
1690
+ return /* @__PURE__ */ jsx22(
1674
1691
  "div",
1675
1692
  {
1676
1693
  css: css11`
@@ -1685,7 +1702,7 @@ var EntrySearch = ({
1685
1702
  `,
1686
1703
  children: [
1687
1704
  showSearchBox ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
1688
- /* @__PURE__ */ jsx21("div", { css: entrySearchWrapper, "data-testid": "component-search", children: /* @__PURE__ */ jsxs10(
1705
+ /* @__PURE__ */ jsx22("div", { css: entrySearchWrapper, "data-testid": "component-search", children: /* @__PURE__ */ jsxs10(
1689
1706
  "button",
1690
1707
  {
1691
1708
  css: entrySearchBtn,
@@ -1696,7 +1713,7 @@ var EntrySearch = ({
1696
1713
  "aria-controls": `entry-search-config-${listBoxId.current}`,
1697
1714
  children: [
1698
1715
  resolvedIcon,
1699
- /* @__PURE__ */ jsx21(
1716
+ /* @__PURE__ */ jsx22(
1700
1717
  "span",
1701
1718
  {
1702
1719
  css: css11`
@@ -1705,7 +1722,7 @@ var EntrySearch = ({
1705
1722
  children: "Select"
1706
1723
  }
1707
1724
  ),
1708
- /* @__PURE__ */ jsx21("span", { css: entrySearchSelectIcon, children: /* @__PURE__ */ jsx21(
1725
+ /* @__PURE__ */ jsx22("span", { css: entrySearchSelectIcon, children: /* @__PURE__ */ jsx22(
1709
1726
  ChevronDown_default,
1710
1727
  {
1711
1728
  css: [
@@ -1736,7 +1753,7 @@ var EntrySearch = ({
1736
1753
  margin-bottom: var(--spacing-base);
1737
1754
  `,
1738
1755
  children: [
1739
- /* @__PURE__ */ jsx21(
1756
+ /* @__PURE__ */ jsx22(
1740
1757
  InputSelect3,
1741
1758
  {
1742
1759
  onChange: (e) => setContentTypeSelected(e.target.value),
@@ -1754,13 +1771,13 @@ var EntrySearch = ({
1754
1771
  ]
1755
1772
  }
1756
1773
  ),
1757
- /* @__PURE__ */ jsx21(
1774
+ /* @__PURE__ */ jsx22(
1758
1775
  "div",
1759
1776
  {
1760
1777
  css: css11`
1761
1778
  flex-grow: 1;
1762
1779
  `,
1763
- children: /* @__PURE__ */ jsx21(
1780
+ children: /* @__PURE__ */ jsx22(
1764
1781
  InputKeywordSearch,
1765
1782
  {
1766
1783
  inputFieldName: "searchText",
@@ -1784,8 +1801,8 @@ var EntrySearch = ({
1784
1801
  tabIndex: 0,
1785
1802
  "data-testid": "entry-list",
1786
1803
  children: [
1787
- /* @__PURE__ */ jsx21(LoadingOverlay, { isActive: showLoadingOverlay }),
1788
- Array.isArray(results) && results.length > 0 ? results.map((result) => /* @__PURE__ */ jsx21(
1804
+ /* @__PURE__ */ jsx22(LoadingOverlay, { isActive: showLoadingOverlay }),
1805
+ Array.isArray(results) && results.length > 0 ? results.map((result) => /* @__PURE__ */ jsx22(
1789
1806
  ResolvedRowComponent,
1790
1807
  {
1791
1808
  isSelected: selectedListItems.some((item) => item.id === result.id),
@@ -1793,14 +1810,14 @@ var EntrySearch = ({
1793
1810
  triggerSelection: () => handleListItemSelect(result)
1794
1811
  },
1795
1812
  result.id
1796
- )) : resultsLoading ? null : /* @__PURE__ */ jsx21(
1813
+ )) : resultsLoading ? null : /* @__PURE__ */ jsx22(
1797
1814
  ResolvedNoResultsComponent,
1798
1815
  {
1799
1816
  searchText: textInput || textInput,
1800
1817
  selectedContentType: (_b = (_a = contentTypes == null ? void 0 : contentTypes.find((t) => t.id === contentTypeSelected)) == null ? void 0 : _a.name) != null ? _b : contentTypeSelected
1801
1818
  }
1802
1819
  ),
1803
- !resultsLoading && typeof totalResults !== "undefined" && results && (results == null ? void 0 : results.length) < totalResults && /* @__PURE__ */ jsx21("button", { type: "button", css: entrySearchLoadMoreBtn, onClick: handleLoadMoreClick, children: !loadingMore ? "Load More" : /* @__PURE__ */ jsx21(LoadingIndicator, {}) })
1820
+ !resultsLoading && typeof totalResults !== "undefined" && results && (results == null ? void 0 : results.length) < totalResults && /* @__PURE__ */ jsx22("button", { type: "button", css: entrySearchLoadMoreBtn, onClick: handleLoadMoreClick, children: !loadingMore ? "Load More" : /* @__PURE__ */ jsx22(LoadingIndicator, {}) })
1804
1821
  ]
1805
1822
  }
1806
1823
  ),
@@ -1812,17 +1829,17 @@ var EntrySearch = ({
1812
1829
  justify-content: space-between;
1813
1830
  `,
1814
1831
  children: [
1815
- /* @__PURE__ */ jsx21("div", { children: onAddNew && ((_c = contentTypes == null ? void 0 : contentTypes.length) != null ? _c : 0) > 0 ? /* @__PURE__ */ jsx21(
1832
+ /* @__PURE__ */ jsx22("div", { children: onAddNew && ((_c = contentTypes == null ? void 0 : contentTypes.length) != null ? _c : 0) > 0 ? /* @__PURE__ */ jsx22(
1816
1833
  Menu,
1817
1834
  {
1818
1835
  menuLabel: "Add new menu",
1819
- menuTrigger: /* @__PURE__ */ jsx21(Button, { buttonType: "secondary", children: "Add New" }),
1820
- children: contentTypes == null ? void 0 : contentTypes.map((ct) => /* @__PURE__ */ jsx21(
1836
+ menuTrigger: /* @__PURE__ */ jsx22(Button, { buttonType: "secondary", children: "Add New" }),
1837
+ children: contentTypes == null ? void 0 : contentTypes.map((ct) => /* @__PURE__ */ jsx22(
1821
1838
  MenuItem,
1822
1839
  {
1823
1840
  css: css11`
1824
1841
  background: var(--white);
1825
- color: var(--brand-secondary-1);
1842
+ color: var(--typography-base);
1826
1843
  `,
1827
1844
  onClick: () => onAddNew(ct),
1828
1845
  children: ct.name
@@ -1839,8 +1856,8 @@ var EntrySearch = ({
1839
1856
  gap: var(--spacing-base);
1840
1857
  `,
1841
1858
  children: [
1842
- /* @__PURE__ */ jsx21(Button, { buttonType: "unimportant", onClick: handleCancelClick, children: "Cancel" }),
1843
- /* @__PURE__ */ jsx21(
1859
+ /* @__PURE__ */ jsx22(Button, { buttonType: "unimportant", onClick: handleCancelClick, children: "Cancel" }),
1860
+ /* @__PURE__ */ jsx22(
1844
1861
  Button,
1845
1862
  {
1846
1863
  disabled: !selectedListItems.length,
@@ -1861,7 +1878,7 @@ var EntrySearch = ({
1861
1878
  ] }) : null,
1862
1879
  !listOpen ? multiSelect && selectedListItems.length > 1 ? (
1863
1880
  //enable dnd only if selected more then 1 item
1864
- /* @__PURE__ */ jsx21(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx21(Droppable, { droppableId: multiSelectId || "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs10(
1881
+ /* @__PURE__ */ jsx22(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx22(Droppable, { droppableId: multiSelectId || "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs10(
1865
1882
  "div",
1866
1883
  {
1867
1884
  ...provided.droppableProps,
@@ -1872,7 +1889,7 @@ var EntrySearch = ({
1872
1889
  children: [
1873
1890
  selectedListItems == null ? void 0 : selectedListItems.map((selectedItem, index) => {
1874
1891
  if (selectedItem == null ? void 0 : selectedItem.id) {
1875
- return /* @__PURE__ */ jsx21(Draggable, { draggableId: selectedItem.id, index, children: (provided2, snapshot) => {
1892
+ return /* @__PURE__ */ jsx22(Draggable, { draggableId: selectedItem.id, index, children: (provided2, snapshot) => {
1876
1893
  return /* @__PURE__ */ jsxs10(
1877
1894
  "div",
1878
1895
  {
@@ -1883,7 +1900,7 @@ var EntrySearch = ({
1883
1900
  ...provided2.dragHandleProps,
1884
1901
  children: [
1885
1902
  /* @__PURE__ */ jsxs10("span", { css: draggableIconWrapper, children: [
1886
- /* @__PURE__ */ jsx21(
1903
+ /* @__PURE__ */ jsx22(
1887
1904
  MoreVerticalAlt_default,
1888
1905
  {
1889
1906
  css: [draggableIcon, draggableIconOffset],
@@ -1891,9 +1908,9 @@ var EntrySearch = ({
1891
1908
  height: 24
1892
1909
  }
1893
1910
  ),
1894
- /* @__PURE__ */ jsx21(MoreVerticalAlt_default, { css: draggableIcon, width: 24, height: 24 })
1911
+ /* @__PURE__ */ jsx22(MoreVerticalAlt_default, { css: draggableIcon, width: 24, height: 24 })
1895
1912
  ] }),
1896
- /* @__PURE__ */ jsx21(
1913
+ /* @__PURE__ */ jsx22(
1897
1914
  ResolvedSelectedItemComponent,
1898
1915
  {
1899
1916
  logoIcon,
@@ -1913,7 +1930,7 @@ var EntrySearch = ({
1913
1930
  ]
1914
1931
  }
1915
1932
  ) }) })
1916
- ) : selectedListItems == null ? void 0 : selectedListItems.map((selectedItem) => /* @__PURE__ */ jsx21(
1933
+ ) : selectedListItems == null ? void 0 : selectedListItems.map((selectedItem) => /* @__PURE__ */ jsx22(
1917
1934
  ResolvedSelectedItemComponent,
1918
1935
  {
1919
1936
  logoIcon,
@@ -1978,7 +1995,7 @@ var productSearchRowActiveIcon = css12`
1978
1995
  `;
1979
1996
 
1980
1997
  // src/components/commerce/ProductSearchRow.tsx
1981
- import { jsx as jsx22, jsxs as jsxs11 } from "@emotion/react/jsx-runtime";
1998
+ import { jsx as jsx23, jsxs as jsxs11 } from "@emotion/react/jsx-runtime";
1982
1999
  function ProductSearchRow({
1983
2000
  result,
1984
2001
  isSelected,
@@ -1988,7 +2005,7 @@ function ProductSearchRow({
1988
2005
  const { categories, logoIcon } = useProductSearchContext();
1989
2006
  const [category] = result.categories || [{ id: "", name: "" }];
1990
2007
  const categoryName = typeof category === "undefined" || !categories ? void 0 : (_a = categories.find((c) => c.id === category.id)) == null ? void 0 : _a.name;
1991
- return /* @__PURE__ */ jsx22(
2008
+ return /* @__PURE__ */ jsx23(
1992
2009
  "div",
1993
2010
  {
1994
2011
  "data-value": result.id,
@@ -1997,7 +2014,7 @@ function ProductSearchRow({
1997
2014
  onClick: () => triggerSelection(),
1998
2015
  css: [productSearchRowContainer],
1999
2016
  children: /* @__PURE__ */ jsxs11("div", { css: [productSearchRowContent, isSelected ? productSearchRowContentActive : void 0], children: [
2000
- result.thumbnailUrl ? /* @__PURE__ */ jsx22(
2017
+ result.thumbnailUrl ? /* @__PURE__ */ jsx23(
2001
2018
  "img",
2002
2019
  {
2003
2020
  src: result.thumbnailUrl,
@@ -2009,7 +2026,7 @@ function ProductSearchRow({
2009
2026
  object-fit: cover;
2010
2027
  `
2011
2028
  }
2012
- ) : /* @__PURE__ */ jsx22(
2029
+ ) : /* @__PURE__ */ jsx23(
2013
2030
  Image,
2014
2031
  {
2015
2032
  src: logoIcon,
@@ -2022,14 +2039,14 @@ function ProductSearchRow({
2022
2039
  ),
2023
2040
  /* @__PURE__ */ jsxs11("h4", { css: [productSearchRowTitle], children: [
2024
2041
  result.title,
2025
- categoryName ? /* @__PURE__ */ jsx22("span", { css: [productSearchRowCategory], children: categoryName }) : null
2042
+ categoryName ? /* @__PURE__ */ jsx23("span", { css: [productSearchRowCategory], children: categoryName }) : null
2026
2043
  ] }),
2027
2044
  /* @__PURE__ */ jsxs11("p", { css: [productSearchRowDetails], children: [
2028
2045
  "SKU: ",
2029
2046
  result.sku || result.id,
2030
- result.price !== void 0 ? /* @__PURE__ */ jsx22("span", { children: result.price }) : null
2047
+ result.price !== void 0 ? /* @__PURE__ */ jsx23("span", { children: result.price }) : null
2031
2048
  ] }),
2032
- isSelected ? /* @__PURE__ */ jsx22(Checkmark_default, { css: [productSearchRowActiveIcon] }) : null
2049
+ isSelected ? /* @__PURE__ */ jsx23(Checkmark_default, { css: [productSearchRowActiveIcon] }) : null
2033
2050
  ] })
2034
2051
  },
2035
2052
  result.id
@@ -2114,7 +2131,7 @@ var productSelectedItemLinkContainer = css14`
2114
2131
  `;
2115
2132
 
2116
2133
  // src/components/commerce/ProductSelectedItem.tsx
2117
- import { jsx as jsx23, jsxs as jsxs12 } from "@emotion/react/jsx-runtime";
2134
+ import { jsx as jsx24, jsxs as jsxs12 } from "@emotion/react/jsx-runtime";
2118
2135
  function ProductSelectedItem({
2119
2136
  selectedItem,
2120
2137
  onDeselect
@@ -2123,9 +2140,9 @@ function ProductSelectedItem({
2123
2140
  const { categories, logoIcon } = useProductSearchContext();
2124
2141
  const [category] = selectedItem.categories || [{ id: "", name: "" }];
2125
2142
  const categoryName = typeof category === "undefined" || !categories ? void 0 : (_a = categories.find((c) => c.id === category.id)) == null ? void 0 : _a.name;
2126
- return /* @__PURE__ */ jsx23("div", { css: [productSelectedItemContainer], children: /* @__PURE__ */ jsxs12("article", { css: [productSelectedItemDetails], children: [
2143
+ return /* @__PURE__ */ jsx24("div", { css: [productSelectedItemContainer], children: /* @__PURE__ */ jsxs12("article", { css: [productSelectedItemDetails], children: [
2127
2144
  /* @__PURE__ */ jsxs12("div", { css: [productSelectedItemContent], children: [
2128
- selectedItem.thumbnailUrl ? /* @__PURE__ */ jsx23(
2145
+ selectedItem.thumbnailUrl ? /* @__PURE__ */ jsx24(
2129
2146
  "img",
2130
2147
  {
2131
2148
  src: selectedItem.thumbnailUrl,
@@ -2133,7 +2150,7 @@ function ProductSelectedItem({
2133
2150
  css: [productSelectedItemImage],
2134
2151
  loading: "lazy"
2135
2152
  }
2136
- ) : /* @__PURE__ */ jsx23("div", { css: [productSelectedItemImage] }),
2153
+ ) : /* @__PURE__ */ jsx24("div", { css: [productSelectedItemImage] }),
2137
2154
  /* @__PURE__ */ jsxs12(
2138
2155
  "div",
2139
2156
  {
@@ -2152,7 +2169,7 @@ function ProductSelectedItem({
2152
2169
  `,
2153
2170
  children: [
2154
2171
  selectedItem.title || selectedItem.id || "",
2155
- categoryName && /* @__PURE__ */ jsx23(
2172
+ categoryName && /* @__PURE__ */ jsx24(
2156
2173
  "span",
2157
2174
  {
2158
2175
  css: css15`
@@ -2178,7 +2195,7 @@ function ProductSelectedItem({
2178
2195
  `,
2179
2196
  children: [
2180
2197
  /* @__PURE__ */ jsxs12("li", { children: [
2181
- /* @__PURE__ */ jsx23(
2198
+ /* @__PURE__ */ jsx24(
2182
2199
  "span",
2183
2200
  {
2184
2201
  css: css15`
@@ -2190,7 +2207,7 @@ function ProductSelectedItem({
2190
2207
  selectedItem.sku || selectedItem.id
2191
2208
  ] }),
2192
2209
  selectedItem.price !== void 0 ? /* @__PURE__ */ jsxs12("li", { children: [
2193
- /* @__PURE__ */ jsx23(
2210
+ /* @__PURE__ */ jsx24(
2194
2211
  "span",
2195
2212
  {
2196
2213
  css: css15`
@@ -2199,7 +2216,7 @@ function ProductSelectedItem({
2199
2216
  children: "Price:"
2200
2217
  }
2201
2218
  ),
2202
- /* @__PURE__ */ jsx23("span", { children: selectedItem.price })
2219
+ /* @__PURE__ */ jsx24("span", { children: selectedItem.price })
2203
2220
  ] }) : null
2204
2221
  ]
2205
2222
  }
@@ -2218,8 +2235,8 @@ function ProductSelectedItem({
2218
2235
  target: "_blank",
2219
2236
  css: productedSelectedItemLinkBtn,
2220
2237
  children: [
2221
- /* @__PURE__ */ jsx23("span", { css: productedSelectedItemSmallText, children: "Edit" }),
2222
- /* @__PURE__ */ jsx23(Image, { src: logoIcon, alt: "Logo", css: productSelectedItemIcon })
2238
+ /* @__PURE__ */ jsx24("span", { css: productedSelectedItemSmallText, children: "Edit" }),
2239
+ /* @__PURE__ */ jsx24(Image, { src: logoIcon, alt: "Logo", css: productSelectedItemIcon })
2223
2240
  ]
2224
2241
  }
2225
2242
  ) : null,
@@ -2232,8 +2249,8 @@ function ProductSelectedItem({
2232
2249
  },
2233
2250
  css: productedSelectedItemLinkBtn,
2234
2251
  children: [
2235
- /* @__PURE__ */ jsx23("span", { css: productedSelectedItemSmallText, children: "Unlink" }),
2236
- /* @__PURE__ */ jsx23(Icon3, { icon: CgClose3, iconColor: "red", size: 16 })
2252
+ /* @__PURE__ */ jsx24("span", { css: productedSelectedItemSmallText, children: "Unlink" }),
2253
+ /* @__PURE__ */ jsx24(Icon3, { icon: CgClose3, iconColor: "red", size: 16 })
2237
2254
  ]
2238
2255
  }
2239
2256
  )
@@ -2242,7 +2259,7 @@ function ProductSelectedItem({
2242
2259
  }
2243
2260
 
2244
2261
  // src/components/commerce/ProductSearch.tsx
2245
- import { jsx as jsx24, jsxs as jsxs13 } from "@emotion/react/jsx-runtime";
2262
+ import { jsx as jsx25, jsxs as jsxs13 } from "@emotion/react/jsx-runtime";
2246
2263
  function ProductSearch({
2247
2264
  selectedProducts,
2248
2265
  setSelectedProducts,
@@ -2313,9 +2330,9 @@ function ProductSearch({
2313
2330
  "There was an error: ",
2314
2331
  (categoriesError2 == null ? void 0 : categoriesError2.message) || (searchError == null ? void 0 : searchError.message)
2315
2332
  ] });
2316
- return /* @__PURE__ */ jsx24(ErrorComp, { categoriesError, searchError: handleSearchState.error });
2333
+ return /* @__PURE__ */ jsx25(ErrorComp, { categoriesError, searchError: handleSearchState.error });
2317
2334
  }
2318
- return /* @__PURE__ */ jsx24(ProductSearchContext.Provider, { value: { categories, logoIcon }, children: /* @__PURE__ */ jsx24(
2335
+ return /* @__PURE__ */ jsx25(ProductSearchContext.Provider, { value: { categories, logoIcon }, children: /* @__PURE__ */ jsx25(
2319
2336
  EntrySearch,
2320
2337
  {
2321
2338
  search: handleSearch,
@@ -2353,7 +2370,7 @@ import { css as css17 } from "@emotion/react";
2353
2370
  import { CgClose as CgClose4 } from "@react-icons/all-files/cg/CgClose";
2354
2371
  import { CgInfo as CgInfo2 } from "@react-icons/all-files/cg/CgInfo";
2355
2372
  import { Icon as Icon4 } from "@uniformdev/design-system";
2356
- import { useEffect as useEffect4, useRef as useRef6, useState as useState5 } from "react";
2373
+ import { useEffect as useEffect4, useRef as useRef6, useState as useState6 } from "react";
2357
2374
  import { format as timeAgo2 } from "timeago.js";
2358
2375
 
2359
2376
  // src/components/dam/DamSelectedItem.styles.ts
@@ -2384,7 +2401,7 @@ var damSelectedItemCopy = css16`
2384
2401
  position: relative;
2385
2402
  `;
2386
2403
  var damSelectedItemTitle = css16`
2387
- color: var(--brand-secondary-1);
2404
+ color: var(--typography-base);
2388
2405
  font-size: var(--fs-base);
2389
2406
  font-weight: var(--fw-bold);
2390
2407
  line-height: 1;
@@ -2459,7 +2476,7 @@ var damSelectItemImage = css16`
2459
2476
  `;
2460
2477
 
2461
2478
  // src/components/dam/DamSelectedItem.tsx
2462
- import { jsx as jsx25, jsxs as jsxs14 } from "@emotion/react/jsx-runtime";
2479
+ import { jsx as jsx26, jsxs as jsxs14 } from "@emotion/react/jsx-runtime";
2463
2480
  function DamSelectedItem({
2464
2481
  selectedItem,
2465
2482
  onDeselect,
@@ -2468,7 +2485,7 @@ function DamSelectedItem({
2468
2485
  itemDetailsRendererComponent
2469
2486
  }) {
2470
2487
  const popoverRef = useRef6(null);
2471
- const [showInfo, setShowInfo] = useState5(false);
2488
+ const [showInfo, setShowInfo] = useState6(false);
2472
2489
  useEffect4(() => {
2473
2490
  const resizeHandler = () => {
2474
2491
  setShowInfo(false);
@@ -2479,7 +2496,7 @@ function DamSelectedItem({
2479
2496
  };
2480
2497
  }, [popoverRef]);
2481
2498
  const ResolvedItemDetailsRendererComponent = itemDetailsRendererComponent != null ? itemDetailsRendererComponent : DefaultDamItemRenderer;
2482
- return /* @__PURE__ */ jsx25(
2499
+ return /* @__PURE__ */ jsx26(
2483
2500
  "div",
2484
2501
  {
2485
2502
  css: [
@@ -2491,9 +2508,9 @@ function DamSelectedItem({
2491
2508
  children: /* @__PURE__ */ jsxs14("div", { css: damSelectedItemInner, children: [
2492
2509
  /* @__PURE__ */ jsxs14("div", { css: damSelectedItemDetails, children: [
2493
2510
  /* @__PURE__ */ jsxs14("div", { css: damSelectedItemCopy, children: [
2494
- /* @__PURE__ */ jsx25("h4", { css: [damSelectedItemTitle], title: `ID: ${selectedItem.id}`, "data-testid": "dam-selected-item", children: selectedItem.title || selectedItem.id || "" }),
2511
+ /* @__PURE__ */ jsx26("h4", { css: [damSelectedItemTitle], title: `ID: ${selectedItem.id}`, "data-testid": "dam-selected-item", children: selectedItem.title || selectedItem.id || "" }),
2495
2512
  selectedItem.popoverData ? /* @__PURE__ */ jsxs14("div", { ref: popoverRef, children: [
2496
- /* @__PURE__ */ jsx25(
2513
+ /* @__PURE__ */ jsx26(
2497
2514
  "button",
2498
2515
  {
2499
2516
  type: "button",
@@ -2501,7 +2518,7 @@ function DamSelectedItem({
2501
2518
  "aria-controls": "path-details",
2502
2519
  "aria-expanded": showInfo,
2503
2520
  onClick: () => setShowInfo(!showInfo),
2504
- children: /* @__PURE__ */ jsx25(
2521
+ children: /* @__PURE__ */ jsx26(
2505
2522
  Icon4,
2506
2523
  {
2507
2524
  icon: CgInfo2,
@@ -2514,7 +2531,7 @@ function DamSelectedItem({
2514
2531
  )
2515
2532
  }
2516
2533
  ),
2517
- /* @__PURE__ */ jsx25(
2534
+ /* @__PURE__ */ jsx26(
2518
2535
  "div",
2519
2536
  {
2520
2537
  id: "path-details",
@@ -2538,7 +2555,7 @@ function DamSelectedItem({
2538
2555
  )
2539
2556
  ] }) : null
2540
2557
  ] }),
2541
- /* @__PURE__ */ jsx25(ResolvedItemDetailsRendererComponent, { item: selectedItem })
2558
+ /* @__PURE__ */ jsx26(ResolvedItemDetailsRendererComponent, { item: selectedItem })
2542
2559
  ] }),
2543
2560
  /* @__PURE__ */ jsxs14("div", { css: damSelectedItemLinkContainer, children: [
2544
2561
  selectedItem.editLink ? typeof selectedItem.editLink === "string" ? /* @__PURE__ */ jsxs14(
@@ -2556,8 +2573,8 @@ function DamSelectedItem({
2556
2573
  },
2557
2574
  css: damSelectedItemLinkBtn,
2558
2575
  children: [
2559
- /* @__PURE__ */ jsx25("span", { css: damSelectedItemSmallText, children: "Edit" }),
2560
- logoIcon ? /* @__PURE__ */ jsx25(Image, { src: logoIcon, css: damSelectedItemIcon, alt: "Logo" }) : null
2576
+ /* @__PURE__ */ jsx26("span", { css: damSelectedItemSmallText, children: "Edit" }),
2577
+ logoIcon ? /* @__PURE__ */ jsx26(Image, { src: logoIcon, css: damSelectedItemIcon, alt: "Logo" }) : null
2561
2578
  ]
2562
2579
  }
2563
2580
  ) : selectedItem.editLink : null,
@@ -2570,8 +2587,8 @@ function DamSelectedItem({
2570
2587
  },
2571
2588
  css: damSelectedItemLinkBtn,
2572
2589
  children: [
2573
- /* @__PURE__ */ jsx25("span", { css: damSelectedItemSmallText, children: "Unlink" }),
2574
- /* @__PURE__ */ jsx25(Icon4, { icon: CgClose4, iconColor: "red", size: 16 })
2590
+ /* @__PURE__ */ jsx26("span", { css: damSelectedItemSmallText, children: "Unlink" }),
2591
+ /* @__PURE__ */ jsx26(Icon4, { icon: CgClose4, iconColor: "red", size: 16 })
2575
2592
  ]
2576
2593
  }
2577
2594
  )
@@ -2585,15 +2602,15 @@ function DefaultDamItemRenderer({ item }) {
2585
2602
  let preview = null;
2586
2603
  if (item.previewUrl && typeof item.previewUrl === "string") {
2587
2604
  if (item.type === "image") {
2588
- preview = /* @__PURE__ */ jsx25("img", { src: item.previewUrl, alt: item.id, width: "200", css: damSelectItemImage });
2605
+ preview = /* @__PURE__ */ jsx26("img", { src: item.previewUrl, alt: item.id, width: "200", css: damSelectItemImage });
2589
2606
  } else if (item.type === "video") {
2590
- preview = /* @__PURE__ */ jsx25("video", { src: item.previewUrl, title: item.id, width: "200", controls: true, css: damSelectItemImage });
2607
+ preview = /* @__PURE__ */ jsx26("video", { src: item.previewUrl, title: item.id, width: "200", controls: true, css: damSelectItemImage });
2591
2608
  }
2592
2609
  } else if (item.previewUrl && typeof item.previewUrl !== "string") {
2593
2610
  preview = item.previewUrl;
2594
2611
  }
2595
2612
  return preview || item.metadata ? /* @__PURE__ */ jsxs14("div", { css: damSelectedItemMediaContainer, children: [
2596
- preview ? /* @__PURE__ */ jsx25("div", { children: preview }) : null,
2613
+ preview ? /* @__PURE__ */ jsx26("div", { children: preview }) : null,
2597
2614
  /* @__PURE__ */ jsxs14("ul", { children: [
2598
2615
  item.metadata ? Object.entries(item.metadata).map(([key, value]) => {
2599
2616
  return /* @__PURE__ */ jsxs14(
@@ -2628,7 +2645,7 @@ function DefaultDamItemRenderer({ item }) {
2628
2645
  );
2629
2646
  }) : null,
2630
2647
  item.createdDate ? /* @__PURE__ */ jsxs14("li", { css: damSelectedItemSmallText, children: [
2631
- /* @__PURE__ */ jsx25("span", { css: damSelectedItemPopoverLabel, children: "Date:" }),
2648
+ /* @__PURE__ */ jsx26("span", { css: damSelectedItemPopoverLabel, children: "Date:" }),
2632
2649
  timeAgo2(item.createdDate)
2633
2650
  ] }) : null
2634
2651
  ] })
@@ -2654,13 +2671,14 @@ function useConnectedDataAsVariables(connectedData) {
2654
2671
  }
2655
2672
 
2656
2673
  // src/hooks/useDynamicInputsAsVariables.tsx
2674
+ import { LOCALE_DYNAMIC_INPUT_NAME } from "@uniformdev/canvas";
2657
2675
  import { useMemo as useMemo4 } from "react";
2658
- import { Fragment as Fragment4, jsx as jsx26 } from "@emotion/react/jsx-runtime";
2676
+ import { Fragment as Fragment4, jsx as jsx27 } from "@emotion/react/jsx-runtime";
2659
2677
  function useDynamicInputsAsVariables(dynamicInputs) {
2660
2678
  return useMemo4(() => {
2661
2679
  const result = Object.entries(dynamicInputs).reduce(
2662
2680
  (acc, [name, input3]) => {
2663
- const source = `from ${input3.type === "path" ? "URL path" : "query string"}`;
2681
+ const source = `from ${name === LOCALE_DYNAMIC_INPUT_NAME ? "current locale" : input3.type === "path" ? "URL path" : "query string"}`;
2664
2682
  acc[name] = {
2665
2683
  readOnly: true,
2666
2684
  type: input3.type,
@@ -2673,14 +2691,14 @@ Current preview value: ${input3.value || "not provided"}`
2673
2691
  if (!input3.value) {
2674
2692
  acc[name] = {
2675
2693
  ...acc[name],
2676
- helpText: /* @__PURE__ */ jsx26(Fragment4, { children: input3.value || /* @__PURE__ */ jsx26("em", { children: "not provided" }) }),
2694
+ helpText: /* @__PURE__ */ jsx27(Fragment4, { children: input3.value || /* @__PURE__ */ jsx27("em", { children: "not provided" }) }),
2677
2695
  displayName: name
2678
2696
  };
2679
2697
  } else {
2680
2698
  acc[name] = {
2681
2699
  ...acc[name],
2682
2700
  displayName: input3.value,
2683
- helpText: /* @__PURE__ */ jsx26(Fragment4, { children: name })
2701
+ helpText: /* @__PURE__ */ jsx27(Fragment4, { children: name })
2684
2702
  };
2685
2703
  }
2686
2704
  return acc;
@@ -2695,12 +2713,12 @@ Current preview value: ${input3.value || "not provided"}`
2695
2713
  import { useMemo as useMemo6, useRef as useRef7 } from "react";
2696
2714
 
2697
2715
  // src/components/UniformMeshLocationContext.tsx
2698
- import { createContext as createContext2, useContext as useContext4, useMemo as useMemo5, useState as useState6 } from "react";
2716
+ import { createContext as createContext2, useContext as useContext4, useMemo as useMemo5, useState as useState7 } from "react";
2699
2717
 
2700
2718
  // src/components/UniformMeshSdkContext.tsx
2701
2719
  import { Theme } from "@uniformdev/design-system";
2702
2720
  import { createContext, useContext as useContext3 } from "react";
2703
- import { jsx as jsx27, jsxs as jsxs15 } from "@emotion/react/jsx-runtime";
2721
+ import { jsx as jsx28, jsxs as jsxs15 } from "@emotion/react/jsx-runtime";
2704
2722
  var UniformMeshSdkContext = createContext(void 0);
2705
2723
  var useUniformMeshSdkContext = () => {
2706
2724
  const context = useContext3(UniformMeshSdkContext);
@@ -2717,13 +2735,13 @@ function useUniformMeshSdk() {
2717
2735
  }
2718
2736
 
2719
2737
  // src/components/UniformMeshLocationContext.tsx
2720
- import { jsx as jsx28 } from "@emotion/react/jsx-runtime";
2738
+ import { jsx as jsx29 } from "@emotion/react/jsx-runtime";
2721
2739
  var UniformMeshLocationContext = createContext2(void 0);
2722
2740
  var UniformMeshLocationContextProvider = ({
2723
2741
  children
2724
2742
  }) => {
2725
2743
  const sdk = useUniformMeshSdk();
2726
- const [location, setLocation] = useState6(sdk.getCurrentLocation());
2744
+ const [location, setLocation] = useState7(sdk.getCurrentLocation());
2727
2745
  useMemo5(() => {
2728
2746
  const valueChangeListener = (event) => {
2729
2747
  setLocation((old) => ({ ...old, value: event.newValue }));
@@ -2738,7 +2756,7 @@ var UniformMeshLocationContextProvider = ({
2738
2756
  sdk.events.off("onMetadataChanged", metaChangeListener);
2739
2757
  };
2740
2758
  }, [sdk]);
2741
- return /* @__PURE__ */ jsx28(UniformMeshLocationContext.Provider, { value: { location }, children });
2759
+ return /* @__PURE__ */ jsx29(UniformMeshLocationContext.Provider, { value: { location }, children });
2742
2760
  };
2743
2761
  var useUniformMeshLocationContext = () => {
2744
2762
  const context = useContext4(UniformMeshLocationContext);
@@ -2937,13 +2955,14 @@ function prettifyBindExpression(bindExpression) {
2937
2955
  // src/components/Variables/composer/VariableChip.tsx
2938
2956
  import { MultilineChip } from "@uniformdev/design-system";
2939
2957
  import { Fragment as Fragment5 } from "react";
2940
- import { jsx as jsx29 } from "@emotion/react/jsx-runtime";
2958
+ import { jsx as jsx30 } from "@emotion/react/jsx-runtime";
2941
2959
  function VariableChip({
2942
2960
  displayName,
2943
2961
  referenceIsValid,
2944
2962
  tooltip,
2945
2963
  reference,
2946
2964
  onClick,
2965
+ clickToEdit,
2947
2966
  isFresh,
2948
2967
  selected,
2949
2968
  disabled
@@ -2951,8 +2970,8 @@ function VariableChip({
2951
2970
  const hasClickEvent = !!onClick;
2952
2971
  const referenceIsValidFr = isFresh ? true : referenceIsValid;
2953
2972
  const Wrapper = referenceIsValidFr === "info" ? InfoVariableReference : referenceIsValidFr ? Fragment5 : UndefinedVariableReference;
2954
- const extraTitle = !referenceIsValidFr ? `${reference} is not defined.` : hasClickEvent ? "Click to edit" : void 0;
2955
- return /* @__PURE__ */ jsx29(
2973
+ const extraTitle = !referenceIsValidFr ? `${reference} is not defined.` : hasClickEvent && clickToEdit ? "Click to edit" : void 0;
2974
+ return /* @__PURE__ */ jsx30(
2956
2975
  MultilineChip,
2957
2976
  {
2958
2977
  title: tooltip ? `${tooltip}${extraTitle ? `
@@ -2961,12 +2980,12 @@ ${extraTitle}` : ""}` : extraTitle,
2961
2980
  onClick,
2962
2981
  "aria-selected": selected ? true : void 0,
2963
2982
  "aria-disabled": disabled,
2964
- children: /* @__PURE__ */ jsx29(Wrapper, { children: displayName || reference })
2983
+ children: /* @__PURE__ */ jsx30(Wrapper, { children: displayName || reference })
2965
2984
  }
2966
2985
  );
2967
2986
  }
2968
2987
  function UndefinedVariableReference({ children }) {
2969
- return /* @__PURE__ */ jsx29(
2988
+ return /* @__PURE__ */ jsx30(
2970
2989
  "span",
2971
2990
  {
2972
2991
  style: {
@@ -2979,7 +2998,7 @@ function UndefinedVariableReference({ children }) {
2979
2998
  );
2980
2999
  }
2981
3000
  function InfoVariableReference({ children }) {
2982
- return /* @__PURE__ */ jsx29(
3001
+ return /* @__PURE__ */ jsx30(
2983
3002
  "span",
2984
3003
  {
2985
3004
  style: {
@@ -3012,7 +3031,7 @@ import {
3012
3031
  COMMAND_PRIORITY_NORMAL,
3013
3032
  createCommand
3014
3033
  } from "lexical";
3015
- import { useCallback, useEffect as useEffect7, useMemo as useMemo8, useRef as useRef10, useState as useState9 } from "react";
3034
+ import { useCallback, useEffect as useEffect7, useMemo as useMemo8, useRef as useRef10, useState as useState10 } from "react";
3016
3035
  import { createPortal } from "react-dom";
3017
3036
 
3018
3037
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
@@ -3045,11 +3064,11 @@ var variablesTipText = css18`
3045
3064
  `;
3046
3065
 
3047
3066
  // src/components/Variables/useVariableEditor.ts
3048
- import { useEffect as useEffect6, useState as useState8 } from "react";
3067
+ import { useEffect as useEffect6, useState as useState9 } from "react";
3049
3068
 
3050
3069
  // src/components/Variables/VariablesProvider.tsx
3051
3070
  import mitt from "mitt";
3052
- import { createContext as createContext3, useContext as useContext5, useMemo as useMemo7, useState as useState7 } from "react";
3071
+ import { createContext as createContext3, useContext as useContext5, useMemo as useMemo7, useState as useState8 } from "react";
3053
3072
 
3054
3073
  // src/components/Variables/VariableEditor.tsx
3055
3074
  import { zodResolver } from "@hookform/resolvers/zod";
@@ -3067,7 +3086,7 @@ var variablesFormContainer = css19`
3067
3086
  `;
3068
3087
 
3069
3088
  // src/components/Variables/VariableEditor.tsx
3070
- import { jsx as jsx30, jsxs as jsxs16 } from "@emotion/react/jsx-runtime";
3089
+ import { jsx as jsx31, jsxs as jsxs16 } from "@emotion/react/jsx-runtime";
3071
3090
  var schema = z.object({
3072
3091
  name: z.string().nonempty("Name can't be empty").regex(/^[^${}]+$/, "$, {, and } are reserved characters and cannot be used in a variable name"),
3073
3092
  default: z.string(),
@@ -3080,9 +3099,10 @@ function VariableEditor({
3080
3099
  variable,
3081
3100
  onSubmit,
3082
3101
  onCancel,
3102
+ showDisplayName,
3083
3103
  disableMeshTip
3084
3104
  }) {
3085
- var _a, _b, _c, _d, _e, _f, _g;
3105
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3086
3106
  const { variables } = useVariables();
3087
3107
  const currentVariable = variables[variable];
3088
3108
  const { register, handleSubmit, formState } = useForm({
@@ -3123,7 +3143,7 @@ function VariableEditor({
3123
3143
  // NOTE: this is intentionally NOT a <form> because it's regularly used in a nested modal and that can make it bubble
3124
3144
  // up a submit to its 'parent form' which is not what we want.
3125
3145
  /* @__PURE__ */ jsxs16("div", { css: variablesFormContainer, children: [
3126
- /* @__PURE__ */ jsx30(
3146
+ /* @__PURE__ */ jsx31(
3127
3147
  Input2,
3128
3148
  {
3129
3149
  ...nameRegister,
@@ -3137,33 +3157,43 @@ function VariableEditor({
3137
3157
  }
3138
3158
  }
3139
3159
  ),
3140
- /* @__PURE__ */ jsx30(
3160
+ showDisplayName ? /* @__PURE__ */ jsx31(
3161
+ Input2,
3162
+ {
3163
+ ...register("displayName"),
3164
+ label: "Display name",
3165
+ autoComplete: "off",
3166
+ caption: "This is the name that will be displayed in the UI. If not provided, the name will be used.",
3167
+ errorMessage: (_f = formState.errors.helpText) == null ? void 0 : _f.message
3168
+ }
3169
+ ) : null,
3170
+ /* @__PURE__ */ jsx31(
3141
3171
  Input2,
3142
3172
  {
3143
3173
  ...register("helpText"),
3144
3174
  label: "Help Text",
3145
3175
  caption: "Appears when entering a value for this variable.",
3146
3176
  autoComplete: "off",
3147
- errorMessage: (_f = formState.errors.helpText) == null ? void 0 : _f.message
3177
+ errorMessage: (_g = formState.errors.helpText) == null ? void 0 : _g.message
3148
3178
  }
3149
3179
  ),
3150
- /* @__PURE__ */ jsx30(
3180
+ /* @__PURE__ */ jsx31(
3151
3181
  Input2,
3152
3182
  {
3153
3183
  ...register("default"),
3154
3184
  label: "Default Value",
3155
3185
  autoComplete: "off",
3156
- errorMessage: (_g = formState.errors.default) == null ? void 0 : _g.message
3186
+ errorMessage: (_h = formState.errors.default) == null ? void 0 : _h.message
3157
3187
  }
3158
3188
  ),
3159
- /* @__PURE__ */ jsx30(HorizontalRhythm, { justify: "space-between", children: /* @__PURE__ */ jsxs16(HorizontalRhythm, { gap: "sm", children: [
3160
- /* @__PURE__ */ jsx30(Button2, { type: "button", onClick: submitHandler, children: "OK" }),
3161
- /* @__PURE__ */ jsx30(Button2, { type: "button", buttonType: "ghost", onClick: () => onCancel({ disconnect: false }), children: "cancel" })
3189
+ /* @__PURE__ */ jsx31(HorizontalRhythm, { justify: "space-between", children: /* @__PURE__ */ jsxs16(HorizontalRhythm, { gap: "sm", children: [
3190
+ /* @__PURE__ */ jsx31(Button2, { type: "button", onClick: submitHandler, children: "OK" }),
3191
+ /* @__PURE__ */ jsx31(Button2, { type: "button", buttonType: "ghost", onClick: () => onCancel({ disconnect: false }), children: "cancel" })
3162
3192
  ] }) }),
3163
3193
  disableMeshTip ? null : /* @__PURE__ */ jsxs16(Callout3, { type: "tip", title: "Customized User Interfaces", children: [
3164
3194
  "Developers can create customized user interfaces for variable editing by building a Uniform mesh integration. Get started quickly with our",
3165
3195
  " ",
3166
- /* @__PURE__ */ jsx30(
3196
+ /* @__PURE__ */ jsx31(
3167
3197
  "a",
3168
3198
  {
3169
3199
  href: "https://docs.uniform.app/docs/integrations/mesh-integrations/custom-integrations",
@@ -3179,7 +3209,7 @@ function VariableEditor({
3179
3209
  }
3180
3210
 
3181
3211
  // src/components/Variables/VariablesProvider.tsx
3182
- import { jsx as jsx31, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
3212
+ import { jsx as jsx32, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
3183
3213
  var VariablesContext = createContext3(null);
3184
3214
  function VariablesProvider({
3185
3215
  value,
@@ -3190,8 +3220,8 @@ function VariablesProvider({
3190
3220
  children,
3191
3221
  knownUndefinedValues = {}
3192
3222
  }) {
3193
- const [editing, setEditing] = useState7();
3194
- const [editingContext, setEditingContext] = useState7();
3223
+ const [editing, setEditing] = useState8();
3224
+ const [editingContext, setEditingContext] = useState8();
3195
3225
  const events = useMemo7(
3196
3226
  () => mitt(),
3197
3227
  []
@@ -3250,7 +3280,7 @@ function VariablesProvider({
3250
3280
  }, [editing, events, knownUndefinedValues, valueBasedContextValue, isLoading]);
3251
3281
  return /* @__PURE__ */ jsxs17(VariablesContext.Provider, { value: contextValue, children: [
3252
3282
  children,
3253
- typeof editing !== "undefined" ? /* @__PURE__ */ jsx31(
3283
+ typeof editing !== "undefined" ? /* @__PURE__ */ jsx32(
3254
3284
  Editor,
3255
3285
  {
3256
3286
  context: editingContext,
@@ -3309,7 +3339,7 @@ function flattenVariables(variables) {
3309
3339
  // src/components/Variables/useVariableEditor.ts
3310
3340
  function useVariableEditor() {
3311
3341
  const { variables, events, canDispatch, dispatch, isEditing } = useVariables(true);
3312
- const [isEditingBinding, setIsEditingBinding] = useState8();
3342
+ const [isEditingBinding, setIsEditingBinding] = useState9();
3313
3343
  useEffect6(() => {
3314
3344
  if (!canDispatch || !isEditingBinding) {
3315
3345
  return;
@@ -3406,7 +3436,7 @@ function variablesToGroupedList(variables, filterFn, context) {
3406
3436
  }
3407
3437
 
3408
3438
  // src/components/Variables/composer/VariablesPlugin.tsx
3409
- import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs18 } from "@emotion/react/jsx-runtime";
3439
+ import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs18 } from "@emotion/react/jsx-runtime";
3410
3440
  var OPEN_INSERT_VARIABLE_COMMAND = createCommand("uniform:open-insert-variable");
3411
3441
  var EDIT_VARIABLE_COMMAND = createCommand("uniform:edit-variable");
3412
3442
  var DISCONNECT_VARIABLE_COMMAND = createCommand(
@@ -3525,7 +3555,7 @@ function VariablesPlugin({
3525
3555
  [canDispatch, enableEditingVariables, readOnly]
3526
3556
  );
3527
3557
  const { editVariable } = useVariableEditor();
3528
- const [queryString, setQueryString] = useState9(null);
3558
+ const [queryString, setQueryString] = useState10(null);
3529
3559
  const { groupedVariables, menuOptions, onSelect } = useVariablesMenu({
3530
3560
  showAddVariableMenuOption,
3531
3561
  filterVariable,
@@ -3726,7 +3756,7 @@ function VariablesPlugin({
3726
3756
  if (disableVariables) {
3727
3757
  return null;
3728
3758
  }
3729
- return /* @__PURE__ */ jsx32(
3759
+ return /* @__PURE__ */ jsx33(
3730
3760
  LexicalTypeaheadMenuPlugin,
3731
3761
  {
3732
3762
  onQueryChange: setQueryString,
@@ -3739,7 +3769,7 @@ function VariablesPlugin({
3739
3769
  }
3740
3770
  let currentCumulativeMenuIndex = -1;
3741
3771
  return createPortal(
3742
- /* @__PURE__ */ jsx32(
3772
+ /* @__PURE__ */ jsx33(
3743
3773
  "div",
3744
3774
  {
3745
3775
  "data-auto-resize-opt-in": true,
@@ -3758,14 +3788,14 @@ function VariablesPlugin({
3758
3788
  position: relative;
3759
3789
  z-index: var(--z-50);
3760
3790
  `,
3761
- children: /* @__PURE__ */ jsx32("div", { children: filteredGroupedVariables.map((group, index) => {
3791
+ children: /* @__PURE__ */ jsx33("div", { children: filteredGroupedVariables.map((group, index) => {
3762
3792
  var _a, _b;
3763
3793
  return /* @__PURE__ */ jsxs18(Fragment6, { children: [
3764
- /* @__PURE__ */ jsx32(MenuGroup, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
3794
+ /* @__PURE__ */ jsx33(MenuGroup, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
3765
3795
  var _a2;
3766
3796
  currentCumulativeMenuIndex++;
3767
3797
  const myCumulativeIndex = currentCumulativeMenuIndex;
3768
- return /* @__PURE__ */ jsx32(
3798
+ return /* @__PURE__ */ jsx33(
3769
3799
  MenuItemInner,
3770
3800
  {
3771
3801
  active: selectedIndex === myCumulativeIndex,
@@ -3778,18 +3808,18 @@ function VariablesPlugin({
3778
3808
  },
3779
3809
  css: menuItemTextGroup,
3780
3810
  children: variable.name === ADD_VARIABLE_OPTION ? /* @__PURE__ */ jsxs18(HorizontalRhythm2, { gap: "sm", align: "center", children: [
3781
- /* @__PURE__ */ jsx32(AiFillPlusCircle, { fill: "var(--gray-500)" }),
3811
+ /* @__PURE__ */ jsx33(AiFillPlusCircle, { fill: "var(--gray-500)" }),
3782
3812
  " ",
3783
- /* @__PURE__ */ jsx32("span", { children: variable.displayName })
3813
+ /* @__PURE__ */ jsx33("span", { children: variable.displayName })
3784
3814
  ] }) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
3785
- /* @__PURE__ */ jsx32("span", { children: (_a2 = variable.displayName) != null ? _a2 : variable.name }),
3786
- variable.helpText ? /* @__PURE__ */ jsx32("small", { css: smallText, children: variable.helpText }) : null
3815
+ /* @__PURE__ */ jsx33("span", { children: (_a2 = variable.displayName) != null ? _a2 : variable.name }),
3816
+ variable.helpText ? /* @__PURE__ */ jsx33("small", { css: smallText, children: variable.helpText }) : null
3787
3817
  ] })
3788
3818
  },
3789
3819
  group.name + variable.name
3790
3820
  );
3791
3821
  }) }, (_b = group.name) != null ? _b : `none${index}`),
3792
- group.name || index === filteredGroupedVariables.length - 1 ? null : /* @__PURE__ */ jsx32(MenuItemSeparator, {})
3822
+ group.name || index === filteredGroupedVariables.length - 1 ? null : /* @__PURE__ */ jsx33(MenuItemSeparator, {})
3793
3823
  ] });
3794
3824
  }) })
3795
3825
  }
@@ -3802,7 +3832,7 @@ function VariablesPlugin({
3802
3832
  }
3803
3833
 
3804
3834
  // src/components/Variables/composer/VariableNode.tsx
3805
- import { jsx as jsx33 } from "@emotion/react/jsx-runtime";
3835
+ import { jsx as jsx34 } from "@emotion/react/jsx-runtime";
3806
3836
  var VariableNode = class _VariableNode extends DecoratorNode {
3807
3837
  constructor(reference, state, key) {
3808
3838
  super(key);
@@ -3867,7 +3897,7 @@ var VariableNode = class _VariableNode extends DecoratorNode {
3867
3897
  * rely on Context, etc in this renderer.
3868
3898
  */
3869
3899
  decorate() {
3870
- return /* @__PURE__ */ jsx33(VariableNodeComponent, { state: this.__state, reference: this.reference, nodeKey: this.__key });
3900
+ return /* @__PURE__ */ jsx34(VariableNodeComponent, { state: this.__state, reference: this.reference, nodeKey: this.__key });
3871
3901
  }
3872
3902
  };
3873
3903
  function $createVariableNode(variableReference, state) {
@@ -3960,14 +3990,15 @@ function VariableNodeComponent({
3960
3990
  )
3961
3991
  );
3962
3992
  }, [clearSelection, editor, isSelected, nodeKey, onDelete, setSelected]);
3963
- return /* @__PURE__ */ jsx33(
3993
+ return /* @__PURE__ */ jsx34(
3964
3994
  VariableChip,
3965
3995
  {
3966
3996
  ...state,
3967
3997
  reference,
3968
- displayName: state.isLoading ? /* @__PURE__ */ jsx33(LoadingIndicator2, { size: "sm" }) : state.displayName,
3998
+ displayName: state.isLoading ? /* @__PURE__ */ jsx34(LoadingIndicator2, { size: "sm" }) : state.displayName,
3969
3999
  selected: isSelected,
3970
4000
  disabled: readOnly,
4001
+ clickToEdit: state.hasClickEvent,
3971
4002
  onClick: state.hasClickEvent ? () => {
3972
4003
  setSelected(!isSelected);
3973
4004
  editor.dispatchCommand(EDIT_VARIABLE_COMMAND, {
@@ -3985,7 +4016,7 @@ function $isTargetWithinDecorator(target) {
3985
4016
 
3986
4017
  // src/components/Variables/InputVariables.tsx
3987
4018
  import { Caption, ErrorMessage, InfoMessage, WarningMessage } from "@uniformdev/design-system";
3988
- import { useState as useState12 } from "react";
4019
+ import { useState as useState13 } from "react";
3989
4020
  import { v4 as v42 } from "uuid";
3990
4021
 
3991
4022
  // src/components/Variables/composer/EditorRefPlugin.tsx
@@ -4045,28 +4076,37 @@ var menuBtn2 = css21`
4045
4076
  transform: translateY(-50%);
4046
4077
  `;
4047
4078
  var input = css21`
4079
+ --input-padding: 12px var(--spacing-base) 12px var(--spacing-sm);
4048
4080
  appearance: none;
4049
4081
  background-color: var(--white);
4050
- border: 1px solid var(--gray-400);
4051
- border-radius: var(--rounded-md);
4082
+ border: 1px solid var(--gray-300);
4083
+ border-radius: var(--rounded-sm);
4052
4084
  color: var(--gray-700);
4053
- padding-block: var(--spacing-base);
4054
- padding-left: var(--spacing-base);
4055
- padding-right: var(--spacing-lg);
4056
- line-height: 1.75;
4085
+ padding: var(--input-padding);
4086
+ min-height: 50px;
4057
4087
  width: 100%;
4058
4088
  position: relative;
4059
4089
  transition: background var(--duration-fast) var(--timing-ease-out),
4060
4090
  border-color var(--duration-fast) var(--timing-ease-out),
4061
- color var(--duration-fast) var(--timing-ease-out);
4091
+ color var(--duration-fast) var(--timing-ease-out), box-shadow var(--duration-fast) var(--timing-ease-out);
4092
+
4093
+ &::placeholder {
4094
+ color: var(--gray-400);
4095
+ }
4096
+
4097
+ &:hover {
4098
+ border-color: var(--accent-dark-hover);
4099
+ }
4062
4100
 
4101
+ &[data-focus='true'],
4063
4102
  &:focus,
4064
4103
  &:focus-within {
4065
- border-color: var(--brand-secondary-1);
4066
- box-shadow: none;
4104
+ border-color: var(--accent-dark-active);
4105
+ box-shadow: var(--elevation-100);
4067
4106
  outline: none;
4068
4107
  }
4069
4108
 
4109
+ &[data-disabled='true'],
4070
4110
  &:disabled,
4071
4111
  &:disabled::placeholder {
4072
4112
  cursor: not-allowed;
@@ -4219,7 +4259,7 @@ import { BsFillPlusCircleFill } from "@react-icons/all-files/bs/BsFillPlusCircle
4219
4259
  import { CgUsbC } from "@react-icons/all-files/cg/CgUsbC";
4220
4260
  import { HorizontalRhythm as HorizontalRhythm3, Menu as Menu2, MenuGroup as MenuGroup2, MenuItem as MenuItem2, MenuItemSeparator as MenuItemSeparator2 } from "@uniformdev/design-system";
4221
4261
  import { useRef as useRef11 } from "react";
4222
- import { Fragment as Fragment7, jsx as jsx34, jsxs as jsxs19 } from "@emotion/react/jsx-runtime";
4262
+ import { Fragment as Fragment7, jsx as jsx35, jsxs as jsxs19 } from "@emotion/react/jsx-runtime";
4223
4263
  function SelectVariableMenu({
4224
4264
  onSelectVariable,
4225
4265
  onResetVariables,
@@ -4245,7 +4285,7 @@ function SelectVariableMenu({
4245
4285
  {
4246
4286
  placement: "bottom-start",
4247
4287
  withoutPortal: true,
4248
- menuTrigger: /* @__PURE__ */ jsx34(
4288
+ menuTrigger: /* @__PURE__ */ jsx35(
4249
4289
  "button",
4250
4290
  {
4251
4291
  ...buttonProps,
@@ -4254,12 +4294,12 @@ function SelectVariableMenu({
4254
4294
  css: [menuBtn, buttonCss],
4255
4295
  type: "button",
4256
4296
  "data-testid": "insert-variable",
4257
- children: /* @__PURE__ */ jsx34(CgUsbC, { size: "1.4rem" })
4297
+ children: /* @__PURE__ */ jsx35(CgUsbC, { size: "1.4rem" })
4258
4298
  }
4259
4299
  ),
4260
4300
  menuLabel: menuTooltip,
4261
4301
  children: [
4262
- showAddVariableMenuOptionForReals ? /* @__PURE__ */ jsx34(
4302
+ showAddVariableMenuOptionForReals ? /* @__PURE__ */ jsx35(
4263
4303
  MenuItem2,
4264
4304
  {
4265
4305
  onClick: async () => {
@@ -4271,15 +4311,15 @@ function SelectVariableMenu({
4271
4311
  },
4272
4312
  "data-testid": "add-variable-button",
4273
4313
  children: /* @__PURE__ */ jsxs19(HorizontalRhythm3, { gap: "sm", align: "center", children: [
4274
- /* @__PURE__ */ jsx34(BsFillPlusCircleFill, { fill: "var(--gray-500)", size: "1.25em" }),
4275
- /* @__PURE__ */ jsx34("span", { children: typeof showAddVariableMenuOption === "string" ? showAddVariableMenuOption : /* @__PURE__ */ jsx34(Fragment7, { children: "Add\u2026" }) })
4314
+ /* @__PURE__ */ jsx35(BsFillPlusCircleFill, { fill: "var(--gray-500)", size: "1.25em" }),
4315
+ /* @__PURE__ */ jsx35("span", { children: typeof showAddVariableMenuOption === "string" ? showAddVariableMenuOption : /* @__PURE__ */ jsx35(Fragment7, { children: "Add\u2026" }) })
4276
4316
  ] })
4277
4317
  }
4278
4318
  ) : null,
4279
- showAddVariableMenuOptionForReals && menuHasVariableOptions ? /* @__PURE__ */ jsx34(MenuItemSeparator2, {}) : null,
4319
+ showAddVariableMenuOptionForReals && menuHasVariableOptions ? /* @__PURE__ */ jsx35(MenuItemSeparator2, {}) : null,
4280
4320
  variablesGroups.map((group) => {
4281
4321
  var _a;
4282
- return /* @__PURE__ */ jsx34(MenuGroup2, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
4322
+ return /* @__PURE__ */ jsx35(MenuGroup2, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
4283
4323
  const { name, displayName, helpText } = variable;
4284
4324
  return /* @__PURE__ */ jsxs19(
4285
4325
  MenuItem2,
@@ -4288,25 +4328,25 @@ function SelectVariableMenu({
4288
4328
  css: menuItemTextGroup,
4289
4329
  onClick: () => onSelectVariable == null ? void 0 : onSelectVariable(variable),
4290
4330
  children: [
4291
- /* @__PURE__ */ jsx34("span", { children: displayName != null ? displayName : name }),
4292
- helpText ? /* @__PURE__ */ jsx34("small", { css: smallText, children: helpText }) : null
4331
+ /* @__PURE__ */ jsx35("span", { children: displayName != null ? displayName : name }),
4332
+ helpText ? /* @__PURE__ */ jsx35("small", { css: smallText, children: helpText }) : null
4293
4333
  ]
4294
4334
  },
4295
4335
  name
4296
4336
  );
4297
4337
  }) }, group.name);
4298
4338
  }),
4299
- menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ jsx34(MenuItemSeparator2, {}) : null,
4300
- onResetVariables ? /* @__PURE__ */ jsx34(MenuItem2, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
4301
- tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ jsx34(MenuItemSeparator2, {}) : null,
4302
- tip ? /* @__PURE__ */ jsx34("i", { css: variablesTipText, children: tip }) : null
4339
+ menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ jsx35(MenuItemSeparator2, {}) : null,
4340
+ onResetVariables ? /* @__PURE__ */ jsx35(MenuItem2, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
4341
+ tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ jsx35(MenuItemSeparator2, {}) : null,
4342
+ tip ? /* @__PURE__ */ jsx35("i", { css: variablesTipText, children: tip }) : null
4303
4343
  ]
4304
4344
  }
4305
4345
  );
4306
4346
  }
4307
4347
 
4308
4348
  // src/components/Variables/toolbox/VariablesComposerVariableMenu.tsx
4309
- import { jsx as jsx35 } from "@emotion/react/jsx-runtime";
4349
+ import { jsx as jsx36 } from "@emotion/react/jsx-runtime";
4310
4350
  function VariablesComposerVariableMenu(props) {
4311
4351
  const [editor] = useLexicalComposerContext6();
4312
4352
  const onSelectVariable = (selectedVariable) => {
@@ -4322,7 +4362,7 @@ function VariablesComposerVariableMenu(props) {
4322
4362
  editor.dispatchCommand(CLEAR_EDITOR_COMMAND, void 0);
4323
4363
  (_a = props.onResetVariables) == null ? void 0 : _a.call(props);
4324
4364
  };
4325
- return /* @__PURE__ */ jsx35(
4365
+ return /* @__PURE__ */ jsx36(
4326
4366
  SelectVariableMenu,
4327
4367
  {
4328
4368
  ...props,
@@ -4333,7 +4373,7 @@ function VariablesComposerVariableMenu(props) {
4333
4373
  }
4334
4374
 
4335
4375
  // src/components/Variables/toolbox/VariableField.tsx
4336
- import { jsx as jsx36, jsxs as jsxs20 } from "@emotion/react/jsx-runtime";
4376
+ import { jsx as jsx37, jsxs as jsxs20 } from "@emotion/react/jsx-runtime";
4337
4377
  function VariableField({
4338
4378
  label,
4339
4379
  selectVariableMenuOptions,
@@ -4344,7 +4384,7 @@ function VariableField({
4344
4384
  }) {
4345
4385
  const { variables } = useVariables(true);
4346
4386
  const varCount = Object.keys(variables).length;
4347
- const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ jsx36(
4387
+ const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ jsx37(
4348
4388
  VariablesComposerVariableMenu,
4349
4389
  {
4350
4390
  ...selectVariableMenuOptions,
@@ -4352,10 +4392,10 @@ function VariableField({
4352
4392
  buttonProps: isActive ? { "aria-pressed": "true" } : void 0
4353
4393
  }
4354
4394
  ) : null;
4355
- return /* @__PURE__ */ jsxs20("div", { children: [
4356
- /* @__PURE__ */ jsxs20("label", { htmlFor: id, css: labelText, children: [
4395
+ return /* @__PURE__ */ jsxs20("div", { "data-testid": "variable-field", children: [
4396
+ /* @__PURE__ */ jsxs20("label", { htmlFor: id, css: labelText, "data-testid": "field-name", children: [
4357
4397
  variableSelector,
4358
- /* @__PURE__ */ jsx36("span", { children: label })
4398
+ /* @__PURE__ */ jsx37("span", { children: label })
4359
4399
  ] }),
4360
4400
  children
4361
4401
  ] });
@@ -4366,7 +4406,7 @@ import { AutoFocusPlugin } from "@lexical/react/LexicalAutoFocusPlugin";
4366
4406
  import { ClearEditorPlugin } from "@lexical/react/LexicalClearEditorPlugin";
4367
4407
  import { LexicalComposer } from "@lexical/react/LexicalComposer";
4368
4408
  import { OnChangePlugin } from "@lexical/react/LexicalOnChangePlugin";
4369
- import { useMemo as useMemo10, useRef as useRef12, useState as useState11 } from "react";
4409
+ import { useMemo as useMemo10, useRef as useRef12, useState as useState12 } from "react";
4370
4410
 
4371
4411
  // src/components/Variables/composer/DisablePlugin.tsx
4372
4412
  import { useLexicalComposerContext as useLexicalComposerContext7 } from "@lexical/react/LexicalComposerContext";
@@ -4426,7 +4466,7 @@ function serializeRecursive(node, buffer) {
4426
4466
  }
4427
4467
 
4428
4468
  // src/components/Variables/toolbox/VariablesComposer.tsx
4429
- import { Fragment as Fragment8, jsx as jsx37, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
4469
+ import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
4430
4470
  function VariablesComposer(props) {
4431
4471
  const {
4432
4472
  value,
@@ -4438,7 +4478,7 @@ function VariablesComposer(props) {
4438
4478
  autoFocus,
4439
4479
  ...variablesPluginProps
4440
4480
  } = props;
4441
- const [lastEmittedValue, setLastEmittedValue] = useState11(value);
4481
+ const [lastEmittedValue, setLastEmittedValue] = useState12(value);
4442
4482
  const editorConfig = useMemo10(
4443
4483
  () => ({
4444
4484
  namespace: "uniform",
@@ -4456,9 +4496,10 @@ function VariablesComposer(props) {
4456
4496
  if (typeof document === "undefined")
4457
4497
  return null;
4458
4498
  return /* @__PURE__ */ jsxs21(LexicalComposer, { initialConfig: editorConfig, children: [
4459
- /* @__PURE__ */ jsx37(
4499
+ /* @__PURE__ */ jsx38(
4460
4500
  OnChangePlugin,
4461
4501
  {
4502
+ ignoreSelectionChange: true,
4462
4503
  onChange: (state) => {
4463
4504
  editorState.current = state;
4464
4505
  if (updateTimeout.current) {
@@ -4476,12 +4517,12 @@ function VariablesComposer(props) {
4476
4517
  }
4477
4518
  }
4478
4519
  ),
4479
- /* @__PURE__ */ jsx37(Fragment8, { children: multiLine ? null : /* @__PURE__ */ jsx37(SingleLineTextPlugin, {}) }),
4480
- /* @__PURE__ */ jsx37(ClearEditorPlugin, {}),
4481
- /* @__PURE__ */ jsx37(VariablesPlugin, { ...variablesPluginProps }),
4482
- /* @__PURE__ */ jsx37(DisablePlugin, { disabled }),
4483
- /* @__PURE__ */ jsx37(Fragment8, { children: autoFocus ? /* @__PURE__ */ jsx37(AutoFocusPlugin, {}) : null }),
4484
- /* @__PURE__ */ jsx37(Fragment8, { children })
4520
+ /* @__PURE__ */ jsx38(Fragment8, { children: multiLine ? null : /* @__PURE__ */ jsx38(SingleLineTextPlugin, {}) }),
4521
+ /* @__PURE__ */ jsx38(ClearEditorPlugin, {}),
4522
+ /* @__PURE__ */ jsx38(VariablesPlugin, { ...variablesPluginProps }),
4523
+ /* @__PURE__ */ jsx38(DisablePlugin, { disabled }),
4524
+ /* @__PURE__ */ jsx38(Fragment8, { children: autoFocus ? /* @__PURE__ */ jsx38(AutoFocusPlugin, {}) : null }),
4525
+ /* @__PURE__ */ jsx38(Fragment8, { children })
4485
4526
  ] });
4486
4527
  }
4487
4528
 
@@ -4507,23 +4548,23 @@ import {
4507
4548
  PASTE_COMMAND as PASTE_COMMAND2
4508
4549
  } from "lexical";
4509
4550
  import { useEffect as useEffect13 } from "react";
4510
- import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4551
+ import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4511
4552
  function VariablesComposerInput({
4512
4553
  css: css37,
4513
4554
  placeholder,
4514
4555
  ...contentEditableProps
4515
4556
  }) {
4516
4557
  return /* @__PURE__ */ jsxs22("div", { children: [
4517
- /* @__PURE__ */ jsx38(
4558
+ /* @__PURE__ */ jsx39(
4518
4559
  PlainTextPlugin,
4519
4560
  {
4520
- contentEditable: /* @__PURE__ */ jsx38(ContentEditable, { ...contentEditableProps }),
4521
- placeholder: placeholder ? /* @__PURE__ */ jsx38(Fragment9, { children: placeholder }) : null,
4561
+ contentEditable: /* @__PURE__ */ jsx39(ContentEditable, { ...contentEditableProps }),
4562
+ placeholder: placeholder ? /* @__PURE__ */ jsx39(Fragment9, { children: placeholder }) : null,
4522
4563
  ErrorBoundary: LexicalErrorBoundary
4523
4564
  }
4524
4565
  ),
4525
- /* @__PURE__ */ jsx38(RichishCopyAndPastePlugin, {}),
4526
- /* @__PURE__ */ jsx38(HistoryPlugin, {})
4566
+ /* @__PURE__ */ jsx39(RichishCopyAndPastePlugin, {}),
4567
+ /* @__PURE__ */ jsx39(HistoryPlugin, {})
4527
4568
  ] });
4528
4569
  }
4529
4570
  function RichishCopyAndPastePlugin() {
@@ -4603,7 +4644,7 @@ function RichishCopyAndPastePlugin() {
4603
4644
  }
4604
4645
 
4605
4646
  // src/components/Variables/InputVariables.tsx
4606
- import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4647
+ import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4607
4648
  function InputVariables(props) {
4608
4649
  const {
4609
4650
  id,
@@ -4630,7 +4671,7 @@ function InputVariables(props) {
4630
4671
  filterVariable,
4631
4672
  styleVariant = "default"
4632
4673
  } = props;
4633
- const [finalId] = useState12(id != null ? id : () => v42());
4674
+ const [finalId] = useState13(id != null ? id : () => v42());
4634
4675
  const { dispatch, canDispatch, isEditing } = useVariables(true);
4635
4676
  const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
4636
4677
  const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
@@ -4644,14 +4685,14 @@ function InputVariables(props) {
4644
4685
  },
4645
4686
  css: disabled ? inputDisabled : "",
4646
4687
  children: [
4647
- useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx39(
4688
+ useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx40(
4648
4689
  InputVariablesOverlayMenu,
4649
4690
  {
4650
4691
  ...sharedMenuProps,
4651
4692
  disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
4652
4693
  replaceValueOnVariableInsert: useInputWithNoVariables,
4653
4694
  useInputWhenNoVariables: useInputWithNoVariables,
4654
- children: /* @__PURE__ */ jsx39(
4695
+ children: /* @__PURE__ */ jsx40(
4655
4696
  VariablesComposerInput,
4656
4697
  {
4657
4698
  id: finalId,
@@ -4659,7 +4700,7 @@ function InputVariables(props) {
4659
4700
  "data-testid": dataTestId ? dataTestId : "input-container",
4660
4701
  "data-text-value": value,
4661
4702
  css: [input, styleVariant === "compact" ? inputCompact : null],
4662
- placeholder: placeholder ? /* @__PURE__ */ jsx39(
4703
+ placeholder: placeholder ? /* @__PURE__ */ jsx40(
4663
4704
  Caption,
4664
4705
  {
4665
4706
  css: [
@@ -4673,16 +4714,16 @@ function InputVariables(props) {
4673
4714
  )
4674
4715
  }
4675
4716
  ),
4676
- caption ? /* @__PURE__ */ jsx39(Caption, { children: caption }) : null,
4677
- errorMessage ? /* @__PURE__ */ jsx39(ErrorMessage, { message: errorMessage }) : null,
4678
- warningMessage ? /* @__PURE__ */ jsx39(WarningMessage, { message: warningMessage }) : null,
4679
- infoMessage ? /* @__PURE__ */ jsx39(InfoMessage, { message: infoMessage }) : null
4717
+ caption ? /* @__PURE__ */ jsx40(Caption, { children: caption }) : null,
4718
+ errorMessage ? /* @__PURE__ */ jsx40(ErrorMessage, { message: errorMessage }) : null,
4719
+ warningMessage ? /* @__PURE__ */ jsx40(WarningMessage, { message: warningMessage }) : null,
4720
+ infoMessage ? /* @__PURE__ */ jsx40(InfoMessage, { message: infoMessage }) : null
4680
4721
  ]
4681
4722
  }
4682
4723
  );
4683
4724
  let body = input3;
4684
4725
  if (label) {
4685
- body = /* @__PURE__ */ jsx39(
4726
+ body = /* @__PURE__ */ jsx40(
4686
4727
  VariableField,
4687
4728
  {
4688
4729
  label,
@@ -4712,9 +4753,9 @@ function InputVariables(props) {
4712
4753
  autoFocus,
4713
4754
  filterVariable,
4714
4755
  children: [
4715
- /* @__PURE__ */ jsx39(PasteTransformerPlugin, { transformPaste }),
4716
- /* @__PURE__ */ jsx39(ControlledValuePlugin, { value, enabled: useInputWithNoVariables }),
4717
- editorRef ? /* @__PURE__ */ jsx39(EditorRefPlugin, { editorRef }) : null,
4756
+ /* @__PURE__ */ jsx40(PasteTransformerPlugin, { transformPaste }),
4757
+ /* @__PURE__ */ jsx40(ControlledValuePlugin, { value, enabled: useInputWithNoVariables }),
4758
+ editorRef ? /* @__PURE__ */ jsx40(EditorRefPlugin, { editorRef }) : null,
4718
4759
  body
4719
4760
  ]
4720
4761
  }
@@ -4727,11 +4768,11 @@ function InputVariablesOverlayMenu({
4727
4768
  ...props
4728
4769
  }) {
4729
4770
  if (disabled) {
4730
- return /* @__PURE__ */ jsx39(Fragment10, { children });
4771
+ return /* @__PURE__ */ jsx40(Fragment10, { children });
4731
4772
  }
4732
4773
  return /* @__PURE__ */ jsxs23("div", { css: menuContainer, children: [
4733
4774
  children,
4734
- /* @__PURE__ */ jsx39(
4775
+ /* @__PURE__ */ jsx40(
4735
4776
  VariablesComposerVariableMenu,
4736
4777
  {
4737
4778
  ...props,
@@ -4785,7 +4826,7 @@ var input2 = css23`
4785
4826
  appearance: none;
4786
4827
  box-sizing: border-box;
4787
4828
  background: var(--white);
4788
- border: 1px solid var(--white);
4829
+ border: 1px solid var(--gray-200);
4789
4830
  border-radius: var(--rounded-sm);
4790
4831
  color: var(--gray-700);
4791
4832
  font-size: var(--fs-sm);
@@ -4805,16 +4846,19 @@ var input2 = css23`
4805
4846
 
4806
4847
  &:focus,
4807
4848
  &:focus-within {
4808
- border-radius: var(--rounded-md);
4809
- box-shadow: none;
4810
- border: 1px solid var(--gray-300);
4849
+ border-radius: var(--rounded-sm);
4850
+ box-shadow: var(--elevation-100);
4851
+ border: 1px solid var(--accent-dark-active);
4811
4852
  outline: none;
4812
4853
  }
4854
+ &:hover {
4855
+ border: 1px solid var(--accent-dark-hover);
4856
+ }
4813
4857
 
4814
4858
  &:disabled,
4815
4859
  &:disabled::placeholder,
4816
4860
  &:disabled:hover {
4817
- border-radius: var(--rounded-md);
4861
+ border-radius: var(--rounded-sm);
4818
4862
  cursor: not-allowed;
4819
4863
  color: var(--gray-400);
4820
4864
  }
@@ -4839,7 +4883,7 @@ var inputMultiLine = (lines) => css23`
4839
4883
  `;
4840
4884
 
4841
4885
  // src/components/Variables/ParameterConnectionIndicator.tsx
4842
- import { jsx as jsx40, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
4886
+ import { jsx as jsx41, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
4843
4887
  function ParameterConnectionIndicator({
4844
4888
  children,
4845
4889
  value,
@@ -4859,20 +4903,20 @@ function ParameterConnectionIndicator({
4859
4903
  return result;
4860
4904
  }, [value]);
4861
4905
  return /* @__PURE__ */ jsxs24(HorizontalRhythm4, { align: "center", gap: "xs", css: { width: "100%" }, children: [
4862
- /* @__PURE__ */ jsx40("div", { css: { flex: 1 }, children }),
4863
- disabled ? null : /* @__PURE__ */ jsx40(
4906
+ /* @__PURE__ */ jsx41("div", { css: { flex: 1 }, children }),
4907
+ disabled ? null : /* @__PURE__ */ jsx41(
4864
4908
  Menu3,
4865
4909
  {
4866
4910
  placement: "bottom-start",
4867
4911
  withoutPortal: true,
4868
- menuTrigger: /* @__PURE__ */ jsx40(
4912
+ menuTrigger: /* @__PURE__ */ jsx41(
4869
4913
  "button",
4870
4914
  {
4871
4915
  title: menuTooltip,
4872
4916
  "aria-pressed": hasVariablesInValue,
4873
4917
  css: [menuBtn, variableBindButton2],
4874
4918
  type: "button",
4875
- children: /* @__PURE__ */ jsx40(CgUsbC2, { size: "1.4rem" })
4919
+ children: /* @__PURE__ */ jsx41(CgUsbC2, { size: "1.4rem" })
4876
4920
  }
4877
4921
  ),
4878
4922
  menuLabel: menuTooltip,
@@ -4924,7 +4968,7 @@ function OnDisconnectPlugin({
4924
4968
  }
4925
4969
 
4926
4970
  // src/components/Variables/ParameterOrSingleVariable.tsx
4927
- import { jsx as jsx41, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
4971
+ import { jsx as jsx42, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
4928
4972
  function ParameterOrSingleVariable(props) {
4929
4973
  const {
4930
4974
  value,
@@ -4966,11 +5010,11 @@ function ParameterOrSingleVariable(props) {
4966
5010
  replaceValueOnVariableInsert: true,
4967
5011
  disabled: true,
4968
5012
  children: [
4969
- /* @__PURE__ */ jsx41(OnDisconnectPlugin, { onDisconnect: handleDisconnect }),
4970
- editorRef ? /* @__PURE__ */ jsx41(EditorRefPlugin, { editorRef }) : null,
4971
- /* @__PURE__ */ jsx41(ControlledValuePlugin, { enabled: true, value }),
5013
+ /* @__PURE__ */ jsx42(OnDisconnectPlugin, { onDisconnect: handleDisconnect }),
5014
+ editorRef ? /* @__PURE__ */ jsx42(EditorRefPlugin, { editorRef }) : null,
5015
+ /* @__PURE__ */ jsx42(ControlledValuePlugin, { enabled: true, value }),
4972
5016
  /* @__PURE__ */ jsxs25(HorizontalRhythm5, { align: "center", gap: "xs", css: { width: "100%" }, children: [
4973
- /* @__PURE__ */ jsx41("div", { css: { flex: 1 }, children: inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ jsx41(
5017
+ /* @__PURE__ */ jsx42("div", { css: { flex: 1 }, children: inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ jsx42(
4974
5018
  VariablesComposerInput,
4975
5019
  {
4976
5020
  "data-text-value": value,
@@ -4978,7 +5022,7 @@ function ParameterOrSingleVariable(props) {
4978
5022
  css: input2
4979
5023
  }
4980
5024
  ) }),
4981
- disableVariablesForReals ? null : /* @__PURE__ */ jsx41(
5025
+ disableVariablesForReals ? null : /* @__PURE__ */ jsx42(
4982
5026
  VariablesComposerVariableMenu,
4983
5027
  {
4984
5028
  ...sharedMenuProps,
@@ -4998,7 +5042,7 @@ function ParameterOrSingleVariable(props) {
4998
5042
  // src/components/Variables/ParameterVariables.tsx
4999
5043
  import { css as css24 } from "@emotion/react";
5000
5044
  import { HorizontalRhythm as HorizontalRhythm6 } from "@uniformdev/design-system";
5001
- import { jsx as jsx42, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
5045
+ import { jsx as jsx43, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
5002
5046
  function ParameterVariables(props) {
5003
5047
  const {
5004
5048
  value,
@@ -5033,8 +5077,8 @@ function ParameterVariables(props) {
5033
5077
  autoFocus,
5034
5078
  filterVariable,
5035
5079
  children: [
5036
- editorRef ? /* @__PURE__ */ jsx42(EditorRefPlugin, { editorRef }) : null,
5037
- /* @__PURE__ */ jsx42(ControlledValuePlugin, { value, enabled: useInputWhenNoVariables }),
5080
+ editorRef ? /* @__PURE__ */ jsx43(EditorRefPlugin, { editorRef }) : null,
5081
+ /* @__PURE__ */ jsx43(ControlledValuePlugin, { value, enabled: useInputWhenNoVariables }),
5038
5082
  /* @__PURE__ */ jsxs26(
5039
5083
  HorizontalRhythm6,
5040
5084
  {
@@ -5047,7 +5091,7 @@ function ParameterVariables(props) {
5047
5091
  }
5048
5092
  },
5049
5093
  children: [
5050
- /* @__PURE__ */ jsx42("div", { css: { flex: 1 }, children: useInputWhenNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx42(
5094
+ /* @__PURE__ */ jsx43("div", { css: { flex: 1 }, children: useInputWhenNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx43(
5051
5095
  VariablesComposerInput,
5052
5096
  {
5053
5097
  "aria-label": ariaLabel,
@@ -5060,7 +5104,7 @@ function ParameterVariables(props) {
5060
5104
  ]
5061
5105
  }
5062
5106
  ) }),
5063
- disableVariablesForReals ? null : /* @__PURE__ */ jsx42(
5107
+ disableVariablesForReals ? null : /* @__PURE__ */ jsx43(
5064
5108
  VariablesComposerVariableMenu,
5065
5109
  {
5066
5110
  ...sharedMenuProps,
@@ -5104,7 +5148,7 @@ import {
5104
5148
  TableHead,
5105
5149
  TableRow
5106
5150
  } from "@uniformdev/design-system";
5107
- import { DragDropContext as DragDropContext2, Draggable as Draggable2, Droppable as Droppable2 } from "react-beautiful-dnd";
5151
+ import { Draggable as Draggable2, Droppable as Droppable2 } from "react-beautiful-dnd";
5108
5152
 
5109
5153
  // src/components/Variables/styles/VariablesList.styles.ts
5110
5154
  import { css as css25 } from "@emotion/react";
@@ -5136,7 +5180,6 @@ var tableCellDragIcon = css25`
5136
5180
  `;
5137
5181
  var variableName = css25`
5138
5182
  border: none;
5139
- color: var(--brand-secondary-5);
5140
5183
  font-weight: var(--fw-medium);
5141
5184
  padding: 0;
5142
5185
  background: none;
@@ -5153,7 +5196,7 @@ var variableValue = css25`
5153
5196
  `;
5154
5197
 
5155
5198
  // src/components/Variables/VariablesList.tsx
5156
- import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
5199
+ import { Fragment as Fragment11, jsx as jsx44, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
5157
5200
  function VariablesList() {
5158
5201
  const { variables, dispatch, readOnly } = useVariables();
5159
5202
  const sorted = variablesToList(variables).filter((variable) => !variable.system);
@@ -5163,29 +5206,29 @@ function VariablesList() {
5163
5206
  const result = [...sorted || []];
5164
5207
  const [removed] = (_b = result == null ? void 0 : result.splice(res.source.index, 1)) != null ? _b : [];
5165
5208
  result == null ? void 0 : result.splice(res.destination.index, 0, removed);
5166
- const resultAsObj = result.reduce(
5167
- (acc, item, index) => ({
5209
+ const resultAsObj = result.reduce((acc, item, index) => {
5210
+ const { name, ...variableDefinition } = item;
5211
+ return {
5168
5212
  ...acc,
5169
- [item.name]: { type: item.type, default: item.default, order: index }
5170
- }),
5171
- {}
5172
- );
5213
+ [item.name]: { ...variableDefinition, order: index }
5214
+ };
5215
+ }, {});
5173
5216
  dispatch({ type: "reorder", result: resultAsObj });
5174
5217
  return result;
5175
5218
  }
5176
5219
  };
5177
5220
  return /* @__PURE__ */ jsxs27(Fragment11, { children: [
5178
- /* @__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: [
5179
- /* @__PURE__ */ jsx43(TableHead, { children: /* @__PURE__ */ jsxs27(TableRow, { children: [
5180
- /* @__PURE__ */ jsx43(TableCellHead, { children: "Name" }),
5181
- /* @__PURE__ */ jsx43(TableCellHead, { children: "Default Value" }),
5182
- /* @__PURE__ */ jsx43(TableCellHead, {})
5221
+ /* @__PURE__ */ jsx44(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx44(Droppable2, { droppableId: "variables-table", children: (provided) => /* @__PURE__ */ jsxs27(Table, { ...provided.droppableProps, ref: provided.innerRef, children: [
5222
+ /* @__PURE__ */ jsx44(TableHead, { children: /* @__PURE__ */ jsxs27(TableRow, { children: [
5223
+ /* @__PURE__ */ jsx44(TableCellHead, { children: "Name" }),
5224
+ /* @__PURE__ */ jsx44(TableCellHead, { children: "Default Value" }),
5225
+ /* @__PURE__ */ jsx44(TableCellHead, {})
5183
5226
  ] }) }),
5184
5227
  /* @__PURE__ */ jsxs27(TableBody, { children: [
5185
5228
  sorted.map(({ name, displayName, default: defaultValue }, index) => {
5186
5229
  const text = displayName != null ? displayName : name;
5187
5230
  const textValue = variableDefaultTextValue(defaultValue);
5188
- return /* @__PURE__ */ jsx43(
5231
+ return /* @__PURE__ */ jsx44(
5189
5232
  Draggable2,
5190
5233
  {
5191
5234
  draggableId: name,
@@ -5201,7 +5244,7 @@ function VariablesList() {
5201
5244
  css: tableRow(snapshot.isDragging),
5202
5245
  "data-dragging": snapshot.isDragging,
5203
5246
  children: [
5204
- /* @__PURE__ */ jsx43(TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: readOnly ? /* @__PURE__ */ jsx43("span", { css: variableName, children: text }) : /* @__PURE__ */ jsx43(
5247
+ /* @__PURE__ */ jsx44(TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: readOnly ? /* @__PURE__ */ jsx44("span", { css: variableName, children: text }) : /* @__PURE__ */ jsx44(
5205
5248
  "button",
5206
5249
  {
5207
5250
  css: variableName,
@@ -5214,8 +5257,8 @@ function VariablesList() {
5214
5257
  children: text
5215
5258
  }
5216
5259
  ) }),
5217
- /* @__PURE__ */ jsx43(TableCellData, { children: /* @__PURE__ */ jsx43("span", { css: variableValue, title: textValue, children: textValue }) }),
5218
- /* @__PURE__ */ jsx43(TableCellData, { align: "right", children: readOnly ? null : /* @__PURE__ */ jsx43(
5260
+ /* @__PURE__ */ jsx44(TableCellData, { children: /* @__PURE__ */ jsx44("span", { css: variableValue, title: textValue, children: textValue }) }),
5261
+ /* @__PURE__ */ jsx44(TableCellData, { align: "right", children: readOnly ? null : /* @__PURE__ */ jsx44(
5219
5262
  "button",
5220
5263
  {
5221
5264
  type: "button",
@@ -5228,7 +5271,7 @@ function VariablesList() {
5228
5271
  ],
5229
5272
  "aria-controls": text,
5230
5273
  onClick: () => dispatch({ type: "remove", variable: name }),
5231
- children: /* @__PURE__ */ jsx43(Icon5, { icon: "trash", iconColor: "red" })
5274
+ children: /* @__PURE__ */ jsx44(Icon5, { icon: "trash", iconColor: "red" })
5232
5275
  }
5233
5276
  ) })
5234
5277
  ]
@@ -5241,12 +5284,12 @@ function VariablesList() {
5241
5284
  provided.placeholder
5242
5285
  ] })
5243
5286
  ] }) }) }),
5244
- !readOnly && /* @__PURE__ */ jsx43(
5287
+ !readOnly && /* @__PURE__ */ jsx44(
5245
5288
  AddListButton,
5246
5289
  {
5247
5290
  onButtonClick: () => dispatch({ type: "edit", variable: "" }),
5248
5291
  "aria-label": "Add variable",
5249
- buttonText: "add variable",
5292
+ buttonText: "Add variable",
5250
5293
  icon: "math-plus",
5251
5294
  css: { marginLeft: "var(--spacing-md)" }
5252
5295
  }
@@ -5255,37 +5298,37 @@ function VariablesList() {
5255
5298
  }
5256
5299
 
5257
5300
  // src/components/DataResourceDynamicInputProvider.tsx
5258
- import { jsx as jsx44 } from "@emotion/react/jsx-runtime";
5301
+ import { jsx as jsx45 } from "@emotion/react/jsx-runtime";
5259
5302
  function DataResourceDynamicInputProvider(props) {
5260
5303
  const { children, dynamicInputs } = props;
5261
5304
  if (dynamicInputs) {
5262
- return /* @__PURE__ */ jsx44(DataResourceDynamicInputProviderRenderer, { ...props, children });
5305
+ return /* @__PURE__ */ jsx45(DataResourceDynamicInputProviderRenderer, { ...props, children });
5263
5306
  }
5264
- return /* @__PURE__ */ jsx44(DataResourceDynamicInputProviderContextShim, { children });
5307
+ return /* @__PURE__ */ jsx45(DataResourceDynamicInputProviderContextShim, { children });
5265
5308
  }
5266
5309
  function DataResourceDynamicInputProviderContextShim(props) {
5267
5310
  const {
5268
5311
  metadata: { dynamicInputs }
5269
5312
  } = useMeshLocation("dataResource");
5270
- return /* @__PURE__ */ jsx44(DataResourceDynamicInputProviderRenderer, { ...props, dynamicInputs });
5313
+ return /* @__PURE__ */ jsx45(DataResourceDynamicInputProviderRenderer, { ...props, dynamicInputs });
5271
5314
  }
5272
5315
  function DataResourceDynamicInputProviderRenderer({
5273
5316
  children,
5274
5317
  dynamicInputs
5275
5318
  }) {
5276
5319
  const variables = useDynamicInputsAsVariables(dynamicInputs);
5277
- return /* @__PURE__ */ jsx44(VariablesProvider, { value: variables, readOnly: true, children });
5320
+ return /* @__PURE__ */ jsx45(VariablesProvider, { value: variables, readOnly: true, children });
5278
5321
  }
5279
5322
 
5280
5323
  // src/components/DataResourceVariablesList.tsx
5281
5324
  import { Callout as Callout4, VerticalRhythm } from "@uniformdev/design-system";
5282
- import { jsx as jsx45 } from "@emotion/react/jsx-runtime";
5325
+ import { jsx as jsx46 } from "@emotion/react/jsx-runtime";
5283
5326
  function DataResourceVariablesList(props) {
5284
5327
  const {
5285
5328
  value,
5286
5329
  metadata: { dataType, dynamicInputs }
5287
5330
  } = useMeshLocation("dataResource");
5288
- return /* @__PURE__ */ jsx45(
5331
+ return /* @__PURE__ */ jsx46(
5289
5332
  DataResourceVariablesListExplicit,
5290
5333
  {
5291
5334
  ...props,
@@ -5306,14 +5349,14 @@ function DataResourceVariablesListExplicit({
5306
5349
  const variableDefinitions = variablesToList(dataType.variables);
5307
5350
  if (variableDefinitions.length === 0) {
5308
5351
  if (NoVariablesComponent) {
5309
- return /* @__PURE__ */ jsx45(NoVariablesComponent, {});
5352
+ return /* @__PURE__ */ jsx46(NoVariablesComponent, {});
5310
5353
  }
5311
- return /* @__PURE__ */ jsx45(Callout4, { type: "note", children: "No settings are required." });
5354
+ return /* @__PURE__ */ jsx46(Callout4, { type: "note", children: "No settings are required." });
5312
5355
  }
5313
- return /* @__PURE__ */ jsx45(DataResourceDynamicInputProvider, { dynamicInputs, children: /* @__PURE__ */ jsx45(VerticalRhythm, { children: variableDefinitions.map((variableDefinition) => {
5356
+ return /* @__PURE__ */ jsx46(DataResourceDynamicInputProvider, { dynamicInputs, children: /* @__PURE__ */ jsx46(VerticalRhythm, { children: variableDefinitions.map((variableDefinition) => {
5314
5357
  var _a, _b, _c;
5315
5358
  const VariableRenderer = variableDefinition.type ? (_a = typeRenderers == null ? void 0 : typeRenderers[variableDefinition.type]) != null ? _a : TextVariableRenderer : TextVariableRenderer;
5316
- return /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45(
5359
+ return /* @__PURE__ */ jsx46("div", { children: /* @__PURE__ */ jsx46(
5317
5360
  VariableRenderer,
5318
5361
  {
5319
5362
  definition: variableDefinition,
@@ -5338,7 +5381,7 @@ function DataResourceVariablesListExplicit({
5338
5381
  }
5339
5382
  function TextVariableRenderer({ definition, value, setValue }) {
5340
5383
  var _a;
5341
- return /* @__PURE__ */ jsx45("div", { "data-testid": "variable-input-container", children: /* @__PURE__ */ jsx45(
5384
+ return /* @__PURE__ */ jsx46("div", { "data-testid": "variable-input-container", children: /* @__PURE__ */ jsx46(
5342
5385
  InputVariables,
5343
5386
  {
5344
5387
  label: definition.displayName || definition.name,
@@ -5353,11 +5396,11 @@ function TextVariableRenderer({ definition, value, setValue }) {
5353
5396
  // src/components/Request/RequestBody.tsx
5354
5397
  import { css as css28 } from "@emotion/react";
5355
5398
  import { InputSelect as InputSelect4, JsonEditor } from "@uniformdev/design-system";
5356
- import { useState as useState13 } from "react";
5399
+ import { useState as useState14 } from "react";
5357
5400
 
5358
5401
  // src/components/Request/RequestProvider.tsx
5359
5402
  import * as React11 from "react";
5360
- import { jsx as jsx46 } from "@emotion/react/jsx-runtime";
5403
+ import { jsx as jsx47 } from "@emotion/react/jsx-runtime";
5361
5404
  var RequestContext = React11.createContext(null);
5362
5405
  function RequestProvider({ value, onChange, children }) {
5363
5406
  const contextValue = React11.useMemo(() => {
@@ -5426,7 +5469,7 @@ function RequestProvider({ value, onChange, children }) {
5426
5469
  request: value
5427
5470
  };
5428
5471
  }, [onChange, value]);
5429
- return /* @__PURE__ */ jsx46(RequestContext.Provider, { value: contextValue, children });
5472
+ return /* @__PURE__ */ jsx47(RequestContext.Provider, { value: contextValue, children });
5430
5473
  }
5431
5474
  function useRequest() {
5432
5475
  const context = React11.useContext(RequestContext);
@@ -5450,17 +5493,17 @@ var requestTypeContainer = (bgColor) => css27`
5450
5493
  `;
5451
5494
 
5452
5495
  // src/components/Request/RequestTypeContainer.tsx
5453
- import { jsx as jsx47 } from "@emotion/react/jsx-runtime";
5496
+ import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
5454
5497
  var RequestTypeContainer = ({
5455
5498
  bgColor = "transparent",
5456
5499
  children,
5457
5500
  ...props
5458
5501
  }) => {
5459
- return /* @__PURE__ */ jsx47("div", { css: requestTypeContainer(bgColor), ...props, children });
5502
+ return /* @__PURE__ */ jsx48("div", { css: requestTypeContainer(bgColor), ...props, children });
5460
5503
  };
5461
5504
 
5462
5505
  // src/components/Request/RequestBody.tsx
5463
- import { jsx as jsx48, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
5506
+ import { jsx as jsx49, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
5464
5507
  var LANGUAGE_OPTIONS = [
5465
5508
  { label: "Text", value: "plaintext" },
5466
5509
  { label: "JSON", value: "json" },
@@ -5479,7 +5522,7 @@ var LANGUAGE_TO_CONTENT_TYPE = {
5479
5522
  };
5480
5523
  function RequestBody() {
5481
5524
  const { request, dispatch } = useRequest();
5482
- const [language, setLanguage] = useState13("json");
5525
+ const [language, setLanguage] = useState14("json");
5483
5526
  return /* @__PURE__ */ jsxs28(
5484
5527
  "div",
5485
5528
  {
@@ -5487,14 +5530,14 @@ function RequestBody() {
5487
5530
  background: var(--white);
5488
5531
  `,
5489
5532
  children: [
5490
- /* @__PURE__ */ jsx48(
5533
+ /* @__PURE__ */ jsx49(
5491
5534
  RequestTypeContainer,
5492
5535
  {
5493
5536
  bgColor: "var(--gray-100)",
5494
5537
  css: css28`
5495
5538
  padding: var(--spacing-sm) var(--spacing-base);
5496
5539
  `,
5497
- children: /* @__PURE__ */ jsx48(
5540
+ children: /* @__PURE__ */ jsx49(
5498
5541
  InputSelect4,
5499
5542
  {
5500
5543
  label: "Language",
@@ -5517,7 +5560,7 @@ function RequestBody() {
5517
5560
  )
5518
5561
  }
5519
5562
  ),
5520
- /* @__PURE__ */ jsx48(
5563
+ /* @__PURE__ */ jsx49(
5521
5564
  JsonEditor,
5522
5565
  {
5523
5566
  height: 200,
@@ -5545,7 +5588,7 @@ import {
5545
5588
  TableRow as TableRow2,
5546
5589
  WarningMessage as WarningMessage2
5547
5590
  } from "@uniformdev/design-system";
5548
- import { jsx as jsx49, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
5591
+ import { jsx as jsx50, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
5549
5592
  function RequestHeaders({
5550
5593
  disableVariables,
5551
5594
  addOmitIfEmpty
@@ -5564,29 +5607,29 @@ function RequestHeaders({
5564
5607
  index
5565
5608
  });
5566
5609
  };
5567
- return /* @__PURE__ */ jsx49("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs29(Table2, { children: [
5568
- /* @__PURE__ */ jsx49(TableHead2, { children: /* @__PURE__ */ jsxs29(TableRow2, { children: [
5569
- /* @__PURE__ */ jsx49(TableCellHead2, { children: "Name" }),
5570
- /* @__PURE__ */ jsx49(TableCellHead2, { children: "Value" }),
5571
- addOmitIfEmpty ? /* @__PURE__ */ jsx49(TableCellHead2, { children: "Omit If Empty" }) : null
5610
+ return /* @__PURE__ */ jsx50("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs29(Table2, { children: [
5611
+ /* @__PURE__ */ jsx50(TableHead2, { children: /* @__PURE__ */ jsxs29(TableRow2, { children: [
5612
+ /* @__PURE__ */ jsx50(TableCellHead2, { children: "Name" }),
5613
+ /* @__PURE__ */ jsx50(TableCellHead2, { children: "Value" }),
5614
+ addOmitIfEmpty ? /* @__PURE__ */ jsx50(TableCellHead2, { children: "Omit If Empty" }) : null
5572
5615
  ] }) }),
5573
5616
  /* @__PURE__ */ jsxs29(TableBody2, { children: [
5574
5617
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.headers) == null ? void 0 : _b.map((baseHeader) => {
5575
5618
  return /* @__PURE__ */ jsxs29(TableRow2, { children: [
5576
5619
  /* @__PURE__ */ jsxs29(TableCellData2, { width: "50%", children: [
5577
5620
  baseHeader.key,
5578
- /* @__PURE__ */ jsx49("br", {}),
5579
- /* @__PURE__ */ jsx49("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ jsx49("small", { children: "from data source" }) })
5621
+ /* @__PURE__ */ jsx50("br", {}),
5622
+ /* @__PURE__ */ jsx50("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ jsx50("small", { children: "from data source" }) })
5580
5623
  ] }),
5581
5624
  /* @__PURE__ */ jsxs29(TableCellData2, { width: "50%", children: [
5582
- /* @__PURE__ */ jsx49("i", { css: { color: "var(--gray-500)" }, children: baseHeader.value }),
5583
- request.headers.find((p) => p.key === baseHeader.key) ? /* @__PURE__ */ jsx49(WarningMessage2, { message: "overridden below" }) : null
5625
+ /* @__PURE__ */ jsx50("i", { css: { color: "var(--gray-500)" }, children: baseHeader.value }),
5626
+ request.headers.find((p) => p.key === baseHeader.key) ? /* @__PURE__ */ jsx50(WarningMessage2, { message: "overridden below" }) : null
5584
5627
  ] })
5585
5628
  ] }, baseHeader.key);
5586
5629
  }),
5587
5630
  deezHeaders.map((header, index) => {
5588
5631
  return /* @__PURE__ */ jsxs29(TableRow2, { children: [
5589
- /* @__PURE__ */ jsx49(TableCellData2, { width: "50%", children: /* @__PURE__ */ jsx49(
5632
+ /* @__PURE__ */ jsx50(TableCellData2, { width: "50%", children: /* @__PURE__ */ jsx50(
5590
5633
  Input3,
5591
5634
  {
5592
5635
  label: header.key,
@@ -5606,7 +5649,7 @@ function RequestHeaders({
5606
5649
  "data-testid": "header-key"
5607
5650
  }
5608
5651
  ) }),
5609
- /* @__PURE__ */ jsx49(TableCellData2, { width: "50%", children: header.key ? /* @__PURE__ */ jsx49(
5652
+ /* @__PURE__ */ jsx50(TableCellData2, { width: "50%", children: header.key ? /* @__PURE__ */ jsx50(
5610
5653
  InputVariables,
5611
5654
  {
5612
5655
  value: header.value,
@@ -5617,7 +5660,7 @@ function RequestHeaders({
5617
5660
  "data-testid": "header-value"
5618
5661
  }
5619
5662
  ) : null }),
5620
- addOmitIfEmpty ? /* @__PURE__ */ jsx49(TableCellData2, { width: "50%", children: header.key ? /* @__PURE__ */ jsx49(
5663
+ addOmitIfEmpty ? /* @__PURE__ */ jsx50(TableCellData2, { width: "50%", children: header.key ? /* @__PURE__ */ jsx50(
5621
5664
  Input3,
5622
5665
  {
5623
5666
  type: "checkbox",
@@ -5642,11 +5685,11 @@ function RequestHeaders({
5642
5685
 
5643
5686
  // src/components/Request/RequestMethodSelect.tsx
5644
5687
  import { InputSelect as InputSelect5 } from "@uniformdev/design-system";
5645
- import { jsx as jsx50 } from "@emotion/react/jsx-runtime";
5688
+ import { jsx as jsx51 } from "@emotion/react/jsx-runtime";
5646
5689
  function RequestMethodSelect(props) {
5647
5690
  var _a;
5648
5691
  const { request, dispatch } = useRequest();
5649
- return /* @__PURE__ */ jsx50(
5692
+ return /* @__PURE__ */ jsx51(
5650
5693
  InputSelect5,
5651
5694
  {
5652
5695
  ...props,
@@ -5672,7 +5715,7 @@ import {
5672
5715
  TableRow as TableRow3,
5673
5716
  WarningMessage as WarningMessage3
5674
5717
  } from "@uniformdev/design-system";
5675
- import { jsx as jsx51, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
5718
+ import { jsx as jsx52, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
5676
5719
  function RequestParameters({
5677
5720
  disableVariables,
5678
5721
  addOmitIfEmpty
@@ -5692,29 +5735,29 @@ function RequestParameters({
5692
5735
  index
5693
5736
  });
5694
5737
  };
5695
- return /* @__PURE__ */ jsx51("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs30(Table3, { children: [
5696
- /* @__PURE__ */ jsx51(TableHead3, { children: /* @__PURE__ */ jsxs30(TableRow3, { children: [
5697
- /* @__PURE__ */ jsx51(TableCellHead3, { children: "Name" }),
5698
- /* @__PURE__ */ jsx51(TableCellHead3, { children: "Value" }),
5699
- addOmitIfEmpty ? /* @__PURE__ */ jsx51(TableCellHead3, { children: "Omit If Empty" }) : null
5738
+ return /* @__PURE__ */ jsx52("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs30(Table3, { children: [
5739
+ /* @__PURE__ */ jsx52(TableHead3, { children: /* @__PURE__ */ jsxs30(TableRow3, { children: [
5740
+ /* @__PURE__ */ jsx52(TableCellHead3, { children: "Name" }),
5741
+ /* @__PURE__ */ jsx52(TableCellHead3, { children: "Value" }),
5742
+ addOmitIfEmpty ? /* @__PURE__ */ jsx52(TableCellHead3, { children: "Omit If Empty" }) : null
5700
5743
  ] }) }),
5701
5744
  /* @__PURE__ */ jsxs30(TableBody3, { children: [
5702
5745
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.parameters) == null ? void 0 : _b.map((baseParameter) => {
5703
5746
  return /* @__PURE__ */ jsxs30(TableRow3, { children: [
5704
5747
  /* @__PURE__ */ jsxs30(TableCellData3, { width: "50%", children: [
5705
5748
  baseParameter.key,
5706
- /* @__PURE__ */ jsx51("br", {}),
5707
- /* @__PURE__ */ jsx51("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ jsx51("small", { children: "from data source" }) })
5749
+ /* @__PURE__ */ jsx52("br", {}),
5750
+ /* @__PURE__ */ jsx52("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ jsx52("small", { children: "from data source" }) })
5708
5751
  ] }),
5709
5752
  /* @__PURE__ */ jsxs30(TableCellData3, { width: "50%", children: [
5710
- /* @__PURE__ */ jsx51("i", { css: { color: "var(--gray-500)" }, children: baseParameter.value }),
5711
- request.parameters.find((p) => p.key === baseParameter.key) ? /* @__PURE__ */ jsx51(WarningMessage3, { message: "overridden below" }) : null
5753
+ /* @__PURE__ */ jsx52("i", { css: { color: "var(--gray-500)" }, children: baseParameter.value }),
5754
+ request.parameters.find((p) => p.key === baseParameter.key) ? /* @__PURE__ */ jsx52(WarningMessage3, { message: "overridden below" }) : null
5712
5755
  ] })
5713
5756
  ] }, baseParameter.key);
5714
5757
  }),
5715
5758
  deezParameters.map((parameter, index) => {
5716
5759
  return /* @__PURE__ */ jsxs30(TableRow3, { children: [
5717
- /* @__PURE__ */ jsx51(TableCellData3, { width: "50%", children: /* @__PURE__ */ jsx51(
5760
+ /* @__PURE__ */ jsx52(TableCellData3, { width: "50%", children: /* @__PURE__ */ jsx52(
5718
5761
  Input4,
5719
5762
  {
5720
5763
  label: parameter.key,
@@ -5738,7 +5781,7 @@ function RequestParameters({
5738
5781
  "data-testid": "parameter-key"
5739
5782
  }
5740
5783
  ) }),
5741
- /* @__PURE__ */ jsx51(TableCellData3, { width: "50%", children: parameter.key ? /* @__PURE__ */ jsx51(
5784
+ /* @__PURE__ */ jsx52(TableCellData3, { width: "50%", children: parameter.key ? /* @__PURE__ */ jsx52(
5742
5785
  InputVariables,
5743
5786
  {
5744
5787
  value: parameter.value,
@@ -5754,7 +5797,7 @@ function RequestParameters({
5754
5797
  enableEditingVariables: true
5755
5798
  }
5756
5799
  ) : null }),
5757
- addOmitIfEmpty ? /* @__PURE__ */ jsx51(TableCellData3, { width: "50%", children: parameter.key ? /* @__PURE__ */ jsx51(
5800
+ addOmitIfEmpty ? /* @__PURE__ */ jsx52(TableCellData3, { width: "50%", children: parameter.key ? /* @__PURE__ */ jsx52(
5758
5801
  Input4,
5759
5802
  {
5760
5803
  type: "checkbox",
@@ -5802,7 +5845,7 @@ function decodeVariablesInUrlEncodedString(string, varValues) {
5802
5845
  }
5803
5846
 
5804
5847
  // src/components/Request/RequestUrl.tsx
5805
- import { Fragment as Fragment12, jsx as jsx52, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5848
+ import { Fragment as Fragment12, jsx as jsx53, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5806
5849
  function RequestUrl() {
5807
5850
  var _a, _b;
5808
5851
  const { variables } = useVariables();
@@ -5823,7 +5866,7 @@ function RequestUrl() {
5823
5866
  word-break: break-word;
5824
5867
  `,
5825
5868
  children: [
5826
- request.baseRequest ? /* @__PURE__ */ jsx52("span", { children: (_b = request.baseRequest) == null ? void 0 : _b.baseUrl }) : null,
5869
+ request.baseRequest ? /* @__PURE__ */ jsx53("span", { children: (_b = request.baseRequest) == null ? void 0 : _b.baseUrl }) : null,
5827
5870
  /* @__PURE__ */ jsxs31("span", { css: { fontWeight: request.baseRequest ? "bold" : "inherit" }, children: [
5828
5871
  urlEncodeRequestUrl(request.relativeUrl, variables),
5829
5872
  mergedParameters.length > 0 ? /* @__PURE__ */ jsxs31(Fragment12, { children: [
@@ -5869,10 +5912,10 @@ function transformPastedUrl(value, currentRequest, dispatch) {
5869
5912
  }
5870
5913
 
5871
5914
  // src/components/Request/RequestUrlInput.tsx
5872
- import { jsx as jsx53 } from "@emotion/react/jsx-runtime";
5915
+ import { jsx as jsx54 } from "@emotion/react/jsx-runtime";
5873
5916
  function RequestUrlInput(props) {
5874
5917
  const { request, dispatch } = useRequest();
5875
- return /* @__PURE__ */ jsx53(
5918
+ return /* @__PURE__ */ jsx54(
5876
5919
  InputVariables,
5877
5920
  {
5878
5921
  ...props,
@@ -5922,12 +5965,12 @@ function useRequestParameter(paramName) {
5922
5965
  }
5923
5966
 
5924
5967
  // src/components/DataSourceEditor.tsx
5925
- import { jsx as jsx54 } from "@emotion/react/jsx-runtime";
5968
+ import { jsx as jsx55 } from "@emotion/react/jsx-runtime";
5926
5969
  function DataSourceEditor({ onChange, children, editVariableComponent }) {
5927
5970
  var _a;
5928
5971
  const { value } = useMeshLocation("dataSource");
5929
5972
  const currentRequestValue = convertDataSourceToRequestData(value);
5930
- return /* @__PURE__ */ jsx54(
5973
+ return /* @__PURE__ */ jsx55(
5931
5974
  VariablesProvider,
5932
5975
  {
5933
5976
  value: (_a = value.variables) != null ? _a : {},
@@ -5943,7 +5986,7 @@ function DataSourceEditor({ onChange, children, editVariableComponent }) {
5943
5986
  },
5944
5987
  editVariableComponent,
5945
5988
  readOnly: true,
5946
- children: /* @__PURE__ */ jsx54(
5989
+ children: /* @__PURE__ */ jsx55(
5947
5990
  RequestProvider,
5948
5991
  {
5949
5992
  value: currentRequestValue,
@@ -5980,7 +6023,7 @@ function convertRequestDataToDataSource(dataSource, requestData) {
5980
6023
  }
5981
6024
 
5982
6025
  // src/components/DataTypeEditor.tsx
5983
- import { jsx as jsx55 } from "@emotion/react/jsx-runtime";
6026
+ import { jsx as jsx56 } from "@emotion/react/jsx-runtime";
5984
6027
  function DataTypeEditor({ onChange, children, editVariableComponent }) {
5985
6028
  var _a;
5986
6029
  const {
@@ -5989,7 +6032,7 @@ function DataTypeEditor({ onChange, children, editVariableComponent }) {
5989
6032
  isReadOnly
5990
6033
  } = useMeshLocation("dataType");
5991
6034
  const currentRequestValue = convertDataTypeToRequestData(value, dataSource);
5992
- return /* @__PURE__ */ jsx55(
6035
+ return /* @__PURE__ */ jsx56(
5993
6036
  VariablesProvider,
5994
6037
  {
5995
6038
  value: (_a = value.variables) != null ? _a : {},
@@ -6005,7 +6048,7 @@ function DataTypeEditor({ onChange, children, editVariableComponent }) {
6005
6048
  },
6006
6049
  editVariableComponent,
6007
6050
  readOnly: isReadOnly,
6008
- children: /* @__PURE__ */ jsx55(
6051
+ children: /* @__PURE__ */ jsx56(
6009
6052
  RequestProvider,
6010
6053
  {
6011
6054
  value: currentRequestValue,
@@ -6055,10 +6098,10 @@ import { LoadingIndicator as LoadingIndicator3, Theme as Theme2 } from "@uniform
6055
6098
 
6056
6099
  // src/hooks/useInitializeUniformMeshSdk.ts
6057
6100
  import { initializeUniformMeshSDK } from "@uniformdev/mesh-sdk";
6058
- import { useEffect as useEffect15, useRef as useRef14, useState as useState14 } from "react";
6101
+ import { useEffect as useEffect15, useRef as useRef14, useState as useState15 } from "react";
6059
6102
  var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
6060
- const [error, setError] = useState14();
6061
- const [sdk, setSdk] = useState14();
6103
+ const [error, setError] = useState15();
6104
+ const [sdk, setSdk] = useState15();
6062
6105
  const initializationInProgress = useRef14(false);
6063
6106
  useEffect15(
6064
6107
  () => {
@@ -6093,7 +6136,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
6093
6136
  };
6094
6137
 
6095
6138
  // src/components/MeshApp.tsx
6096
- import { jsx as jsx56, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
6139
+ import { jsx as jsx57, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
6097
6140
  var MeshApp = ({
6098
6141
  children,
6099
6142
  loadingComponent,
@@ -6102,25 +6145,25 @@ var MeshApp = ({
6102
6145
  const { initializing, error, sdk } = useInitializeUniformMeshSdk();
6103
6146
  if (initializing || !sdk) {
6104
6147
  const LoadingComponent = loadingComponent;
6105
- return LoadingComponent ? /* @__PURE__ */ jsx56(LoadingComponent, {}) : /* @__PURE__ */ jsx56(LoadingIndicator3, {});
6148
+ return LoadingComponent ? /* @__PURE__ */ jsx57(LoadingComponent, {}) : /* @__PURE__ */ jsx57(LoadingIndicator3, {});
6106
6149
  }
6107
6150
  if (error) {
6108
6151
  const ErrorComponent = errorComponent;
6109
6152
  if (ErrorComponent) {
6110
- return /* @__PURE__ */ jsx56(ErrorComponent, { error });
6153
+ return /* @__PURE__ */ jsx57(ErrorComponent, { error });
6111
6154
  }
6112
6155
  throw error;
6113
6156
  }
6114
6157
  return /* @__PURE__ */ jsxs32(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
6115
- /* @__PURE__ */ jsx56(Theme2, {}),
6116
- /* @__PURE__ */ jsx56(UniformMeshLocationContextProvider, { children })
6158
+ /* @__PURE__ */ jsx57(Theme2, {}),
6159
+ /* @__PURE__ */ jsx57(UniformMeshLocationContextProvider, { children })
6117
6160
  ] });
6118
6161
  };
6119
6162
 
6120
6163
  // src/components/ObjectSearch/DataRefreshButton.tsx
6121
6164
  import { css as css30 } from "@emotion/react";
6122
6165
  import { Button as Button3, LoadingIndicator as LoadingIndicator4 } from "@uniformdev/design-system";
6123
- import { jsx as jsx57, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
6166
+ import { jsx as jsx58, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
6124
6167
  var DataRefreshButton = ({
6125
6168
  buttonText,
6126
6169
  isLoading,
@@ -6128,7 +6171,7 @@ var DataRefreshButton = ({
6128
6171
  ...props
6129
6172
  }) => {
6130
6173
  return /* @__PURE__ */ jsxs33(Button3, { buttonType: "primaryInvert", onClick: onRefreshData, disabled: isLoading, ...props, children: [
6131
- !isLoading ? null : /* @__PURE__ */ jsx57(
6174
+ !isLoading ? null : /* @__PURE__ */ jsx58(
6132
6175
  LoadingIndicator4,
6133
6176
  {
6134
6177
  css: css30`
@@ -6141,9 +6184,9 @@ var DataRefreshButton = ({
6141
6184
  };
6142
6185
 
6143
6186
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
6144
- import { css as css31 } from "@emotion/react";
6187
+ import { css as css32 } from "@emotion/react";
6145
6188
  import { bindVariables } from "@uniformdev/canvas";
6146
- import { Container, IconsProvider, ScrollableList, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
6189
+ import { Callout as Callout5, Container, IconsProvider, ScrollableList, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
6147
6190
 
6148
6191
  // src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
6149
6192
  import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
@@ -6153,9 +6196,9 @@ import {
6153
6196
  useContext as useContext7,
6154
6197
  useDeferredValue,
6155
6198
  useMemo as useMemo14,
6156
- useState as useState15
6199
+ useState as useState16
6157
6200
  } from "react";
6158
- import { jsx as jsx58 } from "@emotion/react/jsx-runtime";
6201
+ import { jsx as jsx59 } from "@emotion/react/jsx-runtime";
6159
6202
  var ObjectSearchContext = createContext5({
6160
6203
  onSetQuery: () => {
6161
6204
  },
@@ -6168,17 +6211,24 @@ var ObjectSearchContext = createContext5({
6168
6211
  },
6169
6212
  selectedListItems: [],
6170
6213
  onRemoveAllSelectedItems: () => {
6171
- }
6214
+ },
6215
+ isMulti: false
6172
6216
  });
6173
- var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
6174
- const [query, setQuery] = useState15({
6217
+ var ObjectSearchProvider = ({
6218
+ currentlySelectedItems,
6219
+ isMulti = false,
6220
+ children,
6221
+ defaultQuery
6222
+ }) => {
6223
+ const [query, setQuery] = useState16({
6175
6224
  contentType: "",
6176
- keyword: ""
6225
+ keyword: "",
6226
+ ...defaultQuery
6177
6227
  });
6178
6228
  const { flatVariables } = useVariables(true);
6179
6229
  const querySearchDeferred = useDeferredValue(query);
6180
- const [selectedItems, setSelectedItems] = useState15(currentlySelectedItems != null ? currentlySelectedItems : []);
6181
- const [list, setList] = useState15({});
6230
+ const [selectedItems, setSelectedItems] = useState16(currentlySelectedItems != null ? currentlySelectedItems : []);
6231
+ const [list, setList] = useState16({});
6182
6232
  const onSetQuery = useCallback4(
6183
6233
  (value2) => {
6184
6234
  if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
@@ -6224,6 +6274,7 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
6224
6274
  selectedListItems: selectedItems,
6225
6275
  onRemoveAllSelectedItems,
6226
6276
  list,
6277
+ isMulti,
6227
6278
  onSetList
6228
6279
  }),
6229
6280
  [
@@ -6234,10 +6285,11 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
6234
6285
  selectedItems,
6235
6286
  onRemoveAllSelectedItems,
6236
6287
  list,
6288
+ isMulti,
6237
6289
  onSetList
6238
6290
  ]
6239
6291
  );
6240
- return /* @__PURE__ */ jsx58(ObjectSearchContext.Provider, { value, children });
6292
+ return /* @__PURE__ */ jsx59(ObjectSearchContext.Provider, { value, children });
6241
6293
  };
6242
6294
  function useObjectSearchContext() {
6243
6295
  return useContext7(ObjectSearchContext);
@@ -6254,8 +6306,150 @@ function bindQuery(query, inputs) {
6254
6306
  return result;
6255
6307
  }
6256
6308
 
6309
+ // src/components/ObjectSearch/ObjectSearchListItem.tsx
6310
+ import { Chip, Popover } from "@uniformdev/design-system";
6311
+
6312
+ // src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
6313
+ import { css as css31 } from "@emotion/react";
6314
+ import { skeletonLoading } from "@uniformdev/design-system";
6315
+ var ObjectListItemContainer = css31`
6316
+ align-items: center;
6317
+ border: 1px solid var(--gray-300);
6318
+ border-radius: var(--rounded-base);
6319
+ background: var(--white);
6320
+ display: grid;
6321
+ grid-template-columns: 1fr auto;
6322
+ padding: var(--spacing-sm);
6323
+ `;
6324
+ var ObjectListItemContainerDisabled = css31`
6325
+ opacity: var(--opacity-50);
6326
+ pointer-events: none;
6327
+ `;
6328
+ var ObjectListItemLoading = css31`
6329
+ animation: ${skeletonLoading} 1s linear infinite alternate;
6330
+ border-color: transparent;
6331
+ min-height: 42px;
6332
+ position: relative;
6333
+
6334
+ &:before,
6335
+ &:after {
6336
+ background: var(--gray-200);
6337
+ content: '';
6338
+ display: block;
6339
+ height: 1rem;
6340
+ }
6341
+
6342
+ &:before {
6343
+ border-radius: var(--rounded-base);
6344
+ width: 10rem;
6345
+ }
6346
+
6347
+ &:after {
6348
+ border-radius: var(--rounded-full);
6349
+ width: 1rem;
6350
+ }
6351
+ `;
6352
+ var ObjectListItemHeadingGroup = css31`
6353
+ align-items: center;
6354
+ display: grid;
6355
+ `;
6356
+ var ObjectListItemThumbnail = css31`
6357
+ width: 30px;
6358
+ object-fit: contain;
6359
+ `;
6360
+ var ObjectListItemTitle = css31`
6361
+ color: var(--typography-base);
6362
+ display: block;
6363
+ font-size: var(--fs-sm);
6364
+ `;
6365
+ var ObjectListItemSubtitle = css31`
6366
+ color: var(--gray-500);
6367
+ display: block;
6368
+ font-size: var(--fs-xs);
6369
+ line-height: 1;
6370
+ `;
6371
+ var ObjectListItemInfoContainer = css31`
6372
+ align-items: center;
6373
+ display: flex;
6374
+ gap: var(--spacing-sm);
6375
+ justify-content: center;
6376
+ `;
6377
+ var ObjectListItemControlledContent = css31`
6378
+ display: flex;
6379
+ gap: var(--spacing-sm);
6380
+ `;
6381
+ var ObjectListItemUnControlledContent = css31`
6382
+ margin-top: var(--spacing-sm);
6383
+ grid-column: 1 / -1;
6384
+ `;
6385
+
6386
+ // src/components/ObjectSearch/ObjectSearchListItem.tsx
6387
+ import { jsx as jsx60, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
6388
+ var ObjectSearchListItem = ({
6389
+ id,
6390
+ title,
6391
+ contentType,
6392
+ image,
6393
+ imageUrl,
6394
+ popoverData,
6395
+ onSelect,
6396
+ isMulti,
6397
+ disabled,
6398
+ children,
6399
+ ...props
6400
+ }) => {
6401
+ const { onSelectItem, selectedListItems, isMulti: globalIsMulti } = useObjectSearchContext();
6402
+ const formatedContentType = Array.isArray(contentType) ? contentType.join(", ") : contentType;
6403
+ const handleSelectItem = () => {
6404
+ var _a;
6405
+ const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
6406
+ const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
6407
+ if (isMulti === true || globalIsMulti) {
6408
+ return onSelectItem(selectedItem);
6409
+ }
6410
+ return onSelectItem([selectedItem]);
6411
+ };
6412
+ const selected = selectedListItems.some((item) => item.id === id);
6413
+ return /* @__PURE__ */ jsxs34(
6414
+ "div",
6415
+ {
6416
+ role: "listitem",
6417
+ css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
6418
+ "data-testid": "list-item",
6419
+ ...props,
6420
+ children: [
6421
+ /* @__PURE__ */ jsxs34(
6422
+ "div",
6423
+ {
6424
+ role: "button",
6425
+ onClick: handleSelectItem,
6426
+ css: ObjectListItemControlledContent,
6427
+ "aria-disabled": disabled,
6428
+ children: [
6429
+ !imageUrl ? null : /* @__PURE__ */ jsx60("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
6430
+ !image || imageUrl ? null : /* @__PURE__ */ jsx60("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
6431
+ /* @__PURE__ */ jsxs34("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
6432
+ !contentType ? null : /* @__PURE__ */ jsx60("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
6433
+ /* @__PURE__ */ jsx60("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
6434
+ ] })
6435
+ ]
6436
+ }
6437
+ ),
6438
+ /* @__PURE__ */ jsxs34("div", { css: ObjectListItemInfoContainer, children: [
6439
+ selected ? /* @__PURE__ */ jsx60(Chip, { text: "selected", size: "xs" }) : null,
6440
+ !popoverData ? null : /* @__PURE__ */ jsx60(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6441
+ ] }),
6442
+ !children ? null : /* @__PURE__ */ jsx60("div", { css: ObjectListItemUnControlledContent, children })
6443
+ ]
6444
+ }
6445
+ );
6446
+ };
6447
+ var ObjectSearchListItemLoadingSkeleton = () => {
6448
+ return /* @__PURE__ */ jsx60("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
6449
+ };
6450
+
6257
6451
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
6258
- import { jsx as jsx59, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
6452
+ import { jsx as jsx61, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
6259
6453
  var ObjectSearchContainer = ({
6260
6454
  label,
6261
6455
  enableDynamicInputToResultId,
@@ -6267,21 +6461,22 @@ var ObjectSearchContainer = ({
6267
6461
  const { onSelectItem, selectedListItems, list } = useObjectSearchContext();
6268
6462
  const { flatVariables } = useVariables(true);
6269
6463
  const inputValue = (_b = (_a = selectedListItems == null ? void 0 : selectedListItems[0]) == null ? void 0 : _a.id) != null ? _b : "";
6270
- const body = /* @__PURE__ */ jsxs34(VerticalRhythm2, { children: [
6464
+ const listItems = resultList != null ? resultList : /* @__PURE__ */ jsx61(
6465
+ ScrollableList,
6466
+ {
6467
+ role: "list",
6468
+ css: css32`
6469
+ > div {
6470
+ transition: max-height var(--duration-slow) var(--timing-ease-out);
6471
+ max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
6472
+ }
6473
+ `,
6474
+ children: /* @__PURE__ */ jsx61(DefaultResultList, {})
6475
+ }
6476
+ );
6477
+ const body = /* @__PURE__ */ jsxs35(VerticalRhythm2, { children: [
6271
6478
  searchFilters,
6272
- !resultList ? null : /* @__PURE__ */ jsx59(
6273
- ScrollableList,
6274
- {
6275
- role: "list",
6276
- css: css31`
6277
- > div {
6278
- transition: max-height var(--duration-slow) var(--timing-ease-out);
6279
- max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
6280
- }
6281
- `,
6282
- children: resultList
6283
- }
6284
- )
6479
+ listItems
6285
6480
  ] });
6286
6481
  const handleSelectedVariableChange = (selectedValue) => {
6287
6482
  var _a2;
@@ -6310,8 +6505,8 @@ var ObjectSearchContainer = ({
6310
6505
  }
6311
6506
  ]);
6312
6507
  };
6313
- return /* @__PURE__ */ jsx59(IconsProvider, { children: /* @__PURE__ */ jsxs34(VerticalRhythm2, { children: [
6314
- /* @__PURE__ */ jsx59(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx59(
6508
+ return /* @__PURE__ */ jsx61(IconsProvider, { children: /* @__PURE__ */ jsxs35(VerticalRhythm2, { children: [
6509
+ /* @__PURE__ */ jsx61(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx61(
6315
6510
  InputVariables,
6316
6511
  {
6317
6512
  label,
@@ -6329,14 +6524,25 @@ var ObjectSearchContainer = ({
6329
6524
  children
6330
6525
  ] }) });
6331
6526
  };
6527
+ var DefaultResultList = () => {
6528
+ var _a;
6529
+ const { list } = useObjectSearchContext();
6530
+ if (!list.items) {
6531
+ return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ jsx61(ObjectSearchListItemLoadingSkeleton, {}, i));
6532
+ }
6533
+ if (list.items.length === 0) {
6534
+ return /* @__PURE__ */ jsx61(Callout5, { type: "info", children: "No results were found" });
6535
+ }
6536
+ return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ jsx61(ObjectSearchListItem, { ...item }, item.id));
6537
+ };
6332
6538
 
6333
6539
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
6334
- import { InputKeywordSearch as InputKeywordSearch2, InputSelect as InputSelect6 } from "@uniformdev/design-system";
6335
- import { useMemo as useMemo15, useState as useState16 } from "react";
6540
+ import { DebouncedInputKeywordSearch, InputSelect as InputSelect6 } from "@uniformdev/design-system";
6541
+ import { useMemo as useMemo15, useState as useState17 } from "react";
6336
6542
 
6337
6543
  // src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
6338
- import { css as css32 } from "@emotion/react";
6339
- var ObjectSearchFilterContainerLabel = css32`
6544
+ import { css as css33 } from "@emotion/react";
6545
+ var ObjectSearchFilterContainerLabel = css33`
6340
6546
  align-items: center;
6341
6547
  display: flex;
6342
6548
  font-size: var(--fs-sm);
@@ -6344,18 +6550,18 @@ var ObjectSearchFilterContainerLabel = css32`
6344
6550
  line-height: 1rem;
6345
6551
  margin-bottom: var(--spacing-sm);
6346
6552
  `;
6347
- var ObjectSearchFilterContainer = css32`
6553
+ var ObjectSearchFilterContainer = css33`
6348
6554
  display: grid;
6349
6555
  gap: var(--spacing-base);
6350
6556
  `;
6351
- var ObjectSearchFilterGrid = (gridColumns) => css32`
6557
+ var ObjectSearchFilterGrid = (gridColumns) => css33`
6352
6558
  display: grid;
6353
6559
  grid-template-columns: ${gridColumns};
6354
6560
  gap: var(--spacing-base);
6355
6561
  `;
6356
6562
 
6357
6563
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
6358
- import { jsx as jsx60, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
6564
+ import { jsx as jsx62, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
6359
6565
  var ObjectSearchFilter = ({
6360
6566
  requireContentType,
6361
6567
  typeSelectorAllTypesOptionText = "All content types",
@@ -6364,10 +6570,11 @@ var ObjectSearchFilter = ({
6364
6570
  selectLabel = "Content Type Select",
6365
6571
  selectOptions
6366
6572
  }) => {
6573
+ var _a, _b;
6367
6574
  const { query, onSetQuery } = useObjectSearchContext();
6368
- const [searchState, setSearchState] = useState16({
6369
- contentType: "",
6370
- keyword: ""
6575
+ const [searchState, setSearchState] = useState17({
6576
+ contentType: (_a = query.contentType) != null ? _a : "",
6577
+ keyword: (_b = query.keyword) != null ? _b : ""
6371
6578
  });
6372
6579
  const handleFilterChange = (value) => {
6373
6580
  setSearchState((prev) => {
@@ -6381,14 +6588,11 @@ var ObjectSearchFilter = ({
6381
6588
  }
6382
6589
  return [
6383
6590
  ...!requireContentType ? [{ value: "any", label: typeSelectorAllTypesOptionText }] : [],
6384
- ...selectOptions ? selectOptions.map((option) => {
6385
- var _a;
6386
- return { name: option == null ? void 0 : option.name, label: (_a = option.label) != null ? _a : option == null ? void 0 : option.name, id: option.id };
6387
- }) : []
6591
+ ...selectOptions != null ? selectOptions : []
6388
6592
  ];
6389
6593
  }, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
6390
6594
  const shouldRenderSelect = memoizedSelectOptions.length > 0;
6391
- return /* @__PURE__ */ jsxs35(
6595
+ return /* @__PURE__ */ jsxs36(
6392
6596
  "fieldset",
6393
6597
  {
6394
6598
  css: [
@@ -6396,7 +6600,7 @@ var ObjectSearchFilter = ({
6396
6600
  ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
6397
6601
  ],
6398
6602
  children: [
6399
- memoizedSelectOptions.length ? /* @__PURE__ */ jsx60(
6603
+ memoizedSelectOptions.length ? /* @__PURE__ */ jsx62(
6400
6604
  InputSelect6,
6401
6605
  {
6402
6606
  label: selectLabel,
@@ -6406,15 +6610,15 @@ var ObjectSearchFilter = ({
6406
6610
  value: query.contentType
6407
6611
  }
6408
6612
  ) : null,
6409
- /* @__PURE__ */ jsx60(
6410
- InputKeywordSearch2,
6613
+ /* @__PURE__ */ jsx62(
6614
+ DebouncedInputKeywordSearch,
6411
6615
  {
6412
6616
  inputFieldName: searchInputName,
6413
6617
  placeholder: searchInputPlaceholderText,
6414
- onSearchTextChanged: (e) => handleFilterChange({ keyword: e }),
6618
+ onSearchTextChanged: (keyword) => handleFilterChange({ keyword }),
6415
6619
  disabledFieldSubmission: true,
6416
- onClear: () => handleFilterChange({ keyword: "" }),
6417
- value: searchState.keyword
6620
+ defaultValue: searchState.keyword,
6621
+ delay: 300
6418
6622
  }
6419
6623
  )
6420
6624
  ]
@@ -6423,154 +6627,14 @@ var ObjectSearchFilter = ({
6423
6627
  };
6424
6628
 
6425
6629
  // src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
6426
- import { jsx as jsx61, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
6630
+ import { jsx as jsx63, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
6427
6631
  var ObjectSearchFilterContainer2 = ({ label, children }) => {
6428
- return /* @__PURE__ */ jsxs36("div", { children: [
6429
- label ? /* @__PURE__ */ jsx61("span", { css: ObjectSearchFilterContainerLabel, children: label }) : null,
6430
- /* @__PURE__ */ jsx61("div", { css: ObjectSearchFilterContainer, children })
6632
+ return /* @__PURE__ */ jsxs37("div", { children: [
6633
+ label ? /* @__PURE__ */ jsx63("span", { css: ObjectSearchFilterContainerLabel, children: label }) : null,
6634
+ /* @__PURE__ */ jsx63("div", { css: ObjectSearchFilterContainer, children })
6431
6635
  ] });
6432
6636
  };
6433
6637
 
6434
- // src/components/ObjectSearch/ObjectSearchListItem.tsx
6435
- import { Chip, Popover } from "@uniformdev/design-system";
6436
-
6437
- // src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
6438
- import { css as css33 } from "@emotion/react";
6439
- import { skeletonLoading } from "@uniformdev/design-system";
6440
- var ObjectListItemContainer = css33`
6441
- align-items: center;
6442
- border: 1px solid var(--gray-300);
6443
- border-radius: var(--rounded-base);
6444
- background: var(--white);
6445
- display: grid;
6446
- grid-template-columns: 1fr auto;
6447
- padding: var(--spacing-sm);
6448
- `;
6449
- var ObjectListItemContainerDisabled = css33`
6450
- opacity: var(--opacity-50);
6451
- pointer-events: none;
6452
- `;
6453
- var ObjectListItemLoading = css33`
6454
- animation: ${skeletonLoading} 1s linear infinite alternate;
6455
- border-color: transparent;
6456
- min-height: 42px;
6457
- position: relative;
6458
-
6459
- &:before,
6460
- &:after {
6461
- background: var(--gray-200);
6462
- content: '';
6463
- display: block;
6464
- height: 1rem;
6465
- }
6466
-
6467
- &:before {
6468
- border-radius: var(--rounded-base);
6469
- width: 10rem;
6470
- }
6471
-
6472
- &:after {
6473
- border-radius: var(--rounded-full);
6474
- width: 1rem;
6475
- }
6476
- `;
6477
- var ObjectListItemHeadingGroup = css33`
6478
- align-items: center;
6479
- display: grid;
6480
- `;
6481
- var ObjectListItemThumbnail = css33`
6482
- width: 30px;
6483
- object-fit: contain;
6484
- `;
6485
- var ObjectListItemTitle = css33`
6486
- color: var(--brand-secondary-1);
6487
- display: block;
6488
- font-size: var(--fs-sm);
6489
- `;
6490
- var ObjectListItemSubtitle = css33`
6491
- color: var(--gray-500);
6492
- display: block;
6493
- font-size: var(--fs-xs);
6494
- line-height: 1;
6495
- `;
6496
- var ObjectListItemInfoContainer = css33`
6497
- align-items: center;
6498
- display: flex;
6499
- gap: var(--spacing-sm);
6500
- justify-content: center;
6501
- `;
6502
- var ObjectListItemControlledContent = css33`
6503
- display: flex;
6504
- gap: var(--spacing-sm);
6505
- `;
6506
- var ObjectListItemUnControlledContent = css33`
6507
- margin-top: var(--spacing-sm);
6508
- grid-column: 1 / -1;
6509
- `;
6510
-
6511
- // src/components/ObjectSearch/ObjectSearchListItem.tsx
6512
- import { jsx as jsx62, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
6513
- var ObjectSearchListItem = ({
6514
- id,
6515
- title,
6516
- contentType,
6517
- image,
6518
- imageUrl,
6519
- popoverData,
6520
- onSelect,
6521
- isMulti = false,
6522
- disabled,
6523
- children
6524
- }) => {
6525
- const { onSelectItem, selectedListItems } = useObjectSearchContext();
6526
- const formatedContentType = Array.isArray(contentType) ? contentType.join(", ") : contentType;
6527
- const handleSelectItem = () => {
6528
- var _a;
6529
- const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
6530
- const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
6531
- if (isMulti) {
6532
- return onSelectItem(selectedItem);
6533
- }
6534
- return onSelectItem([selectedItem]);
6535
- };
6536
- const selected = selectedListItems.some((item) => item.id === id);
6537
- return /* @__PURE__ */ jsxs37(
6538
- "div",
6539
- {
6540
- role: "listitem",
6541
- css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
6542
- "data-testid": "list-item",
6543
- children: [
6544
- /* @__PURE__ */ jsxs37(
6545
- "div",
6546
- {
6547
- role: "button",
6548
- onClick: handleSelectItem,
6549
- css: ObjectListItemControlledContent,
6550
- "aria-disabled": disabled,
6551
- children: [
6552
- !imageUrl ? null : /* @__PURE__ */ jsx62("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
6553
- !image || imageUrl ? null : /* @__PURE__ */ jsx62("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
6554
- /* @__PURE__ */ jsxs37("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
6555
- !contentType ? null : /* @__PURE__ */ jsx62("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
6556
- /* @__PURE__ */ jsx62("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
6557
- ] })
6558
- ]
6559
- }
6560
- ),
6561
- /* @__PURE__ */ jsxs37("div", { css: ObjectListItemInfoContainer, children: [
6562
- selected ? /* @__PURE__ */ jsx62(Chip, { text: "selected", size: "xs" }) : null,
6563
- !popoverData ? null : /* @__PURE__ */ jsx62(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6564
- ] }),
6565
- !children ? null : /* @__PURE__ */ jsx62("div", { css: ObjectListItemUnControlledContent, children })
6566
- ]
6567
- }
6568
- );
6569
- };
6570
- var ObjectSearchListItemLoadingSkeleton = () => {
6571
- return /* @__PURE__ */ jsx62("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
6572
- };
6573
-
6574
6638
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
6575
6639
  import { Badge, Button as Button4, Popover as Popover2 } from "@uniformdev/design-system";
6576
6640
  import { format as timeagoFormat } from "timeago.js";
@@ -6581,8 +6645,8 @@ import { button as button2 } from "@uniformdev/design-system";
6581
6645
  var ButtonStyles = css34`
6582
6646
  ${button2}
6583
6647
  background: transparent;
6584
- border: 1px solid var(--brand-secondary-1);
6585
- color: var(--brand-secondary-1);
6648
+ border: 1px solid var(--typography-base);
6649
+ color: var(--typography-base);
6586
6650
  padding: var(--spacing-sm);
6587
6651
  font-size: var(--fs-sm);
6588
6652
  line-height: 1;
@@ -6611,14 +6675,14 @@ var ButtonIcon = css34`
6611
6675
  `;
6612
6676
 
6613
6677
  // src/components/ObjectSearch/ObjectSearchResultItemButton.tsx
6614
- import { jsx as jsx63, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
6678
+ import { jsx as jsx64, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
6615
6679
  var ObjectSearchResultItemButton = ({
6616
6680
  text,
6617
6681
  icon,
6618
6682
  ...props
6619
6683
  }) => {
6620
6684
  return /* @__PURE__ */ jsxs38("button", { type: "button", css: ButtonStyles, ...props, children: [
6621
- !icon ? null : /* @__PURE__ */ jsx63(Image, { src: icon, css: ButtonIcon }),
6685
+ !icon ? null : /* @__PURE__ */ jsx64(Image, { src: icon, css: ButtonIcon }),
6622
6686
  text
6623
6687
  ] });
6624
6688
  };
@@ -6628,7 +6692,7 @@ var LinkButton = ({
6628
6692
  ...props
6629
6693
  }) => {
6630
6694
  return /* @__PURE__ */ jsxs38("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
6631
- !icon ? null : /* @__PURE__ */ jsx63(Image, { src: icon, css: ButtonIcon }),
6695
+ !icon ? null : /* @__PURE__ */ jsx64(Image, { src: icon, css: ButtonIcon }),
6632
6696
  text
6633
6697
  ] });
6634
6698
  };
@@ -6668,7 +6732,7 @@ var ObjectSearchResultItemSubtitle = css35`
6668
6732
  `;
6669
6733
  var ObjectSearchResultItemTitle = css35`
6670
6734
  align-items: center;
6671
- color: var(--brand-secondary-1);
6735
+ color: var(--typography-base);
6672
6736
  display: flex;
6673
6737
  gap: var(--spacing-xs);
6674
6738
  `;
@@ -6694,7 +6758,7 @@ var ObjectSearchImage = css35`
6694
6758
  `;
6695
6759
 
6696
6760
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
6697
- import { jsx as jsx64, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
6761
+ import { jsx as jsx65, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
6698
6762
  var ObjectSearchResultItem = ({
6699
6763
  id,
6700
6764
  title,
@@ -6718,42 +6782,42 @@ var ObjectSearchResultItem = ({
6718
6782
  onSelectItem({ id, title: id });
6719
6783
  onRemove == null ? void 0 : onRemove();
6720
6784
  };
6721
- return /* @__PURE__ */ jsxs39("div", { css: ObjectSearchResultItemContainer, children: [
6722
- disableDnD ? null : /* @__PURE__ */ jsx64("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
6723
- /* @__PURE__ */ jsx64("div", { children: /* @__PURE__ */ jsxs39("div", { css: ObjectSearchContentContainer, children: [
6724
- !imageUrl ? null : /* @__PURE__ */ jsx64("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectSearchImage }),
6785
+ return /* @__PURE__ */ jsxs39("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
6786
+ disableDnD ? null : /* @__PURE__ */ jsx65("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
6787
+ /* @__PURE__ */ jsx65("div", { children: /* @__PURE__ */ jsxs39("div", { css: ObjectSearchContentContainer, children: [
6788
+ !imageUrl ? null : /* @__PURE__ */ jsx65("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectSearchImage }),
6725
6789
  /* @__PURE__ */ jsxs39("div", { children: [
6726
- /* @__PURE__ */ jsx64("span", { css: ObjectSearchResultItemSubtitle, children: formatedContentType }),
6727
- /* @__PURE__ */ jsxs39("span", { role: "heading", css: ObjectSearchResultItemTitle, children: [
6790
+ /* @__PURE__ */ jsx65("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
6791
+ /* @__PURE__ */ jsxs39("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
6728
6792
  title != null ? title : name,
6729
- !popoverData ? null : /* @__PURE__ */ jsx64(Popover2, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
6793
+ !popoverData ? null : /* @__PURE__ */ jsx65(Popover2, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
6730
6794
  ] }),
6731
6795
  !createdAt && !publishStatus ? null : /* @__PURE__ */ jsxs39("div", { css: ObjectSearchAuthorStateGroup, children: [
6732
- !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ jsx64(Badge, { ...publishStatus, size: "sm", uppercaseText: true }),
6796
+ !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ jsx65(Badge, { ...publishStatus, size: "sm", uppercaseText: true }),
6733
6797
  !createdAt && !publishedAt ? null : /* @__PURE__ */ jsxs39("div", { css: ObjectSearchUpdateGroup, children: [
6734
6798
  !createdAt ? null : /* @__PURE__ */ jsxs39("small", { css: ObjectSearchResultItemTimeStamp, children: [
6735
- /* @__PURE__ */ jsx64("strong", { children: "Last updated: " }),
6799
+ /* @__PURE__ */ jsx65("strong", { children: "Last updated: " }),
6736
6800
  timeagoFormat(createdAt)
6737
6801
  ] }),
6738
6802
  !publishedAt ? null : /* @__PURE__ */ jsxs39("small", { css: ObjectSearchResultItemTimeStamp, children: [
6739
- /* @__PURE__ */ jsx64("strong", { children: "Last published: " }),
6803
+ /* @__PURE__ */ jsx65("strong", { children: "Last published: " }),
6740
6804
  timeagoFormat(publishedAt)
6741
6805
  ] })
6742
6806
  ] })
6743
6807
  ] }),
6744
- /* @__PURE__ */ jsx64("div", { children })
6808
+ /* @__PURE__ */ jsx65("div", { children })
6745
6809
  ] })
6746
6810
  ] }) }),
6747
6811
  !editLink && hideRemoveButton ? null : /* @__PURE__ */ jsxs39("div", { css: ObjectSearchAuthorStateGroup, children: [
6748
- !editLink ? null : /* @__PURE__ */ jsx64(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
6749
- hideRemoveButton ? null : /* @__PURE__ */ jsx64(Button4, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
6812
+ !editLink ? null : /* @__PURE__ */ jsx65(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
6813
+ hideRemoveButton ? null : /* @__PURE__ */ jsx65(Button4, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
6750
6814
  ] })
6751
6815
  ] });
6752
6816
  };
6753
6817
 
6754
6818
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
6755
6819
  import { Button as Button5, Counter } from "@uniformdev/design-system";
6756
- import { DragDropContext as DragDropContext3, Draggable as Draggable3, Droppable as Droppable3 } from "react-beautiful-dnd";
6820
+ import { Draggable as Draggable3, Droppable as Droppable3 } from "react-beautiful-dnd";
6757
6821
 
6758
6822
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
6759
6823
  import { css as css36 } from "@emotion/react";
@@ -6781,16 +6845,18 @@ var ObjectSearchResultListTitle = css36`
6781
6845
  `;
6782
6846
 
6783
6847
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
6784
- import { Fragment as Fragment13, jsx as jsx65, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
6848
+ import { Fragment as Fragment13, jsx as jsx66, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
6785
6849
  function ObjectSearchResultList({
6786
6850
  resultLabelText = "Selected",
6787
6851
  removeButtonText = "Remove all",
6788
6852
  onRemoveAllSelected,
6789
6853
  hideRemoveButton = false,
6854
+ resultLabelOverride,
6790
6855
  additionalButtons,
6791
- renderResultComponent = (value) => /* @__PURE__ */ jsx65(ObjectSearchResultItem, { ...value }),
6856
+ renderResultComponent = (value) => /* @__PURE__ */ jsx66(ObjectSearchResultItem, { ...value }),
6792
6857
  multiSelectId,
6793
6858
  disableDnD = false,
6859
+ getContainerForDnDReparenting,
6794
6860
  whenNothingSelected = null
6795
6861
  }) {
6796
6862
  const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useObjectSearchContext();
@@ -6808,16 +6874,37 @@ function ObjectSearchResultList({
6808
6874
  return result;
6809
6875
  }
6810
6876
  };
6877
+ const getDraggableItem = (provided, snapshot, rubric) => {
6878
+ const item = selectedListItems.find((i) => i.id === rubric.draggableId);
6879
+ const renderListItem = renderResultComponent({
6880
+ ...item,
6881
+ disableDnD: selectedListItems.length === 1 || disableDnD
6882
+ });
6883
+ return /* @__PURE__ */ jsx66(
6884
+ "div",
6885
+ {
6886
+ css: [
6887
+ ObjectSearchDragContainer,
6888
+ snapshot.isDragging ? ObjectSearchContainerDragging : void 0
6889
+ ],
6890
+ ref: provided.innerRef,
6891
+ "data-dragging": snapshot.isDragging,
6892
+ ...provided.draggableProps,
6893
+ ...provided.dragHandleProps,
6894
+ children: renderListItem
6895
+ }
6896
+ );
6897
+ };
6811
6898
  return /* @__PURE__ */ jsxs40(Fragment13, { children: [
6812
6899
  /* @__PURE__ */ jsxs40("div", { role: "group", css: ObjectSearchResultListContainer, children: [
6813
- /* @__PURE__ */ jsxs40("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
6814
- /* @__PURE__ */ jsx65("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
6900
+ !resultLabelOverride ? /* @__PURE__ */ jsxs40("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
6901
+ /* @__PURE__ */ jsx66("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
6815
6902
  " ",
6816
- !selectedListItems.length ? null : /* @__PURE__ */ jsx65(Counter, { count: selectedListItems.length })
6817
- ] }),
6903
+ !selectedListItems.length ? null : /* @__PURE__ */ jsx66(Counter, { count: selectedListItems.length })
6904
+ ] }) : resultLabelOverride,
6818
6905
  /* @__PURE__ */ jsxs40("div", { css: ObjectSearchResultListCounterContainer, children: [
6819
6906
  additionalButtons,
6820
- hideRemoveButton ? null : /* @__PURE__ */ jsx65(
6907
+ hideRemoveButton ? null : /* @__PURE__ */ jsx66(
6821
6908
  Button5,
6822
6909
  {
6823
6910
  buttonType: "ghostDestructive",
@@ -6829,43 +6916,36 @@ function ObjectSearchResultList({
6829
6916
  )
6830
6917
  ] })
6831
6918
  ] }),
6832
- !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx65(DragDropContext3, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx65(Droppable3, { droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs40("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
6833
- selectedListItems.map((item, i) => {
6834
- const itemValues = selectedListItems.length === 1 ? { ...item, disableDnD: true } : { ...item, disableDnD };
6835
- const renderListItem = renderResultComponent(itemValues);
6836
- return /* @__PURE__ */ jsx65(
6837
- Draggable3,
6838
- {
6839
- draggableId: item.id,
6840
- index: i,
6841
- isDragDisabled: selectedListItems.length === 1 || disableDnD,
6842
- children: (provided2, snapshot) => /* @__PURE__ */ jsx65(
6843
- "div",
6919
+ !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx66(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx66(
6920
+ Droppable3,
6921
+ {
6922
+ droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
6923
+ renderClone: getContainerForDnDReparenting ? getDraggableItem : void 0,
6924
+ getContainerForClone: getContainerForDnDReparenting,
6925
+ children: (provided) => /* @__PURE__ */ jsxs40("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
6926
+ selectedListItems.map((item, i) => {
6927
+ return /* @__PURE__ */ jsx66(
6928
+ Draggable3,
6844
6929
  {
6845
- css: [
6846
- ObjectSearchDragContainer,
6847
- snapshot.isDragging ? ObjectSearchContainerDragging : void 0
6848
- ],
6849
- ref: provided2.innerRef,
6850
- "data-dragging": snapshot.isDragging,
6851
- ...provided2.draggableProps,
6852
- ...provided2.dragHandleProps,
6853
- children: renderListItem
6854
- }
6855
- )
6856
- },
6857
- item.id
6858
- );
6859
- }),
6860
- provided.placeholder
6861
- ] }) }) })
6930
+ draggableId: item.id,
6931
+ index: i,
6932
+ isDragDisabled: selectedListItems.length === 1 || disableDnD,
6933
+ children: getDraggableItem
6934
+ },
6935
+ item.id
6936
+ );
6937
+ }),
6938
+ provided.placeholder
6939
+ ] })
6940
+ }
6941
+ ) })
6862
6942
  ] });
6863
6943
  }
6864
6944
 
6865
6945
  // src/components/ObjectSearch/QueryFilter.tsx
6866
- import { Input as Input5, InputKeywordSearch as InputKeywordSearch3, InputSelect as InputSelect7, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
6867
- import { useEffect as useEffect16, useState as useState17 } from "react";
6868
- import { jsx as jsx66, jsxs as jsxs41 } from "@emotion/react/jsx-runtime";
6946
+ import { DebouncedInputKeywordSearch as DebouncedInputKeywordSearch2, Input as Input5, InputSelect as InputSelect7, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
6947
+ import { useEffect as useEffect16, useState as useState18 } from "react";
6948
+ import { jsx as jsx67, jsxs as jsxs41 } from "@emotion/react/jsx-runtime";
6869
6949
  var QueryFilter = ({
6870
6950
  requireContentType,
6871
6951
  queryFilterTitle = "Configure Query",
@@ -6882,26 +6962,24 @@ var QueryFilter = ({
6882
6962
  sortOrderLabel = "Sort Order",
6883
6963
  sortOrderOptions = [
6884
6964
  {
6885
- name: "Ascending",
6886
- id: "asc",
6965
+ value: "asc",
6887
6966
  label: "Ascending"
6888
6967
  },
6889
6968
  {
6890
- name: "Descending",
6891
- id: "desc",
6969
+ value: "desc",
6892
6970
  label: "Descending"
6893
6971
  }
6894
6972
  ],
6895
6973
  children
6896
6974
  }) => {
6897
- var _a, _b, _c, _d;
6975
+ var _a, _b, _c, _d, _e, _f, _g;
6898
6976
  const { query, onSetQuery } = useObjectSearchContext();
6899
- const [queryState, setQueryState] = useState17({
6900
- contentType: "",
6901
- keyword: "",
6902
- count: countValue != null ? countValue : 5,
6903
- sortBy: (_a = sortOptions[0].id) != null ? _a : "",
6904
- sortOrder: (_b = sortOrderOptions[0].id) != null ? _b : ""
6977
+ const [queryState, setQueryState] = useState18({
6978
+ contentType: (_a = query.contentType) != null ? _a : "",
6979
+ keyword: (_b = query.keyword) != null ? _b : "",
6980
+ count: (_c = query.count) != null ? _c : countValue,
6981
+ sortBy: (_d = query.sortBy) != null ? _d : "",
6982
+ sortOrder: (_e = query.sortOrder) != null ? _e : ""
6905
6983
  });
6906
6984
  const handleFilterChange = (value) => {
6907
6985
  setQueryState((prev) => ({ ...prev, ...value }));
@@ -6909,61 +6987,56 @@ var QueryFilter = ({
6909
6987
  };
6910
6988
  useEffect16(() => {
6911
6989
  onSetQuery(queryState);
6912
- }, [onSetQuery, queryState]);
6990
+ }, []);
6913
6991
  return /* @__PURE__ */ jsxs41("fieldset", { children: [
6914
- /* @__PURE__ */ jsx66("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
6915
- /* @__PURE__ */ jsx66("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ jsxs41(VerticalRhythm3, { children: [
6916
- /* @__PURE__ */ jsx66(
6992
+ /* @__PURE__ */ jsx67("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
6993
+ /* @__PURE__ */ jsx67("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ jsxs41(VerticalRhythm3, { children: [
6994
+ /* @__PURE__ */ jsx67(
6917
6995
  InputVariables,
6918
6996
  {
6919
6997
  label: searchInputLabel,
6920
- value: (_c = queryState.keyword) != null ? _c : "",
6998
+ value: (_f = queryState.keyword) != null ? _f : "",
6921
6999
  onChange: (newQuery) => handleFilterChange({ keyword: newQuery }),
6922
7000
  disableInlineMenu: true,
6923
7001
  id: "qf_searchText",
6924
- inputWhenNoVariables: /* @__PURE__ */ jsx66(
6925
- InputKeywordSearch3,
7002
+ inputWhenNoVariables: /* @__PURE__ */ jsx67(
7003
+ DebouncedInputKeywordSearch2,
6926
7004
  {
6927
7005
  id: "qf_searchText",
6928
7006
  inputFieldName: searchInputName,
6929
7007
  placeholder: searchInputPlaceholderText,
6930
- onSearchTextChanged: (e) => handleFilterChange({ keyword: e }),
7008
+ onSearchTextChanged: (keyword) => handleFilterChange({ keyword }),
6931
7009
  disabledFieldSubmission: true,
6932
- onClear: () => handleFilterChange({ keyword: "" }),
6933
- value: queryState.keyword
7010
+ delay: 300,
7011
+ defaultValue: queryState.keyword
6934
7012
  }
6935
7013
  )
6936
7014
  }
6937
7015
  ),
6938
7016
  /* @__PURE__ */ jsxs41("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
6939
- /* @__PURE__ */ jsx66(
7017
+ /* @__PURE__ */ jsx67(
6940
7018
  InputVariables,
6941
7019
  {
6942
7020
  label: contentTypeLabel,
6943
7021
  id: "qf_contentType",
6944
- value: (_d = queryState.contentType) != null ? _d : "",
7022
+ value: (_g = queryState.contentType) != null ? _g : "",
6945
7023
  onChange: (newType) => handleFilterChange({ contentType: newType }),
6946
7024
  disableInlineMenu: true,
6947
- inputWhenNoVariables: /* @__PURE__ */ jsx66(
7025
+ inputWhenNoVariables: /* @__PURE__ */ jsx67(
6948
7026
  InputSelect7,
6949
7027
  {
6950
7028
  id: "qf_contentType",
6951
7029
  label: contentTypeLabel,
6952
7030
  showLabel: false,
6953
- options: [
6954
- ...!requireContentType ? [{ id: "", label: typeSelectorAllTypesOptionText }] : [],
6955
- ...contentTypeOptions ? contentTypeOptions.map((option) => {
6956
- var _a2;
6957
- return { id: option.id, label: (_a2 = option.label) != null ? _a2 : option.name, name: option.name };
6958
- }) : []
6959
- ],
7031
+ defaultOption: requireContentType ? void 0 : typeSelectorAllTypesOptionText,
7032
+ options: contentTypeOptions != null ? contentTypeOptions : [],
6960
7033
  onChange: (e) => handleFilterChange({ contentType: e.target.value }),
6961
7034
  value: queryState.contentType
6962
7035
  }
6963
7036
  )
6964
7037
  }
6965
7038
  ),
6966
- /* @__PURE__ */ jsx66(
7039
+ /* @__PURE__ */ jsx67(
6967
7040
  InputVariables,
6968
7041
  {
6969
7042
  label: countLabel,
@@ -6971,7 +7044,8 @@ var QueryFilter = ({
6971
7044
  value: queryState.count.toString(10),
6972
7045
  onChange: (newCount) => handleFilterChange({ count: newCount }),
6973
7046
  disableInlineMenu: true,
6974
- inputWhenNoVariables: /* @__PURE__ */ jsx66(
7047
+ valueToResetTo: "5",
7048
+ inputWhenNoVariables: /* @__PURE__ */ jsx67(
6975
7049
  Input5,
6976
7050
  {
6977
7051
  id: "qf_count",
@@ -6987,7 +7061,7 @@ var QueryFilter = ({
6987
7061
  )
6988
7062
  ] }),
6989
7063
  /* @__PURE__ */ jsxs41("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
6990
- /* @__PURE__ */ jsx66(
7064
+ /* @__PURE__ */ jsx67(
6991
7065
  InputVariables,
6992
7066
  {
6993
7067
  id: "qf_sortBy",
@@ -6995,29 +7069,21 @@ var QueryFilter = ({
6995
7069
  value: queryState.sortBy,
6996
7070
  onChange: (newSortBy) => handleFilterChange({ sortBy: newSortBy }),
6997
7071
  disableInlineMenu: true,
6998
- inputWhenNoVariables: /* @__PURE__ */ jsx66(
7072
+ inputWhenNoVariables: /* @__PURE__ */ jsx67(
6999
7073
  InputSelect7,
7000
7074
  {
7001
7075
  label: sortLabel,
7002
7076
  id: "qf_sortBy",
7003
7077
  showLabel: false,
7004
- options: [
7005
- {
7006
- label: "Select a sort",
7007
- id: ""
7008
- },
7009
- ...sortOptions ? sortOptions.map((option) => {
7010
- var _a2;
7011
- return { id: option.id, name: option.name, label: (_a2 = option.label) != null ? _a2 : option.name };
7012
- }) : []
7013
- ],
7078
+ defaultOption: "Select a sort",
7079
+ options: sortOptions != null ? sortOptions : [],
7014
7080
  onChange: (e) => handleFilterChange({ sortBy: e.target.value }),
7015
7081
  value: queryState.sortBy
7016
7082
  }
7017
7083
  )
7018
7084
  }
7019
7085
  ),
7020
- /* @__PURE__ */ jsx66(
7086
+ /* @__PURE__ */ jsx67(
7021
7087
  InputVariables,
7022
7088
  {
7023
7089
  label: sortOrderLabel,
@@ -7025,18 +7091,13 @@ var QueryFilter = ({
7025
7091
  value: queryState.sortOrder,
7026
7092
  onChange: (newSort) => handleFilterChange({ sortOrder: newSort }),
7027
7093
  disableInlineMenu: true,
7028
- inputWhenNoVariables: /* @__PURE__ */ jsx66(
7094
+ inputWhenNoVariables: /* @__PURE__ */ jsx67(
7029
7095
  InputSelect7,
7030
7096
  {
7031
7097
  label: sortOrderLabel,
7032
7098
  id: "qf_sortOrder",
7033
7099
  showLabel: false,
7034
- options: [
7035
- ...sortOrderOptions ? sortOrderOptions.map((option) => {
7036
- var _a2;
7037
- return { value: option.id, label: (_a2 = option.label) != null ? _a2 : option.name, name: option.name };
7038
- }) : []
7039
- ],
7100
+ options: sortOrderOptions != null ? sortOrderOptions : [],
7040
7101
  onChange: (e) => handleFilterChange({ sortOrder: e.target.value }),
7041
7102
  value: queryState.sortOrder
7042
7103
  }
@@ -7051,7 +7112,7 @@ var QueryFilter = ({
7051
7112
 
7052
7113
  // src/components/ParamTypeDynamicDataProvider.tsx
7053
7114
  import { useEffect as useEffect17, useMemo as useMemo16, useRef as useRef15 } from "react";
7054
- import { jsx as jsx67 } from "@emotion/react/jsx-runtime";
7115
+ import { jsx as jsx68 } from "@emotion/react/jsx-runtime";
7055
7116
  function ParamTypeDynamicDataProvider(props) {
7056
7117
  const { children } = props;
7057
7118
  const {
@@ -7063,7 +7124,7 @@ function ParamTypeDynamicDataProvider(props) {
7063
7124
  () => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
7064
7125
  [dynamicInputsAsVariables, connectedDataAsVariables]
7065
7126
  );
7066
- return /* @__PURE__ */ jsx67(VariablesProvider, { value: variables, onChange: () => {
7127
+ return /* @__PURE__ */ jsx68(VariablesProvider, { value: variables, onChange: () => {
7067
7128
  }, editVariableComponent: JsonMeshVariableEditor, children });
7068
7129
  }
7069
7130
  var JsonMeshVariableEditor = ({
@@ -7110,16 +7171,38 @@ function createLocationValidator(setValue, validate) {
7110
7171
  });
7111
7172
  }
7112
7173
 
7174
+ // src/utils/useContentDataResourceLocaleInfo.ts
7175
+ import { bindVariables as bindVariables2, createVariableReference as createVariableReference4, LOCALE_DYNAMIC_INPUT_NAME as LOCALE_DYNAMIC_INPUT_NAME2 } from "@uniformdev/canvas";
7176
+ import { useEffect as useEffect18, useRef as useRef16 } from "react";
7177
+ function useContentDataResourceLocaleInfo({
7178
+ locale,
7179
+ setLocale,
7180
+ dynamicInputs
7181
+ }) {
7182
+ var _a;
7183
+ const setLocaleRef = useRef16(setLocale);
7184
+ setLocaleRef.current = setLocale;
7185
+ const { flatVariables } = useVariables();
7186
+ const effectiveLocale = locale != null ? locale : dynamicInputs[LOCALE_DYNAMIC_INPUT_NAME2] ? createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2) : "";
7187
+ const boundLocale = (_a = bindVariables2({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
7188
+ useEffect18(() => {
7189
+ if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
7190
+ setLocaleRef.current(createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2));
7191
+ }
7192
+ }, [locale, effectiveLocale]);
7193
+ return { effectiveLocale, boundLocale: boundLocale ? boundLocale : void 0 };
7194
+ }
7195
+
7113
7196
  // src/index.ts
7114
7197
  import {
7115
7198
  AddListButton as AddListButton2,
7116
7199
  Button as Button6,
7117
- Callout as Callout5,
7200
+ Callout as Callout6,
7118
7201
  DrawerContent,
7119
7202
  Heading,
7120
7203
  Input as Input6,
7121
7204
  InputComboBox,
7122
- InputKeywordSearch as InputKeywordSearch4,
7205
+ InputKeywordSearch as InputKeywordSearch2,
7123
7206
  InputSelect as InputSelect8,
7124
7207
  InputToggle,
7125
7208
  Label,
@@ -7153,7 +7236,7 @@ export {
7153
7236
  $isVariableNode,
7154
7237
  AddListButton2 as AddListButton,
7155
7238
  Button6 as Button,
7156
- Callout5 as Callout,
7239
+ Callout6 as Callout,
7157
7240
  ControlledValuePlugin,
7158
7241
  DISCONNECT_VARIABLE_COMMAND,
7159
7242
  DamSelectedItem,
@@ -7173,7 +7256,7 @@ export {
7173
7256
  icons_exports as Icons,
7174
7257
  Input6 as Input,
7175
7258
  InputComboBox,
7176
- InputKeywordSearch4 as InputKeywordSearch,
7259
+ InputKeywordSearch2 as InputKeywordSearch,
7177
7260
  InputSelect8 as InputSelect,
7178
7261
  InputToggle,
7179
7262
  InputVariables,
@@ -7313,6 +7396,7 @@ export {
7313
7396
  urlEncodeRequestParameter,
7314
7397
  urlEncodeRequestUrl,
7315
7398
  useConnectedDataAsVariables,
7399
+ useContentDataResourceLocaleInfo,
7316
7400
  useDynamicInputsAsVariables,
7317
7401
  useMeshLocation,
7318
7402
  useObjectSearchContext,