@underverse-ui/underverse 1.0.111 → 1.0.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7507,6 +7507,7 @@ var Combobox = ({
7507
7507
  id: `${resolvedId}-listbox`,
7508
7508
  role: "listbox",
7509
7509
  "aria-labelledby": labelId,
7510
+ "data-os-ignore": virtualized ? "" : void 0,
7510
7511
  className: cn("overflow-y-auto overscroll-contain", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
7511
7512
  style: { maxHeight },
7512
7513
  children: /* @__PURE__ */ jsx29("div", { className: cn(size === "sm" ? "p-1" : size === "lg" ? "p-2" : "p-1.5"), children: loading2 ? /* @__PURE__ */ jsx29("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
@@ -15763,19 +15764,19 @@ var MultiCombobox = ({
15763
15764
  },
15764
15765
  "data-index": virtualItem?.index,
15765
15766
  style: itemStyle,
15767
+ className: cn(virtualItem && "list-none"),
15766
15768
  onClick: (e) => {
15767
15769
  e.preventDefault();
15768
15770
  e.stopPropagation();
15769
15771
  if (!isDisabled) toggleSelect(item.value);
15770
15772
  inputRef.current?.focus();
15771
15773
  },
15772
- className: cn("dropdown-item", isDisabled && "opacity-50 cursor-not-allowed pointer-events-none"),
15773
- children: renderOption(item, isSelected)
15774
+ children: /* @__PURE__ */ jsx45("div", { className: cn("dropdown-item", isDisabled && "opacity-50 cursor-not-allowed pointer-events-none"), children: renderOption(item, isSelected) })
15774
15775
  },
15775
15776
  item.value
15776
15777
  );
15777
15778
  }
15778
- return /* @__PURE__ */ jsxs35(
15779
+ return /* @__PURE__ */ jsx45(
15779
15780
  "li",
15780
15781
  {
15781
15782
  ref: (node) => {
@@ -15784,37 +15785,43 @@ var MultiCombobox = ({
15784
15785
  },
15785
15786
  "data-index": virtualItem?.index,
15786
15787
  style: itemStyle,
15788
+ className: cn(virtualItem && "list-none"),
15787
15789
  onClick: (e) => {
15788
15790
  e.preventDefault();
15789
15791
  e.stopPropagation();
15790
15792
  if (!isDisabled) toggleSelect(item.value);
15791
15793
  inputRef.current?.focus();
15792
15794
  },
15793
- className: cn(
15794
- "dropdown-item flex cursor-pointer items-center gap-3 rounded-full transition-all duration-200",
15795
- sizeStyles8[size].item,
15796
- "hover:bg-accent/70 hover:shadow-sm",
15797
- index === activeIndex && "bg-accent/60",
15798
- isSelected && "bg-primary/10 text-primary font-medium",
15799
- isDisabled && "opacity-40 cursor-not-allowed pointer-events-none"
15800
- ),
15801
- children: [
15802
- /* @__PURE__ */ jsx45(
15803
- "span",
15804
- {
15805
- className: cn(
15806
- "shrink-0 w-5 h-5 flex items-center justify-center rounded-md border-2 transition-all duration-200",
15807
- isSelected ? "bg-primary border-primary text-primary-foreground" : "border-muted-foreground/30 bg-transparent"
15795
+ children: /* @__PURE__ */ jsxs35(
15796
+ "div",
15797
+ {
15798
+ className: cn(
15799
+ "dropdown-item flex cursor-pointer items-center gap-3 rounded-full transition-all duration-200",
15800
+ sizeStyles8[size].item,
15801
+ "hover:bg-accent/70 hover:shadow-sm",
15802
+ index === activeIndex && "bg-accent/60",
15803
+ isSelected && "bg-primary/10 text-primary font-medium",
15804
+ isDisabled && "opacity-40 cursor-not-allowed pointer-events-none"
15805
+ ),
15806
+ children: [
15807
+ /* @__PURE__ */ jsx45(
15808
+ "span",
15809
+ {
15810
+ className: cn(
15811
+ "shrink-0 w-5 h-5 flex items-center justify-center rounded-md border-2 transition-all duration-200",
15812
+ isSelected ? "bg-primary border-primary text-primary-foreground" : "border-muted-foreground/30 bg-transparent"
15813
+ ),
15814
+ children: isSelected && /* @__PURE__ */ jsx45(Check6, { className: "w-3 h-3" })
15815
+ }
15808
15816
  ),
15809
- children: isSelected && /* @__PURE__ */ jsx45(Check6, { className: "w-3 h-3" })
15810
- }
15811
- ),
15812
- optionIcon && /* @__PURE__ */ jsx45("span", { className: "shrink-0 w-5 h-5 flex items-center justify-center text-muted-foreground", children: optionIcon }),
15813
- /* @__PURE__ */ jsxs35("div", { className: "flex-1 min-w-0", children: [
15814
- /* @__PURE__ */ jsx45("div", { className: cn("truncate", isSelected && "font-medium text-primary"), children: item.label }),
15815
- optionDesc && /* @__PURE__ */ jsx45("div", { className: "text-xs text-muted-foreground truncate mt-0.5", children: optionDesc })
15816
- ] })
15817
- ]
15817
+ optionIcon && /* @__PURE__ */ jsx45("span", { className: "shrink-0 w-5 h-5 flex items-center justify-center text-muted-foreground", children: optionIcon }),
15818
+ /* @__PURE__ */ jsxs35("div", { className: "flex-1 min-w-0", children: [
15819
+ /* @__PURE__ */ jsx45("div", { className: cn("truncate", isSelected && "font-medium text-primary"), children: item.label }),
15820
+ optionDesc && /* @__PURE__ */ jsx45("div", { className: "text-xs text-muted-foreground truncate mt-0.5", children: optionDesc })
15821
+ ] })
15822
+ ]
15823
+ }
15824
+ )
15818
15825
  },
15819
15826
  item.value
15820
15827
  );
@@ -15880,6 +15887,7 @@ var MultiCombobox = ({
15880
15887
  role: "listbox",
15881
15888
  "aria-multiselectable": "true",
15882
15889
  ref: optionsListRef,
15890
+ "data-os-ignore": virtualized ? "" : void 0,
15883
15891
  style: { maxHeight },
15884
15892
  className: cn(
15885
15893
  "overflow-y-auto p-1.5",
@@ -23942,9 +23950,12 @@ var ClipboardImages = Extension2.create({
23942
23950
  for (const file of files) {
23943
23951
  if (file.size > options.maxFileSize) continue;
23944
23952
  if (options.allowedMimeTypes.length > 0 && !options.allowedMimeTypes.includes(file.type)) continue;
23945
- const src = await resolveImageSrc(file, options);
23946
- editor.chain().focus().setImage({ src, alt: file.name }).run();
23947
- editor.commands.createParagraphNear();
23953
+ try {
23954
+ const src = await resolveImageSrc(file, options);
23955
+ editor.chain().focus().setImage({ src, alt: file.name }).run();
23956
+ editor.commands.createParagraphNear();
23957
+ } catch {
23958
+ }
23948
23959
  }
23949
23960
  };
23950
23961
  return [
@@ -32339,12 +32350,15 @@ function useTableRowResize({
32339
32350
  tr.setMeta("addToHistory", false);
32340
32351
  editor.view.dispatch(tr);
32341
32352
  state.rowNode = editor.view.state.doc.nodeAt(state.rowPos) ?? state.rowNode;
32342
- const refreshedRow = state.tableElement.rows.item(state.rowElement.rowIndex);
32343
- if (refreshedRow instanceof HTMLTableRowElement) {
32344
- state.rowElement = refreshedRow;
32345
- const refreshedCell = refreshedRow.cells.item(state.cellIndex);
32346
- if (refreshedCell instanceof HTMLTableCellElement) {
32347
- state.cellElement = refreshedCell;
32353
+ const rowIndex = state.rowElement.rowIndex;
32354
+ if (rowIndex >= 0) {
32355
+ const refreshedRow = state.tableElement.rows.item(rowIndex);
32356
+ if (refreshedRow instanceof HTMLTableRowElement) {
32357
+ state.rowElement = refreshedRow;
32358
+ const refreshedCell = refreshedRow.cells.item(state.cellIndex);
32359
+ if (refreshedCell instanceof HTMLTableCellElement) {
32360
+ state.cellElement = refreshedCell;
32361
+ }
32348
32362
  }
32349
32363
  }
32350
32364
  document.body.style.cursor = "row-resize";
@@ -32704,9 +32718,7 @@ function useUEditorTableInteractions(editor) {
32704
32718
  document.addEventListener("selectionchange", handleSelectionChange);
32705
32719
  surface?.addEventListener("scroll", handleActiveCellLayoutChange, { passive: true });
32706
32720
  window.addEventListener("resize", handleActiveCellLayoutChange);
32707
- window.addEventListener("mousemove", handlePointerMove);
32708
32721
  document.addEventListener("pointermove", handlePointerMove);
32709
- window.addEventListener("mouseup", handlePointerUp);
32710
32722
  document.addEventListener("pointerup", handlePointerUp);
32711
32723
  window.addEventListener("blur", handleWindowBlur);
32712
32724
  editor.on("selectionUpdate", syncActiveTableCellFromSelection);
@@ -32723,9 +32735,7 @@ function useUEditorTableInteractions(editor) {
32723
32735
  document.removeEventListener("selectionchange", handleSelectionChange);
32724
32736
  surface?.removeEventListener("scroll", handleActiveCellLayoutChange);
32725
32737
  window.removeEventListener("resize", handleActiveCellLayoutChange);
32726
- window.removeEventListener("mousemove", handlePointerMove);
32727
32738
  document.removeEventListener("pointermove", handlePointerMove);
32728
- window.removeEventListener("mouseup", handlePointerUp);
32729
32739
  document.removeEventListener("pointerup", handlePointerUp);
32730
32740
  window.removeEventListener("blur", handleWindowBlur);
32731
32741
  editor.off("selectionUpdate", syncActiveTableCellFromSelection);