@youngonesworks/ui 0.1.45 → 0.1.46

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
@@ -115693,6 +115693,7 @@ const Select = (0, react.forwardRef)(({ options: options$1, placeholder, default
115693
115693
  const DropdownIndicator$1 = (props$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(components.DropdownIndicator, {
115694
115694
  ...props$1,
115695
115695
  children: props$1.hasValue && isClearable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconX, {
115696
+ "data-testid": "icon-x",
115696
115697
  className: "cursor-pointer",
115697
115698
  size: 16,
115698
115699
  color: "black",
@@ -137630,8 +137631,8 @@ function useEditorState(options$1) {
137630
137631
  return selectedState;
137631
137632
  }
137632
137633
  const isDev = "development" !== "production";
137633
- const isSSR = typeof window === "undefined";
137634
- const isNext = isSSR || Boolean(typeof window !== "undefined" && window.next);
137634
+ const isSSR$1 = typeof window === "undefined";
137635
+ const isNext = isSSR$1 || Boolean(typeof window !== "undefined" && window.next);
137635
137636
  /**
137636
137637
  * This class handles the creation, destruction, and re-creation of the editor instance.
137637
137638
  */
@@ -137677,7 +137678,7 @@ var EditorInstanceManager = class EditorInstanceManager {
137677
137678
  }
137678
137679
  getInitialEditor() {
137679
137680
  if (this.options.current.immediatelyRender === undefined) {
137680
- if (isSSR || isNext) {
137681
+ if (isSSR$1 || isNext) {
137681
137682
  if (isDev) {
137682
137683
  /**
137683
137684
  * Throw an error in development, to make sure the developer is aware that tiptap cannot be SSR'd
@@ -137689,7 +137690,7 @@ var EditorInstanceManager = class EditorInstanceManager {
137689
137690
  }
137690
137691
  return this.createEditor();
137691
137692
  }
137692
- if (this.options.current.immediatelyRender && isSSR && isDev) {
137693
+ if (this.options.current.immediatelyRender && isSSR$1 && isDev) {
137693
137694
  throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");
137694
137695
  }
137695
137696
  if (this.options.current.immediatelyRender) {
@@ -140417,6 +140418,10 @@ const StarterKit = Extension.create({
140417
140418
  }
140418
140419
  });
140419
140420
 
140421
+ //#endregion
140422
+ //#region src/utils/ssr.ts
140423
+ const isSSR = () => typeof window === "undefined" || typeof document === "undefined";
140424
+
140420
140425
  //#endregion
140421
140426
  //#region src/components/wysiwygEditor/index.tsx
140422
140427
  const BoldIcon = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconBold, {
@@ -140469,7 +140474,7 @@ const WysiwygEditor = (0, react.forwardRef)(({ id, content, className, placehold
140469
140474
  (0, react.useImperativeHandle)(ref, () => ({ resetContent(newContent) {
140470
140475
  editor?.commands?.setContent(newContent);
140471
140476
  } }), [editor]);
140472
- if (typeof window === "undefined" || typeof document === "undefined") return null;
140477
+ if (isSSR()) return null;
140473
140478
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
140474
140479
  "data-testid": `${id}-container`,
140475
140480
  className: cn("rounded-md border border-gray-200", className, error$1 && "border-red-600"),