abckit 0.0.45 → 0.0.47

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.
package/dist/module.mjs CHANGED
@@ -2,8 +2,10 @@ import { updateRuntimeConfig, addTypeTemplate, addServerScanDir, addRouteMiddlew
2
2
  import { defu } from 'defu';
3
3
  import { join } from 'node:path';
4
4
  import { networkInterfaces } from 'node:os';
5
+ import { existsSync } from 'node:fs';
6
+ import { consola } from 'consola';
5
7
 
6
- const CORE_MODULES = ["tailwindcss", "notivue", "icon", "colada", "colorMode", "vueuse", "pinia", "veeValidate", "graphql", "persistedState", "ionic", "scripts"];
8
+ const CORE_MODULES = ["tailwindcss", "notivue", "icon", "colada", "colorMode", "vueuse", "pinia", "veeValidate", "persistedState", "scripts"];
7
9
  function resolveModule(modules, key) {
8
10
  if (modules?.[key] !== void 0) {
9
11
  return modules[key];
@@ -330,6 +332,136 @@ function setupDevtools(nuxt) {
330
332
  });
331
333
  }
332
334
 
335
+ const FEATURE_GROUPS = {
336
+ core: {
337
+ name: "Core UI",
338
+ description: "UI components, auth, state management",
339
+ packages: [
340
+ "reka-ui",
341
+ "better-auth",
342
+ "@nuxtjs/tailwindcss",
343
+ "tailwindcss",
344
+ "@nuxtjs/color-mode",
345
+ "@pinia/nuxt",
346
+ "pinia",
347
+ "@pinia/colada-nuxt",
348
+ "@pinia/colada",
349
+ "@vueuse/nuxt",
350
+ "@vueuse/core",
351
+ "@vee-validate/nuxt",
352
+ "vee-validate",
353
+ "notivue",
354
+ "@nuxt/icon",
355
+ "@nuxt/scripts",
356
+ "pinia-plugin-persistedstate",
357
+ "vaul-vue",
358
+ "vue-sonner",
359
+ "embla-carousel-vue",
360
+ "vue-input-otp",
361
+ "date-fns",
362
+ "zod"
363
+ ],
364
+ installCommand: `pnpm add reka-ui better-auth @nuxtjs/tailwindcss tailwindcss @nuxtjs/color-mode \\
365
+ @pinia/nuxt pinia @pinia/colada-nuxt @pinia/colada @pinia/colada-plugin-auto-refetch \\
366
+ @vueuse/nuxt @vueuse/core @vee-validate/nuxt vee-validate \\
367
+ notivue @nuxt/icon @nuxt/scripts pinia-plugin-persistedstate \\
368
+ vaul-vue vue-sonner embla-carousel-vue vue-input-otp date-fns zod uuid ofetch`
369
+ },
370
+ graphql: {
371
+ name: "GraphQL",
372
+ description: "GraphQL API with Yoga",
373
+ packages: ["graphql", "graphql-yoga", "nitro-graphql", "graphql-scalars", "@graphql-tools/utils"],
374
+ installCommand: "pnpm add graphql graphql-yoga nitro-graphql graphql-scalars @graphql-tools/utils graphql-config"
375
+ },
376
+ ionic: {
377
+ name: "Ionic/Mobile UI",
378
+ description: "Ionic Vue components",
379
+ packages: ["@ionic/vue", "@nuxtjs/ionic"],
380
+ installCommand: "pnpm add @ionic/vue @nuxtjs/ionic"
381
+ },
382
+ capacitor: {
383
+ name: "Capacitor",
384
+ description: "Native mobile features",
385
+ packages: ["@capacitor/core", "@capacitor/preferences", "@capacitor/app"],
386
+ installCommand: `pnpm add @capacitor/core @capacitor/cli @capacitor/preferences @capacitor/app \\
387
+ @capacitor/browser @capacitor/device @capacitor/haptics @capacitor/network \\
388
+ @capacitor/splash-screen @capacitor/status-bar capacitor-native-settings`
389
+ },
390
+ sentry: {
391
+ name: "Sentry",
392
+ description: "Error tracking",
393
+ packages: ["@sentry/nuxt"],
394
+ installCommand: "pnpm add @sentry/nuxt"
395
+ },
396
+ database: {
397
+ name: "Database",
398
+ description: "Drizzle ORM + PostgreSQL + Redis",
399
+ packages: ["drizzle-orm", "pg", "ioredis"],
400
+ installCommand: "pnpm add drizzle-orm drizzle-kit drizzle-zod pg ioredis"
401
+ },
402
+ storage: {
403
+ name: "S3 Storage",
404
+ description: "S3/R2 file storage",
405
+ packages: ["aws4fetch", "unstorage"],
406
+ installCommand: "pnpm add aws4fetch unstorage"
407
+ },
408
+ i18n: {
409
+ name: "Internationalization",
410
+ description: "Multi-language support",
411
+ packages: ["@nuxtjs/i18n"],
412
+ installCommand: "pnpm add @nuxtjs/i18n"
413
+ },
414
+ polar: {
415
+ name: "Polar",
416
+ description: "Polar.sh payments",
417
+ packages: ["@polar-sh/sdk"],
418
+ installCommand: "pnpm add @polar-sh/sdk"
419
+ },
420
+ table: {
421
+ name: "Data Table",
422
+ description: "TanStack Table",
423
+ packages: ["@tanstack/vue-table"],
424
+ installCommand: "pnpm add @tanstack/vue-table"
425
+ },
426
+ charts: {
427
+ name: "Charts",
428
+ description: "Unovis charts",
429
+ packages: ["@unovis/vue"],
430
+ installCommand: "pnpm add @unovis/vue @unovis/ts"
431
+ },
432
+ editor: {
433
+ name: "Markdown Editor",
434
+ description: "MD Editor V3",
435
+ packages: ["md-editor-v3"],
436
+ installCommand: "pnpm add md-editor-v3"
437
+ }
438
+ };
439
+ function isPackageInstalled(pkg, nodeModulesPath) {
440
+ const pkgPath = join(nodeModulesPath, pkg);
441
+ return existsSync(pkgPath);
442
+ }
443
+ function checkDependencies(nuxt, features) {
444
+ const nodeModulesPath = join(nuxt.options.rootDir, "node_modules");
445
+ const warnings = [];
446
+ for (const [key, enabled] of Object.entries(features)) {
447
+ if (!enabled)
448
+ continue;
449
+ const group = FEATURE_GROUPS[key];
450
+ if (!group)
451
+ continue;
452
+ const missing = group.packages.filter((pkg) => !isPackageInstalled(pkg, nodeModulesPath));
453
+ if (missing.length > 0) {
454
+ warnings.push(`
455
+ ${group.name} (${group.description}):`);
456
+ warnings.push(` Missing: ${missing.join(", ")}`);
457
+ warnings.push(` Install: ${group.installCommand}`);
458
+ }
459
+ }
460
+ if (warnings.length > 0) {
461
+ consola.warn(`[abckit] Missing peer dependencies detected:${warnings.join("\n")}`);
462
+ }
463
+ }
464
+
333
465
  const module$1 = defineNuxtModule({
334
466
  meta: {
335
467
  name: "abckit",
@@ -348,13 +480,25 @@ const module$1 = defineNuxtModule({
348
480
  },
349
481
  npm: false
350
482
  },
351
- moduleDependencies: getModuleDependencies,
483
+ async moduleDependencies(nuxt) {
484
+ const deps = getModuleDependencies(nuxt);
485
+ return deps;
486
+ },
352
487
  async setup(options, nuxt) {
353
488
  const { resolve } = createResolver(import.meta.url);
354
489
  nuxt.options.abckit = defu(nuxt.options.abckit, options);
355
490
  const isEnabled = createModuleChecker(nuxt.options.abckit);
356
491
  const isSentryEnabled = isEnabled("sentry", "sentry");
357
- isEnabled("graphql", "graphql");
492
+ const isGraphqlEnabled = isEnabled("graphql", "graphql");
493
+ const isIonicEnabled = isEnabled("ionic");
494
+ if (nuxt.options.dev) {
495
+ checkDependencies(nuxt, {
496
+ core: true,
497
+ graphql: isGraphqlEnabled,
498
+ ionic: isIonicEnabled,
499
+ sentry: isSentryEnabled
500
+ });
501
+ }
358
502
  setupDevtools(nuxt);
359
503
  await setupRuntimeConfig(nuxt, options, isSentryEnabled);
360
504
  setupAppHead(nuxt);
@@ -1,34 +0,0 @@
1
- import type { Config } from './interface.js';
2
- import * as z from 'zod';
3
- declare const __VLS_export: <T extends z.ZodAny>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
- props: import("vue").PublicProps & __VLS_PrettifyLocal<{
5
- fieldName: string;
6
- required?: boolean;
7
- config?: Config<T>;
8
- schema?: z.ZodArray<T>;
9
- disabled?: boolean;
10
- }> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {
16
- default?: (props: import("vue").DefineProps<import("@vue/shared").LooseRequired<{
17
- fieldName: string;
18
- required?: boolean;
19
- config?: Config<T>;
20
- schema?: z.ZodArray<T>;
21
- disabled?: boolean;
22
- }>, "required" | "disabled" | (Config<T> | undefined extends boolean | undefined ? (boolean & Config<T>) | undefined extends undefined ? never : "config" : never)>) => any;
23
- };
24
- emit: {};
25
- }>) => import("vue").VNode & {
26
- __ctx?: Awaited<typeof __VLS_setup>;
27
- };
28
- declare const _default: typeof __VLS_export;
29
- export default _default;
30
- type __VLS_PrettifyLocal<T> = (T extends any ? {
31
- [K in keyof T]: T[K];
32
- } : {
33
- [K in keyof T as K]: T[K];
34
- }) & {};
@@ -1,34 +0,0 @@
1
- import type { Config } from './interface.js';
2
- import * as z from 'zod';
3
- declare const __VLS_export: <T extends z.ZodAny>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
- props: import("vue").PublicProps & __VLS_PrettifyLocal<{
5
- fieldName: string;
6
- required?: boolean;
7
- config?: Config<T>;
8
- schema?: z.ZodArray<T>;
9
- disabled?: boolean;
10
- }> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {
16
- default?: (props: import("vue").DefineProps<import("@vue/shared").LooseRequired<{
17
- fieldName: string;
18
- required?: boolean;
19
- config?: Config<T>;
20
- schema?: z.ZodArray<T>;
21
- disabled?: boolean;
22
- }>, "required" | "disabled" | (Config<T> | undefined extends boolean | undefined ? (boolean & Config<T>) | undefined extends undefined ? never : "config" : never)>) => any;
23
- };
24
- emit: {};
25
- }>) => import("vue").VNode & {
26
- __ctx?: Awaited<typeof __VLS_setup>;
27
- };
28
- declare const _default: typeof __VLS_export;
29
- export default _default;
30
- type __VLS_PrettifyLocal<T> = (T extends any ? {
31
- [K in keyof T]: T[K];
32
- } : {
33
- [K in keyof T as K]: T[K];
34
- }) & {};
@@ -1,34 +0,0 @@
1
- import type { ZodObject, ZodRawShape } from 'zod';
2
- import type { Config } from './interface.js';
3
- declare const __VLS_export: <T extends ZodRawShape>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
- props: import("vue").PublicProps & __VLS_PrettifyLocal<{
5
- fieldName: string;
6
- required?: boolean;
7
- config?: Config<T>;
8
- schema?: ZodObject<T>;
9
- disabled?: boolean;
10
- }> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {
16
- default?: (props: import("vue").DefineProps<import("@vue/shared").LooseRequired<{
17
- fieldName: string;
18
- required?: boolean;
19
- config?: Config<T>;
20
- schema?: ZodObject<T>;
21
- disabled?: boolean;
22
- }>, "required" | "disabled" | (Config<T> | undefined extends boolean | undefined ? (boolean & Config<T>) | undefined extends undefined ? never : "config" : never)>) => any;
23
- };
24
- emit: {};
25
- }>) => import("vue").VNode & {
26
- __ctx?: Awaited<typeof __VLS_setup>;
27
- };
28
- declare const _default: typeof __VLS_export;
29
- export default _default;
30
- type __VLS_PrettifyLocal<T> = (T extends any ? {
31
- [K in keyof T]: T[K];
32
- } : {
33
- [K in keyof T as K]: T[K];
34
- }) & {};
@@ -1,34 +0,0 @@
1
- import type { ZodObject, ZodRawShape } from 'zod';
2
- import type { Config } from './interface.js';
3
- declare const __VLS_export: <T extends ZodRawShape>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
- props: import("vue").PublicProps & __VLS_PrettifyLocal<{
5
- fieldName: string;
6
- required?: boolean;
7
- config?: Config<T>;
8
- schema?: ZodObject<T>;
9
- disabled?: boolean;
10
- }> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {
16
- default?: (props: import("vue").DefineProps<import("@vue/shared").LooseRequired<{
17
- fieldName: string;
18
- required?: boolean;
19
- config?: Config<T>;
20
- schema?: ZodObject<T>;
21
- disabled?: boolean;
22
- }>, "required" | "disabled" | (Config<T> | undefined extends boolean | undefined ? (boolean & Config<T>) | undefined extends undefined ? never : "config" : never)>) => any;
23
- };
24
- emit: {};
25
- }>) => import("vue").VNode & {
26
- __ctx?: Awaited<typeof __VLS_setup>;
27
- };
28
- declare const _default: typeof __VLS_export;
29
- export default _default;
30
- type __VLS_PrettifyLocal<T> = (T extends any ? {
31
- [K in keyof T]: T[K];
32
- } : {
33
- [K in keyof T as K]: T[K];
34
- }) & {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "abckit",
3
3
  "type": "module",
4
- "version": "0.0.45",
4
+ "version": "0.0.47",
5
5
  "description": "Nuxt 4 module — UI components, auth, storage, GraphQL",
6
6
  "author": "productdevbook",
7
7
  "license": "MIT",
@@ -28,9 +28,6 @@
28
28
  ],
29
29
  "private": false,
30
30
  "sideEffects": false,
31
- "workspaces": [
32
- "playground/*"
33
- ],
34
31
  "exports": {
35
32
  ".": {
36
33
  "types": "./dist/module.d.mts",
@@ -72,6 +69,13 @@
72
69
  "dist"
73
70
  ],
74
71
  "dependencies": {
72
+ "class-variance-authority": "^0.7.1",
73
+ "clsx": "^2.1.1",
74
+ "consola": "^3.4.2",
75
+ "defu": "^6.1.4",
76
+ "tailwind-merge": "^3.4.0"
77
+ },
78
+ "peerDependencies": {
75
79
  "@better-auth/oauth-provider": "^1.4.12",
76
80
  "@capacitor/android": "^8.0.1",
77
81
  "@capacitor/app": "^8.0.0",
@@ -116,12 +120,8 @@
116
120
  "aws4fetch": "^1.0.20",
117
121
  "better-auth": "^1.4.12",
118
122
  "capacitor-native-settings": "^7.0.2",
119
- "class-variance-authority": "^0.7.1",
120
- "clsx": "^2.1.1",
121
- "consola": "^3.4.2",
122
123
  "dataloader": "^2.2.3",
123
124
  "date-fns": "^4.1.0",
124
- "defu": "^6.1.4",
125
125
  "drizzle-kit": "^0.31.8",
126
126
  "drizzle-orm": "^0.45.1",
127
127
  "drizzle-zod": "^0.8.3",
@@ -132,27 +132,158 @@
132
132
  "graphql-yoga": "^5.18.0",
133
133
  "ioredis": "^5.9.1",
134
134
  "md-editor-v3": "^6.3.1",
135
- "nitro": "https://pkg.pr.new/nitrojs/nitro@99691fc",
136
135
  "nitro-graphql": "^2.0.0-beta.65",
137
136
  "notivue": "^2.4.5",
137
+ "ofetch": "^2.0.0-alpha.3",
138
138
  "pg": "^8.16.3",
139
139
  "pinia": "^3.0.4",
140
140
  "pinia-plugin-persistedstate": "^4.7.1",
141
141
  "reka-ui": "^2.7.0",
142
- "tailwind-merge": "^3.4.0",
143
142
  "tailwindcss": "^4.1.18",
144
143
  "tw-animate-css": "^1.4.0",
145
144
  "unstorage": "^2.0.0-alpha.5",
146
145
  "uuid": "^13.0.0",
147
146
  "vaul-vue": "^0.4.1",
148
147
  "vee-validate": "5.0.0-beta.0",
149
- "vite-tsconfig-paths": "^6.0.4",
150
148
  "vue-input-otp": "^0.3.2",
151
149
  "vue-router": "^4.6.4",
152
150
  "vue-sonner": "^2.0.9",
153
- "vue-tsc": "^3.2.2",
154
151
  "zod": "^4.3.5"
155
152
  },
153
+ "peerDependenciesMeta": {
154
+ "@better-auth/oauth-provider": {
155
+ "optional": true
156
+ },
157
+ "@capacitor/android": {
158
+ "optional": true
159
+ },
160
+ "@capacitor/app": {
161
+ "optional": true
162
+ },
163
+ "@capacitor/browser": {
164
+ "optional": true
165
+ },
166
+ "@capacitor/cli": {
167
+ "optional": true
168
+ },
169
+ "@capacitor/core": {
170
+ "optional": true
171
+ },
172
+ "@capacitor/device": {
173
+ "optional": true
174
+ },
175
+ "@capacitor/geolocation": {
176
+ "optional": true
177
+ },
178
+ "@capacitor/haptics": {
179
+ "optional": true
180
+ },
181
+ "@capacitor/ios": {
182
+ "optional": true
183
+ },
184
+ "@capacitor/network": {
185
+ "optional": true
186
+ },
187
+ "@capacitor/preferences": {
188
+ "optional": true
189
+ },
190
+ "@capacitor/push-notifications": {
191
+ "optional": true
192
+ },
193
+ "@capacitor/splash-screen": {
194
+ "optional": true
195
+ },
196
+ "@capacitor/status-bar": {
197
+ "optional": true
198
+ },
199
+ "@capgo/capacitor-social-login": {
200
+ "optional": true
201
+ },
202
+ "@graphql-tools/utils": {
203
+ "optional": true
204
+ },
205
+ "@ionic/vue": {
206
+ "optional": true
207
+ },
208
+ "@nuxtjs/i18n": {
209
+ "optional": true
210
+ },
211
+ "@nuxtjs/ionic": {
212
+ "optional": true
213
+ },
214
+ "@openfga/sdk": {
215
+ "optional": true
216
+ },
217
+ "@polar-sh/sdk": {
218
+ "optional": true
219
+ },
220
+ "@sentry/nuxt": {
221
+ "optional": true
222
+ },
223
+ "@tailwindcss/typography": {
224
+ "optional": true
225
+ },
226
+ "@tanstack/vue-table": {
227
+ "optional": true
228
+ },
229
+ "@unovis/vue": {
230
+ "optional": true
231
+ },
232
+ "@vueuse/router": {
233
+ "optional": true
234
+ },
235
+ "@vueuse/sound": {
236
+ "optional": true
237
+ },
238
+ "apiful": {
239
+ "optional": true
240
+ },
241
+ "aws4fetch": {
242
+ "optional": true
243
+ },
244
+ "capacitor-native-settings": {
245
+ "optional": true
246
+ },
247
+ "dataloader": {
248
+ "optional": true
249
+ },
250
+ "drizzle-kit": {
251
+ "optional": true
252
+ },
253
+ "drizzle-orm": {
254
+ "optional": true
255
+ },
256
+ "drizzle-zod": {
257
+ "optional": true
258
+ },
259
+ "graphql": {
260
+ "optional": true
261
+ },
262
+ "graphql-config": {
263
+ "optional": true
264
+ },
265
+ "graphql-scalars": {
266
+ "optional": true
267
+ },
268
+ "graphql-yoga": {
269
+ "optional": true
270
+ },
271
+ "ioredis": {
272
+ "optional": true
273
+ },
274
+ "md-editor-v3": {
275
+ "optional": true
276
+ },
277
+ "nitro-graphql": {
278
+ "optional": true
279
+ },
280
+ "pg": {
281
+ "optional": true
282
+ },
283
+ "unstorage": {
284
+ "optional": true
285
+ }
286
+ },
156
287
  "devDependencies": {
157
288
  "@antfu/eslint-config": "^7.0.0",
158
289
  "@nuxt/eslint": "latest",
@@ -162,11 +293,14 @@
162
293
  "@types/node": "^25.0.8",
163
294
  "@types/pg": "^8.16.0",
164
295
  "eslint": "^9.39.2",
296
+ "nitro": "https://pkg.pr.new/nitrojs/nitro@99691fc",
165
297
  "nuxt": "https://pkg.pr.new/nuxt@33005",
166
298
  "rolldown": "1.0.0-beta.60",
167
299
  "shadcn-vue": "^2.4.3",
168
300
  "typescript": "^5.9.3",
169
- "vue": "^3.5.26"
301
+ "vite-tsconfig-paths": "^6.0.4",
302
+ "vue": "^3.5.26",
303
+ "vue-tsc": "^3.2.2"
170
304
  },
171
305
  "resolutions": {
172
306
  "abckit": "workspace:*"