@underverse-ui/underverse 2.0.43 → 2.0.45

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.cjs CHANGED
@@ -21984,7 +21984,8 @@ var ToastProvider = ({
21984
21984
  children,
21985
21985
  position = "top-right",
21986
21986
  maxToasts = 5,
21987
- viewportClassName
21987
+ viewportClassName,
21988
+ showProgress = true
21988
21989
  }) => {
21989
21990
  const [toasts, setToasts] = (0, import_react13.useState)([]);
21990
21991
  const idRef = (0, import_react13.useRef)(0);
@@ -22018,12 +22019,12 @@ var ToastProvider = ({
22018
22019
  className: cn("fixed z-99999 flex flex-col gap-2 pointer-events-none", positionClasses[position], viewportClassName),
22019
22020
  "aria-live": "polite",
22020
22021
  "aria-atomic": true,
22021
- children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ToastComponent, { toast, onRemove: removeToast }, toast.id))
22022
+ children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ToastComponent, { toast, onRemove: removeToast, defaultShowProgress: showProgress }, toast.id))
22022
22023
  }
22023
22024
  )
22024
22025
  ] });
22025
22026
  };
22026
- var ToastComponent = ({ toast, onRemove }) => {
22027
+ var ToastComponent = ({ toast, onRemove, defaultShowProgress = true }) => {
22027
22028
  const gi18n = useGlobalI18n();
22028
22029
  const [isVisible, setIsVisible] = (0, import_react13.useState)(true);
22029
22030
  const [progress, setProgress] = (0, import_react13.useState)(100);
@@ -22080,6 +22081,7 @@ var ToastComponent = ({ toast, onRemove }) => {
22080
22081
  };
22081
22082
  const config = typeConfig[toast.type];
22082
22083
  const Icon = config.icon;
22084
+ const shouldShowProgress = toast.showProgress ?? defaultShowProgress;
22083
22085
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
22084
22086
  "div",
22085
22087
  {
@@ -22137,7 +22139,7 @@ var ToastComponent = ({ toast, onRemove }) => {
22137
22139
  }
22138
22140
  )
22139
22141
  ] }),
22140
- toast.duration !== 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "absolute left-0 right-0 bottom-0 h-1 bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
22142
+ shouldShowProgress && toast.duration !== 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "absolute left-0 right-0 bottom-0 h-1 bg-transparent", "data-testid": "toast-progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
22141
22143
  "div",
22142
22144
  {
22143
22145
  className: cn(
@@ -45828,7 +45830,8 @@ function buildUEditorExtensions({
45828
45830
  fallbackToDataUrl,
45829
45831
  onImageUploadError,
45830
45832
  editable = true,
45831
- fetchMetadata
45833
+ fetchMetadata,
45834
+ enableAutocomplete = true
45832
45835
  }) {
45833
45836
  return [
45834
45837
  import_extension_document.Document,
@@ -45959,7 +45962,7 @@ function buildUEditorExtensions({
45959
45962
  getPortalContainer
45960
45963
  }),
45961
45964
  FormulaSuggestion.configure({ getPortalContainer }),
45962
- EmojiSuggestion.configure({ getPortalContainer }),
45965
+ ...enableAutocomplete ? [EmojiSuggestion.configure({ getPortalContainer })] : [],
45963
45966
  Callout,
45964
45967
  Bookmark.configure({
45965
45968
  fetchMetadata
@@ -50959,11 +50962,12 @@ var UEditor = import_react88.default.forwardRef(({
50959
50962
  fallbackToDataUrl,
50960
50963
  onImageUploadError,
50961
50964
  editable,
50962
- fetchMetadata
50965
+ fetchMetadata,
50966
+ enableAutocomplete
50963
50967
  }),
50964
50968
  ...extraExtensions ?? []
50965
50969
  ],
50966
- [getPortalContainer, effectivePlaceholder, t, maxCharacters, uploadImage, resolvedUploadFile, imageInsertMode, maxImageFileSize, allowedImageMimeTypes, fallbackToDataUrl, onImageUploadError, editable, fetchMetadata, extraExtensions]
50970
+ [getPortalContainer, effectivePlaceholder, t, maxCharacters, uploadImage, resolvedUploadFile, imageInsertMode, maxImageFileSize, allowedImageMimeTypes, fallbackToDataUrl, onImageUploadError, editable, fetchMetadata, enableAutocomplete, extraExtensions]
50967
50971
  );
50968
50972
  const syncFormulaRangeHighlight = import_react88.default.useCallback((pickState) => {
50969
50973
  const container = formulaRangeSurfaceRef.current;