keystone-design-bootstrap 1.0.55 → 1.0.56

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 (56) hide show
  1. package/dist/design_system/elements/index.js +8 -3
  2. package/dist/design_system/elements/index.js.map +1 -1
  3. package/dist/design_system/sections/index.js +203 -106
  4. package/dist/design_system/sections/index.js.map +1 -1
  5. package/dist/index.js +303 -247
  6. package/dist/index.js.map +1 -1
  7. package/dist/lib/hooks/index.js +72 -0
  8. package/dist/lib/hooks/index.js.map +1 -1
  9. package/dist/lib/server-api.js.map +1 -1
  10. package/dist/utils/phone-helpers.js +26 -0
  11. package/dist/utils/phone-helpers.js.map +1 -0
  12. package/package.json +5 -2
  13. package/src/design_system/components/ChatWidget.tsx +51 -34
  14. package/src/design_system/components/DynamicFormFields.tsx +1 -24
  15. package/src/design_system/elements/modal/modal.tsx +54 -35
  16. package/src/design_system/portal/LoginForm.tsx +339 -0
  17. package/src/design_system/portal/LoginModalController.tsx +63 -0
  18. package/src/design_system/portal/LogoutButton.tsx +23 -0
  19. package/src/design_system/portal/MessageComposer.tsx +84 -0
  20. package/src/design_system/portal/PortalPage.tsx +754 -0
  21. package/src/design_system/portal/RowThumbnail.tsx +76 -0
  22. package/src/design_system/portal/actions.ts +160 -0
  23. package/src/design_system/portal/index.ts +5 -0
  24. package/src/design_system/sections/index.tsx +1 -1
  25. package/src/design_system/sections/service-menu-section.tsx +7 -108
  26. package/src/lib/actions.ts +51 -115
  27. package/src/lib/consumer-session.ts +74 -0
  28. package/src/lib/hooks/index.ts +2 -0
  29. package/src/lib/hooks/use-image-cycle.ts +105 -0
  30. package/src/lib/server-api.ts +7 -6
  31. package/src/next/routes/chat.ts +30 -58
  32. package/src/next/routes/consumer-auth.ts +113 -0
  33. package/src/types/api/consumer.ts +39 -0
  34. package/src/types/api/offer.ts +1 -1
  35. package/src/types/api/package.ts +20 -0
  36. package/src/types/api/service.ts +6 -24
  37. package/src/types/index.ts +2 -0
  38. package/src/utils/phone-helpers.ts +27 -0
  39. package/dist/blog-post-DGjaJ3wf.d.ts +0 -50
  40. package/dist/contexts/index.d.ts +0 -13
  41. package/dist/design_system/elements/index.d.ts +0 -372
  42. package/dist/design_system/logo/keystone-logo.d.ts +0 -6
  43. package/dist/design_system/sections/index.d.ts +0 -237
  44. package/dist/form-CpsCONG5.d.ts +0 -151
  45. package/dist/index.d.ts +0 -76
  46. package/dist/lib/component-registry.d.ts +0 -13
  47. package/dist/lib/hooks/index.d.ts +0 -64
  48. package/dist/lib/server-api.d.ts +0 -43
  49. package/dist/themes/index.d.ts +0 -16
  50. package/dist/types/index.d.ts +0 -264
  51. package/dist/utils/cx.d.ts +0 -15
  52. package/dist/utils/gradient-placeholder.d.ts +0 -8
  53. package/dist/utils/is-react-component.d.ts +0 -21
  54. package/dist/utils/markdown-toc.d.ts +0 -14
  55. package/dist/utils/photo-helpers.d.ts +0 -37
  56. package/dist/website-photos-Bm-CBK9g.d.ts +0 -47
@@ -1,14 +0,0 @@
1
- /**
2
- * Utility functions for extracting table of contents from markdown
3
- */
4
- interface TableOfContentsItem {
5
- id: string;
6
- title: string;
7
- level: number;
8
- }
9
- /**
10
- * Extract headings from markdown content and generate table of contents
11
- */
12
- declare function extractTableOfContents(markdown: string): TableOfContentsItem[];
13
-
14
- export { type TableOfContentsItem, extractTableOfContents };
@@ -1,37 +0,0 @@
1
- import { P as PhotoAttachment, W as WebsitePhotos } from '../website-photos-Bm-CBK9g.js';
2
-
3
- /**
4
- * Helper functions for extracting photo URLs from photo associations
5
- */
6
-
7
- /**
8
- * True if the URL looks like a video by path extension. Used to avoid using video URLs in img src.
9
- */
10
- declare function isVideoUrl(url: string | null | undefined): boolean;
11
- /**
12
- * Get the best available photo URL from a photos array
13
- * Priority: featured photo > first photo > fallback
14
- */
15
- declare function getPhotoUrl(photos?: PhotoAttachment[]): string | null;
16
- /**
17
- * Get avatar URL for team members or authors.
18
- * Returns a URL only when there is a real photo in attachments; otherwise null.
19
- * Callers should use PhotoWithFallback (gradient fallback) or Avatar with initials when null.
20
- */
21
- /** Optional fallbackId/name reserved for future use (e.g. deterministic fallback). */
22
- declare function getAvatarUrl(photos?: PhotoAttachment[], _fallbackId?: number | string, _name?: string): string | null;
23
- /**
24
- * Get featured image URL for blog posts
25
- */
26
- declare function getFeaturedImageUrl(photos?: PhotoAttachment[]): string | null;
27
- /**
28
- * Get logo URL from website_photos API (which aggregates from account_photos)
29
- *
30
- * The website_photos API endpoint returns logos from account_photos with photo_type: 'logo',
31
- * with industry fallback. This is the primary and only source for logos.
32
- *
33
- * Returns undefined if no logo is available (for PhotoWithFallback gradient fallback)
34
- */
35
- declare function getLogoUrl(websitePhotos?: WebsitePhotos | null): string | undefined;
36
-
37
- export { PhotoAttachment, getAvatarUrl, getFeaturedImageUrl, getLogoUrl, getPhotoUrl, isVideoUrl };
@@ -1,47 +0,0 @@
1
- /**
2
- * Photo and PhotoAttachment type definitions
3
- */
4
- interface Photo {
5
- id?: number;
6
- title?: string;
7
- description?: string;
8
- alt_text?: string;
9
- thumbnail_url?: string;
10
- medium_url?: string;
11
- large_url?: string;
12
- original_url?: string;
13
- generated?: boolean;
14
- created_at?: string;
15
- updated_at?: string;
16
- }
17
- interface PhotoAttachment {
18
- id: number;
19
- /** May be omitted in some API responses. */
20
- photo?: Photo;
21
- featured?: boolean;
22
- sort_order?: number;
23
- created_at?: string;
24
- updated_at?: string;
25
- }
26
-
27
- interface WebsitePhoto {
28
- id: number;
29
- url: string;
30
- thumbnail_url?: string;
31
- medium_url?: string;
32
- alt: string;
33
- source: 'account' | 'industry';
34
- }
35
- interface WebsitePhotos {
36
- logo?: WebsitePhoto | null;
37
- favicon?: WebsitePhoto | null;
38
- hero?: WebsitePhoto | null;
39
- contact?: WebsitePhoto | null;
40
- about?: WebsitePhoto | null;
41
- careers?: WebsitePhoto | null;
42
- preview_image?: WebsitePhoto | null;
43
- stock_photos?: WebsitePhoto[];
44
- }
45
- type WebsitePhotosResponse = WebsitePhotos;
46
-
47
- export type { PhotoAttachment as P, WebsitePhotos as W, Photo as a, WebsitePhoto as b, WebsitePhotosResponse as c };