@drawnagency/primitives 0.1.42 → 0.1.43

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 (52) hide show
  1. package/dist/{chunk-62OWSJ7V.js → chunk-5XYUO4HP.js} +1 -1
  2. package/dist/{chunk-A4RARGF2.js → chunk-BJ6FYGYP.js} +2 -0
  3. package/dist/{chunk-BU52OBPW.js → chunk-P3HO76OS.js} +1 -1
  4. package/dist/components/editor/SectionWrapper.d.ts.map +1 -1
  5. package/dist/components/sections/Button/index.d.ts.map +1 -1
  6. package/dist/components/sections/Colors/index.d.ts.map +1 -1
  7. package/dist/components/sections/DoDontList/index.d.ts.map +1 -1
  8. package/dist/components/sections/DoDontMediaGrid/index.d.ts.map +1 -1
  9. package/dist/components/sections/IconList/index.d.ts.map +1 -1
  10. package/dist/components/sections/LinkHeading/index.d.ts.map +1 -1
  11. package/dist/components/sections/MediaGrid/index.d.ts.map +1 -1
  12. package/dist/components/sections/Prose/index.d.ts.map +1 -1
  13. package/dist/components/sections/SplitContent/index.d.ts.map +1 -1
  14. package/dist/components/sections/SubHeading/index.d.ts.map +1 -1
  15. package/dist/components/sections/SubSubHeading/index.d.ts.map +1 -1
  16. package/dist/components/shell/BugReportFAB.d.ts.map +1 -1
  17. package/dist/components/shell/EditorShell.d.ts.map +1 -1
  18. package/dist/components/shell/SectionSkeleton.d.ts.map +1 -1
  19. package/dist/components/shell/SectionTypePicker.d.ts +4 -3
  20. package/dist/components/shell/SectionTypePicker.d.ts.map +1 -1
  21. package/dist/components/shell/SiteSettingsDisplay.d.ts.map +1 -1
  22. package/dist/index.js +3 -3
  23. package/dist/lib/index.js +2 -2
  24. package/dist/lib/registry.d.ts +2 -2
  25. package/dist/lib/registry.d.ts.map +1 -1
  26. package/dist/schemas/index.js +2 -2
  27. package/dist/schemas/site-config.d.ts +2 -0
  28. package/dist/schemas/site-config.d.ts.map +1 -1
  29. package/dist/types/database.d.ts +509 -0
  30. package/dist/types/database.d.ts.map +1 -0
  31. package/dist/types/database.js +12 -0
  32. package/package.json +5 -1
  33. package/src/components/editor/SectionWrapper.tsx +9 -4
  34. package/src/components/sections/Button/index.tsx +2 -0
  35. package/src/components/sections/Colors/index.tsx +2 -0
  36. package/src/components/sections/DoDontList/index.tsx +2 -0
  37. package/src/components/sections/DoDontMediaGrid/index.tsx +2 -0
  38. package/src/components/sections/IconList/index.tsx +2 -0
  39. package/src/components/sections/LinkHeading/index.tsx +2 -0
  40. package/src/components/sections/MediaGrid/index.tsx +2 -0
  41. package/src/components/sections/Prose/index.tsx +2 -0
  42. package/src/components/sections/SplitContent/index.tsx +2 -0
  43. package/src/components/sections/SubHeading/index.tsx +2 -0
  44. package/src/components/sections/SubSubHeading/index.tsx +2 -0
  45. package/src/components/shell/BugReportFAB.tsx +8 -3
  46. package/src/components/shell/EditorShell.tsx +3 -3
  47. package/src/components/shell/SectionSkeleton.tsx +15 -14
  48. package/src/components/shell/SectionTypePicker.tsx +15 -11
  49. package/src/components/shell/SiteSettingsDisplay.tsx +12 -0
  50. package/src/lib/registry.ts +2 -2
  51. package/src/schemas/site-config.ts +2 -0
  52. package/src/types/database.ts +565 -0
@@ -0,0 +1,565 @@
1
+ export type Json =
2
+ | string
3
+ | number
4
+ | boolean
5
+ | null
6
+ | { [key: string]: Json | undefined }
7
+ | Json[]
8
+
9
+ export type Database = {
10
+ // Allows to automatically instantiate createClient with right options
11
+ // instead of createClient<Database, { PostgrestVersion: 'XX' }>(URL, KEY)
12
+ __InternalSupabase: {
13
+ PostgrestVersion: "14.5"
14
+ }
15
+ graphql_public: {
16
+ Tables: {
17
+ [_ in never]: never
18
+ }
19
+ Views: {
20
+ [_ in never]: never
21
+ }
22
+ Functions: {
23
+ graphql: {
24
+ Args: {
25
+ extensions?: Json
26
+ operationName?: string
27
+ query?: string
28
+ variables?: Json
29
+ }
30
+ Returns: Json
31
+ }
32
+ }
33
+ Enums: {
34
+ [_ in never]: never
35
+ }
36
+ CompositeTypes: {
37
+ [_ in never]: never
38
+ }
39
+ }
40
+ public: {
41
+ Tables: {
42
+ allowed_signups: {
43
+ Row: {
44
+ created_at: string | null
45
+ github_installation_id: string | null
46
+ id: string
47
+ pattern: string
48
+ }
49
+ Insert: {
50
+ created_at?: string | null
51
+ github_installation_id?: string | null
52
+ id?: string
53
+ pattern: string
54
+ }
55
+ Update: {
56
+ created_at?: string | null
57
+ github_installation_id?: string | null
58
+ id?: string
59
+ pattern?: string
60
+ }
61
+ Relationships: [
62
+ {
63
+ foreignKeyName: "allowed_signups_github_installation_id_fkey"
64
+ columns: ["github_installation_id"]
65
+ isOneToOne: false
66
+ referencedRelation: "github_installations"
67
+ referencedColumns: ["id"]
68
+ },
69
+ ]
70
+ }
71
+ bug_reports: {
72
+ Row: {
73
+ category: string
74
+ context: Json | null
75
+ created_at: string
76
+ description: string
77
+ id: string
78
+ images: Json
79
+ is_critical: boolean
80
+ site_id: string
81
+ user_id: string
82
+ }
83
+ Insert: {
84
+ category: string
85
+ context?: Json | null
86
+ created_at?: string
87
+ description: string
88
+ id?: string
89
+ images?: Json
90
+ is_critical?: boolean
91
+ site_id: string
92
+ user_id: string
93
+ }
94
+ Update: {
95
+ category?: string
96
+ context?: Json | null
97
+ created_at?: string
98
+ description?: string
99
+ id?: string
100
+ images?: Json
101
+ is_critical?: boolean
102
+ site_id?: string
103
+ user_id?: string
104
+ }
105
+ Relationships: [
106
+ {
107
+ foreignKeyName: "bug_reports_site_id_fkey"
108
+ columns: ["site_id"]
109
+ isOneToOne: false
110
+ referencedRelation: "sites"
111
+ referencedColumns: ["id"]
112
+ },
113
+ ]
114
+ }
115
+ deploy_status: {
116
+ Row: {
117
+ commit_sha: string | null
118
+ created_at: string
119
+ deploy_id: string
120
+ deploy_url: string
121
+ site_id: string
122
+ state: string
123
+ updated_at: string
124
+ }
125
+ Insert: {
126
+ commit_sha?: string | null
127
+ created_at?: string
128
+ deploy_id: string
129
+ deploy_url: string
130
+ site_id: string
131
+ state: string
132
+ updated_at?: string
133
+ }
134
+ Update: {
135
+ commit_sha?: string | null
136
+ created_at?: string
137
+ deploy_id?: string
138
+ deploy_url?: string
139
+ site_id?: string
140
+ state?: string
141
+ updated_at?: string
142
+ }
143
+ Relationships: [
144
+ {
145
+ foreignKeyName: "deploy_status_site_id_fkey"
146
+ columns: ["site_id"]
147
+ isOneToOne: true
148
+ referencedRelation: "sites"
149
+ referencedColumns: ["id"]
150
+ },
151
+ ]
152
+ }
153
+ github_installations: {
154
+ Row: {
155
+ created_at: string | null
156
+ github_account_login: string
157
+ github_account_type: string
158
+ github_installation_id: number
159
+ id: string
160
+ installed_by: string | null
161
+ status: string
162
+ }
163
+ Insert: {
164
+ created_at?: string | null
165
+ github_account_login: string
166
+ github_account_type: string
167
+ github_installation_id: number
168
+ id?: string
169
+ installed_by?: string | null
170
+ status?: string
171
+ }
172
+ Update: {
173
+ created_at?: string | null
174
+ github_account_login?: string
175
+ github_account_type?: string
176
+ github_installation_id?: number
177
+ id?: string
178
+ installed_by?: string | null
179
+ status?: string
180
+ }
181
+ Relationships: [
182
+ {
183
+ foreignKeyName: "github_installations_installed_by_fkey"
184
+ columns: ["installed_by"]
185
+ isOneToOne: false
186
+ referencedRelation: "platform_users"
187
+ referencedColumns: ["id"]
188
+ },
189
+ ]
190
+ }
191
+ installation_members: {
192
+ Row: {
193
+ created_at: string | null
194
+ installation_id: string
195
+ platform_user_id: string
196
+ role: string
197
+ }
198
+ Insert: {
199
+ created_at?: string | null
200
+ installation_id: string
201
+ platform_user_id: string
202
+ role?: string
203
+ }
204
+ Update: {
205
+ created_at?: string | null
206
+ installation_id?: string
207
+ platform_user_id?: string
208
+ role?: string
209
+ }
210
+ Relationships: [
211
+ {
212
+ foreignKeyName: "installation_members_installation_id_fkey"
213
+ columns: ["installation_id"]
214
+ isOneToOne: false
215
+ referencedRelation: "github_installations"
216
+ referencedColumns: ["id"]
217
+ },
218
+ {
219
+ foreignKeyName: "installation_members_platform_user_id_fkey"
220
+ columns: ["platform_user_id"]
221
+ isOneToOne: false
222
+ referencedRelation: "platform_users"
223
+ referencedColumns: ["id"]
224
+ },
225
+ ]
226
+ }
227
+ platform_users: {
228
+ Row: {
229
+ created_at: string | null
230
+ email: string
231
+ github_user_id: number | null
232
+ id: string
233
+ role: string
234
+ user_id: string
235
+ }
236
+ Insert: {
237
+ created_at?: string | null
238
+ email: string
239
+ github_user_id?: number | null
240
+ id?: string
241
+ role: string
242
+ user_id: string
243
+ }
244
+ Update: {
245
+ created_at?: string | null
246
+ email?: string
247
+ github_user_id?: number | null
248
+ id?: string
249
+ role?: string
250
+ user_id?: string
251
+ }
252
+ Relationships: []
253
+ }
254
+ site_api_keys: {
255
+ Row: {
256
+ created_at: string | null
257
+ id: string
258
+ key_hash: string
259
+ site_id: string
260
+ }
261
+ Insert: {
262
+ created_at?: string | null
263
+ id?: string
264
+ key_hash: string
265
+ site_id: string
266
+ }
267
+ Update: {
268
+ created_at?: string | null
269
+ id?: string
270
+ key_hash?: string
271
+ site_id?: string
272
+ }
273
+ Relationships: [
274
+ {
275
+ foreignKeyName: "site_api_keys_site_id_fkey"
276
+ columns: ["site_id"]
277
+ isOneToOne: false
278
+ referencedRelation: "sites"
279
+ referencedColumns: ["id"]
280
+ },
281
+ ]
282
+ }
283
+ site_users: {
284
+ Row: {
285
+ created_at: string | null
286
+ email: string
287
+ id: string
288
+ invited_by: string | null
289
+ role: string
290
+ site_id: string
291
+ user_id: string
292
+ }
293
+ Insert: {
294
+ created_at?: string | null
295
+ email: string
296
+ id?: string
297
+ invited_by?: string | null
298
+ role: string
299
+ site_id: string
300
+ user_id: string
301
+ }
302
+ Update: {
303
+ created_at?: string | null
304
+ email?: string
305
+ id?: string
306
+ invited_by?: string | null
307
+ role?: string
308
+ site_id?: string
309
+ user_id?: string
310
+ }
311
+ Relationships: [
312
+ {
313
+ foreignKeyName: "site_users_site_id_fkey"
314
+ columns: ["site_id"]
315
+ isOneToOne: false
316
+ referencedRelation: "sites"
317
+ referencedColumns: ["id"]
318
+ },
319
+ ]
320
+ }
321
+ sites: {
322
+ Row: {
323
+ created_at: string | null
324
+ custom_domain: string | null
325
+ github_owner: string
326
+ github_repo: string
327
+ id: string
328
+ installation_id: string | null
329
+ name: string
330
+ netlify_site_id: string | null
331
+ password_enabled: boolean
332
+ provisioned_by: string | null
333
+ provisioning_status: string
334
+ }
335
+ Insert: {
336
+ created_at?: string | null
337
+ custom_domain?: string | null
338
+ github_owner: string
339
+ github_repo: string
340
+ id?: string
341
+ installation_id?: string | null
342
+ name: string
343
+ netlify_site_id?: string | null
344
+ password_enabled?: boolean
345
+ provisioned_by?: string | null
346
+ provisioning_status?: string
347
+ }
348
+ Update: {
349
+ created_at?: string | null
350
+ custom_domain?: string | null
351
+ github_owner?: string
352
+ github_repo?: string
353
+ id?: string
354
+ installation_id?: string | null
355
+ name?: string
356
+ netlify_site_id?: string | null
357
+ password_enabled?: boolean
358
+ provisioned_by?: string | null
359
+ provisioning_status?: string
360
+ }
361
+ Relationships: [
362
+ {
363
+ foreignKeyName: "sites_installation_id_fkey"
364
+ columns: ["installation_id"]
365
+ isOneToOne: false
366
+ referencedRelation: "github_installations"
367
+ referencedColumns: ["id"]
368
+ },
369
+ {
370
+ foreignKeyName: "sites_provisioned_by_fkey"
371
+ columns: ["provisioned_by"]
372
+ isOneToOne: false
373
+ referencedRelation: "platform_users"
374
+ referencedColumns: ["id"]
375
+ },
376
+ ]
377
+ }
378
+ viewer_audiences: {
379
+ Row: {
380
+ color: string | null
381
+ created_at: string | null
382
+ display_name: string
383
+ id: string
384
+ is_default: boolean
385
+ name: string
386
+ password_hash: string
387
+ site_id: string
388
+ }
389
+ Insert: {
390
+ color?: string | null
391
+ created_at?: string | null
392
+ display_name: string
393
+ id?: string
394
+ is_default?: boolean
395
+ name: string
396
+ password_hash: string
397
+ site_id: string
398
+ }
399
+ Update: {
400
+ color?: string | null
401
+ created_at?: string | null
402
+ display_name?: string
403
+ id?: string
404
+ is_default?: boolean
405
+ name?: string
406
+ password_hash?: string
407
+ site_id?: string
408
+ }
409
+ Relationships: [
410
+ {
411
+ foreignKeyName: "viewer_tiers_site_id_fkey"
412
+ columns: ["site_id"]
413
+ isOneToOne: false
414
+ referencedRelation: "sites"
415
+ referencedColumns: ["id"]
416
+ },
417
+ ]
418
+ }
419
+ }
420
+ Views: {
421
+ [_ in never]: never
422
+ }
423
+ Functions: {
424
+ get_user_id_by_email: { Args: { lookup_email: string }; Returns: string }
425
+ is_site_member: { Args: { p_site_id: string }; Returns: boolean }
426
+ is_site_owner: { Args: { p_site_id: string }; Returns: boolean }
427
+ revoke_site_user: {
428
+ Args: { p_site_id: string; p_user_id: string }
429
+ Returns: undefined
430
+ }
431
+ }
432
+ Enums: {
433
+ [_ in never]: never
434
+ }
435
+ CompositeTypes: {
436
+ [_ in never]: never
437
+ }
438
+ }
439
+ }
440
+
441
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">
442
+
443
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">]
444
+
445
+ export type Tables<
446
+ DefaultSchemaTableNameOrOptions extends
447
+ | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
448
+ | { schema: keyof DatabaseWithoutInternals },
449
+ TableName extends DefaultSchemaTableNameOrOptions extends {
450
+ schema: keyof DatabaseWithoutInternals
451
+ }
452
+ ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
453
+ DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
454
+ : never = never,
455
+ > = DefaultSchemaTableNameOrOptions extends {
456
+ schema: keyof DatabaseWithoutInternals
457
+ }
458
+ ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
459
+ DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
460
+ Row: infer R
461
+ }
462
+ ? R
463
+ : never
464
+ : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
465
+ DefaultSchema["Views"])
466
+ ? (DefaultSchema["Tables"] &
467
+ DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
468
+ Row: infer R
469
+ }
470
+ ? R
471
+ : never
472
+ : never
473
+
474
+ export type TablesInsert<
475
+ DefaultSchemaTableNameOrOptions extends
476
+ | keyof DefaultSchema["Tables"]
477
+ | { schema: keyof DatabaseWithoutInternals },
478
+ TableName extends DefaultSchemaTableNameOrOptions extends {
479
+ schema: keyof DatabaseWithoutInternals
480
+ }
481
+ ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
482
+ : never = never,
483
+ > = DefaultSchemaTableNameOrOptions extends {
484
+ schema: keyof DatabaseWithoutInternals
485
+ }
486
+ ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
487
+ Insert: infer I
488
+ }
489
+ ? I
490
+ : never
491
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
492
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
493
+ Insert: infer I
494
+ }
495
+ ? I
496
+ : never
497
+ : never
498
+
499
+ export type TablesUpdate<
500
+ DefaultSchemaTableNameOrOptions extends
501
+ | keyof DefaultSchema["Tables"]
502
+ | { schema: keyof DatabaseWithoutInternals },
503
+ TableName extends DefaultSchemaTableNameOrOptions extends {
504
+ schema: keyof DatabaseWithoutInternals
505
+ }
506
+ ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
507
+ : never = never,
508
+ > = DefaultSchemaTableNameOrOptions extends {
509
+ schema: keyof DatabaseWithoutInternals
510
+ }
511
+ ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
512
+ Update: infer U
513
+ }
514
+ ? U
515
+ : never
516
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
517
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
518
+ Update: infer U
519
+ }
520
+ ? U
521
+ : never
522
+ : never
523
+
524
+ export type Enums<
525
+ DefaultSchemaEnumNameOrOptions extends
526
+ | keyof DefaultSchema["Enums"]
527
+ | { schema: keyof DatabaseWithoutInternals },
528
+ EnumName extends DefaultSchemaEnumNameOrOptions extends {
529
+ schema: keyof DatabaseWithoutInternals
530
+ }
531
+ ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
532
+ : never = never,
533
+ > = DefaultSchemaEnumNameOrOptions extends {
534
+ schema: keyof DatabaseWithoutInternals
535
+ }
536
+ ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
537
+ : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
538
+ ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
539
+ : never
540
+
541
+ export type CompositeTypes<
542
+ PublicCompositeTypeNameOrOptions extends
543
+ | keyof DefaultSchema["CompositeTypes"]
544
+ | { schema: keyof DatabaseWithoutInternals },
545
+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
546
+ schema: keyof DatabaseWithoutInternals
547
+ }
548
+ ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
549
+ : never = never,
550
+ > = PublicCompositeTypeNameOrOptions extends {
551
+ schema: keyof DatabaseWithoutInternals
552
+ }
553
+ ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
554
+ : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
555
+ ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
556
+ : never
557
+
558
+ export const Constants = {
559
+ graphql_public: {
560
+ Enums: {},
561
+ },
562
+ public: {
563
+ Enums: {},
564
+ },
565
+ } as const