remoraid 2.0.0 → 2.1.7

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.
@@ -1,11 +1,15 @@
1
- import { MantineSize } from "@mantine/core";
1
+ import { ContainerProps, MantineSize } from "@mantine/core";
2
2
  interface EnvironmentShellProps {
3
- vars: string[];
3
+ environment: Record<string, string | undefined>;
4
4
  message?: string;
5
5
  m?: MantineSize | number;
6
6
  mt?: MantineSize | number;
7
+ withContainer?: boolean;
8
+ componentsProps?: {
9
+ container?: ContainerProps
10
+ };
7
11
  }
8
12
  import { PropsWithChildren as PropsWithChildren2, ReactNode as ReactNode2 } from "react";
9
13
  interface ServerEnvironmentShellProps extends EnvironmentShellProps {}
10
- declare function EnvironmentShell({ children, vars, message }: PropsWithChildren2<ServerEnvironmentShellProps>): ReactNode2;
11
- export { EnvironmentShell };
14
+ declare function EnvironmentShell({ children, environment, message }: PropsWithChildren2<ServerEnvironmentShellProps>): ReactNode2;
15
+ export { ServerEnvironmentShellProps, EnvironmentShell };
@@ -2,40 +2,40 @@
2
2
  import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
3
3
  function EnvironmentShell({
4
4
  children,
5
- vars,
5
+ environment,
6
6
  message
7
7
  }) {
8
- const missingVars = vars.filter((v) => !process.env[v]);
9
- if (missingVars.length !== 0) {
10
- return /* @__PURE__ */ jsxDEV("div", {
11
- style: { padding: 5 },
12
- children: [
13
- /* @__PURE__ */ jsxDEV("h1", {
14
- style: { fontWeight: 700 },
15
- children: [
16
- "Environment variable",
17
- missingVars.length > 1 ? "s" : "",
18
- " missing:"
19
- ]
20
- }, undefined, true, undefined, this),
21
- /* @__PURE__ */ jsxDEV("ul", {
22
- style: { margin: 5 },
23
- children: missingVars.map((v, i) => /* @__PURE__ */ jsxDEV("li", {
24
- children: v
25
- }, i, false, undefined, this))
26
- }, undefined, false, undefined, this),
27
- /* @__PURE__ */ jsxDEV("p", {
28
- children: "Please specify in your '.env' file."
29
- }, undefined, false, undefined, this),
30
- message !== undefined && /* @__PURE__ */ jsxDEV("p", {
31
- children: "message"
32
- }, undefined, false, undefined, this)
33
- ]
34
- }, undefined, true, undefined, this);
8
+ const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
9
+ if (undefinedKeys.length === 0) {
10
+ return /* @__PURE__ */ jsxDEV(Fragment, {
11
+ children
12
+ }, undefined, false, undefined, this);
35
13
  }
36
- return /* @__PURE__ */ jsxDEV(Fragment, {
37
- children
38
- }, undefined, false, undefined, this);
14
+ return /* @__PURE__ */ jsxDEV("div", {
15
+ style: { padding: 5 },
16
+ children: [
17
+ /* @__PURE__ */ jsxDEV("h1", {
18
+ style: { fontWeight: 700 },
19
+ children: [
20
+ "Environment variable",
21
+ undefinedKeys.length > 1 ? "s" : "",
22
+ " missing:"
23
+ ]
24
+ }, undefined, true, undefined, this),
25
+ /* @__PURE__ */ jsxDEV("ul", {
26
+ style: { margin: 5 },
27
+ children: undefinedKeys.map((v, i) => /* @__PURE__ */ jsxDEV("li", {
28
+ children: v
29
+ }, i, false, undefined, this))
30
+ }, undefined, false, undefined, this),
31
+ /* @__PURE__ */ jsxDEV("p", {
32
+ children: "Please specify in your '.env' file."
33
+ }, undefined, false, undefined, this),
34
+ message !== undefined && /* @__PURE__ */ jsxDEV("p", {
35
+ children: "message"
36
+ }, undefined, false, undefined, this)
37
+ ]
38
+ }, undefined, true, undefined, this);
39
39
  }
40
40
  export {
41
41
  EnvironmentShell
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remoraid",
3
- "version": "2.0.0",
3
+ "version": "2.1.7",
4
4
  "author": "Konrad Goldammer",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,6 +25,7 @@
25
25
  "@mantine/core": "^7.17.4",
26
26
  "@mantine/hooks": "^7.17.4",
27
27
  "@mantine/dates": "7.17.4",
28
+ "@mantine/modals": "7.17.4",
28
29
  "@tabler/icons-react": "^3.31.0",
29
30
  "@jsonforms/core": "^3.5.1",
30
31
  "@jsonforms/react": "^3.5.1",
@@ -48,6 +49,11 @@
48
49
  "types": "./dist/jsonforms/index.d.ts",
49
50
  "import": "./dist/jsonforms/index.js",
50
51
  "require": "./dist/jsonforms/index.cjs"
52
+ },
53
+ "./modals": {
54
+ "types": "./dist/modals/index.d.ts",
55
+ "import": "./dist/modals/index.js",
56
+ "require": "./dist/modals/index.cjs"
51
57
  }
52
58
  },
53
59
  "bugs": "https://github.com/konradag/remoraid/issues",