remoraid 2.1.7 → 2.2.5

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,303 +1,15 @@
1
1
  "use client";
2
2
  // src/modals/components/JSONModal/index.tsx
3
3
  import { JsonInput } from "@mantine/core";
4
-
5
- // src/core/components/RemoraidProvider/UserExperienceProvider/index.tsx
6
- import React3, {
7
- useContext as useContext2,
8
- useEffect,
9
- useState as useState2
10
- } from "react";
11
- import { useCookies } from "react-cookie";
12
-
13
- // src/core/components/AppShell/NavbarMinimal/index.tsx
14
- import {
15
- Tooltip,
16
- UnstyledButton,
17
- Stack,
18
- rem,
19
- useMantineColorScheme as useMantineColorScheme2,
20
- Flex,
21
- Paper,
22
- Divider,
23
- Indicator
24
- } from "@mantine/core";
25
- import {
26
- IconLogin,
27
- IconLogout,
28
- IconMoon,
29
- IconSun
30
- } from "@tabler/icons-react";
31
- import Link from "next/link";
32
- import { usePathname } from "next/navigation";
33
- import { useState } from "react";
34
-
35
- // src/core/lib/utils.ts
36
- var co = (condition, value, fallback) => condition(value) ? value : fallback;
37
-
38
- // src/core/components/RemoraidProvider/ThemeProvider/index.tsx
39
- import {
40
- px,
41
- rgba,
42
- useMantineColorScheme,
43
- useMantineTheme
44
- } from "@mantine/core";
45
- import {
46
- IconAlertCircle,
47
- IconCircleCheck,
48
- IconInfoCircle
49
- } from "@tabler/icons-react";
50
- import React2, {
51
- useContext,
52
- useMemo
53
- } from "react";
54
- import { jsxDEV } from "react/jsx-dev-runtime";
55
- var isMantinePrimaryShade = (primaryShade) => {
56
- if (isNaN(Number(primaryShade))) {
57
- return true;
58
- }
59
- return false;
60
- };
61
- var createRemoraidTheme = (customTheme, mantineTheme, colorScheme) => {
62
- const defaultMediumIconProps = { size: "1.125em" };
63
- let transparentBackground;
64
- let primaryColor;
65
- let spacingPx;
66
- if (mantineTheme && colorScheme) {
67
- transparentBackground = colorScheme === "dark" ? rgba(mantineTheme.colors.dark[8], 0.8) : rgba(mantineTheme.white, 0.8);
68
- primaryColor = mantineTheme.colors[mantineTheme.primaryColor][isMantinePrimaryShade(mantineTheme.primaryShade) ? mantineTheme.primaryShade[colorScheme === "auto" ? "light" : colorScheme] : mantineTheme.primaryShade];
69
- spacingPx = {
70
- xs: Number(co((v) => !Number.isNaN(v), Number(px(mantineTheme.spacing.xs)), 0)),
71
- sm: Number(co((v) => !Number.isNaN(v), Number(px(mantineTheme.spacing.sm)), 0)),
72
- md: Number(co((v) => !Number.isNaN(v), Number(px(mantineTheme.spacing.md)), 0)),
73
- lg: Number(co((v) => !Number.isNaN(v), Number(px(mantineTheme.spacing.lg)), 0)),
74
- xl: Number(co((v) => !Number.isNaN(v), Number(px(mantineTheme.spacing.xl)), 0))
75
- };
76
- }
77
- return {
78
- complete: true,
79
- transitionDurations: {
80
- short: 200,
81
- medium: 350,
82
- long: 500
83
- },
84
- breakpoints: {
85
- buttonCollapse: "md",
86
- badgeGroupCollapse: "md"
87
- },
88
- scrollAreaProps: {
89
- scrollbarSize: 8,
90
- scrollHideDelay: 20,
91
- type: "hover"
92
- },
93
- containerSize: 1300,
94
- alertProps: {
95
- negative: {
96
- icon: /* @__PURE__ */ jsxDEV(IconAlertCircle, {
97
- ...defaultMediumIconProps
98
- }, undefined, false, undefined, this),
99
- variant: "light",
100
- color: "red",
101
- title: "Attention!"
102
- },
103
- neutral: {
104
- icon: /* @__PURE__ */ jsxDEV(IconInfoCircle, {
105
- ...defaultMediumIconProps
106
- }, undefined, false, undefined, this),
107
- variant: "light",
108
- color: mantineTheme?.primaryColor,
109
- title: "Information"
110
- },
111
- positive: {
112
- icon: /* @__PURE__ */ jsxDEV(IconCircleCheck, {
113
- ...defaultMediumIconProps
114
- }, undefined, false, undefined, this),
115
- variant: "light",
116
- color: "green",
117
- title: "Success"
118
- }
119
- },
120
- iconProps: {
121
- medium: defaultMediumIconProps,
122
- tiny: { size: 14, stroke: 3 }
123
- },
124
- jsonStringifySpace: 2,
125
- transparentBackground,
126
- primaryColor,
127
- spacingPx,
128
- ...customTheme
129
- };
130
- };
131
- var themeContext = React2.createContext(createRemoraidTheme());
132
- var useRemoraidTheme = () => {
133
- return useContext(themeContext);
134
- };
135
-
136
- // src/core/components/AppShell/NavbarMinimal/index.tsx
137
- import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
138
- var defaultSettings = {
139
- hiddenPages: [],
140
- linkSize: rem("50px"),
141
- iconSize: "50%",
142
- px: "sm",
143
- py: "md"
144
- };
145
-
146
- // src/core/components/RemoraidProvider/UserExperienceProvider/index.tsx
147
- import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
148
- var defaultNavbarSettings = {
149
- minimal: defaultSettings
150
- };
151
- var defaultUserExperience = {
152
- navbarVariant: "minimal",
153
- navbarSettings: defaultNavbarSettings.minimal,
154
- showWelcomeMessage: true
155
- };
156
- var userExperienceContext = React3.createContext({
157
- userExperience: defaultUserExperience,
158
- updateUserExperience: () => {},
159
- processedCookie: false
160
- });
161
-
162
- // src/core/components/RemoraidProvider/WidgetsProvider/index.tsx
163
- import React4, {
164
- useState as useState3,
165
- useContext as useContext3
166
- } from "react";
167
- import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
168
- var widgetsContext = React4.createContext({
169
- widgets: {},
170
- activeWidget: null,
171
- updateActiveWidget: () => {},
172
- registerWidget: () => {},
173
- registerPage: () => {},
174
- isWidgetRegistered: () => false,
175
- isPageRegistered: () => false,
176
- updateWidgetSelection: () => {},
177
- updateWidgetSelectionBulk: () => {},
178
- isWidgetSelected: () => false
179
- });
180
-
181
- // src/core/components/RemoraidProvider/index.tsx
182
- import { CookiesProvider } from "react-cookie";
183
- import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
184
- // src/core/components/AppShell/index.tsx
185
- import {
186
- AppShell as MantineAppShell,
187
- Burger,
188
- rem as rem2,
189
- Group as Group2,
190
- useMantineTheme as useMantineTheme3,
191
- useMantineColorScheme as useMantineColorScheme4,
192
- Paper as Paper2,
193
- px as px2
194
- } from "@mantine/core";
195
- import { useDisclosure } from "@mantine/hooks";
196
-
197
- // src/core/components/AppShell/Footer/index.tsx
198
- import { Group, useMantineColorScheme as useMantineColorScheme3, useMantineTheme as useMantineTheme2 } from "@mantine/core";
199
- import { IconPennant } from "@tabler/icons-react";
200
- import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
201
-
202
- // src/core/components/AppShell/index.tsx
203
- import { jsxDEV as jsxDEV7, Fragment } from "react/jsx-dev-runtime";
204
- // src/core/components/WidgetSelectionHeader/index.tsx
205
- import {
206
- Chip,
207
- Divider as Divider2,
208
- Flex as Flex2,
209
- ScrollArea,
210
- Text
211
- } from "@mantine/core";
212
-
213
- // src/core/components/Page/index.tsx
214
- import React5, {
215
- useContext as useContext4,
216
- useEffect as useEffect2
217
- } from "react";
218
- import { usePathname as usePathname2 } from "next/navigation";
219
-
220
- // src/core/components/Page/PageContainer/index.tsx
221
- import { Container } from "@mantine/core";
222
- import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
223
-
224
- // src/core/components/Page/index.tsx
225
- import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
226
- var pageContext = React5.createContext(null);
227
-
228
- // src/core/components/WidgetSelectionHeader/index.tsx
229
- import { IconCheck } from "@tabler/icons-react";
230
- import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
231
- // src/core/components/CloseButton/index.tsx
232
- import { ActionIcon, Transition } from "@mantine/core";
233
- import { IconX } from "@tabler/icons-react";
234
- import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
235
- // src/core/components/BadgeGroup/index.tsx
236
- import {
237
- Badge as Badge2,
238
- Group as Group3,
239
- Tooltip as Tooltip3
240
- } from "@mantine/core";
241
- import React6 from "react";
242
-
243
- // src/core/components/BadgeMinimal/index.tsx
244
- import {
245
- Badge,
246
- Tooltip as Tooltip2,
247
- Transition as Transition2
248
- } from "@mantine/core";
249
- import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
250
-
251
- // src/core/components/BadgeGroup/index.tsx
252
- import { jsxDEV as jsxDEV13, Fragment as Fragment2 } from "react/jsx-dev-runtime";
253
- import { createElement } from "react";
254
- // src/core/components/AlertMinimal/index.tsx
255
- import {
256
- Alert,
257
- Transition as Transition3
258
- } from "@mantine/core";
259
- import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
260
- // src/core/components/ResponsiveButton/index.tsx
261
- import {
262
- ActionIcon as ActionIcon2,
263
- Button,
264
- Tooltip as Tooltip4
265
- } from "@mantine/core";
266
- import { IconClick } from "@tabler/icons-react";
267
- import { jsxDEV as jsxDEV15, Fragment as Fragment3 } from "react/jsx-dev-runtime";
268
- // src/core/components/Widget/WidgetWrapper/index.tsx
269
- import {
270
- Paper as Paper3,
271
- Transition as Transition4
272
- } from "@mantine/core";
273
- import { useEffect as useEffect3 } from "react";
274
- import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
275
- // src/core/components/Widget/index.tsx
276
- import {
277
- Center,
278
- Divider as Divider3,
279
- Group as Group4,
280
- Loader,
281
- Title
282
- } from "@mantine/core";
283
- import { jsxDEV as jsxDEV17, Fragment as Fragment4 } from "react/jsx-dev-runtime";
284
- import { createElement as createElement2 } from "react";
285
- // src/core/components/Page/NotFoundPage/index.tsx
286
- import { Alert as Alert2 } from "@mantine/core";
287
- import { usePathname as usePathname3 } from "next/navigation";
288
- import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
289
- // src/core/components/EnvironmentShell/index.tsx
290
- import { Alert as Alert3 } from "@mantine/core";
291
- import { jsxDEV as jsxDEV19, Fragment as Fragment5 } from "react/jsx-dev-runtime";
292
- // src/modals/components/JSONModal/index.tsx
293
- import { jsxDEV as jsxDEV20, Fragment as Fragment6 } from "react/jsx-dev-runtime";
4
+ import { useRemoraidTheme } from "remoraid/core";
5
+ import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
294
6
  function JSONModal({
295
7
  innerProps
296
8
  }) {
297
9
  const theme = useRemoraidTheme();
298
10
  const stringValue = typeof innerProps.content === "string" ? innerProps.content : JSON.stringify(innerProps.content, null, theme.jsonStringifySpace);
299
- return /* @__PURE__ */ jsxDEV20(Fragment6, {
300
- children: /* @__PURE__ */ jsxDEV20(JsonInput, {
11
+ return /* @__PURE__ */ jsxDEV(Fragment, {
12
+ children: /* @__PURE__ */ jsxDEV(JsonInput, {
301
13
  variant: "filled",
302
14
  value: stringValue,
303
15
  validationError: "Invalid JSON",
@@ -1,15 +1,15 @@
1
- import { ContainerProps, MantineSize } from "@mantine/core";
1
+ import { ContainerProps as ContainerProps3, MantineSize as MantineSize10 } from "@mantine/core";
2
2
  interface EnvironmentShellProps {
3
3
  environment: Record<string, string | undefined>;
4
4
  message?: string;
5
- m?: MantineSize | number;
6
- mt?: MantineSize | number;
5
+ m?: MantineSize10 | number;
6
+ mt?: MantineSize10 | number;
7
7
  withContainer?: boolean;
8
8
  componentsProps?: {
9
- container?: ContainerProps
9
+ container?: ContainerProps3
10
10
  };
11
11
  }
12
- import { PropsWithChildren as PropsWithChildren2, ReactNode as ReactNode2 } from "react";
12
+ import { PropsWithChildren as PropsWithChildren13, ReactNode as ReactNode19 } from "react";
13
13
  interface ServerEnvironmentShellProps extends EnvironmentShellProps {}
14
- declare function EnvironmentShell({ children, environment, message }: PropsWithChildren2<ServerEnvironmentShellProps>): ReactNode2;
15
- export { ServerEnvironmentShellProps, EnvironmentShell };
14
+ declare function EnvironmentShell2({ children, environment, message }: PropsWithChildren13<ServerEnvironmentShellProps>): ReactNode19;
15
+ export { ServerEnvironmentShellProps, EnvironmentShell2 as EnvironmentShell };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remoraid",
3
- "version": "2.1.7",
3
+ "version": "2.2.5",
4
4
  "author": "Konrad Goldammer",
5
5
  "repository": {
6
6
  "type": "git",