remoraid 2.42.1 → 2.43.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 +49 -34
- package/dist/core/index.js +26 -11
- package/dist/jsonforms/index.cjs +86 -71
- package/dist/jsonforms/index.js +24 -9
- package/package.json +3 -3
package/dist/core/index.cjs
CHANGED
|
@@ -6169,6 +6169,7 @@ function RemoraidProvider({
|
|
|
6169
6169
|
}
|
|
6170
6170
|
// src/core/components/AppShell/index.tsx
|
|
6171
6171
|
var import_core13 = require("@mantine/core");
|
|
6172
|
+
var import_react18 = require("react");
|
|
6172
6173
|
|
|
6173
6174
|
// src/core/components/AppShell/AppProvider/index.tsx
|
|
6174
6175
|
var import_react8 = require("react");
|
|
@@ -6812,8 +6813,8 @@ function NavbarMinimalContent({
|
|
|
6812
6813
|
target: /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6813
6814
|
label: "Static elements",
|
|
6814
6815
|
icon: import_icons_react4.IconDots,
|
|
6815
|
-
responsive: buttonResponsive,
|
|
6816
|
-
collapsed: buttonCollapsed,
|
|
6816
|
+
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
6817
|
+
collapsed: orientation === "vertical" /* Vertical */ ? buttonCollapsed : true,
|
|
6817
6818
|
clickTransformation: buttonClickTransformation,
|
|
6818
6819
|
...componentsProps?.button,
|
|
6819
6820
|
componentsProps: import_lodash8.merge({
|
|
@@ -7264,7 +7265,7 @@ var getDefaultNavigationElements = ({
|
|
|
7264
7265
|
}
|
|
7265
7266
|
}
|
|
7266
7267
|
];
|
|
7267
|
-
function
|
|
7268
|
+
function Navbar2({ componentsProps }) {
|
|
7268
7269
|
const { navbarVariant } = useRemoraidApp();
|
|
7269
7270
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
7270
7271
|
return /* @__PURE__ */ jsx_runtime21.jsx(NavbarMinimal, {
|
|
@@ -7273,7 +7274,7 @@ function Navbar({ componentsProps }) {
|
|
|
7273
7274
|
}
|
|
7274
7275
|
return null;
|
|
7275
7276
|
}
|
|
7276
|
-
var Navbar_default = Object.assign(
|
|
7277
|
+
var Navbar_default = Object.assign(Navbar2, {
|
|
7277
7278
|
NavbarMinimal
|
|
7278
7279
|
});
|
|
7279
7280
|
|
|
@@ -7343,6 +7344,20 @@ function AppShell({
|
|
|
7343
7344
|
children
|
|
7344
7345
|
}) {
|
|
7345
7346
|
const theme = useRemoraidTheme();
|
|
7347
|
+
const { colorScheme } = useHydratedMantineColorScheme();
|
|
7348
|
+
import_react18.useEffect(() => {
|
|
7349
|
+
let meta = document.querySelector('meta[name="theme-color"]');
|
|
7350
|
+
if (!meta) {
|
|
7351
|
+
meta = document.createElement("meta");
|
|
7352
|
+
meta.name = "theme-color";
|
|
7353
|
+
document.head.appendChild(meta);
|
|
7354
|
+
}
|
|
7355
|
+
const { backgroundColor: computedBodyColor } = getComputedStyle(document.body);
|
|
7356
|
+
if (!computedBodyColor) {
|
|
7357
|
+
return;
|
|
7358
|
+
}
|
|
7359
|
+
meta.content = computedBodyColor;
|
|
7360
|
+
}, [colorScheme]);
|
|
7346
7361
|
return /* @__PURE__ */ jsx_runtime23.jsx(AppProvider, {
|
|
7347
7362
|
appContext: appContext2,
|
|
7348
7363
|
...componentsProps?.AppProvider,
|
|
@@ -7350,7 +7365,7 @@ function AppShell({
|
|
|
7350
7365
|
...componentsProps?.AppShellUserExperienceProvider,
|
|
7351
7366
|
initialValue: import_lodash13.merge(initialUserExperience, componentsProps?.AppShellUserExperienceProvider?.initialValue),
|
|
7352
7367
|
children: /* @__PURE__ */ jsx_runtime23.jsx(import_core13.Box, {
|
|
7353
|
-
h: "
|
|
7368
|
+
h: "100dvh",
|
|
7354
7369
|
...componentsProps?.container,
|
|
7355
7370
|
children: /* @__PURE__ */ jsx_runtime23.jsxs(FrameLayout_default, {
|
|
7356
7371
|
layoutId: remoraidAppShellLayoutId,
|
|
@@ -7379,12 +7394,12 @@ var import_core16 = require("@mantine/core");
|
|
|
7379
7394
|
|
|
7380
7395
|
// src/core/components/Page/index.tsx
|
|
7381
7396
|
var import_core14 = require("@mantine/core");
|
|
7382
|
-
var
|
|
7397
|
+
var import_react19 = __toESM(require("react"));
|
|
7383
7398
|
var import_navigation3 = require("next/navigation");
|
|
7384
7399
|
var jsx_runtime24 = require("react/jsx-runtime");
|
|
7385
|
-
var pageContext =
|
|
7400
|
+
var pageContext = import_react19.default.createContext(null);
|
|
7386
7401
|
var usePage = () => {
|
|
7387
|
-
return
|
|
7402
|
+
return import_react19.useContext(pageContext);
|
|
7388
7403
|
};
|
|
7389
7404
|
function Page({
|
|
7390
7405
|
children,
|
|
@@ -7397,7 +7412,7 @@ function Page({
|
|
|
7397
7412
|
const pathname = import_navigation3.usePathname();
|
|
7398
7413
|
const { isPageRegistered, registerPage } = useWidgets();
|
|
7399
7414
|
const pageId = config?.pageId ?? pathname;
|
|
7400
|
-
|
|
7415
|
+
import_react19.useEffect(() => {
|
|
7401
7416
|
if (!isPageRegistered(pageId)) {
|
|
7402
7417
|
if (config?.registerPageDirectly) {
|
|
7403
7418
|
registerPage(pageId, []);
|
|
@@ -7420,7 +7435,7 @@ function Page({
|
|
|
7420
7435
|
|
|
7421
7436
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
7422
7437
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
7423
|
-
var
|
|
7438
|
+
var import_react20 = require("react");
|
|
7424
7439
|
|
|
7425
7440
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
7426
7441
|
var import_core15 = require("@mantine/core");
|
|
@@ -7476,15 +7491,15 @@ function WidgetSelectionHeader({
|
|
|
7476
7491
|
if (!page) {
|
|
7477
7492
|
throw new InvalidComponentUsageError("WidgetSelectionHeader", "must be used as child of 'Page'.");
|
|
7478
7493
|
}
|
|
7479
|
-
const [hover, setHover] =
|
|
7480
|
-
const [isPinned, setIsPinned] =
|
|
7494
|
+
const [hover, setHover] = import_react20.useState(false);
|
|
7495
|
+
const [isPinned, setIsPinned] = import_react20.useState(initiallyPinned);
|
|
7481
7496
|
const handleEnter = () => {
|
|
7482
7497
|
setHover(true);
|
|
7483
7498
|
};
|
|
7484
7499
|
const handleLeave = () => {
|
|
7485
7500
|
setHover(false);
|
|
7486
7501
|
};
|
|
7487
|
-
const scrollAreaRef =
|
|
7502
|
+
const scrollAreaRef = import_react20.useRef(null);
|
|
7488
7503
|
const widgets = widgetsContext2.widgets[page.pageId] ?? {};
|
|
7489
7504
|
const selectedWidgets = Object.entries(widgets).reduce((t, [widgetId, widget]) => widget?.selected ? [...t, widgetId] : t, []);
|
|
7490
7505
|
const element = /* @__PURE__ */ jsx_runtime26.jsxs(import_core16.Flex, {
|
|
@@ -7585,7 +7600,7 @@ function WidgetSelectionHeader({
|
|
|
7585
7600
|
})
|
|
7586
7601
|
]
|
|
7587
7602
|
});
|
|
7588
|
-
|
|
7603
|
+
import_react20.useEffect(() => {
|
|
7589
7604
|
if (!activeWidget) {
|
|
7590
7605
|
return;
|
|
7591
7606
|
}
|
|
@@ -7648,7 +7663,7 @@ function WidgetSelectionHeader({
|
|
|
7648
7663
|
}
|
|
7649
7664
|
// src/core/components/BadgeGroup/index.tsx
|
|
7650
7665
|
var import_core18 = require("@mantine/core");
|
|
7651
|
-
var
|
|
7666
|
+
var import_react21 = __toESM(require("react"));
|
|
7652
7667
|
|
|
7653
7668
|
// src/core/components/BadgeMinimal/index.tsx
|
|
7654
7669
|
var import_core17 = require("@mantine/core");
|
|
@@ -7800,7 +7815,7 @@ function AlertMinimal({
|
|
|
7800
7815
|
}
|
|
7801
7816
|
// src/core/components/Widget/WidgetWrapper/index.tsx
|
|
7802
7817
|
var import_core20 = require("@mantine/core");
|
|
7803
|
-
var
|
|
7818
|
+
var import_react22 = require("react");
|
|
7804
7819
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
7805
7820
|
var import_lodash17 = __toESM(require_lodash());
|
|
7806
7821
|
var jsx_runtime30 = require("react/jsx-runtime");
|
|
@@ -7824,11 +7839,11 @@ function WidgetWrapper({
|
|
|
7824
7839
|
} = useWidgets();
|
|
7825
7840
|
const page = usePage();
|
|
7826
7841
|
const theme = useRemoraidTheme();
|
|
7827
|
-
const [controlsContainer, setControlsContainer] =
|
|
7842
|
+
const [controlsContainer, setControlsContainer] = import_react22.useState(null);
|
|
7828
7843
|
const widget = page ? widgets[page.pageId]?.[config.widgetId] : undefined;
|
|
7829
7844
|
const pageRegistered = page ? isPageRegistered(page.pageId) : false;
|
|
7830
|
-
const containerRef =
|
|
7831
|
-
const controlsContainerRef =
|
|
7845
|
+
const containerRef = import_react22.useRef(null);
|
|
7846
|
+
const controlsContainerRef = import_react22.useCallback((n) => {
|
|
7832
7847
|
setControlsContainer(n);
|
|
7833
7848
|
}, [setControlsContainer]);
|
|
7834
7849
|
const handleEnter = () => {
|
|
@@ -7934,7 +7949,7 @@ function WidgetWrapper({
|
|
|
7934
7949
|
children: element
|
|
7935
7950
|
});
|
|
7936
7951
|
}
|
|
7937
|
-
|
|
7952
|
+
import_react22.useEffect(() => {
|
|
7938
7953
|
if (!page) {
|
|
7939
7954
|
return;
|
|
7940
7955
|
}
|
|
@@ -7946,7 +7961,7 @@ function WidgetWrapper({
|
|
|
7946
7961
|
}
|
|
7947
7962
|
// src/core/components/Widget/index.tsx
|
|
7948
7963
|
var import_core21 = require("@mantine/core");
|
|
7949
|
-
var
|
|
7964
|
+
var import_react23 = require("react");
|
|
7950
7965
|
var import_lodash18 = __toESM(require_lodash());
|
|
7951
7966
|
var jsx_runtime31 = require("react/jsx-runtime");
|
|
7952
7967
|
var react2 = require("react");
|
|
@@ -8060,7 +8075,7 @@ function Widget({
|
|
|
8060
8075
|
});
|
|
8061
8076
|
})
|
|
8062
8077
|
}),
|
|
8063
|
-
(loading ||
|
|
8078
|
+
(loading || import_react23.Children.toArray(children).length > 0) && /* @__PURE__ */ jsx_runtime31.jsx(import_core21.ScrollArea.Autosize, {
|
|
8064
8079
|
flex: 1,
|
|
8065
8080
|
...componentsProps?.childrenContainer,
|
|
8066
8081
|
className: clsx_default("remoraid-widget-children-container", componentsProps?.childrenContainer?.className),
|
|
@@ -8139,7 +8154,7 @@ function EnvironmentShell({
|
|
|
8139
8154
|
return null;
|
|
8140
8155
|
}
|
|
8141
8156
|
// src/core/components/SettingsWidget/index.tsx
|
|
8142
|
-
var
|
|
8157
|
+
var import_react24 = require("react");
|
|
8143
8158
|
var import_icons_react12 = require("@tabler/icons-react");
|
|
8144
8159
|
|
|
8145
8160
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
|
@@ -8181,9 +8196,9 @@ function SaveButton({
|
|
|
8181
8196
|
// src/core/components/SettingsWidget/index.tsx
|
|
8182
8197
|
var jsx_runtime35 = require("react/jsx-runtime");
|
|
8183
8198
|
var defaultSettingsWidgetContext = {};
|
|
8184
|
-
var settingsWidgetContext =
|
|
8199
|
+
var settingsWidgetContext = import_react24.createContext(defaultSettingsWidgetContext);
|
|
8185
8200
|
var useSettingsWidgetContext = () => {
|
|
8186
|
-
return
|
|
8201
|
+
return import_react24.useContext(settingsWidgetContext);
|
|
8187
8202
|
};
|
|
8188
8203
|
function SettingsWidget({
|
|
8189
8204
|
children,
|
|
@@ -8229,7 +8244,7 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
|
|
|
8229
8244
|
SaveButton
|
|
8230
8245
|
});
|
|
8231
8246
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
|
8232
|
-
var
|
|
8247
|
+
var import_react25 = require("react");
|
|
8233
8248
|
var import_core24 = require("@mantine/core");
|
|
8234
8249
|
|
|
8235
8250
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
|
@@ -8262,9 +8277,9 @@ var jsx_runtime37 = require("react/jsx-runtime");
|
|
|
8262
8277
|
var defaultSettingsTableOptions = {
|
|
8263
8278
|
leftColumnWidth: "38.2%"
|
|
8264
8279
|
};
|
|
8265
|
-
var settingsTableOptionsContext =
|
|
8280
|
+
var settingsTableOptionsContext = import_react25.createContext(defaultSettingsTableOptions);
|
|
8266
8281
|
var useSettingsTableOptions = () => {
|
|
8267
|
-
return
|
|
8282
|
+
return import_react25.useContext(settingsTableOptionsContext);
|
|
8268
8283
|
};
|
|
8269
8284
|
function SettingsTable({
|
|
8270
8285
|
leftColumnWidth,
|
|
@@ -8455,7 +8470,7 @@ function FooterSettingsWidget({
|
|
|
8455
8470
|
});
|
|
8456
8471
|
}
|
|
8457
8472
|
// src/core/components/ContextClusterProvider/index.tsx
|
|
8458
|
-
var
|
|
8473
|
+
var import_react26 = __toESM(require("react"));
|
|
8459
8474
|
var jsx_runtime40 = require("react/jsx-runtime");
|
|
8460
8475
|
var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
8461
8476
|
const isStaticId = (id) => {
|
|
@@ -8467,16 +8482,16 @@ var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
|
8467
8482
|
const contexts = {};
|
|
8468
8483
|
const defaultValues = {};
|
|
8469
8484
|
const createContext9 = (id, defaultValue) => {
|
|
8470
|
-
const context =
|
|
8485
|
+
const context = import_react26.default.createContext(defaultValue ?? generalDefaultValue);
|
|
8471
8486
|
contexts[id] = context;
|
|
8472
8487
|
defaultValues[id] = defaultValue ?? generalDefaultValue;
|
|
8473
8488
|
return context;
|
|
8474
8489
|
};
|
|
8475
8490
|
const useContext13 = (id) => {
|
|
8476
8491
|
if (isStaticId(id)) {
|
|
8477
|
-
return contexts[id] ?
|
|
8492
|
+
return contexts[id] ? import_react26.default.useContext(contexts[id]) : generalDefaultValue;
|
|
8478
8493
|
}
|
|
8479
|
-
return contexts[id] ?
|
|
8494
|
+
return contexts[id] ? import_react26.default.useContext(contexts[id]) : null;
|
|
8480
8495
|
};
|
|
8481
8496
|
return {
|
|
8482
8497
|
contexts,
|
|
@@ -8498,7 +8513,7 @@ function ContextClusterProvider({
|
|
|
8498
8513
|
}
|
|
8499
8514
|
// src/core/components/InputWrapperScrollArea/index.tsx
|
|
8500
8515
|
var import_core27 = require("@mantine/core");
|
|
8501
|
-
var
|
|
8516
|
+
var import_react27 = require("react");
|
|
8502
8517
|
var jsx_runtime41 = require("react/jsx-runtime");
|
|
8503
8518
|
function InputWrapperScrollArea({
|
|
8504
8519
|
children,
|
|
@@ -8510,7 +8525,7 @@ function InputWrapperScrollArea({
|
|
|
8510
8525
|
componentsProps
|
|
8511
8526
|
}) {
|
|
8512
8527
|
const theme = useRemoraidTheme();
|
|
8513
|
-
const [isHovering, setIsHovering] =
|
|
8528
|
+
const [isHovering, setIsHovering] = import_react27.useState(false);
|
|
8514
8529
|
return /* @__PURE__ */ jsx_runtime41.jsx(import_core27.Input.Wrapper, {
|
|
8515
8530
|
label,
|
|
8516
8531
|
error,
|
package/dist/core/index.js
CHANGED
|
@@ -6079,6 +6079,7 @@ function RemoraidProvider({
|
|
|
6079
6079
|
}
|
|
6080
6080
|
// src/core/components/AppShell/index.tsx
|
|
6081
6081
|
import { Box as Box5 } from "@mantine/core";
|
|
6082
|
+
import { useEffect as useEffect4 } from "react";
|
|
6082
6083
|
|
|
6083
6084
|
// src/core/components/AppShell/AppProvider/index.tsx
|
|
6084
6085
|
var import_lodash4 = __toESM(require_lodash(), 1);
|
|
@@ -6749,8 +6750,8 @@ function NavbarMinimalContent({
|
|
|
6749
6750
|
target: /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6750
6751
|
label: "Static elements",
|
|
6751
6752
|
icon: IconDots,
|
|
6752
|
-
responsive: buttonResponsive,
|
|
6753
|
-
collapsed: buttonCollapsed,
|
|
6753
|
+
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
6754
|
+
collapsed: orientation === "vertical" /* Vertical */ ? buttonCollapsed : true,
|
|
6754
6755
|
clickTransformation: buttonClickTransformation,
|
|
6755
6756
|
...componentsProps?.button,
|
|
6756
6757
|
componentsProps: import_lodash8.merge({
|
|
@@ -7214,7 +7215,7 @@ var getDefaultNavigationElements = ({
|
|
|
7214
7215
|
}
|
|
7215
7216
|
}
|
|
7216
7217
|
];
|
|
7217
|
-
function
|
|
7218
|
+
function Navbar2({ componentsProps }) {
|
|
7218
7219
|
const { navbarVariant } = useRemoraidApp();
|
|
7219
7220
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
7220
7221
|
return /* @__PURE__ */ jsx21(NavbarMinimal, {
|
|
@@ -7223,7 +7224,7 @@ function Navbar({ componentsProps }) {
|
|
|
7223
7224
|
}
|
|
7224
7225
|
return null;
|
|
7225
7226
|
}
|
|
7226
|
-
var Navbar_default = Object.assign(
|
|
7227
|
+
var Navbar_default = Object.assign(Navbar2, {
|
|
7227
7228
|
NavbarMinimal
|
|
7228
7229
|
});
|
|
7229
7230
|
|
|
@@ -7293,6 +7294,20 @@ function AppShell({
|
|
|
7293
7294
|
children
|
|
7294
7295
|
}) {
|
|
7295
7296
|
const theme = useRemoraidTheme();
|
|
7297
|
+
const { colorScheme } = useHydratedMantineColorScheme();
|
|
7298
|
+
useEffect4(() => {
|
|
7299
|
+
let meta = document.querySelector('meta[name="theme-color"]');
|
|
7300
|
+
if (!meta) {
|
|
7301
|
+
meta = document.createElement("meta");
|
|
7302
|
+
meta.name = "theme-color";
|
|
7303
|
+
document.head.appendChild(meta);
|
|
7304
|
+
}
|
|
7305
|
+
const { backgroundColor: computedBodyColor } = getComputedStyle(document.body);
|
|
7306
|
+
if (!computedBodyColor) {
|
|
7307
|
+
return;
|
|
7308
|
+
}
|
|
7309
|
+
meta.content = computedBodyColor;
|
|
7310
|
+
}, [colorScheme]);
|
|
7296
7311
|
return /* @__PURE__ */ jsx23(AppProvider, {
|
|
7297
7312
|
appContext: appContext2,
|
|
7298
7313
|
...componentsProps?.AppProvider,
|
|
@@ -7300,7 +7315,7 @@ function AppShell({
|
|
|
7300
7315
|
...componentsProps?.AppShellUserExperienceProvider,
|
|
7301
7316
|
initialValue: import_lodash13.merge(initialUserExperience, componentsProps?.AppShellUserExperienceProvider?.initialValue),
|
|
7302
7317
|
children: /* @__PURE__ */ jsx23(Box5, {
|
|
7303
|
-
h: "
|
|
7318
|
+
h: "100dvh",
|
|
7304
7319
|
...componentsProps?.container,
|
|
7305
7320
|
children: /* @__PURE__ */ jsxs7(FrameLayout_default, {
|
|
7306
7321
|
layoutId: remoraidAppShellLayoutId,
|
|
@@ -7339,7 +7354,7 @@ import {
|
|
|
7339
7354
|
import { Stack as Stack3 } from "@mantine/core";
|
|
7340
7355
|
import React7, {
|
|
7341
7356
|
useContext as useContext10,
|
|
7342
|
-
useEffect as
|
|
7357
|
+
useEffect as useEffect5
|
|
7343
7358
|
} from "react";
|
|
7344
7359
|
import { usePathname as usePathname3 } from "next/navigation";
|
|
7345
7360
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
@@ -7358,7 +7373,7 @@ function Page({
|
|
|
7358
7373
|
const pathname = usePathname3();
|
|
7359
7374
|
const { isPageRegistered, registerPage } = useWidgets();
|
|
7360
7375
|
const pageId = config?.pageId ?? pathname;
|
|
7361
|
-
|
|
7376
|
+
useEffect5(() => {
|
|
7362
7377
|
if (!isPageRegistered(pageId)) {
|
|
7363
7378
|
if (config?.registerPageDirectly) {
|
|
7364
7379
|
registerPage(pageId, []);
|
|
@@ -7381,7 +7396,7 @@ function Page({
|
|
|
7381
7396
|
|
|
7382
7397
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
7383
7398
|
import { IconCheck, IconFocus, IconNavigation } from "@tabler/icons-react";
|
|
7384
|
-
import { useEffect as
|
|
7399
|
+
import { useEffect as useEffect6, useRef as useRef3, useState as useState8 } from "react";
|
|
7385
7400
|
|
|
7386
7401
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
7387
7402
|
import {
|
|
@@ -7550,7 +7565,7 @@ function WidgetSelectionHeader({
|
|
|
7550
7565
|
})
|
|
7551
7566
|
]
|
|
7552
7567
|
});
|
|
7553
|
-
|
|
7568
|
+
useEffect6(() => {
|
|
7554
7569
|
if (!activeWidget) {
|
|
7555
7570
|
return;
|
|
7556
7571
|
}
|
|
@@ -7777,7 +7792,7 @@ function AlertMinimal({
|
|
|
7777
7792
|
import { Paper as Paper3, Transition as Transition8 } from "@mantine/core";
|
|
7778
7793
|
import {
|
|
7779
7794
|
useCallback as useCallback2,
|
|
7780
|
-
useEffect as
|
|
7795
|
+
useEffect as useEffect7,
|
|
7781
7796
|
useRef as useRef4,
|
|
7782
7797
|
useState as useState9
|
|
7783
7798
|
} from "react";
|
|
@@ -7914,7 +7929,7 @@ function WidgetWrapper({
|
|
|
7914
7929
|
children: element
|
|
7915
7930
|
});
|
|
7916
7931
|
}
|
|
7917
|
-
|
|
7932
|
+
useEffect7(() => {
|
|
7918
7933
|
if (!page) {
|
|
7919
7934
|
return;
|
|
7920
7935
|
}
|
package/dist/jsonforms/index.cjs
CHANGED
|
@@ -5723,6 +5723,7 @@ var useLayouts = () => {
|
|
|
5723
5723
|
var jsx_runtime7 = require("react/jsx-runtime");
|
|
5724
5724
|
// src/core/components/AppShell/index.tsx
|
|
5725
5725
|
var import_core13 = require("@mantine/core");
|
|
5726
|
+
var import_react18 = require("react");
|
|
5726
5727
|
|
|
5727
5728
|
// src/core/components/AppShell/AppProvider/index.tsx
|
|
5728
5729
|
var import_react8 = require("react");
|
|
@@ -6366,8 +6367,8 @@ function NavbarMinimalContent({
|
|
|
6366
6367
|
target: /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6367
6368
|
label: "Static elements",
|
|
6368
6369
|
icon: import_icons_react4.IconDots,
|
|
6369
|
-
responsive: buttonResponsive,
|
|
6370
|
-
collapsed: buttonCollapsed,
|
|
6370
|
+
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
6371
|
+
collapsed: orientation === "vertical" /* Vertical */ ? buttonCollapsed : true,
|
|
6371
6372
|
clickTransformation: buttonClickTransformation,
|
|
6372
6373
|
...componentsProps?.button,
|
|
6373
6374
|
componentsProps: import_lodash8.merge({
|
|
@@ -6818,7 +6819,7 @@ var getDefaultNavigationElements = ({
|
|
|
6818
6819
|
}
|
|
6819
6820
|
}
|
|
6820
6821
|
];
|
|
6821
|
-
function
|
|
6822
|
+
function Navbar2({ componentsProps }) {
|
|
6822
6823
|
const { navbarVariant } = useRemoraidApp();
|
|
6823
6824
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
6824
6825
|
return /* @__PURE__ */ jsx_runtime21.jsx(NavbarMinimal, {
|
|
@@ -6827,7 +6828,7 @@ function Navbar({ componentsProps }) {
|
|
|
6827
6828
|
}
|
|
6828
6829
|
return null;
|
|
6829
6830
|
}
|
|
6830
|
-
var Navbar_default = Object.assign(
|
|
6831
|
+
var Navbar_default = Object.assign(Navbar2, {
|
|
6831
6832
|
NavbarMinimal
|
|
6832
6833
|
});
|
|
6833
6834
|
|
|
@@ -6897,6 +6898,20 @@ function AppShell({
|
|
|
6897
6898
|
children
|
|
6898
6899
|
}) {
|
|
6899
6900
|
const theme = useRemoraidTheme();
|
|
6901
|
+
const { colorScheme } = useHydratedMantineColorScheme();
|
|
6902
|
+
import_react18.useEffect(() => {
|
|
6903
|
+
let meta = document.querySelector('meta[name="theme-color"]');
|
|
6904
|
+
if (!meta) {
|
|
6905
|
+
meta = document.createElement("meta");
|
|
6906
|
+
meta.name = "theme-color";
|
|
6907
|
+
document.head.appendChild(meta);
|
|
6908
|
+
}
|
|
6909
|
+
const { backgroundColor: computedBodyColor } = getComputedStyle(document.body);
|
|
6910
|
+
if (!computedBodyColor) {
|
|
6911
|
+
return;
|
|
6912
|
+
}
|
|
6913
|
+
meta.content = computedBodyColor;
|
|
6914
|
+
}, [colorScheme]);
|
|
6900
6915
|
return /* @__PURE__ */ jsx_runtime23.jsx(AppProvider, {
|
|
6901
6916
|
appContext: appContext2,
|
|
6902
6917
|
...componentsProps?.AppProvider,
|
|
@@ -6904,7 +6919,7 @@ function AppShell({
|
|
|
6904
6919
|
...componentsProps?.AppShellUserExperienceProvider,
|
|
6905
6920
|
initialValue: import_lodash13.merge(initialUserExperience, componentsProps?.AppShellUserExperienceProvider?.initialValue),
|
|
6906
6921
|
children: /* @__PURE__ */ jsx_runtime23.jsx(import_core13.Box, {
|
|
6907
|
-
h: "
|
|
6922
|
+
h: "100dvh",
|
|
6908
6923
|
...componentsProps?.container,
|
|
6909
6924
|
children: /* @__PURE__ */ jsx_runtime23.jsxs(FrameLayout_default, {
|
|
6910
6925
|
layoutId: remoraidAppShellLayoutId,
|
|
@@ -6933,17 +6948,17 @@ var import_core16 = require("@mantine/core");
|
|
|
6933
6948
|
|
|
6934
6949
|
// src/core/components/Page/index.tsx
|
|
6935
6950
|
var import_core14 = require("@mantine/core");
|
|
6936
|
-
var
|
|
6951
|
+
var import_react19 = __toESM(require("react"));
|
|
6937
6952
|
var import_navigation3 = require("next/navigation");
|
|
6938
6953
|
var jsx_runtime24 = require("react/jsx-runtime");
|
|
6939
|
-
var pageContext =
|
|
6954
|
+
var pageContext = import_react19.default.createContext(null);
|
|
6940
6955
|
var usePage = () => {
|
|
6941
|
-
return
|
|
6956
|
+
return import_react19.useContext(pageContext);
|
|
6942
6957
|
};
|
|
6943
6958
|
|
|
6944
6959
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
6945
6960
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
6946
|
-
var
|
|
6961
|
+
var import_react20 = require("react");
|
|
6947
6962
|
|
|
6948
6963
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
6949
6964
|
var import_core15 = require("@mantine/core");
|
|
@@ -6954,7 +6969,7 @@ var import_lodash14 = __toESM(require_lodash());
|
|
|
6954
6969
|
var jsx_runtime26 = require("react/jsx-runtime");
|
|
6955
6970
|
// src/core/components/BadgeGroup/index.tsx
|
|
6956
6971
|
var import_core18 = require("@mantine/core");
|
|
6957
|
-
var
|
|
6972
|
+
var import_react21 = __toESM(require("react"));
|
|
6958
6973
|
|
|
6959
6974
|
// src/core/components/BadgeMinimal/index.tsx
|
|
6960
6975
|
var import_core17 = require("@mantine/core");
|
|
@@ -7106,7 +7121,7 @@ function AlertMinimal({
|
|
|
7106
7121
|
}
|
|
7107
7122
|
// src/core/components/Widget/WidgetWrapper/index.tsx
|
|
7108
7123
|
var import_core20 = require("@mantine/core");
|
|
7109
|
-
var
|
|
7124
|
+
var import_react22 = require("react");
|
|
7110
7125
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
7111
7126
|
var import_lodash17 = __toESM(require_lodash());
|
|
7112
7127
|
var jsx_runtime30 = require("react/jsx-runtime");
|
|
@@ -7130,11 +7145,11 @@ function WidgetWrapper({
|
|
|
7130
7145
|
} = useWidgets();
|
|
7131
7146
|
const page = usePage();
|
|
7132
7147
|
const theme = useRemoraidTheme();
|
|
7133
|
-
const [controlsContainer, setControlsContainer] =
|
|
7148
|
+
const [controlsContainer, setControlsContainer] = import_react22.useState(null);
|
|
7134
7149
|
const widget = page ? widgets[page.pageId]?.[config.widgetId] : undefined;
|
|
7135
7150
|
const pageRegistered = page ? isPageRegistered(page.pageId) : false;
|
|
7136
|
-
const containerRef =
|
|
7137
|
-
const controlsContainerRef =
|
|
7151
|
+
const containerRef = import_react22.useRef(null);
|
|
7152
|
+
const controlsContainerRef = import_react22.useCallback((n) => {
|
|
7138
7153
|
setControlsContainer(n);
|
|
7139
7154
|
}, [setControlsContainer]);
|
|
7140
7155
|
const handleEnter = () => {
|
|
@@ -7240,7 +7255,7 @@ function WidgetWrapper({
|
|
|
7240
7255
|
children: element
|
|
7241
7256
|
});
|
|
7242
7257
|
}
|
|
7243
|
-
|
|
7258
|
+
import_react22.useEffect(() => {
|
|
7244
7259
|
if (!page) {
|
|
7245
7260
|
return;
|
|
7246
7261
|
}
|
|
@@ -7252,7 +7267,7 @@ function WidgetWrapper({
|
|
|
7252
7267
|
}
|
|
7253
7268
|
// src/core/components/Widget/index.tsx
|
|
7254
7269
|
var import_core21 = require("@mantine/core");
|
|
7255
|
-
var
|
|
7270
|
+
var import_react23 = require("react");
|
|
7256
7271
|
var import_lodash18 = __toESM(require_lodash());
|
|
7257
7272
|
var jsx_runtime31 = require("react/jsx-runtime");
|
|
7258
7273
|
var react2 = require("react");
|
|
@@ -7366,7 +7381,7 @@ function Widget({
|
|
|
7366
7381
|
});
|
|
7367
7382
|
})
|
|
7368
7383
|
}),
|
|
7369
|
-
(loading ||
|
|
7384
|
+
(loading || import_react23.Children.toArray(children).length > 0) && /* @__PURE__ */ jsx_runtime31.jsx(import_core21.ScrollArea.Autosize, {
|
|
7370
7385
|
flex: 1,
|
|
7371
7386
|
...componentsProps?.childrenContainer,
|
|
7372
7387
|
className: clsx_default("remoraid-widget-children-container", componentsProps?.childrenContainer?.className),
|
|
@@ -7386,7 +7401,7 @@ var jsx_runtime32 = require("react/jsx-runtime");
|
|
|
7386
7401
|
// src/core/components/EnvironmentShell/index.tsx
|
|
7387
7402
|
var jsx_runtime33 = require("react/jsx-runtime");
|
|
7388
7403
|
// src/core/components/SettingsWidget/index.tsx
|
|
7389
|
-
var
|
|
7404
|
+
var import_react24 = require("react");
|
|
7390
7405
|
var import_icons_react12 = require("@tabler/icons-react");
|
|
7391
7406
|
|
|
7392
7407
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
|
@@ -7428,9 +7443,9 @@ function SaveButton({
|
|
|
7428
7443
|
// src/core/components/SettingsWidget/index.tsx
|
|
7429
7444
|
var jsx_runtime35 = require("react/jsx-runtime");
|
|
7430
7445
|
var defaultSettingsWidgetContext = {};
|
|
7431
|
-
var settingsWidgetContext =
|
|
7446
|
+
var settingsWidgetContext = import_react24.createContext(defaultSettingsWidgetContext);
|
|
7432
7447
|
var useSettingsWidgetContext = () => {
|
|
7433
|
-
return
|
|
7448
|
+
return import_react24.useContext(settingsWidgetContext);
|
|
7434
7449
|
};
|
|
7435
7450
|
function SettingsWidget({
|
|
7436
7451
|
children,
|
|
@@ -7476,7 +7491,7 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
|
|
|
7476
7491
|
SaveButton
|
|
7477
7492
|
});
|
|
7478
7493
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
|
7479
|
-
var
|
|
7494
|
+
var import_react25 = require("react");
|
|
7480
7495
|
var import_core24 = require("@mantine/core");
|
|
7481
7496
|
|
|
7482
7497
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
|
@@ -7509,9 +7524,9 @@ var jsx_runtime37 = require("react/jsx-runtime");
|
|
|
7509
7524
|
var defaultSettingsTableOptions = {
|
|
7510
7525
|
leftColumnWidth: "38.2%"
|
|
7511
7526
|
};
|
|
7512
|
-
var settingsTableOptionsContext =
|
|
7527
|
+
var settingsTableOptionsContext = import_react25.createContext(defaultSettingsTableOptions);
|
|
7513
7528
|
var useSettingsTableOptions = () => {
|
|
7514
|
-
return
|
|
7529
|
+
return import_react25.useContext(settingsTableOptionsContext);
|
|
7515
7530
|
};
|
|
7516
7531
|
function SettingsTable({
|
|
7517
7532
|
leftColumnWidth,
|
|
@@ -7546,11 +7561,11 @@ var import_lodash20 = __toESM(require_lodash());
|
|
|
7546
7561
|
var import_core26 = require("@mantine/core");
|
|
7547
7562
|
var jsx_runtime39 = require("react/jsx-runtime");
|
|
7548
7563
|
// src/core/components/ContextClusterProvider/index.tsx
|
|
7549
|
-
var
|
|
7564
|
+
var import_react26 = __toESM(require("react"));
|
|
7550
7565
|
var jsx_runtime40 = require("react/jsx-runtime");
|
|
7551
7566
|
// src/core/components/InputWrapperScrollArea/index.tsx
|
|
7552
7567
|
var import_core27 = require("@mantine/core");
|
|
7553
|
-
var
|
|
7568
|
+
var import_react27 = require("react");
|
|
7554
7569
|
var import_core28 = require("remoraid/core");
|
|
7555
7570
|
var jsx_runtime41 = require("react/jsx-runtime");
|
|
7556
7571
|
function InputWrapperScrollArea({
|
|
@@ -7563,7 +7578,7 @@ function InputWrapperScrollArea({
|
|
|
7563
7578
|
componentsProps
|
|
7564
7579
|
}) {
|
|
7565
7580
|
const theme = import_core28.useRemoraidTheme();
|
|
7566
|
-
const [isHovering, setIsHovering] =
|
|
7581
|
+
const [isHovering, setIsHovering] = import_react27.useState(false);
|
|
7567
7582
|
return /* @__PURE__ */ jsx_runtime41.jsx(import_core27.Input.Wrapper, {
|
|
7568
7583
|
label,
|
|
7569
7584
|
error,
|
|
@@ -7597,27 +7612,27 @@ function InputWrapperScrollArea({
|
|
|
7597
7612
|
});
|
|
7598
7613
|
}
|
|
7599
7614
|
// src/jsonforms/renderers/AnyControl.tsx
|
|
7600
|
-
var
|
|
7615
|
+
var import_react29 = require("@jsonforms/react");
|
|
7601
7616
|
var import_core30 = require("@mantine/core");
|
|
7602
|
-
var
|
|
7617
|
+
var import_react30 = require("react");
|
|
7603
7618
|
|
|
7604
7619
|
// src/jsonforms/components/FormOptionsProvider/index.tsx
|
|
7605
|
-
var
|
|
7620
|
+
var import_react28 = __toESM(require("react"));
|
|
7606
7621
|
var jsx_runtime42 = require("react/jsx-runtime");
|
|
7607
7622
|
var defaultFormOptions = {
|
|
7608
7623
|
withDescriptions: false,
|
|
7609
7624
|
gutter: "md"
|
|
7610
7625
|
};
|
|
7611
|
-
var formOptionsContext =
|
|
7626
|
+
var formOptionsContext = import_react28.default.createContext({
|
|
7612
7627
|
formOptions: defaultFormOptions,
|
|
7613
7628
|
updateFormOptions: () => {}
|
|
7614
7629
|
});
|
|
7615
|
-
var useFormOptions = () =>
|
|
7630
|
+
var useFormOptions = () => import_react28.useContext(formOptionsContext);
|
|
7616
7631
|
function FormOptionsProvider({
|
|
7617
7632
|
children,
|
|
7618
7633
|
initialValue
|
|
7619
7634
|
}) {
|
|
7620
|
-
const [formOptions, setFormOptions] =
|
|
7635
|
+
const [formOptions, setFormOptions] = import_react28.useState({
|
|
7621
7636
|
...defaultFormOptions,
|
|
7622
7637
|
...initialValue
|
|
7623
7638
|
});
|
|
@@ -7644,8 +7659,8 @@ function PlainAnyControl({
|
|
|
7644
7659
|
const {
|
|
7645
7660
|
formOptions: { withDescriptions }
|
|
7646
7661
|
} = useFormOptions();
|
|
7647
|
-
const [input, setInput] =
|
|
7648
|
-
const [error, setError] =
|
|
7662
|
+
const [input, setInput] = import_react30.useState(JSON.stringify(data, null, theme.jsonStringifySpace));
|
|
7663
|
+
const [error, setError] = import_react30.useState(false);
|
|
7649
7664
|
const label = labelProp !== "remoraid-array-item" ? labelProp : null;
|
|
7650
7665
|
const description = withDescriptions ? schema.description : undefined;
|
|
7651
7666
|
return /* @__PURE__ */ jsx_runtime43.jsx(InputWrapperScrollArea, {
|
|
@@ -7675,14 +7690,14 @@ function PlainAnyControl({
|
|
|
7675
7690
|
})
|
|
7676
7691
|
});
|
|
7677
7692
|
}
|
|
7678
|
-
var AnyControl =
|
|
7693
|
+
var AnyControl = import_react29.withJsonFormsControlProps(PlainAnyControl);
|
|
7679
7694
|
var AnyControl_default = AnyControl;
|
|
7680
7695
|
|
|
7681
7696
|
// src/jsonforms/renderers/AnyOfControl.tsx
|
|
7682
|
-
var
|
|
7697
|
+
var import_react31 = require("@jsonforms/react");
|
|
7683
7698
|
var import_core31 = require("@jsonforms/core");
|
|
7684
7699
|
var import_core32 = require("@mantine/core");
|
|
7685
|
-
var
|
|
7700
|
+
var import_react32 = require("react");
|
|
7686
7701
|
var jsx_runtime44 = require("react/jsx-runtime");
|
|
7687
7702
|
function PlainAnyOfControl({
|
|
7688
7703
|
data,
|
|
@@ -7694,7 +7709,7 @@ function PlainAnyOfControl({
|
|
|
7694
7709
|
rootSchema
|
|
7695
7710
|
}) {
|
|
7696
7711
|
const { formOptions } = useFormOptions();
|
|
7697
|
-
const { core, renderers, cells } =
|
|
7712
|
+
const { core, renderers, cells } = import_react31.useJsonForms();
|
|
7698
7713
|
const inferType = (schema2) => {
|
|
7699
7714
|
if (!schema2) {
|
|
7700
7715
|
return;
|
|
@@ -7714,7 +7729,7 @@ function PlainAnyOfControl({
|
|
|
7714
7729
|
}
|
|
7715
7730
|
return;
|
|
7716
7731
|
};
|
|
7717
|
-
const options =
|
|
7732
|
+
const options = import_react32.useMemo(() => {
|
|
7718
7733
|
const anyOf = schema.anyOf ?? [];
|
|
7719
7734
|
return anyOf.map((opt, idx) => {
|
|
7720
7735
|
const resolved = opt.$ref ? import_core31.Resolve.schema(rootSchema, opt.$ref, rootSchema) : opt;
|
|
@@ -7724,7 +7739,7 @@ function PlainAnyOfControl({
|
|
|
7724
7739
|
return { original: opt, resolved, label: label2 };
|
|
7725
7740
|
});
|
|
7726
7741
|
}, [schema.anyOf, rootSchema]);
|
|
7727
|
-
const isValidOptionIndex =
|
|
7742
|
+
const isValidOptionIndex = import_react32.useMemo(() => {
|
|
7728
7743
|
return (optionIndex) => {
|
|
7729
7744
|
if (!core?.ajv || data === undefined) {
|
|
7730
7745
|
return false;
|
|
@@ -7733,7 +7748,7 @@ function PlainAnyOfControl({
|
|
|
7733
7748
|
return validate(data);
|
|
7734
7749
|
};
|
|
7735
7750
|
}, [core?.ajv, data, options]);
|
|
7736
|
-
const validOptionIndex =
|
|
7751
|
+
const validOptionIndex = import_react32.useMemo(() => {
|
|
7737
7752
|
for (let i = 0;i < options.length; i++) {
|
|
7738
7753
|
if (isValidOptionIndex(i)) {
|
|
7739
7754
|
return i;
|
|
@@ -7741,7 +7756,7 @@ function PlainAnyOfControl({
|
|
|
7741
7756
|
}
|
|
7742
7757
|
return -1;
|
|
7743
7758
|
}, [options, isValidOptionIndex]);
|
|
7744
|
-
const [selectedOption, setSelectedOption] =
|
|
7759
|
+
const [selectedOption, setSelectedOption] = import_react32.useState(validOptionIndex >= 0 ? String(validOptionIndex) : null);
|
|
7745
7760
|
const schemaDefaultValue = (opt) => {
|
|
7746
7761
|
const t = opt.type ?? (opt.properties ? "object" : opt.items ? "array" : undefined);
|
|
7747
7762
|
switch (t) {
|
|
@@ -7800,7 +7815,7 @@ function PlainAnyOfControl({
|
|
|
7800
7815
|
variant: "default",
|
|
7801
7816
|
mb: selectedOption !== null && inferType(selectedSchema) !== "null" ? formOptions.gutter : undefined
|
|
7802
7817
|
}),
|
|
7803
|
-
selectedOption !== null && /* @__PURE__ */ jsx_runtime44.jsx(
|
|
7818
|
+
selectedOption !== null && /* @__PURE__ */ jsx_runtime44.jsx(import_react31.JsonForms, {
|
|
7804
7819
|
schema: {
|
|
7805
7820
|
...selectedSchema,
|
|
7806
7821
|
$schema: undefined
|
|
@@ -7818,11 +7833,11 @@ function PlainAnyOfControl({
|
|
|
7818
7833
|
})
|
|
7819
7834
|
});
|
|
7820
7835
|
}
|
|
7821
|
-
var AnyOfControl =
|
|
7836
|
+
var AnyOfControl = import_react31.withJsonFormsControlProps(PlainAnyOfControl);
|
|
7822
7837
|
var AnyOfControl_default = AnyOfControl;
|
|
7823
7838
|
|
|
7824
7839
|
// src/jsonforms/renderers/ArrayControl.tsx
|
|
7825
|
-
var
|
|
7840
|
+
var import_react33 = require("@jsonforms/react");
|
|
7826
7841
|
var import_core33 = require("@mantine/core");
|
|
7827
7842
|
var import_icons_react13 = require("@tabler/icons-react");
|
|
7828
7843
|
var import_core34 = require("remoraid/core");
|
|
@@ -7832,7 +7847,7 @@ function PlainArrayControl(props) {
|
|
|
7832
7847
|
const theme = import_core34.useRemoraidTheme();
|
|
7833
7848
|
const { label, schema, data, handleChange, path, required } = props;
|
|
7834
7849
|
const { formOptions } = useFormOptions();
|
|
7835
|
-
const { renderers, cells } =
|
|
7850
|
+
const { renderers, cells } = import_react33.useJsonForms();
|
|
7836
7851
|
let schemaItems;
|
|
7837
7852
|
if (schema.items && !Array.isArray(schema.items)) {
|
|
7838
7853
|
schemaItems = {
|
|
@@ -7878,7 +7893,7 @@ function PlainArrayControl(props) {
|
|
|
7878
7893
|
children: [
|
|
7879
7894
|
/* @__PURE__ */ jsx_runtime45.jsx(import_core33.Box, {
|
|
7880
7895
|
flex: 1,
|
|
7881
|
-
children: /* @__PURE__ */ jsx_runtime45.jsx(
|
|
7896
|
+
children: /* @__PURE__ */ jsx_runtime45.jsx(import_react33.JsonForms, {
|
|
7882
7897
|
schema: schemaItems,
|
|
7883
7898
|
data: { item },
|
|
7884
7899
|
renderers: renderers ?? [],
|
|
@@ -7933,11 +7948,11 @@ function PlainArrayControl(props) {
|
|
|
7933
7948
|
})
|
|
7934
7949
|
});
|
|
7935
7950
|
}
|
|
7936
|
-
var ArrayControl =
|
|
7951
|
+
var ArrayControl = import_react33.withJsonFormsControlProps(PlainArrayControl);
|
|
7937
7952
|
var ArrayControl_default = ArrayControl;
|
|
7938
7953
|
|
|
7939
7954
|
// src/jsonforms/renderers/CheckboxControl.tsx
|
|
7940
|
-
var
|
|
7955
|
+
var import_react34 = require("@jsonforms/react");
|
|
7941
7956
|
var import_core35 = require("@mantine/core");
|
|
7942
7957
|
var jsx_runtime46 = require("react/jsx-runtime");
|
|
7943
7958
|
function PlainCheckboxControl({
|
|
@@ -7963,11 +7978,11 @@ function PlainCheckboxControl({
|
|
|
7963
7978
|
})
|
|
7964
7979
|
});
|
|
7965
7980
|
}
|
|
7966
|
-
var CheckboxControl =
|
|
7981
|
+
var CheckboxControl = import_react34.withJsonFormsControlProps(PlainCheckboxControl);
|
|
7967
7982
|
var CheckboxControl_default = CheckboxControl;
|
|
7968
7983
|
|
|
7969
7984
|
// src/jsonforms/renderers/NumberControl.tsx
|
|
7970
|
-
var
|
|
7985
|
+
var import_react35 = require("@jsonforms/react");
|
|
7971
7986
|
var import_core36 = require("@mantine/core");
|
|
7972
7987
|
var jsx_runtime47 = require("react/jsx-runtime");
|
|
7973
7988
|
function PlainNumberControl({
|
|
@@ -7997,14 +8012,14 @@ function PlainNumberControl({
|
|
|
7997
8012
|
})
|
|
7998
8013
|
});
|
|
7999
8014
|
}
|
|
8000
|
-
var NumberControl =
|
|
8015
|
+
var NumberControl = import_react35.withJsonFormsControlProps(PlainNumberControl);
|
|
8001
8016
|
var NumberControl_default = NumberControl;
|
|
8002
8017
|
|
|
8003
8018
|
// src/jsonforms/renderers/ObjectControl.tsx
|
|
8004
|
-
var
|
|
8019
|
+
var import_react36 = require("@jsonforms/react");
|
|
8005
8020
|
var import_core37 = require("@mantine/core");
|
|
8006
8021
|
var import_core38 = require("@jsonforms/core");
|
|
8007
|
-
var
|
|
8022
|
+
var import_react37 = require("react");
|
|
8008
8023
|
var import_icons_react14 = require("@tabler/icons-react");
|
|
8009
8024
|
var jsx_runtime48 = require("react/jsx-runtime");
|
|
8010
8025
|
function PlainObjectControl({
|
|
@@ -8016,8 +8031,8 @@ function PlainObjectControl({
|
|
|
8016
8031
|
required
|
|
8017
8032
|
}) {
|
|
8018
8033
|
const { formOptions } = useFormOptions();
|
|
8019
|
-
const { renderers, cells } =
|
|
8020
|
-
const [newKey, setNewKey] =
|
|
8034
|
+
const { renderers, cells } = import_react36.useJsonForms();
|
|
8035
|
+
const [newKey, setNewKey] = import_react37.useState("");
|
|
8021
8036
|
const hasProperties = schema.properties && Object.keys(schema.properties).length > 0;
|
|
8022
8037
|
const hasAdditionalProperties = schema.additionalProperties === true || schema.additionalProperties !== undefined && Object.keys(schema.additionalProperties).length > 0;
|
|
8023
8038
|
const label = labelProp !== "remoraid-array-item" ? labelProp : null;
|
|
@@ -8040,7 +8055,7 @@ function PlainObjectControl({
|
|
|
8040
8055
|
justify: "flex-start",
|
|
8041
8056
|
gap: formOptions.gutter,
|
|
8042
8057
|
children: [
|
|
8043
|
-
hasProperties && /* @__PURE__ */ jsx_runtime48.jsx(
|
|
8058
|
+
hasProperties && /* @__PURE__ */ jsx_runtime48.jsx(import_react36.JsonForms, {
|
|
8044
8059
|
schema: {
|
|
8045
8060
|
...schema,
|
|
8046
8061
|
$schema: undefined
|
|
@@ -8068,7 +8083,7 @@ function PlainObjectControl({
|
|
|
8068
8083
|
children: [
|
|
8069
8084
|
/* @__PURE__ */ jsx_runtime48.jsx(import_core37.Box, {
|
|
8070
8085
|
flex: 1,
|
|
8071
|
-
children: /* @__PURE__ */ jsx_runtime48.jsx(
|
|
8086
|
+
children: /* @__PURE__ */ jsx_runtime48.jsx(import_react36.JsonForms, {
|
|
8072
8087
|
schema: {
|
|
8073
8088
|
...schema.additionalProperties === true ? {} : schema.additionalProperties,
|
|
8074
8089
|
title: key,
|
|
@@ -8155,11 +8170,11 @@ function PlainObjectControl({
|
|
|
8155
8170
|
})
|
|
8156
8171
|
});
|
|
8157
8172
|
}
|
|
8158
|
-
var ObjectControl =
|
|
8173
|
+
var ObjectControl = import_react36.withJsonFormsControlProps(PlainObjectControl);
|
|
8159
8174
|
var ObjectControl_default = ObjectControl;
|
|
8160
8175
|
|
|
8161
8176
|
// src/jsonforms/renderers/StringSelectControl.tsx
|
|
8162
|
-
var
|
|
8177
|
+
var import_react38 = require("@jsonforms/react");
|
|
8163
8178
|
var import_core40 = require("@mantine/core");
|
|
8164
8179
|
var jsx_runtime49 = require("react/jsx-runtime");
|
|
8165
8180
|
function PlainTimestampControl({
|
|
@@ -8188,7 +8203,7 @@ function PlainTimestampControl({
|
|
|
8188
8203
|
})
|
|
8189
8204
|
});
|
|
8190
8205
|
}
|
|
8191
|
-
var TimestampControl =
|
|
8206
|
+
var TimestampControl = import_react38.withJsonFormsControlProps(PlainTimestampControl);
|
|
8192
8207
|
var StringSelectControl_default = TimestampControl;
|
|
8193
8208
|
|
|
8194
8209
|
// src/jsonforms/renderers/testers/anyControlTesters.ts
|
|
@@ -8258,7 +8273,7 @@ var tester9 = import_core50.rankWith(2, import_core50.uiTypeIs("VerticalLayout")
|
|
|
8258
8273
|
var verticalLayoutTester_default = tester9;
|
|
8259
8274
|
|
|
8260
8275
|
// src/jsonforms/renderers/TextControl.tsx
|
|
8261
|
-
var
|
|
8276
|
+
var import_react39 = require("@jsonforms/react");
|
|
8262
8277
|
var import_core51 = require("@mantine/core");
|
|
8263
8278
|
var jsx_runtime50 = require("react/jsx-runtime");
|
|
8264
8279
|
function PlainTextControl({
|
|
@@ -8286,11 +8301,11 @@ function PlainTextControl({
|
|
|
8286
8301
|
})
|
|
8287
8302
|
});
|
|
8288
8303
|
}
|
|
8289
|
-
var TextControl =
|
|
8304
|
+
var TextControl = import_react39.withJsonFormsControlProps(PlainTextControl);
|
|
8290
8305
|
var TextControl_default = TextControl;
|
|
8291
8306
|
|
|
8292
8307
|
// src/jsonforms/renderers/TimestampControl.tsx
|
|
8293
|
-
var
|
|
8308
|
+
var import_react40 = require("@jsonforms/react");
|
|
8294
8309
|
var import_dates = require("@mantine/dates");
|
|
8295
8310
|
var jsx_runtime51 = require("react/jsx-runtime");
|
|
8296
8311
|
function PlainTimestampControl2({
|
|
@@ -8320,13 +8335,13 @@ function PlainTimestampControl2({
|
|
|
8320
8335
|
})
|
|
8321
8336
|
});
|
|
8322
8337
|
}
|
|
8323
|
-
var TimestampControl2 =
|
|
8338
|
+
var TimestampControl2 = import_react40.withJsonFormsControlProps(PlainTimestampControl2);
|
|
8324
8339
|
var TimestampControl_default = TimestampControl2;
|
|
8325
8340
|
|
|
8326
8341
|
// src/jsonforms/renderers/VerticalLayout.tsx
|
|
8327
|
-
var
|
|
8328
|
-
var import_react41 = require("@jsonforms/react");
|
|
8342
|
+
var import_react41 = __toESM(require("react"));
|
|
8329
8343
|
var import_react42 = require("@jsonforms/react");
|
|
8344
|
+
var import_react43 = require("@jsonforms/react");
|
|
8330
8345
|
var jsx_runtime52 = require("react/jsx-runtime");
|
|
8331
8346
|
"use client";
|
|
8332
8347
|
var JsonFormsLayout = ({
|
|
@@ -8341,14 +8356,14 @@ var JsonFormsLayout = ({
|
|
|
8341
8356
|
});
|
|
8342
8357
|
};
|
|
8343
8358
|
var renderChildren = (layout, schema, className, path, enabled) => {
|
|
8344
|
-
const { renderers, cells } =
|
|
8359
|
+
const { renderers, cells } = import_react43.useJsonForms();
|
|
8345
8360
|
const { formOptions } = useFormOptions();
|
|
8346
8361
|
const gutter = typeof formOptions.gutter === "string" ? `var(--mantine-spacing-${formOptions.gutter})` : `${formOptions.gutter}px`;
|
|
8347
8362
|
return layout.elements.map((child, index) => {
|
|
8348
8363
|
return /* @__PURE__ */ jsx_runtime52.jsx("div", {
|
|
8349
8364
|
className,
|
|
8350
8365
|
style: { marginTop: index === 0 ? 0 : gutter },
|
|
8351
|
-
children: /* @__PURE__ */ jsx_runtime52.jsx(
|
|
8366
|
+
children: /* @__PURE__ */ jsx_runtime52.jsx(import_react43.JsonFormsDispatch, {
|
|
8352
8367
|
renderers,
|
|
8353
8368
|
cells,
|
|
8354
8369
|
uischema: child,
|
|
@@ -8365,7 +8380,7 @@ var VerticalLayoutRenderer = (props) => {
|
|
|
8365
8380
|
...otherProps
|
|
8366
8381
|
});
|
|
8367
8382
|
};
|
|
8368
|
-
var VerticalLayoutRendererComponent =
|
|
8383
|
+
var VerticalLayoutRendererComponent = import_react41.default.memo(function VerticalLayoutRendererComponent2({
|
|
8369
8384
|
schema,
|
|
8370
8385
|
uischema,
|
|
8371
8386
|
path,
|
|
@@ -8385,7 +8400,7 @@ var VerticalLayoutRendererComponent = import_react40.default.memo(function Verti
|
|
|
8385
8400
|
children: renderChildren(verticalLayout, schema, childClassNames, path, enabled)
|
|
8386
8401
|
});
|
|
8387
8402
|
});
|
|
8388
|
-
var VerticalLayout =
|
|
8403
|
+
var VerticalLayout = import_react42.withJsonFormsLayoutProps(VerticalLayoutRenderer, false);
|
|
8389
8404
|
var VerticalLayout_default = VerticalLayout;
|
|
8390
8405
|
|
|
8391
8406
|
// src/jsonforms/renderers/index.ts
|
package/dist/jsonforms/index.js
CHANGED
|
@@ -5712,6 +5712,7 @@ var useLayouts = () => {
|
|
|
5712
5712
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
5713
5713
|
// src/core/components/AppShell/index.tsx
|
|
5714
5714
|
import { Box as Box5 } from "@mantine/core";
|
|
5715
|
+
import { useEffect as useEffect4 } from "react";
|
|
5715
5716
|
|
|
5716
5717
|
// src/core/components/AppShell/AppProvider/index.tsx
|
|
5717
5718
|
var import_lodash4 = __toESM(require_lodash(), 1);
|
|
@@ -6382,8 +6383,8 @@ function NavbarMinimalContent({
|
|
|
6382
6383
|
target: /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6383
6384
|
label: "Static elements",
|
|
6384
6385
|
icon: IconDots,
|
|
6385
|
-
responsive: buttonResponsive,
|
|
6386
|
-
collapsed: buttonCollapsed,
|
|
6386
|
+
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
6387
|
+
collapsed: orientation === "vertical" /* Vertical */ ? buttonCollapsed : true,
|
|
6387
6388
|
clickTransformation: buttonClickTransformation,
|
|
6388
6389
|
...componentsProps?.button,
|
|
6389
6390
|
componentsProps: import_lodash8.merge({
|
|
@@ -6847,7 +6848,7 @@ var getDefaultNavigationElements = ({
|
|
|
6847
6848
|
}
|
|
6848
6849
|
}
|
|
6849
6850
|
];
|
|
6850
|
-
function
|
|
6851
|
+
function Navbar2({ componentsProps }) {
|
|
6851
6852
|
const { navbarVariant } = useRemoraidApp();
|
|
6852
6853
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
6853
6854
|
return /* @__PURE__ */ jsx21(NavbarMinimal, {
|
|
@@ -6856,7 +6857,7 @@ function Navbar({ componentsProps }) {
|
|
|
6856
6857
|
}
|
|
6857
6858
|
return null;
|
|
6858
6859
|
}
|
|
6859
|
-
var Navbar_default = Object.assign(
|
|
6860
|
+
var Navbar_default = Object.assign(Navbar2, {
|
|
6860
6861
|
NavbarMinimal
|
|
6861
6862
|
});
|
|
6862
6863
|
|
|
@@ -6926,6 +6927,20 @@ function AppShell({
|
|
|
6926
6927
|
children
|
|
6927
6928
|
}) {
|
|
6928
6929
|
const theme = useRemoraidTheme();
|
|
6930
|
+
const { colorScheme } = useHydratedMantineColorScheme();
|
|
6931
|
+
useEffect4(() => {
|
|
6932
|
+
let meta = document.querySelector('meta[name="theme-color"]');
|
|
6933
|
+
if (!meta) {
|
|
6934
|
+
meta = document.createElement("meta");
|
|
6935
|
+
meta.name = "theme-color";
|
|
6936
|
+
document.head.appendChild(meta);
|
|
6937
|
+
}
|
|
6938
|
+
const { backgroundColor: computedBodyColor } = getComputedStyle(document.body);
|
|
6939
|
+
if (!computedBodyColor) {
|
|
6940
|
+
return;
|
|
6941
|
+
}
|
|
6942
|
+
meta.content = computedBodyColor;
|
|
6943
|
+
}, [colorScheme]);
|
|
6929
6944
|
return /* @__PURE__ */ jsx23(AppProvider, {
|
|
6930
6945
|
appContext: appContext2,
|
|
6931
6946
|
...componentsProps?.AppProvider,
|
|
@@ -6933,7 +6948,7 @@ function AppShell({
|
|
|
6933
6948
|
...componentsProps?.AppShellUserExperienceProvider,
|
|
6934
6949
|
initialValue: import_lodash13.merge(initialUserExperience, componentsProps?.AppShellUserExperienceProvider?.initialValue),
|
|
6935
6950
|
children: /* @__PURE__ */ jsx23(Box5, {
|
|
6936
|
-
h: "
|
|
6951
|
+
h: "100dvh",
|
|
6937
6952
|
...componentsProps?.container,
|
|
6938
6953
|
children: /* @__PURE__ */ jsxs7(FrameLayout_default, {
|
|
6939
6954
|
layoutId: remoraidAppShellLayoutId,
|
|
@@ -6972,7 +6987,7 @@ import {
|
|
|
6972
6987
|
import { Stack as Stack3 } from "@mantine/core";
|
|
6973
6988
|
import React7, {
|
|
6974
6989
|
useContext as useContext10,
|
|
6975
|
-
useEffect as
|
|
6990
|
+
useEffect as useEffect5
|
|
6976
6991
|
} from "react";
|
|
6977
6992
|
import { usePathname as usePathname3 } from "next/navigation";
|
|
6978
6993
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
@@ -6983,7 +6998,7 @@ var usePage = () => {
|
|
|
6983
6998
|
|
|
6984
6999
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
6985
7000
|
import { IconCheck, IconFocus, IconNavigation } from "@tabler/icons-react";
|
|
6986
|
-
import { useEffect as
|
|
7001
|
+
import { useEffect as useEffect6, useRef as useRef3, useState as useState8 } from "react";
|
|
6987
7002
|
|
|
6988
7003
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
6989
7004
|
import {
|
|
@@ -7162,7 +7177,7 @@ function AlertMinimal({
|
|
|
7162
7177
|
import { Paper as Paper3, Transition as Transition8 } from "@mantine/core";
|
|
7163
7178
|
import {
|
|
7164
7179
|
useCallback as useCallback2,
|
|
7165
|
-
useEffect as
|
|
7180
|
+
useEffect as useEffect7,
|
|
7166
7181
|
useRef as useRef4,
|
|
7167
7182
|
useState as useState9
|
|
7168
7183
|
} from "react";
|
|
@@ -7299,7 +7314,7 @@ function WidgetWrapper({
|
|
|
7299
7314
|
children: element
|
|
7300
7315
|
});
|
|
7301
7316
|
}
|
|
7302
|
-
|
|
7317
|
+
useEffect7(() => {
|
|
7303
7318
|
if (!page) {
|
|
7304
7319
|
return;
|
|
7305
7320
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remoraid",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.43.2",
|
|
4
4
|
"author": "Konrad Goldammer",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@types/react": "^19.1.2",
|
|
16
16
|
"@types/react-dom": "^19.1.6",
|
|
17
17
|
"bun-dts": "^0.1.22",
|
|
18
|
-
"next": "
|
|
18
|
+
"next": "16.0.3",
|
|
19
19
|
"react": "^19.1.0",
|
|
20
20
|
"react-cookie": "^8.0.1"
|
|
21
21
|
},
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react": "^19.1.0",
|
|
24
24
|
"react-dom": "^19.1.0",
|
|
25
25
|
"react-cookie": "^8.0.1",
|
|
26
|
-
"next": "
|
|
26
|
+
"next": "16.0.3",
|
|
27
27
|
"@mantine/core": "^7.17.4",
|
|
28
28
|
"@mantine/hooks": "^7.17.4",
|
|
29
29
|
"@mantine/dates": "7.17.4",
|