@llmnative/react 0.1.1 → 1.1.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 (185) hide show
  1. package/README.md +397 -364
  2. package/bin/cli.js +117 -98
  3. package/dist/index.css +1 -1
  4. package/dist/index.js +21 -823
  5. package/dist/index.mjs +14984 -9345
  6. package/dist/style.css +1 -0
  7. package/dist/types/src/App.d.ts +75 -14
  8. package/dist/types/src/Config.d.ts +28 -5
  9. package/dist/types/src/Global.d.ts +2 -2
  10. package/dist/types/src/I18n.d.ts +186 -0
  11. package/dist/types/src/Theme.d.ts +153 -81
  12. package/dist/types/src/auth.d.ts +13 -1
  13. package/dist/types/src/components/Component.d.ts +13 -27
  14. package/dist/types/src/components/ErrorBoundary.d.ts +30 -0
  15. package/dist/types/src/components/blocks/Brand.d.ts +9 -4
  16. package/dist/types/src/components/blocks/Breadcrumbs.d.ts +50 -4
  17. package/dist/types/src/components/blocks/Carousel.d.ts +7 -5
  18. package/dist/types/src/components/blocks/Dropdown.d.ts +38 -20
  19. package/dist/types/src/components/blocks/ListCard.d.ts +38 -0
  20. package/dist/types/src/components/blocks/Menu.d.ts +15 -16
  21. package/dist/types/src/components/blocks/Notifications.d.ts +11 -3
  22. package/dist/types/src/components/blocks/ProviderSwitcher.d.ts +65 -0
  23. package/dist/types/src/components/blocks/Search.d.ts +3 -2
  24. package/dist/types/src/components/blocks/SideNav.d.ts +45 -0
  25. package/dist/types/src/components/blocks/ThemeSwitcher.d.ts +28 -0
  26. package/dist/types/src/components/blocks/Toolbar.d.ts +23 -0
  27. package/dist/types/src/components/index.d.ts +28 -7
  28. package/dist/types/src/components/types.d.ts +10 -3
  29. package/dist/types/src/components/ui/Alert.d.ts +20 -4
  30. package/dist/types/src/components/ui/Badge.d.ts +12 -5
  31. package/dist/types/src/components/ui/Buttons.d.ts +16 -12
  32. package/dist/types/src/components/ui/Card.d.ts +11 -7
  33. package/dist/types/src/components/ui/Code.d.ts +5 -1
  34. package/dist/types/src/components/ui/Gallery.d.ts +16 -16
  35. package/dist/types/src/components/ui/GridSystem.d.ts +5 -2
  36. package/dist/types/src/components/ui/Icon.d.ts +6 -1
  37. package/dist/types/src/components/ui/Image.d.ts +7 -1
  38. package/dist/types/src/components/ui/ImageAvatar.d.ts +4 -1
  39. package/dist/types/src/components/ui/Loader.d.ts +3 -1
  40. package/dist/types/src/components/ui/LocaleSwitcher.d.ts +14 -0
  41. package/dist/types/src/components/ui/Modal.d.ts +46 -15
  42. package/dist/types/src/components/ui/Pagination.d.ts +16 -3
  43. package/dist/types/src/components/ui/Percentage.d.ts +14 -5
  44. package/dist/types/src/components/ui/Repeat.d.ts +14 -6
  45. package/dist/types/src/components/ui/Tab.d.ts +29 -2
  46. package/dist/types/src/components/ui/TabDynamic.d.ts +4 -3
  47. package/dist/types/src/components/ui/Table.d.ts +18 -14
  48. package/dist/types/src/components/ui/fields/CodeEditor.d.ts +46 -0
  49. package/dist/types/src/components/ui/fields/ContextMenu.d.ts +87 -0
  50. package/dist/types/src/components/ui/fields/Crop.d.ts +4 -2
  51. package/dist/types/src/components/ui/fields/ImageField.d.ts +31 -0
  52. package/dist/types/src/components/ui/fields/Input.d.ts +43 -14
  53. package/dist/types/src/components/ui/fields/Prompt.d.ts +2 -31
  54. package/dist/types/src/components/ui/fields/RichText.d.ts +89 -0
  55. package/dist/types/src/components/ui/fields/Select.d.ts +13 -10
  56. package/dist/types/src/components/ui/fields/Upload.d.ts +50 -2
  57. package/dist/types/src/components/ui/fields/UploadCSV.d.ts +2 -0
  58. package/dist/types/src/components/ui/useRecordSelection.d.ts +1 -2
  59. package/dist/types/src/components/widgets/Form.d.ts +80 -43
  60. package/dist/types/src/components/widgets/ImageEditor.d.ts +4 -5
  61. package/dist/types/src/components/widgets/MarkdownReader.d.ts +4 -4
  62. package/dist/types/src/components/widgets/Prompt.d.ts +90 -22
  63. package/dist/types/src/components/widgets/TabDynamic.d.ts +4 -3
  64. package/dist/types/src/components/widgets/form-controller.d.ts +42 -0
  65. package/dist/types/src/components/widgets/grid-core/GridCore.d.ts +1 -1
  66. package/dist/types/src/components/widgets/grid-core/GridDB.d.ts +1 -1
  67. package/dist/types/src/components/widgets/grid-core/GridGalleryView.d.ts +1 -1
  68. package/dist/types/src/components/widgets/grid-core/GridTableView.d.ts +1 -1
  69. package/dist/types/src/components/widgets/grid-core/types.d.ts +77 -27
  70. package/dist/types/src/components/widgets/grid-core/useGridActions.d.ts +4 -8
  71. package/dist/types/src/components/widgets/grid-core/useGridColumns.d.ts +2 -2
  72. package/dist/types/src/components/widgets/grid-core/useGridDBRecords.d.ts +1 -2
  73. package/dist/types/src/components/widgets/grid-core/useGridPreparedRecords.d.ts +2 -2
  74. package/dist/types/src/components/widgets/grid-core/useGridSelection.d.ts +4 -5
  75. package/dist/types/src/components/widgets/grid-core/utils.d.ts +11 -3
  76. package/dist/types/src/conf/Prompt.d.ts +1 -1
  77. package/dist/types/src/conf/i18n/ar.d.ts +2 -0
  78. package/dist/types/src/conf/i18n/de.d.ts +2 -0
  79. package/dist/types/src/conf/i18n/en.d.ts +2 -0
  80. package/dist/types/src/conf/i18n/index.d.ts +6 -0
  81. package/dist/types/src/conf/i18n/it.d.ts +2 -0
  82. package/dist/types/src/conf/i18n/ru.d.ts +2 -0
  83. package/dist/types/src/conf/i18n/zh.d.ts +2 -0
  84. package/dist/types/src/constant.d.ts +1 -1
  85. package/dist/types/src/index.d.ts +48 -13
  86. package/dist/types/src/libs/converter.d.ts +4 -4
  87. package/dist/types/src/libs/editorHeight.d.ts +12 -0
  88. package/dist/types/src/libs/fetch.d.ts +4 -4
  89. package/dist/types/src/libs/imageBuilder.d.ts +63 -14
  90. package/dist/types/src/libs/imageVariants.d.ts +35 -0
  91. package/dist/types/src/libs/index.d.ts +1 -4
  92. package/dist/types/src/libs/promptUtils.d.ts +24 -0
  93. package/dist/types/src/libs/sanitizer.d.ts +2 -2
  94. package/dist/types/src/libs/utils.d.ts +9 -10
  95. package/dist/types/src/pages/index.d.ts +0 -2
  96. package/dist/types/src/providers/ProviderConfiguration.d.ts +6 -0
  97. package/dist/types/src/providers/ProviderDescriptor.d.ts +18 -0
  98. package/dist/types/src/providers/ProviderRegistryContext.d.ts +51 -0
  99. package/dist/types/src/providers/ProviderSession.d.ts +68 -0
  100. package/dist/types/src/providers/ai/AIProvider.d.ts +57 -0
  101. package/dist/types/src/providers/ai/AIProviderContext.d.ts +13 -0
  102. package/dist/types/src/providers/ai/anthropic.d.ts +2 -0
  103. package/dist/types/src/providers/ai/deepseek.d.ts +1 -0
  104. package/dist/types/src/providers/ai/gemini.d.ts +2 -0
  105. package/dist/types/src/providers/ai/glm.d.ts +1 -0
  106. package/dist/types/src/providers/ai/index.d.ts +20 -134
  107. package/dist/types/src/providers/ai/mistral.d.ts +1 -0
  108. package/dist/types/src/providers/ai/openai.d.ts +1 -0
  109. package/dist/types/src/providers/ai/openaiCompatible.d.ts +19 -0
  110. package/dist/types/src/providers/ai/opencode.d.ts +2 -0
  111. package/dist/types/src/providers/ai/openrouter.d.ts +1 -0
  112. package/dist/types/src/providers/ai/shared.d.ts +55 -0
  113. package/dist/types/src/providers/api/ApiProvider.d.ts +43 -0
  114. package/dist/types/src/providers/api/direct.d.ts +14 -0
  115. package/dist/types/src/providers/api/firebase.d.ts +14 -0
  116. package/dist/types/src/providers/api/mock.d.ts +7 -0
  117. package/dist/types/src/providers/api/supabase.d.ts +14 -0
  118. package/dist/types/src/providers/auth/AuthProvider.d.ts +10 -2
  119. package/dist/types/src/providers/auth/firebase/FirebaseAuthProvider.d.ts +49 -0
  120. package/dist/types/src/providers/auth/google/GoogleAuth.d.ts +2 -2
  121. package/dist/types/src/providers/auth/supabase/SupabaseAuthProvider.d.ts +48 -0
  122. package/dist/types/src/providers/credentials/CredentialsProvider.d.ts +3 -0
  123. package/dist/types/src/providers/credentials/CredentialsProviderContext.d.ts +12 -0
  124. package/dist/types/src/providers/credentials/google/GoogleServiceAccountProvider.d.ts +8 -0
  125. package/dist/types/src/providers/data/DataProvider.d.ts +27 -1
  126. package/dist/types/src/providers/data/firebase.d.ts +5 -4
  127. package/dist/types/src/providers/data/firestore.d.ts +45 -0
  128. package/dist/types/src/providers/data/mock.d.ts +8 -1
  129. package/dist/types/src/providers/data/supabase.d.ts +36 -10
  130. package/dist/types/src/providers/email/definitions.d.ts +3 -0
  131. package/dist/types/src/providers/firebase-init.d.ts +24 -7
  132. package/dist/types/src/providers/icon/PhosphorIconProvider.d.ts +1 -1
  133. package/dist/types/src/providers/manifest.d.ts +20 -14
  134. package/dist/types/src/providers/proxy/index.d.ts +7 -0
  135. package/dist/types/src/providers/proxy/vite.d.ts +3 -0
  136. package/dist/types/src/providers/publish/PublishProvider.d.ts +29 -0
  137. package/dist/types/src/providers/publish/definitions.d.ts +3 -0
  138. package/dist/types/src/providers/scrape/index.d.ts +2 -1
  139. package/dist/types/src/providers/seo/google/keyword.d.ts +6 -1
  140. package/dist/types/src/providers/storage/StorageProvider.d.ts +155 -4
  141. package/dist/types/src/providers/storage/dropbox.d.ts +3 -3
  142. package/dist/types/src/providers/storage/firebase.d.ts +44 -7
  143. package/dist/types/src/providers/storage/supabase.d.ts +47 -7
  144. package/dist/types/src/providers/supabase-init.d.ts +35 -0
  145. package/dist/types/src/types/FormFields.d.ts +4 -2
  146. package/dist/types/src/types/FormSchema.d.ts +29 -0
  147. package/dist/types/themes/tokyo-night-light.d.ts +3 -0
  148. package/dist/types/themes/tokyo-night.d.ts +3 -0
  149. package/dist/types/themes/vscode-dark-plus.d.ts +3 -0
  150. package/dist/types/themes/vscode-light-plus.d.ts +3 -0
  151. package/dist/vite.js +1 -0
  152. package/dist/vite.mjs +54 -0
  153. package/package.json +46 -8
  154. package/scripts/cli/proxy-templates/cloudflare.ts +34 -0
  155. package/scripts/cli/proxy-templates/express.ts +77 -0
  156. package/scripts/cli/proxy-templates/nextjs-app.ts +42 -0
  157. package/scripts/cli/proxy-templates/nextjs-pages.ts +41 -0
  158. package/scripts/cli/proxy-templates/scaffold.json +33 -0
  159. package/scripts/cli/setup-devtools.js +155 -85
  160. package/scripts/cli/setup-project.js +618 -484
  161. package/themes/cyber.ts +469 -405
  162. package/themes/default.ts +469 -405
  163. package/themes/flat.ts +469 -405
  164. package/themes/tokyo-night-light.ts +38 -0
  165. package/themes/tokyo-night.ts +38 -0
  166. package/themes/vscode-dark-plus.ts +29 -0
  167. package/themes/vscode-light-plus.ts +29 -0
  168. package/dist/index.js.map +0 -1
  169. package/dist/index.mjs.map +0 -1
  170. package/dist/types/src/components/FormEnhancer.d.ts +0 -26
  171. package/dist/types/src/components/Template.d.ts +0 -18
  172. package/dist/types/src/components/ui/fields/AssistantAI.d.ts +0 -23
  173. package/dist/types/src/components/ui/fields/Command.d.ts +0 -15
  174. package/dist/types/src/components/ui/fields/ImageUrl.d.ts +0 -7
  175. package/dist/types/src/libs/cache.d.ts +0 -9
  176. package/dist/types/src/libs/database.d.ts +0 -3
  177. package/dist/types/src/libs/log.d.ts +0 -2
  178. package/dist/types/src/libs/seo.d.ts +0 -8
  179. package/dist/types/src/libs/storage.d.ts +0 -2
  180. package/dist/types/src/pages/Blog.d.ts +0 -3
  181. package/dist/types/src/pages/BlogPost.d.ts +0 -16
  182. package/dist/types/src/pages/Helper.d.ts +0 -8
  183. package/dist/types/src/providers/auth/google/apis/auth.d.ts +0 -4
  184. package/dist/types/src/types/Block.d.ts +0 -4
  185. package/dist/types/src/types/Section.d.ts +0 -4
@@ -0,0 +1,186 @@
1
+ import React from 'react';
2
+ export interface I18nDict {
3
+ common: {
4
+ save: string;
5
+ cancel: string;
6
+ delete: string;
7
+ close: string;
8
+ back: string;
9
+ search: string;
10
+ loading: string;
11
+ noDataFound: string;
12
+ pageNavigation: string;
13
+ previous: string;
14
+ next: string;
15
+ notFoundMessage: string;
16
+ goHome: string;
17
+ };
18
+ auth: {
19
+ signIn: string;
20
+ signOut: string;
21
+ connect: string;
22
+ connected: string;
23
+ authenticated: string;
24
+ notConfigured: string;
25
+ notImplemented: string;
26
+ };
27
+ form: {
28
+ headerAdd: string;
29
+ headerEdit: string;
30
+ buttonSave: string;
31
+ buttonDelete: string;
32
+ buttonBack: string;
33
+ requiredField: string;
34
+ requiredFieldGeneric: string;
35
+ saveSuccess: string;
36
+ deleteSuccess: string;
37
+ noticeRequiredFields: string;
38
+ noChangesToSave?: string;
39
+ draftRestoreTitle?: string;
40
+ draftRestoreMessage?: string;
41
+ draftRestoreAction?: string;
42
+ draftDiscardAction?: string;
43
+ draftRestoredTitle?: string;
44
+ draftRestoredMessage?: string;
45
+ };
46
+ grid: {
47
+ buttonAdd: string;
48
+ deleteConfirm: string;
49
+ emptyState: string;
50
+ };
51
+ select: {
52
+ placeholder: string;
53
+ loading: string;
54
+ };
55
+ modal: {
56
+ save: string;
57
+ delete: string;
58
+ cancel: string;
59
+ close: string;
60
+ };
61
+ upload: {
62
+ clickOrDrag: string;
63
+ dropToUpload: string;
64
+ uploadMore: string;
65
+ editFileName: string;
66
+ editorImage: string;
67
+ loaded: string;
68
+ removeFile: string;
69
+ uploadAnother: string;
70
+ dropToParse: string;
71
+ };
72
+ notifications: {
73
+ title: string;
74
+ seeAll: string;
75
+ };
76
+ code: {
77
+ copyCode: string;
78
+ copy: string;
79
+ copied: string;
80
+ codeLanguageDefault: string;
81
+ };
82
+ table: {
83
+ noDataFound: string;
84
+ selectAllRows: string;
85
+ sortBy: string;
86
+ sortByCurrent: string;
87
+ selectRow: string;
88
+ reorderRow: string;
89
+ };
90
+ gallery: {
91
+ selectItem: string;
92
+ };
93
+ crop: {
94
+ enableCrop: string;
95
+ variants: string;
96
+ outputFile: string;
97
+ active: string;
98
+ removeVariant: string;
99
+ fileName: string;
100
+ };
101
+ imageEditor: {
102
+ title: string;
103
+ save: string;
104
+ undo: string;
105
+ redo: string;
106
+ zoomOut: string;
107
+ zoomIn: string;
108
+ crop: string;
109
+ flipHorizontal: string;
110
+ flipVertical: string;
111
+ rotate: string;
112
+ freeDrawing: string;
113
+ arrow: string;
114
+ text: string;
115
+ rectangle: string;
116
+ circle: string;
117
+ triangle: string;
118
+ };
119
+ prompt: {
120
+ noProviders: string;
121
+ aiNotConfiguredEdit: string;
122
+ aiNotConfiguredRun: string;
123
+ aiNotConfiguredShort: string;
124
+ toggleOnTitle: string;
125
+ toggleOffTitle: string;
126
+ closeEditor: string;
127
+ editSettings: string;
128
+ attachFiles: string;
129
+ attachmentsNotSupported: string;
130
+ run: string;
131
+ runFailed: string;
132
+ noMatchingCommands: string;
133
+ tokenUsage: string;
134
+ tokenInput: string;
135
+ tokenOutput: string;
136
+ tokenContext: string;
137
+ tokenCost: string;
138
+ tokenTime: string;
139
+ tokenUsageEmpty: string;
140
+ hidePreview: string;
141
+ showPreview: string;
142
+ noProvider: string;
143
+ noResponse: string;
144
+ promptLabel: string;
145
+ defaultOption: string;
146
+ };
147
+ layout: {
148
+ maxElements: string;
149
+ noSpace: string;
150
+ dragToMove: string;
151
+ remove: string;
152
+ dragToResize: string;
153
+ dragHere: string;
154
+ };
155
+ }
156
+ type DeepPartial<T> = {
157
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
158
+ };
159
+ export type I18nLocale = DeepPartial<I18nDict>;
160
+ type DotNestedKeyOf<T> = T extends object ? {
161
+ [K in Extract<keyof T, string>]: T[K] extends object ? `${K}` | `${K}.${DotNestedKeyOf<T[K]>}` : `${K}`;
162
+ }[Extract<keyof T, string>] : never;
163
+ type PathValue<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? PathValue<T[K], Rest> : never : P extends keyof T ? T[P] : never;
164
+ export type I18nTranslations = Partial<Record<string, I18nLocale>>;
165
+ export interface I18nConfig {
166
+ locale?: string;
167
+ translations?: I18nTranslations;
168
+ }
169
+ export interface I18nController {
170
+ dict: I18nDict;
171
+ locale: string;
172
+ availableLocales: string[];
173
+ setLocale: (locale: string) => void;
174
+ registerTranslations: (locale: string, translations: I18nLocale) => void;
175
+ }
176
+ export declare function defineLocaleMessages<T extends I18nLocale>(locale: T): T;
177
+ export declare function createTranslations<T extends I18nTranslations>(translations: T): T;
178
+ export declare function interpolate(template: string, vars: Record<string, string | number>): string;
179
+ interface I18nProviderProps {
180
+ children: React.ReactNode;
181
+ config?: I18nConfig;
182
+ }
183
+ export declare const I18nProvider: ({ children, config }: I18nProviderProps) => React.JSX.Element;
184
+ export declare function useI18n(): I18nController;
185
+ export declare function useI18n<P extends DotNestedKeyOf<I18nDict>>(namespace: P): PathValue<I18nDict, P>;
186
+ export {};
@@ -39,56 +39,124 @@ export interface ColorScale {
39
39
  ring?: string;
40
40
  }
41
41
  export interface MenuTheme {
42
- wrapClass?: string;
42
+ wrapperClassName?: string;
43
43
  className?: string;
44
- headerClass?: string;
45
- itemClass?: string;
46
- linkClass?: string;
47
- iconClass?: string;
48
- textClass?: string;
49
- badgeClass?: string;
50
- arrowClass?: string;
51
- submenuClass?: string;
44
+ headerClassName?: string;
45
+ itemClassName?: string;
46
+ linkClassName?: string;
47
+ iconClassName?: string;
48
+ textClassName?: string;
49
+ badgeClassName?: string;
50
+ arrowClassName?: string;
51
+ submenuClassName?: string;
52
+ }
53
+ export interface SideNavTheme {
54
+ wrapperClassName?: string;
55
+ shellClassName?: string;
56
+ overlayClassName?: string;
57
+ headerClassName?: string;
58
+ navClassName?: string;
59
+ footerClassName?: string;
60
+ groupLabelClassName?: string;
61
+ groupDividerClassName?: string;
62
+ itemClassName?: string;
63
+ itemActiveClassName?: string;
64
+ itemChildActiveClassName?: string;
65
+ itemInactiveClassName?: string;
66
+ itemIconClassName?: string;
67
+ itemTextClassName?: string;
68
+ itemBadgeClassName?: string;
69
+ itemCollapsedBadgeClassName?: string;
70
+ itemToggleClassName?: string;
71
+ subItemClassName?: string;
72
+ subItemActiveClassName?: string;
73
+ subItemInactiveClassName?: string;
74
+ collapseButtonClassName?: string;
75
+ }
76
+ export interface ToolbarTheme {
77
+ wrapperClassName?: string;
78
+ stickyClassName?: string;
79
+ restingClassName?: string;
80
+ scrolledClassName?: string;
81
+ innerClassName?: string;
82
+ leadingClassName?: string;
83
+ centerClassName?: string;
84
+ trailingClassName?: string;
85
+ }
86
+ export interface ListCardTheme {
87
+ wrapperClassName?: string;
88
+ className?: string;
89
+ activeClassName?: string;
90
+ inactiveClassName?: string;
91
+ disabledClassName?: string;
92
+ dashedClassName?: string;
93
+ compactClassName?: string;
94
+ leadingClassName?: string;
95
+ bodyClassName?: string;
96
+ headerClassName?: string;
97
+ titleClassName?: string;
98
+ descriptionClassName?: string;
99
+ metaClassName?: string;
100
+ badgeClassName?: string;
101
+ trailingClassName?: string;
102
+ footerClassName?: string;
103
+ motion?: {
104
+ press?: MotionReference;
105
+ };
106
+ }
107
+ export interface ProviderSwitcherTheme {
108
+ wrapperClassName?: string;
109
+ className?: string;
110
+ triggerClassName?: string;
111
+ disabledClassName?: string;
112
+ iconWrapperClassName?: string;
113
+ labelClassName?: string;
114
+ captionClassName?: string;
115
+ chevronClassName?: string;
116
+ itemClassName?: string;
117
+ itemActiveClassName?: string;
118
+ itemInactiveClassName?: string;
119
+ itemMetaClassName?: string;
120
+ checkClassName?: string;
52
121
  }
53
122
  export interface CardTheme {
54
- wrapClass?: string;
123
+ wrapperClassName?: string;
55
124
  className?: string;
56
- headerClass?: string;
57
- bodyClass?: string;
58
- footerClass?: string;
59
- showLoader?: boolean;
60
- showArrow?: boolean;
125
+ headerClassName?: string;
126
+ bodyClassName?: string;
127
+ footerClassName?: string;
128
+ loading?: boolean;
61
129
  }
62
130
  export interface TableTheme {
63
- wrapClass?: string;
131
+ wrapperClassName?: string;
64
132
  className?: string;
65
- headerClass?: string;
66
- bodyClass?: string;
67
- footerClass?: string;
68
- scrollClass?: string;
69
- selectedClass?: string;
133
+ headerClassName?: string;
134
+ bodyClassName?: string;
135
+ footerClassName?: string;
136
+ scrollClassName?: string;
137
+ selectedClassName?: string;
70
138
  }
71
139
  export interface GalleryTheme {
72
- wrapClass?: string;
140
+ wrapperClassName?: string;
73
141
  className?: string;
74
- scrollClass?: string;
75
- headerClass?: string;
76
- bodyClass?: string;
77
- footerClass?: string;
78
- selectedClass?: string;
79
- gutterSize?: 0 | 1 | 2 | 3 | 4 | 5;
142
+ scrollClassName?: string;
143
+ headerClassName?: string;
144
+ bodyClassName?: string;
145
+ footerClassName?: string;
146
+ selectedClassName?: string;
147
+ gap?: 0 | 1 | 2 | 3 | 4 | 5;
80
148
  rowCols?: 1 | 2 | 3 | 4 | 6;
81
149
  }
82
150
  export interface ModalTheme {
83
151
  size?: "sm" | "md" | "lg" | "xl" | "fullscreen";
84
152
  position?: "center" | "top" | "left" | "right" | "bottom";
85
- wrapClass?: string;
153
+ wrapperClassName?: string;
86
154
  className?: string;
87
- headerClass?: string;
88
- titleClass?: string;
89
- subTitleClass?: string;
90
- bodyClass?: string;
91
- footerClass?: string;
155
+ headerClassName?: string;
156
+ titleClassName?: string;
157
+ subtitleClassName?: string;
158
+ bodyClassName?: string;
159
+ footerClassName?: string;
92
160
  iconExpand?: string;
93
161
  iconCollapse?: string;
94
162
  motion?: {
@@ -113,18 +181,13 @@ export interface ThemeConfig {
113
181
  Modal?: ModalTheme & {
114
182
  mode?: 'form' | 'empty';
115
183
  };
116
- i18n?: {
117
- headerAdd?: string;
118
- headerEdit?: string;
119
- buttonAdd?: string;
120
- };
121
184
  };
122
185
  Table?: TableTheme;
123
186
  Gallery?: GalleryTheme;
124
187
  Pagination?: {
125
- wrapClass?: string;
188
+ wrapperClassName?: string;
126
189
  className?: string;
127
- stickyClass?: string;
190
+ stickyClassName?: string;
128
191
  scrollToTop?: boolean;
129
192
  scrollBehavior?: ScrollBehavior;
130
193
  maxItems?: number;
@@ -135,12 +198,16 @@ export interface ThemeConfig {
135
198
  showIndicators?: boolean;
136
199
  showControls?: boolean;
137
200
  showCaption?: boolean;
138
- layoutDark?: boolean;
139
- autoPlay?: any;
201
+ dark?: boolean;
202
+ autoPlay?: boolean | {
203
+ interval: number;
204
+ pause: "hover" | "false" | "true";
205
+ wrap: boolean;
206
+ };
140
207
  };
141
208
  Card?: CardTheme;
142
209
  Loader?: {
143
- wrapClass?: string;
210
+ wrapperClassName?: string;
144
211
  className?: string;
145
212
  icon?: string;
146
213
  title?: string;
@@ -148,14 +215,14 @@ export interface ThemeConfig {
148
215
  };
149
216
  ActionButton?: {
150
217
  className?: string;
151
- badgeClass?: string;
218
+ badgeClassName?: string;
152
219
  motion?: {
153
220
  press?: MotionReference;
154
221
  };
155
222
  };
156
223
  LoadingButton?: {
157
224
  className?: string;
158
- badgeClass?: string;
225
+ badgeClassName?: string;
159
226
  motion?: {
160
227
  press?: MotionReference;
161
228
  };
@@ -171,16 +238,16 @@ export interface ThemeConfig {
171
238
  };
172
239
  Modal?: ModalTheme;
173
240
  Dropdown?: {
174
- wrapClass?: string;
241
+ wrapperClassName?: string;
175
242
  className?: string;
176
- buttonClass?: string;
177
- badgeClass?: string;
178
- menuClass?: string;
243
+ triggerClassName?: string;
244
+ badgeClassName?: string;
245
+ menuClassName?: string;
179
246
  menuHeaderClass?: string;
180
247
  menuItemClass?: string;
181
248
  menuDividerClass?: string;
182
- headerClass?: string;
183
- footerClass?: string;
249
+ headerClassName?: string;
250
+ footerClassName?: string;
184
251
  Menu?: MenuTheme;
185
252
  motion?: {
186
253
  open?: MotionReference;
@@ -189,54 +256,49 @@ export interface ThemeConfig {
189
256
  };
190
257
  };
191
258
  Notifications?: {
192
- wrapClass?: string;
259
+ wrapperClassName?: string;
193
260
  Dropdown?: {
194
261
  className?: string;
195
- buttonClass?: string;
196
- menuClass?: string;
262
+ triggerClassName?: string;
263
+ menuClassName?: string;
197
264
  };
198
265
  };
199
266
  Select?: {
200
- wrapClass?: string;
267
+ wrapperClassName?: string;
201
268
  className?: string;
202
269
  };
203
270
  Autocomplete?: {
204
- wrapClass?: string;
271
+ wrapperClassName?: string;
205
272
  className?: string;
206
273
  };
207
274
  Form?: {
208
- wrapClass?: string;
275
+ wrapperClassName?: string;
209
276
  buttonSaveClass?: string;
210
277
  buttonDeleteClass?: string;
211
278
  buttonBackClass?: string;
212
279
  Card?: {
213
- headerClass?: string;
214
- bodyClass?: string;
215
- footerClass?: string;
216
- };
217
- i18n?: {
218
- headerAdd?: string;
219
- headerEdit?: string;
220
- headerNewRecord?: string;
221
- buttonSave?: string;
222
- buttonDelete?: string;
223
- buttonBack?: string;
224
- noticeRequiredFields?: string;
280
+ headerClassName?: string;
281
+ bodyClassName?: string;
282
+ footerClassName?: string;
225
283
  };
226
284
  };
227
285
  Menu?: MenuTheme;
286
+ SideNav?: SideNavTheme;
287
+ Toolbar?: ToolbarTheme;
288
+ ListCard?: ListCardTheme;
289
+ ProviderSwitcher?: ProviderSwitcherTheme;
228
290
  Brand?: {
229
- wrapClass?: string;
291
+ wrapperClassName?: string;
230
292
  className?: string;
231
- logoClass?: string;
232
- labelClass?: string;
293
+ logoClassName?: string;
294
+ labelClassName?: string;
233
295
  };
234
296
  SignIn?: {
235
297
  className?: string;
236
298
  avatarClass?: string;
237
299
  };
238
300
  Image?: {
239
- wrapClass?: string;
301
+ wrapperClassName?: string;
240
302
  className?: string;
241
303
  motion?: {
242
304
  enter?: MotionReference;
@@ -244,7 +306,7 @@ export interface ThemeConfig {
244
306
  };
245
307
  };
246
308
  ImageAvatar?: {
247
- wrapClass?: string;
309
+ wrapperClassName?: string;
248
310
  className?: string;
249
311
  motion?: {
250
312
  enter?: MotionReference;
@@ -252,27 +314,37 @@ export interface ThemeConfig {
252
314
  };
253
315
  };
254
316
  Percentage?: {
255
- wrapClass?: string;
317
+ wrapperClassName?: string;
256
318
  className?: string;
257
319
  };
258
320
  Tab?: {
259
- wrapClass?: string;
321
+ wrapperClassName?: string;
260
322
  className?: string;
323
+ menuClassName?: string;
324
+ itemClassName?: string;
325
+ contentClassName?: string;
326
+ triggerClassName?: string;
327
+ activeTriggerClassName?: string;
328
+ inactiveTriggerClassName?: string;
261
329
  motion?: {
262
330
  enter?: MotionReference;
263
331
  };
264
332
  };
265
333
  Code?: {
266
- wrapClass?: string;
334
+ wrapperClassName?: string;
335
+ className?: string;
336
+ };
337
+ CodeEditor?: {
338
+ wrapperClassName?: string;
267
339
  className?: string;
268
340
  };
269
341
  Prompt?: {
270
- wrapClass?: string;
342
+ wrapperClassName?: string;
271
343
  className?: string;
272
344
  };
273
345
  }
274
346
  type DeepRequired<T> = {
275
- [K in keyof T]-?: NonNullable<T[K]> extends (...args: any[]) => any ? NonNullable<T[K]> : NonNullable<T[K]> extends object ? DeepRequired<NonNullable<T[K]>> : NonNullable<T[K]>;
347
+ [K in keyof T]-?: NonNullable<T[K]> extends (...args: unknown[]) => unknown ? NonNullable<T[K]> : NonNullable<T[K]> extends object ? DeepRequired<NonNullable<T[K]>> : NonNullable<T[K]>;
276
348
  };
277
349
  export type Theme = DeepRequired<ThemeConfig> & {};
278
350
  export interface ThemePresetConfig {
@@ -295,7 +367,7 @@ export interface ThemeDefinition {
295
367
  components: Theme;
296
368
  }
297
369
  /** IDs of built-in themes. Extend by adding entries to BUILT_IN_THEMES. */
298
- export declare const BUILT_IN_THEME_IDS: readonly ["default", "flat", "cyber"];
370
+ export declare const BUILT_IN_THEME_IDS: readonly ["default", "flat", "cyber", "vscode-dark-plus", "vscode-light-plus", "tokyo-night", "tokyo-night-light"];
299
371
  export type BuiltInThemeId = (typeof BUILT_IN_THEME_IDS)[number];
300
372
  export type AppThemeProviderConfig = BuiltInThemeId | ThemeDefinition | {
301
373
  defaultMode?: ThemeMode;
@@ -1,6 +1,18 @@
1
1
  import React from 'react';
2
2
  import { type IButton } from './components/ui/Buttons';
3
3
  import type { AuthIntent } from './providers/auth/AuthProvider';
4
+ interface IAuthResponse {
5
+ iat: number;
6
+ access_token: string;
7
+ expires_in: number;
8
+ token_type: string;
9
+ scope: string;
10
+ refresh_token: string;
11
+ account_id: string;
12
+ uid: string;
13
+ server?: string;
14
+ client_id?: string;
15
+ }
4
16
  export declare const AUTH_REDIRECT_URI = "/__/authorize";
5
17
  export declare function redirectToAuthPage({ authServer, clientID, scopes, refreshParamName, }: {
6
18
  authServer: string;
@@ -10,7 +22,7 @@ export declare function redirectToAuthPage({ authServer, clientID, scopes, refre
10
22
  }): void;
11
23
  declare const Authorize: () => React.JSX.Element;
12
24
  export declare const useAccessToken: (clientID: string, renew?: boolean) => boolean;
13
- export declare const getAuthSession: (clientID: string) => any;
25
+ export declare const getAuthSession: (clientID: string) => IAuthResponse | undefined;
14
26
  export declare const clearAccessToken: (clientID: string) => void;
15
27
  export declare const getAccessToken: (clientID: string) => Promise<string | null>;
16
28
  export type AuthButtonAspect = 'button' | 'avatar';
@@ -1,23 +1,20 @@
1
1
  import React from "react";
2
- type Primitive = string | number | boolean | undefined;
3
- interface FieldRenderProps {
4
- name: string;
5
- defaultValue?: any;
2
+ export interface FieldRenderProps {
3
+ name?: string;
6
4
  label?: string;
7
- onChange?: (value: any) => void;
5
+ onChange?: (value: unknown) => void;
6
+ [key: string]: unknown;
8
7
  }
9
- interface FieldAdapter<TProps = any> {
10
- getDefaults: (name: string) => Record<string, any>;
8
+ type Defaults = Record<string, unknown>;
9
+ export interface FieldAdapter<TProps = Record<string, unknown>> {
10
+ getDefaults: (name: string) => Defaults;
11
11
  render: (props?: FieldRenderProps & TProps) => React.ReactNode;
12
12
  __props: TProps;
13
13
  }
14
- export type FieldFactory<TProps = {}> = (props?: TProps) => FieldAdapter;
14
+ export type FieldFactory<TProps = Record<string, unknown>> = (props?: TProps) => FieldAdapter;
15
15
  interface ComponentProps {
16
- [key: string]: any;
16
+ [key: string]: unknown;
17
17
  }
18
- type Defaults = {
19
- [key: string]: Primitive | Primitive[];
20
- };
21
18
  export type ModelProps = {
22
19
  [key: string]: FieldAdapter | React.ReactNode | ModelProps;
23
20
  };
@@ -27,8 +24,9 @@ export type FormTree = {
27
24
  export declare const Component: {
28
25
  layout: import("../types/Layout").ComponentLayoutMap;
29
26
  input: import("../types/FormFields").ComponentFormFieldsMap;
30
- block: import("../types/Block").ComponentBlockMap;
31
- section: import("../types/Section").ComponentSectionMap;
27
+ schema: import(".").ComponentFormSchemaMap;
28
+ block: {};
29
+ section: {};
32
30
  };
33
31
  export declare abstract class ComponentBlock {
34
32
  abstract model: ModelProps;
@@ -36,20 +34,8 @@ export declare abstract class ComponentBlock {
36
34
  abstract form(props?: ComponentProps): React.ReactNode;
37
35
  protected verifyRequiredMethods(): void;
38
36
  static default(this: new () => ComponentBlock, options?: {
39
- dataStoragePath?: string;
37
+ path?: string;
40
38
  }): React.FC;
41
39
  }
42
40
  export declare function buildFormFields(model: ModelProps): [FormTree, Defaults];
43
- export declare function ComponentBlockSave(blockClass: new () => ComponentBlock, dbStoragePath: string): Promise<void>;
44
- export declare class ComponentTemplate {
45
- private template?;
46
- constructor(path: string);
47
- loadTemplate(path: string): Promise<void>;
48
- render(dataPath: string): Promise<{
49
- html: () => React.ReactNode;
50
- form: () => React.ReactNode;
51
- }>;
52
- private renderTemplate;
53
- private parseTemplate;
54
- }
55
41
  export default Component;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ export interface ErrorBoundaryProps {
3
+ children: React.ReactNode;
4
+ /** Custom fallback. Function receives (error, reset). */
5
+ fallback?: React.ReactNode | ((error: Error, reset: () => void) => React.ReactNode);
6
+ /** POST endpoint for error reports. If set, a "Send report" button appears. */
7
+ reportUrl?: string;
8
+ /** Show full debug panel (stack trace, component tree, browser context). Auto-enabled in DEV builds. */
9
+ debug?: boolean;
10
+ /** Render as a full-page error screen (min-h-screen, centered). Use at the app root level. */
11
+ fullPage?: boolean;
12
+ }
13
+ interface State {
14
+ error: Error | null;
15
+ errorInfo: React.ErrorInfo | null;
16
+ detailsOpen: boolean;
17
+ debugOpen: boolean;
18
+ copied: boolean;
19
+ reportState: 'idle' | 'sending' | 'sent' | 'failed';
20
+ }
21
+ declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, State> {
22
+ constructor(props: ErrorBoundaryProps);
23
+ static getDerivedStateFromError(error: Error): Partial<State>;
24
+ componentDidCatch(error: Error, info: React.ErrorInfo): void;
25
+ reset: () => void;
26
+ copy: () => void;
27
+ sendReport: () => void;
28
+ render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
29
+ }
30
+ export default ErrorBoundary;