@hexclave/shared 1.0.13 → 1.0.15

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 (108) hide show
  1. package/dist/ai/unified-prompts/reminders.js +1 -1
  2. package/dist/apps/apps-config.d.ts +6 -0
  3. package/dist/apps/apps-config.js +6 -0
  4. package/dist/apps/apps-config.js.map +1 -1
  5. package/dist/config/schema.d.ts +170 -170
  6. package/dist/config-authoring.d.ts.map +1 -1
  7. package/dist/config-authoring.js.map +1 -1
  8. package/dist/config-authoring.test.js +1 -1
  9. package/dist/config-authoring.test.js.map +1 -1
  10. package/dist/config-rendering.d.ts +2 -2
  11. package/dist/config-rendering.js +16 -0
  12. package/dist/config-rendering.js.map +1 -1
  13. package/dist/esm/ai/unified-prompts/reminders.js +1 -1
  14. package/dist/esm/apps/apps-config.d.ts +6 -0
  15. package/dist/esm/apps/apps-config.js +6 -0
  16. package/dist/esm/apps/apps-config.js.map +1 -1
  17. package/dist/esm/config/schema.d.ts +170 -170
  18. package/dist/esm/config-authoring.d.ts.map +1 -1
  19. package/dist/esm/config-authoring.js.map +1 -1
  20. package/dist/esm/config-authoring.test.js +1 -1
  21. package/dist/esm/config-authoring.test.js.map +1 -1
  22. package/dist/esm/config-rendering.d.ts +2 -2
  23. package/dist/esm/config-rendering.js +16 -2
  24. package/dist/esm/config-rendering.js.map +1 -1
  25. package/dist/esm/hexclave-config-file.d.ts +24 -1
  26. package/dist/esm/hexclave-config-file.d.ts.map +1 -1
  27. package/dist/esm/hexclave-config-file.js +69 -2
  28. package/dist/esm/hexclave-config-file.js.map +1 -1
  29. package/dist/esm/interface/admin-interface.d.ts +19 -1
  30. package/dist/esm/interface/admin-interface.d.ts.map +1 -1
  31. package/dist/esm/interface/admin-interface.js +14 -0
  32. package/dist/esm/interface/admin-interface.js.map +1 -1
  33. package/dist/esm/interface/admin-metrics.d.ts +99 -5
  34. package/dist/esm/interface/admin-metrics.d.ts.map +1 -1
  35. package/dist/esm/interface/admin-metrics.js +61 -1
  36. package/dist/esm/interface/admin-metrics.js.map +1 -1
  37. package/dist/esm/interface/conversations.d.ts +35 -35
  38. package/dist/esm/interface/crud/current-user.d.ts +2 -2
  39. package/dist/esm/interface/crud/email-outbox.d.ts +66 -66
  40. package/dist/esm/interface/crud/invoices.d.ts +2 -2
  41. package/dist/esm/interface/crud/projects.d.ts +35 -35
  42. package/dist/esm/interface/crud/team-member-profiles.d.ts +10 -10
  43. package/dist/esm/interface/crud/users.d.ts +10 -10
  44. package/dist/esm/interface/webhooks.d.ts +2 -2
  45. package/dist/esm/utils/analytics-clickmap-overlay.d.ts +18 -0
  46. package/dist/esm/utils/analytics-clickmap-overlay.d.ts.map +1 -0
  47. package/dist/esm/utils/analytics-clickmap-overlay.js +19 -0
  48. package/dist/esm/utils/analytics-clickmap-overlay.js.map +1 -0
  49. package/dist/esm/utils/dev-tool.d.ts +31 -0
  50. package/dist/esm/utils/dev-tool.d.ts.map +1 -0
  51. package/dist/esm/utils/dev-tool.js +32 -0
  52. package/dist/esm/utils/dev-tool.js.map +1 -0
  53. package/dist/esm/utils/dom.d.ts +7 -1
  54. package/dist/esm/utils/dom.d.ts.map +1 -1
  55. package/dist/esm/utils/dom.js +20 -1
  56. package/dist/esm/utils/dom.js.map +1 -1
  57. package/dist/esm/utils/elements-chain.d.ts +38 -0
  58. package/dist/esm/utils/elements-chain.d.ts.map +1 -0
  59. package/dist/esm/utils/elements-chain.js +297 -0
  60. package/dist/esm/utils/elements-chain.js.map +1 -0
  61. package/dist/hexclave-config-file.d.ts +24 -1
  62. package/dist/hexclave-config-file.d.ts.map +1 -1
  63. package/dist/hexclave-config-file.js +71 -1
  64. package/dist/hexclave-config-file.js.map +1 -1
  65. package/dist/interface/admin-interface.d.ts +19 -1
  66. package/dist/interface/admin-interface.d.ts.map +1 -1
  67. package/dist/interface/admin-interface.js +14 -0
  68. package/dist/interface/admin-interface.js.map +1 -1
  69. package/dist/interface/admin-metrics.d.ts +99 -5
  70. package/dist/interface/admin-metrics.d.ts.map +1 -1
  71. package/dist/interface/admin-metrics.js +65 -0
  72. package/dist/interface/admin-metrics.js.map +1 -1
  73. package/dist/interface/conversations.d.ts +35 -35
  74. package/dist/interface/crud/current-user.d.ts +2 -2
  75. package/dist/interface/crud/email-outbox.d.ts +66 -66
  76. package/dist/interface/crud/invoices.d.ts +2 -2
  77. package/dist/interface/crud/projects.d.ts +35 -35
  78. package/dist/interface/crud/team-member-profiles.d.ts +10 -10
  79. package/dist/interface/crud/users.d.ts +10 -10
  80. package/dist/interface/webhooks.d.ts +2 -2
  81. package/dist/utils/analytics-clickmap-overlay.d.ts +18 -0
  82. package/dist/utils/analytics-clickmap-overlay.d.ts.map +1 -0
  83. package/dist/utils/analytics-clickmap-overlay.js +23 -0
  84. package/dist/utils/analytics-clickmap-overlay.js.map +1 -0
  85. package/dist/utils/dev-tool.d.ts +31 -0
  86. package/dist/utils/dev-tool.d.ts.map +1 -0
  87. package/dist/utils/dev-tool.js +37 -0
  88. package/dist/utils/dev-tool.js.map +1 -0
  89. package/dist/utils/dom.d.ts +7 -1
  90. package/dist/utils/dom.d.ts.map +1 -1
  91. package/dist/utils/dom.js +20 -0
  92. package/dist/utils/dom.js.map +1 -1
  93. package/dist/utils/elements-chain.d.ts +38 -0
  94. package/dist/utils/elements-chain.d.ts.map +1 -0
  95. package/dist/utils/elements-chain.js +304 -0
  96. package/dist/utils/elements-chain.js.map +1 -0
  97. package/package.json +1 -1
  98. package/src/apps/apps-config.ts +6 -0
  99. package/src/config-authoring.test.ts +1 -1
  100. package/src/config-authoring.ts +6 -6
  101. package/src/config-rendering.ts +24 -2
  102. package/src/hexclave-config-file.ts +90 -1
  103. package/src/interface/admin-interface.ts +43 -1
  104. package/src/interface/admin-metrics.ts +92 -4
  105. package/src/utils/analytics-clickmap-overlay.tsx +15 -0
  106. package/src/utils/dev-tool.tsx +30 -0
  107. package/src/utils/dom.tsx +42 -0
  108. package/src/utils/elements-chain.tsx +349 -0
@@ -51,15 +51,11 @@ declare const projectsCrudAdminReadSchema: yup$1.ObjectSchema<{
51
51
  onboarding_state: {
52
52
  selected_config_choice: "create-new" | "link-existing";
53
53
  selected_apps: string[];
54
- selected_sign_in_methods: ("google" | "github" | "microsoft" | "passkey" | "credential" | "magicLink")[];
54
+ selected_sign_in_methods: ("passkey" | "google" | "github" | "microsoft" | "credential" | "magicLink")[];
55
55
  selected_email_theme_id: string | null;
56
56
  selected_payments_country: "US" | "OTHER";
57
57
  } | null | undefined;
58
58
  config: {
59
- domains: {
60
- domain: string;
61
- handler_path: string;
62
- }[];
63
59
  oauth_providers: {
64
60
  client_id?: string | undefined;
65
61
  client_secret?: string | undefined;
@@ -70,6 +66,10 @@ declare const projectsCrudAdminReadSchema: yup$1.ObjectSchema<{
70
66
  id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch";
71
67
  provider_config_id: string;
72
68
  }[];
69
+ domains: {
70
+ domain: string;
71
+ handler_path: string;
72
+ }[];
73
73
  allow_localhost: boolean;
74
74
  sign_up_enabled: boolean;
75
75
  credential_enabled: boolean;
@@ -204,15 +204,11 @@ declare const projectsCrudAdminUpdateSchema: yup$1.ObjectSchema<{
204
204
  onboarding_state: {
205
205
  selected_config_choice: "create-new" | "link-existing";
206
206
  selected_apps: string[];
207
- selected_sign_in_methods: ("google" | "github" | "microsoft" | "passkey" | "credential" | "magicLink")[];
207
+ selected_sign_in_methods: ("passkey" | "google" | "github" | "microsoft" | "credential" | "magicLink")[];
208
208
  selected_email_theme_id: string | null;
209
209
  selected_payments_country: "US" | "OTHER";
210
210
  } | null | undefined;
211
211
  config: {
212
- domains?: {
213
- domain: string;
214
- handler_path: string;
215
- }[] | undefined;
216
212
  oauth_providers?: {
217
213
  client_id?: string | undefined;
218
214
  client_secret?: string | undefined;
@@ -222,6 +218,10 @@ declare const projectsCrudAdminUpdateSchema: yup$1.ObjectSchema<{
222
218
  type: "shared" | "standard";
223
219
  id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch";
224
220
  }[] | undefined;
221
+ domains?: {
222
+ domain: string;
223
+ handler_path: string;
224
+ }[] | undefined;
225
225
  allow_localhost?: boolean | undefined;
226
226
  sign_up_enabled?: boolean | undefined;
227
227
  credential_enabled?: boolean | undefined;
@@ -284,15 +284,11 @@ declare const projectsCrudAdminCreateSchema: yup$1.ObjectSchema<{
284
284
  onboarding_state: {
285
285
  selected_config_choice: "create-new" | "link-existing";
286
286
  selected_apps: string[];
287
- selected_sign_in_methods: ("google" | "github" | "microsoft" | "passkey" | "credential" | "magicLink")[];
287
+ selected_sign_in_methods: ("passkey" | "google" | "github" | "microsoft" | "credential" | "magicLink")[];
288
288
  selected_email_theme_id: string | null;
289
289
  selected_payments_country: "US" | "OTHER";
290
290
  } | null | undefined;
291
291
  config: {
292
- domains?: {
293
- domain: string;
294
- handler_path: string;
295
- }[] | undefined;
296
292
  oauth_providers?: {
297
293
  client_id?: string | undefined;
298
294
  client_secret?: string | undefined;
@@ -302,6 +298,10 @@ declare const projectsCrudAdminCreateSchema: yup$1.ObjectSchema<{
302
298
  type: "shared" | "standard";
303
299
  id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch";
304
300
  }[] | undefined;
301
+ domains?: {
302
+ domain: string;
303
+ handler_path: string;
304
+ }[] | undefined;
305
305
  allow_localhost?: boolean | undefined;
306
306
  sign_up_enabled?: boolean | undefined;
307
307
  credential_enabled?: boolean | undefined;
@@ -424,15 +424,11 @@ declare const projectsCrud: CrudSchemaFromOptions<{
424
424
  onboarding_state: {
425
425
  selected_config_choice: "create-new" | "link-existing";
426
426
  selected_apps: string[];
427
- selected_sign_in_methods: ("google" | "github" | "microsoft" | "passkey" | "credential" | "magicLink")[];
427
+ selected_sign_in_methods: ("passkey" | "google" | "github" | "microsoft" | "credential" | "magicLink")[];
428
428
  selected_email_theme_id: string | null;
429
429
  selected_payments_country: "US" | "OTHER";
430
430
  } | null | undefined;
431
431
  config: {
432
- domains: {
433
- domain: string;
434
- handler_path: string;
435
- }[];
436
432
  oauth_providers: {
437
433
  client_id?: string | undefined;
438
434
  client_secret?: string | undefined;
@@ -443,6 +439,10 @@ declare const projectsCrud: CrudSchemaFromOptions<{
443
439
  id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch";
444
440
  provider_config_id: string;
445
441
  }[];
442
+ domains: {
443
+ domain: string;
444
+ handler_path: string;
445
+ }[];
446
446
  allow_localhost: boolean;
447
447
  sign_up_enabled: boolean;
448
448
  credential_enabled: boolean;
@@ -539,15 +539,11 @@ declare const projectsCrud: CrudSchemaFromOptions<{
539
539
  onboarding_state: {
540
540
  selected_config_choice: "create-new" | "link-existing";
541
541
  selected_apps: string[];
542
- selected_sign_in_methods: ("google" | "github" | "microsoft" | "passkey" | "credential" | "magicLink")[];
542
+ selected_sign_in_methods: ("passkey" | "google" | "github" | "microsoft" | "credential" | "magicLink")[];
543
543
  selected_email_theme_id: string | null;
544
544
  selected_payments_country: "US" | "OTHER";
545
545
  } | null | undefined;
546
546
  config: {
547
- domains?: {
548
- domain: string;
549
- handler_path: string;
550
- }[] | undefined;
551
547
  oauth_providers?: {
552
548
  client_id?: string | undefined;
553
549
  client_secret?: string | undefined;
@@ -557,6 +553,10 @@ declare const projectsCrud: CrudSchemaFromOptions<{
557
553
  type: "shared" | "standard";
558
554
  id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch";
559
555
  }[] | undefined;
556
+ domains?: {
557
+ domain: string;
558
+ handler_path: string;
559
+ }[] | undefined;
560
560
  allow_localhost?: boolean | undefined;
561
561
  sign_up_enabled?: boolean | undefined;
562
562
  credential_enabled?: boolean | undefined;
@@ -647,15 +647,11 @@ declare const adminUserProjectsCrud: CrudSchemaFromOptions<{
647
647
  onboarding_state: {
648
648
  selected_config_choice: "create-new" | "link-existing";
649
649
  selected_apps: string[];
650
- selected_sign_in_methods: ("google" | "github" | "microsoft" | "passkey" | "credential" | "magicLink")[];
650
+ selected_sign_in_methods: ("passkey" | "google" | "github" | "microsoft" | "credential" | "magicLink")[];
651
651
  selected_email_theme_id: string | null;
652
652
  selected_payments_country: "US" | "OTHER";
653
653
  } | null | undefined;
654
654
  config: {
655
- domains: {
656
- domain: string;
657
- handler_path: string;
658
- }[];
659
655
  oauth_providers: {
660
656
  client_id?: string | undefined;
661
657
  client_secret?: string | undefined;
@@ -666,6 +662,10 @@ declare const adminUserProjectsCrud: CrudSchemaFromOptions<{
666
662
  id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch";
667
663
  provider_config_id: string;
668
664
  }[];
665
+ domains: {
666
+ domain: string;
667
+ handler_path: string;
668
+ }[];
669
669
  allow_localhost: boolean;
670
670
  sign_up_enabled: boolean;
671
671
  credential_enabled: boolean;
@@ -762,15 +762,11 @@ declare const adminUserProjectsCrud: CrudSchemaFromOptions<{
762
762
  onboarding_state: {
763
763
  selected_config_choice: "create-new" | "link-existing";
764
764
  selected_apps: string[];
765
- selected_sign_in_methods: ("google" | "github" | "microsoft" | "passkey" | "credential" | "magicLink")[];
765
+ selected_sign_in_methods: ("passkey" | "google" | "github" | "microsoft" | "credential" | "magicLink")[];
766
766
  selected_email_theme_id: string | null;
767
767
  selected_payments_country: "US" | "OTHER";
768
768
  } | null | undefined;
769
769
  config: {
770
- domains?: {
771
- domain: string;
772
- handler_path: string;
773
- }[] | undefined;
774
770
  oauth_providers?: {
775
771
  client_id?: string | undefined;
776
772
  client_secret?: string | undefined;
@@ -780,6 +776,10 @@ declare const adminUserProjectsCrud: CrudSchemaFromOptions<{
780
776
  type: "shared" | "standard";
781
777
  id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch";
782
778
  }[] | undefined;
779
+ domains?: {
780
+ domain: string;
781
+ handler_path: string;
782
+ }[] | undefined;
783
783
  allow_localhost?: boolean | undefined;
784
784
  sign_up_enabled?: boolean | undefined;
785
785
  credential_enabled?: boolean | undefined;
@@ -33,27 +33,27 @@ declare const teamMemberProfilesCrudServerReadSchema: yup$1.ObjectSchema<{
33
33
  is_anonymous: boolean;
34
34
  is_restricted: boolean;
35
35
  requires_totp_mfa: boolean;
36
+ country_code: string | null;
37
+ profile_image_url: string | null;
38
+ signed_up_at_millis: number;
39
+ last_active_at_millis: number;
36
40
  primary_email_verified: boolean;
37
41
  primary_email_auth_enabled: boolean;
38
- profile_image_url: string | null;
39
42
  selected_team: {
40
43
  client_metadata?: {} | null | undefined;
41
44
  client_read_only_metadata?: {} | null | undefined;
42
45
  server_metadata?: {} | null | undefined;
43
46
  display_name: string;
44
47
  id: string;
45
- profile_image_url: string | null;
46
48
  created_at_millis: number;
49
+ profile_image_url: string | null;
47
50
  } | null;
48
- signed_up_at_millis: number;
49
51
  has_password: boolean;
50
52
  otp_auth_enabled: boolean;
51
53
  passkey_auth_enabled: boolean;
52
- last_active_at_millis: number;
53
54
  restricted_by_admin: boolean;
54
55
  restricted_by_admin_reason: string | null;
55
56
  restricted_by_admin_private_details: string | null;
56
- country_code: string | null;
57
57
  risk_scores: {
58
58
  sign_up: {
59
59
  bot: number;
@@ -156,27 +156,27 @@ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
156
156
  is_anonymous: boolean;
157
157
  is_restricted: boolean;
158
158
  requires_totp_mfa: boolean;
159
+ country_code: string | null;
160
+ profile_image_url: string | null;
161
+ signed_up_at_millis: number;
162
+ last_active_at_millis: number;
159
163
  primary_email_verified: boolean;
160
164
  primary_email_auth_enabled: boolean;
161
- profile_image_url: string | null;
162
165
  selected_team: {
163
166
  client_metadata?: {} | null | undefined;
164
167
  client_read_only_metadata?: {} | null | undefined;
165
168
  server_metadata?: {} | null | undefined;
166
169
  display_name: string;
167
170
  id: string;
168
- profile_image_url: string | null;
169
171
  created_at_millis: number;
172
+ profile_image_url: string | null;
170
173
  } | null;
171
- signed_up_at_millis: number;
172
174
  has_password: boolean;
173
175
  otp_auth_enabled: boolean;
174
176
  passkey_auth_enabled: boolean;
175
- last_active_at_millis: number;
176
177
  restricted_by_admin: boolean;
177
178
  restricted_by_admin_reason: string | null;
178
179
  restricted_by_admin_private_details: string | null;
179
- country_code: string | null;
180
180
  risk_scores: {
181
181
  sign_up: {
182
182
  bot: number;
@@ -82,8 +82,8 @@ declare const usersCrudServerReadSchema: yup$1.ObjectSchema<{
82
82
  server_metadata?: {} | null | undefined;
83
83
  display_name: string;
84
84
  id: string;
85
- profile_image_url: string | null;
86
85
  created_at_millis: number;
86
+ profile_image_url: string | null;
87
87
  } | null;
88
88
  selected_team_id: string | null;
89
89
  profile_image_url: string | null;
@@ -163,21 +163,21 @@ declare const usersCrudServerReadSchema: yup$1.ObjectSchema<{
163
163
  }, "">;
164
164
  declare const usersCrudServerCreateSchema: yup$1.ObjectSchema<{
165
165
  primary_email: string | null | undefined;
166
+ password: string | null | undefined;
166
167
  display_name: string | null | undefined;
167
168
  client_metadata: {} | null | undefined;
168
169
  client_read_only_metadata: {} | null | undefined;
169
170
  server_metadata: {} | null | undefined;
170
171
  is_anonymous: boolean | undefined;
171
- password: string | null | undefined;
172
+ country_code: string | null | undefined;
173
+ profile_image_url: string | null | undefined;
172
174
  primary_email_verified: boolean | undefined;
173
175
  primary_email_auth_enabled: boolean | undefined;
174
- profile_image_url: string | null | undefined;
175
176
  otp_auth_enabled: boolean | undefined;
176
177
  passkey_auth_enabled: boolean | undefined;
177
178
  restricted_by_admin: boolean | undefined;
178
179
  restricted_by_admin_reason: string | null | undefined;
179
180
  restricted_by_admin_private_details: string | null | undefined;
180
- country_code: string | null | undefined;
181
181
  risk_scores: {
182
182
  sign_up: {
183
183
  bot: number;
@@ -235,8 +235,8 @@ declare const usersCrud: CrudSchemaFromOptions<{
235
235
  server_metadata?: {} | null | undefined;
236
236
  display_name: string;
237
237
  id: string;
238
- profile_image_url: string | null;
239
238
  created_at_millis: number;
239
+ profile_image_url: string | null;
240
240
  } | null;
241
241
  selected_team_id: string | null;
242
242
  profile_image_url: string | null;
@@ -369,21 +369,21 @@ declare const usersCrud: CrudSchemaFromOptions<{
369
369
  }, "">;
370
370
  serverCreateSchema: yup$1.ObjectSchema<{
371
371
  primary_email: string | null | undefined;
372
+ password: string | null | undefined;
372
373
  display_name: string | null | undefined;
373
374
  client_metadata: {} | null | undefined;
374
375
  client_read_only_metadata: {} | null | undefined;
375
376
  server_metadata: {} | null | undefined;
376
377
  is_anonymous: boolean | undefined;
377
- password: string | null | undefined;
378
+ country_code: string | null | undefined;
379
+ profile_image_url: string | null | undefined;
378
380
  primary_email_verified: boolean | undefined;
379
381
  primary_email_auth_enabled: boolean | undefined;
380
- profile_image_url: string | null | undefined;
381
382
  otp_auth_enabled: boolean | undefined;
382
383
  passkey_auth_enabled: boolean | undefined;
383
384
  restricted_by_admin: boolean | undefined;
384
385
  restricted_by_admin_reason: string | null | undefined;
385
386
  restricted_by_admin_private_details: string | null | undefined;
386
- country_code: string | null | undefined;
387
387
  risk_scores: {
388
388
  sign_up: {
389
389
  bot: number;
@@ -469,8 +469,8 @@ declare const userCreatedWebhookEvent: WebhookEvent<yup$1.ObjectSchema<{
469
469
  server_metadata?: {} | null | undefined;
470
470
  display_name: string;
471
471
  id: string;
472
- profile_image_url: string | null;
473
472
  created_at_millis: number;
473
+ profile_image_url: string | null;
474
474
  } | null;
475
475
  selected_team_id: string | null;
476
476
  profile_image_url: string | null;
@@ -560,8 +560,8 @@ declare const userUpdatedWebhookEvent: WebhookEvent<yup$1.ObjectSchema<{
560
560
  server_metadata?: {} | null | undefined;
561
561
  display_name: string;
562
562
  id: string;
563
- profile_image_url: string | null;
564
563
  created_at_millis: number;
564
+ profile_image_url: string | null;
565
565
  } | null;
566
566
  selected_team_id: string | null;
567
567
  profile_image_url: string | null;
@@ -22,8 +22,8 @@ declare const webhookEvents: readonly [WebhookEvent<yup$1.ObjectSchema<{
22
22
  server_metadata?: {} | null | undefined;
23
23
  display_name: string;
24
24
  id: string;
25
- profile_image_url: string | null;
26
25
  created_at_millis: number;
26
+ profile_image_url: string | null;
27
27
  } | null;
28
28
  selected_team_id: string | null;
29
29
  profile_image_url: string | null;
@@ -112,8 +112,8 @@ declare const webhookEvents: readonly [WebhookEvent<yup$1.ObjectSchema<{
112
112
  server_metadata?: {} | null | undefined;
113
113
  display_name: string;
114
114
  id: string;
115
- profile_image_url: string | null;
116
115
  created_at_millis: number;
116
+ profile_image_url: string | null;
117
117
  } | null;
118
118
  selected_team_id: string | null;
119
119
  profile_image_url: string | null;
@@ -0,0 +1,18 @@
1
+ //#region src/utils/analytics-clickmap-overlay.d.ts
2
+ /**
3
+ * Wire protocol for handing a clickmap overlay token from the dashboard to the
4
+ * in-page dev tool via `sessionStorage` + a window event.
5
+ *
6
+ * The token is a self-describing JWT: its payload already carries the
7
+ * `project_id` and `origin` it was minted for, so the reader derives both from
8
+ * the token itself and the writer only has to hand over a single value. The
9
+ * dashboard (writer) and the dev tool (reader) live in different packages but
10
+ * must agree on these exact names — this module is the single source of truth so
11
+ * they can never silently desync.
12
+ */
13
+ declare const CLICKMAP_OVERLAY_TOKEN_STORAGE_KEY = "hexclave-clickmap-token";
14
+ declare const CLICKMAP_OVERLAY_RESUME_STORAGE_KEY = "hexclave-clickmap-resume";
15
+ declare const CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT = "hexclave:clickmap-token-updated";
16
+ //#endregion
17
+ export { CLICKMAP_OVERLAY_RESUME_STORAGE_KEY, CLICKMAP_OVERLAY_TOKEN_STORAGE_KEY, CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT };
18
+ //# sourceMappingURL=analytics-clickmap-overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics-clickmap-overlay.d.ts","names":[],"sources":["../../src/utils/analytics-clickmap-overlay.tsx"],"mappings":";;AAYA;;;;;AACA;;;;;cADa,kCAAA;AAAA,cACA,mCAAA;AAAA,cACA,oCAAA"}
@@ -0,0 +1,23 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/utils/analytics-clickmap-overlay.tsx
4
+ /**
5
+ * Wire protocol for handing a clickmap overlay token from the dashboard to the
6
+ * in-page dev tool via `sessionStorage` + a window event.
7
+ *
8
+ * The token is a self-describing JWT: its payload already carries the
9
+ * `project_id` and `origin` it was minted for, so the reader derives both from
10
+ * the token itself and the writer only has to hand over a single value. The
11
+ * dashboard (writer) and the dev tool (reader) live in different packages but
12
+ * must agree on these exact names — this module is the single source of truth so
13
+ * they can never silently desync.
14
+ */
15
+ const CLICKMAP_OVERLAY_TOKEN_STORAGE_KEY = "hexclave-clickmap-token";
16
+ const CLICKMAP_OVERLAY_RESUME_STORAGE_KEY = "hexclave-clickmap-resume";
17
+ const CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT = "hexclave:clickmap-token-updated";
18
+
19
+ //#endregion
20
+ exports.CLICKMAP_OVERLAY_RESUME_STORAGE_KEY = CLICKMAP_OVERLAY_RESUME_STORAGE_KEY;
21
+ exports.CLICKMAP_OVERLAY_TOKEN_STORAGE_KEY = CLICKMAP_OVERLAY_TOKEN_STORAGE_KEY;
22
+ exports.CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT = CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT;
23
+ //# sourceMappingURL=analytics-clickmap-overlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics-clickmap-overlay.js","names":[],"sources":["../../src/utils/analytics-clickmap-overlay.tsx"],"sourcesContent":["/**\n * Wire protocol for handing a clickmap overlay token from the dashboard to the\n * in-page dev tool via `sessionStorage` + a window event.\n *\n * The token is a self-describing JWT: its payload already carries the\n * `project_id` and `origin` it was minted for, so the reader derives both from\n * the token itself and the writer only has to hand over a single value. The\n * dashboard (writer) and the dev tool (reader) live in different packages but\n * must agree on these exact names — this module is the single source of truth so\n * they can never silently desync.\n */\n\nexport const CLICKMAP_OVERLAY_TOKEN_STORAGE_KEY = \"hexclave-clickmap-token\";\nexport const CLICKMAP_OVERLAY_RESUME_STORAGE_KEY = \"hexclave-clickmap-resume\";\nexport const CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT = \"hexclave:clickmap-token-updated\";\n"],"mappings":";;;;;;;;;;;;;;AAYA,MAAa,qCAAqC;AAClD,MAAa,sCAAsC;AACnD,MAAa,uCAAuC"}
@@ -0,0 +1,31 @@
1
+ //#region src/utils/dev-tool.d.ts
2
+ /**
3
+ * Shared identity of the Hexclave in-page dev tool / clickmap overlay.
4
+ *
5
+ * These constants are the single source of truth for "is this DOM / event /
6
+ * stored click part of the dev tool itself?". They are consumed across package
7
+ * boundaries:
8
+ * - the dev tool mounts its root element with {@link DEV_TOOL_ROOT_ID} and
9
+ * prefixes every generated class with {@link DEV_TOOL_CLASS_PREFIX};
10
+ * - the event tracker uses them to skip self-clicks at ingest;
11
+ * - the backend clickmap query uses them to filter dev-tool clicks out of
12
+ * aggregate clickmaps server-side.
13
+ *
14
+ * Keep them here so a rename can never silently desync the SQL filter from the
15
+ * actual DOM identity.
16
+ */
17
+ declare const DEV_TOOL_ROOT_ID = "__hexclave-dev-tool-root";
18
+ /**
19
+ * Root element id of the standalone clickmap overlay. The clickmap is an
20
+ * independent feature with its own mount (it must survive the dev tool being
21
+ * removed), so it gets its own root — but its self-clicks need the exact same
22
+ * ingest/query exclusions as the dev tool's.
23
+ */
24
+ declare const CLICKMAP_ROOT_ID = "__hexclave-clickmap-root";
25
+ /** Prefix applied to every class/generated id the dev tool renders. */
26
+ declare const DEV_TOOL_CLASS_PREFIX = "sdt-";
27
+ /** Legacy class marker still present on older dev-tool builds. */
28
+ declare const DEV_TOOL_LEGACY_CLASS = "stack-devtool";
29
+ //#endregion
30
+ export { CLICKMAP_ROOT_ID, DEV_TOOL_CLASS_PREFIX, DEV_TOOL_LEGACY_CLASS, DEV_TOOL_ROOT_ID };
31
+ //# sourceMappingURL=dev-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-tool.d.ts","names":[],"sources":["../../src/utils/dev-tool.tsx"],"mappings":";;AAeA;;;;;AAQA;;;;;AAGA;;;;cAXa,gBAAA;AAcb;;;;;;AAAA,cANa,gBAAA;;cAGA,qBAAA;;cAGA,qBAAA"}
@@ -0,0 +1,37 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/utils/dev-tool.tsx
4
+ /**
5
+ * Shared identity of the Hexclave in-page dev tool / clickmap overlay.
6
+ *
7
+ * These constants are the single source of truth for "is this DOM / event /
8
+ * stored click part of the dev tool itself?". They are consumed across package
9
+ * boundaries:
10
+ * - the dev tool mounts its root element with {@link DEV_TOOL_ROOT_ID} and
11
+ * prefixes every generated class with {@link DEV_TOOL_CLASS_PREFIX};
12
+ * - the event tracker uses them to skip self-clicks at ingest;
13
+ * - the backend clickmap query uses them to filter dev-tool clicks out of
14
+ * aggregate clickmaps server-side.
15
+ *
16
+ * Keep them here so a rename can never silently desync the SQL filter from the
17
+ * actual DOM identity.
18
+ */
19
+ const DEV_TOOL_ROOT_ID = "__hexclave-dev-tool-root";
20
+ /**
21
+ * Root element id of the standalone clickmap overlay. The clickmap is an
22
+ * independent feature with its own mount (it must survive the dev tool being
23
+ * removed), so it gets its own root — but its self-clicks need the exact same
24
+ * ingest/query exclusions as the dev tool's.
25
+ */
26
+ const CLICKMAP_ROOT_ID = "__hexclave-clickmap-root";
27
+ /** Prefix applied to every class/generated id the dev tool renders. */
28
+ const DEV_TOOL_CLASS_PREFIX = "sdt-";
29
+ /** Legacy class marker still present on older dev-tool builds. */
30
+ const DEV_TOOL_LEGACY_CLASS = "stack-devtool";
31
+
32
+ //#endregion
33
+ exports.CLICKMAP_ROOT_ID = CLICKMAP_ROOT_ID;
34
+ exports.DEV_TOOL_CLASS_PREFIX = DEV_TOOL_CLASS_PREFIX;
35
+ exports.DEV_TOOL_LEGACY_CLASS = DEV_TOOL_LEGACY_CLASS;
36
+ exports.DEV_TOOL_ROOT_ID = DEV_TOOL_ROOT_ID;
37
+ //# sourceMappingURL=dev-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-tool.js","names":[],"sources":["../../src/utils/dev-tool.tsx"],"sourcesContent":["/**\n * Shared identity of the Hexclave in-page dev tool / clickmap overlay.\n *\n * These constants are the single source of truth for \"is this DOM / event /\n * stored click part of the dev tool itself?\". They are consumed across package\n * boundaries:\n * - the dev tool mounts its root element with {@link DEV_TOOL_ROOT_ID} and\n * prefixes every generated class with {@link DEV_TOOL_CLASS_PREFIX};\n * - the event tracker uses them to skip self-clicks at ingest;\n * - the backend clickmap query uses them to filter dev-tool clicks out of\n * aggregate clickmaps server-side.\n *\n * Keep them here so a rename can never silently desync the SQL filter from the\n * actual DOM identity.\n */\nexport const DEV_TOOL_ROOT_ID = \"__hexclave-dev-tool-root\";\n\n/**\n * Root element id of the standalone clickmap overlay. The clickmap is an\n * independent feature with its own mount (it must survive the dev tool being\n * removed), so it gets its own root — but its self-clicks need the exact same\n * ingest/query exclusions as the dev tool's.\n */\nexport const CLICKMAP_ROOT_ID = \"__hexclave-clickmap-root\";\n\n/** Prefix applied to every class/generated id the dev tool renders. */\nexport const DEV_TOOL_CLASS_PREFIX = \"sdt-\";\n\n/** Legacy class marker still present on older dev-tool builds. */\nexport const DEV_TOOL_LEGACY_CLASS = \"stack-devtool\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAeA,MAAa,mBAAmB;;;;;;;AAQhC,MAAa,mBAAmB;;AAGhC,MAAa,wBAAwB;;AAGrC,MAAa,wBAAwB"}
@@ -1,5 +1,11 @@
1
1
  //#region src/utils/dom.d.ts
2
2
  declare function hasClickableParent(element: HTMLElement): boolean;
3
+ /**
4
+ * Escape a string so it is safe to use as a CSS identifier (id/class) inside a selector.
5
+ * Prefers the native `CSS.escape` when available, falling back to a conservative
6
+ * backslash-escape for non-DOM environments (SSR, tests, older runtimes).
7
+ */
8
+ declare function cssEscapeIdent(value: string): string;
3
9
  //#endregion
4
- export { hasClickableParent };
10
+ export { cssEscapeIdent, hasClickableParent };
5
11
  //# sourceMappingURL=dom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom.d.ts","names":[],"sources":["../../src/utils/dom.tsx"],"mappings":";iBAAgB,kBAAA,CAAmB,OAAA,EAAS,WAAA"}
1
+ {"version":3,"file":"dom.d.ts","names":[],"sources":["../../src/utils/dom.tsx"],"mappings":";iBAAgB,kBAAA,CAAmB,OAAA,EAAS,WAAA;AAA5C;;;;;AAAA,iBAagB,cAAA,CAAe,KAAA"}
package/dist/utils/dom.js CHANGED
@@ -7,7 +7,27 @@ function hasClickableParent(element) {
7
7
  if (parent.dataset.n2Clickable) return true;
8
8
  return hasClickableParent(element.parentElement);
9
9
  }
10
+ /**
11
+ * Escape a string so it is safe to use as a CSS identifier (id/class) inside a selector.
12
+ * Prefers the native `CSS.escape` when available, falling back to a conservative
13
+ * backslash-escape for non-DOM environments (SSR, tests, older runtimes).
14
+ */
15
+ function cssEscapeIdent(value) {
16
+ if (typeof CSS !== "undefined" && typeof CSS.escape === "function") return CSS.escape(value);
17
+ let escaped = "";
18
+ for (let i = 0; i < value.length; i += 1) {
19
+ const char = value.charAt(i);
20
+ const codeUnit = value.charCodeAt(i);
21
+ if (codeUnit === 0) escaped += "�";
22
+ else if (codeUnit >= 1 && codeUnit <= 31 || codeUnit === 127 || i === 0 && codeUnit >= 48 && codeUnit <= 57 || i === 1 && codeUnit >= 48 && codeUnit <= 57 && value.charCodeAt(0) === 45) escaped += `\\${codeUnit.toString(16)} `;
23
+ else if (i === 0 && codeUnit === 45 && value.length === 1) escaped += "\\-";
24
+ else if (codeUnit >= 128 || codeUnit === 45 || codeUnit === 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) escaped += char;
25
+ else escaped += `\\${char}`;
26
+ }
27
+ return escaped;
28
+ }
10
29
 
11
30
  //#endregion
31
+ exports.cssEscapeIdent = cssEscapeIdent;
12
32
  exports.hasClickableParent = hasClickableParent;
13
33
  //# sourceMappingURL=dom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom.js","names":[],"sources":["../../src/utils/dom.tsx"],"sourcesContent":["export function hasClickableParent(element: HTMLElement): boolean {\n const parent = element.parentElement;\n if (!parent) return false;\n if (parent.dataset.n2Clickable) return true;\n\n return hasClickableParent(element.parentElement);\n}\n"],"mappings":";;;AAAA,SAAgB,mBAAmB,SAA+B;CAChE,MAAM,SAAS,QAAQ;AACvB,KAAI,CAAC,OAAQ,QAAO;AACpB,KAAI,OAAO,QAAQ,YAAa,QAAO;AAEvC,QAAO,mBAAmB,QAAQ,cAAc"}
1
+ {"version":3,"file":"dom.js","names":[],"sources":["../../src/utils/dom.tsx"],"sourcesContent":["export function hasClickableParent(element: HTMLElement): boolean {\n const parent = element.parentElement;\n if (!parent) return false;\n if (parent.dataset.n2Clickable) return true;\n\n return hasClickableParent(element.parentElement);\n}\n\n/**\n * Escape a string so it is safe to use as a CSS identifier (id/class) inside a selector.\n * Prefers the native `CSS.escape` when available, falling back to a conservative\n * backslash-escape for non-DOM environments (SSR, tests, older runtimes).\n */\nexport function cssEscapeIdent(value: string): string {\n if (typeof CSS !== \"undefined\" && typeof CSS.escape === \"function\") {\n return CSS.escape(value);\n }\n\n let escaped = \"\";\n for (let i = 0; i < value.length; i += 1) {\n const char = value.charAt(i);\n const codeUnit = value.charCodeAt(i);\n\n if (codeUnit === 0x0000) {\n escaped += \"\\uFFFD\";\n } else if (\n (codeUnit >= 0x0001 && codeUnit <= 0x001f) ||\n codeUnit === 0x007f ||\n (i === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||\n (i === 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && value.charCodeAt(0) === 0x002d)\n ) {\n escaped += `\\\\${codeUnit.toString(16)} `;\n } else if (i === 0 && codeUnit === 0x002d && value.length === 1) {\n escaped += \"\\\\-\";\n } else if (\n codeUnit >= 0x0080 ||\n codeUnit === 0x002d ||\n codeUnit === 0x005f ||\n (codeUnit >= 0x0030 && codeUnit <= 0x0039) ||\n (codeUnit >= 0x0041 && codeUnit <= 0x005a) ||\n (codeUnit >= 0x0061 && codeUnit <= 0x007a)\n ) {\n escaped += char;\n } else {\n escaped += `\\\\${char}`;\n }\n }\n return escaped;\n}\n"],"mappings":";;;AAAA,SAAgB,mBAAmB,SAA+B;CAChE,MAAM,SAAS,QAAQ;AACvB,KAAI,CAAC,OAAQ,QAAO;AACpB,KAAI,OAAO,QAAQ,YAAa,QAAO;AAEvC,QAAO,mBAAmB,QAAQ,cAAc;;;;;;;AAQlD,SAAgB,eAAe,OAAuB;AACpD,KAAI,OAAO,QAAQ,eAAe,OAAO,IAAI,WAAW,WACtD,QAAO,IAAI,OAAO,MAAM;CAG1B,IAAI,UAAU;AACd,MAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,GAAG;EACxC,MAAM,OAAO,MAAM,OAAO,EAAE;EAC5B,MAAM,WAAW,MAAM,WAAW,EAAE;AAEpC,MAAI,aAAa,EACf,YAAW;WAEV,YAAY,KAAU,YAAY,MACnC,aAAa,OACZ,MAAM,KAAK,YAAY,MAAU,YAAY,MAC7C,MAAM,KAAK,YAAY,MAAU,YAAY,MAAU,MAAM,WAAW,EAAE,KAAK,GAEhF,YAAW,KAAK,SAAS,SAAS,GAAG,CAAC;WAC7B,MAAM,KAAK,aAAa,MAAU,MAAM,WAAW,EAC5D,YAAW;WAEX,YAAY,OACZ,aAAa,MACb,aAAa,MACZ,YAAY,MAAU,YAAY,MAClC,YAAY,MAAU,YAAY,MAClC,YAAY,MAAU,YAAY,IAEnC,YAAW;MAEX,YAAW,KAAK;;AAGpB,QAAO"}
@@ -0,0 +1,38 @@
1
+ //#region src/utils/elements-chain.d.ts
2
+ /**
3
+ * PostHog-style `elements_chain` format — the single owner of both halves of the
4
+ * contract. The event tracker {@link buildElementsChain serializes} a clicked
5
+ * element (and its ancestors) into a string; the clickmap overlay
6
+ * {@link parseElementsChain parses} that string back into structured segments so
7
+ * it can re-locate the element in a live DOM.
8
+ *
9
+ * Encode and decode MUST round-trip exactly, which is why they live together:
10
+ * the escaping applied here on the write side is reversed by the parser below,
11
+ * and a single round-trip test in `elements-chain.test.tsx` guards the pair.
12
+ *
13
+ * Segment shape (leaf-first, joined by `;`):
14
+ * tag.class1.class2:nth-child="2":nth-of-type="1":text="Save":attr__id="x":href="..."
15
+ */
16
+ type ElementsChainSegment = {
17
+ tag: string;
18
+ classes: string[];
19
+ attrs: Record<string, string>;
20
+ text: string | null;
21
+ nthChild: number | null;
22
+ nthOfType: number | null;
23
+ href: string | null;
24
+ };
25
+ declare const ELEMENTS_CHAIN_MAX_DEPTH = 8;
26
+ declare const ELEMENTS_CHAIN_TEXT_MAX = 80;
27
+ declare const ELEMENTS_CHAIN_ATTR_MAX = 200;
28
+ declare const ELEMENTS_CHAIN_ATTRS: readonly ["id", "data-testid", "data-test-id", "data-hexclave-id", "name", "type", "role", "aria-label", "placeholder", "title"];
29
+ /**
30
+ * Serialise a clicked element and up to {@link ELEMENTS_CHAIN_MAX_DEPTH}
31
+ * ancestors (leaf-first) into an `elements_chain` string.
32
+ */
33
+ declare function buildElementsChain(element: Element): string;
34
+ /** Parse an `elements_chain` string into structured, leaf-first segments. */
35
+ declare function parseElementsChain(chain: string): ElementsChainSegment[];
36
+ //#endregion
37
+ export { ELEMENTS_CHAIN_ATTRS, ELEMENTS_CHAIN_ATTR_MAX, ELEMENTS_CHAIN_MAX_DEPTH, ELEMENTS_CHAIN_TEXT_MAX, ElementsChainSegment, buildElementsChain, parseElementsChain };
38
+ //# sourceMappingURL=elements-chain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elements-chain.d.ts","names":[],"sources":["../../src/utils/elements-chain.tsx"],"mappings":";;AAeA;;;;;;;;;;;;;KAAY,oBAAA;EACV,GAAA;EACA,OAAA;EACA,KAAA,EAAO,MAAA;EACP,IAAA;EACA,QAAA;EACA,SAAA;EACA,IAAA;AAAA;AAAA,cAGW,wBAAA;AAAA,cACA,uBAAA;AAAA,cACA,uBAAA;AAAA,cAKA,oBAAA;;;;AAAb;iBAyFgB,kBAAA,CAAmB,OAAA,EAAS,OAAA;;iBA0K5B,kBAAA,CAAmB,KAAA,WAAgB,oBAAA"}