@kyro-cms/core 0.3.5 → 0.4.0

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 (78) hide show
  1. package/README.md +3 -3
  2. package/dist/api-handler.cjs +5 -5
  3. package/dist/api-handler.js +4 -4
  4. package/dist/{chunk-X3CU27OO.cjs → chunk-3FW6WVVP.cjs} +2 -17
  5. package/dist/chunk-3FW6WVVP.cjs.map +1 -0
  6. package/dist/{chunk-R4C4O4SE.cjs → chunk-3ZZPZYCM.cjs} +36 -61
  7. package/dist/chunk-3ZZPZYCM.cjs.map +1 -0
  8. package/dist/{chunk-Y3TM7WH7.js → chunk-C4JJEE42.js} +36 -61
  9. package/dist/chunk-C4JJEE42.js.map +1 -0
  10. package/dist/{chunk-2UOI5MUC.cjs → chunk-FWGHXRRI.cjs} +4 -4
  11. package/dist/{chunk-2UOI5MUC.cjs.map → chunk-FWGHXRRI.cjs.map} +1 -1
  12. package/dist/{chunk-DE7OQOMD.cjs → chunk-M4GFA2UQ.cjs} +19 -19
  13. package/dist/chunk-M4GFA2UQ.cjs.map +1 -0
  14. package/dist/{chunk-4UD44U4Z.js → chunk-OJBK3JYF.js} +18 -18
  15. package/dist/chunk-OJBK3JYF.js.map +1 -0
  16. package/dist/{chunk-5FTY2DLG.js → chunk-SAMZQVC2.js} +3 -3
  17. package/dist/{chunk-5FTY2DLG.js.map → chunk-SAMZQVC2.js.map} +1 -1
  18. package/dist/{chunk-RGIQKTZ7.js → chunk-YMG55RSX.js} +4 -18
  19. package/dist/chunk-YMG55RSX.js.map +1 -0
  20. package/dist/drizzle/index.cjs +10 -10
  21. package/dist/drizzle/index.js +2 -2
  22. package/dist/index.cjs +48 -55
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.js +6 -13
  25. package/dist/index.js.map +1 -1
  26. package/dist/rest/index.cjs +4 -4
  27. package/dist/rest/index.js +2 -2
  28. package/package.json +2 -14
  29. package/dist/WebhookService-118ZTFis.d.ts +0 -112
  30. package/dist/WebhookService-AefJfqX0.d.cts +0 -112
  31. package/dist/api-handler.d.cts +0 -9
  32. package/dist/api-handler.d.ts +0 -9
  33. package/dist/base-DvvNqnM-.d.cts +0 -73
  34. package/dist/base-eVegJ_Pr.d.ts +0 -73
  35. package/dist/chunk-4UD44U4Z.js.map +0 -1
  36. package/dist/chunk-DE7OQOMD.cjs.map +0 -1
  37. package/dist/chunk-R4C4O4SE.cjs.map +0 -1
  38. package/dist/chunk-RGIQKTZ7.js.map +0 -1
  39. package/dist/chunk-X3CU27OO.cjs.map +0 -1
  40. package/dist/chunk-Y3TM7WH7.js.map +0 -1
  41. package/dist/cli/index.d.cts +0 -1
  42. package/dist/cli/index.d.ts +0 -1
  43. package/dist/client.d.cts +0 -12
  44. package/dist/client.d.ts +0 -12
  45. package/dist/drizzle/index.d.cts +0 -135
  46. package/dist/drizzle/index.d.ts +0 -135
  47. package/dist/fields/index.d.cts +0 -27
  48. package/dist/fields/index.d.ts +0 -27
  49. package/dist/graphql/index.d.cts +0 -22
  50. package/dist/graphql/index.d.ts +0 -22
  51. package/dist/index-Bz9JqRGI.d.cts +0 -86
  52. package/dist/index-Bz9JqRGI.d.ts +0 -86
  53. package/dist/index-CLp-DRKA.d.ts +0 -64
  54. package/dist/index-DfO7G4kN.d.cts +0 -64
  55. package/dist/index.d.cts +0 -1363
  56. package/dist/index.d.ts +0 -1363
  57. package/dist/integration.d.cts +0 -27
  58. package/dist/integration.d.ts +0 -27
  59. package/dist/mongodb/index.d.cts +0 -63
  60. package/dist/mongodb/index.d.ts +0 -63
  61. package/dist/mysql-media-AI6YK767.cjs +0 -48
  62. package/dist/mysql-media-AI6YK767.cjs.map +0 -1
  63. package/dist/mysql-media-CDZUS7YX.js +0 -45
  64. package/dist/mysql-media-CDZUS7YX.js.map +0 -1
  65. package/dist/rest/index.d.cts +0 -57
  66. package/dist/rest/index.d.ts +0 -57
  67. package/dist/templates/index.d.cts +0 -59
  68. package/dist/templates/index.d.ts +0 -59
  69. package/dist/trpc/index.d.cts +0 -136
  70. package/dist/trpc/index.d.ts +0 -136
  71. package/dist/types-BnTm7oJG.d.cts +0 -130
  72. package/dist/types-BnTm7oJG.d.ts +0 -130
  73. package/dist/types-Bs1up4yP.d.ts +0 -461
  74. package/dist/types-J3R9nVsZ.d.cts +0 -461
  75. package/dist/types-VtjUxIMp.d.cts +0 -246
  76. package/dist/types-VtjUxIMp.d.ts +0 -246
  77. package/dist/ws/index.d.cts +0 -88
  78. package/dist/ws/index.d.ts +0 -88
@@ -1,27 +0,0 @@
1
- export { p as ALL_FIELD_TYPES, A as ArrayField, B as BaseField, a as Block, b as BlockAdmin, c as BlockImage, d as BlocksField, W as ButtonField, q as COMPLEX_FIELD_TYPES, C as CheckboxField, e as CodeField, f as CollapsibleField, g as ColorField, D as DateField, E as EmailField, F as Field, h as FieldAdmin, i as FieldType, G as GroupField, X as Hook, I as ImageField, J as JSONField, L as LAYOUT_FIELD_TYPES, Y as ListField, M as MarkdownField, N as NumberField, r as PRIMITIVE_FIELD_TYPES, P as PasswordField, s as RELATIONAL_FIELD_TYPES, R as RadioField, j as RelationshipField, k as RichTextBlock, l as RichTextField, m as RowField, S as SelectField, T as TabsField, n as TextField, Z as TextFieldVariant, o as TextareaField, U as UploadField, V as ValidateOptions, _ as createRelationshipFieldConfig, t as isArrayField, u as isBlocksField, v as isGroupField, w as isImageField, x as isLayoutField, y as isNumberField, z as isRelationshipField, H as isRichTextField, K as isSelectField, O as isTextField, Q as isUploadField } from '../types-VtjUxIMp.js';
2
-
3
- interface RichTextMark {
4
- type: string;
5
- attrs?: Record<string, unknown>;
6
- }
7
- interface RichTextNode {
8
- type?: string;
9
- attrs?: Record<string, unknown>;
10
- content?: RichTextNode[];
11
- text?: string;
12
- marks?: RichTextMark[];
13
- [key: string]: unknown;
14
- }
15
- interface RichTextDocument extends RichTextNode {
16
- type: "doc";
17
- content: RichTextNode[];
18
- }
19
- declare const richTextStyles: string;
20
- declare function createEmptyParagraphNode(): RichTextNode;
21
- declare function createColumnNode(content?: RichTextNode[]): RichTextNode;
22
- declare function createColumnsNode(columns?: number): RichTextNode;
23
- declare function normalizeRichTextDocument(value: unknown): RichTextDocument;
24
- declare function normalizeRichTextValue<T>(value: T): T;
25
- declare function renderRichText(value: unknown): string;
26
-
27
- export { type RichTextDocument, type RichTextMark, type RichTextNode, createColumnNode, createColumnsNode, createEmptyParagraphNode, normalizeRichTextDocument, normalizeRichTextValue, renderRichText, richTextStyles };
@@ -1,22 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- import { B as BaseAdapter, m as User, R as Request } from '../types-J3R9nVsZ.cjs';
3
- import { R as Registry } from '../index-DfO7G4kN.cjs';
4
- import '../types-VtjUxIMp.cjs';
5
- import 'zod';
6
-
7
- interface GraphQLSchemaOptions {
8
- registry: Registry;
9
- db: BaseAdapter;
10
- user?: User;
11
- req?: Request;
12
- tenantID?: string;
13
- settings?: Record<string, any>;
14
- }
15
- declare function buildGraphQLSchema(options: GraphQLSchemaOptions): GraphQLSchema;
16
- declare function createGraphQLSchema(registry: Registry, db: BaseAdapter, options?: {
17
- user?: User;
18
- req?: Request;
19
- tenantID?: string;
20
- }): GraphQLSchema;
21
-
22
- export { type GraphQLSchemaOptions, buildGraphQLSchema, createGraphQLSchema };
@@ -1,22 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- import { B as BaseAdapter, m as User, R as Request } from '../types-Bs1up4yP.js';
3
- import { R as Registry } from '../index-CLp-DRKA.js';
4
- import '../types-VtjUxIMp.js';
5
- import 'zod';
6
-
7
- interface GraphQLSchemaOptions {
8
- registry: Registry;
9
- db: BaseAdapter;
10
- user?: User;
11
- req?: Request;
12
- tenantID?: string;
13
- settings?: Record<string, any>;
14
- }
15
- declare function buildGraphQLSchema(options: GraphQLSchemaOptions): GraphQLSchema;
16
- declare function createGraphQLSchema(registry: Registry, db: BaseAdapter, options?: {
17
- user?: User;
18
- req?: Request;
19
- tenantID?: string;
20
- }): GraphQLSchema;
21
-
22
- export { type GraphQLSchemaOptions, buildGraphQLSchema, createGraphQLSchema };
@@ -1,86 +0,0 @@
1
- type StylingMode = 'css' | 'tailwind' | 'css-in-js' | 'styled-components' | 'vanilla-extract';
2
- interface StylingConfig {
3
- mode: StylingMode;
4
- theme?: ThemeConfig;
5
- customProperties?: Record<string, string>;
6
- }
7
- interface ThemeConfig {
8
- colors?: ThemeColors;
9
- fonts?: ThemeFonts;
10
- spacing?: ThemeSpacing;
11
- borderRadius?: ThemeBorderRadius;
12
- shadows?: ThemeShadows;
13
- breakpoints?: Record<string, string>;
14
- }
15
- interface ThemeColors {
16
- primary?: string;
17
- secondary?: string;
18
- accent?: string;
19
- background?: string;
20
- surface?: string;
21
- text?: string;
22
- textMuted?: string;
23
- border?: string;
24
- error?: string;
25
- warning?: string;
26
- success?: string;
27
- info?: string;
28
- }
29
- interface ThemeFonts {
30
- sans?: string;
31
- serif?: string;
32
- mono?: string;
33
- }
34
- interface ThemeSpacing {
35
- xs?: string;
36
- sm?: string;
37
- md?: string;
38
- lg?: string;
39
- xl?: string;
40
- '2xl'?: string;
41
- '3xl'?: string;
42
- '4xl'?: string;
43
- }
44
- interface ThemeBorderRadius {
45
- sm?: string;
46
- md?: string;
47
- lg?: string;
48
- xl?: string;
49
- full?: string;
50
- }
51
- interface ThemeShadows {
52
- sm?: string;
53
- md?: string;
54
- lg?: string;
55
- xl?: string;
56
- }
57
- declare class CSSGenerator {
58
- private config;
59
- private css;
60
- constructor(config: StylingConfig);
61
- addRule(selector: string, properties: Record<string, string>): this;
62
- addMediaQuery(breakpoint: string, rules: string[]): this;
63
- generate(): string;
64
- }
65
- declare function generateTailwindConfig(theme: ThemeConfig): Record<string, any>;
66
- declare const defaultLightTheme: ThemeConfig;
67
- declare const defaultDarkTheme: ThemeConfig;
68
- declare const ecommerce2026Theme: ThemeConfig;
69
- declare function generateCSSVariables(theme: ThemeConfig): string;
70
- interface AdminStylingConfig {
71
- mode: StylingMode;
72
- theme?: ThemeConfig;
73
- customStyles?: string;
74
- componentOverrides?: Record<string, Record<string, string>>;
75
- }
76
- declare function createAdminStyling(config: AdminStylingConfig): string;
77
- interface FieldStyling {
78
- wrapper?: Record<string, string>;
79
- label?: Record<string, string>;
80
- input?: Record<string, string>;
81
- error?: Record<string, string>;
82
- description?: Record<string, string>;
83
- }
84
- declare const defaultFieldStyling: Record<string, FieldStyling>;
85
-
86
- export { type AdminStylingConfig as A, CSSGenerator as C, type FieldStyling as F, type StylingConfig as S, type ThemeBorderRadius as T, type StylingMode as a, type ThemeColors as b, type ThemeConfig as c, type ThemeFonts as d, type ThemeShadows as e, type ThemeSpacing as f, createAdminStyling as g, defaultDarkTheme as h, defaultFieldStyling as i, defaultLightTheme as j, ecommerce2026Theme as k, generateCSSVariables as l, generateTailwindConfig as m };
@@ -1,86 +0,0 @@
1
- type StylingMode = 'css' | 'tailwind' | 'css-in-js' | 'styled-components' | 'vanilla-extract';
2
- interface StylingConfig {
3
- mode: StylingMode;
4
- theme?: ThemeConfig;
5
- customProperties?: Record<string, string>;
6
- }
7
- interface ThemeConfig {
8
- colors?: ThemeColors;
9
- fonts?: ThemeFonts;
10
- spacing?: ThemeSpacing;
11
- borderRadius?: ThemeBorderRadius;
12
- shadows?: ThemeShadows;
13
- breakpoints?: Record<string, string>;
14
- }
15
- interface ThemeColors {
16
- primary?: string;
17
- secondary?: string;
18
- accent?: string;
19
- background?: string;
20
- surface?: string;
21
- text?: string;
22
- textMuted?: string;
23
- border?: string;
24
- error?: string;
25
- warning?: string;
26
- success?: string;
27
- info?: string;
28
- }
29
- interface ThemeFonts {
30
- sans?: string;
31
- serif?: string;
32
- mono?: string;
33
- }
34
- interface ThemeSpacing {
35
- xs?: string;
36
- sm?: string;
37
- md?: string;
38
- lg?: string;
39
- xl?: string;
40
- '2xl'?: string;
41
- '3xl'?: string;
42
- '4xl'?: string;
43
- }
44
- interface ThemeBorderRadius {
45
- sm?: string;
46
- md?: string;
47
- lg?: string;
48
- xl?: string;
49
- full?: string;
50
- }
51
- interface ThemeShadows {
52
- sm?: string;
53
- md?: string;
54
- lg?: string;
55
- xl?: string;
56
- }
57
- declare class CSSGenerator {
58
- private config;
59
- private css;
60
- constructor(config: StylingConfig);
61
- addRule(selector: string, properties: Record<string, string>): this;
62
- addMediaQuery(breakpoint: string, rules: string[]): this;
63
- generate(): string;
64
- }
65
- declare function generateTailwindConfig(theme: ThemeConfig): Record<string, any>;
66
- declare const defaultLightTheme: ThemeConfig;
67
- declare const defaultDarkTheme: ThemeConfig;
68
- declare const ecommerce2026Theme: ThemeConfig;
69
- declare function generateCSSVariables(theme: ThemeConfig): string;
70
- interface AdminStylingConfig {
71
- mode: StylingMode;
72
- theme?: ThemeConfig;
73
- customStyles?: string;
74
- componentOverrides?: Record<string, Record<string, string>>;
75
- }
76
- declare function createAdminStyling(config: AdminStylingConfig): string;
77
- interface FieldStyling {
78
- wrapper?: Record<string, string>;
79
- label?: Record<string, string>;
80
- input?: Record<string, string>;
81
- error?: Record<string, string>;
82
- description?: Record<string, string>;
83
- }
84
- declare const defaultFieldStyling: Record<string, FieldStyling>;
85
-
86
- export { type AdminStylingConfig as A, CSSGenerator as C, type FieldStyling as F, type StylingConfig as S, type ThemeBorderRadius as T, type StylingMode as a, type ThemeColors as b, type ThemeConfig as c, type ThemeFonts as d, type ThemeShadows as e, type ThemeSpacing as f, createAdminStyling as g, defaultDarkTheme as h, defaultFieldStyling as i, defaultLightTheme as j, ecommerce2026Theme as k, generateCSSVariables as l, generateTailwindConfig as m };
@@ -1,64 +0,0 @@
1
- import { C as CollectionConfig, G as GlobalConfig, P as PluginConfig } from './types-Bs1up4yP.js';
2
- import { F as Field } from './types-VtjUxIMp.js';
3
- import { ZodTypeAny } from 'zod';
4
-
5
- declare class Registry {
6
- private collections;
7
- private globals;
8
- private plugins;
9
- private schemaCache;
10
- private initialized;
11
- addCollection(config: CollectionConfig): void;
12
- addCollections(configs: CollectionConfig[]): void;
13
- getCollection(slug: string): CollectionConfig | undefined;
14
- getCollections(): CollectionConfig[];
15
- getCollectionSlugs(): string[];
16
- hasCollection(slug: string): boolean;
17
- removeCollection(slug: string): boolean;
18
- addGlobal(config: GlobalConfig): void;
19
- addGlobals(configs: GlobalConfig[]): void;
20
- getGlobal(slug: string): GlobalConfig | undefined;
21
- getGlobals(): GlobalConfig[];
22
- getGlobalSlugs(): string[];
23
- hasGlobal(slug: string): boolean;
24
- removeGlobal(slug: string): boolean;
25
- addPlugin(plugin: PluginConfig): void;
26
- getPlugins(): PluginConfig[];
27
- getZodSchema(slug: string): ZodTypeAny;
28
- getCreateZodSchema(slug: string): ZodTypeAny;
29
- getUpdateZodSchema(slug: string): ZodTypeAny;
30
- getWhereZodSchema(slug: string): ZodTypeAny;
31
- getFieldZodSchema(field: Field): ZodTypeAny;
32
- private clearSchemaCache;
33
- private applyFieldDefaults;
34
- getFields(slug: string): Field[];
35
- getFieldMap(slug: string): Map<string, Field>;
36
- getVisibleFields(slug: string): Field[];
37
- validate(): void;
38
- init(): Promise<void>;
39
- isInitialized(): boolean;
40
- getPaginationDefaults(slug: string): {
41
- defaultLimit: number;
42
- limits: number[];
43
- };
44
- getDefaultSort(slug: string): string;
45
- getDefaultColumns(slug: string): string[];
46
- getAdminTitle(slug: string): string;
47
- getAdminLabel(slug: string): string;
48
- getAdminGroup(slug: string): string | undefined;
49
- getStats(): {
50
- collections: number;
51
- globals: number;
52
- plugins: number;
53
- fields: number;
54
- };
55
- toJSON(): {
56
- collections: CollectionConfig[];
57
- globals: GlobalConfig[];
58
- };
59
- }
60
- declare function getRegistry(): Registry;
61
- declare function resetRegistry(): void;
62
- declare function createRegistry(): Registry;
63
-
64
- export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };
@@ -1,64 +0,0 @@
1
- import { C as CollectionConfig, G as GlobalConfig, P as PluginConfig } from './types-J3R9nVsZ.cjs';
2
- import { F as Field } from './types-VtjUxIMp.cjs';
3
- import { ZodTypeAny } from 'zod';
4
-
5
- declare class Registry {
6
- private collections;
7
- private globals;
8
- private plugins;
9
- private schemaCache;
10
- private initialized;
11
- addCollection(config: CollectionConfig): void;
12
- addCollections(configs: CollectionConfig[]): void;
13
- getCollection(slug: string): CollectionConfig | undefined;
14
- getCollections(): CollectionConfig[];
15
- getCollectionSlugs(): string[];
16
- hasCollection(slug: string): boolean;
17
- removeCollection(slug: string): boolean;
18
- addGlobal(config: GlobalConfig): void;
19
- addGlobals(configs: GlobalConfig[]): void;
20
- getGlobal(slug: string): GlobalConfig | undefined;
21
- getGlobals(): GlobalConfig[];
22
- getGlobalSlugs(): string[];
23
- hasGlobal(slug: string): boolean;
24
- removeGlobal(slug: string): boolean;
25
- addPlugin(plugin: PluginConfig): void;
26
- getPlugins(): PluginConfig[];
27
- getZodSchema(slug: string): ZodTypeAny;
28
- getCreateZodSchema(slug: string): ZodTypeAny;
29
- getUpdateZodSchema(slug: string): ZodTypeAny;
30
- getWhereZodSchema(slug: string): ZodTypeAny;
31
- getFieldZodSchema(field: Field): ZodTypeAny;
32
- private clearSchemaCache;
33
- private applyFieldDefaults;
34
- getFields(slug: string): Field[];
35
- getFieldMap(slug: string): Map<string, Field>;
36
- getVisibleFields(slug: string): Field[];
37
- validate(): void;
38
- init(): Promise<void>;
39
- isInitialized(): boolean;
40
- getPaginationDefaults(slug: string): {
41
- defaultLimit: number;
42
- limits: number[];
43
- };
44
- getDefaultSort(slug: string): string;
45
- getDefaultColumns(slug: string): string[];
46
- getAdminTitle(slug: string): string;
47
- getAdminLabel(slug: string): string;
48
- getAdminGroup(slug: string): string | undefined;
49
- getStats(): {
50
- collections: number;
51
- globals: number;
52
- plugins: number;
53
- fields: number;
54
- };
55
- toJSON(): {
56
- collections: CollectionConfig[];
57
- globals: GlobalConfig[];
58
- };
59
- }
60
- declare function getRegistry(): Registry;
61
- declare function resetRegistry(): void;
62
- declare function createRegistry(): Registry;
63
-
64
- export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };