@youngonesworks/ui 0.1.45 → 0.1.47

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
@@ -115695,6 +115695,7 @@ const Select = forwardRef(({ options: options$1, placeholder, defaultValue, labe
115695
115695
  const DropdownIndicator$1 = (props$1) => /* @__PURE__ */ jsx(components.DropdownIndicator, {
115696
115696
  ...props$1,
115697
115697
  children: props$1.hasValue && isClearable ? /* @__PURE__ */ jsx(IconX, {
115698
+ "data-testid": "icon-x",
115698
115699
  className: "cursor-pointer",
115699
115700
  size: 16,
115700
115701
  color: "black",
@@ -137632,8 +137633,8 @@ function useEditorState(options$1) {
137632
137633
  return selectedState;
137633
137634
  }
137634
137635
  const isDev = "development" !== "production";
137635
- const isSSR = typeof window === "undefined";
137636
- const isNext = isSSR || Boolean(typeof window !== "undefined" && window.next);
137636
+ const isSSR$1 = typeof window === "undefined";
137637
+ const isNext = isSSR$1 || Boolean(typeof window !== "undefined" && window.next);
137637
137638
  /**
137638
137639
  * This class handles the creation, destruction, and re-creation of the editor instance.
137639
137640
  */
@@ -137679,7 +137680,7 @@ var EditorInstanceManager = class EditorInstanceManager {
137679
137680
  }
137680
137681
  getInitialEditor() {
137681
137682
  if (this.options.current.immediatelyRender === undefined) {
137682
- if (isSSR || isNext) {
137683
+ if (isSSR$1 || isNext) {
137683
137684
  if (isDev) {
137684
137685
  /**
137685
137686
  * Throw an error in development, to make sure the developer is aware that tiptap cannot be SSR'd
@@ -137691,7 +137692,7 @@ var EditorInstanceManager = class EditorInstanceManager {
137691
137692
  }
137692
137693
  return this.createEditor();
137693
137694
  }
137694
- if (this.options.current.immediatelyRender && isSSR && isDev) {
137695
+ if (this.options.current.immediatelyRender && isSSR$1 && isDev) {
137695
137696
  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.");
137696
137697
  }
137697
137698
  if (this.options.current.immediatelyRender) {
@@ -140419,6 +140420,10 @@ const StarterKit = Extension.create({
140419
140420
  }
140420
140421
  });
140421
140422
 
140423
+ //#endregion
140424
+ //#region src/utils/ssr.ts
140425
+ const isSSR = () => typeof window === "undefined" || typeof document === "undefined";
140426
+
140422
140427
  //#endregion
140423
140428
  //#region src/components/wysiwygEditor/index.tsx
140424
140429
  const BoldIcon = () => /* @__PURE__ */ jsx(IconBold, {
@@ -140471,7 +140476,7 @@ const WysiwygEditor = forwardRef(({ id, content, className, placeholder, onChang
140471
140476
  useImperativeHandle(ref, () => ({ resetContent(newContent) {
140472
140477
  editor?.commands?.setContent(newContent);
140473
140478
  } }), [editor]);
140474
- if (typeof window === "undefined" || typeof document === "undefined") return null;
140479
+ if (isSSR()) return null;
140475
140480
  return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
140476
140481
  "data-testid": `${id}-container`,
140477
140482
  className: cn("rounded-md border border-gray-200", className, error$1 && "border-red-600"),