@fairmint/ui 0.3.31 → 0.3.32

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.
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const notifications_store = require("../../node_modules/@mantine/notifications/esm/notifications.store.cjs");
5
+ const Notifications = require("../../node_modules/@mantine/notifications/esm/Notifications.cjs");
6
+ function FairmintNotifications({ position = "top-right" }) {
7
+ const { notifications, queue } = notifications_store.useNotifications();
8
+ if (notifications.length === 0 && queue.length === 0) {
9
+ return null;
10
+ }
11
+ return /* @__PURE__ */ jsxRuntime.jsx(
12
+ Notifications.Notifications,
13
+ {
14
+ position,
15
+ styles: {
16
+ root: { pointerEvents: "none" },
17
+ notification: { pointerEvents: "auto" }
18
+ }
19
+ }
20
+ );
21
+ }
22
+ exports.FairmintNotifications = FairmintNotifications;
23
+ //# sourceMappingURL=FairmintNotifications.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FairmintNotifications.cjs","sources":["../../../src/components/FairmintProvider/FairmintNotifications.tsx"],"sourcesContent":["import { Notifications, type NotificationsProps, useNotifications } from \"@mantine/notifications\";\n\nexport interface FairmintNotificationsProps {\n position?: NotificationsProps[\"position\"];\n}\n\n/**\n * Mantine's `<Notifications />` always portals six fixed-position roots (every\n * corner/center), even when the store is empty. Those empty shells are\n * near-full-width on mobile and sit at overlay z-index, so they can steal\n * clicks on sparse pages (e.g. Studio login) with nothing visible on screen.\n *\n * Mount the host only while there is something to show. When mounted, keep\n * pointer-events off the roots (Mantine still renders empty sibling positions\n * for unused corners) and restore them on the toast itself.\n */\nexport function FairmintNotifications({ position = \"top-right\" }: FairmintNotificationsProps) {\n const { notifications, queue } = useNotifications();\n\n if (notifications.length === 0 && queue.length === 0) {\n return null;\n }\n\n return (\n <Notifications\n position={position}\n styles={{\n root: { pointerEvents: \"none\" },\n notification: { pointerEvents: \"auto\" },\n }}\n />\n );\n}\n"],"names":["useNotifications","jsx","Notifications"],"mappings":";;;;;AAgBO,SAAS,sBAAsB,EAAE,WAAW,eAA2C;AAC5F,QAAM,EAAE,eAAe,MAAA,IAAUA,qCAAA;AAEjC,MAAI,cAAc,WAAW,KAAK,MAAM,WAAW,GAAG;AACpD,WAAO;AAAA,EACT;AAEA,SACEC,2BAAAA;AAAAA,IAACC,cAAAA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,QAAQ;AAAA,QACN,MAAM,EAAE,eAAe,OAAA;AAAA,QACvB,cAAc,EAAE,eAAe,OAAA;AAAA,MAAO;AAAA,IACxC;AAAA,EAAA;AAGN;;"}
@@ -0,0 +1,16 @@
1
+ import { NotificationsProps } from '@mantine/notifications';
2
+ export interface FairmintNotificationsProps {
3
+ position?: NotificationsProps["position"];
4
+ }
5
+ /**
6
+ * Mantine's `<Notifications />` always portals six fixed-position roots (every
7
+ * corner/center), even when the store is empty. Those empty shells are
8
+ * near-full-width on mobile and sit at overlay z-index, so they can steal
9
+ * clicks on sparse pages (e.g. Studio login) with nothing visible on screen.
10
+ *
11
+ * Mount the host only while there is something to show. When mounted, keep
12
+ * pointer-events off the roots (Mantine still renders empty sibling positions
13
+ * for unused corners) and restore them on the toast itself.
14
+ */
15
+ export declare function FairmintNotifications({ position }: FairmintNotificationsProps): import("react/jsx-runtime").JSX.Element | null;
16
+ //# sourceMappingURL=FairmintNotifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FairmintNotifications.d.ts","sourceRoot":"","sources":["../../../src/components/FairmintProvider/FairmintNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,kBAAkB,EAAoB,MAAM,wBAAwB,CAAC;AAElG,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;CAC3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,QAAsB,EAAE,EAAE,0BAA0B,kDAgB3F"}
@@ -0,0 +1,23 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useNotifications } from "../../node_modules/@mantine/notifications/esm/notifications.store.js";
3
+ import { Notifications } from "../../node_modules/@mantine/notifications/esm/Notifications.js";
4
+ function FairmintNotifications({ position = "top-right" }) {
5
+ const { notifications, queue } = useNotifications();
6
+ if (notifications.length === 0 && queue.length === 0) {
7
+ return null;
8
+ }
9
+ return /* @__PURE__ */ jsx(
10
+ Notifications,
11
+ {
12
+ position,
13
+ styles: {
14
+ root: { pointerEvents: "none" },
15
+ notification: { pointerEvents: "auto" }
16
+ }
17
+ }
18
+ );
19
+ }
20
+ export {
21
+ FairmintNotifications
22
+ };
23
+ //# sourceMappingURL=FairmintNotifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FairmintNotifications.js","sources":["../../../src/components/FairmintProvider/FairmintNotifications.tsx"],"sourcesContent":["import { Notifications, type NotificationsProps, useNotifications } from \"@mantine/notifications\";\n\nexport interface FairmintNotificationsProps {\n position?: NotificationsProps[\"position\"];\n}\n\n/**\n * Mantine's `<Notifications />` always portals six fixed-position roots (every\n * corner/center), even when the store is empty. Those empty shells are\n * near-full-width on mobile and sit at overlay z-index, so they can steal\n * clicks on sparse pages (e.g. Studio login) with nothing visible on screen.\n *\n * Mount the host only while there is something to show. When mounted, keep\n * pointer-events off the roots (Mantine still renders empty sibling positions\n * for unused corners) and restore them on the toast itself.\n */\nexport function FairmintNotifications({ position = \"top-right\" }: FairmintNotificationsProps) {\n const { notifications, queue } = useNotifications();\n\n if (notifications.length === 0 && queue.length === 0) {\n return null;\n }\n\n return (\n <Notifications\n position={position}\n styles={{\n root: { pointerEvents: \"none\" },\n notification: { pointerEvents: \"auto\" },\n }}\n />\n );\n}\n"],"names":[],"mappings":";;;AAgBO,SAAS,sBAAsB,EAAE,WAAW,eAA2C;AAC5F,QAAM,EAAE,eAAe,MAAA,IAAU,iBAAA;AAEjC,MAAI,cAAc,WAAW,KAAK,MAAM,WAAW,GAAG;AACpD,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,QAAQ;AAAA,QACN,MAAM,EAAE,eAAe,OAAA;AAAA,QACvB,cAAc,EAAE,eAAe,OAAA;AAAA,MAAO;AAAA,IACxC;AAAA,EAAA;AAGN;"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const index = require("../../theme/index.cjs");
5
+ const FairmintNotifications = require("./FairmintNotifications.cjs");
5
6
  const MantineProvider = require("../../node_modules/@mantine/core/esm/core/MantineProvider/MantineProvider.cjs");
6
- const Notifications = require("../../node_modules/@mantine/notifications/esm/Notifications.cjs");
7
7
  const DatesProvider = require("../../node_modules/@mantine/dates/esm/components/DatesProvider/DatesProvider.cjs");
8
8
  function FairmintProvider({
9
9
  children,
@@ -18,7 +18,7 @@ function FairmintProvider({
18
18
  cssVariablesResolver: index.fairmintCssVariables,
19
19
  ...colorSchemeProps,
20
20
  children: [
21
- /* @__PURE__ */ jsxRuntime.jsx(Notifications.Notifications, { position: notificationPosition }),
21
+ /* @__PURE__ */ jsxRuntime.jsx(FairmintNotifications.FairmintNotifications, { position: notificationPosition }),
22
22
  /* @__PURE__ */ jsxRuntime.jsx(DatesProvider.DatesProvider, { settings: { locale: "en", firstDayOfWeek: 0, weekendDays: [] }, children })
23
23
  ]
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FairmintProvider.cjs","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"sourcesContent":["import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { DatesProvider } from \"@mantine/dates\";\nimport { Notifications } from \"@mantine/notifications\";\nimport type { ReactNode } from \"react\";\nimport { fairmintCssVariables, theme } from \"../../theme\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. When `light` or `dark`, Mantine is locked to this value. @default \"light\" */\n colorScheme?: MantineColorScheme;\n /**\n * Notification position.\n * @default \"top-right\"\n */\n notificationPosition?:\n | \"top-left\"\n | \"top-right\"\n | \"top-center\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-center\";\n}\n\nexport function FairmintProvider({\n children,\n colorScheme = \"light\",\n notificationPosition = \"top-right\",\n}: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n const colorSchemeProps =\n colorScheme === \"light\" || colorScheme === \"dark\"\n ? { forceColorScheme: colorScheme }\n : { defaultColorScheme: colorScheme };\n\n return (\n <MantineProvider\n theme={theme}\n cssVariablesResolver={fairmintCssVariables}\n {...colorSchemeProps}\n >\n <Notifications position={notificationPosition} />\n {/* weekendDays: [] disables Mantine's default red weekend-day styling — red is our\n error/destructive semantic color elsewhere, so it reads as disabled/invalid here. */}\n <DatesProvider settings={{ locale: \"en\", firstDayOfWeek: 0, weekendDays: [] }}>\n {children}\n </DatesProvider>\n </MantineProvider>\n );\n}\n\nfunction validateSetup() {\n if (typeof window === \"undefined\") return;\n if (\n (typeof process !== \"undefined\" && process.env?.NODE_ENV === \"test\") ||\n import.meta.env?.MODE === \"test\"\n )\n return;\n\n requestIdleCallback(() => {\n const root = document.documentElement;\n const mantineCss = getComputedStyle(root).getPropertyValue(\"--mantine-color-scheme\");\n if (!mantineCss) {\n console.warn(\n '[@fairmint/ui] Mantine CSS not detected. Make sure you import \"@fairmint/ui/styles.css\" in your entry file.',\n );\n }\n });\n}\n"],"names":["jsxs","MantineProvider","theme","fairmintCssVariables","jsx","Notifications","DatesProvider"],"mappings":";;;;;;;AAwBO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,uBAAuB;AACzB,GAA0B;AAKxB,QAAM,mBACJ,gBAAgB,WAAW,gBAAgB,SACvC,EAAE,kBAAkB,YAAA,IACpB,EAAE,oBAAoB,YAAA;AAE5B,SACEA,2BAAAA;AAAAA,IAACC,gBAAAA;AAAAA,IAAA;AAAA,MAAA,OACCC,MAAAA;AAAAA,MACA,sBAAsBC,MAAAA;AAAAA,MACrB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAAC,2BAAAA,IAACC,cAAAA,eAAA,EAAc,UAAU,sBAAsB;AAAA,QAG/CD,2BAAAA,IAACE,cAAAA,eAAA,EAAc,UAAU,EAAE,QAAQ,MAAM,gBAAgB,GAAG,aAAa,CAAA,EAAC,GACvE,UACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
1
+ {"version":3,"file":"FairmintProvider.cjs","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"sourcesContent":["import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { DatesProvider } from \"@mantine/dates\";\nimport type { ReactNode } from \"react\";\nimport { fairmintCssVariables, theme } from \"../../theme\";\nimport { FairmintNotifications } from \"./FairmintNotifications\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. When `light` or `dark`, Mantine is locked to this value. @default \"light\" */\n colorScheme?: MantineColorScheme;\n /**\n * Notification position.\n * @default \"top-right\"\n */\n notificationPosition?:\n | \"top-left\"\n | \"top-right\"\n | \"top-center\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-center\";\n}\n\nexport function FairmintProvider({\n children,\n colorScheme = \"light\",\n notificationPosition = \"top-right\",\n}: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n const colorSchemeProps =\n colorScheme === \"light\" || colorScheme === \"dark\"\n ? { forceColorScheme: colorScheme }\n : { defaultColorScheme: colorScheme };\n\n return (\n <MantineProvider\n theme={theme}\n cssVariablesResolver={fairmintCssVariables}\n {...colorSchemeProps}\n >\n <FairmintNotifications position={notificationPosition} />\n {/* weekendDays: [] disables Mantine's default red weekend-day styling — red is our\n error/destructive semantic color elsewhere, so it reads as disabled/invalid here. */}\n <DatesProvider settings={{ locale: \"en\", firstDayOfWeek: 0, weekendDays: [] }}>\n {children}\n </DatesProvider>\n </MantineProvider>\n );\n}\n\nfunction validateSetup() {\n if (typeof window === \"undefined\") return;\n if (\n (typeof process !== \"undefined\" && process.env?.NODE_ENV === \"test\") ||\n import.meta.env?.MODE === \"test\"\n )\n return;\n\n requestIdleCallback(() => {\n const root = document.documentElement;\n const mantineCss = getComputedStyle(root).getPropertyValue(\"--mantine-color-scheme\");\n if (!mantineCss) {\n console.warn(\n '[@fairmint/ui] Mantine CSS not detected. Make sure you import \"@fairmint/ui/styles.css\" in your entry file.',\n );\n }\n });\n}\n"],"names":["jsxs","MantineProvider","theme","fairmintCssVariables","jsx","FairmintNotifications","DatesProvider"],"mappings":";;;;;;;AAwBO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,uBAAuB;AACzB,GAA0B;AAKxB,QAAM,mBACJ,gBAAgB,WAAW,gBAAgB,SACvC,EAAE,kBAAkB,YAAA,IACpB,EAAE,oBAAoB,YAAA;AAE5B,SACEA,2BAAAA;AAAAA,IAACC,gBAAAA;AAAAA,IAAA;AAAA,MAAA,OACCC,MAAAA;AAAAA,MACA,sBAAsBC,MAAAA;AAAAA,MACrB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAAC,2BAAAA,IAACC,sBAAAA,uBAAA,EAAsB,UAAU,sBAAsB;AAAA,QAGvDD,2BAAAA,IAACE,cAAAA,eAAA,EAAc,UAAU,EAAE,QAAQ,MAAM,gBAAgB,GAAG,aAAa,CAAA,EAAC,GACvE,UACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FairmintProvider.d.ts","sourceRoot":"","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAIxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,oBAAoB,CAAC,EACjB,UAAU,GACV,WAAW,GACX,YAAY,GACZ,aAAa,GACb,cAAc,GACd,eAAe,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,WAAqB,EACrB,oBAAkC,GACnC,EAAE,qBAAqB,2CAwBvB"}
1
+ {"version":3,"file":"FairmintProvider.d.ts","sourceRoot":"","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,oBAAoB,CAAC,EACjB,UAAU,GACV,WAAW,GACX,YAAY,GACZ,aAAa,GACb,cAAc,GACd,eAAe,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,WAAqB,EACrB,oBAAkC,GACnC,EAAE,qBAAqB,2CAwBvB"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { fairmintCssVariables, theme } from "../../theme/index.js";
3
+ import { FairmintNotifications } from "./FairmintNotifications.js";
3
4
  import { MantineProvider } from "../../node_modules/@mantine/core/esm/core/MantineProvider/MantineProvider.js";
4
- import { Notifications } from "../../node_modules/@mantine/notifications/esm/Notifications.js";
5
5
  import { DatesProvider } from "../../node_modules/@mantine/dates/esm/components/DatesProvider/DatesProvider.js";
6
6
  function FairmintProvider({
7
7
  children,
@@ -16,7 +16,7 @@ function FairmintProvider({
16
16
  cssVariablesResolver: fairmintCssVariables,
17
17
  ...colorSchemeProps,
18
18
  children: [
19
- /* @__PURE__ */ jsx(Notifications, { position: notificationPosition }),
19
+ /* @__PURE__ */ jsx(FairmintNotifications, { position: notificationPosition }),
20
20
  /* @__PURE__ */ jsx(DatesProvider, { settings: { locale: "en", firstDayOfWeek: 0, weekendDays: [] }, children })
21
21
  ]
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FairmintProvider.js","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"sourcesContent":["import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { DatesProvider } from \"@mantine/dates\";\nimport { Notifications } from \"@mantine/notifications\";\nimport type { ReactNode } from \"react\";\nimport { fairmintCssVariables, theme } from \"../../theme\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. When `light` or `dark`, Mantine is locked to this value. @default \"light\" */\n colorScheme?: MantineColorScheme;\n /**\n * Notification position.\n * @default \"top-right\"\n */\n notificationPosition?:\n | \"top-left\"\n | \"top-right\"\n | \"top-center\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-center\";\n}\n\nexport function FairmintProvider({\n children,\n colorScheme = \"light\",\n notificationPosition = \"top-right\",\n}: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n const colorSchemeProps =\n colorScheme === \"light\" || colorScheme === \"dark\"\n ? { forceColorScheme: colorScheme }\n : { defaultColorScheme: colorScheme };\n\n return (\n <MantineProvider\n theme={theme}\n cssVariablesResolver={fairmintCssVariables}\n {...colorSchemeProps}\n >\n <Notifications position={notificationPosition} />\n {/* weekendDays: [] disables Mantine's default red weekend-day styling — red is our\n error/destructive semantic color elsewhere, so it reads as disabled/invalid here. */}\n <DatesProvider settings={{ locale: \"en\", firstDayOfWeek: 0, weekendDays: [] }}>\n {children}\n </DatesProvider>\n </MantineProvider>\n );\n}\n\nfunction validateSetup() {\n if (typeof window === \"undefined\") return;\n if (\n (typeof process !== \"undefined\" && process.env?.NODE_ENV === \"test\") ||\n import.meta.env?.MODE === \"test\"\n )\n return;\n\n requestIdleCallback(() => {\n const root = document.documentElement;\n const mantineCss = getComputedStyle(root).getPropertyValue(\"--mantine-color-scheme\");\n if (!mantineCss) {\n console.warn(\n '[@fairmint/ui] Mantine CSS not detected. Make sure you import \"@fairmint/ui/styles.css\" in your entry file.',\n );\n }\n });\n}\n"],"names":[],"mappings":";;;;;AAwBO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,uBAAuB;AACzB,GAA0B;AAKxB,QAAM,mBACJ,gBAAgB,WAAW,gBAAgB,SACvC,EAAE,kBAAkB,YAAA,IACpB,EAAE,oBAAoB,YAAA;AAE5B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,sBAAsB;AAAA,MACrB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA,oBAAC,eAAA,EAAc,UAAU,sBAAsB;AAAA,QAG/C,oBAAC,eAAA,EAAc,UAAU,EAAE,QAAQ,MAAM,gBAAgB,GAAG,aAAa,CAAA,EAAC,GACvE,UACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"FairmintProvider.js","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"sourcesContent":["import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { DatesProvider } from \"@mantine/dates\";\nimport type { ReactNode } from \"react\";\nimport { fairmintCssVariables, theme } from \"../../theme\";\nimport { FairmintNotifications } from \"./FairmintNotifications\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. When `light` or `dark`, Mantine is locked to this value. @default \"light\" */\n colorScheme?: MantineColorScheme;\n /**\n * Notification position.\n * @default \"top-right\"\n */\n notificationPosition?:\n | \"top-left\"\n | \"top-right\"\n | \"top-center\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-center\";\n}\n\nexport function FairmintProvider({\n children,\n colorScheme = \"light\",\n notificationPosition = \"top-right\",\n}: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n const colorSchemeProps =\n colorScheme === \"light\" || colorScheme === \"dark\"\n ? { forceColorScheme: colorScheme }\n : { defaultColorScheme: colorScheme };\n\n return (\n <MantineProvider\n theme={theme}\n cssVariablesResolver={fairmintCssVariables}\n {...colorSchemeProps}\n >\n <FairmintNotifications position={notificationPosition} />\n {/* weekendDays: [] disables Mantine's default red weekend-day styling — red is our\n error/destructive semantic color elsewhere, so it reads as disabled/invalid here. */}\n <DatesProvider settings={{ locale: \"en\", firstDayOfWeek: 0, weekendDays: [] }}>\n {children}\n </DatesProvider>\n </MantineProvider>\n );\n}\n\nfunction validateSetup() {\n if (typeof window === \"undefined\") return;\n if (\n (typeof process !== \"undefined\" && process.env?.NODE_ENV === \"test\") ||\n import.meta.env?.MODE === \"test\"\n )\n return;\n\n requestIdleCallback(() => {\n const root = document.documentElement;\n const mantineCss = getComputedStyle(root).getPropertyValue(\"--mantine-color-scheme\");\n if (!mantineCss) {\n console.warn(\n '[@fairmint/ui] Mantine CSS not detected. Make sure you import \"@fairmint/ui/styles.css\" in your entry file.',\n );\n }\n });\n}\n"],"names":[],"mappings":";;;;;AAwBO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,uBAAuB;AACzB,GAA0B;AAKxB,QAAM,mBACJ,gBAAgB,WAAW,gBAAgB,SACvC,EAAE,kBAAkB,YAAA,IACpB,EAAE,oBAAoB,YAAA;AAE5B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,sBAAsB;AAAA,MACrB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA,oBAAC,uBAAA,EAAsB,UAAU,sBAAsB;AAAA,QAGvD,oBAAC,eAAA,EAAc,UAAU,EAAE,QAAQ,MAAM,gBAAgB,GAAG,aAAa,CAAA,EAAC,GACvE,UACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,5 +1,5 @@
1
1
  import { randomId } from "../../hooks/esm/utils/random-id/random-id.js";
2
- import { createStore, useStore } from "../../store/esm/store.js";
2
+ import { useStore, createStore } from "../../store/esm/store.js";
3
3
  function getDistributedNotifications(data, defaultPosition, limit) {
4
4
  const queue = [];
5
5
  const notifications2 = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairmint/ui",
3
- "version": "0.3.31",
3
+ "version": "0.3.32",
4
4
  "type": "module",
5
5
  "description": "Fairmint design system and UI component library",
6
6
  "license": "UNLICENSED",