@devappsnpm/vue-kit 1.0.4 → 1.0.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.
Files changed (73) hide show
  1. package/dist/cli/commands/MakeModuleCommand.d.ts +11 -0
  2. package/dist/cli/commands/MakeModuleCommand.d.ts.map +1 -0
  3. package/dist/cli/commands/MakeOtherCommands.d.ts +7 -0
  4. package/dist/cli/commands/MakeOtherCommands.d.ts.map +1 -0
  5. package/dist/cli/generators/ModuleGenerator.d.ts +31 -0
  6. package/dist/cli/generators/ModuleGenerator.d.ts.map +1 -0
  7. package/dist/cli/generators/SingleFileGenerators.d.ts +12 -0
  8. package/dist/cli/generators/SingleFileGenerators.d.ts.map +1 -0
  9. package/dist/cli/index.d.ts +2 -0
  10. package/dist/cli/index.d.ts.map +1 -0
  11. package/dist/cli/utils/FileGenerator.d.ts +44 -0
  12. package/dist/cli/utils/FileGenerator.d.ts.map +1 -0
  13. package/dist/cli/utils/NameParser.d.ts +39 -0
  14. package/dist/cli/utils/NameParser.d.ts.map +1 -0
  15. package/dist/cli/utils/TemplateRenderer.d.ts +19 -0
  16. package/dist/cli/utils/TemplateRenderer.d.ts.map +1 -0
  17. package/dist/config/VueKitConfig.d.ts +19 -0
  18. package/dist/config/VueKitConfig.d.ts.map +1 -0
  19. package/dist/config/createVueKit.d.ts +8 -0
  20. package/dist/config/createVueKit.d.ts.map +1 -0
  21. package/dist/contracts/api.d.ts +18 -0
  22. package/dist/contracts/api.d.ts.map +1 -0
  23. package/dist/contracts/auth.d.ts +16 -0
  24. package/dist/contracts/auth.d.ts.map +1 -0
  25. package/dist/contracts/http.d.ts +8 -0
  26. package/dist/contracts/http.d.ts.map +1 -0
  27. package/dist/contracts/pagination.d.ts +19 -0
  28. package/dist/contracts/pagination.d.ts.map +1 -0
  29. package/dist/core/forms/Form.d.ts +32 -0
  30. package/dist/core/forms/Form.d.ts.map +1 -0
  31. package/dist/core/http/HttpClient.d.ts +13 -0
  32. package/dist/core/http/HttpClient.d.ts.map +1 -0
  33. package/dist/core/http/HttpClientConfig.d.ts +9 -0
  34. package/dist/core/http/HttpClientConfig.d.ts.map +1 -0
  35. package/dist/core/http/HttpError.d.ts +10 -0
  36. package/dist/core/http/HttpError.d.ts.map +1 -0
  37. package/dist/core/http/auth/AuthDriver.d.ts +6 -0
  38. package/dist/core/http/auth/AuthDriver.d.ts.map +1 -0
  39. package/dist/core/http/auth/CookieAuthDriver.d.ts +12 -0
  40. package/dist/core/http/auth/CookieAuthDriver.d.ts.map +1 -0
  41. package/dist/core/http/auth/JwtAuthDriver.d.ts +10 -0
  42. package/dist/core/http/auth/JwtAuthDriver.d.ts.map +1 -0
  43. package/dist/core/http/auth/LocalStorageTokenStorage.d.ts +9 -0
  44. package/dist/core/http/auth/LocalStorageTokenStorage.d.ts.map +1 -0
  45. package/dist/core/http/auth/SessionStorageTokenStorage.d.ts +9 -0
  46. package/dist/core/http/auth/SessionStorageTokenStorage.d.ts.map +1 -0
  47. package/dist/core/http/auth/TokenStorage.d.ts +6 -0
  48. package/dist/core/http/auth/TokenStorage.d.ts.map +1 -0
  49. package/dist/core/http/interceptors/response.interceptor.d.ts +4 -0
  50. package/dist/core/http/interceptors/response.interceptor.d.ts.map +1 -0
  51. package/dist/core/pagination/Pagination.d.ts +33 -0
  52. package/dist/core/pagination/Pagination.d.ts.map +1 -0
  53. package/dist/core/services/BaseService.d.ts +17 -0
  54. package/dist/core/services/BaseService.d.ts.map +1 -0
  55. package/dist/core/services/CrudService.d.ts +29 -0
  56. package/dist/core/services/CrudService.d.ts.map +1 -0
  57. package/dist/core/stores/BaseStore.d.ts +23 -0
  58. package/dist/core/stores/BaseStore.d.ts.map +1 -0
  59. package/dist/core/stores/CrudStore.d.ts +254 -0
  60. package/dist/core/stores/CrudStore.d.ts.map +1 -0
  61. package/dist/index.d.ts +20 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/ui/components/BaseModal.vue.d.ts +30 -0
  64. package/dist/ui/components/BaseModal.vue.d.ts.map +1 -0
  65. package/dist/ui/components/ConfirmDeleteModal.vue.d.ts +17 -0
  66. package/dist/ui/components/ConfirmDeleteModal.vue.d.ts.map +1 -0
  67. package/dist/ui/components/ToastContainer.vue.d.ts +4 -0
  68. package/dist/ui/components/ToastContainer.vue.d.ts.map +1 -0
  69. package/dist/ui/composables/useToast.d.ts +23 -0
  70. package/dist/ui/composables/useToast.d.ts.map +1 -0
  71. package/dist/ui.d.ts +6 -0
  72. package/dist/ui.d.ts.map +1 -0
  73. package/package.json +2 -2
@@ -0,0 +1,11 @@
1
+ import { type ModuleType, type UiMode } from "../generators/ModuleGenerator";
2
+ export interface MakeModuleOptions {
3
+ type?: ModuleType;
4
+ ui?: UiMode;
5
+ force?: boolean;
6
+ cwd?: string;
7
+ outputBase?: string;
8
+ customStubsPath?: string;
9
+ }
10
+ export declare function MakeModuleCommand(name: string, opts?: MakeModuleOptions): void;
11
+ //# sourceMappingURL=MakeModuleCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MakeModuleCommand.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/MakeModuleCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,MAAM,EAA+B,MAAM,+BAA+B,CAAC;AAE3H,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,iBAAsB,GAAG,IAAI,CAelF"}
@@ -0,0 +1,7 @@
1
+ import { type SingleFileGeneratorOptions } from "../generators/SingleFileGenerators";
2
+ export declare function MakeComponentCommand(name: string, opts?: SingleFileGeneratorOptions): void;
3
+ export declare function MakePageCommand(name: string, opts?: SingleFileGeneratorOptions): void;
4
+ export declare function MakeServiceCommand(name: string, opts?: SingleFileGeneratorOptions): void;
5
+ export declare function MakeStoreCommand(name: string, opts?: SingleFileGeneratorOptions): void;
6
+ export declare function MakeTypeCommand(name: string, opts?: SingleFileGeneratorOptions): void;
7
+ //# sourceMappingURL=MakeOtherCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MakeOtherCommands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/MakeOtherCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,0BAA0B,EAChC,MAAM,oCAAoC,CAAC;AAE5C,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,0BAAqC,GAAG,IAAI,CAEpG;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,0BAAqC,GAAG,IAAI,CAE/F;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,0BAAqC,GAAG,IAAI,CAElG;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,0BAAqC,GAAG,IAAI,CAEhG;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,0BAAqC,GAAG,IAAI,CAE/F"}
@@ -0,0 +1,31 @@
1
+ export type ModuleType = "basic" | "resource" | "crud" | "dashboard";
2
+ export type UiMode = "modal" | "page";
3
+ export interface ModuleGeneratorOptions {
4
+ name: string;
5
+ type?: ModuleType;
6
+ ui?: UiMode;
7
+ force?: boolean;
8
+ outputBase?: string;
9
+ cwd?: string;
10
+ customStubsPath?: string;
11
+ }
12
+ /**
13
+ * Orchestrates the generation of all files that make up a module.
14
+ */
15
+ export declare class ModuleGenerator {
16
+ private readonly parser;
17
+ private readonly fg;
18
+ private readonly vars;
19
+ private readonly options;
20
+ constructor(opts: ModuleGeneratorOptions);
21
+ generate(): void;
22
+ private render;
23
+ private stub;
24
+ private write;
25
+ private generateBasic;
26
+ private generateResource;
27
+ private generateCrudModal;
28
+ private generateCrudPage;
29
+ private generateDashboard;
30
+ }
31
+ //# sourceMappingURL=ModuleGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleGenerator.d.ts","sourceRoot":"","sources":["../../../src/cli/generators/ModuleGenerator.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;AACrE,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtC,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAgB;IACnC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqD;IAC1E,OAAO,CAAC,QAAQ,CAAC,OAAO,CAEtB;gBAEU,IAAI,EAAE,sBAAsB;IAaxC,QAAQ,IAAI,IAAI;IA6BhB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,gBAAgB;IAoBxB,OAAO,CAAC,iBAAiB;CAQ1B"}
@@ -0,0 +1,12 @@
1
+ export interface SingleFileGeneratorOptions {
2
+ name: string;
3
+ force?: boolean;
4
+ cwd?: string;
5
+ customStubsPath?: string;
6
+ }
7
+ export declare const ComponentGenerator: (opts: SingleFileGeneratorOptions) => void;
8
+ export declare const PageGenerator: (opts: SingleFileGeneratorOptions) => void;
9
+ export declare const ServiceGenerator: (opts: SingleFileGeneratorOptions) => void;
10
+ export declare const StoreGenerator: (opts: SingleFileGeneratorOptions) => void;
11
+ export declare const TypeGenerator: (opts: SingleFileGeneratorOptions) => void;
12
+ //# sourceMappingURL=SingleFileGenerators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SingleFileGenerators.d.ts","sourceRoot":"","sources":["../../../src/cli/generators/SingleFileGenerators.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAgBD,eAAO,MAAM,kBAAkB,SAbf,0BAA0B,SAgBzC,CAAC;AAEF,eAAO,MAAM,aAAa,SAlBV,0BAA0B,SAqBzC,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAvBb,0BAA0B,SA0BzC,CAAC;AAEF,eAAO,MAAM,cAAc,SA5BX,0BAA0B,SA+BzC,CAAC;AAEF,eAAO,MAAM,aAAa,SAjCV,0BAA0B,SAoCzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function run(argv?: string[]): void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAwEA,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,IAAI,CA6DvD"}
@@ -0,0 +1,44 @@
1
+ export interface WriteOptions {
2
+ /** If true, overwrite existing files. Default: false. */
3
+ force?: boolean;
4
+ }
5
+ export interface WriteResult {
6
+ path: string;
7
+ created: boolean;
8
+ skipped: boolean;
9
+ }
10
+ /**
11
+ * Responsible for resolving stub paths and writing generated files.
12
+ *
13
+ * Stub resolution order (first found wins):
14
+ * 1. `<cwd>/.devapps/stubs/<stubRelPath>`
15
+ * 2. `<package>/stubs/<stubRelPath>`
16
+ */
17
+ export declare class FileGenerator {
18
+ /** Working directory of the consuming project. Defaults to process.cwd(). */
19
+ private readonly cwd;
20
+ /** Optional custom stubs path override (from VueKitConfig.cli.stubsPath). */
21
+ private readonly customStubsRoot?;
22
+ constructor(
23
+ /** Working directory of the consuming project. Defaults to process.cwd(). */
24
+ cwd?: string,
25
+ /** Optional custom stubs path override (from VueKitConfig.cli.stubsPath). */
26
+ customStubsRoot?: string | undefined);
27
+ /**
28
+ * Resolves a stub file path, preferring project-local overrides.
29
+ * @param stubRelPath Relative path from the stubs root (e.g. "module/crud/modal/types/types.ts.stub")
30
+ */
31
+ resolveStub(stubRelPath: string): string;
32
+ /** Read and return stub content as a string. */
33
+ readStub(stubRelPath: string): string;
34
+ /**
35
+ * Write content to targetPath. Creates parent directories if needed.
36
+ * Respects `force` flag before overwriting.
37
+ */
38
+ write(targetPath: string, content: string, options?: WriteOptions): WriteResult;
39
+ /**
40
+ * High-level helper: resolve stub → render → write.
41
+ */
42
+ generate(stubRelPath: string, targetPath: string, render: (raw: string) => string, options?: WriteOptions): WriteResult;
43
+ }
44
+ //# sourceMappingURL=FileGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileGenerator.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/FileGenerator.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;GAMG;AACH,qBAAa,aAAa;IAEtB,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;;IAHjC,6EAA6E;IAC5D,GAAG,GAAE,MAAsB;IAC5C,6EAA6E;IAC5D,eAAe,CAAC,EAAE,MAAM,YAAA;IAG3C;;;OAGG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAsBxC,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAIrC;;;OAGG;IACH,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,WAAW;IAiB/E;;OAEG;IACH,QAAQ,CACN,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAC/B,OAAO,CAAC,EAAE,YAAY,GACrB,WAAW;CAKf"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * NameParser — centralises all name-casing transformations.
3
+ *
4
+ * Given a PascalCase input (e.g. "CustomerAccount") it derives:
5
+ * - PascalCase → CustomerAccount
6
+ * - camelCase → customerAccount
7
+ * - kebab-case → customer-account
8
+ * - snake_case → customer_account
9
+ * - SCREAMING_SNAKE → CUSTOMER_ACCOUNT
10
+ * - Plural (simple) → CustomerAccounts
11
+ *
12
+ * Security: sanitises names to prevent path traversal and shell injection.
13
+ */
14
+ export declare class NameParser {
15
+ private readonly words;
16
+ constructor(input: string);
17
+ /** Original PascalCase — e.g. CustomerAccount */
18
+ get PascalCase(): string;
19
+ /** camelCase — e.g. customerAccount */
20
+ get camelCase(): string;
21
+ /** kebab-case — e.g. customer-account */
22
+ get kebabCase(): string;
23
+ /** snake_case — e.g. customer_account */
24
+ get snakeCase(): string;
25
+ /** SCREAMING_SNAKE_CASE — e.g. CUSTOMER_ACCOUNT */
26
+ get screamingSnakeCase(): string;
27
+ /** Naïve plural — appends "s". Sufficient for code generation. */
28
+ get plural(): string;
29
+ /** Plural in camelCase */
30
+ get pluralCamel(): string;
31
+ /** Plural in kebab-case */
32
+ get pluralKebab(): string;
33
+ private static split;
34
+ /**
35
+ * Guards against path traversal and shell injection in user-provided names.
36
+ */
37
+ static assertSafe(name: string): void;
38
+ }
39
+ //# sourceMappingURL=NameParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NameParser.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/NameParser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;gBAErB,KAAK,EAAE,MAAM;IASzB,iDAAiD;IACjD,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,uCAAuC;IACvC,IAAI,SAAS,IAAI,MAAM,CAItB;IAED,yCAAyC;IACzC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,yCAAyC;IACzC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,mDAAmD;IACnD,IAAI,kBAAkB,IAAI,MAAM,CAE/B;IAED,kEAAkE;IAClE,IAAI,MAAM,IAAI,MAAM,CAUnB;IAED,0BAA0B;IAC1B,IAAI,WAAW,IAAI,MAAM,CAGxB;IAED,2BAA2B;IAC3B,IAAI,WAAW,IAAI,MAAM,CAExB;IAID,OAAO,CAAC,MAAM,CAAC,KAAK;IASpB;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAetC"}
@@ -0,0 +1,19 @@
1
+ import type { NameParser } from "./NameParser";
2
+ export interface TemplateVars {
3
+ ModuleName: string;
4
+ moduleName: string;
5
+ moduleSlug: string;
6
+ ModuleNamePlural: string;
7
+ moduleNamePlural: string;
8
+ moduleSlugPlural: string;
9
+ resourcePath: string;
10
+ [key: string]: string;
11
+ }
12
+ /**
13
+ * Replaces `{{ VarName }}` placeholders in a stub string.
14
+ */
15
+ export declare class TemplateRenderer {
16
+ static varsFromParser(parser: NameParser, resourcePath?: string): TemplateVars;
17
+ static render(template: string, vars: TemplateVars): string;
18
+ }
19
+ //# sourceMappingURL=TemplateRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplateRenderer.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/TemplateRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY;IAY9E,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM;CAM5D"}
@@ -0,0 +1,19 @@
1
+ import type { AuthConfig } from "../contracts/auth";
2
+ import type { HttpHandlers } from "../contracts/http";
3
+ export interface VueKitConfig {
4
+ api: {
5
+ baseURL: string;
6
+ timeout?: number;
7
+ auth?: AuthConfig;
8
+ handlers?: HttpHandlers;
9
+ };
10
+ modules?: {
11
+ /** Base path where generated modules are placed. Defaults to "src/modules". */
12
+ path?: string;
13
+ };
14
+ cli?: {
15
+ /** Custom stubs directory. Defaults to ".devapps/stubs" in the consuming project. */
16
+ stubsPath?: string;
17
+ };
18
+ }
19
+ //# sourceMappingURL=VueKitConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VueKitConfig.d.ts","sourceRoot":"","sources":["../../src/config/VueKitConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE;QACH,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB,QAAQ,CAAC,EAAE,YAAY,CAAC;KACzB,CAAC;IAEF,OAAO,CAAC,EAAE;QACR,+EAA+E;QAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,GAAG,CAAC,EAAE;QACJ,qFAAqF;QACrF,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
@@ -0,0 +1,8 @@
1
+ import { HttpClient } from "../core/http/HttpClient";
2
+ import type { VueKitConfig } from "./VueKitConfig";
3
+ export interface VueKit {
4
+ http: HttpClient;
5
+ config: VueKitConfig;
6
+ }
7
+ export declare function createVueKit(config: VueKitConfig): VueKit;
8
+ //# sourceMappingURL=createVueKit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createVueKit.d.ts","sourceRoot":"","sources":["../../src/config/createVueKit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAUzD"}
@@ -0,0 +1,18 @@
1
+ import type { PaginationLinks, PaginationMeta } from "./pagination";
2
+ export interface ApiResource<T> {
3
+ data: T;
4
+ }
5
+ export interface ApiCollection<T> {
6
+ data: T[];
7
+ }
8
+ export interface ApiPaginatedCollection<T> {
9
+ data: T[];
10
+ links: PaginationLinks;
11
+ meta: PaginationMeta;
12
+ }
13
+ export type ApiParams = Record<string, string | number | boolean | null | undefined>;
14
+ export interface ApiErrorResponse {
15
+ message: string;
16
+ errors?: Record<string, string[]>;
17
+ }
18
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/contracts/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,IAAI,EAAE,CAAC,EAAE,CAAC;CACX;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,CAC5B,MAAM,EACN,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAC7C,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACnC"}
@@ -0,0 +1,16 @@
1
+ import type { TokenStorage } from "../core/http/auth/TokenStorage";
2
+ export type AuthDriver = "none" | "jwt" | "cookie";
3
+ export interface AuthConfig {
4
+ driver: AuthDriver;
5
+ tokenStorage?: TokenStorageConfig | TokenStorage;
6
+ csrf?: CsrfConfig;
7
+ }
8
+ export interface TokenStorageConfig {
9
+ type: "localStorage" | "sessionStorage";
10
+ key: string;
11
+ }
12
+ export interface CsrfConfig {
13
+ enabled: boolean;
14
+ endpoint?: string;
15
+ }
16
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/contracts/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,kBAAkB,GAAG,YAAY,CAAC;IACjD,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CAAC;IACxC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,8 @@
1
+ export interface HttpHandlers {
2
+ /**
3
+ * Called when the API responds with 401 Unauthorized. The package never
4
+ * redirects automatically — the consuming application decides what to do.
5
+ */
6
+ onUnauthorized?: () => void;
7
+ }
8
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/contracts/http.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B"}
@@ -0,0 +1,19 @@
1
+ export interface PaginationLinks {
2
+ first: string | null;
3
+ last: string | null;
4
+ prev: string | null;
5
+ next: string | null;
6
+ }
7
+ export interface PaginationMeta {
8
+ current_page: number;
9
+ from: number | null;
10
+ last_page: number;
11
+ per_page: number;
12
+ to: number | null;
13
+ total: number;
14
+ }
15
+ export interface PaginationParams {
16
+ page?: number;
17
+ per_page?: number;
18
+ }
19
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/contracts/pagination.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,32 @@
1
+ type FormErrors<T extends object> = Partial<Record<keyof T, string>>;
2
+ type SubmitCallback<T extends object> = (data: T) => Promise<unknown>;
3
+ /**
4
+ * Generic form abstraction with error handling compatible with Laravel 422 responses.
5
+ *
6
+ * @example
7
+ * const form = new Form({ name: '', email: '' })
8
+ * await form.submit(() => service.store(form.data))
9
+ * if (form.errors.name) { ... }
10
+ */
11
+ export declare class Form<T extends object> {
12
+ data: T;
13
+ errors: FormErrors<T>;
14
+ processing: boolean;
15
+ success: boolean;
16
+ private readonly _initial;
17
+ constructor(initialData: T);
18
+ submit(callback: SubmitCallback<T>): Promise<void>;
19
+ reset(): void;
20
+ resetField(field: keyof T): void;
21
+ clearErrors(): void;
22
+ clearError(field: keyof T): void;
23
+ /**
24
+ * Accepts Laravel-style error bags: `{ field: ['msg1', 'msg2'] }`.
25
+ * Only the first message per field is stored.
26
+ */
27
+ setErrors(errors: Record<string, string[]>): void;
28
+ /** True when the form has any validation error. */
29
+ get hasErrors(): boolean;
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=Form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/core/forms/Form.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAErE,KAAK,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtE;;;;;;;GAOG;AACH,qBAAa,IAAI,CAAC,CAAC,SAAS,MAAM;IAChC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAM;IAC3B,UAAU,UAAS;IACnB,OAAO,UAAS;IAEhB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAI;gBAEjB,WAAW,EAAE,CAAC;IAKpB,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBxD,KAAK,IAAI,IAAI;IAOb,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI;IAOhC,WAAW,IAAI,IAAI;IAInB,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI;IAMhC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI;IAcjD,mDAAmD;IACnD,IAAI,SAAS,IAAI,OAAO,CAEvB;CACF"}
@@ -0,0 +1,13 @@
1
+ import { type AxiosInstance } from "axios";
2
+ import type { HttpClientConfig } from "./HttpClientConfig";
3
+ export declare class HttpClient {
4
+ private readonly client;
5
+ private readonly authDriver;
6
+ constructor(config: HttpClientConfig);
7
+ private createAuthDriver;
8
+ private resolveTokenStorage;
9
+ /** Clears whatever authentication state the configured driver holds (token, csrf, etc). */
10
+ clearAuth(): void;
11
+ instance(): AxiosInstance;
12
+ }
13
+ //# sourceMappingURL=HttpClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../../src/core/http/HttpClient.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkB3D,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IAEvC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyB;gBAExC,MAAM,EAAE,gBAAgB;IAiBpC,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,mBAAmB;IAgB3B,2FAA2F;IAC3F,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,aAAa;CAG1B"}
@@ -0,0 +1,9 @@
1
+ import type { AuthConfig } from "../../contracts/auth";
2
+ import type { HttpHandlers } from "../../contracts/http";
3
+ export interface HttpClientConfig {
4
+ baseURL: string;
5
+ timeout?: number;
6
+ auth?: AuthConfig;
7
+ handlers?: HttpHandlers;
8
+ }
9
+ //# sourceMappingURL=HttpClientConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpClientConfig.d.ts","sourceRoot":"","sources":["../../../src/core/http/HttpClientConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB"}
@@ -0,0 +1,10 @@
1
+ import type { AxiosError } from "axios";
2
+ import type { ApiErrorResponse } from "../../contracts/api";
3
+ export declare class HttpError extends Error {
4
+ readonly status: number | null;
5
+ readonly errors: Record<string, string[]> | undefined;
6
+ readonly response: unknown;
7
+ constructor(message: string, status: number | null, errors?: Record<string, string[]>, response?: unknown);
8
+ static fromAxiosError(error: AxiosError<ApiErrorResponse>): HttpError;
9
+ }
10
+ //# sourceMappingURL=HttpError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpError.d.ts","sourceRoot":"","sources":["../../../src/core/http/HttpError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,qBAAa,SAAU,SAAQ,KAAK;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;gBAGzB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACjC,QAAQ,CAAC,EAAE,OAAO;IASpB,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,GAAG,SAAS;CAgBtE"}
@@ -0,0 +1,6 @@
1
+ import type { AxiosInstance } from "axios";
2
+ export interface AuthDriver {
3
+ configure(client: AxiosInstance): void;
4
+ clear(): void;
5
+ }
6
+ //# sourceMappingURL=AuthDriver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthDriver.d.ts","sourceRoot":"","sources":["../../../../src/core/http/auth/AuthDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IACvC,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -0,0 +1,12 @@
1
+ import type { AxiosInstance } from "axios";
2
+ import type { AuthDriver } from "./AuthDriver";
3
+ import type { CsrfConfig } from "../../../contracts/auth";
4
+ export declare class CookieAuthDriver implements AuthDriver {
5
+ private readonly csrf?;
6
+ private csrfInitialization;
7
+ constructor(csrf?: CsrfConfig | undefined);
8
+ configure(client: AxiosInstance): void;
9
+ clear(): void;
10
+ private ensureCsrfCookie;
11
+ }
12
+ //# sourceMappingURL=CookieAuthDriver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CookieAuthDriver.d.ts","sourceRoot":"","sources":["../../../../src/core/http/auth/CookieAuthDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAI1D,qBAAa,gBAAiB,YAAW,UAAU;IAGrC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IAFlC,OAAO,CAAC,kBAAkB,CAA8B;gBAE3B,IAAI,CAAC,EAAE,UAAU,YAAA;IAE9C,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAkBtC,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,gBAAgB;CAQzB"}
@@ -0,0 +1,10 @@
1
+ import type { AxiosInstance } from "axios";
2
+ import type { AuthDriver } from "./AuthDriver";
3
+ import type { TokenStorage } from "./TokenStorage";
4
+ export declare class JwtAuthDriver implements AuthDriver {
5
+ private readonly storage;
6
+ constructor(storage: TokenStorage);
7
+ configure(client: AxiosInstance): void;
8
+ clear(): void;
9
+ }
10
+ //# sourceMappingURL=JwtAuthDriver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JwtAuthDriver.d.ts","sourceRoot":"","sources":["../../../../src/core/http/auth/JwtAuthDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,qBAAa,aAAc,YAAW,UAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,YAAY;IAElD,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAYtC,KAAK,IAAI,IAAI;CAGd"}
@@ -0,0 +1,9 @@
1
+ import type { TokenStorage } from "./TokenStorage";
2
+ export declare class LocalStorageTokenStorage implements TokenStorage {
3
+ private readonly key;
4
+ constructor(key: string);
5
+ get(): string | null;
6
+ set(token: string): void;
7
+ remove(): void;
8
+ }
9
+ //# sourceMappingURL=LocalStorageTokenStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalStorageTokenStorage.d.ts","sourceRoot":"","sources":["../../../../src/core/http/auth/LocalStorageTokenStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,qBAAa,wBAAyB,YAAW,YAAY;IAC/C,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,MAAM;IAExC,GAAG,IAAI,MAAM,GAAG,IAAI;IAKpB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKxB,MAAM,IAAI,IAAI;CAIf"}
@@ -0,0 +1,9 @@
1
+ import type { TokenStorage } from "./TokenStorage";
2
+ export declare class SessionStorageTokenStorage implements TokenStorage {
3
+ private readonly key;
4
+ constructor(key: string);
5
+ get(): string | null;
6
+ set(token: string): void;
7
+ remove(): void;
8
+ }
9
+ //# sourceMappingURL=SessionStorageTokenStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionStorageTokenStorage.d.ts","sourceRoot":"","sources":["../../../../src/core/http/auth/SessionStorageTokenStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,qBAAa,0BAA2B,YAAW,YAAY;IACjD,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,MAAM;IAExC,GAAG,IAAI,MAAM,GAAG,IAAI;IAKpB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKxB,MAAM,IAAI,IAAI;CAIf"}
@@ -0,0 +1,6 @@
1
+ export interface TokenStorage {
2
+ get(): string | null;
3
+ set(token: string): void;
4
+ remove(): void;
5
+ }
6
+ //# sourceMappingURL=TokenStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenStorage.d.ts","sourceRoot":"","sources":["../../../../src/core/http/auth/TokenStorage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,GAAG,IAAI,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,IAAI,IAAI,CAAC;CAChB"}
@@ -0,0 +1,4 @@
1
+ import type { AxiosInstance } from "axios";
2
+ import type { HttpHandlers } from "../../../contracts/http";
3
+ export declare function registerResponseInterceptor(client: AxiosInstance, handlers?: HttpHandlers): void;
4
+ //# sourceMappingURL=response.interceptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.interceptor.d.ts","sourceRoot":"","sources":["../../../../src/core/http/interceptors/response.interceptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,aAAa,EACrB,QAAQ,CAAC,EAAE,YAAY,GACtB,IAAI,CAaN"}
@@ -0,0 +1,33 @@
1
+ import type { PaginationMeta, PaginationLinks } from "../../contracts/pagination";
2
+ /**
3
+ * Immutable value-object that wraps Laravel pagination meta + links
4
+ * and exposes derived helpers.
5
+ */
6
+ export declare class Pagination {
7
+ readonly meta: PaginationMeta;
8
+ readonly links: PaginationLinks;
9
+ constructor(meta: PaginationMeta, links: PaginationLinks);
10
+ get currentPage(): number;
11
+ get lastPage(): number;
12
+ get perPage(): number;
13
+ get total(): number;
14
+ get from(): number | null;
15
+ get to(): number | null;
16
+ get isFirstPage(): boolean;
17
+ get isLastPage(): boolean;
18
+ get hasPrevPage(): boolean;
19
+ get hasNextPage(): boolean;
20
+ /** Total number of pages. */
21
+ get pageCount(): number;
22
+ /** Array of page numbers for rendering a paginator UI. */
23
+ pages(): number[];
24
+ /** Build the next page params or null if on last page. */
25
+ nextPageParams(): {
26
+ page: number;
27
+ } | null;
28
+ /** Build the prev page params or null if on first page. */
29
+ prevPageParams(): {
30
+ page: number;
31
+ } | null;
32
+ }
33
+ //# sourceMappingURL=Pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/core/pagination/Pagination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElF;;;GAGG;AACH,qBAAa,UAAU;IACrB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;gBAEpB,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe;IAKxD,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,IAAI,IAAI,MAAM,GAAG,IAAI,CAExB;IAED,IAAI,EAAE,IAAI,MAAM,GAAG,IAAI,CAEtB;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,6BAA6B;IAC7B,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,0DAA0D;IAC1D,KAAK,IAAI,MAAM,EAAE;IAIjB,0DAA0D;IAC1D,cAAc,IAAI;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAKzC,2DAA2D;IAC3D,cAAc,IAAI;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CAI1C"}
@@ -0,0 +1,17 @@
1
+ import type { AxiosResponse } from "axios";
2
+ import type { HttpClient } from "../http/HttpClient";
3
+ import type { ApiParams } from "../../contracts/api";
4
+ /**
5
+ * Base class for all application services.
6
+ * Services that extend BaseService never import Axios directly.
7
+ */
8
+ export declare class BaseService {
9
+ protected readonly http: HttpClient;
10
+ constructor(http: HttpClient);
11
+ protected get<T>(url: string, params?: ApiParams): Promise<AxiosResponse<T>>;
12
+ protected post<T>(url: string, data?: unknown, params?: ApiParams): Promise<AxiosResponse<T>>;
13
+ protected put<T>(url: string, data?: unknown, params?: ApiParams): Promise<AxiosResponse<T>>;
14
+ protected patch<T>(url: string, data?: unknown, params?: ApiParams): Promise<AxiosResponse<T>>;
15
+ protected delete<T>(url: string, params?: ApiParams): Promise<AxiosResponse<T>>;
16
+ }
17
+ //# sourceMappingURL=BaseService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseService.d.ts","sourceRoot":"","sources":["../../../src/core/services/BaseService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;GAGG;AACH,qBAAa,WAAW;IACV,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU;gBAAhB,IAAI,EAAE,UAAU;IAE/C,SAAS,CAAC,GAAG,CAAC,CAAC,EACb,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAI5B,SAAS,CAAC,IAAI,CAAC,CAAC,EACd,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,OAAO,EACd,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAI5B,SAAS,CAAC,GAAG,CAAC,CAAC,EACb,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,OAAO,EACd,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAI5B,SAAS,CAAC,KAAK,CAAC,CAAC,EACf,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,OAAO,EACd,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAI5B,SAAS,CAAC,MAAM,CAAC,CAAC,EAChB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAG7B"}
@@ -0,0 +1,29 @@
1
+ import type { HttpClient } from "../http/HttpClient";
2
+ import type { ApiResource, ApiPaginatedCollection, ApiParams } from "../../contracts/api";
3
+ import type { PaginationParams } from "../../contracts/pagination";
4
+ import { BaseService } from "./BaseService";
5
+ /**
6
+ * Generic CRUD service for resources exposed by a Laravel REST API.
7
+ *
8
+ * @example
9
+ * class CustomerService extends CrudService<Customer> {
10
+ * constructor(http: HttpClient) {
11
+ * super(http, '/customers')
12
+ * }
13
+ * }
14
+ */
15
+ export declare class CrudService<T> extends BaseService {
16
+ protected readonly resourcePath: string;
17
+ constructor(http: HttpClient, resourcePath: string);
18
+ /** GET /resource — paginated list */
19
+ index(params?: PaginationParams & ApiParams): Promise<ApiPaginatedCollection<T>>;
20
+ /** GET /resource/:id */
21
+ show(id: string | number, params?: ApiParams): Promise<ApiResource<T>>;
22
+ /** POST /resource */
23
+ store(data: unknown): Promise<ApiResource<T>>;
24
+ /** PUT /resource/:id */
25
+ update(id: string | number, data: unknown): Promise<ApiResource<T>>;
26
+ /** DELETE /resource/:id */
27
+ destroy(id: string | number): Promise<void>;
28
+ }
29
+ //# sourceMappingURL=CrudService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CrudService.d.ts","sourceRoot":"","sources":["../../../src/core/services/CrudService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EACV,WAAW,EACX,sBAAsB,EACtB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,WAAW;IAG3C,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM;gBADvC,IAAI,EAAE,UAAU,EACG,YAAY,EAAE,MAAM;IAKzC,qCAAqC;IAC/B,KAAK,CACT,MAAM,CAAC,EAAE,gBAAgB,GAAG,SAAS,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAQrC,wBAAwB;IAClB,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAQ5E,qBAAqB;IACf,KAAK,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAKnD,wBAAwB;IAClB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAQzE,2BAA2B;IACrB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlD"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Shared state shape expected by CrudStore.
3
+ * Exported so consuming apps can type their stores explicitly.
4
+ */
5
+ export interface CrudState<T> {
6
+ items: T[];
7
+ item: T | null;
8
+ loading: boolean;
9
+ saving: boolean;
10
+ deleting: boolean;
11
+ error: string | null;
12
+ pagination: {
13
+ currentPage: number;
14
+ lastPage: number;
15
+ perPage: number;
16
+ total: number;
17
+ } | null;
18
+ }
19
+ /**
20
+ * Returns the default initial state for a CrudStore.
21
+ */
22
+ export declare function initialCrudState<T>(): CrudState<T>;
23
+ //# sourceMappingURL=BaseStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseStore.d.ts","sourceRoot":"","sources":["../../../src/core/stores/BaseStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE;QACV,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,IAAI,CAAC;CACV;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAUlD"}
@@ -0,0 +1,254 @@
1
+ import type { CrudService } from "../services/CrudService";
2
+ import type { ApiParams } from "../../contracts/api";
3
+ import type { PaginationParams } from "../../contracts/pagination";
4
+ import { Pagination } from "../pagination/Pagination";
5
+ /**
6
+ * Factory that creates a fully-typed Pinia Composition-API store for CRUD operations.
7
+ *
8
+ * @example
9
+ * export const useCustomerStore = defineCrudStore('customer', () => customerService)
10
+ */
11
+ export declare function defineCrudStore<T extends {
12
+ uuid: string;
13
+ }>(id: string, serviceFactory: () => CrudService<T>): import("pinia").StoreDefinition<string, Pick<{
14
+ items: import("vue").Ref<T[], T[]>;
15
+ item: import("vue").Ref<T | null, T | null>;
16
+ loading: import("vue").Ref<boolean, boolean>;
17
+ saving: import("vue").Ref<boolean, boolean>;
18
+ deleting: import("vue").Ref<boolean, boolean>;
19
+ error: import("vue").Ref<string | null, string | null>;
20
+ pagination: import("vue").Ref<{
21
+ readonly meta: {
22
+ current_page: number;
23
+ from: number | null;
24
+ last_page: number;
25
+ per_page: number;
26
+ to: number | null;
27
+ total: number;
28
+ };
29
+ readonly links: {
30
+ first: string | null;
31
+ last: string | null;
32
+ prev: string | null;
33
+ next: string | null;
34
+ };
35
+ readonly currentPage: number;
36
+ readonly lastPage: number;
37
+ readonly perPage: number;
38
+ readonly total: number;
39
+ readonly from: number | null;
40
+ readonly to: number | null;
41
+ readonly isFirstPage: boolean;
42
+ readonly isLastPage: boolean;
43
+ readonly hasPrevPage: boolean;
44
+ readonly hasNextPage: boolean;
45
+ readonly pageCount: number;
46
+ pages: () => number[];
47
+ nextPageParams: () => {
48
+ page: number;
49
+ } | null;
50
+ prevPageParams: () => {
51
+ page: number;
52
+ } | null;
53
+ } | null, Pagination | {
54
+ readonly meta: {
55
+ current_page: number;
56
+ from: number | null;
57
+ last_page: number;
58
+ per_page: number;
59
+ to: number | null;
60
+ total: number;
61
+ };
62
+ readonly links: {
63
+ first: string | null;
64
+ last: string | null;
65
+ prev: string | null;
66
+ next: string | null;
67
+ };
68
+ readonly currentPage: number;
69
+ readonly lastPage: number;
70
+ readonly perPage: number;
71
+ readonly total: number;
72
+ readonly from: number | null;
73
+ readonly to: number | null;
74
+ readonly isFirstPage: boolean;
75
+ readonly isLastPage: boolean;
76
+ readonly hasPrevPage: boolean;
77
+ readonly hasNextPage: boolean;
78
+ readonly pageCount: number;
79
+ pages: () => number[];
80
+ nextPageParams: () => {
81
+ page: number;
82
+ } | null;
83
+ prevPageParams: () => {
84
+ page: number;
85
+ } | null;
86
+ } | null>;
87
+ fetchAll: (params?: PaginationParams & ApiParams) => Promise<void>;
88
+ fetchOne: (id: string | number) => Promise<void>;
89
+ create: (data: unknown) => Promise<T>;
90
+ update: (id: string | number, data: unknown) => Promise<T>;
91
+ remove: (id: string | number) => Promise<void>;
92
+ $reset: () => void;
93
+ }, "items" | "item" | "loading" | "saving" | "deleting" | "error" | "pagination">, Pick<{
94
+ items: import("vue").Ref<T[], T[]>;
95
+ item: import("vue").Ref<T | null, T | null>;
96
+ loading: import("vue").Ref<boolean, boolean>;
97
+ saving: import("vue").Ref<boolean, boolean>;
98
+ deleting: import("vue").Ref<boolean, boolean>;
99
+ error: import("vue").Ref<string | null, string | null>;
100
+ pagination: import("vue").Ref<{
101
+ readonly meta: {
102
+ current_page: number;
103
+ from: number | null;
104
+ last_page: number;
105
+ per_page: number;
106
+ to: number | null;
107
+ total: number;
108
+ };
109
+ readonly links: {
110
+ first: string | null;
111
+ last: string | null;
112
+ prev: string | null;
113
+ next: string | null;
114
+ };
115
+ readonly currentPage: number;
116
+ readonly lastPage: number;
117
+ readonly perPage: number;
118
+ readonly total: number;
119
+ readonly from: number | null;
120
+ readonly to: number | null;
121
+ readonly isFirstPage: boolean;
122
+ readonly isLastPage: boolean;
123
+ readonly hasPrevPage: boolean;
124
+ readonly hasNextPage: boolean;
125
+ readonly pageCount: number;
126
+ pages: () => number[];
127
+ nextPageParams: () => {
128
+ page: number;
129
+ } | null;
130
+ prevPageParams: () => {
131
+ page: number;
132
+ } | null;
133
+ } | null, Pagination | {
134
+ readonly meta: {
135
+ current_page: number;
136
+ from: number | null;
137
+ last_page: number;
138
+ per_page: number;
139
+ to: number | null;
140
+ total: number;
141
+ };
142
+ readonly links: {
143
+ first: string | null;
144
+ last: string | null;
145
+ prev: string | null;
146
+ next: string | null;
147
+ };
148
+ readonly currentPage: number;
149
+ readonly lastPage: number;
150
+ readonly perPage: number;
151
+ readonly total: number;
152
+ readonly from: number | null;
153
+ readonly to: number | null;
154
+ readonly isFirstPage: boolean;
155
+ readonly isLastPage: boolean;
156
+ readonly hasPrevPage: boolean;
157
+ readonly hasNextPage: boolean;
158
+ readonly pageCount: number;
159
+ pages: () => number[];
160
+ nextPageParams: () => {
161
+ page: number;
162
+ } | null;
163
+ prevPageParams: () => {
164
+ page: number;
165
+ } | null;
166
+ } | null>;
167
+ fetchAll: (params?: PaginationParams & ApiParams) => Promise<void>;
168
+ fetchOne: (id: string | number) => Promise<void>;
169
+ create: (data: unknown) => Promise<T>;
170
+ update: (id: string | number, data: unknown) => Promise<T>;
171
+ remove: (id: string | number) => Promise<void>;
172
+ $reset: () => void;
173
+ }, never>, Pick<{
174
+ items: import("vue").Ref<T[], T[]>;
175
+ item: import("vue").Ref<T | null, T | null>;
176
+ loading: import("vue").Ref<boolean, boolean>;
177
+ saving: import("vue").Ref<boolean, boolean>;
178
+ deleting: import("vue").Ref<boolean, boolean>;
179
+ error: import("vue").Ref<string | null, string | null>;
180
+ pagination: import("vue").Ref<{
181
+ readonly meta: {
182
+ current_page: number;
183
+ from: number | null;
184
+ last_page: number;
185
+ per_page: number;
186
+ to: number | null;
187
+ total: number;
188
+ };
189
+ readonly links: {
190
+ first: string | null;
191
+ last: string | null;
192
+ prev: string | null;
193
+ next: string | null;
194
+ };
195
+ readonly currentPage: number;
196
+ readonly lastPage: number;
197
+ readonly perPage: number;
198
+ readonly total: number;
199
+ readonly from: number | null;
200
+ readonly to: number | null;
201
+ readonly isFirstPage: boolean;
202
+ readonly isLastPage: boolean;
203
+ readonly hasPrevPage: boolean;
204
+ readonly hasNextPage: boolean;
205
+ readonly pageCount: number;
206
+ pages: () => number[];
207
+ nextPageParams: () => {
208
+ page: number;
209
+ } | null;
210
+ prevPageParams: () => {
211
+ page: number;
212
+ } | null;
213
+ } | null, Pagination | {
214
+ readonly meta: {
215
+ current_page: number;
216
+ from: number | null;
217
+ last_page: number;
218
+ per_page: number;
219
+ to: number | null;
220
+ total: number;
221
+ };
222
+ readonly links: {
223
+ first: string | null;
224
+ last: string | null;
225
+ prev: string | null;
226
+ next: string | null;
227
+ };
228
+ readonly currentPage: number;
229
+ readonly lastPage: number;
230
+ readonly perPage: number;
231
+ readonly total: number;
232
+ readonly from: number | null;
233
+ readonly to: number | null;
234
+ readonly isFirstPage: boolean;
235
+ readonly isLastPage: boolean;
236
+ readonly hasPrevPage: boolean;
237
+ readonly hasNextPage: boolean;
238
+ readonly pageCount: number;
239
+ pages: () => number[];
240
+ nextPageParams: () => {
241
+ page: number;
242
+ } | null;
243
+ prevPageParams: () => {
244
+ page: number;
245
+ } | null;
246
+ } | null>;
247
+ fetchAll: (params?: PaginationParams & ApiParams) => Promise<void>;
248
+ fetchOne: (id: string | number) => Promise<void>;
249
+ create: (data: unknown) => Promise<T>;
250
+ update: (id: string | number, data: unknown) => Promise<T>;
251
+ remove: (id: string | number) => Promise<void>;
252
+ $reset: () => void;
253
+ }, "fetchAll" | "fetchOne" | "create" | "update" | "remove" | "$reset">>;
254
+ //# sourceMappingURL=CrudStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CrudStore.d.ts","sourceRoot":"","sources":["../../../src/core/stores/CrudStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACxD,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwBvB,gBAAgB,GAAG,SAAS,KACpC,OAAO,CAAC,IAAI,CAAC;mBAgBY,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;mBAe/B,OAAO,KAAG,OAAO,CAAC,CAAC,CAAC;iBAetB,MAAM,GAAG,MAAM,QAAQ,OAAO,KAAG,OAAO,CAAC,CAAC,CAAC;iBAe3C,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;kBAetC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA7EZ,gBAAgB,GAAG,SAAS,KACpC,OAAO,CAAC,IAAI,CAAC;mBAgBY,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;mBAe/B,OAAO,KAAG,OAAO,CAAC,CAAC,CAAC;iBAetB,MAAM,GAAG,MAAM,QAAQ,OAAO,KAAG,OAAO,CAAC,CAAC,CAAC;iBAe3C,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;kBAetC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA7EZ,gBAAgB,GAAG,SAAS,KACpC,OAAO,CAAC,IAAI,CAAC;mBAgBY,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;mBAe/B,OAAO,KAAG,OAAO,CAAC,CAAC,CAAC;iBAetB,MAAM,GAAG,MAAM,QAAQ,OAAO,KAAG,OAAO,CAAC,CAAC,CAAC;iBAe3C,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;kBAetC,IAAI;yEA0B1B"}
@@ -0,0 +1,20 @@
1
+ export { createVueKit } from "./config/createVueKit";
2
+ export type { VueKit } from "./config/createVueKit";
3
+ export type { VueKitConfig } from "./config/VueKitConfig";
4
+ export { HttpClient } from "./core/http/HttpClient";
5
+ export type { HttpClientConfig } from "./core/http/HttpClientConfig";
6
+ export { HttpError } from "./core/http/HttpError";
7
+ export { LocalStorageTokenStorage } from "./core/http/auth/LocalStorageTokenStorage";
8
+ export { SessionStorageTokenStorage } from "./core/http/auth/SessionStorageTokenStorage";
9
+ export type { TokenStorage } from "./core/http/auth/TokenStorage";
10
+ export { BaseService } from "./core/services/BaseService";
11
+ export { CrudService } from "./core/services/CrudService";
12
+ export { defineCrudStore } from "./core/stores/CrudStore";
13
+ export type { CrudState } from "./core/stores/BaseStore";
14
+ export { Form } from "./core/forms/Form";
15
+ export { Pagination } from "./core/pagination/Pagination";
16
+ export type { ApiResource, ApiCollection, ApiPaginatedCollection, ApiParams, ApiErrorResponse, } from "./contracts/api";
17
+ export type { PaginationMeta, PaginationLinks, PaginationParams, } from "./contracts/pagination";
18
+ export type { AuthConfig, AuthDriver, TokenStorageConfig, CsrfConfig, } from "./contracts/auth";
19
+ export type { HttpHandlers } from "./contracts/http";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,YAAY,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,YAAY,EACV,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,SAAS,EACT,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,UAAU,GACX,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,30 @@
1
+ type __VLS_Props = {
2
+ open: boolean;
3
+ size?: 'sm' | 'md' | 'lg' | 'xl';
4
+ closeOnBackdrop?: boolean;
5
+ closeOnEsc?: boolean;
6
+ closable?: boolean;
7
+ loading?: boolean;
8
+ };
9
+ declare var __VLS_19: {}, __VLS_21: {}, __VLS_23: {};
10
+ type __VLS_Slots = {} & {
11
+ header?: (props: typeof __VLS_19) => any;
12
+ } & {
13
+ default?: (props: typeof __VLS_21) => any;
14
+ } & {
15
+ footer?: (props: typeof __VLS_23) => any;
16
+ };
17
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ close: () => any;
19
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onClose?: () => any;
21
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
30
+ //# sourceMappingURL=BaseModal.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseModal.vue.d.ts","sourceRoot":"","sources":["../../../src/ui/components/BaseModal.vue"],"names":[],"mappings":"AA8HA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAChC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAsQF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACpE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ open: boolean;
3
+ title?: string;
4
+ description?: string;
5
+ confirmationLabel: string;
6
+ loading?: boolean;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ close: () => any;
10
+ confirm: () => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onClose?: () => any;
13
+ onConfirm?: () => any;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ //# sourceMappingURL=ConfirmDeleteModal.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmDeleteModal.vue.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ConfirmDeleteModal.vue"],"names":[],"mappings":"AAqGA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAmMF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,4 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ //# sourceMappingURL=ToastContainer.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastContainer.vue.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ToastContainer.vue"],"names":[],"mappings":"AAyPA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,23 @@
1
+ export type ToastType = 'success' | 'error' | 'warning' | 'info';
2
+ export interface Toast {
3
+ id: number;
4
+ message: string;
5
+ type: ToastType;
6
+ duration: number;
7
+ }
8
+ export declare function useToast(): {
9
+ toasts: import("vue").Ref<{
10
+ id: number;
11
+ message: string;
12
+ type: ToastType;
13
+ duration: number;
14
+ }[], Toast[] | {
15
+ id: number;
16
+ message: string;
17
+ type: ToastType;
18
+ duration: number;
19
+ }[]>;
20
+ addToast: (message: string, type?: ToastType, duration?: number) => void;
21
+ removeToast: (id: number) => void;
22
+ };
23
+ //# sourceMappingURL=useToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../../src/ui/composables/useToast.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAEhE,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;CACjB;AAKD,wBAAgB,QAAQ;;YATlB,MAAM;iBACD,MAAM;cACT,SAAS;kBACL,MAAM;;YAHZ,MAAM;iBACD,MAAM;cACT,SAAS;kBACL,MAAM;;wBAOW,MAAM,SAAQ,SAAS;sBAWzB,MAAM;EAYhC"}
package/dist/ui.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export { default as BaseModal } from './ui/components/BaseModal.vue';
2
+ export { default as ConfirmDeleteModal } from './ui/components/ConfirmDeleteModal.vue';
3
+ export { default as ToastContainer } from './ui/components/ToastContainer.vue';
4
+ export { useToast } from './ui/composables/useToast';
5
+ export type { Toast, ToastType } from './ui/composables/useToast';
6
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AACtF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devappsnpm/vue-kit",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Vue 3 toolkit for Laravel API applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "devapps-vue": "./bin/devapps-vue.js"
32
32
  },
33
33
  "scripts": {
34
- "build": "tsup && vue-tsc --declaration --emitDeclarationOnly --outDir dist",
34
+ "build": "tsup && vue-tsc -p tsconfig.build.json",
35
35
  "dev": "tsup --watch",
36
36
  "typecheck": "tsc --noEmit",
37
37
  "test": "vitest",