keystone-design-bootstrap 1.0.99 → 1.0.101

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 (63) hide show
  1. package/README.md +4 -0
  2. package/package.json +1 -1
  3. package/src/next/routes/consumer-auth.ts +11 -3
  4. package/src/tracking/PostHogProvider.tsx +40 -1
  5. package/dist/blog-post-vWzW8yFb.d.ts +0 -50
  6. package/dist/contexts/index.d.ts +0 -13
  7. package/dist/contexts/index.js +0 -173
  8. package/dist/contexts/index.js.map +0 -1
  9. package/dist/design_system/components/DynamicFormFields.d.ts +0 -15
  10. package/dist/design_system/components/DynamicFormFields.js +0 -5176
  11. package/dist/design_system/components/DynamicFormFields.js.map +0 -1
  12. package/dist/design_system/elements/index.d.ts +0 -383
  13. package/dist/design_system/elements/index.js +0 -4007
  14. package/dist/design_system/elements/index.js.map +0 -1
  15. package/dist/design_system/logo/keystone-logo.d.ts +0 -6
  16. package/dist/design_system/logo/keystone-logo.js +0 -145
  17. package/dist/design_system/logo/keystone-logo.js.map +0 -1
  18. package/dist/design_system/sections/index.d.ts +0 -233
  19. package/dist/design_system/sections/index.js +0 -20048
  20. package/dist/design_system/sections/index.js.map +0 -1
  21. package/dist/form-C94A_PX_.d.ts +0 -36
  22. package/dist/index.d.ts +0 -70
  23. package/dist/index.js +0 -20608
  24. package/dist/index.js.map +0 -1
  25. package/dist/lib/component-registry.d.ts +0 -13
  26. package/dist/lib/component-registry.js +0 -36
  27. package/dist/lib/component-registry.js.map +0 -1
  28. package/dist/lib/hooks/index.d.ts +0 -83
  29. package/dist/lib/hooks/index.js +0 -182
  30. package/dist/lib/hooks/index.js.map +0 -1
  31. package/dist/lib/server-api.d.ts +0 -67
  32. package/dist/lib/server-api.js +0 -195
  33. package/dist/lib/server-api.js.map +0 -1
  34. package/dist/package-DeHKpQp7.d.ts +0 -121
  35. package/dist/photos-CmBdWiuZ.d.ts +0 -27
  36. package/dist/themes/index.d.ts +0 -17
  37. package/dist/themes/index.js +0 -29
  38. package/dist/themes/index.js.map +0 -1
  39. package/dist/tracking/index.d.ts +0 -254
  40. package/dist/tracking/index.js +0 -550
  41. package/dist/tracking/index.js.map +0 -1
  42. package/dist/types/index.d.ts +0 -313
  43. package/dist/types/index.js +0 -1
  44. package/dist/types/index.js.map +0 -1
  45. package/dist/utils/cx.d.ts +0 -15
  46. package/dist/utils/cx.js +0 -18
  47. package/dist/utils/cx.js.map +0 -1
  48. package/dist/utils/gradient-placeholder.d.ts +0 -7
  49. package/dist/utils/gradient-placeholder.js +0 -59
  50. package/dist/utils/gradient-placeholder.js.map +0 -1
  51. package/dist/utils/is-react-component.d.ts +0 -21
  52. package/dist/utils/is-react-component.js +0 -20
  53. package/dist/utils/is-react-component.js.map +0 -1
  54. package/dist/utils/markdown-toc.d.ts +0 -14
  55. package/dist/utils/markdown-toc.js +0 -29
  56. package/dist/utils/markdown-toc.js.map +0 -1
  57. package/dist/utils/phone-helpers.d.ts +0 -24
  58. package/dist/utils/phone-helpers.js +0 -26
  59. package/dist/utils/phone-helpers.js.map +0 -1
  60. package/dist/utils/photo-helpers.d.ts +0 -38
  61. package/dist/utils/photo-helpers.js +0 -41
  62. package/dist/utils/photo-helpers.js.map +0 -1
  63. package/dist/website-photos-Cl1YqAno.d.ts +0 -21
@@ -1,41 +0,0 @@
1
- // src/utils/photo-helpers.ts
2
- var VIDEO_EXTENSIONS = [".mp4", ".mov", ".webm", ".m4v", ".avi", ".mkv", ".flv", ".wmv"];
3
- function isVideoUrl(url) {
4
- var _a;
5
- if (!url || typeof url !== "string") return false;
6
- const path = (_a = url.split("?")[0]) != null ? _a : "";
7
- const ext = path.slice(path.lastIndexOf(".")).toLowerCase();
8
- return VIDEO_EXTENSIONS.includes(ext);
9
- }
10
- function getPhotoUrl(photos) {
11
- if (photos && photos.length > 0) {
12
- const featuredPhoto = photos.find((pa) => pa.featured);
13
- const photoToUse = featuredPhoto || photos[0];
14
- const photo = photoToUse.photo;
15
- if (photo) {
16
- return photo.large_url || photo.medium_url || photo.thumbnail_url || photo.original_url || null;
17
- }
18
- }
19
- return null;
20
- }
21
- function getAvatarUrl(photos, _fallbackId, _name) {
22
- return getPhotoUrl(photos);
23
- }
24
- function getFeaturedImageUrl(photos) {
25
- return getPhotoUrl(photos);
26
- }
27
- function getLogoUrl(websitePhotos) {
28
- var _a;
29
- if ((_a = websitePhotos == null ? void 0 : websitePhotos.logo) == null ? void 0 : _a.url) {
30
- return websitePhotos.logo.url;
31
- }
32
- return void 0;
33
- }
34
- export {
35
- getAvatarUrl,
36
- getFeaturedImageUrl,
37
- getLogoUrl,
38
- getPhotoUrl,
39
- isVideoUrl
40
- };
41
- //# sourceMappingURL=photo-helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/photo-helpers.ts"],"sourcesContent":["/**\n * Helper functions for extracting photo URLs from photo associations\n */\n\nimport type { PhotoAttachment } from '../types/api/photos';\nimport type { WebsitePhotos } from '../types/api/website-photos';\n\nexport type { PhotoAttachment } from '../types/api/photos';\n\n/** Video file extensions treated as video (match backend ExternalPhotoService.video_url?) */\nconst VIDEO_EXTENSIONS = ['.mp4', '.mov', '.webm', '.m4v', '.avi', '.mkv', '.flv', '.wmv'];\n\n/**\n * True if the URL looks like a video by path extension. Used to avoid using video URLs in img src.\n */\nexport function isVideoUrl(url: string | null | undefined): boolean {\n if (!url || typeof url !== 'string') return false;\n const path = url.split('?')[0] ?? '';\n const ext = path.slice(path.lastIndexOf('.')).toLowerCase();\n return VIDEO_EXTENSIONS.includes(ext);\n}\n\n/**\n * Get the best available photo URL from a photos array\n * Priority: featured photo > first photo > fallback\n */\nexport function getPhotoUrl(\n photos?: PhotoAttachment[]\n): string | null {\n // Priority 1: Featured photo from photos array\n if (photos && photos.length > 0) {\n const featuredPhoto = photos.find(pa => pa.featured);\n const photoToUse = featuredPhoto || photos[0];\n const photo = photoToUse.photo;\n \n if (photo) {\n return photo.large_url || photo.medium_url || photo.thumbnail_url || photo.original_url || null;\n }\n }\n \n // Fallback (gradient or null)\n return null;\n}\n\n/**\n * Get avatar URL for team members or authors.\n * Returns a URL only when there is a real photo in attachments; otherwise null.\n * Callers should use PhotoWithFallback (gradient fallback) or Avatar with initials when null.\n */\n/** Optional fallbackId/name reserved for future use (e.g. deterministic fallback). */\n/* eslint-disable @typescript-eslint/no-unused-vars -- _fallbackId, _name reserved for API */\nexport function getAvatarUrl(\n photos?: PhotoAttachment[],\n _fallbackId?: number | string,\n _name?: string\n): string | null {\n return getPhotoUrl(photos);\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/**\n * Get featured image URL for blog posts\n */\nexport function getFeaturedImageUrl(\n photos?: PhotoAttachment[]\n): string | null {\n return getPhotoUrl(photos);\n}\n\n/**\n * Get logo URL from website_photos API (which aggregates from account_photos)\n * \n * The website_photos API endpoint returns logos from account_photos with photo_type: 'logo',\n * with industry fallback. This is the primary and only source for logos.\n * \n * Returns undefined if no logo is available (for PhotoWithFallback gradient fallback)\n */\nexport function getLogoUrl(\n websitePhotos?: WebsitePhotos | null\n): string | undefined {\n if (websitePhotos?.logo?.url) {\n return websitePhotos.logo.url;\n }\n \n return undefined;\n}\n\n"],"mappings":";AAUA,IAAM,mBAAmB,CAAC,QAAQ,QAAQ,SAAS,QAAQ,QAAQ,QAAQ,QAAQ,MAAM;AAKlF,SAAS,WAAW,KAAyC;AAfpE;AAgBE,MAAI,CAAC,OAAO,OAAO,QAAQ,SAAU,QAAO;AAC5C,QAAM,QAAO,SAAI,MAAM,GAAG,EAAE,CAAC,MAAhB,YAAqB;AAClC,QAAM,MAAM,KAAK,MAAM,KAAK,YAAY,GAAG,CAAC,EAAE,YAAY;AAC1D,SAAO,iBAAiB,SAAS,GAAG;AACtC;AAMO,SAAS,YACd,QACe;AAEf,MAAI,UAAU,OAAO,SAAS,GAAG;AAC/B,UAAM,gBAAgB,OAAO,KAAK,QAAM,GAAG,QAAQ;AACnD,UAAM,aAAa,iBAAiB,OAAO,CAAC;AAC5C,UAAM,QAAQ,WAAW;AAEzB,QAAI,OAAO;AACT,aAAO,MAAM,aAAa,MAAM,cAAc,MAAM,iBAAiB,MAAM,gBAAgB;AAAA,IAC7F;AAAA,EACF;AAGA,SAAO;AACT;AASO,SAAS,aACd,QACA,aACA,OACe;AACf,SAAO,YAAY,MAAM;AAC3B;AAMO,SAAS,oBACd,QACe;AACf,SAAO,YAAY,MAAM;AAC3B;AAUO,SAAS,WACd,eACoB;AA/EtB;AAgFE,OAAI,oDAAe,SAAf,mBAAqB,KAAK;AAC5B,WAAO,cAAc,KAAK;AAAA,EAC5B;AAEA,SAAO;AACT;","names":[]}
@@ -1,21 +0,0 @@
1
- interface WebsitePhoto {
2
- id: number;
3
- url: string;
4
- thumbnail_url?: string;
5
- medium_url?: string;
6
- alt: string;
7
- source: 'account' | 'industry';
8
- }
9
- interface WebsitePhotos {
10
- logo?: WebsitePhoto | null;
11
- favicon?: WebsitePhoto | null;
12
- hero?: WebsitePhoto | null;
13
- contact?: WebsitePhoto | null;
14
- about?: WebsitePhoto | null;
15
- careers?: WebsitePhoto | null;
16
- preview_image?: WebsitePhoto | null;
17
- stock_photos?: WebsitePhoto[];
18
- }
19
- type WebsitePhotosResponse = WebsitePhotos;
20
-
21
- export type { WebsitePhotos as W, WebsitePhoto as a, WebsitePhotosResponse as b };