remoraid 2.28.2 → 2.31.3

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.
@@ -5525,6 +5525,7 @@ __export(exports_core, {
5525
5525
  Controls: () => Controls,
5526
5526
  ControlButton: () => ControlButton,
5527
5527
  ContextClusterProvider: () => ContextClusterProvider,
5528
+ ClickTransformation: () => ClickTransformation,
5528
5529
  BadgeMinimal: () => BadgeMinimal,
5529
5530
  BadgeGroup: () => BadgeGroup,
5530
5531
  AppShell: () => AppShell_default,
@@ -5745,6 +5746,16 @@ var FrameLayoutSection;
5745
5746
  FrameLayoutSection2["Right"] = "right";
5746
5747
  FrameLayoutSection2["Content"] = "content";
5747
5748
  })(FrameLayoutSection ||= {});
5749
+ var ClickTransformation;
5750
+ ((ClickTransformation2) => {
5751
+ ClickTransformation2["Default"] = "default";
5752
+ ClickTransformation2["None"] = "none";
5753
+ ClickTransformation2["TiltDown"] = "tiltDown";
5754
+ ClickTransformation2["TiltUp"] = "tiltUp";
5755
+ ClickTransformation2["TiltRight"] = "tiltRight";
5756
+ ClickTransformation2["TiltLeft"] = "tiltLeft";
5757
+ ClickTransformation2["Scale"] = "scale";
5758
+ })(ClickTransformation ||= {});
5748
5759
 
5749
5760
  // src/core/lib/utils.ts
5750
5761
  var import_react2 = require("react");
@@ -7315,6 +7326,7 @@ function RemoraidButton({
7315
7326
  mounted = true,
7316
7327
  icon: iconProp,
7317
7328
  iconSize: iconSizeProp,
7329
+ clickTransformation = "default" /* Default */,
7318
7330
  componentsProps
7319
7331
  }) {
7320
7332
  const responsive = ResponsiveProp ?? true;
@@ -7326,6 +7338,16 @@ function RemoraidButton({
7326
7338
  const iconElement = /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Icon4, {
7327
7339
  ...import_lodash11.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
7328
7340
  }, undefined, false, undefined, this);
7341
+ const clickTransformationClassNames = {
7342
+ ["default" /* Default */]: null,
7343
+ ["none" /* None */]: "remoraid-button-none",
7344
+ ["scale" /* Scale */]: "remoraid-button-scale",
7345
+ ["tiltDown" /* TiltDown */]: "remoraid-button-tilt-down",
7346
+ ["tiltUp" /* TiltUp */]: "remoraid-button-tilt-up",
7347
+ ["tiltLeft" /* TiltLeft */]: "remoraid-button-tilt-left",
7348
+ ["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
7349
+ };
7350
+ const clickTransformationClass = clickTransformationClassNames[clickTransformation];
7329
7351
  return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(import_core18.Transition, {
7330
7352
  mounted,
7331
7353
  transition: "fade",
@@ -7348,10 +7370,8 @@ function RemoraidButton({
7348
7370
  ...componentsProps?.ActionIcon,
7349
7371
  hiddenFrom: !responsive ? undefined : breakpoint,
7350
7372
  display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
7351
- style: {
7352
- ...transitionStyle,
7353
- ...componentsProps?.ActionIcon?.style ?? componentsProps?.button?.style
7354
- },
7373
+ style: import_lodash11.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
7374
+ className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
7355
7375
  children: iconElement
7356
7376
  }, undefined, false, undefined, this)
7357
7377
  }, undefined, false, undefined, this),
@@ -7366,10 +7386,8 @@ function RemoraidButton({
7366
7386
  ...componentsProps?.Button,
7367
7387
  visibleFrom: !responsive ? undefined : breakpoint,
7368
7388
  display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
7369
- style: {
7370
- ...transitionStyle,
7371
- ...componentsProps?.Button?.style ?? componentsProps?.button?.style
7372
- },
7389
+ style: import_lodash11.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
7390
+ className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
7373
7391
  children: label
7374
7392
  }, undefined, false, undefined, this)
7375
7393
  ]
@@ -7412,7 +7430,11 @@ function WidgetWrapper({
7412
7430
  const handleEnter = () => {
7413
7431
  updateActiveWidget(config.widgetId);
7414
7432
  };
7415
- const handleLeave = () => {
7433
+ const handleLeave = (e) => {
7434
+ const to = e.relatedTarget;
7435
+ if (to && to.closest?.("[data-control-button]")) {
7436
+ return;
7437
+ }
7416
7438
  updateActiveWidget(null);
7417
7439
  };
7418
7440
  const mounted = Boolean(widget?.selected);
@@ -7440,15 +7462,11 @@ function WidgetWrapper({
7440
7462
  display: "flex",
7441
7463
  ...componentsProps?.container,
7442
7464
  onMouseEnter: (e) => {
7443
- if (!pinnableSection) {
7444
- handleEnter();
7445
- }
7465
+ handleEnter();
7446
7466
  componentsProps?.container?.onMouseEnter?.(e);
7447
7467
  },
7448
7468
  onMouseLeave: (e) => {
7449
- if (!pinnableSection) {
7450
- handleLeave();
7451
- }
7469
+ handleLeave(e);
7452
7470
  componentsProps?.container?.onMouseLeave?.(e);
7453
7471
  },
7454
7472
  style: import_lodash12.merge(transitionStyle, { flexDirection: "column" }, componentsProps?.container?.style),
@@ -7479,7 +7497,7 @@ function WidgetWrapper({
7479
7497
  return;
7480
7498
  }
7481
7499
  updateWidgetSelection(page.pageId, config.widgetId, false);
7482
- handleLeave();
7500
+ handleLeave(e);
7483
7501
  componentsProps?.closeButton?.onClick?.(e);
7484
7502
  }
7485
7503
  }, undefined, false, undefined, this)
@@ -7496,21 +7514,10 @@ function WidgetWrapper({
7496
7514
  ...componentsProps?.Pinnable,
7497
7515
  componentsProps: {
7498
7516
  ...componentsProps?.Pinnable?.componentsProps,
7499
- container: {
7500
- ...componentsProps?.Pinnable?.componentsProps?.container,
7501
- onMouseEnter: (e) => {
7502
- handleEnter();
7503
- componentsProps?.Pinnable?.componentsProps?.container?.onMouseEnter?.(e);
7504
- },
7505
- onMouseLeave: (e) => {
7506
- handleLeave();
7507
- componentsProps?.Pinnable?.componentsProps?.container?.onMouseLeave?.(e);
7508
- }
7509
- },
7510
7517
  button: {
7511
7518
  ...componentsProps?.Pinnable?.componentsProps?.button,
7512
7519
  onClick: (e) => {
7513
- handleLeave();
7520
+ handleLeave(e);
7514
7521
  componentsProps?.Pinnable?.componentsProps?.button?.onClick?.(e);
7515
7522
  }
7516
7523
  },
@@ -7985,7 +7992,9 @@ function InputWrapperScrollArea({
7985
7992
  children,
7986
7993
  label,
7987
7994
  mah,
7995
+ description,
7988
7996
  error,
7997
+ required = false,
7989
7998
  componentsProps
7990
7999
  }) {
7991
8000
  const theme = useRemoraidTheme();
@@ -7995,10 +8004,13 @@ function InputWrapperScrollArea({
7995
8004
  error,
7996
8005
  onMouseEnter: () => setIsHovering(true),
7997
8006
  onMouseLeave: () => setIsHovering(false),
8007
+ description,
8008
+ withAsterisk: required,
7998
8009
  ...componentsProps?.container,
7999
8010
  children: /* @__PURE__ */ jsx_dev_runtime35.jsxDEV(import_core25.Paper, {
8000
8011
  shadow: "none",
8001
8012
  p: 0,
8013
+ mt: Boolean(description) ? 4 : 0,
8002
8014
  withBorder: true,
8003
8015
  display: "flex",
8004
8016
  bg: theme.transparentBackground,
@@ -174,6 +174,15 @@ interface ContextCluster<
174
174
  createContext: (id: string, defaultValue?: Context) => React2.Context<Context>;
175
175
  useContext: <ID extends string>(id: ID) => ID extends StaticID ? Context : Context | null;
176
176
  }
177
+ declare enum ClickTransformation {
178
+ Default = "default",
179
+ None = "none",
180
+ TiltDown = "tiltDown",
181
+ TiltUp = "tiltUp",
182
+ TiltRight = "tiltRight",
183
+ TiltLeft = "tiltLeft",
184
+ Scale = "scale"
185
+ }
177
186
  declare const getDefaultWidgetContext: (configuration: WidgetConfiguration) => WidgetContext;
178
187
  declare const useWidgets: () => WidgetsContext;
179
188
  declare const useWidget: (pageId: string, widgetId: string) => WidgetContext | null;
@@ -545,6 +554,7 @@ interface ExplicitRemoraidButtonProps<Responsive extends boolean> {
545
554
  loading?: boolean;
546
555
  variant?: Extract<ButtonVariant, ActionIconVariant>;
547
556
  mounted?: TransitionProps6["mounted"];
557
+ clickTransformation?: ClickTransformation;
548
558
  componentsProps?: {
549
559
  tooltip?: Partial<TooltipProps3>
550
560
  icon?: Partial<IconProps6>
@@ -555,7 +565,7 @@ interface ExplicitRemoraidButtonProps<Responsive extends boolean> {
555
565
  };
556
566
  }
557
567
  type RemoraidButtonProps<Responsive extends boolean = RemoraidButtonDefaultResponsivity> = OptionalIfExtends<ExplicitRemoraidButtonProps<Responsive>, "responsive", true, Responsive>;
558
- declare function RemoraidButton<Responsive extends boolean = RemoraidButtonDefaultResponsivity>({ label, responsive: ResponsiveProp, breakpoint: breakpointProp, collapsed: collapsedProp, size, color, onClick, loading, variant, mounted, icon: iconProp, iconSize: iconSizeProp, componentsProps }: RemoraidButtonProps<Responsive>): ReactNode24;
568
+ declare function RemoraidButton<Responsive extends boolean = RemoraidButtonDefaultResponsivity>({ label, responsive: ResponsiveProp, breakpoint: breakpointProp, collapsed: collapsedProp, size, color, onClick, loading, variant, mounted, icon: iconProp, iconSize: iconSizeProp, clickTransformation, componentsProps }: RemoraidButtonProps<Responsive>): ReactNode24;
559
569
  import { MantineSize as MantineSize9, Paper, TransitionProps as TransitionProps7 } from "@mantine/core";
560
570
  import { ComponentProps as ComponentProps6, PropsWithChildren as PropsWithChildren16, ReactNode as ReactNode25 } from "react";
561
571
  interface WidgetWrapperProps {
@@ -714,12 +724,14 @@ import { PropsWithChildren as PropsWithChildren24, ReactNode as ReactNode36 } fr
714
724
  interface InputWrapperScrollAreaProps {
715
725
  label?: string;
716
726
  mah?: number;
727
+ description?: string;
717
728
  error?: ReactNode36;
729
+ required?: boolean;
718
730
  componentsProps?: {
719
731
  container?: Partial<InputWrapperProps>
720
732
  ScrollArea?: Partial<ScrollAreaProps3>
721
733
  childrenContainer?: Partial<BoxProps3>
722
734
  };
723
735
  }
724
- declare function InputWrapperScrollArea({ children, label, mah, error, componentsProps }: PropsWithChildren24<InputWrapperScrollAreaProps>): ReactNode36;
725
- export { useWidgets, useWidget, useSettingsWidgetContext as useSettingsWidgetOptions, useSettingsTableOptions, useRemoraidUserExperience, useRemoraidTheme, useRemoraidApp, usePage, useLayouts, useHydrationStatus, useHydratedMantineColorScheme, useFrameLayout, scrollToWidget, remoraidAppShellLayoutId, isValidElementOfType, getElementTypeName, getDefaultWidgetContext, getDefaultButtonIconSize, getCssVars, defaultUserExperienceCookieName, defaultUserExperience, defaultTransitionDurations, defaultSettingsWidgetContext as defaultSettingsWidgetOptions, defaultSettingsTableOptions, defaultNavbarSettingsWidgetId, defaultLayoutsContext, defaultAppShellNavbarPositions, defaultAppShellFooterPositions, defaultAppContext, createUserExperienceContext, createRemoraidTheme, createContextCluster, co, asElementOrPropsOfType, asElementOfType, asChildrenOfType, WidgetsProviderProps, WidgetsContext, WidgetWrapperProps, WidgetWrapper, WidgetSelectionHeaderProps, WidgetSelectionHeader, WidgetProps, WidgetContext, WidgetConfiguration, Widget, UserExperienceProviderWrapperProps, UserExperienceProviderWrapper, UserExperienceProviderProps, UserExperienceContext, UserExperience, TransitionDuration, ThemeProviderProps, StaticRemoraidAppContext, SettingsWidgetSaveButtonProps, SettingsWidgetProps, SettingsWidgetContext, _default3 as SettingsWidget, SettingsTableRowProps, SettingsTableOptions, _default4 as SettingsTable, ScrollableChipGroupProps, ScrollableChipGroup2 as ScrollableChipGroup, RemoraidUser, RemoraidThemeDependencies, RemoraidThemeCallback, RemoraidTheme, RemoraidProviderProps, RemoraidProvider, RemoraidIconSize, RemoraidButtonProps, RemoraidButtonDefaultResponsivity, RemoraidButton, RemoraidBreakpoint, RemoraidAuthContext, RemoraidAppContext, PropsWithChildrenOfType, PrimitiveUserExperience, PinnableProps, PinnableDefaultLayoutType, Pinnable2 as Pinnable, PageProps, PageContainerProps, PageContainer2 as PageContainer, PageConfiguration, Page, OptionalIfExtends, Optional, NotFoundPageProps, NotFoundPage, NavbarVariant, NavbarSettingsWidgetProps, NavbarSettingsWidget, NavbarMinimalProps, LayoutsProviderProps, LayoutsContext, LayoutType, LayoutSection, LayoutContext, InputWrapperScrollAreaProps, InputWrapperScrollArea, HydrationStatusProviderProps, HydrationStatusProvider, HydrationStatus, FrameLayoutSection, FrameLayoutProps, FrameLayoutElementProps, _default as FrameLayout, FooterVariant, FooterMinimalProps, EnvironmentShellVariant, EnvironmentShellProps, EnvironmentShell, ElementOrPropsOfType, ElementOfType, DefaultNavbarVariant, DefaultFooterVariant, CustomAppVariables, CoreUserExperience, ControlsProps, Controls, ControlButtonProps, ControlButton, ContextClusterProviderProps, ContextClusterProvider, ContextCluster, Common, ChildrenOfType, BadgeMinimalProps, BadgeMinimal, BadgeGroupProps, BadgeGroup, AppShellProps, AppShellNavbarVariant, AppShellNavbarPosition, AppShellFooterVariant, AppShellFooterPosition, _default2 as AppShell, AppProviderProps, AppProvider2 as AppProvider, AppLogo, AppContextProps, AlertMinimalProps, AlertMinimal, AlertCategory };
736
+ declare function InputWrapperScrollArea({ children, label, mah, description, error, required, componentsProps }: PropsWithChildren24<InputWrapperScrollAreaProps>): ReactNode36;
737
+ export { useWidgets, useWidget, useSettingsWidgetContext as useSettingsWidgetOptions, useSettingsTableOptions, useRemoraidUserExperience, useRemoraidTheme, useRemoraidApp, usePage, useLayouts, useHydrationStatus, useHydratedMantineColorScheme, useFrameLayout, scrollToWidget, remoraidAppShellLayoutId, isValidElementOfType, getElementTypeName, getDefaultWidgetContext, getDefaultButtonIconSize, getCssVars, defaultUserExperienceCookieName, defaultUserExperience, defaultTransitionDurations, defaultSettingsWidgetContext as defaultSettingsWidgetOptions, defaultSettingsTableOptions, defaultNavbarSettingsWidgetId, defaultLayoutsContext, defaultAppShellNavbarPositions, defaultAppShellFooterPositions, defaultAppContext, createUserExperienceContext, createRemoraidTheme, createContextCluster, co, asElementOrPropsOfType, asElementOfType, asChildrenOfType, WidgetsProviderProps, WidgetsContext, WidgetWrapperProps, WidgetWrapper, WidgetSelectionHeaderProps, WidgetSelectionHeader, WidgetProps, WidgetContext, WidgetConfiguration, Widget, UserExperienceProviderWrapperProps, UserExperienceProviderWrapper, UserExperienceProviderProps, UserExperienceContext, UserExperience, TransitionDuration, ThemeProviderProps, StaticRemoraidAppContext, SettingsWidgetSaveButtonProps, SettingsWidgetProps, SettingsWidgetContext, _default3 as SettingsWidget, SettingsTableRowProps, SettingsTableOptions, _default4 as SettingsTable, ScrollableChipGroupProps, ScrollableChipGroup2 as ScrollableChipGroup, RemoraidUser, RemoraidThemeDependencies, RemoraidThemeCallback, RemoraidTheme, RemoraidProviderProps, RemoraidProvider, RemoraidIconSize, RemoraidButtonProps, RemoraidButtonDefaultResponsivity, RemoraidButton, RemoraidBreakpoint, RemoraidAuthContext, RemoraidAppContext, PropsWithChildrenOfType, PrimitiveUserExperience, PinnableProps, PinnableDefaultLayoutType, Pinnable2 as Pinnable, PageProps, PageContainerProps, PageContainer2 as PageContainer, PageConfiguration, Page, OptionalIfExtends, Optional, NotFoundPageProps, NotFoundPage, NavbarVariant, NavbarSettingsWidgetProps, NavbarSettingsWidget, NavbarMinimalProps, LayoutsProviderProps, LayoutsContext, LayoutType, LayoutSection, LayoutContext, InputWrapperScrollAreaProps, InputWrapperScrollArea, HydrationStatusProviderProps, HydrationStatusProvider, HydrationStatus, FrameLayoutSection, FrameLayoutProps, FrameLayoutElementProps, _default as FrameLayout, FooterVariant, FooterMinimalProps, EnvironmentShellVariant, EnvironmentShellProps, EnvironmentShell, ElementOrPropsOfType, ElementOfType, DefaultNavbarVariant, DefaultFooterVariant, CustomAppVariables, CoreUserExperience, ControlsProps, Controls, ControlButtonProps, ControlButton, ContextClusterProviderProps, ContextClusterProvider, ContextCluster, Common, ClickTransformation, ChildrenOfType, BadgeMinimalProps, BadgeMinimal, BadgeGroupProps, BadgeGroup, AppShellProps, AppShellNavbarVariant, AppShellNavbarPosition, AppShellFooterVariant, AppShellFooterPosition, _default2 as AppShell, AppProviderProps, AppProvider2 as AppProvider, AppLogo, AppContextProps, AlertMinimalProps, AlertMinimal, AlertCategory };
@@ -5647,6 +5647,16 @@ var FrameLayoutSection;
5647
5647
  FrameLayoutSection2["Right"] = "right";
5648
5648
  FrameLayoutSection2["Content"] = "content";
5649
5649
  })(FrameLayoutSection ||= {});
5650
+ var ClickTransformation;
5651
+ ((ClickTransformation2) => {
5652
+ ClickTransformation2["Default"] = "default";
5653
+ ClickTransformation2["None"] = "none";
5654
+ ClickTransformation2["TiltDown"] = "tiltDown";
5655
+ ClickTransformation2["TiltUp"] = "tiltUp";
5656
+ ClickTransformation2["TiltRight"] = "tiltRight";
5657
+ ClickTransformation2["TiltLeft"] = "tiltLeft";
5658
+ ClickTransformation2["Scale"] = "scale";
5659
+ })(ClickTransformation ||= {});
5650
5660
 
5651
5661
  // src/core/lib/utils.ts
5652
5662
  import {
@@ -7307,6 +7317,7 @@ function RemoraidButton({
7307
7317
  mounted = true,
7308
7318
  icon: iconProp,
7309
7319
  iconSize: iconSizeProp,
7320
+ clickTransformation = "default" /* Default */,
7310
7321
  componentsProps
7311
7322
  }) {
7312
7323
  const responsive = ResponsiveProp ?? true;
@@ -7318,6 +7329,16 @@ function RemoraidButton({
7318
7329
  const iconElement = /* @__PURE__ */ jsxDEV24(Icon4, {
7319
7330
  ...import_lodash11.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
7320
7331
  }, undefined, false, undefined, this);
7332
+ const clickTransformationClassNames = {
7333
+ ["default" /* Default */]: null,
7334
+ ["none" /* None */]: "remoraid-button-none",
7335
+ ["scale" /* Scale */]: "remoraid-button-scale",
7336
+ ["tiltDown" /* TiltDown */]: "remoraid-button-tilt-down",
7337
+ ["tiltUp" /* TiltUp */]: "remoraid-button-tilt-up",
7338
+ ["tiltLeft" /* TiltLeft */]: "remoraid-button-tilt-left",
7339
+ ["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
7340
+ };
7341
+ const clickTransformationClass = clickTransformationClassNames[clickTransformation];
7321
7342
  return /* @__PURE__ */ jsxDEV24(Transition6, {
7322
7343
  mounted,
7323
7344
  transition: "fade",
@@ -7340,10 +7361,8 @@ function RemoraidButton({
7340
7361
  ...componentsProps?.ActionIcon,
7341
7362
  hiddenFrom: !responsive ? undefined : breakpoint,
7342
7363
  display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
7343
- style: {
7344
- ...transitionStyle,
7345
- ...componentsProps?.ActionIcon?.style ?? componentsProps?.button?.style
7346
- },
7364
+ style: import_lodash11.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
7365
+ className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
7347
7366
  children: iconElement
7348
7367
  }, undefined, false, undefined, this)
7349
7368
  }, undefined, false, undefined, this),
@@ -7358,10 +7377,8 @@ function RemoraidButton({
7358
7377
  ...componentsProps?.Button,
7359
7378
  visibleFrom: !responsive ? undefined : breakpoint,
7360
7379
  display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
7361
- style: {
7362
- ...transitionStyle,
7363
- ...componentsProps?.Button?.style ?? componentsProps?.button?.style
7364
- },
7380
+ style: import_lodash11.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
7381
+ className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
7365
7382
  children: label
7366
7383
  }, undefined, false, undefined, this)
7367
7384
  ]
@@ -7409,7 +7426,11 @@ function WidgetWrapper({
7409
7426
  const handleEnter = () => {
7410
7427
  updateActiveWidget(config.widgetId);
7411
7428
  };
7412
- const handleLeave = () => {
7429
+ const handleLeave = (e) => {
7430
+ const to = e.relatedTarget;
7431
+ if (to && to.closest?.("[data-control-button]")) {
7432
+ return;
7433
+ }
7413
7434
  updateActiveWidget(null);
7414
7435
  };
7415
7436
  const mounted = Boolean(widget?.selected);
@@ -7437,15 +7458,11 @@ function WidgetWrapper({
7437
7458
  display: "flex",
7438
7459
  ...componentsProps?.container,
7439
7460
  onMouseEnter: (e) => {
7440
- if (!pinnableSection) {
7441
- handleEnter();
7442
- }
7461
+ handleEnter();
7443
7462
  componentsProps?.container?.onMouseEnter?.(e);
7444
7463
  },
7445
7464
  onMouseLeave: (e) => {
7446
- if (!pinnableSection) {
7447
- handleLeave();
7448
- }
7465
+ handleLeave(e);
7449
7466
  componentsProps?.container?.onMouseLeave?.(e);
7450
7467
  },
7451
7468
  style: import_lodash12.merge(transitionStyle, { flexDirection: "column" }, componentsProps?.container?.style),
@@ -7476,7 +7493,7 @@ function WidgetWrapper({
7476
7493
  return;
7477
7494
  }
7478
7495
  updateWidgetSelection(page.pageId, config.widgetId, false);
7479
- handleLeave();
7496
+ handleLeave(e);
7480
7497
  componentsProps?.closeButton?.onClick?.(e);
7481
7498
  }
7482
7499
  }, undefined, false, undefined, this)
@@ -7493,21 +7510,10 @@ function WidgetWrapper({
7493
7510
  ...componentsProps?.Pinnable,
7494
7511
  componentsProps: {
7495
7512
  ...componentsProps?.Pinnable?.componentsProps,
7496
- container: {
7497
- ...componentsProps?.Pinnable?.componentsProps?.container,
7498
- onMouseEnter: (e) => {
7499
- handleEnter();
7500
- componentsProps?.Pinnable?.componentsProps?.container?.onMouseEnter?.(e);
7501
- },
7502
- onMouseLeave: (e) => {
7503
- handleLeave();
7504
- componentsProps?.Pinnable?.componentsProps?.container?.onMouseLeave?.(e);
7505
- }
7506
- },
7507
7513
  button: {
7508
7514
  ...componentsProps?.Pinnable?.componentsProps?.button,
7509
7515
  onClick: (e) => {
7510
- handleLeave();
7516
+ handleLeave(e);
7511
7517
  componentsProps?.Pinnable?.componentsProps?.button?.onClick?.(e);
7512
7518
  }
7513
7519
  },
@@ -7996,7 +8002,9 @@ function InputWrapperScrollArea({
7996
8002
  children,
7997
8003
  label,
7998
8004
  mah,
8005
+ description,
7999
8006
  error,
8007
+ required = false,
8000
8008
  componentsProps
8001
8009
  }) {
8002
8010
  const theme = useRemoraidTheme();
@@ -8006,10 +8014,13 @@ function InputWrapperScrollArea({
8006
8014
  error,
8007
8015
  onMouseEnter: () => setIsHovering(true),
8008
8016
  onMouseLeave: () => setIsHovering(false),
8017
+ description,
8018
+ withAsterisk: required,
8009
8019
  ...componentsProps?.container,
8010
8020
  children: /* @__PURE__ */ jsxDEV35(Paper4, {
8011
8021
  shadow: "none",
8012
8022
  p: 0,
8023
+ mt: Boolean(description) ? 4 : 0,
8013
8024
  withBorder: true,
8014
8025
  display: "flex",
8015
8026
  bg: theme.transparentBackground,
@@ -8096,6 +8107,7 @@ export {
8096
8107
  Controls,
8097
8108
  ControlButton,
8098
8109
  ContextClusterProvider,
8110
+ ClickTransformation,
8099
8111
  BadgeMinimal,
8100
8112
  BadgeGroup,
8101
8113
  AppShell_default as AppShell,
@@ -98,3 +98,33 @@
98
98
  display: none;
99
99
  }
100
100
  }
101
+ .remoraid-button-scale {
102
+ &:active {
103
+ transform: scale(0.98);
104
+ }
105
+ }
106
+ .remoraid-button-tilt-left {
107
+ &:active {
108
+ transform: translateX(-1px);
109
+ }
110
+ }
111
+ .remoraid-button-tilt-right {
112
+ &:active {
113
+ transform: translateX(1px);
114
+ }
115
+ }
116
+ .remoraid-button-tilt-down {
117
+ &:active {
118
+ transform: translateY(1px);
119
+ }
120
+ }
121
+ .remoraid-button-tilt-up {
122
+ &:active {
123
+ transform: translateY(-1px);
124
+ }
125
+ }
126
+ .remoraid-button-none {
127
+ &:active {
128
+ transform: none !important;
129
+ }
130
+ }
@@ -6669,6 +6669,7 @@ function RemoraidButton({
6669
6669
  mounted = true,
6670
6670
  icon: iconProp,
6671
6671
  iconSize: iconSizeProp,
6672
+ clickTransformation = "default" /* Default */,
6672
6673
  componentsProps
6673
6674
  }) {
6674
6675
  const responsive = ResponsiveProp ?? true;
@@ -6680,6 +6681,16 @@ function RemoraidButton({
6680
6681
  const iconElement = /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Icon4, {
6681
6682
  ...import_lodash11.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
6682
6683
  }, undefined, false, undefined, this);
6684
+ const clickTransformationClassNames = {
6685
+ ["default" /* Default */]: null,
6686
+ ["none" /* None */]: "remoraid-button-none",
6687
+ ["scale" /* Scale */]: "remoraid-button-scale",
6688
+ ["tiltDown" /* TiltDown */]: "remoraid-button-tilt-down",
6689
+ ["tiltUp" /* TiltUp */]: "remoraid-button-tilt-up",
6690
+ ["tiltLeft" /* TiltLeft */]: "remoraid-button-tilt-left",
6691
+ ["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
6692
+ };
6693
+ const clickTransformationClass = clickTransformationClassNames[clickTransformation];
6683
6694
  return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(import_core18.Transition, {
6684
6695
  mounted,
6685
6696
  transition: "fade",
@@ -6702,10 +6713,8 @@ function RemoraidButton({
6702
6713
  ...componentsProps?.ActionIcon,
6703
6714
  hiddenFrom: !responsive ? undefined : breakpoint,
6704
6715
  display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
6705
- style: {
6706
- ...transitionStyle,
6707
- ...componentsProps?.ActionIcon?.style ?? componentsProps?.button?.style
6708
- },
6716
+ style: import_lodash11.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
6717
+ className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
6709
6718
  children: iconElement
6710
6719
  }, undefined, false, undefined, this)
6711
6720
  }, undefined, false, undefined, this),
@@ -6720,10 +6729,8 @@ function RemoraidButton({
6720
6729
  ...componentsProps?.Button,
6721
6730
  visibleFrom: !responsive ? undefined : breakpoint,
6722
6731
  display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
6723
- style: {
6724
- ...transitionStyle,
6725
- ...componentsProps?.Button?.style ?? componentsProps?.button?.style
6726
- },
6732
+ style: import_lodash11.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
6733
+ className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
6727
6734
  children: label
6728
6735
  }, undefined, false, undefined, this)
6729
6736
  ]
@@ -6766,7 +6773,11 @@ function WidgetWrapper({
6766
6773
  const handleEnter = () => {
6767
6774
  updateActiveWidget(config.widgetId);
6768
6775
  };
6769
- const handleLeave = () => {
6776
+ const handleLeave = (e) => {
6777
+ const to = e.relatedTarget;
6778
+ if (to && to.closest?.("[data-control-button]")) {
6779
+ return;
6780
+ }
6770
6781
  updateActiveWidget(null);
6771
6782
  };
6772
6783
  const mounted = Boolean(widget?.selected);
@@ -6794,15 +6805,11 @@ function WidgetWrapper({
6794
6805
  display: "flex",
6795
6806
  ...componentsProps?.container,
6796
6807
  onMouseEnter: (e) => {
6797
- if (!pinnableSection) {
6798
- handleEnter();
6799
- }
6808
+ handleEnter();
6800
6809
  componentsProps?.container?.onMouseEnter?.(e);
6801
6810
  },
6802
6811
  onMouseLeave: (e) => {
6803
- if (!pinnableSection) {
6804
- handleLeave();
6805
- }
6812
+ handleLeave(e);
6806
6813
  componentsProps?.container?.onMouseLeave?.(e);
6807
6814
  },
6808
6815
  style: import_lodash12.merge(transitionStyle, { flexDirection: "column" }, componentsProps?.container?.style),
@@ -6833,7 +6840,7 @@ function WidgetWrapper({
6833
6840
  return;
6834
6841
  }
6835
6842
  updateWidgetSelection(page.pageId, config.widgetId, false);
6836
- handleLeave();
6843
+ handleLeave(e);
6837
6844
  componentsProps?.closeButton?.onClick?.(e);
6838
6845
  }
6839
6846
  }, undefined, false, undefined, this)
@@ -6850,21 +6857,10 @@ function WidgetWrapper({
6850
6857
  ...componentsProps?.Pinnable,
6851
6858
  componentsProps: {
6852
6859
  ...componentsProps?.Pinnable?.componentsProps,
6853
- container: {
6854
- ...componentsProps?.Pinnable?.componentsProps?.container,
6855
- onMouseEnter: (e) => {
6856
- handleEnter();
6857
- componentsProps?.Pinnable?.componentsProps?.container?.onMouseEnter?.(e);
6858
- },
6859
- onMouseLeave: (e) => {
6860
- handleLeave();
6861
- componentsProps?.Pinnable?.componentsProps?.container?.onMouseLeave?.(e);
6862
- }
6863
- },
6864
6860
  button: {
6865
6861
  ...componentsProps?.Pinnable?.componentsProps?.button,
6866
6862
  onClick: (e) => {
6867
- handleLeave();
6863
+ handleLeave(e);
6868
6864
  componentsProps?.Pinnable?.componentsProps?.button?.onClick?.(e);
6869
6865
  }
6870
6866
  },
@@ -7168,6 +7164,49 @@ var import_core25 = require("@mantine/core");
7168
7164
  var import_react21 = require("react");
7169
7165
  var import_core26 = require("remoraid/core");
7170
7166
  var jsx_dev_runtime36 = require("react/jsx-dev-runtime");
7167
+ function InputWrapperScrollArea({
7168
+ children,
7169
+ label,
7170
+ mah,
7171
+ description,
7172
+ error,
7173
+ required = false,
7174
+ componentsProps
7175
+ }) {
7176
+ const theme = import_core26.useRemoraidTheme();
7177
+ const [isHovering, setIsHovering] = import_react21.useState(false);
7178
+ return /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(import_core25.Input.Wrapper, {
7179
+ label,
7180
+ error,
7181
+ onMouseEnter: () => setIsHovering(true),
7182
+ onMouseLeave: () => setIsHovering(false),
7183
+ description,
7184
+ withAsterisk: required,
7185
+ ...componentsProps?.container,
7186
+ children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(import_core25.Paper, {
7187
+ shadow: "none",
7188
+ p: 0,
7189
+ mt: Boolean(description) ? 4 : 0,
7190
+ withBorder: true,
7191
+ display: "flex",
7192
+ bg: theme.transparentBackground,
7193
+ style: {
7194
+ transition: "border-color .1s",
7195
+ borderColor: error ? "var(--mantine-color-error)" : isHovering ? "var(--mantine-primary-color-filled)" : undefined
7196
+ },
7197
+ children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(import_core25.ScrollArea, {
7198
+ mah,
7199
+ px: "md",
7200
+ flex: 1,
7201
+ ...componentsProps?.ScrollArea,
7202
+ children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(import_core25.Box, {
7203
+ ...componentsProps?.childrenContainer,
7204
+ children
7205
+ }, undefined, false, undefined, this)
7206
+ }, undefined, false, undefined, this)
7207
+ }, undefined, false, undefined, this)
7208
+ }, undefined, false, undefined, this);
7209
+ }
7171
7210
  // src/jsonforms/renderers/AnyOfControl.tsx
7172
7211
  var jsx_dev_runtime37 = require("react/jsx-dev-runtime");
7173
7212
  function PlainAnyOfControl(props) {
@@ -7431,24 +7470,34 @@ var NumberControl_default = NumberControl;
7431
7470
  // src/jsonforms/renderers/ObjectControl.tsx
7432
7471
  var import_react26 = require("@jsonforms/react");
7433
7472
  var import_core33 = require("@mantine/core");
7473
+ var import_react27 = require("react");
7434
7474
  var jsx_dev_runtime41 = require("react/jsx-dev-runtime");
7435
- function PlainObjectControl(props) {
7436
- const { label, schema, data, handleChange, path, required } = props;
7475
+ function PlainObjectControl({
7476
+ label: labelProp,
7477
+ schema,
7478
+ data,
7479
+ handleChange,
7480
+ path,
7481
+ required
7482
+ }) {
7437
7483
  const { formOptions } = useFormOptions();
7438
7484
  const { renderers, cells } = import_react26.useJsonForms();
7439
7485
  const theme = useRemoraidTheme();
7440
- const mt = formOptions.withDescriptions && schema.description && schema.description.length > 0 ? 4 : 0;
7486
+ const [input, setInput] = import_react27.useState("");
7487
+ const [error, setError] = import_react27.useState(false);
7488
+ const label = labelProp !== "remoraid-array-item" ? labelProp : null;
7489
+ const description = formOptions.withDescriptions ? schema.description : undefined;
7441
7490
  return /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(jsx_dev_runtime41.Fragment, {
7442
- children: /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(import_core33.Input.Wrapper, {
7443
- label: label !== "remoraid-array-item" ? label : null,
7444
- description: formOptions.withDescriptions ? schema.description : undefined,
7491
+ children: schema.properties && Object.keys(schema.properties).length > 0 ? /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(import_core33.Input.Wrapper, {
7492
+ label,
7493
+ description,
7445
7494
  withAsterisk: required,
7446
- children: schema.properties && Object.keys(schema.properties).length > 0 ? /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(import_core33.Paper, {
7495
+ children: /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(import_core33.Paper, {
7447
7496
  withBorder: true,
7448
7497
  bg: "var(--remoraid-transparent-background)",
7449
7498
  shadow: "0",
7450
7499
  p: formOptions.gutter,
7451
- mt,
7500
+ mt: Boolean(description) ? 4 : 0,
7452
7501
  children: /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(import_react26.JsonForms, {
7453
7502
  schema: {
7454
7503
  ...schema,
@@ -7462,11 +7511,31 @@ function PlainObjectControl(props) {
7462
7511
  },
7463
7512
  validationMode: "NoValidation"
7464
7513
  }, undefined, false, undefined, this)
7465
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(AlertMinimal, {
7466
- category: "negative" /* Negative */,
7467
- title: "No properties specified",
7468
- text: "The JSON schema for this object did not specify any properties.",
7469
- componentsProps: { alert: { mt } }
7514
+ }, undefined, false, undefined, this)
7515
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(InputWrapperScrollArea, {
7516
+ label: label ?? undefined,
7517
+ error: error ? "Invalid JSON" : undefined,
7518
+ description,
7519
+ required,
7520
+ mah: 140,
7521
+ children: /* @__PURE__ */ jsx_dev_runtime41.jsxDEV(import_core33.JsonInput, {
7522
+ onChange: (newValue) => {
7523
+ setInput(newValue);
7524
+ try {
7525
+ const parsedValue = JSON.parse(newValue);
7526
+ handleChange(path, parsedValue);
7527
+ setError(false);
7528
+ } catch {
7529
+ setError(true);
7530
+ return;
7531
+ }
7532
+ },
7533
+ value: input,
7534
+ minRows: 4,
7535
+ autosize: true,
7536
+ formatOnBlur: true,
7537
+ variant: "unstyled",
7538
+ styles: { input: { border: "none" } }
7470
7539
  }, undefined, false, undefined, this)
7471
7540
  }, undefined, false, undefined, this)
7472
7541
  }, undefined, false, undefined, this);
@@ -7475,7 +7544,7 @@ var ObjectControl = import_react26.withJsonFormsControlProps(PlainObjectControl)
7475
7544
  var ObjectControl_default = ObjectControl;
7476
7545
 
7477
7546
  // src/jsonforms/renderers/StringSelectControl.tsx
7478
- var import_react27 = require("@jsonforms/react");
7547
+ var import_react28 = require("@jsonforms/react");
7479
7548
  var import_core35 = require("@mantine/core");
7480
7549
  var jsx_dev_runtime42 = require("react/jsx-dev-runtime");
7481
7550
  function PlainTimestampControl({
@@ -7504,7 +7573,7 @@ function PlainTimestampControl({
7504
7573
  }, undefined, false, undefined, this)
7505
7574
  }, undefined, false, undefined, this);
7506
7575
  }
7507
- var TimestampControl = import_react27.withJsonFormsControlProps(PlainTimestampControl);
7576
+ var TimestampControl = import_react28.withJsonFormsControlProps(PlainTimestampControl);
7508
7577
  var StringSelectControl_default = TimestampControl;
7509
7578
 
7510
7579
  // src/jsonforms/renderers/testers/anyOfTester.ts
@@ -7558,7 +7627,7 @@ var tester9 = import_core44.rankWith(2, import_core44.uiTypeIs("VerticalLayout")
7558
7627
  var verticalLayoutTester_default = tester9;
7559
7628
 
7560
7629
  // src/jsonforms/renderers/TextControl.tsx
7561
- var import_react28 = require("@jsonforms/react");
7630
+ var import_react29 = require("@jsonforms/react");
7562
7631
  var import_core45 = require("@mantine/core");
7563
7632
  var jsx_dev_runtime43 = require("react/jsx-dev-runtime");
7564
7633
  function PlainTextControl({
@@ -7586,11 +7655,11 @@ function PlainTextControl({
7586
7655
  }, undefined, false, undefined, this)
7587
7656
  }, undefined, false, undefined, this);
7588
7657
  }
7589
- var TextControl = import_react28.withJsonFormsControlProps(PlainTextControl);
7658
+ var TextControl = import_react29.withJsonFormsControlProps(PlainTextControl);
7590
7659
  var TextControl_default = TextControl;
7591
7660
 
7592
7661
  // src/jsonforms/renderers/TimestampControl.tsx
7593
- var import_react29 = require("@jsonforms/react");
7662
+ var import_react30 = require("@jsonforms/react");
7594
7663
  var import_dates = require("@mantine/dates");
7595
7664
  var jsx_dev_runtime44 = require("react/jsx-dev-runtime");
7596
7665
  function PlainTimestampControl2({
@@ -7620,13 +7689,13 @@ function PlainTimestampControl2({
7620
7689
  }, undefined, false, undefined, this)
7621
7690
  }, undefined, false, undefined, this);
7622
7691
  }
7623
- var TimestampControl2 = import_react29.withJsonFormsControlProps(PlainTimestampControl2);
7692
+ var TimestampControl2 = import_react30.withJsonFormsControlProps(PlainTimestampControl2);
7624
7693
  var TimestampControl_default = TimestampControl2;
7625
7694
 
7626
7695
  // src/jsonforms/renderers/VerticalLayout.tsx
7627
- var import_react30 = __toESM(require("react"));
7628
- var import_react31 = require("@jsonforms/react");
7696
+ var import_react31 = __toESM(require("react"));
7629
7697
  var import_react32 = require("@jsonforms/react");
7698
+ var import_react33 = require("@jsonforms/react");
7630
7699
  var jsx_dev_runtime45 = require("react/jsx-dev-runtime");
7631
7700
  "use client";
7632
7701
  var JsonFormsLayout = ({
@@ -7641,14 +7710,14 @@ var JsonFormsLayout = ({
7641
7710
  }, undefined, false, undefined, this);
7642
7711
  };
7643
7712
  var renderChildren = (layout, schema, className, path, enabled) => {
7644
- const { renderers, cells } = import_react32.useJsonForms();
7713
+ const { renderers, cells } = import_react33.useJsonForms();
7645
7714
  const { formOptions } = useFormOptions();
7646
7715
  const gutter = typeof formOptions.gutter === "string" ? `var(--mantine-spacing-${formOptions.gutter})` : `${formOptions.gutter}px`;
7647
7716
  return layout.elements.map((child, index) => {
7648
7717
  return /* @__PURE__ */ jsx_dev_runtime45.jsxDEV("div", {
7649
7718
  className,
7650
7719
  style: { marginTop: index === 0 ? 0 : gutter },
7651
- children: /* @__PURE__ */ jsx_dev_runtime45.jsxDEV(import_react32.JsonFormsDispatch, {
7720
+ children: /* @__PURE__ */ jsx_dev_runtime45.jsxDEV(import_react33.JsonFormsDispatch, {
7652
7721
  renderers,
7653
7722
  cells,
7654
7723
  uischema: child,
@@ -7665,7 +7734,7 @@ var VerticalLayoutRenderer = (props) => {
7665
7734
  ...otherProps
7666
7735
  }, undefined, false, undefined, this);
7667
7736
  };
7668
- var VerticalLayoutRendererComponent = import_react30.default.memo(function VerticalLayoutRendererComponent2({
7737
+ var VerticalLayoutRendererComponent = import_react31.default.memo(function VerticalLayoutRendererComponent2({
7669
7738
  schema,
7670
7739
  uischema,
7671
7740
  path,
@@ -7685,7 +7754,7 @@ var VerticalLayoutRendererComponent = import_react30.default.memo(function Verti
7685
7754
  children: renderChildren(verticalLayout, schema, childClassNames, path, enabled)
7686
7755
  }, undefined, false, undefined, this);
7687
7756
  });
7688
- var VerticalLayout = import_react31.withJsonFormsLayoutProps(VerticalLayoutRenderer, false);
7757
+ var VerticalLayout = import_react32.withJsonFormsLayoutProps(VerticalLayoutRenderer, false);
7689
7758
  var VerticalLayout_default = VerticalLayout;
7690
7759
 
7691
7760
  // src/jsonforms/renderers/index.ts
@@ -6732,6 +6732,7 @@ function RemoraidButton({
6732
6732
  mounted = true,
6733
6733
  icon: iconProp,
6734
6734
  iconSize: iconSizeProp,
6735
+ clickTransformation = "default" /* Default */,
6735
6736
  componentsProps
6736
6737
  }) {
6737
6738
  const responsive = ResponsiveProp ?? true;
@@ -6743,6 +6744,16 @@ function RemoraidButton({
6743
6744
  const iconElement = /* @__PURE__ */ jsxDEV25(Icon4, {
6744
6745
  ...import_lodash11.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
6745
6746
  }, undefined, false, undefined, this);
6747
+ const clickTransformationClassNames = {
6748
+ ["default" /* Default */]: null,
6749
+ ["none" /* None */]: "remoraid-button-none",
6750
+ ["scale" /* Scale */]: "remoraid-button-scale",
6751
+ ["tiltDown" /* TiltDown */]: "remoraid-button-tilt-down",
6752
+ ["tiltUp" /* TiltUp */]: "remoraid-button-tilt-up",
6753
+ ["tiltLeft" /* TiltLeft */]: "remoraid-button-tilt-left",
6754
+ ["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
6755
+ };
6756
+ const clickTransformationClass = clickTransformationClassNames[clickTransformation];
6746
6757
  return /* @__PURE__ */ jsxDEV25(Transition6, {
6747
6758
  mounted,
6748
6759
  transition: "fade",
@@ -6765,10 +6776,8 @@ function RemoraidButton({
6765
6776
  ...componentsProps?.ActionIcon,
6766
6777
  hiddenFrom: !responsive ? undefined : breakpoint,
6767
6778
  display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
6768
- style: {
6769
- ...transitionStyle,
6770
- ...componentsProps?.ActionIcon?.style ?? componentsProps?.button?.style
6771
- },
6779
+ style: import_lodash11.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
6780
+ className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
6772
6781
  children: iconElement
6773
6782
  }, undefined, false, undefined, this)
6774
6783
  }, undefined, false, undefined, this),
@@ -6783,10 +6792,8 @@ function RemoraidButton({
6783
6792
  ...componentsProps?.Button,
6784
6793
  visibleFrom: !responsive ? undefined : breakpoint,
6785
6794
  display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
6786
- style: {
6787
- ...transitionStyle,
6788
- ...componentsProps?.Button?.style ?? componentsProps?.button?.style
6789
- },
6795
+ style: import_lodash11.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
6796
+ className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
6790
6797
  children: label
6791
6798
  }, undefined, false, undefined, this)
6792
6799
  ]
@@ -6834,7 +6841,11 @@ function WidgetWrapper({
6834
6841
  const handleEnter = () => {
6835
6842
  updateActiveWidget(config.widgetId);
6836
6843
  };
6837
- const handleLeave = () => {
6844
+ const handleLeave = (e) => {
6845
+ const to = e.relatedTarget;
6846
+ if (to && to.closest?.("[data-control-button]")) {
6847
+ return;
6848
+ }
6838
6849
  updateActiveWidget(null);
6839
6850
  };
6840
6851
  const mounted = Boolean(widget?.selected);
@@ -6862,15 +6873,11 @@ function WidgetWrapper({
6862
6873
  display: "flex",
6863
6874
  ...componentsProps?.container,
6864
6875
  onMouseEnter: (e) => {
6865
- if (!pinnableSection) {
6866
- handleEnter();
6867
- }
6876
+ handleEnter();
6868
6877
  componentsProps?.container?.onMouseEnter?.(e);
6869
6878
  },
6870
6879
  onMouseLeave: (e) => {
6871
- if (!pinnableSection) {
6872
- handleLeave();
6873
- }
6880
+ handleLeave(e);
6874
6881
  componentsProps?.container?.onMouseLeave?.(e);
6875
6882
  },
6876
6883
  style: import_lodash12.merge(transitionStyle, { flexDirection: "column" }, componentsProps?.container?.style),
@@ -6901,7 +6908,7 @@ function WidgetWrapper({
6901
6908
  return;
6902
6909
  }
6903
6910
  updateWidgetSelection(page.pageId, config.widgetId, false);
6904
- handleLeave();
6911
+ handleLeave(e);
6905
6912
  componentsProps?.closeButton?.onClick?.(e);
6906
6913
  }
6907
6914
  }, undefined, false, undefined, this)
@@ -6918,21 +6925,10 @@ function WidgetWrapper({
6918
6925
  ...componentsProps?.Pinnable,
6919
6926
  componentsProps: {
6920
6927
  ...componentsProps?.Pinnable?.componentsProps,
6921
- container: {
6922
- ...componentsProps?.Pinnable?.componentsProps?.container,
6923
- onMouseEnter: (e) => {
6924
- handleEnter();
6925
- componentsProps?.Pinnable?.componentsProps?.container?.onMouseEnter?.(e);
6926
- },
6927
- onMouseLeave: (e) => {
6928
- handleLeave();
6929
- componentsProps?.Pinnable?.componentsProps?.container?.onMouseLeave?.(e);
6930
- }
6931
- },
6932
6928
  button: {
6933
6929
  ...componentsProps?.Pinnable?.componentsProps?.button,
6934
6930
  onClick: (e) => {
6935
- handleLeave();
6931
+ handleLeave(e);
6936
6932
  componentsProps?.Pinnable?.componentsProps?.button?.onClick?.(e);
6937
6933
  }
6938
6934
  },
@@ -7250,6 +7246,49 @@ import {
7250
7246
  import { useState as useState11 } from "react";
7251
7247
  import { useRemoraidTheme as useRemoraidTheme2 } from "remoraid/core";
7252
7248
  import { jsxDEV as jsxDEV36 } from "react/jsx-dev-runtime";
7249
+ function InputWrapperScrollArea({
7250
+ children,
7251
+ label,
7252
+ mah,
7253
+ description,
7254
+ error,
7255
+ required = false,
7256
+ componentsProps
7257
+ }) {
7258
+ const theme = useRemoraidTheme2();
7259
+ const [isHovering, setIsHovering] = useState11(false);
7260
+ return /* @__PURE__ */ jsxDEV36(Input.Wrapper, {
7261
+ label,
7262
+ error,
7263
+ onMouseEnter: () => setIsHovering(true),
7264
+ onMouseLeave: () => setIsHovering(false),
7265
+ description,
7266
+ withAsterisk: required,
7267
+ ...componentsProps?.container,
7268
+ children: /* @__PURE__ */ jsxDEV36(Paper4, {
7269
+ shadow: "none",
7270
+ p: 0,
7271
+ mt: Boolean(description) ? 4 : 0,
7272
+ withBorder: true,
7273
+ display: "flex",
7274
+ bg: theme.transparentBackground,
7275
+ style: {
7276
+ transition: "border-color .1s",
7277
+ borderColor: error ? "var(--mantine-color-error)" : isHovering ? "var(--mantine-primary-color-filled)" : undefined
7278
+ },
7279
+ children: /* @__PURE__ */ jsxDEV36(ScrollArea4, {
7280
+ mah,
7281
+ px: "md",
7282
+ flex: 1,
7283
+ ...componentsProps?.ScrollArea,
7284
+ children: /* @__PURE__ */ jsxDEV36(Box6, {
7285
+ ...componentsProps?.childrenContainer,
7286
+ children
7287
+ }, undefined, false, undefined, this)
7288
+ }, undefined, false, undefined, this)
7289
+ }, undefined, false, undefined, this)
7290
+ }, undefined, false, undefined, this);
7291
+ }
7253
7292
  // src/jsonforms/renderers/AnyOfControl.tsx
7254
7293
  import { jsxDEV as jsxDEV37, Fragment as Fragment4 } from "react/jsx-dev-runtime";
7255
7294
  function PlainAnyOfControl(props) {
@@ -7525,25 +7564,35 @@ import {
7525
7564
  useJsonForms as useJsonForms3,
7526
7565
  withJsonFormsControlProps as withJsonFormsControlProps5
7527
7566
  } from "@jsonforms/react";
7528
- import { Input as Input4, Paper as Paper7 } from "@mantine/core";
7567
+ import { Input as Input4, JsonInput, Paper as Paper7 } from "@mantine/core";
7568
+ import { useState as useState12 } from "react";
7529
7569
  import { jsxDEV as jsxDEV41, Fragment as Fragment8 } from "react/jsx-dev-runtime";
7530
- function PlainObjectControl(props) {
7531
- const { label, schema, data, handleChange, path, required } = props;
7570
+ function PlainObjectControl({
7571
+ label: labelProp,
7572
+ schema,
7573
+ data,
7574
+ handleChange,
7575
+ path,
7576
+ required
7577
+ }) {
7532
7578
  const { formOptions } = useFormOptions();
7533
7579
  const { renderers, cells } = useJsonForms3();
7534
7580
  const theme = useRemoraidTheme();
7535
- const mt = formOptions.withDescriptions && schema.description && schema.description.length > 0 ? 4 : 0;
7581
+ const [input, setInput] = useState12("");
7582
+ const [error, setError] = useState12(false);
7583
+ const label = labelProp !== "remoraid-array-item" ? labelProp : null;
7584
+ const description = formOptions.withDescriptions ? schema.description : undefined;
7536
7585
  return /* @__PURE__ */ jsxDEV41(Fragment8, {
7537
- children: /* @__PURE__ */ jsxDEV41(Input4.Wrapper, {
7538
- label: label !== "remoraid-array-item" ? label : null,
7539
- description: formOptions.withDescriptions ? schema.description : undefined,
7586
+ children: schema.properties && Object.keys(schema.properties).length > 0 ? /* @__PURE__ */ jsxDEV41(Input4.Wrapper, {
7587
+ label,
7588
+ description,
7540
7589
  withAsterisk: required,
7541
- children: schema.properties && Object.keys(schema.properties).length > 0 ? /* @__PURE__ */ jsxDEV41(Paper7, {
7590
+ children: /* @__PURE__ */ jsxDEV41(Paper7, {
7542
7591
  withBorder: true,
7543
7592
  bg: "var(--remoraid-transparent-background)",
7544
7593
  shadow: "0",
7545
7594
  p: formOptions.gutter,
7546
- mt,
7595
+ mt: Boolean(description) ? 4 : 0,
7547
7596
  children: /* @__PURE__ */ jsxDEV41(JsonForms3, {
7548
7597
  schema: {
7549
7598
  ...schema,
@@ -7557,11 +7606,31 @@ function PlainObjectControl(props) {
7557
7606
  },
7558
7607
  validationMode: "NoValidation"
7559
7608
  }, undefined, false, undefined, this)
7560
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV41(AlertMinimal, {
7561
- category: "negative" /* Negative */,
7562
- title: "No properties specified",
7563
- text: "The JSON schema for this object did not specify any properties.",
7564
- componentsProps: { alert: { mt } }
7609
+ }, undefined, false, undefined, this)
7610
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV41(InputWrapperScrollArea, {
7611
+ label: label ?? undefined,
7612
+ error: error ? "Invalid JSON" : undefined,
7613
+ description,
7614
+ required,
7615
+ mah: 140,
7616
+ children: /* @__PURE__ */ jsxDEV41(JsonInput, {
7617
+ onChange: (newValue) => {
7618
+ setInput(newValue);
7619
+ try {
7620
+ const parsedValue = JSON.parse(newValue);
7621
+ handleChange(path, parsedValue);
7622
+ setError(false);
7623
+ } catch {
7624
+ setError(true);
7625
+ return;
7626
+ }
7627
+ },
7628
+ value: input,
7629
+ minRows: 4,
7630
+ autosize: true,
7631
+ formatOnBlur: true,
7632
+ variant: "unstyled",
7633
+ styles: { input: { border: "none" } }
7565
7634
  }, undefined, false, undefined, this)
7566
7635
  }, undefined, false, undefined, this)
7567
7636
  }, undefined, false, undefined, this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remoraid",
3
- "version": "2.28.2",
3
+ "version": "2.31.3",
4
4
  "author": "Konrad Goldammer",
5
5
  "repository": {
6
6
  "type": "git",