@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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "1.0.111",
3
+ "version": "1.0.113",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 230,
6
6
  "exports": [
package/dist/index.cjs CHANGED
@@ -7692,6 +7692,7 @@ var Combobox = ({
7692
7692
  id: `${resolvedId}-listbox`,
7693
7693
  role: "listbox",
7694
7694
  "aria-labelledby": labelId,
7695
+ "data-os-ignore": virtualized ? "" : void 0,
7695
7696
  className: cn("overflow-y-auto overscroll-contain", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
7696
7697
  style: { maxHeight },
7697
7698
  children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn(size === "sm" ? "p-1" : size === "lg" ? "p-2" : "p-1.5"), children: loading2 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
@@ -15948,19 +15949,19 @@ var MultiCombobox = ({
15948
15949
  },
15949
15950
  "data-index": virtualItem?.index,
15950
15951
  style: itemStyle,
15952
+ className: cn(virtualItem && "list-none"),
15951
15953
  onClick: (e) => {
15952
15954
  e.preventDefault();
15953
15955
  e.stopPropagation();
15954
15956
  if (!isDisabled) toggleSelect(item.value);
15955
15957
  inputRef.current?.focus();
15956
15958
  },
15957
- className: cn("dropdown-item", isDisabled && "opacity-50 cursor-not-allowed pointer-events-none"),
15958
- children: renderOption(item, isSelected)
15959
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("dropdown-item", isDisabled && "opacity-50 cursor-not-allowed pointer-events-none"), children: renderOption(item, isSelected) })
15959
15960
  },
15960
15961
  item.value
15961
15962
  );
15962
15963
  }
15963
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
15964
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
15964
15965
  "li",
15965
15966
  {
15966
15967
  ref: (node) => {
@@ -15969,37 +15970,43 @@ var MultiCombobox = ({
15969
15970
  },
15970
15971
  "data-index": virtualItem?.index,
15971
15972
  style: itemStyle,
15973
+ className: cn(virtualItem && "list-none"),
15972
15974
  onClick: (e) => {
15973
15975
  e.preventDefault();
15974
15976
  e.stopPropagation();
15975
15977
  if (!isDisabled) toggleSelect(item.value);
15976
15978
  inputRef.current?.focus();
15977
15979
  },
15978
- className: cn(
15979
- "dropdown-item flex cursor-pointer items-center gap-3 rounded-full transition-all duration-200",
15980
- sizeStyles8[size].item,
15981
- "hover:bg-accent/70 hover:shadow-sm",
15982
- index === activeIndex && "bg-accent/60",
15983
- isSelected && "bg-primary/10 text-primary font-medium",
15984
- isDisabled && "opacity-40 cursor-not-allowed pointer-events-none"
15985
- ),
15986
- children: [
15987
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
15988
- "span",
15989
- {
15990
- className: cn(
15991
- "shrink-0 w-5 h-5 flex items-center justify-center rounded-md border-2 transition-all duration-200",
15992
- isSelected ? "bg-primary border-primary text-primary-foreground" : "border-muted-foreground/30 bg-transparent"
15980
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
15981
+ "div",
15982
+ {
15983
+ className: cn(
15984
+ "dropdown-item flex cursor-pointer items-center gap-3 rounded-full transition-all duration-200",
15985
+ sizeStyles8[size].item,
15986
+ "hover:bg-accent/70 hover:shadow-sm",
15987
+ index === activeIndex && "bg-accent/60",
15988
+ isSelected && "bg-primary/10 text-primary font-medium",
15989
+ isDisabled && "opacity-40 cursor-not-allowed pointer-events-none"
15990
+ ),
15991
+ children: [
15992
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
15993
+ "span",
15994
+ {
15995
+ className: cn(
15996
+ "shrink-0 w-5 h-5 flex items-center justify-center rounded-md border-2 transition-all duration-200",
15997
+ isSelected ? "bg-primary border-primary text-primary-foreground" : "border-muted-foreground/30 bg-transparent"
15998
+ ),
15999
+ children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react24.Check, { className: "w-3 h-3" })
16000
+ }
15993
16001
  ),
15994
- children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react24.Check, { className: "w-3 h-3" })
15995
- }
15996
- ),
15997
- optionIcon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "shrink-0 w-5 h-5 flex items-center justify-center text-muted-foreground", children: optionIcon }),
15998
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex-1 min-w-0", children: [
15999
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("truncate", isSelected && "font-medium text-primary"), children: item.label }),
16000
- optionDesc && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-xs text-muted-foreground truncate mt-0.5", children: optionDesc })
16001
- ] })
16002
- ]
16002
+ optionIcon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "shrink-0 w-5 h-5 flex items-center justify-center text-muted-foreground", children: optionIcon }),
16003
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex-1 min-w-0", children: [
16004
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("truncate", isSelected && "font-medium text-primary"), children: item.label }),
16005
+ optionDesc && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-xs text-muted-foreground truncate mt-0.5", children: optionDesc })
16006
+ ] })
16007
+ ]
16008
+ }
16009
+ )
16003
16010
  },
16004
16011
  item.value
16005
16012
  );
@@ -16065,6 +16072,7 @@ var MultiCombobox = ({
16065
16072
  role: "listbox",
16066
16073
  "aria-multiselectable": "true",
16067
16074
  ref: optionsListRef,
16075
+ "data-os-ignore": virtualized ? "" : void 0,
16068
16076
  style: { maxHeight },
16069
16077
  className: cn(
16070
16078
  "overflow-y-auto p-1.5",
@@ -24099,9 +24107,12 @@ var ClipboardImages = import_core2.Extension.create({
24099
24107
  for (const file of files) {
24100
24108
  if (file.size > options.maxFileSize) continue;
24101
24109
  if (options.allowedMimeTypes.length > 0 && !options.allowedMimeTypes.includes(file.type)) continue;
24102
- const src = await resolveImageSrc(file, options);
24103
- editor.chain().focus().setImage({ src, alt: file.name }).run();
24104
- editor.commands.createParagraphNear();
24110
+ try {
24111
+ const src = await resolveImageSrc(file, options);
24112
+ editor.chain().focus().setImage({ src, alt: file.name }).run();
24113
+ editor.commands.createParagraphNear();
24114
+ } catch {
24115
+ }
24105
24116
  }
24106
24117
  };
24107
24118
  return [
@@ -32429,12 +32440,15 @@ function useTableRowResize({
32429
32440
  tr.setMeta("addToHistory", false);
32430
32441
  editor.view.dispatch(tr);
32431
32442
  state.rowNode = editor.view.state.doc.nodeAt(state.rowPos) ?? state.rowNode;
32432
- const refreshedRow = state.tableElement.rows.item(state.rowElement.rowIndex);
32433
- if (refreshedRow instanceof HTMLTableRowElement) {
32434
- state.rowElement = refreshedRow;
32435
- const refreshedCell = refreshedRow.cells.item(state.cellIndex);
32436
- if (refreshedCell instanceof HTMLTableCellElement) {
32437
- state.cellElement = refreshedCell;
32443
+ const rowIndex = state.rowElement.rowIndex;
32444
+ if (rowIndex >= 0) {
32445
+ const refreshedRow = state.tableElement.rows.item(rowIndex);
32446
+ if (refreshedRow instanceof HTMLTableRowElement) {
32447
+ state.rowElement = refreshedRow;
32448
+ const refreshedCell = refreshedRow.cells.item(state.cellIndex);
32449
+ if (refreshedCell instanceof HTMLTableCellElement) {
32450
+ state.cellElement = refreshedCell;
32451
+ }
32438
32452
  }
32439
32453
  }
32440
32454
  document.body.style.cursor = "row-resize";
@@ -32794,9 +32808,7 @@ function useUEditorTableInteractions(editor) {
32794
32808
  document.addEventListener("selectionchange", handleSelectionChange);
32795
32809
  surface?.addEventListener("scroll", handleActiveCellLayoutChange, { passive: true });
32796
32810
  window.addEventListener("resize", handleActiveCellLayoutChange);
32797
- window.addEventListener("mousemove", handlePointerMove);
32798
32811
  document.addEventListener("pointermove", handlePointerMove);
32799
- window.addEventListener("mouseup", handlePointerUp);
32800
32812
  document.addEventListener("pointerup", handlePointerUp);
32801
32813
  window.addEventListener("blur", handleWindowBlur);
32802
32814
  editor.on("selectionUpdate", syncActiveTableCellFromSelection);
@@ -32813,9 +32825,7 @@ function useUEditorTableInteractions(editor) {
32813
32825
  document.removeEventListener("selectionchange", handleSelectionChange);
32814
32826
  surface?.removeEventListener("scroll", handleActiveCellLayoutChange);
32815
32827
  window.removeEventListener("resize", handleActiveCellLayoutChange);
32816
- window.removeEventListener("mousemove", handlePointerMove);
32817
32828
  document.removeEventListener("pointermove", handlePointerMove);
32818
- window.removeEventListener("mouseup", handlePointerUp);
32819
32829
  document.removeEventListener("pointerup", handlePointerUp);
32820
32830
  window.removeEventListener("blur", handleWindowBlur);
32821
32831
  editor.off("selectionUpdate", syncActiveTableCellFromSelection);