@beeblock/svelar 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.
- package/LICENSE +21 -0
- package/README.md +110 -0
- package/dist/actions/index.d.ts +101 -0
- package/dist/actions/index.js +1 -0
- package/dist/api-keys/index.d.ts +58 -0
- package/dist/api-keys/index.js +1 -0
- package/dist/audit/index.d.ts +52 -0
- package/dist/audit/index.js +1 -0
- package/dist/auth/Auth.d.ts +283 -0
- package/dist/auth/Gate.d.ts +166 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.js +80 -0
- package/dist/broadcasting/client.d.ts +195 -0
- package/dist/broadcasting/client.js +1 -0
- package/dist/broadcasting/index.d.ts +318 -0
- package/dist/broadcasting/index.js +20 -0
- package/dist/cache/index.d.ts +77 -0
- package/dist/cache/index.js +1 -0
- package/dist/cli/Cli.d.ts +23 -0
- package/dist/cli/Command.d.ts +36 -0
- package/dist/cli/bin.d.ts +8 -0
- package/dist/cli/bin.js +5856 -0
- package/dist/cli/commands/KeyGenerateCommand.d.ts +16 -0
- package/dist/cli/commands/MakeActionCommand.d.ts +15 -0
- package/dist/cli/commands/MakeBroadcastingCommand.d.ts +29 -0
- package/dist/cli/commands/MakeChannelCommand.d.ts +18 -0
- package/dist/cli/commands/MakeCommandCommand.d.ts +16 -0
- package/dist/cli/commands/MakeConfigCommand.d.ts +13 -0
- package/dist/cli/commands/MakeControllerCommand.d.ts +28 -0
- package/dist/cli/commands/MakeDashboardCommand.d.ts +34 -0
- package/dist/cli/commands/MakeDockerCommand.d.ts +32 -0
- package/dist/cli/commands/MakeEventCommand.d.ts +11 -0
- package/dist/cli/commands/MakeJobCommand.d.ts +11 -0
- package/dist/cli/commands/MakeListenerCommand.d.ts +16 -0
- package/dist/cli/commands/MakeMiddlewareCommand.d.ts +11 -0
- package/dist/cli/commands/MakeMigrationCommand.d.ts +17 -0
- package/dist/cli/commands/MakeModelCommand.d.ts +25 -0
- package/dist/cli/commands/MakeObserverCommand.d.ts +23 -0
- package/dist/cli/commands/MakePluginCommand.d.ts +11 -0
- package/dist/cli/commands/MakeProviderCommand.d.ts +11 -0
- package/dist/cli/commands/MakeRepositoryCommand.d.ts +22 -0
- package/dist/cli/commands/MakeRequestCommand.d.ts +15 -0
- package/dist/cli/commands/MakeResourceCommand.d.ts +30 -0
- package/dist/cli/commands/MakeRouteCommand.d.ts +42 -0
- package/dist/cli/commands/MakeSchemaCommand.d.ts +20 -0
- package/dist/cli/commands/MakeSeederCommand.d.ts +11 -0
- package/dist/cli/commands/MakeServiceCommand.d.ts +28 -0
- package/dist/cli/commands/MakeTaskCommand.d.ts +12 -0
- package/dist/cli/commands/MigrateCommand.d.ts +26 -0
- package/dist/cli/commands/NewCommand.d.ts +21 -0
- package/dist/cli/commands/NewCommandTemplates.d.ts +123 -0
- package/dist/cli/commands/PluginInstallCommand.d.ts +16 -0
- package/dist/cli/commands/PluginListCommand.d.ts +11 -0
- package/dist/cli/commands/PluginPublishCommand.d.ts +22 -0
- package/dist/cli/commands/QueueFailedCommand.d.ts +9 -0
- package/dist/cli/commands/QueueFlushCommand.d.ts +9 -0
- package/dist/cli/commands/QueueRetryCommand.d.ts +16 -0
- package/dist/cli/commands/QueueWorkCommand.d.ts +25 -0
- package/dist/cli/commands/RoutesListCommand.d.ts +30 -0
- package/dist/cli/commands/ScheduleRunCommand.d.ts +15 -0
- package/dist/cli/commands/SeedCommand.d.ts +14 -0
- package/dist/cli/commands/TinkerCommand.d.ts +10 -0
- package/dist/cli/index.d.ts +36 -0
- package/dist/cli/index.js +1973 -0
- package/dist/cli/ts-resolve-hook.mjs +74 -0
- package/dist/cli/ts-resolver.mjs +8 -0
- package/dist/config/Config.d.ts +65 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -0
- package/dist/container/Application.d.ts +33 -0
- package/dist/container/Container.d.ts +70 -0
- package/dist/container/ServiceProvider.d.ts +21 -0
- package/dist/container/index.d.ts +3 -0
- package/dist/container/index.js +1 -0
- package/dist/dashboard/index.d.ts +123 -0
- package/dist/dashboard/index.js +5 -0
- package/dist/database/Connection.d.ts +80 -0
- package/dist/database/Migration.d.ts +76 -0
- package/dist/database/SchemaBuilder.d.ts +91 -0
- package/dist/database/Seeder.d.ts +9 -0
- package/dist/database/index.d.ts +4 -0
- package/dist/database/index.js +4 -0
- package/dist/email-templates/index.d.ts +51 -0
- package/dist/email-templates/index.js +57 -0
- package/dist/errors/Handler.d.ts +100 -0
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.js +5 -0
- package/dist/events/EventServiceProvider.d.ts +82 -0
- package/dist/events/Listener.d.ts +28 -0
- package/dist/events/index.d.ts +80 -0
- package/dist/events/index.js +1 -0
- package/dist/excel/index.d.ts +154 -0
- package/dist/excel/index.js +1 -0
- package/dist/feature-flags/index.d.ts +158 -0
- package/dist/feature-flags/index.js +59 -0
- package/dist/forms/index.d.ts +81 -0
- package/dist/forms/index.js +1 -0
- package/dist/hashing/Hash.d.ts +51 -0
- package/dist/hashing/index.d.ts +1 -0
- package/dist/hashing/index.js +1 -0
- package/dist/hooks/index.d.ts +135 -0
- package/dist/hooks/index.js +5 -0
- package/dist/http/index.d.ts +201 -0
- package/dist/http/index.js +2 -0
- package/dist/i18n/index.d.ts +81 -0
- package/dist/i18n/index.js +1 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +127 -0
- package/dist/logging/LogViewer.d.ts +95 -0
- package/dist/logging/LogViewer.js +1 -0
- package/dist/logging/index.d.ts +83 -0
- package/dist/logging/index.js +3 -0
- package/dist/mail/index.d.ts +149 -0
- package/dist/mail/index.js +1 -0
- package/dist/middleware/Middleware.d.ts +208 -0
- package/dist/middleware/index.d.ts +1 -0
- package/dist/middleware/index.js +1 -0
- package/dist/notifications/index.d.ts +85 -0
- package/dist/notifications/index.js +2 -0
- package/dist/orm/Model.d.ts +123 -0
- package/dist/orm/Observer.d.ts +34 -0
- package/dist/orm/QueryBuilder.d.ts +119 -0
- package/dist/orm/Relationship.d.ts +58 -0
- package/dist/orm/index.d.ts +4 -0
- package/dist/orm/index.js +1 -0
- package/dist/pagination/index.d.ts +8 -0
- package/dist/pagination/index.js +0 -0
- package/dist/pdf/GeneratePdfJob.d.ts +99 -0
- package/dist/pdf/GeneratePdfJob.js +41 -0
- package/dist/pdf/index.d.ts +328 -0
- package/dist/pdf/index.js +41 -0
- package/dist/permissions/index.d.ts +161 -0
- package/dist/permissions/index.js +60 -0
- package/dist/plugins/BootstrapPlugins.d.ts +11 -0
- package/dist/plugins/PluginInstaller.d.ts +30 -0
- package/dist/plugins/PluginInstaller.js +1 -0
- package/dist/plugins/PluginPublisher.d.ts +32 -0
- package/dist/plugins/PluginPublisher.js +1 -0
- package/dist/plugins/PluginRegistry.d.ts +55 -0
- package/dist/plugins/PluginRegistry.js +1 -0
- package/dist/plugins/index.d.ts +206 -0
- package/dist/plugins/index.js +1 -0
- package/dist/queue/JobMonitor.d.ts +109 -0
- package/dist/queue/JobMonitor.js +5 -0
- package/dist/queue/index.d.ts +279 -0
- package/dist/queue/index.js +5 -0
- package/dist/repositories/index.d.ts +147 -0
- package/dist/repositories/index.js +1 -0
- package/dist/routing/Controller.d.ts +115 -0
- package/dist/routing/FormRequest.d.ts +94 -0
- package/dist/routing/Resource.d.ts +213 -0
- package/dist/routing/Response.d.ts +138 -0
- package/dist/routing/index.d.ts +4 -0
- package/dist/routing/index.js +5 -0
- package/dist/scheduler/ScheduleMonitor.d.ts +141 -0
- package/dist/scheduler/ScheduleMonitor.js +1 -0
- package/dist/scheduler/SchedulerLock.d.ts +33 -0
- package/dist/scheduler/index.d.ts +208 -0
- package/dist/scheduler/index.js +34 -0
- package/dist/services/index.d.ts +79 -0
- package/dist/services/index.js +1 -0
- package/dist/session/Session.d.ts +166 -0
- package/dist/session/index.d.ts +1 -0
- package/dist/session/index.js +16 -0
- package/dist/storage/index.d.ts +154 -0
- package/dist/storage/index.js +1 -0
- package/dist/support/Pipeline.d.ts +65 -0
- package/dist/support/date.d.ts +136 -0
- package/dist/support/date.js +1 -0
- package/dist/support/index.d.ts +8 -0
- package/dist/support/index.js +1 -0
- package/dist/support/singleton.d.ts +10 -0
- package/dist/support/uuid.d.ts +40 -0
- package/dist/teams/index.d.ts +91 -0
- package/dist/teams/index.js +78 -0
- package/dist/uploads/index.d.ts +63 -0
- package/dist/uploads/index.js +2 -0
- package/dist/validation/index.d.ts +46 -0
- package/dist/validation/index.js +1 -0
- package/dist/webhooks/index.d.ts +66 -0
- package/dist/webhooks/index.js +1 -0
- package/package.json +338 -0
- package/src/i18n/LanguageSwitcher.svelte +47 -0
- package/src/i18n/index.ts +113 -0
- package/src/ui/Alert.svelte +22 -0
- package/src/ui/Avatar.svelte +18 -0
- package/src/ui/AvatarFallback.svelte +18 -0
- package/src/ui/AvatarImage.svelte +12 -0
- package/src/ui/Badge.svelte +27 -0
- package/src/ui/Button.svelte +51 -0
- package/src/ui/Card.svelte +15 -0
- package/src/ui/CardContent.svelte +15 -0
- package/src/ui/CardDescription.svelte +15 -0
- package/src/ui/CardFooter.svelte +15 -0
- package/src/ui/CardHeader.svelte +15 -0
- package/src/ui/CardTitle.svelte +15 -0
- package/src/ui/Icon.svelte +81 -0
- package/src/ui/Input.svelte +40 -0
- package/src/ui/Label.svelte +20 -0
- package/src/ui/Separator.svelte +10 -0
- package/src/ui/Tabs.svelte +23 -0
- package/src/ui/TabsContent.svelte +27 -0
- package/src/ui/TabsList.svelte +19 -0
- package/src/ui/TabsTrigger.svelte +28 -0
- package/src/ui/Toaster.svelte +279 -0
- package/src/ui/index.ts +31 -0
- package/src/ui/toast.ts +212 -0
package/package.json
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@beeblock/svelar",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Laravel-inspired framework on top of SvelteKit 2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"svelar": "./dist/cli/bin.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"src/ui",
|
|
14
|
+
"src/i18n",
|
|
15
|
+
"LICENSE",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"svelte": "./src/ui/index.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
"./package.json": "./package.json",
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./orm": {
|
|
26
|
+
"types": "./dist/orm/index.d.ts",
|
|
27
|
+
"import": "./dist/orm/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./hooks": {
|
|
30
|
+
"types": "./dist/hooks/index.d.ts",
|
|
31
|
+
"import": "./dist/hooks/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./cli": {
|
|
34
|
+
"types": "./dist/cli/index.d.ts",
|
|
35
|
+
"import": "./dist/cli/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./container": {
|
|
38
|
+
"types": "./dist/container/index.d.ts",
|
|
39
|
+
"import": "./dist/container/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./middleware": {
|
|
42
|
+
"types": "./dist/middleware/index.d.ts",
|
|
43
|
+
"import": "./dist/middleware/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./routing": {
|
|
46
|
+
"types": "./dist/routing/index.d.ts",
|
|
47
|
+
"import": "./dist/routing/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./database": {
|
|
50
|
+
"types": "./dist/database/index.d.ts",
|
|
51
|
+
"import": "./dist/database/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./validation": {
|
|
54
|
+
"types": "./dist/validation/index.d.ts",
|
|
55
|
+
"import": "./dist/validation/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./auth": {
|
|
58
|
+
"types": "./dist/auth/index.d.ts",
|
|
59
|
+
"import": "./dist/auth/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./hashing": {
|
|
62
|
+
"types": "./dist/hashing/index.d.ts",
|
|
63
|
+
"import": "./dist/hashing/index.js"
|
|
64
|
+
},
|
|
65
|
+
"./session": {
|
|
66
|
+
"types": "./dist/session/index.d.ts",
|
|
67
|
+
"import": "./dist/session/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./errors": {
|
|
70
|
+
"types": "./dist/errors/index.d.ts",
|
|
71
|
+
"import": "./dist/errors/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./pagination": {
|
|
74
|
+
"types": "./dist/pagination/index.d.ts",
|
|
75
|
+
"import": "./dist/pagination/index.js"
|
|
76
|
+
},
|
|
77
|
+
"./events": {
|
|
78
|
+
"types": "./dist/events/index.d.ts",
|
|
79
|
+
"import": "./dist/events/index.js"
|
|
80
|
+
},
|
|
81
|
+
"./logging": {
|
|
82
|
+
"types": "./dist/logging/index.d.ts",
|
|
83
|
+
"import": "./dist/logging/index.js"
|
|
84
|
+
},
|
|
85
|
+
"./storage": {
|
|
86
|
+
"types": "./dist/storage/index.d.ts",
|
|
87
|
+
"import": "./dist/storage/index.js"
|
|
88
|
+
},
|
|
89
|
+
"./cache": {
|
|
90
|
+
"types": "./dist/cache/index.d.ts",
|
|
91
|
+
"import": "./dist/cache/index.js"
|
|
92
|
+
},
|
|
93
|
+
"./queue": {
|
|
94
|
+
"types": "./dist/queue/index.d.ts",
|
|
95
|
+
"import": "./dist/queue/index.js"
|
|
96
|
+
},
|
|
97
|
+
"./mail": {
|
|
98
|
+
"types": "./dist/mail/index.d.ts",
|
|
99
|
+
"import": "./dist/mail/index.js"
|
|
100
|
+
},
|
|
101
|
+
"./notifications": {
|
|
102
|
+
"types": "./dist/notifications/index.d.ts",
|
|
103
|
+
"import": "./dist/notifications/index.js"
|
|
104
|
+
},
|
|
105
|
+
"./broadcasting": {
|
|
106
|
+
"types": "./dist/broadcasting/index.d.ts",
|
|
107
|
+
"import": "./dist/broadcasting/index.js"
|
|
108
|
+
},
|
|
109
|
+
"./broadcasting/client": {
|
|
110
|
+
"types": "./dist/broadcasting/client.d.ts",
|
|
111
|
+
"import": "./dist/broadcasting/client.js"
|
|
112
|
+
},
|
|
113
|
+
"./config": {
|
|
114
|
+
"types": "./dist/config/index.d.ts",
|
|
115
|
+
"import": "./dist/config/index.js"
|
|
116
|
+
},
|
|
117
|
+
"./services": {
|
|
118
|
+
"types": "./dist/services/index.d.ts",
|
|
119
|
+
"import": "./dist/services/index.js"
|
|
120
|
+
},
|
|
121
|
+
"./actions": {
|
|
122
|
+
"types": "./dist/actions/index.d.ts",
|
|
123
|
+
"import": "./dist/actions/index.js"
|
|
124
|
+
},
|
|
125
|
+
"./repositories": {
|
|
126
|
+
"types": "./dist/repositories/index.d.ts",
|
|
127
|
+
"import": "./dist/repositories/index.js"
|
|
128
|
+
},
|
|
129
|
+
"./plugins": {
|
|
130
|
+
"types": "./dist/plugins/index.d.ts",
|
|
131
|
+
"import": "./dist/plugins/index.js"
|
|
132
|
+
},
|
|
133
|
+
"./plugins/PluginRegistry": {
|
|
134
|
+
"types": "./dist/plugins/PluginRegistry.d.ts",
|
|
135
|
+
"import": "./dist/plugins/PluginRegistry.js"
|
|
136
|
+
},
|
|
137
|
+
"./plugins/PluginPublisher": {
|
|
138
|
+
"types": "./dist/plugins/PluginPublisher.d.ts",
|
|
139
|
+
"import": "./dist/plugins/PluginPublisher.js"
|
|
140
|
+
},
|
|
141
|
+
"./plugins/PluginInstaller": {
|
|
142
|
+
"types": "./dist/plugins/PluginInstaller.d.ts",
|
|
143
|
+
"import": "./dist/plugins/PluginInstaller.js"
|
|
144
|
+
},
|
|
145
|
+
"./scheduler": {
|
|
146
|
+
"types": "./dist/scheduler/index.d.ts",
|
|
147
|
+
"import": "./dist/scheduler/index.js"
|
|
148
|
+
},
|
|
149
|
+
"./permissions": {
|
|
150
|
+
"types": "./dist/permissions/index.d.ts",
|
|
151
|
+
"import": "./dist/permissions/index.js"
|
|
152
|
+
},
|
|
153
|
+
"./support": {
|
|
154
|
+
"types": "./dist/support/index.d.ts",
|
|
155
|
+
"import": "./dist/support/index.js"
|
|
156
|
+
},
|
|
157
|
+
"./dates": {
|
|
158
|
+
"types": "./dist/support/date.d.ts",
|
|
159
|
+
"import": "./dist/support/date.js"
|
|
160
|
+
},
|
|
161
|
+
"./ui": {
|
|
162
|
+
"types": "./src/ui/index.ts",
|
|
163
|
+
"svelte": "./src/ui/index.ts",
|
|
164
|
+
"import": "./src/ui/index.ts"
|
|
165
|
+
},
|
|
166
|
+
"./ui/*": {
|
|
167
|
+
"svelte": "./src/ui/*"
|
|
168
|
+
},
|
|
169
|
+
"./http": {
|
|
170
|
+
"types": "./dist/http/index.d.ts",
|
|
171
|
+
"import": "./dist/http/index.js"
|
|
172
|
+
},
|
|
173
|
+
"./i18n": {
|
|
174
|
+
"types": "./dist/i18n/index.d.ts",
|
|
175
|
+
"svelte": "./src/i18n/index.ts",
|
|
176
|
+
"import": "./dist/i18n/index.js"
|
|
177
|
+
},
|
|
178
|
+
"./i18n/LanguageSwitcher.svelte": {
|
|
179
|
+
"svelte": "./src/i18n/LanguageSwitcher.svelte"
|
|
180
|
+
},
|
|
181
|
+
"./forms": {
|
|
182
|
+
"types": "./dist/forms/index.d.ts",
|
|
183
|
+
"import": "./dist/forms/index.js"
|
|
184
|
+
},
|
|
185
|
+
"./pdf": {
|
|
186
|
+
"types": "./dist/pdf/index.d.ts",
|
|
187
|
+
"import": "./dist/pdf/index.js"
|
|
188
|
+
},
|
|
189
|
+
"./pdf/GeneratePdfJob": {
|
|
190
|
+
"types": "./dist/pdf/GeneratePdfJob.d.ts",
|
|
191
|
+
"import": "./dist/pdf/GeneratePdfJob.js"
|
|
192
|
+
},
|
|
193
|
+
"./dashboard": {
|
|
194
|
+
"types": "./dist/dashboard/index.d.ts",
|
|
195
|
+
"import": "./dist/dashboard/index.js"
|
|
196
|
+
},
|
|
197
|
+
"./queue/JobMonitor": {
|
|
198
|
+
"types": "./dist/queue/JobMonitor.d.ts",
|
|
199
|
+
"import": "./dist/queue/JobMonitor.js"
|
|
200
|
+
},
|
|
201
|
+
"./scheduler/ScheduleMonitor": {
|
|
202
|
+
"types": "./dist/scheduler/ScheduleMonitor.d.ts",
|
|
203
|
+
"import": "./dist/scheduler/ScheduleMonitor.js"
|
|
204
|
+
},
|
|
205
|
+
"./logging/LogViewer": {
|
|
206
|
+
"types": "./dist/logging/LogViewer.d.ts",
|
|
207
|
+
"import": "./dist/logging/LogViewer.js"
|
|
208
|
+
},
|
|
209
|
+
"./audit": {
|
|
210
|
+
"types": "./dist/audit/index.d.ts",
|
|
211
|
+
"import": "./dist/audit/index.js"
|
|
212
|
+
},
|
|
213
|
+
"./api-keys": {
|
|
214
|
+
"types": "./dist/api-keys/index.d.ts",
|
|
215
|
+
"import": "./dist/api-keys/index.js"
|
|
216
|
+
},
|
|
217
|
+
"./webhooks": {
|
|
218
|
+
"types": "./dist/webhooks/index.d.ts",
|
|
219
|
+
"import": "./dist/webhooks/index.js"
|
|
220
|
+
},
|
|
221
|
+
"./teams": {
|
|
222
|
+
"types": "./dist/teams/index.d.ts",
|
|
223
|
+
"import": "./dist/teams/index.js"
|
|
224
|
+
},
|
|
225
|
+
"./email-templates": {
|
|
226
|
+
"types": "./dist/email-templates/index.d.ts",
|
|
227
|
+
"import": "./dist/email-templates/index.js"
|
|
228
|
+
},
|
|
229
|
+
"./uploads": {
|
|
230
|
+
"types": "./dist/uploads/index.d.ts",
|
|
231
|
+
"import": "./dist/uploads/index.js"
|
|
232
|
+
},
|
|
233
|
+
"./feature-flags": {
|
|
234
|
+
"types": "./dist/feature-flags/index.d.ts",
|
|
235
|
+
"import": "./dist/feature-flags/index.js"
|
|
236
|
+
},
|
|
237
|
+
"./excel": {
|
|
238
|
+
"types": "./dist/excel/index.d.ts",
|
|
239
|
+
"import": "./dist/excel/index.js"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"scripts": {
|
|
243
|
+
"build": "tsup && (tsc --emitDeclarationOnly || echo 'Warning: tsc declaration emit had errors') && npm run copy-cli-scripts",
|
|
244
|
+
"copy-cli-scripts": "node -e \"const fs=require('fs');['ts-resolver.mjs','ts-resolve-hook.mjs'].forEach(f=>fs.copyFileSync('src/cli/'+f,'dist/cli/'+f))\"",
|
|
245
|
+
"dev": "tsup --watch",
|
|
246
|
+
"test": "vitest run",
|
|
247
|
+
"test:watch": "vitest",
|
|
248
|
+
"lint": "tsc --noEmit",
|
|
249
|
+
"prepublishOnly": "npm run build"
|
|
250
|
+
},
|
|
251
|
+
"dependencies": {
|
|
252
|
+
"@tabler/icons-svelte": "^3.0.0",
|
|
253
|
+
"date-fns": "^4.1.0",
|
|
254
|
+
"drizzle-orm": "^0.38.0",
|
|
255
|
+
"lucide-svelte": "^1.0.1",
|
|
256
|
+
"zod": "^3.23.0"
|
|
257
|
+
},
|
|
258
|
+
"devDependencies": {
|
|
259
|
+
"@types/node": "^22.0.0",
|
|
260
|
+
"@types/pdfkit": "^0.17.5",
|
|
261
|
+
"better-sqlite3": "^11.0.0",
|
|
262
|
+
"exceljs": "^4.4.0",
|
|
263
|
+
"sveltekit-superforms": "^2.30.1",
|
|
264
|
+
"tsup": "^8.3.0",
|
|
265
|
+
"typescript": "^5.7.0",
|
|
266
|
+
"vitest": "^2.1.0"
|
|
267
|
+
},
|
|
268
|
+
"peerDependencies": {
|
|
269
|
+
"@aws-sdk/client-s3": ">=3.0.0",
|
|
270
|
+
"@aws-sdk/s3-request-presigner": ">=3.0.0",
|
|
271
|
+
"@sveltejs/kit": "^2.0.0",
|
|
272
|
+
"better-sqlite3": "*",
|
|
273
|
+
"bullmq": ">=5.0.0",
|
|
274
|
+
"exceljs": ">=4.4.0",
|
|
275
|
+
"ioredis": ">=5.0.0",
|
|
276
|
+
"mysql2": "*",
|
|
277
|
+
"pdfkit": ">=0.18.0",
|
|
278
|
+
"postgres": "*",
|
|
279
|
+
"pusher-js": ">=8.0.0",
|
|
280
|
+
"sveltekit-superforms": ">=2.0.0"
|
|
281
|
+
},
|
|
282
|
+
"peerDependenciesMeta": {
|
|
283
|
+
"@aws-sdk/client-s3": {
|
|
284
|
+
"optional": true
|
|
285
|
+
},
|
|
286
|
+
"@aws-sdk/s3-request-presigner": {
|
|
287
|
+
"optional": true
|
|
288
|
+
},
|
|
289
|
+
"better-sqlite3": {
|
|
290
|
+
"optional": true
|
|
291
|
+
},
|
|
292
|
+
"bullmq": {
|
|
293
|
+
"optional": true
|
|
294
|
+
},
|
|
295
|
+
"ioredis": {
|
|
296
|
+
"optional": true
|
|
297
|
+
},
|
|
298
|
+
"mysql2": {
|
|
299
|
+
"optional": true
|
|
300
|
+
},
|
|
301
|
+
"postgres": {
|
|
302
|
+
"optional": true
|
|
303
|
+
},
|
|
304
|
+
"pusher-js": {
|
|
305
|
+
"optional": true
|
|
306
|
+
},
|
|
307
|
+
"pdfkit": {
|
|
308
|
+
"optional": true
|
|
309
|
+
},
|
|
310
|
+
"exceljs": {
|
|
311
|
+
"optional": true
|
|
312
|
+
},
|
|
313
|
+
"sveltekit-superforms": {
|
|
314
|
+
"optional": true
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"keywords": [
|
|
318
|
+
"svelte",
|
|
319
|
+
"sveltekit",
|
|
320
|
+
"laravel",
|
|
321
|
+
"orm",
|
|
322
|
+
"framework",
|
|
323
|
+
"drizzle",
|
|
324
|
+
"middleware",
|
|
325
|
+
"auth",
|
|
326
|
+
"session",
|
|
327
|
+
"cache",
|
|
328
|
+
"queue",
|
|
329
|
+
"mail"
|
|
330
|
+
],
|
|
331
|
+
"license": "MIT",
|
|
332
|
+
"author": "Raoni <alephtus@gmail.com>",
|
|
333
|
+
"repository": {
|
|
334
|
+
"type": "git",
|
|
335
|
+
"url": "https://github.com/beeblock/svelar.git"
|
|
336
|
+
},
|
|
337
|
+
"homepage": "https://github.com/beeblock/svelar#readme"
|
|
338
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// Svelar Language Switcher Component
|
|
3
|
+
// A generic locale switcher that works with paraglide-js 2.x.
|
|
4
|
+
// Pass in your paraglide runtime functions and it handles the rest.
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
/** Available locale codes (e.g. ['en', 'pt']) */
|
|
8
|
+
locales: readonly string[];
|
|
9
|
+
/** Function that returns the current locale */
|
|
10
|
+
getLocale: () => string;
|
|
11
|
+
/** Function to localize a path for a given locale */
|
|
12
|
+
localizeHref: (path: string, options?: { locale: string }) => string;
|
|
13
|
+
/** Current pathname (e.g. page.url.pathname) */
|
|
14
|
+
pathname?: string;
|
|
15
|
+
/** Optional display labels per locale (e.g. { en: 'EN', pt: 'PT' }) */
|
|
16
|
+
labels?: Record<string, string>;
|
|
17
|
+
/** Extra CSS class for the container */
|
|
18
|
+
class?: string;
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let {
|
|
23
|
+
locales,
|
|
24
|
+
getLocale,
|
|
25
|
+
localizeHref,
|
|
26
|
+
pathname = '/',
|
|
27
|
+
labels = {},
|
|
28
|
+
class: className = '',
|
|
29
|
+
...rest
|
|
30
|
+
}: Props = $props();
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div class="flex items-center gap-1 border border-gray-200 rounded-md overflow-hidden {className}" {...rest}>
|
|
34
|
+
{#each locales as locale}
|
|
35
|
+
{@const current = getLocale() === locale}
|
|
36
|
+
<a
|
|
37
|
+
href={localizeHref(pathname, { locale })}
|
|
38
|
+
hreflang={locale}
|
|
39
|
+
data-sveltekit-reload
|
|
40
|
+
class="px-2 py-1 text-xs font-medium transition-colors {current
|
|
41
|
+
? 'bg-brand text-white'
|
|
42
|
+
: 'text-gray-500 hover:text-gray-900 hover:bg-gray-100'}"
|
|
43
|
+
>
|
|
44
|
+
{labels[locale] ?? locale.toUpperCase()}
|
|
45
|
+
</a>
|
|
46
|
+
{/each}
|
|
47
|
+
</div>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelar i18n Integration
|
|
3
|
+
*
|
|
4
|
+
* Helpers for integrating paraglide-js 2.x with SvelteKit.
|
|
5
|
+
* Provides middleware composers, reroute hook creators, and the LanguageSwitcher component.
|
|
6
|
+
*
|
|
7
|
+
* @module svelar/i18n
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // hooks.server.ts
|
|
12
|
+
* import { createI18nHandle } from 'svelar/i18n';
|
|
13
|
+
* import { paraglideMiddleware } from '$lib/paraglide/server';
|
|
14
|
+
* import { getTextDirection } from '$lib/paraglide/runtime';
|
|
15
|
+
*
|
|
16
|
+
* const i18nHandle = createI18nHandle({ paraglideMiddleware, getTextDirection });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import type { Handle } from '@sveltejs/kit';
|
|
21
|
+
|
|
22
|
+
// ── Types ──────────────────────────────────────────────────
|
|
23
|
+
|
|
24
|
+
export interface I18nHandleConfig {
|
|
25
|
+
/**
|
|
26
|
+
* The paraglide middleware function from `$lib/paraglide/server`.
|
|
27
|
+
* Signature: (request, callback) => Response
|
|
28
|
+
*/
|
|
29
|
+
paraglideMiddleware: (
|
|
30
|
+
request: Request,
|
|
31
|
+
callback: (args: { request: Request; locale: string }) => Response | Promise<Response>,
|
|
32
|
+
) => Response | Promise<Response>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The getTextDirection function from `$lib/paraglide/runtime`.
|
|
36
|
+
* Returns 'ltr' or 'rtl' for a given locale.
|
|
37
|
+
*/
|
|
38
|
+
getTextDirection?: (locale: string) => string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* HTML lang attribute placeholder (default: '%lang%')
|
|
42
|
+
*/
|
|
43
|
+
langPlaceholder?: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* HTML dir attribute placeholder (default: '%dir%')
|
|
47
|
+
*/
|
|
48
|
+
dirPlaceholder?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface RerouteConfig {
|
|
52
|
+
/**
|
|
53
|
+
* The deLocalizeUrl function from `$lib/paraglide/runtime`.
|
|
54
|
+
* Strips the locale prefix from URLs for SvelteKit routing.
|
|
55
|
+
*/
|
|
56
|
+
deLocalizeUrl: (url: URL) => { pathname: string };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ── i18n Handle Creator ───────────────────────────────────
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Creates a SvelteKit `Handle` hook that wires paraglide-js middleware
|
|
63
|
+
* for server-side locale detection and HTML attribute injection.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* import { createI18nHandle } from 'svelar/i18n';
|
|
68
|
+
* import { paraglideMiddleware } from '$lib/paraglide/server';
|
|
69
|
+
* import { getTextDirection } from '$lib/paraglide/runtime';
|
|
70
|
+
*
|
|
71
|
+
* export const i18nHandle = createI18nHandle({ paraglideMiddleware, getTextDirection });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export function createI18nHandle(config: I18nHandleConfig): Handle {
|
|
75
|
+
const {
|
|
76
|
+
paraglideMiddleware,
|
|
77
|
+
getTextDirection = () => 'ltr',
|
|
78
|
+
langPlaceholder = '%lang%',
|
|
79
|
+
dirPlaceholder = '%dir%',
|
|
80
|
+
} = config;
|
|
81
|
+
|
|
82
|
+
return ({ event, resolve }) =>
|
|
83
|
+
paraglideMiddleware(event.request, ({ request: localizedRequest, locale }) => {
|
|
84
|
+
event.request = localizedRequest;
|
|
85
|
+
return resolve(event, {
|
|
86
|
+
transformPageChunk: ({ html }) =>
|
|
87
|
+
html.replace(langPlaceholder, locale).replace(dirPlaceholder, getTextDirection(locale)),
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Creates a SvelteKit `Reroute` function that strips locale prefixes
|
|
94
|
+
* from URLs so SvelteKit's file-based routing works correctly.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* // hooks.ts (client-side)
|
|
99
|
+
* import { createReroute } from 'svelar/i18n';
|
|
100
|
+
* import { deLocalizeUrl } from '$lib/paraglide/runtime';
|
|
101
|
+
*
|
|
102
|
+
* export const reroute = createReroute({ deLocalizeUrl });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export function createReroute(config: RerouteConfig) {
|
|
106
|
+
return (request: { url: URL }) => {
|
|
107
|
+
return config.deLocalizeUrl(request.url).pathname;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Note: LanguageSwitcher is a Svelte component, imported separately:
|
|
112
|
+
// import LanguageSwitcher from 'svelar/i18n/LanguageSwitcher.svelte';
|
|
113
|
+
// or via the Svelte-aware entry point (svelte condition in package.json)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
variant?: 'default' | 'destructive' | 'success';
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { variant = 'default', class: className = '', children, ...rest }: Props = $props();
|
|
12
|
+
|
|
13
|
+
const variants: Record<string, string> = {
|
|
14
|
+
default: 'bg-blue-50 text-blue-900 border border-blue-200',
|
|
15
|
+
destructive: 'bg-red-50 text-red-900 border border-red-200',
|
|
16
|
+
success: 'bg-green-50 text-green-900 border border-green-200',
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<div class="rounded-lg p-4 {variants[variant]} {className}" role="alert" {...rest}>
|
|
21
|
+
{#if children}{@render children()}{/if}
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { class: className = '', children, ...rest }: Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
class="relative inline-flex h-10 w-10 shrink-0 overflow-hidden rounded-full bg-gray-200 {className}"
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
{#if children}{@render children()}{/if}
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { class: className = '', children, ...rest }: Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
class="flex items-center justify-center w-full h-full bg-gray-300 text-gray-700 font-semibold text-sm {className}"
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
{#if children}{@render children()}{/if}
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
src?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { src = '', alt = '', class: className = '', ...rest }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<img {src} {alt} class="aspect-square h-full w-full object-cover {className}" {...rest} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
variant?: 'default' | 'secondary' | 'destructive' | 'outline' | 'success';
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { variant = 'default', class: className = '', children, ...rest }: Props = $props();
|
|
12
|
+
|
|
13
|
+
const variants: Record<string, string> = {
|
|
14
|
+
default: 'bg-brand text-white',
|
|
15
|
+
secondary: 'bg-gray-100 text-gray-900',
|
|
16
|
+
destructive: 'bg-red-100 text-red-900',
|
|
17
|
+
outline: 'border border-gray-300 bg-white text-gray-900',
|
|
18
|
+
success: 'bg-green-100 text-green-900',
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<span
|
|
23
|
+
class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors {variants[variant]} {className}"
|
|
24
|
+
{...rest}
|
|
25
|
+
>
|
|
26
|
+
{#if children}{@render children()}{/if}
|
|
27
|
+
</span>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
6
|
+
size?: 'default' | 'sm' | 'lg' | 'icon';
|
|
7
|
+
class?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
type?: 'button' | 'submit' | 'reset';
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
onclick?: (e: MouseEvent) => void;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
variant = 'default',
|
|
17
|
+
size = 'default',
|
|
18
|
+
class: className = '',
|
|
19
|
+
disabled = false,
|
|
20
|
+
type = 'button',
|
|
21
|
+
children,
|
|
22
|
+
onclick,
|
|
23
|
+
...rest
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
|
|
26
|
+
const variants: Record<string, string> = {
|
|
27
|
+
default: 'bg-brand text-white hover:bg-brand-dark shadow-sm',
|
|
28
|
+
destructive: 'bg-red-500 text-white hover:bg-red-600 shadow-sm',
|
|
29
|
+
outline: 'border border-gray-300 bg-white hover:bg-gray-50 text-gray-700',
|
|
30
|
+
secondary: 'bg-gray-100 text-gray-900 hover:bg-gray-200',
|
|
31
|
+
ghost: 'hover:bg-gray-100 text-gray-700',
|
|
32
|
+
link: 'text-brand underline-offset-4 hover:underline',
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const sizes: Record<string, string> = {
|
|
36
|
+
default: 'h-10 px-4 py-2',
|
|
37
|
+
sm: 'h-9 rounded-md px-3 text-sm',
|
|
38
|
+
lg: 'h-11 rounded-md px-8 text-base',
|
|
39
|
+
icon: 'h-10 w-10',
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<button
|
|
44
|
+
{type}
|
|
45
|
+
{disabled}
|
|
46
|
+
class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 {variants[variant]} {sizes[size]} {className}"
|
|
47
|
+
{onclick}
|
|
48
|
+
{...rest}
|
|
49
|
+
>
|
|
50
|
+
{#if children}{@render children()}{/if}
|
|
51
|
+
</button>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { class: className = '', children, ...rest }: Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class="rounded-lg border border-gray-200 bg-white shadow-sm {className}" {...rest}>
|
|
14
|
+
{#if children}{@render children()}{/if}
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { class: className = '', children, ...rest }: Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class="p-6 pt-0 {className}" {...rest}>
|
|
14
|
+
{#if children}{@render children()}{/if}
|
|
15
|
+
</div>
|