@m5kdev/web-ui 0.8.4 → 0.8.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.
|
@@ -13,8 +13,8 @@ declare const waitlistSchema: z.ZodObject<{
|
|
|
13
13
|
expiresAt: z.ZodNullable<z.ZodDate>;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
declare const waitlistOutputSchema: z.ZodObject<{
|
|
16
|
-
name: z.ZodNullable<z.ZodString>;
|
|
17
16
|
id: z.ZodString;
|
|
17
|
+
name: z.ZodNullable<z.ZodString>;
|
|
18
18
|
email: z.ZodNullable<z.ZodString>;
|
|
19
19
|
createdAt: z.ZodDate;
|
|
20
20
|
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
@@ -59,8 +59,8 @@ declare const accountClaimMagicLinkOutputSchema: z.ZodObject<{
|
|
|
59
59
|
id: z.ZodString;
|
|
60
60
|
email: z.ZodString;
|
|
61
61
|
createdAt: z.ZodDate;
|
|
62
|
-
expiresAt: z.ZodNullable<z.ZodDate>;
|
|
63
62
|
userId: z.ZodString;
|
|
63
|
+
expiresAt: z.ZodNullable<z.ZodDate>;
|
|
64
64
|
claimId: z.ZodString;
|
|
65
65
|
url: z.ZodString;
|
|
66
66
|
}, z.core.$strip>;
|
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import { Calendar as Calendar$1, dayjsLocalizer } from "react-big-calendar";
|
|
5
|
-
import
|
|
5
|
+
import * as dragAndDropModule from "react-big-calendar/lib/addons/dragAndDrop/index.js";
|
|
6
6
|
import "react-big-calendar/lib/addons/dragAndDrop/styles.css";
|
|
7
7
|
//#region src/components/Calendar.tsx
|
|
8
|
-
|
|
8
|
+
/** react-big-calendar's DnD addon ships as CJS; Vite/Rollup default interop can nest `.default`. */
|
|
9
|
+
function resolveWithDragAndDrop(mod) {
|
|
10
|
+
if (typeof mod === "function") return mod;
|
|
11
|
+
if (typeof mod !== "object" || mod === null) throw new Error("@m5kdev/web-ui Calendar: invalid react-big-calendar drag-and-drop module (expected object).");
|
|
12
|
+
const exported = mod.default;
|
|
13
|
+
if (typeof exported === "function") return exported;
|
|
14
|
+
if (exported !== null && typeof exported === "object" && "default" in exported && typeof exported.default === "function") return exported.default;
|
|
15
|
+
throw new Error("@m5kdev/web-ui Calendar: could not load react-big-calendar drag-and-drop addon (CJS/ESM interop).");
|
|
16
|
+
}
|
|
17
|
+
const DnDCalendar = resolveWithDragAndDrop(dragAndDropModule)(Calendar$1);
|
|
9
18
|
const localizer = dayjsLocalizer(dayjs);
|
|
10
19
|
const TypedDnDCalendar = DnDCalendar;
|
|
11
20
|
const Calendar = (props) => /* @__PURE__ */ jsx(TypedDnDCalendar, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.mjs","names":["BigCalendar"],"sources":["../../../src/components/Calendar.tsx"],"sourcesContent":["import dayjs from \"dayjs\";\r\nimport type React from \"react\";\r\nimport { Calendar as BigCalendar, type CalendarProps, dayjsLocalizer } from \"react-big-calendar\";\r\nimport
|
|
1
|
+
{"version":3,"file":"Calendar.mjs","names":["BigCalendar"],"sources":["../../../src/components/Calendar.tsx"],"sourcesContent":["import dayjs from \"dayjs\";\r\nimport type React from \"react\";\r\nimport { Calendar as BigCalendar, type CalendarProps, dayjsLocalizer } from \"react-big-calendar\";\r\nimport * as dragAndDropModule from \"react-big-calendar/lib/addons/dragAndDrop\";\r\nimport \"react-big-calendar/lib/addons/dragAndDrop/styles.css\";\r\nimport \"./Calendar.css\";\r\n// FIXME: react-big calendar as peer dependency\r\ntype DragAndDropHoc = (Cal: typeof BigCalendar) => React.ComponentType<CalendarProps>;\r\n\r\n/** react-big-calendar's DnD addon ships as CJS; Vite/Rollup default interop can nest `.default`. */\r\nfunction resolveWithDragAndDrop(mod: unknown): DragAndDropHoc {\r\n if (typeof mod === \"function\") {\r\n return mod as DragAndDropHoc;\r\n }\r\n if (typeof mod !== \"object\" || mod === null) {\r\n throw new Error(\r\n \"@m5kdev/web-ui Calendar: invalid react-big-calendar drag-and-drop module (expected object).\"\r\n );\r\n }\r\n const exported = (mod as { default?: unknown }).default;\r\n if (typeof exported === \"function\") {\r\n return exported as DragAndDropHoc;\r\n }\r\n if (\r\n exported !== null &&\r\n typeof exported === \"object\" &&\r\n \"default\" in exported &&\r\n typeof (exported as { default: unknown }).default === \"function\"\r\n ) {\r\n return (exported as { default: DragAndDropHoc }).default;\r\n }\r\n throw new Error(\r\n \"@m5kdev/web-ui Calendar: could not load react-big-calendar drag-and-drop addon (CJS/ESM interop).\"\r\n );\r\n}\r\n\r\nconst withDragAndDrop = resolveWithDragAndDrop(dragAndDropModule);\r\nconst DnDCalendar = withDragAndDrop(BigCalendar);\r\nconst localizer = dayjsLocalizer(dayjs);\r\n\r\ntype CalendarComponents = NonNullable<CalendarProps[\"components\"]>;\r\nexport type CalendarEventRenderer = CalendarComponents extends { event?: infer T }\r\n ? Exclude<T, undefined>\r\n : never;\r\n\r\ninterface DragAndDropCalendarProps extends Omit<CalendarProps, \"localizer\"> {\r\n onEventDrop?: (args: { event: unknown; start: Date; end: Date }) => void;\r\n onEventResize?: (args: { event: unknown; start: Date; end: Date }) => void;\r\n onDragStart?: (args: { event: unknown; action: \"move\" | \"resize\"; direction?: unknown }) => void;\r\n dragFromOutsideItem?: () => unknown;\r\n onDropFromOutside?: (args: { start: Date; end: Date; allDay?: boolean }) => void;\r\n onDragOverFromOutside?: (event: React.DragEvent) => void;\r\n resizable?: boolean;\r\n}\r\n\r\nconst TypedDnDCalendar = DnDCalendar as React.ComponentType<\r\n DragAndDropCalendarProps & { localizer: typeof localizer }\r\n>;\r\n\r\nexport const Calendar = (props: DragAndDropCalendarProps) => (\r\n <TypedDnDCalendar {...props} localizer={localizer} />\r\n);\r\n"],"mappings":";;;;;;;;AAUA,SAAS,uBAAuB,KAA8B;AAC5D,KAAI,OAAO,QAAQ,WACjB,QAAO;AAET,KAAI,OAAO,QAAQ,YAAY,QAAQ,KACrC,OAAM,IAAI,MACR,8FACD;CAEH,MAAM,WAAY,IAA8B;AAChD,KAAI,OAAO,aAAa,WACtB,QAAO;AAET,KACE,aAAa,QACb,OAAO,aAAa,YACpB,aAAa,YACb,OAAQ,SAAkC,YAAY,WAEtD,QAAQ,SAAyC;AAEnD,OAAM,IAAI,MACR,oGACD;;AAIH,MAAM,cADkB,uBAAuB,kBAAkB,CAC7BA,WAAY;AAChD,MAAM,YAAY,eAAe,MAAM;AAiBvC,MAAM,mBAAmB;AAIzB,MAAa,YAAY,UACvB,oBAAC,kBAAD;CAAkB,GAAI;CAAkB;CAAa,CAAA"}
|
|
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/ui/badge.d.ts
|
|
7
7
|
declare const badgeVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "destructive" | "
|
|
8
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
|
|
11
11
|
declare function Badge({
|
|
@@ -4,7 +4,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/ui/button.d.ts
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "link" | "default" | "destructive" | "
|
|
7
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
8
8
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m5kdev/web-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"zod": "4.2.1",
|
|
68
68
|
"@tanstack/react-query": "5.83.0",
|
|
69
69
|
"@trpc/tanstack-react-query": "11.4.3",
|
|
70
|
-
"@m5kdev/commons": "0.8.
|
|
71
|
-
"@m5kdev/frontend": "0.8.
|
|
70
|
+
"@m5kdev/commons": "0.8.5",
|
|
71
|
+
"@m5kdev/frontend": "0.8.5"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@tsdown/css": "0.21.7",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"globals": "16.3.0",
|
|
81
81
|
"tsdown": "0.21.7",
|
|
82
82
|
"vite": "7.0.4",
|
|
83
|
-
"@m5kdev/config": "0.8.
|
|
84
|
-
"@m5kdev/backend": "0.8.
|
|
83
|
+
"@m5kdev/config": "0.8.5",
|
|
84
|
+
"@m5kdev/backend": "0.8.5"
|
|
85
85
|
},
|
|
86
86
|
"exports": {
|
|
87
87
|
"./components/*": {
|