remoraid 2.43.2 → 2.44.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/adapters/next/index.cjs +84 -0
- package/dist/adapters/next/index.d.ts +27 -0
- package/dist/adapters/next/index.js +43 -0
- package/dist/adapters/react-router/index.cjs +47 -0
- package/dist/adapters/react-router/index.d.ts +7 -0
- package/dist/adapters/react-router/index.js +15 -0
- package/dist/core/index.cjs +292 -266
- package/dist/core/index.d.ts +83 -73
- package/dist/core/index.js +276 -247
- package/dist/jsonforms/index.cjs +262 -274
- package/dist/jsonforms/index.js +248 -257
- package/dist/server/index.d.ts +2 -2
- package/package.json +22 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
9
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
|
+
for (let key of __getOwnPropNames(mod))
|
|
12
|
+
if (!__hasOwnProp.call(to, key))
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: () => mod[key],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
20
|
+
var __toCommonJS = (from) => {
|
|
21
|
+
var entry = __moduleCache.get(from), desc;
|
|
22
|
+
if (entry)
|
|
23
|
+
return entry;
|
|
24
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
26
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
27
|
+
get: () => from[key],
|
|
28
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
+
}));
|
|
30
|
+
__moduleCache.set(from, entry);
|
|
31
|
+
return entry;
|
|
32
|
+
};
|
|
33
|
+
var __export = (target, all) => {
|
|
34
|
+
for (var name in all)
|
|
35
|
+
__defProp(target, name, {
|
|
36
|
+
get: all[name],
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
set: (newValue) => all[name] = () => newValue
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// src/adapters/next/index.ts
|
|
44
|
+
var exports_next = {};
|
|
45
|
+
__export(exports_next, {
|
|
46
|
+
useNextRouterAdapter: () => useNextRouterAdapter,
|
|
47
|
+
LogoImage: () => LogoImage
|
|
48
|
+
});
|
|
49
|
+
module.exports = __toCommonJS(exports_next);
|
|
50
|
+
|
|
51
|
+
// src/adapters/next/lib/utils.ts
|
|
52
|
+
var import_navigation = require("next/navigation");
|
|
53
|
+
var useNextRouterAdapter = () => {
|
|
54
|
+
const router = import_navigation.useRouter();
|
|
55
|
+
const pathname = import_navigation.usePathname();
|
|
56
|
+
return {
|
|
57
|
+
pathname,
|
|
58
|
+
push: (href) => router.push(href),
|
|
59
|
+
replace: (href) => router.replace(href)
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
// src/adapters/next/components/LogoImage/index.tsx
|
|
63
|
+
var import_image = __toESM(require("next/image"));
|
|
64
|
+
var import_core = require("remoraid/core");
|
|
65
|
+
var jsx_runtime = require("react/jsx-runtime");
|
|
66
|
+
function LogoImage({
|
|
67
|
+
src,
|
|
68
|
+
size,
|
|
69
|
+
buttonSize,
|
|
70
|
+
componentsProps
|
|
71
|
+
}) {
|
|
72
|
+
const theme = import_core.useRemoraidTheme();
|
|
73
|
+
const iconSize = size ?? import_core.getDefaultButtonIconSize(buttonSize ?? import_core.defaultRemoraidButtonSize);
|
|
74
|
+
return /* @__PURE__ */ jsx_runtime.jsx(import_image.default, {
|
|
75
|
+
src,
|
|
76
|
+
alt: "App logo",
|
|
77
|
+
...componentsProps?.image,
|
|
78
|
+
style: {
|
|
79
|
+
width: theme.componentsProps.icons[iconSize].size,
|
|
80
|
+
height: theme.componentsProps.icons[iconSize].size,
|
|
81
|
+
...componentsProps?.image?.style
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare enum RemoraidIconSize {
|
|
2
|
+
Tiny = "tiny",
|
|
3
|
+
ExtraSmall = "extraSmall",
|
|
4
|
+
Small = "small",
|
|
5
|
+
Medium = "medium",
|
|
6
|
+
Large = "large",
|
|
7
|
+
Huge = "huge"
|
|
8
|
+
}
|
|
9
|
+
interface RouterAdapter {
|
|
10
|
+
pathname: string;
|
|
11
|
+
push: (href: string) => void;
|
|
12
|
+
replace?: (href: string) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const useNextRouterAdapter: () => RouterAdapter;
|
|
15
|
+
import { MantineSize as MantineSize11 } from "@mantine/core";
|
|
16
|
+
import { ImageProps } from "next/image";
|
|
17
|
+
import { ReactElement as ReactElement5 } from "react";
|
|
18
|
+
interface LogoImageProps {
|
|
19
|
+
src: ImageProps["src"];
|
|
20
|
+
size?: RemoraidIconSize;
|
|
21
|
+
buttonSize?: MantineSize11;
|
|
22
|
+
componentsProps?: {
|
|
23
|
+
image?: Partial<ImageProps>
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
declare function LogoImage({ src, size, buttonSize, componentsProps }: LogoImageProps): ReactElement5;
|
|
27
|
+
export { useNextRouterAdapter, LogoImageProps, LogoImage };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/adapters/next/lib/utils.ts
|
|
3
|
+
import { usePathname, useRouter } from "next/navigation";
|
|
4
|
+
var useNextRouterAdapter = () => {
|
|
5
|
+
const router = useRouter();
|
|
6
|
+
const pathname = usePathname();
|
|
7
|
+
return {
|
|
8
|
+
pathname,
|
|
9
|
+
push: (href) => router.push(href),
|
|
10
|
+
replace: (href) => router.replace(href)
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
// src/adapters/next/components/LogoImage/index.tsx
|
|
14
|
+
import Image from "next/image";
|
|
15
|
+
import {
|
|
16
|
+
getDefaultButtonIconSize,
|
|
17
|
+
useRemoraidTheme,
|
|
18
|
+
defaultRemoraidButtonSize
|
|
19
|
+
} from "remoraid/core";
|
|
20
|
+
import { jsx } from "react/jsx-runtime";
|
|
21
|
+
function LogoImage({
|
|
22
|
+
src,
|
|
23
|
+
size,
|
|
24
|
+
buttonSize,
|
|
25
|
+
componentsProps
|
|
26
|
+
}) {
|
|
27
|
+
const theme = useRemoraidTheme();
|
|
28
|
+
const iconSize = size ?? getDefaultButtonIconSize(buttonSize ?? defaultRemoraidButtonSize);
|
|
29
|
+
return /* @__PURE__ */ jsx(Image, {
|
|
30
|
+
src,
|
|
31
|
+
alt: "App logo",
|
|
32
|
+
...componentsProps?.image,
|
|
33
|
+
style: {
|
|
34
|
+
width: theme.componentsProps.icons[iconSize].size,
|
|
35
|
+
height: theme.componentsProps.icons[iconSize].size,
|
|
36
|
+
...componentsProps?.image?.style
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
useNextRouterAdapter,
|
|
42
|
+
LogoImage
|
|
43
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
7
|
+
var __toCommonJS = (from) => {
|
|
8
|
+
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
if (entry)
|
|
10
|
+
return entry;
|
|
11
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
13
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
}));
|
|
17
|
+
__moduleCache.set(from, entry);
|
|
18
|
+
return entry;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, {
|
|
23
|
+
get: all[name],
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
set: (newValue) => all[name] = () => newValue
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// src/adapters/react-router/index.ts
|
|
31
|
+
var exports_react_router = {};
|
|
32
|
+
__export(exports_react_router, {
|
|
33
|
+
useReactRouterAdapter: () => useReactRouterAdapter
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(exports_react_router);
|
|
36
|
+
|
|
37
|
+
// src/adapters/react-router/lib/utils.ts
|
|
38
|
+
var import_react_router_dom = require("react-router-dom");
|
|
39
|
+
var useReactRouterAdapter = () => {
|
|
40
|
+
const location = import_react_router_dom.useLocation();
|
|
41
|
+
const navigate = import_react_router_dom.useNavigate();
|
|
42
|
+
return {
|
|
43
|
+
pathname: location.pathname,
|
|
44
|
+
push: (href) => navigate(href),
|
|
45
|
+
replace: (href) => navigate(href, { replace: true })
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/adapters/react-router/lib/utils.ts
|
|
3
|
+
import { useLocation, useNavigate } from "react-router-dom";
|
|
4
|
+
var useReactRouterAdapter = () => {
|
|
5
|
+
const location = useLocation();
|
|
6
|
+
const navigate = useNavigate();
|
|
7
|
+
return {
|
|
8
|
+
pathname: location.pathname,
|
|
9
|
+
push: (href) => navigate(href),
|
|
10
|
+
replace: (href) => navigate(href, { replace: true })
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
useReactRouterAdapter
|
|
15
|
+
};
|