remoraid 2.34.2 → 2.36.2
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/core/index.cjs +8 -1
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +13 -5
- package/dist/jsonforms/index.cjs +5 -1
- package/dist/jsonforms/index.js +9 -4
- package/package.json +1 -1
package/dist/core/index.cjs
CHANGED
|
@@ -5561,6 +5561,9 @@ var useWidgets = () => {
|
|
|
5561
5561
|
};
|
|
5562
5562
|
var useWidget = (pageId, widgetId) => {
|
|
5563
5563
|
const { widgets } = useWidgets();
|
|
5564
|
+
if (pageId === undefined || widgetId === undefined) {
|
|
5565
|
+
return null;
|
|
5566
|
+
}
|
|
5564
5567
|
return widgets?.[pageId]?.[widgetId] ?? null;
|
|
5565
5568
|
};
|
|
5566
5569
|
function WidgetsProvider({
|
|
@@ -6909,6 +6912,7 @@ function Pinnable({
|
|
|
6909
6912
|
layoutId,
|
|
6910
6913
|
controlsContainer,
|
|
6911
6914
|
hidden = false,
|
|
6915
|
+
onPinnedValueChange,
|
|
6912
6916
|
componentsProps,
|
|
6913
6917
|
children
|
|
6914
6918
|
}) {
|
|
@@ -6927,7 +6931,7 @@ function Pinnable({
|
|
|
6927
6931
|
order: 100,
|
|
6928
6932
|
...componentsProps?.button,
|
|
6929
6933
|
onClick: (e) => {
|
|
6930
|
-
setPinned((
|
|
6934
|
+
setPinned((prev) => !prev);
|
|
6931
6935
|
componentsProps?.button?.onClick?.(e);
|
|
6932
6936
|
}
|
|
6933
6937
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
@@ -6950,6 +6954,9 @@ function Pinnable({
|
|
|
6950
6954
|
children
|
|
6951
6955
|
]
|
|
6952
6956
|
}, undefined, true, undefined, this);
|
|
6957
|
+
import_react13.useEffect(() => {
|
|
6958
|
+
onPinnedValueChange?.(pinned);
|
|
6959
|
+
}, [pinned]);
|
|
6953
6960
|
if (!layout) {
|
|
6954
6961
|
return null;
|
|
6955
6962
|
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ declare enum ClickTransformation {
|
|
|
185
185
|
}
|
|
186
186
|
declare const getDefaultWidgetContext: (configuration: WidgetConfiguration) => WidgetContext;
|
|
187
187
|
declare const useWidgets: () => WidgetsContext;
|
|
188
|
-
declare const useWidget: (pageId: string, widgetId: string) => WidgetContext | null;
|
|
188
|
+
declare const useWidget: (pageId: string | undefined, widgetId: string | undefined) => WidgetContext | null;
|
|
189
189
|
interface WidgetsProviderProps {}
|
|
190
190
|
import { PartialDeep as PartialDeep2 } from "type-fest";
|
|
191
191
|
declare const defaultTransitionDurations: RemoraidTheme["transitionDurations"];
|
|
@@ -485,6 +485,7 @@ interface ExplicitPinnableProps<T extends LayoutType> {
|
|
|
485
485
|
layoutId?: string;
|
|
486
486
|
controlsContainer?: HTMLDivElement | null;
|
|
487
487
|
hidden?: boolean;
|
|
488
|
+
onPinnedValueChange?: (newValue: boolean) => void;
|
|
488
489
|
componentsProps?: {
|
|
489
490
|
controls?: Partial<ControlsProps>
|
|
490
491
|
button?: Partial<ControlButtonProps>
|
|
@@ -493,7 +494,7 @@ interface ExplicitPinnableProps<T extends LayoutType> {
|
|
|
493
494
|
};
|
|
494
495
|
}
|
|
495
496
|
type PinnableProps<T extends LayoutType = PinnableDefaultLayoutType> = OptionalIfExtends<ExplicitPinnableProps<T>, "layoutType", PinnableDefaultLayoutType, T>;
|
|
496
|
-
declare function Pinnable2<T extends LayoutType = PinnableDefaultLayoutType>({ layoutType: layoutTypeProp, section, initialValue, layoutId, controlsContainer, hidden, componentsProps, children }: PropsWithChildren15<PinnableProps<T>>): ReactNode20;
|
|
497
|
+
declare function Pinnable2<T extends LayoutType = PinnableDefaultLayoutType>({ layoutType: layoutTypeProp, section, initialValue, layoutId, controlsContainer, hidden, onPinnedValueChange, componentsProps, children }: PropsWithChildren15<PinnableProps<T>>): ReactNode20;
|
|
497
498
|
interface WidgetSelectionHeaderProps {
|
|
498
499
|
title?: string;
|
|
499
500
|
pinnableSection?: FrameLayoutSection.Top | FrameLayoutSection.Bottom | null;
|
package/dist/core/index.js
CHANGED
|
@@ -5462,6 +5462,9 @@ var useWidgets = () => {
|
|
|
5462
5462
|
};
|
|
5463
5463
|
var useWidget = (pageId, widgetId) => {
|
|
5464
5464
|
const { widgets } = useWidgets();
|
|
5465
|
+
if (pageId === undefined || widgetId === undefined) {
|
|
5466
|
+
return null;
|
|
5467
|
+
}
|
|
5465
5468
|
return widgets?.[pageId]?.[widgetId] ?? null;
|
|
5466
5469
|
};
|
|
5467
5470
|
function WidgetsProvider({
|
|
@@ -6661,7 +6664,7 @@ function Page({
|
|
|
6661
6664
|
|
|
6662
6665
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
6663
6666
|
import { IconCheck, IconFocus, IconNavigation } from "@tabler/icons-react";
|
|
6664
|
-
import { useEffect as
|
|
6667
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } from "react";
|
|
6665
6668
|
|
|
6666
6669
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
6667
6670
|
import {
|
|
@@ -6704,6 +6707,7 @@ var import_lodash8 = __toESM(require_lodash(), 1);
|
|
|
6704
6707
|
|
|
6705
6708
|
// src/core/components/Pinnable/index.tsx
|
|
6706
6709
|
import {
|
|
6710
|
+
useEffect as useEffect4,
|
|
6707
6711
|
useMemo as useMemo4,
|
|
6708
6712
|
useRef as useRef2,
|
|
6709
6713
|
useState as useState7
|
|
@@ -6885,6 +6889,7 @@ function Pinnable({
|
|
|
6885
6889
|
layoutId,
|
|
6886
6890
|
controlsContainer,
|
|
6887
6891
|
hidden = false,
|
|
6892
|
+
onPinnedValueChange,
|
|
6888
6893
|
componentsProps,
|
|
6889
6894
|
children
|
|
6890
6895
|
}) {
|
|
@@ -6903,7 +6908,7 @@ function Pinnable({
|
|
|
6903
6908
|
order: 100,
|
|
6904
6909
|
...componentsProps?.button,
|
|
6905
6910
|
onClick: (e) => {
|
|
6906
|
-
setPinned((
|
|
6911
|
+
setPinned((prev) => !prev);
|
|
6907
6912
|
componentsProps?.button?.onClick?.(e);
|
|
6908
6913
|
}
|
|
6909
6914
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
@@ -6926,6 +6931,9 @@ function Pinnable({
|
|
|
6926
6931
|
children
|
|
6927
6932
|
]
|
|
6928
6933
|
}, undefined, true, undefined, this);
|
|
6934
|
+
useEffect4(() => {
|
|
6935
|
+
onPinnedValueChange?.(pinned);
|
|
6936
|
+
}, [pinned]);
|
|
6929
6937
|
if (!layout) {
|
|
6930
6938
|
return null;
|
|
6931
6939
|
}
|
|
@@ -7071,7 +7079,7 @@ function WidgetSelectionHeader({
|
|
|
7071
7079
|
}, undefined, false, undefined, this)
|
|
7072
7080
|
]
|
|
7073
7081
|
}, undefined, true, undefined, this);
|
|
7074
|
-
|
|
7082
|
+
useEffect5(() => {
|
|
7075
7083
|
if (!activeWidget) {
|
|
7076
7084
|
return;
|
|
7077
7085
|
}
|
|
@@ -7389,7 +7397,7 @@ function RemoraidButton({
|
|
|
7389
7397
|
import { Paper as Paper3, Transition as Transition7 } from "@mantine/core";
|
|
7390
7398
|
import {
|
|
7391
7399
|
useCallback as useCallback2,
|
|
7392
|
-
useEffect as
|
|
7400
|
+
useEffect as useEffect6,
|
|
7393
7401
|
useRef as useRef4,
|
|
7394
7402
|
useState as useState9
|
|
7395
7403
|
} from "react";
|
|
@@ -7526,7 +7534,7 @@ function WidgetWrapper({
|
|
|
7526
7534
|
children: element
|
|
7527
7535
|
}, undefined, false, undefined, this);
|
|
7528
7536
|
}
|
|
7529
|
-
|
|
7537
|
+
useEffect6(() => {
|
|
7530
7538
|
if (!page) {
|
|
7531
7539
|
return;
|
|
7532
7540
|
}
|
package/dist/jsonforms/index.cjs
CHANGED
|
@@ -6409,6 +6409,7 @@ function Pinnable({
|
|
|
6409
6409
|
layoutId,
|
|
6410
6410
|
controlsContainer,
|
|
6411
6411
|
hidden = false,
|
|
6412
|
+
onPinnedValueChange,
|
|
6412
6413
|
componentsProps,
|
|
6413
6414
|
children
|
|
6414
6415
|
}) {
|
|
@@ -6427,7 +6428,7 @@ function Pinnable({
|
|
|
6427
6428
|
order: 100,
|
|
6428
6429
|
...componentsProps?.button,
|
|
6429
6430
|
onClick: (e) => {
|
|
6430
|
-
setPinned((
|
|
6431
|
+
setPinned((prev) => !prev);
|
|
6431
6432
|
componentsProps?.button?.onClick?.(e);
|
|
6432
6433
|
}
|
|
6433
6434
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
@@ -6450,6 +6451,9 @@ function Pinnable({
|
|
|
6450
6451
|
children
|
|
6451
6452
|
]
|
|
6452
6453
|
}, undefined, true, undefined, this);
|
|
6454
|
+
import_react13.useEffect(() => {
|
|
6455
|
+
onPinnedValueChange?.(pinned);
|
|
6456
|
+
}, [pinned]);
|
|
6453
6457
|
if (!layout) {
|
|
6454
6458
|
return null;
|
|
6455
6459
|
}
|
package/dist/jsonforms/index.js
CHANGED
|
@@ -6253,7 +6253,7 @@ var usePage = () => {
|
|
|
6253
6253
|
|
|
6254
6254
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
6255
6255
|
import { IconCheck, IconFocus, IconNavigation } from "@tabler/icons-react";
|
|
6256
|
-
import { useEffect as
|
|
6256
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } from "react";
|
|
6257
6257
|
|
|
6258
6258
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
6259
6259
|
import {
|
|
@@ -6268,6 +6268,7 @@ var import_lodash8 = __toESM(require_lodash(), 1);
|
|
|
6268
6268
|
|
|
6269
6269
|
// src/core/components/Pinnable/index.tsx
|
|
6270
6270
|
import {
|
|
6271
|
+
useEffect as useEffect4,
|
|
6271
6272
|
useMemo as useMemo4,
|
|
6272
6273
|
useRef as useRef2,
|
|
6273
6274
|
useState as useState7
|
|
@@ -6449,6 +6450,7 @@ function Pinnable({
|
|
|
6449
6450
|
layoutId,
|
|
6450
6451
|
controlsContainer,
|
|
6451
6452
|
hidden = false,
|
|
6453
|
+
onPinnedValueChange,
|
|
6452
6454
|
componentsProps,
|
|
6453
6455
|
children
|
|
6454
6456
|
}) {
|
|
@@ -6467,7 +6469,7 @@ function Pinnable({
|
|
|
6467
6469
|
order: 100,
|
|
6468
6470
|
...componentsProps?.button,
|
|
6469
6471
|
onClick: (e) => {
|
|
6470
|
-
setPinned((
|
|
6472
|
+
setPinned((prev) => !prev);
|
|
6471
6473
|
componentsProps?.button?.onClick?.(e);
|
|
6472
6474
|
}
|
|
6473
6475
|
}, undefined, false, undefined, this), [pinned, componentsProps?.button]);
|
|
@@ -6490,6 +6492,9 @@ function Pinnable({
|
|
|
6490
6492
|
children
|
|
6491
6493
|
]
|
|
6492
6494
|
}, undefined, true, undefined, this);
|
|
6495
|
+
useEffect4(() => {
|
|
6496
|
+
onPinnedValueChange?.(pinned);
|
|
6497
|
+
}, [pinned]);
|
|
6493
6498
|
if (!layout) {
|
|
6494
6499
|
return null;
|
|
6495
6500
|
}
|
|
@@ -6764,7 +6769,7 @@ function RemoraidButton({
|
|
|
6764
6769
|
import { Paper as Paper3, Transition as Transition7 } from "@mantine/core";
|
|
6765
6770
|
import {
|
|
6766
6771
|
useCallback as useCallback2,
|
|
6767
|
-
useEffect as
|
|
6772
|
+
useEffect as useEffect6,
|
|
6768
6773
|
useRef as useRef4,
|
|
6769
6774
|
useState as useState9
|
|
6770
6775
|
} from "react";
|
|
@@ -6901,7 +6906,7 @@ function WidgetWrapper({
|
|
|
6901
6906
|
children: element
|
|
6902
6907
|
}, undefined, false, undefined, this);
|
|
6903
6908
|
}
|
|
6904
|
-
|
|
6909
|
+
useEffect6(() => {
|
|
6905
6910
|
if (!page) {
|
|
6906
6911
|
return;
|
|
6907
6912
|
}
|