@arkyn/components 3.0.1-beta.148 → 3.0.1-beta.149

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,60 @@
1
+ import { resolve } from "node:path";
2
+ import Bun from "bun";
3
+
4
+ interface ExportEntry {
5
+ import: string;
6
+ types?: string;
7
+ }
8
+
9
+ interface PackageJson {
10
+ exports?: Record<string, ExportEntry>;
11
+ [key: string]: unknown;
12
+ }
13
+
14
+ const root = process.cwd();
15
+
16
+ const indexContent = await Bun.file(resolve(root, "src/index.ts")).text();
17
+
18
+ const packageJson = (await Bun.file(
19
+ resolve(root, "package.json"),
20
+ ).json()) as PackageJson;
21
+
22
+ const exportsMap: Record<string, ExportEntry> = {};
23
+
24
+ const regex =
25
+ /export\s+(?:\*|\{[\s\S]*?\}|type\s+\{[\s\S]*?\})\s+from\s+["'](.+)["']/g;
26
+
27
+ for (const match of indexContent.matchAll(regex)) {
28
+ let importPath = match[1];
29
+
30
+ if (!importPath.startsWith(".")) continue;
31
+
32
+ importPath = importPath.replace(/^\.\//, "");
33
+
34
+ const exportName = importPath.split("/").pop()!;
35
+
36
+ exportsMap[`./${exportName}`] = {
37
+ import: `./dist/${importPath}/index.js`,
38
+ types: `./dist/${importPath}/index.d.ts`,
39
+ };
40
+ }
41
+
42
+ packageJson.exports = {
43
+ ".": {
44
+ import: "./dist/bundle.js",
45
+ types: "./dist/index.d.ts",
46
+ },
47
+ "./styles": {
48
+ import: "./dist/bundle.css",
49
+ },
50
+ ...Object.fromEntries(
51
+ Object.entries(exportsMap).sort(([a], [b]) => a.localeCompare(b)),
52
+ ),
53
+ };
54
+
55
+ await Bun.write(
56
+ resolve(root, "package.json"),
57
+ JSON.stringify(packageJson, null, 2) + "\n",
58
+ );
59
+
60
+ console.log(`Added ${Object.keys(exportsMap).length + 2} exports.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/components",
3
- "version": "3.0.1-beta.148",
3
+ "version": "3.0.1-beta.149",
4
4
  "main": "./dist/bundle.js",
5
5
  "module": "./dist/bundle.js",
6
6
  "types": "./dist/index.d.ts",
@@ -31,38 +31,354 @@
31
31
  },
32
32
  "scripts": {
33
33
  "dev": "bunx vite --config documentation/vite.config.ts",
34
- "build": "bunx vite build && tsc",
34
+ "build": "bunx vite build && tsc && bun ./generate-exports.ts",
35
35
  "test": "vitest --config vitest.config.ts",
36
36
  "typecheck": "bunx tsc --project tsconfig.json --noEmit"
37
37
  },
38
- "dependencies": {
39
- "@react-google-maps/api": "^2.20.8",
40
- "@react-input/mask": "^2.0.4",
41
- "@types/react-scroll": "^1.8.10",
42
- "framer-motion": "^12.38.0",
43
- "html-react-parser": "^6.1.0",
44
- "mapbox-gl": "^3.23.1",
45
- "react-hot-toast": "^2.6.0",
46
- "react-scroll": "^1.9.3",
47
- "slate": "^0.124.1",
48
- "slate-history": "^0.113.1",
49
- "slate-react": "^0.124.0"
38
+ "sideEffects": [
39
+ "*.css",
40
+ "dist/bundle.css"
41
+ ],
42
+ "exports": {
43
+ ".": {
44
+ "import": "./dist/bundle.js",
45
+ "types": "./dist/index.d.ts"
46
+ },
47
+ "./styles": {
48
+ "import": "./dist/bundle.css"
49
+ },
50
+ "./alertContainer": {
51
+ "import": "./dist/components/alert/alertContainer/index.js",
52
+ "types": "./dist/components/alert/alertContainer/index.d.ts"
53
+ },
54
+ "./alertContent": {
55
+ "import": "./dist/components/alert/alertContent/index.js",
56
+ "types": "./dist/components/alert/alertContent/index.d.ts"
57
+ },
58
+ "./alertDescription": {
59
+ "import": "./dist/components/alert/alertDescription/index.js",
60
+ "types": "./dist/components/alert/alertDescription/index.d.ts"
61
+ },
62
+ "./alertIcon": {
63
+ "import": "./dist/components/alert/alertIcon/index.js",
64
+ "types": "./dist/components/alert/alertIcon/index.d.ts"
65
+ },
66
+ "./alertTitle": {
67
+ "import": "./dist/components/alert/alertTitle/index.js",
68
+ "types": "./dist/components/alert/alertTitle/index.d.ts"
69
+ },
70
+ "./audioPlayer": {
71
+ "import": "./dist/components/audioPlayer/index.js",
72
+ "types": "./dist/components/audioPlayer/index.d.ts"
73
+ },
74
+ "./audioUpload": {
75
+ "import": "./dist/components/audioUpload/index.js",
76
+ "types": "./dist/components/audioUpload/index.d.ts"
77
+ },
78
+ "./badge": {
79
+ "import": "./dist/components/badge/index.js",
80
+ "types": "./dist/components/badge/index.d.ts"
81
+ },
82
+ "./button": {
83
+ "import": "./dist/components/button/index.js",
84
+ "types": "./dist/components/button/index.d.ts"
85
+ },
86
+ "./calendar": {
87
+ "import": "./dist/components/calendar/index.js",
88
+ "types": "./dist/components/calendar/index.d.ts"
89
+ },
90
+ "./cardTabButton": {
91
+ "import": "./dist/components/cardTab/cardTabButton/index.js",
92
+ "types": "./dist/components/cardTab/cardTabButton/index.d.ts"
93
+ },
94
+ "./cardTabContainer": {
95
+ "import": "./dist/components/cardTab/cardTabContainer/index.js",
96
+ "types": "./dist/components/cardTab/cardTabContainer/index.d.ts"
97
+ },
98
+ "./checkbox": {
99
+ "import": "./dist/components/checkbox/index.js",
100
+ "types": "./dist/components/checkbox/index.d.ts"
101
+ },
102
+ "./clientOnly": {
103
+ "import": "./dist/components/clientOnly/index.js",
104
+ "types": "./dist/components/clientOnly/index.d.ts"
105
+ },
106
+ "./currencyInput": {
107
+ "import": "./dist/components/currencyInput/index.js",
108
+ "types": "./dist/components/currencyInput/index.d.ts"
109
+ },
110
+ "./divider": {
111
+ "import": "./dist/components/divider/index.js",
112
+ "types": "./dist/components/divider/index.d.ts"
113
+ },
114
+ "./drawerContainer": {
115
+ "import": "./dist/components/drawer/drawerContainer/index.js",
116
+ "types": "./dist/components/drawer/drawerContainer/index.d.ts"
117
+ },
118
+ "./drawerHeader": {
119
+ "import": "./dist/components/drawer/drawerHeader/index.js",
120
+ "types": "./dist/components/drawer/drawerHeader/index.d.ts"
121
+ },
122
+ "./drawerProvider": {
123
+ "import": "./dist/providers/drawerProvider/index.js",
124
+ "types": "./dist/providers/drawerProvider/index.d.ts"
125
+ },
126
+ "./facebookPixel": {
127
+ "import": "./dist/components/facebookPixel/index.js",
128
+ "types": "./dist/components/facebookPixel/index.d.ts"
129
+ },
130
+ "./fieldError": {
131
+ "import": "./dist/components/fieldError/index.js",
132
+ "types": "./dist/components/fieldError/index.d.ts"
133
+ },
134
+ "./fieldLabel": {
135
+ "import": "./dist/components/fieldLabel/index.js",
136
+ "types": "./dist/components/fieldLabel/index.d.ts"
137
+ },
138
+ "./fieldWrapper": {
139
+ "import": "./dist/components/fieldWrapper/index.js",
140
+ "types": "./dist/components/fieldWrapper/index.d.ts"
141
+ },
142
+ "./fileUpload": {
143
+ "import": "./dist/components/fileUpload/index.js",
144
+ "types": "./dist/components/fileUpload/index.d.ts"
145
+ },
146
+ "./formProvider": {
147
+ "import": "./dist/providers/formProvider/index.js",
148
+ "types": "./dist/providers/formProvider/index.d.ts"
149
+ },
150
+ "./fullCalendar": {
151
+ "import": "./dist/components/fullCalendar/index.js",
152
+ "types": "./dist/components/fullCalendar/index.d.ts"
153
+ },
154
+ "./googleAnalytics": {
155
+ "import": "./dist/components/googleAnalytics/index.js",
156
+ "types": "./dist/components/googleAnalytics/index.d.ts"
157
+ },
158
+ "./googleTagManager": {
159
+ "import": "./dist/components/googleTagManager/index.js",
160
+ "types": "./dist/components/googleTagManager/index.d.ts"
161
+ },
162
+ "./iconButton": {
163
+ "import": "./dist/components/iconButton/index.js",
164
+ "types": "./dist/components/iconButton/index.d.ts"
165
+ },
166
+ "./imageUpload": {
167
+ "import": "./dist/components/imageUpload/index.js",
168
+ "types": "./dist/components/imageUpload/index.d.ts"
169
+ },
170
+ "./input": {
171
+ "import": "./dist/components/input/index.js",
172
+ "types": "./dist/components/input/index.d.ts"
173
+ },
174
+ "./mapView": {
175
+ "import": "./dist/components/mapView/index.js",
176
+ "types": "./dist/components/mapView/index.d.ts"
177
+ },
178
+ "./maskedInput": {
179
+ "import": "./dist/components/maskedInput/index.js",
180
+ "types": "./dist/components/maskedInput/index.d.ts"
181
+ },
182
+ "./modalContainer": {
183
+ "import": "./dist/components/modal/modalContainer/index.js",
184
+ "types": "./dist/components/modal/modalContainer/index.d.ts"
185
+ },
186
+ "./modalFooter": {
187
+ "import": "./dist/components/modal/modalFooter/index.js",
188
+ "types": "./dist/components/modal/modalFooter/index.d.ts"
189
+ },
190
+ "./modalHeader": {
191
+ "import": "./dist/components/modal/modalHeader/index.js",
192
+ "types": "./dist/components/modal/modalHeader/index.d.ts"
193
+ },
194
+ "./modalProvider": {
195
+ "import": "./dist/providers/modalProvider/index.js",
196
+ "types": "./dist/providers/modalProvider/index.d.ts"
197
+ },
198
+ "./multiSelect": {
199
+ "import": "./dist/components/multiSelect/index.js",
200
+ "types": "./dist/components/multiSelect/index.d.ts"
201
+ },
202
+ "./pagination": {
203
+ "import": "./dist/components/pagination/index.js",
204
+ "types": "./dist/components/pagination/index.d.ts"
205
+ },
206
+ "./phoneInput": {
207
+ "import": "./dist/components/phoneInput/index.js",
208
+ "types": "./dist/components/phoneInput/index.d.ts"
209
+ },
210
+ "./placesProvider": {
211
+ "import": "./dist/providers/placesProvider/index.js",
212
+ "types": "./dist/providers/placesProvider/index.d.ts"
213
+ },
214
+ "./popover": {
215
+ "import": "./dist/components/popover/index.js",
216
+ "types": "./dist/components/popover/index.d.ts"
217
+ },
218
+ "./radioBox": {
219
+ "import": "./dist/components/radio/radioBox/index.js",
220
+ "types": "./dist/components/radio/radioBox/index.d.ts"
221
+ },
222
+ "./radioGroup": {
223
+ "import": "./dist/components/radio/radioGroup/index.js",
224
+ "types": "./dist/components/radio/radioGroup/index.d.ts"
225
+ },
226
+ "./richText": {
227
+ "import": "./dist/components/richText/index.js",
228
+ "types": "./dist/components/richText/index.d.ts"
229
+ },
230
+ "./searchPlaces": {
231
+ "import": "./dist/components/searchPlaces/index.js",
232
+ "types": "./dist/components/searchPlaces/index.d.ts"
233
+ },
234
+ "./select": {
235
+ "import": "./dist/components/select/index.js",
236
+ "types": "./dist/components/select/index.d.ts"
237
+ },
238
+ "./slider": {
239
+ "import": "./dist/components/slider/index.js",
240
+ "types": "./dist/components/slider/index.d.ts"
241
+ },
242
+ "./switch": {
243
+ "import": "./dist/components/switch/index.js",
244
+ "types": "./dist/components/switch/index.d.ts"
245
+ },
246
+ "./tabButton": {
247
+ "import": "./dist/components/tab/tabButton/index.js",
248
+ "types": "./dist/components/tab/tabButton/index.d.ts"
249
+ },
250
+ "./tabContainer": {
251
+ "import": "./dist/components/tab/tabContainer/index.js",
252
+ "types": "./dist/components/tab/tabContainer/index.d.ts"
253
+ },
254
+ "./tableBody": {
255
+ "import": "./dist/components/table/tableBody/index.js",
256
+ "types": "./dist/components/table/tableBody/index.d.ts"
257
+ },
258
+ "./tableCaption": {
259
+ "import": "./dist/components/table/tableCaption/index.js",
260
+ "types": "./dist/components/table/tableCaption/index.d.ts"
261
+ },
262
+ "./tableContainer": {
263
+ "import": "./dist/components/table/tableContainer/index.js",
264
+ "types": "./dist/components/table/tableContainer/index.d.ts"
265
+ },
266
+ "./tableFooter": {
267
+ "import": "./dist/components/table/tableFooter/index.js",
268
+ "types": "./dist/components/table/tableFooter/index.d.ts"
269
+ },
270
+ "./tableHeader": {
271
+ "import": "./dist/components/table/tableHeader/index.js",
272
+ "types": "./dist/components/table/tableHeader/index.d.ts"
273
+ },
274
+ "./textarea": {
275
+ "import": "./dist/components/textarea/index.js",
276
+ "types": "./dist/components/textarea/index.d.ts"
277
+ },
278
+ "./toastProvider": {
279
+ "import": "./dist/providers/toastProvider/index.js",
280
+ "types": "./dist/providers/toastProvider/index.d.ts"
281
+ },
282
+ "./toHtml": {
283
+ "import": "./dist/services/toHtml/index.js",
284
+ "types": "./dist/services/toHtml/index.d.ts"
285
+ },
286
+ "./tooltip": {
287
+ "import": "./dist/components/tooltip/index.js",
288
+ "types": "./dist/components/tooltip/index.d.ts"
289
+ },
290
+ "./toRichTextValue": {
291
+ "import": "./dist/services/toRichTextValue/index.js",
292
+ "types": "./dist/services/toRichTextValue/index.d.ts"
293
+ },
294
+ "./useAutomation": {
295
+ "import": "./dist/hooks/useAutomation/index.js",
296
+ "types": "./dist/hooks/useAutomation/index.d.ts"
297
+ },
298
+ "./useDrawer": {
299
+ "import": "./dist/hooks/useDrawer/index.js",
300
+ "types": "./dist/hooks/useDrawer/index.d.ts"
301
+ },
302
+ "./useForm": {
303
+ "import": "./dist/hooks/useForm/index.js",
304
+ "types": "./dist/hooks/useForm/index.d.ts"
305
+ },
306
+ "./useHydrated": {
307
+ "import": "./dist/hooks/useHydrated/index.js",
308
+ "types": "./dist/hooks/useHydrated/index.d.ts"
309
+ },
310
+ "./useModal": {
311
+ "import": "./dist/hooks/useModal/index.js",
312
+ "types": "./dist/hooks/useModal/index.d.ts"
313
+ },
314
+ "./useScopedParams": {
315
+ "import": "./dist/hooks/useScopedParams/index.js",
316
+ "types": "./dist/hooks/useScopedParams/index.d.ts"
317
+ },
318
+ "./useScrollLock": {
319
+ "import": "./dist/hooks/useScrollLock/index.js",
320
+ "types": "./dist/hooks/useScrollLock/index.d.ts"
321
+ },
322
+ "./useSearchAutomation": {
323
+ "import": "./dist/hooks/useSearchAutomation/index.js",
324
+ "types": "./dist/hooks/useSearchAutomation/index.d.ts"
325
+ },
326
+ "./useSlider": {
327
+ "import": "./dist/hooks/useSlider/index.js",
328
+ "types": "./dist/hooks/useSlider/index.d.ts"
329
+ },
330
+ "./useToast": {
331
+ "import": "./dist/hooks/useToast/index.js",
332
+ "types": "./dist/hooks/useToast/index.d.ts"
333
+ }
50
334
  },
51
335
  "peerDependencies": {
52
336
  "@arkyn/shared": ">=3.0.1-beta.145",
53
337
  "@arkyn/templates": ">=3.0.1-beta.145",
54
- "react": ">=19.2.6",
55
- "react-dom": ">=19.2.6",
56
- "lucide-react": ">=1.14.0"
338
+ "react": ">=18.0.0",
339
+ "react-dom": ">=18.0.0",
340
+ "lucide-react": ">=1.14.0",
341
+ "framer-motion": ">=10.0.0",
342
+ "mapbox-gl": ">=3.0.0",
343
+ "slate": ">=0.100.0",
344
+ "slate-history": ">=0.100.0",
345
+ "slate-react": ">=0.100.0",
346
+ "@react-google-maps/api": ">=2.0.0",
347
+ "react-hot-toast": ">=2.0.0",
348
+ "react-scroll": ">=1.8.0",
349
+ "html-react-parser": ">=5.0.0",
350
+ "@react-input/mask": ">=2.0.0"
351
+ },
352
+ "peerDependenciesMeta": {
353
+ "mapbox-gl": {
354
+ "optional": true
355
+ },
356
+ "slate": {
357
+ "optional": true
358
+ },
359
+ "slate-history": {
360
+ "optional": true
361
+ },
362
+ "slate-react": {
363
+ "optional": true
364
+ },
365
+ "@react-google-maps/api": {
366
+ "optional": true
367
+ },
368
+ "react-scroll": {
369
+ "optional": true
370
+ }
57
371
  },
58
372
  "devDependencies": {
59
373
  "@testing-library/jest-dom": "^6.9.1",
60
374
  "@testing-library/react": "^16.3.2",
61
375
  "@testing-library/user-event": "^14.6.1",
376
+ "@types/bun": "^1.3.14",
62
377
  "@types/is-hotkey": "^0.1.10",
63
378
  "@types/node": "^25.7.0",
64
379
  "@types/react": "^19.2.14",
65
380
  "@types/react-dom": "^19.2.3",
381
+ "@types/react-scroll": "^1.8.10",
66
382
  "@vitejs/plugin-react": "^6.0.1",
67
383
  "bun-types": "^1.3.13",
68
384
  "globals": "^17.6.0",