@appcorp/stellar-solutions-modules 0.1.34 → 0.1.35

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.
Files changed (157) hide show
  1. package/README.md +128 -19
  2. package/components/theme-switcher.d.ts +4 -0
  3. package/components/theme-switcher.js +60 -0
  4. package/components/ui/badge.d.ts +9 -0
  5. package/components/ui/badge.js +82 -0
  6. package/components/ui/button.d.ts +10 -0
  7. package/components/ui/button.js +91 -0
  8. package/components/ui/checkbox.d.ts +9 -0
  9. package/components/ui/checkbox.js +87 -0
  10. package/components/ui/drawer.d.ts +13 -0
  11. package/components/ui/drawer.js +115 -0
  12. package/components/ui/dropdown-menu.d.ts +25 -0
  13. package/components/ui/dropdown-menu.js +148 -0
  14. package/components/ui/enhanced-table-footer-action.d.ts +34 -0
  15. package/components/ui/enhanced-table-footer-action.js +117 -0
  16. package/components/ui/enhanced-table-footer-page.d.ts +32 -0
  17. package/components/ui/enhanced-table-footer-page.js +140 -0
  18. package/components/ui/enhanced-table-footer-pagination.d.ts +38 -0
  19. package/components/ui/enhanced-table-footer-pagination.js +122 -0
  20. package/components/ui/enhanced-table-header-action.d.ts +7 -0
  21. package/components/ui/enhanced-table-header-action.js +21 -0
  22. package/components/ui/enhanced-table-header-search.d.ts +12 -0
  23. package/components/ui/enhanced-table-header-search.js +17 -0
  24. package/components/ui/enhanced-table.d.ts +65 -0
  25. package/components/ui/enhanced-table.js +87 -0
  26. package/components/ui/input.d.ts +8 -0
  27. package/components/ui/input.js +86 -0
  28. package/components/ui/label.d.ts +7 -0
  29. package/components/ui/label.js +68 -0
  30. package/components/ui/popover.d.ts +7 -0
  31. package/components/ui/popover.js +82 -0
  32. package/components/ui/select.d.ts +15 -0
  33. package/components/ui/select.js +127 -0
  34. package/components/ui/sonner.d.ts +4 -0
  35. package/components/ui/sonner.js +54 -0
  36. package/components/ui/switch.d.ts +9 -0
  37. package/components/ui/switch.js +89 -0
  38. package/components/ui/table.d.ts +10 -0
  39. package/components/ui/table.js +101 -0
  40. package/global-modules/bank/actions.d.ts +200 -0
  41. package/global-modules/bank/actions.js +124 -0
  42. package/global-modules/bank/bank.d.ts +2 -0
  43. package/global-modules/bank/bank.js +87 -0
  44. package/global-modules/bank/constants.d.ts +45 -0
  45. package/global-modules/bank/constants.js +98 -0
  46. package/global-modules/bank/context.d.ts +41 -0
  47. package/global-modules/bank/context.js +419 -0
  48. package/global-modules/bank/drawer.d.ts +31 -0
  49. package/global-modules/bank/drawer.js +114 -0
  50. package/global-modules/bank/form.d.ts +22 -0
  51. package/global-modules/bank/form.js +68 -0
  52. package/global-modules/bank/reducer.d.ts +25 -0
  53. package/global-modules/bank/reducer.js +161 -0
  54. package/global-modules/bank/types.d.ts +217 -0
  55. package/global-modules/bank/types.js +81 -0
  56. package/global-modules/bank/validate.d.ts +13 -0
  57. package/global-modules/bank/validate.js +22 -0
  58. package/global-modules/branch/actions.d.ts +154 -37
  59. package/global-modules/branch/actions.js +148 -6
  60. package/global-modules/branch/branch.d.ts +2 -2
  61. package/global-modules/branch/branch.js +46 -32
  62. package/global-modules/branch/constants.d.ts +34 -24
  63. package/global-modules/branch/constants.js +101 -122
  64. package/global-modules/branch/context.d.ts +33 -2
  65. package/global-modules/branch/context.js +195 -164
  66. package/global-modules/branch/drawer.d.ts +26 -3
  67. package/global-modules/branch/drawer.js +101 -6
  68. package/global-modules/branch/form.d.ts +15 -1
  69. package/global-modules/branch/form.js +54 -71
  70. package/global-modules/branch/reducer.d.ts +23 -2
  71. package/global-modules/branch/reducer.js +148 -118
  72. package/global-modules/branch/types.d.ts +196 -69
  73. package/global-modules/branch/types.js +66 -7
  74. package/global-modules/branch/validate.d.ts +1 -1
  75. package/global-modules/branch/validate.js +15 -11
  76. package/global-modules/payment-mode/actions.d.ts +154 -37
  77. package/global-modules/payment-mode/actions.js +148 -6
  78. package/global-modules/payment-mode/constants.d.ts +34 -17
  79. package/global-modules/payment-mode/constants.js +90 -66
  80. package/global-modules/payment-mode/context.d.ts +33 -2
  81. package/global-modules/payment-mode/context.js +185 -163
  82. package/global-modules/payment-mode/drawer.d.ts +26 -3
  83. package/global-modules/payment-mode/drawer.js +104 -9
  84. package/global-modules/payment-mode/form.d.ts +16 -2
  85. package/global-modules/payment-mode/form.js +45 -74
  86. package/global-modules/payment-mode/payment-mode.d.ts +25 -2
  87. package/global-modules/payment-mode/payment-mode.js +90 -23
  88. package/global-modules/payment-mode/reducer.d.ts +23 -2
  89. package/global-modules/payment-mode/reducer.js +140 -114
  90. package/global-modules/payment-mode/types.d.ts +327 -112
  91. package/global-modules/payment-mode/types.js +162 -11
  92. package/global-modules/payment-mode/validate.d.ts +1 -1
  93. package/global-modules/payment-mode/validate.js +7 -5
  94. package/global-modules/preferences/actions.d.ts +126 -27
  95. package/global-modules/preferences/actions.js +128 -4
  96. package/global-modules/preferences/constants.d.ts +46 -31
  97. package/global-modules/preferences/constants.js +129 -66
  98. package/global-modules/preferences/context.d.ts +2 -2
  99. package/global-modules/preferences/context.js +43 -43
  100. package/global-modules/preferences/currency.js +15 -10
  101. package/global-modules/preferences/preferences.d.ts +2 -2
  102. package/global-modules/preferences/preferences.js +3 -5
  103. package/global-modules/preferences/validate.d.ts +1 -1
  104. package/global-modules/preferences/validate.js +7 -7
  105. package/global-modules/tax/actions.d.ts +155 -38
  106. package/global-modules/tax/actions.js +149 -7
  107. package/global-modules/tax/constants.d.ts +31 -39
  108. package/global-modules/tax/constants.js +83 -114
  109. package/global-modules/tax/context.d.ts +33 -2
  110. package/global-modules/tax/context.js +146 -132
  111. package/global-modules/tax/drawer.d.ts +26 -3
  112. package/global-modules/tax/drawer.js +101 -6
  113. package/global-modules/tax/form.d.ts +20 -3
  114. package/global-modules/tax/form.js +101 -74
  115. package/global-modules/tax/reducer.d.ts +23 -2
  116. package/global-modules/tax/reducer.js +143 -24
  117. package/global-modules/tax/tax.d.ts +25 -2
  118. package/global-modules/tax/tax.js +92 -28
  119. package/global-modules/tax/types.d.ts +332 -102
  120. package/global-modules/tax/types.js +179 -11
  121. package/global-modules/tax/validate.d.ts +1 -1
  122. package/global-modules/tax/validate.js +9 -8
  123. package/hooks/use-rtl.d.ts +44 -0
  124. package/hooks/use-rtl.js +75 -0
  125. package/lib/themes.d.ts +147 -0
  126. package/lib/themes.js +150 -0
  127. package/lib/toast-utils.d.ts +44 -0
  128. package/lib/toast-utils.js +212 -0
  129. package/lib/utils.d.ts +2 -0
  130. package/lib/utils.js +12 -0
  131. package/package.json +21 -4
  132. package/supabase/supabase.d.ts +80 -1
  133. package/supabase/supabase.js +281 -6
  134. package/global-modules/branch/form-elements.d.ts +0 -3
  135. package/global-modules/branch/form-elements.js +0 -41
  136. package/global-modules/payment-mode/form-elements.d.ts +0 -3
  137. package/global-modules/payment-mode/form-elements.js +0 -41
  138. package/global-modules/preferences/bank.d.ts +0 -2
  139. package/global-modules/preferences/bank.js +0 -11
  140. package/global-modules/preferences/branch-drawer.js +0 -36
  141. package/global-modules/preferences/branch-form-elements.js +0 -30
  142. package/global-modules/preferences/branch-form.d.ts +0 -0
  143. package/global-modules/preferences/branch-form.js +0 -33
  144. package/global-modules/preferences/branch.d.ts +0 -0
  145. package/global-modules/preferences/branch.js +0 -106
  146. package/global-modules/preferences/payment-mode-drawer.d.ts +0 -0
  147. package/global-modules/preferences/payment-mode-drawer.js +0 -36
  148. package/global-modules/preferences/payment-mode-form-elements.d.ts +0 -0
  149. package/global-modules/preferences/payment-mode-form-elements.js +0 -30
  150. package/global-modules/preferences/payment-mode-form.d.ts +0 -0
  151. package/global-modules/preferences/payment-mode-form.js +0 -33
  152. package/global-modules/preferences/payment-mode.d.ts +0 -0
  153. package/global-modules/preferences/payment-mode.js +0 -94
  154. package/global-modules/tax/form-elements.d.ts +0 -3
  155. package/global-modules/tax/form-elements.js +0 -41
  156. /package/{global-modules/preferences/branch-drawer.d.ts → constants.d.ts} +0 -0
  157. /package/{global-modules/preferences/branch-form-elements.d.ts → constants.js} +0 -0
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Shared Toast Utilities
3
+ *
4
+ * Theme-aware toast notification system using Sonner with comprehensive
5
+ * styling, icons, and theme integration for consistent user experience
6
+ * across all modules.
7
+ *
8
+ * Features:
9
+ * - Theme-aware styling (light/dark/system)
10
+ * - Lucide React icons for each toast type
11
+ * - Consistent styling with shadcn/ui components
12
+ * - TypeScript support with proper interfaces
13
+ * - Convenience functions for common use cases
14
+ */
15
+ export declare enum TOAST_VARIANT {
16
+ ERROR = "error",
17
+ INFO = "info",
18
+ SUCCESS = "success",
19
+ WARNING = "warning"
20
+ }
21
+ interface ToastConfig {
22
+ action?: {
23
+ label: string;
24
+ onClick: () => void;
25
+ };
26
+ description: string;
27
+ duration?: number;
28
+ theme?: "light" | "dark" | "system";
29
+ title?: string;
30
+ variant: TOAST_VARIANT;
31
+ }
32
+ export declare const generateToast: ({ variant, title, description, duration, action, }: ToastConfig) => string | number;
33
+ export declare const generateThemeToast: ({ variant, title, description, duration, action, theme, }: ToastConfig & {
34
+ theme?: "light" | "dark" | "system";
35
+ }) => string | number;
36
+ export declare const showSuccessToast: (description: string, title?: string) => void;
37
+ export declare const showErrorToast: (description: string, title?: string) => void;
38
+ export declare const showWarningToast: (description: string, title?: string) => void;
39
+ export declare const showInfoToast: (description: string, title?: string) => void;
40
+ export declare const showThemeSuccessToast: (description: string, title?: string, theme?: "light" | "dark" | "system") => void;
41
+ export declare const showThemeErrorToast: (description: string, title?: string, theme?: "light" | "dark" | "system") => void;
42
+ export declare const showThemeWarningToast: (description: string, title?: string, theme?: "light" | "dark" | "system") => void;
43
+ export declare const showThemeInfoToast: (description: string, title?: string, theme?: "light" | "dark" | "system") => void;
44
+ export {};
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ /**
3
+ * Shared Toast Utilities
4
+ *
5
+ * Theme-aware toast notification system using Sonner with comprehensive
6
+ * styling, icons, and theme integration for consistent user experience
7
+ * across all modules.
8
+ *
9
+ * Features:
10
+ * - Theme-aware styling (light/dark/system)
11
+ * - Lucide React icons for each toast type
12
+ * - Consistent styling with shadcn/ui components
13
+ * - TypeScript support with proper interfaces
14
+ * - Convenience functions for common use cases
15
+ */
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ var __importDefault = (this && this.__importDefault) || function (mod) {
28
+ return (mod && mod.__esModule) ? mod : { "default": mod };
29
+ };
30
+ var _a;
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.showThemeInfoToast = exports.showThemeWarningToast = exports.showThemeErrorToast = exports.showThemeSuccessToast = exports.showInfoToast = exports.showWarningToast = exports.showErrorToast = exports.showSuccessToast = exports.generateThemeToast = exports.generateToast = exports.TOAST_VARIANT = void 0;
33
+ var react_1 = __importDefault(require("react"));
34
+ var sonner_1 = require("sonner");
35
+ var lucide_react_1 = require("lucide-react");
36
+ // Theme-aware toast styling
37
+ var THEME_TOAST_STYLES = {
38
+ light: {
39
+ className: "bg-background text-foreground border-border shadow-lg",
40
+ style: {
41
+ backgroundColor: "hsl(var(--background))",
42
+ color: "hsl(var(--foreground))",
43
+ borderColor: "hsl(var(--border))",
44
+ },
45
+ },
46
+ dark: {
47
+ className: "bg-popover text-popover-foreground border-border shadow-lg",
48
+ style: {
49
+ backgroundColor: "hsl(var(--popover))",
50
+ color: "hsl(var(--popover-foreground))",
51
+ borderColor: "hsl(var(--border))",
52
+ },
53
+ },
54
+ };
55
+ // Toast types matching the previous Vista notification types
56
+ var TOAST_VARIANT;
57
+ (function (TOAST_VARIANT) {
58
+ TOAST_VARIANT["ERROR"] = "error";
59
+ TOAST_VARIANT["INFO"] = "info";
60
+ TOAST_VARIANT["SUCCESS"] = "success";
61
+ TOAST_VARIANT["WARNING"] = "warning";
62
+ })(TOAST_VARIANT || (exports.TOAST_VARIANT = TOAST_VARIANT = {}));
63
+ // Icon mapping for each variant using object notation
64
+ var TOAST_ICON_MAP = (_a = {},
65
+ _a[TOAST_VARIANT.ERROR] = lucide_react_1.AlertCircle,
66
+ _a[TOAST_VARIANT.INFO] = lucide_react_1.Info,
67
+ _a[TOAST_VARIANT.SUCCESS] = lucide_react_1.CheckCircle,
68
+ _a[TOAST_VARIANT.WARNING] = lucide_react_1.AlertTriangle,
69
+ _a);
70
+ var getToastIcon = function (variant) {
71
+ return TOAST_ICON_MAP[variant] || lucide_react_1.Info;
72
+ };
73
+ // Create icon element helper
74
+ var createIconElement = function (variant) {
75
+ var Icon = getToastIcon(variant);
76
+ return react_1.default.createElement(Icon, { className: "h-4 w-4" });
77
+ };
78
+ // Enhanced theme-aware toast function
79
+ var generateToast = function (_a) {
80
+ var _b;
81
+ var variant = _a.variant, title = _a.title, description = _a.description, _c = _a.duration, duration = _c === void 0 ? 4000 : _c, action = _a.action;
82
+ var iconElement = createIconElement(variant);
83
+ var toastOptions = __assign({ description: description, duration: duration, icon: iconElement, className: "group-[.toaster]:bg-popover group-[.toaster]:text-popover-foreground group-[.toaster]:border-border", style: {
84
+ minWidth: "320px",
85
+ maxWidth: "420px",
86
+ } }, (action && {
87
+ action: {
88
+ label: action.label,
89
+ onClick: action.onClick,
90
+ },
91
+ }));
92
+ // Toast method mapping using object notation
93
+ var TOAST_METHOD_MAP = (_b = {},
94
+ _b[TOAST_VARIANT.SUCCESS] = function () {
95
+ return sonner_1.toast.success(title || "Success", toastOptions);
96
+ },
97
+ _b[TOAST_VARIANT.ERROR] = function () { return sonner_1.toast.error(title || "Error", toastOptions); },
98
+ _b[TOAST_VARIANT.WARNING] = function () {
99
+ return sonner_1.toast.warning(title || "Warning", toastOptions);
100
+ },
101
+ _b[TOAST_VARIANT.INFO] = function () {
102
+ return sonner_1.toast.info(title || "Information", toastOptions);
103
+ },
104
+ _b);
105
+ var toastMethod = TOAST_METHOD_MAP[variant];
106
+ return toastMethod
107
+ ? toastMethod()
108
+ : (0, sonner_1.toast)(title || description, toastOptions);
109
+ };
110
+ exports.generateToast = generateToast;
111
+ // Theme-aware toast generation function
112
+ var generateThemeToast = function (_a) {
113
+ var _b;
114
+ var variant = _a.variant, title = _a.title, description = _a.description, _c = _a.duration, duration = _c === void 0 ? 4000 : _c, action = _a.action, _d = _a.theme, theme = _d === void 0 ? "system" : _d;
115
+ var iconElement = createIconElement(variant);
116
+ // Apply theme-specific styling
117
+ var themeStyle = theme === "dark" ? THEME_TOAST_STYLES.dark : THEME_TOAST_STYLES.light;
118
+ var toastOptions = __assign({ description: description, duration: duration, icon: iconElement, className: "".concat(themeStyle.className, " toast-theme-").concat(theme), style: __assign(__assign({}, themeStyle.style), { minWidth: "320px", maxWidth: "420px" }) }, (action && {
119
+ action: {
120
+ label: action.label,
121
+ onClick: action.onClick,
122
+ },
123
+ }));
124
+ // Toast method mapping using object notation
125
+ var TOAST_METHOD_MAP = (_b = {},
126
+ _b[TOAST_VARIANT.ERROR] = function () { return sonner_1.toast.error(title || "Error", toastOptions); },
127
+ _b[TOAST_VARIANT.INFO] = function () {
128
+ return sonner_1.toast.info(title || "Information", toastOptions);
129
+ },
130
+ _b[TOAST_VARIANT.SUCCESS] = function () {
131
+ return sonner_1.toast.success(title || "Success", toastOptions);
132
+ },
133
+ _b[TOAST_VARIANT.WARNING] = function () {
134
+ return sonner_1.toast.warning(title || "Warning", toastOptions);
135
+ },
136
+ _b);
137
+ var toastMethod = TOAST_METHOD_MAP[variant];
138
+ return toastMethod
139
+ ? toastMethod()
140
+ : (0, sonner_1.toast)(title || description, toastOptions);
141
+ };
142
+ exports.generateThemeToast = generateThemeToast;
143
+ // Convenience functions for each toast type
144
+ var showSuccessToast = function (description, title) {
145
+ (0, exports.generateToast)({
146
+ variant: TOAST_VARIANT.SUCCESS,
147
+ title: title,
148
+ description: description,
149
+ });
150
+ };
151
+ exports.showSuccessToast = showSuccessToast;
152
+ var showErrorToast = function (description, title) {
153
+ (0, exports.generateToast)({
154
+ variant: TOAST_VARIANT.ERROR,
155
+ title: title,
156
+ description: description,
157
+ });
158
+ };
159
+ exports.showErrorToast = showErrorToast;
160
+ var showWarningToast = function (description, title) {
161
+ (0, exports.generateToast)({
162
+ variant: TOAST_VARIANT.WARNING,
163
+ title: title,
164
+ description: description,
165
+ });
166
+ };
167
+ exports.showWarningToast = showWarningToast;
168
+ var showInfoToast = function (description, title) {
169
+ (0, exports.generateToast)({
170
+ variant: TOAST_VARIANT.INFO,
171
+ title: title,
172
+ description: description,
173
+ });
174
+ };
175
+ exports.showInfoToast = showInfoToast;
176
+ // Theme-aware convenience functions
177
+ var showThemeSuccessToast = function (description, title, theme) {
178
+ (0, exports.generateThemeToast)({
179
+ variant: TOAST_VARIANT.SUCCESS,
180
+ title: title,
181
+ description: description,
182
+ theme: theme,
183
+ });
184
+ };
185
+ exports.showThemeSuccessToast = showThemeSuccessToast;
186
+ var showThemeErrorToast = function (description, title, theme) {
187
+ (0, exports.generateThemeToast)({
188
+ variant: TOAST_VARIANT.ERROR,
189
+ title: title,
190
+ description: description,
191
+ theme: theme,
192
+ });
193
+ };
194
+ exports.showThemeErrorToast = showThemeErrorToast;
195
+ var showThemeWarningToast = function (description, title, theme) {
196
+ (0, exports.generateThemeToast)({
197
+ variant: TOAST_VARIANT.WARNING,
198
+ title: title,
199
+ description: description,
200
+ theme: theme,
201
+ });
202
+ };
203
+ exports.showThemeWarningToast = showThemeWarningToast;
204
+ var showThemeInfoToast = function (description, title, theme) {
205
+ (0, exports.generateThemeToast)({
206
+ variant: TOAST_VARIANT.INFO,
207
+ title: title,
208
+ description: description,
209
+ theme: theme,
210
+ });
211
+ };
212
+ exports.showThemeInfoToast = showThemeInfoToast;
package/lib/utils.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
package/lib/utils.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cn = cn;
4
+ var clsx_1 = require("clsx");
5
+ var tailwind_merge_1 = require("tailwind-merge");
6
+ function cn() {
7
+ var inputs = [];
8
+ for (var _i = 0; _i < arguments.length; _i++) {
9
+ inputs[_i] = arguments[_i];
10
+ }
11
+ return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/stellar-solutions-modules",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "scripts": {
5
5
  "automate": "./automate.sh",
6
6
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib && cp yarn.lock lib",
@@ -19,11 +19,16 @@
19
19
  "upgrade:own": "ncu -f '@appcorp/app-corp-vista, @react-pakistan/util-functions' -u"
20
20
  },
21
21
  "devDependencies": {
22
- "@appcorp/app-corp-vista": "^0.3.22",
22
+ "@appcorp/app-corp-vista": "^0.3.44",
23
23
  "@eslint/eslintrc": "^3",
24
24
  "@headlessui/react": "^2",
25
25
  "@heroicons/react": "^2",
26
- "@react-pakistan/util-functions": "^1.24.56",
26
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
27
+ "@radix-ui/react-label": "^2.1.7",
28
+ "@radix-ui/react-popover": "^1.1.15",
29
+ "@radix-ui/react-select": "^2.2.6",
30
+ "@radix-ui/react-slot": "^1.2.3",
31
+ "@react-pakistan/util-functions": "^1.24.57",
27
32
  "@supabase/supabase-js": "^2",
28
33
  "@tailwindcss/forms": "^0",
29
34
  "@tailwindcss/postcss": "^4",
@@ -31,13 +36,16 @@
31
36
  "@types/react": "^19",
32
37
  "@types/react-dom": "^19",
33
38
  "@types/react-slick": "^0",
39
+ "class-variance-authority": "^0.7.1",
34
40
  "dayjs": "^1",
35
41
  "eslint": "^9",
36
42
  "eslint-config-next": "^15",
37
43
  "husky": "^9",
38
44
  "libphonenumber-js": "^1",
45
+ "lucide-react": "^0.544.0",
39
46
  "next": "^15",
40
47
  "next-intl": "^4",
48
+ "next-themes": "^0.4.6",
41
49
  "react": "^19",
42
50
  "react-copy-to-clipboard": "^5",
43
51
  "react-dom": "^19",
@@ -47,10 +55,19 @@
47
55
  "react-tooltip": "^5",
48
56
  "rimraf": "^6",
49
57
  "slick-carousel": "^1",
58
+ "sonner": "^2.0.7",
59
+ "tailwind-merge": "^3.3.1",
50
60
  "tailwindcss": "^4",
61
+ "tw-animate-css": "^1.4.0",
51
62
  "typescript": "^5",
52
63
  "uuid": "^11",
64
+ "vaul": "^1.1.2",
53
65
  "zod": "^4"
54
66
  },
55
- "packageManager": "yarn@4.9.2"
67
+ "packageManager": "yarn@4.9.2",
68
+ "dependencies": {
69
+ "@radix-ui/react-checkbox": "^1.3.3",
70
+ "@radix-ui/react-switch": "^1.2.6",
71
+ "clsx": "^2.1.1"
72
+ }
56
73
  }
@@ -1,4 +1,83 @@
1
+ /**
2
+ * Supabase Client Configuration
3
+ *
4
+ * This module provides centralized Supabase client configuration and utilities.
5
+ * Handles authentication, storage URLs, and client initialization with proper error handling.
6
+ *
7
+ * Features:
8
+ * - Centralized Supabase client configuration
9
+ * - Storage URL management for public and private buckets
10
+ * - Environment variable validation
11
+ * - Type-safe client creation
12
+ * - Authentication persistence configuration
13
+ *
14
+ * Environment Variables Required:
15
+ * - NEXT_PUBLIC_SUPABASE_URL: Supabase project URL
16
+ * - NEXT_PUBLIC_SUPABASE_ANON_KEY: Supabase anonymous key
17
+ * - NEXT_PUBLIC_SUPABASE_STORAGE_URL: Storage base URL
18
+ * - NEXT_PUBLIC_SUPABASE_PRIVATE_BUCKET: Private bucket name
19
+ * - NEXT_PUBLIC_SUPABASE_PUBLIC_BUCKET: Public bucket name
20
+ */
21
+ import { SupabaseClient } from "@supabase/supabase-js";
22
+ /**
23
+ * Storage bucket types for type safety
24
+ */
25
+ export type StorageBucketType = "public" | "private" | "authenticated";
26
+ /**
27
+ * Base URL for Supabase storage
28
+ */
1
29
  export declare const supabaseStorageBaseUrl: string;
30
+ /**
31
+ * Private storage URL for authenticated users
32
+ * Format: {storageBaseUrl}/authenticated/{privateBucket}
33
+ */
2
34
  export declare const supabasePrivateStorageUrl: string;
35
+ /**
36
+ * Public storage URL for publicly accessible files
37
+ * Format: {storageBaseUrl}/public/{publicBucket}
38
+ */
3
39
  export declare const supabasePublicStorageUrl: string;
4
- export declare const supabaseClient: import("@supabase/supabase-js").SupabaseClient<any, "public", "public", any, any>;
40
+ /**
41
+ * Main Supabase client instance
42
+ * Configured with authentication persistence and optimized settings
43
+ */
44
+ export declare const supabaseClient: SupabaseClient;
45
+ /**
46
+ * Get storage URL for a specific bucket type
47
+ * @param bucketType - Type of storage bucket
48
+ * @returns Full storage URL for the bucket
49
+ */
50
+ export declare const getStorageUrl: (bucketType: StorageBucketType) => string;
51
+ /**
52
+ * Get public file URL from Supabase storage
53
+ * @param bucket - Bucket name
54
+ * @param filePath - Path to the file within the bucket
55
+ * @returns Public URL for the file
56
+ */
57
+ export declare const getPublicFileUrl: (bucket: string, filePath: string) => string;
58
+ /**
59
+ * Get authenticated file URL from Supabase storage
60
+ * @param bucket - Bucket name
61
+ * @param filePath - Path to the file within the bucket
62
+ * @returns Authenticated URL for the file
63
+ */
64
+ export declare const getAuthenticatedFileUrl: (bucket: string, filePath: string) => string;
65
+ /**
66
+ * Check if Supabase client is properly initialized
67
+ * @returns True if client is initialized, false otherwise
68
+ */
69
+ export declare const isSupabaseClientReady: () => boolean;
70
+ /**
71
+ * Get current session from Supabase auth
72
+ * @returns Current user session or null
73
+ */
74
+ export declare const getCurrentSession: () => Promise<import("@supabase/supabase-js").AuthSession | null>;
75
+ /**
76
+ * Check if user is authenticated
77
+ * @returns True if user is authenticated, false otherwise
78
+ */
79
+ export declare const isAuthenticated: () => Promise<boolean>;
80
+ /**
81
+ * Re-export Supabase types for convenience
82
+ */
83
+ export type { SupabaseClient } from "@supabase/supabase-js";