@uniformdev/design-system 19.185.1-alpha.8 → 19.186.2-alpha.14

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/esm/index.js CHANGED
@@ -17736,7 +17736,8 @@ var KeyValueInput = ({
17736
17736
  onChange: (itemValue) => handleUpdateOptionRow(index, itemValue),
17737
17737
  onDelete: () => handleDeleteOptionRow(index),
17738
17738
  onFocusChange: handleFocusChange,
17739
- "data-testid": "key-value-input-item"
17739
+ "data-testid": "key-value-input-item",
17740
+ onEnter: handleAddOptionRow
17740
17741
  },
17741
17742
  isDragging ? id : index
17742
17743
  )) })
@@ -17771,7 +17772,8 @@ var KeyValueInputItem = ({
17771
17772
  error,
17772
17773
  onFocusChange,
17773
17774
  disabledDelete = false,
17774
- disabledDnd = false
17775
+ disabledDnd = false,
17776
+ onEnter
17775
17777
  }) => {
17776
17778
  const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef, isSorting } = useSortable({
17777
17779
  id,
@@ -17781,6 +17783,11 @@ var KeyValueInputItem = ({
17781
17783
  transform: CSS.Transform.toString(transform),
17782
17784
  transition
17783
17785
  };
17786
+ const handleEnter = (e) => {
17787
+ if (e.key === "Enter") {
17788
+ onEnter();
17789
+ }
17790
+ };
17784
17791
  return /* @__PURE__ */ jsxs57("div", { css: rowWrapper, ref: setNodeRef, style, children: [
17785
17792
  /* @__PURE__ */ jsx92(DragHandle, { disableDnd: disabledDnd, ref: setActivatorNodeRef, ...attributes, ...listeners }),
17786
17793
  /* @__PURE__ */ jsxs57("div", { css: SelectKeyValueRowStyles, "data-testid": "key-value-input-item", children: [
@@ -17800,6 +17807,7 @@ var KeyValueInputItem = ({
17800
17807
  },
17801
17808
  onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
17802
17809
  onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
17810
+ onKeyDown: handleEnter,
17803
17811
  value: value.key,
17804
17812
  errorMessage: isSorting ? void 0 : error == null ? void 0 : error.key,
17805
17813
  "data-testid": "key"
@@ -17811,12 +17819,15 @@ var KeyValueInputItem = ({
17811
17819
  label: valueLabel,
17812
17820
  showLabel: false,
17813
17821
  disabled: disabled2,
17814
- onChange: (e) => onChange == null ? void 0 : onChange({
17815
- key: value.key,
17816
- value: e.currentTarget.value
17817
- }),
17822
+ onChange: (e) => {
17823
+ onChange == null ? void 0 : onChange({
17824
+ key: value.key,
17825
+ value: e.currentTarget.value
17826
+ });
17827
+ },
17818
17828
  onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
17819
17829
  onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
17830
+ onKeyDown: handleEnter,
17820
17831
  value: value.value,
17821
17832
  errorMessage: isSorting ? void 0 : error == null ? void 0 : error.value,
17822
17833
  "data-testid": "value"
@@ -19923,8 +19934,8 @@ import { useState as useState15 } from "react";
19923
19934
 
19924
19935
  // src/components/ParameterInputs/ParameterLabel.tsx
19925
19936
  import { jsx as jsx121 } from "@emotion/react/jsx-runtime";
19926
- var ParameterLabel = ({ id, asSpan, children, ...props }) => {
19927
- return !asSpan ? /* @__PURE__ */ jsx121("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ jsx121("span", { "aria-labelledby": id, css: labelText2, children });
19937
+ var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
19938
+ return !asSpan ? /* @__PURE__ */ jsx121("label", { ...props, htmlFor: id, css: labelText2, "data-testid": testId, children }) : /* @__PURE__ */ jsx121("span", { "aria-labelledby": id, css: labelText2, children });
19928
19939
  };
19929
19940
 
19930
19941
  // src/components/ParameterInputs/ParameterMenuButton.tsx
@@ -20049,7 +20060,7 @@ var ParameterShell = ({
20049
20060
  label,
20050
20061
  labelTrailingIcon != null ? labelTrailingIcon : null
20051
20062
  ] }),
20052
- !title2 ? null : /* @__PURE__ */ jsxs81(ParameterLabel, { id, asSpan: true, children: [
20063
+ !title2 ? null : /* @__PURE__ */ jsxs81(ParameterLabel, { id, asSpan: true, testId: "parameter-label", children: [
20053
20064
  labelLeadingIcon != null ? labelLeadingIcon : null,
20054
20065
  title2,
20055
20066
  labelTrailingIcon != null ? labelTrailingIcon : null
@@ -20381,7 +20392,7 @@ import {
20381
20392
  UNORDERED_LIST
20382
20393
  } from "@lexical/markdown";
20383
20394
  import { LexicalComposer } from "@lexical/react/LexicalComposer";
20384
- import { useLexicalComposerContext as useLexicalComposerContext8 } from "@lexical/react/LexicalComposerContext";
20395
+ import { useLexicalComposerContext as useLexicalComposerContext9 } from "@lexical/react/LexicalComposerContext";
20385
20396
  import { ContentEditable } from "@lexical/react/LexicalContentEditable";
20386
20397
  import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary";
20387
20398
  import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
@@ -20393,6 +20404,12 @@ import { HeadingNode, QuoteNode } from "@lexical/rich-text";
20393
20404
  import { TableCellNode as TableCellNode3, TableNode, TableRowNode as TableRowNode2 } from "@lexical/table";
20394
20405
 
20395
20406
  // ../richtext/dist/index.mjs
20407
+ function isRichTextNode(node) {
20408
+ return !!node && typeof node === "object" && "type" in node;
20409
+ }
20410
+ function isRichTextNodeType(node, type) {
20411
+ return isRichTextNode(node) && node.type === type;
20412
+ }
20396
20413
  var richTextBuiltInElements = [
20397
20414
  {
20398
20415
  label: "Heading 1",
@@ -20493,7 +20510,7 @@ var getLabelForElement = (type) => {
20493
20510
  // src/components/ParameterInputs/ParameterRichText.tsx
20494
20511
  import { deepEqual as deepEqual2 } from "fast-equals";
20495
20512
  import { ParagraphNode as ParagraphNode2 } from "lexical";
20496
- import { useEffect as useEffect24, useState as useState21 } from "react";
20513
+ import { useEffect as useEffect25, useState as useState21 } from "react";
20497
20514
 
20498
20515
  // src/components/ParameterInputs/rich-text/CustomCodeNode.ts
20499
20516
  import { CodeNode } from "@lexical/code";
@@ -20772,11 +20789,70 @@ var tableHeaderElement = css96`
20772
20789
  width: 7rem;
20773
20790
  `;
20774
20791
 
20792
+ // src/components/ParameterInputs/rich-text/ImprovedAssetSelectionPlugin.tsx
20793
+ import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
20794
+ import { $insertFirst } from "@lexical/utils";
20795
+ import { $createParagraphNode, $getRoot, $insertNodes } from "lexical";
20796
+ import { useEffect as useEffect18 } from "react";
20797
+ var ImprovedAssetSelectionPlugin = () => {
20798
+ const [editor] = useLexicalComposerContext2();
20799
+ useEffect18(() => {
20800
+ editor.getRootElement();
20801
+ const onRootClick = (event) => {
20802
+ if (event.target !== editor.getRootElement()) {
20803
+ return;
20804
+ }
20805
+ const clickArea = event.offsetY <= 60 ? "top" : "bottom";
20806
+ const state = editor.getEditorState().toJSON();
20807
+ const firstNode = state.root.children[0];
20808
+ const lastNode = state.root.children.at(-1);
20809
+ if (isRichTextNodeType(firstNode, "asset") && clickArea === "top") {
20810
+ editor.update(() => {
20811
+ $insertFirst($getRoot(), $createParagraphNode());
20812
+ requestAnimationFrame(() => {
20813
+ var _a, _b;
20814
+ (_b = (_a = editor.getRootElement()) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.scrollTo({
20815
+ top: 0,
20816
+ behavior: "instant"
20817
+ });
20818
+ });
20819
+ });
20820
+ } else if (isRichTextNodeType(lastNode, "asset") && clickArea === "bottom") {
20821
+ editor.update(() => {
20822
+ $getRoot().selectEnd();
20823
+ $insertNodes([$createParagraphNode()]);
20824
+ requestAnimationFrame(() => {
20825
+ var _a, _b, _c, _d;
20826
+ (_d = (_a = editor.getRootElement()) == null ? void 0 : _a.parentElement) == null ? void 0 : _d.scrollTo({
20827
+ top: (_c = (_b = editor.getRootElement()) == null ? void 0 : _b.parentElement) == null ? void 0 : _c.scrollHeight,
20828
+ behavior: "instant"
20829
+ });
20830
+ });
20831
+ });
20832
+ }
20833
+ };
20834
+ const removeRootListener = editor.registerRootListener((rootElement, prevRootElement) => {
20835
+ rootElement == null ? void 0 : rootElement.addEventListener("click", onRootClick);
20836
+ prevRootElement == null ? void 0 : prevRootElement.removeEventListener("click", onRootClick);
20837
+ });
20838
+ return () => {
20839
+ removeRootListener();
20840
+ };
20841
+ }, [editor]);
20842
+ return null;
20843
+ };
20844
+ var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
20845
+
20775
20846
  // src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
20776
20847
  import { css as css97 } from "@emotion/react";
20777
- import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
20848
+ import { useLexicalComposerContext as useLexicalComposerContext3 } from "@lexical/react/LexicalComposerContext";
20778
20849
  import { NodeEventPlugin } from "@lexical/react/LexicalNodeEventPlugin";
20779
- import { addClassNamesToElement, isHTMLAnchorElement, mergeRegister as mergeRegister2 } from "@lexical/utils";
20850
+ import {
20851
+ addClassNamesToElement,
20852
+ isHTMLAnchorElement,
20853
+ mergeRegister as mergeRegister2,
20854
+ objectKlassEquals
20855
+ } from "@lexical/utils";
20780
20856
  import { deepEqual } from "fast-equals";
20781
20857
  import {
20782
20858
  $applyNodeReplacement,
@@ -20785,11 +20861,13 @@ import {
20785
20861
  $isRangeSelection,
20786
20862
  BLUR_COMMAND,
20787
20863
  COMMAND_PRIORITY_EDITOR,
20864
+ COMMAND_PRIORITY_LOW,
20788
20865
  createCommand,
20789
20866
  ElementNode as ElementNode2,
20790
- FOCUS_COMMAND
20867
+ FOCUS_COMMAND,
20868
+ PASTE_COMMAND
20791
20869
  } from "lexical";
20792
- import { useCallback as useCallback10, useEffect as useEffect18, useRef as useRef11, useState as useState16 } from "react";
20870
+ import { useCallback as useCallback10, useEffect as useEffect19, useRef as useRef11, useState as useState16 } from "react";
20793
20871
 
20794
20872
  // src/components/ParameterInputs/rich-text/utils.ts
20795
20873
  import { $isAtNodeEnd } from "@lexical/selection";
@@ -20906,9 +20984,7 @@ function convertAnchorElement(domNode) {
20906
20984
  nodeId,
20907
20985
  dynamicInputValues
20908
20986
  };
20909
- if (isProjectMapLinkValue(value)) {
20910
- node = $createLinkNode(value);
20911
- } else if (isNonProjectMapLinkValue(value)) {
20987
+ if (isProjectMapLinkValue(value) || isNonProjectMapLinkValue(value)) {
20912
20988
  node = $createLinkNode(value);
20913
20989
  }
20914
20990
  return { node };
@@ -21062,6 +21138,10 @@ function upsertLinkNode(props) {
21062
21138
  continue;
21063
21139
  }
21064
21140
  const linkNodeAncestor = getLinkAncestor(node);
21141
+ if ($isLinkNode(node)) {
21142
+ node.setLink(props);
21143
+ continue;
21144
+ }
21065
21145
  if (!linkNodeAncestor) {
21066
21146
  const newLinkNode = $createLinkNode(props);
21067
21147
  node.insertBefore(newLinkNode);
@@ -21134,18 +21214,18 @@ function LinkNodePlugin({
21134
21214
  const parsePath = getBoundPath != null ? getBoundPath : function(path) {
21135
21215
  return path;
21136
21216
  };
21137
- const [editor] = useLexicalComposerContext2();
21217
+ const [editor] = useLexicalComposerContext3();
21138
21218
  const [linkPopoverState, setLinkPopoverState] = useState16();
21139
21219
  const linkPopoverElRef = useRef11(null);
21140
21220
  const [isEditorFocused, setIsEditorFocused] = useState16(false);
21141
21221
  const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState16(false);
21142
- useEffect18(() => {
21222
+ useEffect19(() => {
21143
21223
  if (!isEditorFocused && !isLinkPopoverFocused) {
21144
21224
  setLinkPopoverState(void 0);
21145
21225
  return;
21146
21226
  }
21147
21227
  }, [isEditorFocused, isLinkPopoverFocused]);
21148
- useEffect18(() => {
21228
+ useEffect19(() => {
21149
21229
  if (!editor.hasNodes([LinkNode])) {
21150
21230
  throw new Error("LinkNode not registered on editor");
21151
21231
  }
@@ -21211,6 +21291,41 @@ function LinkNodePlugin({
21211
21291
  return true;
21212
21292
  },
21213
21293
  COMMAND_PRIORITY_EDITOR
21294
+ ),
21295
+ // Support pasting of links from clipboard
21296
+ editor.registerCommand(
21297
+ PASTE_COMMAND,
21298
+ (event) => {
21299
+ const selection = $getSelection();
21300
+ if (!$isRangeSelection(selection) || selection.isCollapsed() || !objectKlassEquals(event, ClipboardEvent)) {
21301
+ return false;
21302
+ }
21303
+ const clipboardEvent = event;
21304
+ if (clipboardEvent.clipboardData === null) {
21305
+ return false;
21306
+ }
21307
+ const clipboardText = clipboardEvent.clipboardData.getData("text");
21308
+ if (!isValidUrl(clipboardText)) {
21309
+ return false;
21310
+ }
21311
+ if (selection.getNodes().some((node) => $isElementNode2(node) && !$isLinkNode(node))) {
21312
+ return false;
21313
+ }
21314
+ let path = clipboardText;
21315
+ const type = guessLinkTypeFromPath(path);
21316
+ if (type === "email" && path.startsWith("mailto:")) {
21317
+ path = path.replace("mailto:", "");
21318
+ } else if (type === "tel" && path.startsWith("tel:")) {
21319
+ path = path.replace("tel:", "");
21320
+ }
21321
+ upsertLinkNode({
21322
+ path,
21323
+ type
21324
+ });
21325
+ event.preventDefault();
21326
+ return true;
21327
+ },
21328
+ COMMAND_PRIORITY_LOW
21214
21329
  )
21215
21330
  );
21216
21331
  }, [editor, onConnectLink]);
@@ -21248,7 +21363,7 @@ function LinkNodePlugin({
21248
21363
  }
21249
21364
  });
21250
21365
  }, [editor, positioningAnchorEl]);
21251
- useEffect18(() => {
21366
+ useEffect19(() => {
21252
21367
  return editor.registerUpdateListener(({ editorState }) => {
21253
21368
  requestAnimationFrame(() => {
21254
21369
  editorState.read(() => {
@@ -21332,7 +21447,7 @@ function getLinkAncestor(node) {
21332
21447
 
21333
21448
  // src/components/ParameterInputs/rich-text/ListIndentPlugin.tsx
21334
21449
  import { $getListDepth, $isListItemNode, $isListNode, ListNode } from "@lexical/list";
21335
- import { useLexicalComposerContext as useLexicalComposerContext3 } from "@lexical/react/LexicalComposerContext";
21450
+ import { useLexicalComposerContext as useLexicalComposerContext4 } from "@lexical/react/LexicalComposerContext";
21336
21451
  import {
21337
21452
  $filter,
21338
21453
  $getNearestBlockElementAncestorOrThrow,
@@ -21352,7 +21467,7 @@ import {
21352
21467
  OUTDENT_CONTENT_COMMAND,
21353
21468
  SELECTION_CHANGE_COMMAND
21354
21469
  } from "lexical";
21355
- import { useEffect as useEffect19, useRef as useRef12 } from "react";
21470
+ import { useEffect as useEffect20, useRef as useRef12 } from "react";
21356
21471
  function isIndentPermitted(maxDepth) {
21357
21472
  const selection = $getSelection2();
21358
21473
  if (!$isRangeSelection2(selection)) {
@@ -21406,9 +21521,9 @@ function $indentOverTab(selection) {
21406
21521
  return false;
21407
21522
  }
21408
21523
  function ListIndentPlugin({ maxDepth }) {
21409
- const [editor] = useLexicalComposerContext3();
21524
+ const [editor] = useLexicalComposerContext4();
21410
21525
  const isInListItemNode = useRef12(false);
21411
- useEffect19(() => {
21526
+ useEffect20(() => {
21412
21527
  return editor.registerCommand(
21413
21528
  SELECTION_CHANGE_COMMAND,
21414
21529
  () => {
@@ -21425,7 +21540,7 @@ function ListIndentPlugin({ maxDepth }) {
21425
21540
  COMMAND_PRIORITY_NORMAL
21426
21541
  );
21427
21542
  }, [editor]);
21428
- useEffect19(() => {
21543
+ useEffect20(() => {
21429
21544
  return mergeRegister3(
21430
21545
  editor.registerCommand(
21431
21546
  INDENT_CONTENT_COMMAND,
@@ -21455,7 +21570,7 @@ function ListIndentPlugin({ maxDepth }) {
21455
21570
 
21456
21571
  // src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
21457
21572
  import { css as css98 } from "@emotion/react";
21458
- import { useLexicalComposerContext as useLexicalComposerContext4 } from "@lexical/react/LexicalComposerContext";
21573
+ import { useLexicalComposerContext as useLexicalComposerContext5 } from "@lexical/react/LexicalComposerContext";
21459
21574
  import { useLexicalEditable } from "@lexical/react/useLexicalEditable";
21460
21575
  import {
21461
21576
  $deleteTableColumn__EXPERIMENTAL,
@@ -21473,8 +21588,8 @@ import {
21473
21588
  TableCellHeaderStates,
21474
21589
  TableCellNode
21475
21590
  } from "@lexical/table";
21476
- import { $getRoot, $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection3 } from "lexical";
21477
- import { forwardRef as forwardRef22, useCallback as useCallback11, useEffect as useEffect20, useLayoutEffect, useState as useState17 } from "react";
21591
+ import { $getRoot as $getRoot2, $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection3 } from "lexical";
21592
+ import { forwardRef as forwardRef22, useCallback as useCallback11, useEffect as useEffect21, useLayoutEffect, useState as useState17 } from "react";
21478
21593
  import { jsx as jsx130, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
21479
21594
  function computeSelectionCount(selection) {
21480
21595
  const selectionShape = selection.getShape();
@@ -21522,7 +21637,7 @@ function TableActionMenu({
21522
21637
  tableCellEl,
21523
21638
  positioningAnchorEl
21524
21639
  }) {
21525
- const [editor] = useLexicalComposerContext4();
21640
+ const [editor] = useLexicalComposerContext5();
21526
21641
  const [tableCellNode, updateTableCellNode] = useState17(_tableCellNode);
21527
21642
  const [selectionCounts, updateSelectionCounts] = useState17({
21528
21643
  columns: 1,
@@ -21532,7 +21647,7 @@ function TableActionMenu({
21532
21647
  const incrementMenuTriggerKey = () => {
21533
21648
  setMenuTriggerKey((key) => key += 1);
21534
21649
  };
21535
- useEffect20(() => {
21650
+ useEffect21(() => {
21536
21651
  return editor.registerMutationListener(
21537
21652
  TableCellNode,
21538
21653
  (nodeMutations) => {
@@ -21546,7 +21661,7 @@ function TableActionMenu({
21546
21661
  { skipInitialization: true }
21547
21662
  );
21548
21663
  }, [editor, tableCellNode]);
21549
- useEffect20(() => {
21664
+ useEffect21(() => {
21550
21665
  editor.getEditorState().read(() => {
21551
21666
  const selection = $getSelection3();
21552
21667
  if ($isTableSelection(selection)) {
@@ -21571,7 +21686,7 @@ function TableActionMenu({
21571
21686
  tableNode.markDirty();
21572
21687
  updateTableCellNode(tableCellNode.getLatest());
21573
21688
  }
21574
- const rootNode = $getRoot();
21689
+ const rootNode = $getRoot2();
21575
21690
  rootNode.selectStart();
21576
21691
  });
21577
21692
  }, [editor, tableCellNode]);
@@ -21732,11 +21847,11 @@ function TableCellActionMenuContainer({
21732
21847
  menuPortalEl,
21733
21848
  positioningAnchorEl
21734
21849
  }) {
21735
- const [editor] = useLexicalComposerContext4();
21850
+ const [editor] = useLexicalComposerContext5();
21736
21851
  const [tableCellNode, setTableMenuCellNode] = useState17(null);
21737
21852
  const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState17(null);
21738
21853
  const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState17(null);
21739
- useEffect20(() => {
21854
+ useEffect21(() => {
21740
21855
  const newPortalEl = document.createElement("div");
21741
21856
  setTableMenuCellMenuPortalEl(newPortalEl);
21742
21857
  menuPortalEl.appendChild(newPortalEl);
@@ -21780,7 +21895,7 @@ function TableCellActionMenuContainer({
21780
21895
  setTableMenuCellNodeElem(null);
21781
21896
  }
21782
21897
  }, [editor, setTableMenuCellNodeElem]);
21783
- useEffect20(() => {
21898
+ useEffect21(() => {
21784
21899
  return editor.registerUpdateListener(() => {
21785
21900
  editor.getEditorState().read(() => {
21786
21901
  $moveMenu();
@@ -21808,7 +21923,7 @@ function TableActionMenuPlugin({
21808
21923
 
21809
21924
  // src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
21810
21925
  import { css as css99 } from "@emotion/react";
21811
- import { useLexicalComposerContext as useLexicalComposerContext5 } from "@lexical/react/LexicalComposerContext";
21926
+ import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexical/react/LexicalComposerContext";
21812
21927
  import { useLexicalEditable as useLexicalEditable2 } from "@lexical/react/useLexicalEditable";
21813
21928
  import {
21814
21929
  $computeTableMapSkipCellCheck,
@@ -21819,7 +21934,7 @@ import {
21819
21934
  } from "@lexical/table";
21820
21935
  import { calculateZoomLevel } from "@lexical/utils";
21821
21936
  import { $getNearestNodeFromDOMNode } from "lexical";
21822
- import { useCallback as useCallback12, useEffect as useEffect21, useMemo as useMemo6, useRef as useRef13, useState as useState18 } from "react";
21937
+ import { useCallback as useCallback12, useEffect as useEffect22, useMemo as useMemo6, useRef as useRef13, useState as useState18 } from "react";
21823
21938
  import { createPortal as createPortal3 } from "react-dom";
21824
21939
  import { Fragment as Fragment19, jsx as jsx131, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
21825
21940
  var MIN_ROW_HEIGHT = 33;
@@ -21864,7 +21979,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
21864
21979
  const isMouseDownOnEvent = (event) => {
21865
21980
  return (event.buttons & 1) === 1;
21866
21981
  };
21867
- useEffect21(() => {
21982
+ useEffect22(() => {
21868
21983
  const onMouseMove = (event) => {
21869
21984
  setTimeout(() => {
21870
21985
  const target = event.target;
@@ -22142,7 +22257,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
22142
22257
  ] }) });
22143
22258
  }
22144
22259
  function TableCellResizerPlugin({ positioningAnchorEl }) {
22145
- const [editor] = useLexicalComposerContext5();
22260
+ const [editor] = useLexicalComposerContext6();
22146
22261
  const isEditable = useLexicalEditable2();
22147
22262
  return useMemo6(
22148
22263
  () => isEditable ? createPortal3(
@@ -22154,7 +22269,7 @@ function TableCellResizerPlugin({ positioningAnchorEl }) {
22154
22269
  }
22155
22270
 
22156
22271
  // src/components/ParameterInputs/rich-text/TableSelectionPlugin.tsx
22157
- import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexical/react/LexicalComposerContext";
22272
+ import { useLexicalComposerContext as useLexicalComposerContext7 } from "@lexical/react/LexicalComposerContext";
22158
22273
  import { $findCellNode } from "@lexical/table";
22159
22274
  import {
22160
22275
  $getSelection as $getSelection4,
@@ -22163,11 +22278,11 @@ import {
22163
22278
  COMMAND_PRIORITY_NORMAL as COMMAND_PRIORITY_NORMAL2,
22164
22279
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND2
22165
22280
  } from "lexical";
22166
- import { useEffect as useEffect22, useState as useState19 } from "react";
22281
+ import { useEffect as useEffect23, useState as useState19 } from "react";
22167
22282
  var TableSelectionPlugin = () => {
22168
- const [editor] = useLexicalComposerContext6();
22283
+ const [editor] = useLexicalComposerContext7();
22169
22284
  const [closestTableCellNode, setClosestTableCellNode] = useState19(null);
22170
- useEffect22(() => {
22285
+ useEffect23(() => {
22171
22286
  return editor.registerCommand(
22172
22287
  SELECTION_CHANGE_COMMAND2,
22173
22288
  () => {
@@ -22189,7 +22304,7 @@ var TableSelectionPlugin = () => {
22189
22304
  COMMAND_PRIORITY_NORMAL2
22190
22305
  );
22191
22306
  }, [editor]);
22192
- useEffect22(() => {
22307
+ useEffect23(() => {
22193
22308
  const onControlA = (event) => {
22194
22309
  if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
22195
22310
  if (!closestTableCellNode) {
@@ -22221,22 +22336,22 @@ import {
22221
22336
  ListNode as ListNode2,
22222
22337
  REMOVE_LIST_COMMAND
22223
22338
  } from "@lexical/list";
22224
- import { useLexicalComposerContext as useLexicalComposerContext7 } from "@lexical/react/LexicalComposerContext";
22339
+ import { useLexicalComposerContext as useLexicalComposerContext8 } from "@lexical/react/LexicalComposerContext";
22225
22340
  import { $createHeadingNode, $createQuoteNode, $isHeadingNode } from "@lexical/rich-text";
22226
22341
  import { $setBlocksType } from "@lexical/selection";
22227
22342
  import { $createTableNodeWithDimensions } from "@lexical/table";
22228
22343
  import { $findMatchingParent, $getNearestNodeOfType as $getNearestNodeOfType2 } from "@lexical/utils";
22229
22344
  import {
22230
- $createParagraphNode,
22345
+ $createParagraphNode as $createParagraphNode2,
22231
22346
  $getSelection as $getSelection5,
22232
- $insertNodes,
22347
+ $insertNodes as $insertNodes2,
22233
22348
  $isRangeSelection as $isRangeSelection5,
22234
22349
  $isRootOrShadowRoot,
22235
22350
  COMMAND_PRIORITY_CRITICAL as COMMAND_PRIORITY_CRITICAL2,
22236
22351
  FORMAT_TEXT_COMMAND,
22237
22352
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND3
22238
22353
  } from "lexical";
22239
- import { useCallback as useCallback13, useEffect as useEffect23 } from "react";
22354
+ import { useCallback as useCallback13, useEffect as useEffect24 } from "react";
22240
22355
 
22241
22356
  // src/components/ParameterInputs/rich-text/toolbar/constants.ts
22242
22357
  var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
@@ -22445,7 +22560,7 @@ var RichTextToolbarIcon = ({ icon }) => {
22445
22560
  return /* @__PURE__ */ jsx132(Icon, { icon, css: toolbarIcon, size: "1rem" });
22446
22561
  };
22447
22562
  var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset }) => {
22448
- const [editor] = useLexicalComposerContext7();
22563
+ const [editor] = useLexicalComposerContext8();
22449
22564
  const {
22450
22565
  activeElement,
22451
22566
  setActiveElement,
@@ -22475,7 +22590,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
22475
22590
  if (HEADING_ELEMENTS.includes(type)) {
22476
22591
  $setBlocksType(selection, () => $createHeadingNode(type));
22477
22592
  } else if (type === "paragraph") {
22478
- $setBlocksType(selection, () => $createParagraphNode());
22593
+ $setBlocksType(selection, () => $createParagraphNode2());
22479
22594
  } else if (type === "quote") {
22480
22595
  $setBlocksType(selection, () => $createQuoteNode());
22481
22596
  } else if (type === "code") {
@@ -22488,7 +22603,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
22488
22603
  const { rows, columns } = dimensions;
22489
22604
  editor.focus(() => {
22490
22605
  editor.update(() => {
22491
- $insertNodes([$createTableNodeWithDimensions(rows, columns, false)]);
22606
+ $insertNodes2([$createTableNodeWithDimensions(rows, columns, false)]);
22492
22607
  });
22493
22608
  });
22494
22609
  });
@@ -22537,7 +22652,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
22537
22652
  setIsLink(false);
22538
22653
  }
22539
22654
  }, [editor, setActiveElement, setActiveFormats, setIsLink]);
22540
- useEffect23(() => {
22655
+ useEffect24(() => {
22541
22656
  return editor.registerCommand(
22542
22657
  SELECTION_CHANGE_COMMAND3,
22543
22658
  (_payload) => {
@@ -22547,7 +22662,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
22547
22662
  COMMAND_PRIORITY_CRITICAL2
22548
22663
  );
22549
22664
  }, [editor, updateToolbar]);
22550
- useEffect23(() => {
22665
+ useEffect24(() => {
22551
22666
  return editor.registerUpdateListener(({ editorState }) => {
22552
22667
  requestAnimationFrame(() => {
22553
22668
  editorState.read(() => {
@@ -22821,7 +22936,7 @@ var editorContainer = css101`
22821
22936
  font-size: var(--fs-base);
22822
22937
  height: max-content;
22823
22938
  line-height: 1.2;
22824
- max-height: 300px;
22939
+ max-height: 320px;
22825
22940
  min-height: 50px;
22826
22941
  overflow-y: auto;
22827
22942
  padding: var(--spacing-sm);
@@ -22990,13 +23105,13 @@ var RichText = ({
22990
23105
  onInsertAsset,
22991
23106
  minimalInteractivity
22992
23107
  }) => {
22993
- const [editor] = useLexicalComposerContext8();
22994
- useEffect24(() => {
23108
+ const [editor] = useLexicalComposerContext9();
23109
+ useEffect25(() => {
22995
23110
  if (onRichTextInit) {
22996
23111
  onRichTextInit(editor);
22997
23112
  }
22998
23113
  }, [editor, onRichTextInit]);
22999
- useEffect24(() => {
23114
+ useEffect25(() => {
23000
23115
  const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
23001
23116
  requestAnimationFrame(() => {
23002
23117
  if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
@@ -23008,7 +23123,7 @@ var RichText = ({
23008
23123
  removeUpdateListener();
23009
23124
  };
23010
23125
  }, [editor, onChange]);
23011
- useEffect24(() => {
23126
+ useEffect25(() => {
23012
23127
  editor.setEditable(!readOnly);
23013
23128
  }, [editor, readOnly]);
23014
23129
  const [editorContainerRef, setEditorContainerRef] = useState21(null);
@@ -23079,7 +23194,8 @@ var RichText = ({
23079
23194
  positioningAnchorEl: editorContainerRef
23080
23195
  }
23081
23196
  ) : null,
23082
- /* @__PURE__ */ jsx133(TableSelectionPlugin_default, {})
23197
+ /* @__PURE__ */ jsx133(TableSelectionPlugin_default, {}),
23198
+ /* @__PURE__ */ jsx133(ImprovedAssetSelectionPlugin_default, {})
23083
23199
  ] })
23084
23200
  ] });
23085
23201
  };
@@ -23356,7 +23472,7 @@ var ProgressListItem = ({
23356
23472
  // src/components/SegmentedControl/SegmentedControl.tsx
23357
23473
  import { css as css106 } from "@emotion/react";
23358
23474
  import { CgCheck as CgCheck5 } from "@react-icons/all-files/cg/CgCheck";
23359
- import { useCallback as useCallback14, useEffect as useEffect25, useMemo as useMemo9, useRef as useRef14, useState as useState22 } from "react";
23475
+ import { useCallback as useCallback14, useEffect as useEffect26, useMemo as useMemo9, useRef as useRef14, useState as useState22 } from "react";
23360
23476
 
23361
23477
  // src/components/SegmentedControl/SegmentedControl.styles.ts
23362
23478
  import { css as css105 } from "@emotion/react";
@@ -23570,7 +23686,7 @@ var SegmentedControl = ({
23570
23686
  const isIconOnly = useMemo9(() => {
23571
23687
  return options.every((option) => option && option.icon && !option.label);
23572
23688
  }, [options]);
23573
- useEffect25(() => {
23689
+ useEffect26(() => {
23574
23690
  const wrapperElement = wrapperRef.current;
23575
23691
  const onScroll = () => {
23576
23692
  if (!wrapperElement) {
@@ -23898,7 +24014,7 @@ import {
23898
24014
  TabProvider as AriakitTabProvider,
23899
24015
  useTabStore as useAriakitTabStore
23900
24016
  } from "@ariakit/react";
23901
- import { useCallback as useCallback15, useEffect as useEffect26, useMemo as useMemo10 } from "react";
24017
+ import { useCallback as useCallback15, useEffect as useEffect27, useMemo as useMemo10 } from "react";
23902
24018
 
23903
24019
  // src/components/Tabs/Tabs.styles.ts
23904
24020
  import { css as css110 } from "@emotion/react";
@@ -23958,7 +24074,7 @@ var Tabs = ({
23958
24074
  },
23959
24075
  [onSelectedIdChange, useHashForState]
23960
24076
  );
23961
- useEffect26(() => {
24077
+ useEffect27(() => {
23962
24078
  if (selected && selected !== tab.getState().activeId) {
23963
24079
  tab.setSelectedId(selected);
23964
24080
  }
package/dist/index.d.mts CHANGED
@@ -23146,9 +23146,11 @@ type ParameterLabelProps = HTMLAttributes<HTMLLabelElement> & {
23146
23146
  children: React.ReactNode;
23147
23147
  /** sets the label to use a span tag with aria-labelledby */
23148
23148
  asSpan?: boolean;
23149
+ /** sets the data-testId attribute */
23150
+ testId?: string;
23149
23151
  };
23150
23152
  /** @example <ParameterLabel id="my-label">my label</ParameterLabel> */
23151
- declare const ParameterLabel: ({ id, asSpan, children, ...props }: ParameterLabelProps) => _emotion_react_jsx_runtime.JSX.Element;
23153
+ declare const ParameterLabel: ({ id, asSpan, children, testId, ...props }: ParameterLabelProps) => _emotion_react_jsx_runtime.JSX.Element;
23152
23154
 
23153
23155
  type ParameterLinkProps = CommonParameterInputProps & React.InputHTMLAttributes<HTMLInputElement> & {
23154
23156
  /** (optional) sets the button text when value is empty
package/dist/index.d.ts CHANGED
@@ -23146,9 +23146,11 @@ type ParameterLabelProps = HTMLAttributes<HTMLLabelElement> & {
23146
23146
  children: React.ReactNode;
23147
23147
  /** sets the label to use a span tag with aria-labelledby */
23148
23148
  asSpan?: boolean;
23149
+ /** sets the data-testId attribute */
23150
+ testId?: string;
23149
23151
  };
23150
23152
  /** @example <ParameterLabel id="my-label">my label</ParameterLabel> */
23151
- declare const ParameterLabel: ({ id, asSpan, children, ...props }: ParameterLabelProps) => _emotion_react_jsx_runtime.JSX.Element;
23153
+ declare const ParameterLabel: ({ id, asSpan, children, testId, ...props }: ParameterLabelProps) => _emotion_react_jsx_runtime.JSX.Element;
23152
23154
 
23153
23155
  type ParameterLinkProps = CommonParameterInputProps & React.InputHTMLAttributes<HTMLInputElement> & {
23154
23156
  /** (optional) sets the button text when value is empty