@nectary/assets 3.0.1 → 3.1.1

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 (59) hide show
  1. package/bundle.ts +1 -0
  2. package/logo/email-on-acid-icon/global/index.d.ts +9 -0
  3. package/logo/email-on-acid-icon/index.d.ts +9 -0
  4. package/logo/email-on-acid-icon-wordmark/global/index.d.ts +9 -0
  5. package/logo/email-on-acid-icon-wordmark/index.d.ts +9 -0
  6. package/logo/engage-icon/global/index.d.ts +9 -0
  7. package/logo/engage-icon/index.d.ts +9 -0
  8. package/logo/engage-icon-wordmark/global/index.d.ts +9 -0
  9. package/logo/engage-icon-wordmark/index.d.ts +9 -0
  10. package/logo/mailgun-icon/global/index.d.ts +9 -0
  11. package/logo/mailgun-icon/index.d.ts +9 -0
  12. package/logo/mailgun-icon-wordmark/global/index.d.ts +9 -0
  13. package/logo/mailgun-icon-wordmark/index.d.ts +9 -0
  14. package/logo/mailjet-icon/global/index.d.ts +9 -0
  15. package/logo/mailjet-icon/index.d.ts +9 -0
  16. package/logo/mailjet-icon-wordmark/global/index.d.ts +9 -0
  17. package/logo/mailjet-icon-wordmark/index.d.ts +9 -0
  18. package/logo/message-media-icon/global/index.d.ts +9 -0
  19. package/logo/message-media-icon/index.d.ts +9 -0
  20. package/logo/message-media-icon-wordmark/global/index.d.ts +9 -0
  21. package/logo/message-media-icon-wordmark/index.d.ts +9 -0
  22. package/logo/portal-build-icon/global/index.d.ts +9 -0
  23. package/logo/portal-build-icon/index.d.ts +9 -0
  24. package/logo/portal-build-icon-wordmark/global/index.d.ts +9 -0
  25. package/logo/portal-build-icon-wordmark/index.d.ts +9 -0
  26. package/logo/portal-connect-icon/global/index.d.ts +9 -0
  27. package/logo/portal-connect-icon/index.d.ts +9 -0
  28. package/logo/portal-connect-icon-wordmark/global/index.d.ts +9 -0
  29. package/logo/portal-connect-icon-wordmark/index.d.ts +9 -0
  30. package/logo/portal-engage-icon/global/index.d.ts +9 -0
  31. package/logo/portal-engage-icon/index.d.ts +9 -0
  32. package/logo/portal-engage-icon-wordmark/global/index.d.ts +9 -0
  33. package/logo/portal-engage-icon-wordmark/index.d.ts +9 -0
  34. package/logo/portal-mailgun-icon/global/index.d.ts +9 -0
  35. package/logo/portal-mailgun-icon/index.d.ts +9 -0
  36. package/logo/portal-mailgun-icon-wordmark/global/index.d.ts +9 -0
  37. package/logo/portal-mailgun-icon-wordmark/index.d.ts +9 -0
  38. package/logo/portal-mailjet-icon/global/index.d.ts +9 -0
  39. package/logo/portal-mailjet-icon/index.d.ts +9 -0
  40. package/logo/portal-mailjet-icon-wordmark/global/index.d.ts +9 -0
  41. package/logo/portal-mailjet-icon-wordmark/index.d.ts +9 -0
  42. package/logo/portal-message-media-icon/global/index.d.ts +9 -0
  43. package/logo/portal-message-media-icon/index.d.ts +9 -0
  44. package/logo/portal-message-media-icon-wordmark/global/index.d.ts +9 -0
  45. package/logo/portal-message-media-icon-wordmark/index.d.ts +9 -0
  46. package/logo/portal-sinch-account-icon-wordmark/global/index.d.ts +9 -0
  47. package/logo/portal-sinch-account-icon-wordmark/index.d.ts +9 -0
  48. package/logo/portal-sinch-id-icon-wordmark/global/index.d.ts +9 -0
  49. package/logo/portal-sinch-id-icon-wordmark/index.d.ts +9 -0
  50. package/logo/simple-texting-icon/global/index.d.ts +9 -0
  51. package/logo/simple-texting-icon/index.d.ts +9 -0
  52. package/logo/simple-texting-icon-wordmark/global/index.d.ts +9 -0
  53. package/logo/simple-texting-icon-wordmark/index.d.ts +9 -0
  54. package/package.json +1 -1
  55. package/utils/global-assets-manager.d.ts +1 -0
  56. package/utils/shared/global-elements-manager.d.ts +1 -0
  57. package/utils/shared/global-elements-manager.js +32 -24
  58. package/utils/shared/global-elements-store.d.ts +5 -1
  59. package/utils/shared/global-elements-store.js +9 -1
package/bundle.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  // Reminder: Keep this list updated as we add new assets
2
+
2
3
  // Icons Branded
3
4
  export { IconBranded5gReadiness } from './icons-branded/5g-readiness'
4
5
  export { IconBrandedAbcd } from './icons-branded/abcd'
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-email-on-acid-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-email-on-acid-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-email-on-acid-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-email-on-acid-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-engage-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-engage-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-engage-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-engage-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-mailgun-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-mailgun-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-mailgun-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-mailgun-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-mailjet-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-mailjet-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-mailjet-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-mailjet-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-message-media-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-message-media-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-message-media-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-message-media-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-build-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-build-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-build-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-build-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-connect-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-connect-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-connect-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-connect-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-engage-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-engage-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-engage-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-engage-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-mailgun-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-mailgun-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-mailgun-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-mailgun-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-mailjet-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-mailjet-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-mailjet-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-mailjet-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-message-media-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-message-media-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-message-media-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-message-media-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-sinch-account-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-sinch-account-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-portal-sinch-id-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-portal-sinch-id-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-simple-texting-icon': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-simple-texting-icon': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
@@ -19,3 +19,12 @@ declare global {
19
19
  };
20
20
  }
21
21
  }
22
+ declare module 'react' {
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-logo-simple-texting-icon-wordmark': TSinchLogoReact & {
26
+ colored?: boolean;
27
+ };
28
+ }
29
+ }
30
+ }
@@ -20,3 +20,12 @@ declare global {
20
20
  };
21
21
  }
22
22
  }
23
+ declare module 'react' {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ 'sinch-logo-simple-texting-icon-wordmark': TSinchLogoReact & {
27
+ colored?: boolean;
28
+ };
29
+ }
30
+ }
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/assets",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "files": [
5
5
  "**/*/*.css",
6
6
  "**/*/*.json",
@@ -58,6 +58,7 @@ declare abstract class GlobalElementsManager {
58
58
  private createLoader;
59
59
  private preloadBundle;
60
60
  init(options?: GlobalManagerInitOptions): Promise<void>;
61
+ whenLoaded(): Promise<void>;
61
62
  private getImportPathFromName;
62
63
  preload(name: SinchElementName | SinchElementName[] | "all"): Promise<void>;
63
64
  }
@@ -56,6 +56,7 @@ export declare abstract class GlobalElementsManager {
56
56
  private createLoader;
57
57
  private preloadBundle;
58
58
  init(options?: GlobalManagerInitOptions): Promise<void>;
59
+ whenLoaded(): Promise<void>;
59
60
  private getImportPathFromName;
60
61
  preload(name: SinchElementName | SinchElementName[] | 'all'): Promise<void>;
61
62
  }
@@ -109,31 +109,39 @@ class GlobalElementsManager {
109
109
  store.preload = options.preload ?? false;
110
110
  store.patchPerviousVersions = options.patchPerviousVersions ?? true;
111
111
  store.useFallbackExclusively = options.useFallbackExclusively ?? false;
112
- if (store.preload) {
113
- const version = options.targetlibVersion;
114
- store.targetlibVersion = version ?? store.targetlibVersion;
115
- const importPath = version != null ? `${this.config.cdnUrl}@${version}/es2022/bundle.mjs` : `${this.config.cdnUrl}/bundle`;
116
- await this.preloadBundle(importPath, options.fallbackLoaderBundle, store.useFallbackExclusively);
117
- return;
118
- }
119
- if (store.patchPerviousVersions) {
120
- this.patchCustomElements();
121
- }
122
- this.config.baseElementNames.forEach((name) => {
123
- const importPath = `${this.config.cdnUrl}/${this.getImportPathFromName(name)}`;
124
- store.definitions.set(`sinch-${name}`, this.createLoader(importPath, name, options.fallbackLoader, store.useFallbackExclusively));
125
- });
126
- if (options.targetlibVersion != null) {
127
- store.targetlibVersion = options.targetlibVersion;
128
- } else {
129
- const registry = await fetch(`${this.config.registryUrl}/latest`);
130
- const registryData = await registry.json();
131
- store.targetlibVersion = registryData.version;
112
+ try {
113
+ if (store.preload) {
114
+ const version = options.targetlibVersion;
115
+ store.targetlibVersion = version ?? store.targetlibVersion;
116
+ const importPath = version != null ? `${this.config.cdnUrl}@${version}/es2022/bundle.mjs` : `${this.config.cdnUrl}/bundle`;
117
+ await this.preloadBundle(importPath, options.fallbackLoaderBundle, store.useFallbackExclusively);
118
+ } else {
119
+ if (store.patchPerviousVersions) {
120
+ this.patchCustomElements();
121
+ }
122
+ this.config.baseElementNames.forEach((name) => {
123
+ const importPath = `${this.config.cdnUrl}/${this.getImportPathFromName(name)}`;
124
+ store.definitions.set(`sinch-${name}`, this.createLoader(importPath, name, options.fallbackLoader, store.useFallbackExclusively));
125
+ });
126
+ if (options.targetlibVersion != null) {
127
+ store.targetlibVersion = options.targetlibVersion;
128
+ } else {
129
+ const registry = await fetch(`${this.config.registryUrl}/latest`);
130
+ const registryData = await registry.json();
131
+ store.targetlibVersion = registryData.version;
132
+ }
133
+ this.config.baseElementNames.forEach((name) => {
134
+ const importPath = `${this.config.cdnUrl}@${store.targetlibVersion}/es2022/${this.getImportPathFromName(name)}.mjs`;
135
+ store.definitions.set(`sinch-${name}`, this.createLoader(importPath, name, options.fallbackLoader, store.useFallbackExclusively));
136
+ });
137
+ }
138
+ } finally {
139
+ store.loadPromise.resolve();
132
140
  }
133
- this.config.baseElementNames.forEach((name) => {
134
- const importPath = `${this.config.cdnUrl}@${store.targetlibVersion}/es2022/${this.getImportPathFromName(name)}.mjs`;
135
- store.definitions.set(`sinch-${name}`, this.createLoader(importPath, name, options.fallbackLoader, store.useFallbackExclusively));
136
- });
141
+ }
142
+ whenLoaded() {
143
+ const store = getStore(this.config.storeKey);
144
+ return store.loadPromise.promise;
137
145
  }
138
146
  getImportPathFromName(name) {
139
147
  for (const [key, value] of this.config.nameToPathMap ?? []) {
@@ -1,11 +1,15 @@
1
1
  import type { SinchElementName } from './nectary-element-base';
2
2
  interface GlobalStore {
3
+ definitions: Map<SinchElementName, () => Promise<any>>;
3
4
  hasInitialized: boolean;
4
5
  targetlibVersion: string;
5
6
  patchPerviousVersions: boolean;
6
7
  useFallbackExclusively: boolean;
7
8
  preload: boolean;
8
- definitions: Map<SinchElementName, () => Promise<any>>;
9
+ loadPromise: {
10
+ promise: Promise<void>;
11
+ resolve: (value: void) => void;
12
+ };
9
13
  }
10
14
  export declare const getStore: (storeKey: symbol) => GlobalStore;
11
15
  export declare const getConstructor: (storeKey: symbol, name: SinchElementName) => Promise<CustomElementConstructor> | null;
@@ -1,14 +1,22 @@
1
+ const createDeferredPromise = () => {
2
+ let resolve;
3
+ const promise = new Promise((r) => {
4
+ resolve = r;
5
+ });
6
+ return { promise, resolve };
7
+ };
1
8
  const getStore = (storeKey) => {
2
9
  if (window[storeKey] != null) {
3
10
  return window[storeKey];
4
11
  }
5
12
  const store = {
13
+ definitions: /* @__PURE__ */ new Map(),
6
14
  hasInitialized: false,
7
15
  targetlibVersion: "",
8
16
  patchPerviousVersions: false,
9
17
  useFallbackExclusively: false,
10
18
  preload: false,
11
- definitions: /* @__PURE__ */ new Map()
19
+ loadPromise: createDeferredPromise()
12
20
  };
13
21
  Object.defineProperty(window, storeKey, {
14
22
  value: store,