@datlv-trustshop/shopify-inapp-components 0.2.7 → 0.2.9

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 (226) hide show
  1. package/dist/components/AppList.d.ts +1 -0
  2. package/dist/components/AppList.d.ts.map +1 -0
  3. package/dist/components/AppList.js +1 -0
  4. package/dist/components/AppList.js.map +1 -0
  5. package/dist/components/ArticleList.d.ts +1 -0
  6. package/dist/components/ArticleList.d.ts.map +1 -0
  7. package/dist/components/ArticleList.js +1 -0
  8. package/dist/components/ArticleList.js.map +1 -0
  9. package/dist/components/ArticleSlide.d.ts +1 -0
  10. package/dist/components/ArticleSlide.d.ts.map +1 -0
  11. package/dist/components/ArticleSlide.js +1 -0
  12. package/dist/components/ArticleSlide.js.map +1 -0
  13. package/dist/components/FloatingCard.d.ts +1 -0
  14. package/dist/components/FloatingCard.d.ts.map +1 -0
  15. package/dist/components/FloatingCard.js +5 -4
  16. package/dist/components/FloatingCard.js.map +1 -0
  17. package/dist/components/FooterBanner.d.ts +1 -0
  18. package/dist/components/FooterBanner.d.ts.map +1 -0
  19. package/dist/components/FooterBanner.js +1 -0
  20. package/dist/components/FooterBanner.js.map +1 -0
  21. package/dist/components/GrowApps.d.ts +6 -6
  22. package/dist/components/GrowApps.d.ts.map +1 -0
  23. package/dist/components/GrowApps.js +11 -3
  24. package/dist/components/GrowApps.js.map +1 -0
  25. package/dist/components/ImageLoading.d.ts +1 -0
  26. package/dist/components/ImageLoading.d.ts.map +1 -0
  27. package/dist/components/ImageLoading.js +1 -0
  28. package/dist/components/ImageLoading.js.map +1 -0
  29. package/dist/components/PartnerIntegration.d.ts +8 -8
  30. package/dist/components/PartnerIntegration.d.ts.map +1 -0
  31. package/dist/components/PartnerIntegration.js +15 -76
  32. package/dist/components/PartnerIntegration.js.map +1 -0
  33. package/dist/components/PartnerList.d.ts +1 -0
  34. package/dist/components/PartnerList.d.ts.map +1 -0
  35. package/dist/components/PartnerList.js +1 -0
  36. package/dist/components/PartnerList.js.map +1 -0
  37. package/dist/components/PopupBanner.d.ts +4 -4
  38. package/dist/components/PopupBanner.d.ts.map +1 -0
  39. package/dist/components/PopupBanner.js +5 -1
  40. package/dist/components/PopupBanner.js.map +1 -0
  41. package/dist/components/TopBanner.d.ts +7 -7
  42. package/dist/components/TopBanner.d.ts.map +1 -0
  43. package/dist/components/TopBanner.js +40 -31
  44. package/dist/components/TopBanner.js.map +1 -0
  45. package/dist/components/WhatsNew.d.ts +6 -7
  46. package/dist/components/WhatsNew.d.ts.map +1 -0
  47. package/dist/components/WhatsNew.js +23 -25
  48. package/dist/components/WhatsNew.js.map +1 -0
  49. package/dist/components/index.d.ts +1 -0
  50. package/dist/components/index.d.ts.map +1 -0
  51. package/dist/components/index.js +1 -0
  52. package/dist/components/index.js.map +1 -0
  53. package/dist/components/inlineStyles.d.ts +1 -0
  54. package/dist/components/inlineStyles.d.ts.map +1 -0
  55. package/dist/components/inlineStyles.js +1 -0
  56. package/dist/components/inlineStyles.js.map +1 -0
  57. package/dist/components/styles.d.ts +1 -0
  58. package/dist/components/styles.d.ts.map +1 -0
  59. package/dist/components/styles.js +1 -0
  60. package/dist/components/styles.js.map +1 -0
  61. package/dist/config/component-defaults.d.ts +71 -0
  62. package/dist/config/component-defaults.d.ts.map +1 -0
  63. package/dist/config/component-defaults.js +106 -0
  64. package/dist/config/component-defaults.js.map +1 -0
  65. package/dist/config/internal-config.d.ts +28 -0
  66. package/dist/config/internal-config.d.ts.map +1 -0
  67. package/dist/config/internal-config.js +100 -0
  68. package/dist/config/internal-config.js.map +1 -0
  69. package/dist/core/SDKManager.d.ts +230 -0
  70. package/dist/core/SDKManager.d.ts.map +1 -0
  71. package/dist/core/SDKManager.js +380 -0
  72. package/dist/core/SDKManager.js.map +1 -0
  73. package/dist/core/adapter.d.ts +1 -0
  74. package/dist/core/adapter.d.ts.map +1 -0
  75. package/dist/core/adapter.js +1 -0
  76. package/dist/core/adapter.js.map +1 -0
  77. package/dist/core/engine.d.ts +1 -0
  78. package/dist/core/engine.d.ts.map +1 -0
  79. package/dist/core/engine.js +1 -0
  80. package/dist/core/engine.js.map +1 -0
  81. package/dist/core/fetcher.d.ts +1 -0
  82. package/dist/core/fetcher.d.ts.map +1 -0
  83. package/dist/core/fetcher.js +1 -0
  84. package/dist/core/fetcher.js.map +1 -0
  85. package/dist/core/global-manager.d.ts +1 -0
  86. package/dist/core/global-manager.d.ts.map +1 -0
  87. package/dist/core/global-manager.js +1 -0
  88. package/dist/core/global-manager.js.map +1 -0
  89. package/dist/hooks/index.d.ts +1 -0
  90. package/dist/hooks/index.d.ts.map +1 -0
  91. package/dist/hooks/index.js +1 -0
  92. package/dist/hooks/index.js.map +1 -0
  93. package/dist/hooks/useApps.d.ts +2 -1
  94. package/dist/hooks/useApps.d.ts.map +1 -0
  95. package/dist/hooks/useApps.js +8 -15
  96. package/dist/hooks/useApps.js.map +1 -0
  97. package/dist/hooks/useArticles.d.ts +1 -0
  98. package/dist/hooks/useArticles.d.ts.map +1 -0
  99. package/dist/hooks/useArticles.js +14 -18
  100. package/dist/hooks/useArticles.js.map +1 -0
  101. package/dist/hooks/useBanner.d.ts +2 -1
  102. package/dist/hooks/useBanner.d.ts.map +1 -0
  103. package/dist/hooks/useBanner.js +14 -15
  104. package/dist/hooks/useBanner.js.map +1 -0
  105. package/dist/hooks/useCampaignTracking.d.ts +1 -0
  106. package/dist/hooks/useCampaignTracking.d.ts.map +1 -0
  107. package/dist/hooks/useCampaignTracking.js +1 -0
  108. package/dist/hooks/useCampaignTracking.js.map +1 -0
  109. package/dist/hooks/useDashboard.d.ts +1 -0
  110. package/dist/hooks/useDashboard.d.ts.map +1 -0
  111. package/dist/hooks/useDashboard.js +12 -9
  112. package/dist/hooks/useDashboard.js.map +1 -0
  113. package/dist/hooks/useFloatingCardActions.d.ts +1 -0
  114. package/dist/hooks/useFloatingCardActions.d.ts.map +1 -0
  115. package/dist/hooks/useFloatingCardActions.js +1 -0
  116. package/dist/hooks/useFloatingCardActions.js.map +1 -0
  117. package/dist/hooks/useFloatingCardEngine.d.ts +1 -0
  118. package/dist/hooks/useFloatingCardEngine.d.ts.map +1 -0
  119. package/dist/hooks/useFloatingCardEngine.js +1 -0
  120. package/dist/hooks/useFloatingCardEngine.js.map +1 -0
  121. package/dist/hooks/useFloatingCards.d.ts +3 -2
  122. package/dist/hooks/useFloatingCards.d.ts.map +1 -0
  123. package/dist/hooks/useFloatingCards.js +37 -12
  124. package/dist/hooks/useFloatingCards.js.map +1 -0
  125. package/dist/hooks/useGrowApps.d.ts +1 -0
  126. package/dist/hooks/useGrowApps.d.ts.map +1 -0
  127. package/dist/hooks/useGrowApps.js +1 -0
  128. package/dist/hooks/useGrowApps.js.map +1 -0
  129. package/dist/hooks/usePartnerIntegration.d.ts +5 -4
  130. package/dist/hooks/usePartnerIntegration.d.ts.map +1 -0
  131. package/dist/hooks/usePartnerIntegration.js +10 -38
  132. package/dist/hooks/usePartnerIntegration.js.map +1 -0
  133. package/dist/hooks/useTranslations.d.ts +1 -0
  134. package/dist/hooks/useTranslations.d.ts.map +1 -0
  135. package/dist/hooks/useTranslations.js +5 -3
  136. package/dist/hooks/useTranslations.js.map +1 -0
  137. package/dist/hooks/useWhatsNew.d.ts +1 -0
  138. package/dist/hooks/useWhatsNew.d.ts.map +1 -0
  139. package/dist/hooks/useWhatsNew.js +12 -11
  140. package/dist/hooks/useWhatsNew.js.map +1 -0
  141. package/dist/index.d.ts +38 -22
  142. package/dist/index.d.ts.map +1 -0
  143. package/dist/index.js +76 -22
  144. package/dist/index.js.map +1 -0
  145. package/dist/translations/default.d.ts +1 -0
  146. package/dist/translations/default.d.ts.map +1 -0
  147. package/dist/translations/default.js +1 -0
  148. package/dist/translations/default.js.map +1 -0
  149. package/dist/translations/locales/cn.json +39 -0
  150. package/dist/translations/locales/de.json +39 -0
  151. package/dist/translations/locales/dk.json +39 -0
  152. package/dist/translations/locales/en.json +39 -0
  153. package/dist/translations/locales/es.json +39 -0
  154. package/dist/translations/locales/fr.json +39 -0
  155. package/dist/translations/locales/ie.json +39 -0
  156. package/dist/translations/locales/in.json +39 -0
  157. package/dist/translations/locales/it.json +39 -0
  158. package/dist/translations/locales/jp.json +39 -0
  159. package/dist/translations/locales/nl.json +39 -0
  160. package/dist/translations/locales/nz.json +39 -0
  161. package/dist/translations/locales/pt.json +39 -0
  162. package/dist/translations/locales/se.json +39 -0
  163. package/dist/translations/locales/vi.json +39 -0
  164. package/dist/translations/translation-manager.d.ts +89 -0
  165. package/dist/translations/translation-manager.d.ts.map +1 -0
  166. package/dist/translations/translation-manager.js +239 -0
  167. package/dist/translations/translation-manager.js.map +1 -0
  168. package/dist/types/app.d.ts +1 -0
  169. package/dist/types/app.d.ts.map +1 -0
  170. package/dist/types/app.js +1 -0
  171. package/dist/types/app.js.map +1 -0
  172. package/dist/types/article.d.ts +1 -0
  173. package/dist/types/article.d.ts.map +1 -0
  174. package/dist/types/article.js +1 -0
  175. package/dist/types/article.js.map +1 -0
  176. package/dist/types/banner.d.ts +1 -0
  177. package/dist/types/banner.d.ts.map +1 -0
  178. package/dist/types/banner.js +1 -0
  179. package/dist/types/banner.js.map +1 -0
  180. package/dist/types/component-props.d.ts +140 -0
  181. package/dist/types/component-props.d.ts.map +1 -0
  182. package/dist/types/component-props.js +6 -0
  183. package/dist/types/component-props.js.map +1 -0
  184. package/dist/types/dashboard.d.ts +1 -0
  185. package/dist/types/dashboard.d.ts.map +1 -0
  186. package/dist/types/dashboard.js +1 -0
  187. package/dist/types/dashboard.js.map +1 -0
  188. package/dist/types/index.d.ts +1 -0
  189. package/dist/types/index.d.ts.map +1 -0
  190. package/dist/types/index.js +1 -0
  191. package/dist/types/index.js.map +1 -0
  192. package/dist/types/integration.d.ts +1 -0
  193. package/dist/types/integration.d.ts.map +1 -0
  194. package/dist/types/integration.js +1 -0
  195. package/dist/types/integration.js.map +1 -0
  196. package/dist/types/partner.d.ts +1 -0
  197. package/dist/types/partner.d.ts.map +1 -0
  198. package/dist/types/partner.js +1 -0
  199. package/dist/types/partner.js.map +1 -0
  200. package/dist/types/product-update.d.ts +1 -0
  201. package/dist/types/product-update.d.ts.map +1 -0
  202. package/dist/types/product-update.js +1 -0
  203. package/dist/types/product-update.js.map +1 -0
  204. package/dist/types/translations.d.ts +1 -0
  205. package/dist/types/translations.d.ts.map +1 -0
  206. package/dist/types/translations.js +1 -0
  207. package/dist/types/translations.js.map +1 -0
  208. package/dist/utils/campaignTracking.d.ts +1 -0
  209. package/dist/utils/campaignTracking.d.ts.map +1 -0
  210. package/dist/utils/campaignTracking.js +1 -0
  211. package/dist/utils/campaignTracking.js.map +1 -0
  212. package/dist/utils/cls-monitor.d.ts +1 -0
  213. package/dist/utils/cls-monitor.d.ts.map +1 -0
  214. package/dist/utils/cls-monitor.js +1 -0
  215. package/dist/utils/cls-monitor.js.map +1 -0
  216. package/dist/utils/injectStyles.d.ts +1 -0
  217. package/dist/utils/injectStyles.d.ts.map +1 -0
  218. package/dist/utils/injectStyles.js +1 -0
  219. package/dist/utils/injectStyles.js.map +1 -0
  220. package/dist/utils/sessionManager.d.ts +1 -0
  221. package/dist/utils/sessionManager.d.ts.map +1 -0
  222. package/dist/utils/sessionManager.js +1 -0
  223. package/dist/utils/sessionManager.js.map +1 -0
  224. package/package.json +4 -3
  225. package/dist/provider/DashboardProvider.d.ts +0 -36
  226. package/dist/provider/DashboardProvider.js +0 -200
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Advanced translation management system for SDK
3
+ * Handles multi-language support with lazy loading and fallback
4
+ */
5
+ // Locale configuration
6
+ export const SUPPORTED_LOCALES = [
7
+ 'cn', 'de', 'dk', 'en', 'es', 'fr', 'ie', 'in',
8
+ 'it', 'jp', 'nl', 'nz', 'pt', 'se', 'vi'
9
+ ];
10
+ export const DEFAULT_LOCALE = 'en';
11
+ // Locale metadata for better UX
12
+ export const LOCALE_METADATA = {
13
+ cn: { name: 'Chinese (Simplified)', nativeName: '中文' },
14
+ de: { name: 'German', nativeName: 'Deutsch' },
15
+ dk: { name: 'Danish', nativeName: 'Dansk' },
16
+ en: { name: 'English', nativeName: 'English' },
17
+ es: { name: 'Spanish', nativeName: 'Español' },
18
+ fr: { name: 'French', nativeName: 'Français' },
19
+ ie: { name: 'Irish', nativeName: 'Gaeilge' },
20
+ in: { name: 'Hindi', nativeName: 'हिन्दी' },
21
+ it: { name: 'Italian', nativeName: 'Italiano' },
22
+ jp: { name: 'Japanese', nativeName: '日本語' },
23
+ nl: { name: 'Dutch', nativeName: 'Nederlands' },
24
+ nz: { name: 'Maori', nativeName: 'Te Reo Māori' },
25
+ pt: { name: 'Portuguese', nativeName: 'Português' },
26
+ se: { name: 'Swedish', nativeName: 'Svenska' },
27
+ vi: { name: 'Vietnamese', nativeName: 'Tiếng Việt' }
28
+ };
29
+ // Translation cache
30
+ const translationCache = new Map();
31
+ const loadingPromises = new Map();
32
+ /**
33
+ * Normalize locale code to supported format
34
+ * Examples: en-US → en, zh-CN → cn, pt-BR → pt
35
+ */
36
+ export const normalizeLocale = (locale) => {
37
+ if (!locale)
38
+ return DEFAULT_LOCALE;
39
+ // Direct match
40
+ if (SUPPORTED_LOCALES.includes(locale)) {
41
+ return locale;
42
+ }
43
+ // Extract base locale (en-US → en)
44
+ const base = locale.split(/[-_]/)[0].toLowerCase();
45
+ // Special mappings
46
+ const mappings = {
47
+ 'zh': 'cn',
48
+ 'da': 'dk',
49
+ 'ga': 'ie',
50
+ 'hi': 'in',
51
+ 'ja': 'jp',
52
+ 'mi': 'nz',
53
+ 'sv': 'se',
54
+ };
55
+ const mapped = mappings[base] || base;
56
+ if (SUPPORTED_LOCALES.includes(mapped)) {
57
+ return mapped;
58
+ }
59
+ return DEFAULT_LOCALE;
60
+ };
61
+ /**
62
+ * Load translations for a specific locale with lazy loading
63
+ */
64
+ export const loadTranslations = async (locale) => {
65
+ const normalizedLocale = normalizeLocale(locale);
66
+ // Return from cache if available
67
+ if (translationCache.has(normalizedLocale)) {
68
+ return translationCache.get(normalizedLocale);
69
+ }
70
+ // Return existing loading promise if in progress
71
+ if (loadingPromises.has(normalizedLocale)) {
72
+ return loadingPromises.get(normalizedLocale);
73
+ }
74
+ // Create loading promise
75
+ const loadingPromise = (async () => {
76
+ try {
77
+ // Dynamic import with webpack chunk names for better debugging
78
+ const module = await import(
79
+ /* webpackChunkName: "locale-[request]" */
80
+ `./locales/${normalizedLocale}.json`);
81
+ const translations = module.default || module;
82
+ translationCache.set(normalizedLocale, translations);
83
+ loadingPromises.delete(normalizedLocale);
84
+ return translations;
85
+ }
86
+ catch (error) {
87
+ console.warn(`Failed to load translations for '${normalizedLocale}', falling back to English`, error);
88
+ // Try to load English as fallback
89
+ try {
90
+ const fallback = await import('./locales/en.json');
91
+ const translations = fallback.default || fallback;
92
+ translationCache.set(normalizedLocale, translations);
93
+ return translations;
94
+ }
95
+ catch (fallbackError) {
96
+ console.error('Failed to load English fallback translations', fallbackError);
97
+ throw new Error('Unable to load any translations');
98
+ }
99
+ }
100
+ })();
101
+ loadingPromises.set(normalizedLocale, loadingPromise);
102
+ return loadingPromise;
103
+ };
104
+ /**
105
+ * Get translations synchronously (from cache or English fallback)
106
+ */
107
+ export const getTranslations = (locale) => {
108
+ const normalizedLocale = normalizeLocale(locale);
109
+ // Return from cache if available
110
+ if (translationCache.has(normalizedLocale)) {
111
+ return translationCache.get(normalizedLocale);
112
+ }
113
+ // Return English if available
114
+ if (translationCache.has('en')) {
115
+ return translationCache.get('en');
116
+ }
117
+ // Return a basic fallback structure
118
+ return getDefaultTranslations();
119
+ };
120
+ /**
121
+ * Get default translations (hardcoded fallback)
122
+ */
123
+ const getDefaultTranslations = () => ({
124
+ whatsNew: {
125
+ title: "What's New",
126
+ tabs: {
127
+ article: "Articles",
128
+ productUpdate: "Product Updates"
129
+ },
130
+ buttonViewAll: {
131
+ article: "View all articles",
132
+ productUpdate: "View all updates"
133
+ },
134
+ noData: "No updates available"
135
+ },
136
+ growApps: {
137
+ title: "Grow Your Business",
138
+ subtitle: "Recommended apps to help you grow",
139
+ install: "Install",
140
+ installed: "Installed",
141
+ dismiss: "Dismiss",
142
+ noData: "No recommendations available"
143
+ },
144
+ banner: {
145
+ learnMore: "Learn More",
146
+ dismiss: "Dismiss"
147
+ },
148
+ partnerIntegration: {
149
+ reviewSourcesTitle: "Review Sources",
150
+ postPurchaseTitle: "Post-purchase & Automation",
151
+ seoSnippetsTitle: "SEO & Rich Snippets",
152
+ install: "Install app",
153
+ manage: "Manage",
154
+ connect: "Connect",
155
+ inactive: "Inactive",
156
+ active: "Active",
157
+ upgradeBadge: {
158
+ upgradeToUnlimited: "From Unlimited"
159
+ }
160
+ }
161
+ });
162
+ /**
163
+ * Preload specific locales for better performance
164
+ */
165
+ export const preloadLocales = async (locales) => {
166
+ await Promise.all(locales.map(locale => loadTranslations(locale).catch(() => { })));
167
+ };
168
+ /**
169
+ * Clear translation cache (useful for testing or memory management)
170
+ */
171
+ export const clearTranslationCache = () => {
172
+ translationCache.clear();
173
+ loadingPromises.clear();
174
+ };
175
+ /**
176
+ * Get nested translation value by path
177
+ */
178
+ export const getTranslationByPath = (translations, path) => {
179
+ const keys = path.split('.');
180
+ let value = translations;
181
+ for (const key of keys) {
182
+ if (value && typeof value === 'object' && key in value) {
183
+ value = value[key];
184
+ }
185
+ else {
186
+ return path; // Return path as fallback
187
+ }
188
+ }
189
+ return typeof value === 'string' ? value : path;
190
+ };
191
+ /**
192
+ * Merge custom translations with defaults
193
+ */
194
+ export const mergeTranslations = (defaults, custom) => {
195
+ if (!custom)
196
+ return defaults;
197
+ const deepMerge = (target, source) => {
198
+ if (!source)
199
+ return target;
200
+ const result = { ...target };
201
+ for (const key in source) {
202
+ if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
203
+ result[key] = deepMerge(target[key] || {}, source[key]);
204
+ }
205
+ else {
206
+ result[key] = source[key];
207
+ }
208
+ }
209
+ return result;
210
+ };
211
+ return deepMerge(defaults, custom);
212
+ };
213
+ /**
214
+ * Get bundle size estimate for a locale
215
+ */
216
+ export const getLocaleBundleSize = (locale) => {
217
+ // Approximate sizes in KB
218
+ const sizes = {
219
+ en: 2, cn: 3, de: 2.5, dk: 2.5, es: 2.5, fr: 2.5,
220
+ ie: 2.5, in: 3, it: 2.5, jp: 3, nl: 2.5,
221
+ nz: 2.5, pt: 2.5, se: 2.5, vi: 3
222
+ };
223
+ return sizes[locale] || 2;
224
+ };
225
+ /**
226
+ * Initialize SDK translations system
227
+ * Call this once when SDK loads
228
+ */
229
+ export const initializeTranslations = async (initialLocale, preloadLocales) => {
230
+ // Load initial locale
231
+ if (initialLocale) {
232
+ await loadTranslations(initialLocale);
233
+ }
234
+ // Preload additional locales
235
+ if (preloadLocales && preloadLocales.length > 0) {
236
+ await Promise.all(preloadLocales.map(locale => loadTranslations(locale).catch(() => { })));
237
+ }
238
+ };
239
+ //# sourceMappingURL=translation-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translation-manager.js","sourceRoot":"","sources":["../../src/translations/translation-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2DH,uBAAuB;AACvB,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC9C,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAoB,IAAI,CAAC;AAEpD,gCAAgC;AAChC,MAAM,CAAC,MAAM,eAAe,GAAkE;IAC5F,EAAE,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,UAAU,EAAE,IAAI,EAAE;IACtD,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE;IAC7C,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAA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CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAC1B,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CACzC,CACF,CAAC;IACJ,CAAC;AACH,CAAC,CAAC","sourcesContent":["/**\n * Advanced translation management system for SDK\n * Handles multi-language support with lazy loading and fallback\n */\n\nexport type SupportedLocale = \n | 'cn' // Chinese (Simplified)\n | 'de' // German\n | 'dk' // Danish\n | 'en' // English (default)\n | 'es' // Spanish\n | 'fr' // French\n | 'ie' // Irish\n | 'in' // Hindi\n | 'it' // Italian\n | 'jp' // Japanese\n | 'nl' // Dutch\n | 'nz' // Maori\n | 'pt' // Portuguese\n | 'se' // Swedish\n | 'vi'; // Vietnamese\n\nexport interface SDKTranslations {\n whatsNew: {\n title: string;\n tabs: {\n article: string;\n productUpdate: string;\n };\n buttonViewAll: {\n article: string;\n productUpdate: string;\n };\n noData: string;\n };\n growApps: {\n title: string;\n subtitle: string;\n install: string;\n installed: string;\n dismiss: string;\n noData: string;\n };\n banner: {\n learnMore: string;\n dismiss: string;\n };\n partnerIntegration: {\n reviewSourcesTitle: string;\n postPurchaseTitle: string;\n seoSnippetsTitle: string;\n install: string;\n manage: string;\n connect: string;\n inactive: string;\n active: string;\n upgradeBadge: {\n upgradeToUnlimited: string;\n };\n };\n}\n\n// Locale configuration\nexport const SUPPORTED_LOCALES: SupportedLocale[] = [\n 'cn', 'de', 'dk', 'en', 'es', 'fr', 'ie', 'in', \n 'it', 'jp', 'nl', 'nz', 'pt', 'se', 'vi'\n];\n\nexport const DEFAULT_LOCALE: SupportedLocale = 'en';\n\n// Locale metadata for better UX\nexport const LOCALE_METADATA: Record<SupportedLocale, { name: string; nativeName: string }> = {\n cn: { name: 'Chinese (Simplified)', nativeName: '中文' },\n de: { name: 'German', nativeName: 'Deutsch' },\n dk: { name: 'Danish', nativeName: 'Dansk' },\n en: { name: 'English', nativeName: 'English' },\n es: { name: 'Spanish', nativeName: 'Español' },\n fr: { name: 'French', nativeName: 'Français' },\n ie: { name: 'Irish', nativeName: 'Gaeilge' },\n in: { name: 'Hindi', nativeName: 'हिन्दी' },\n it: { name: 'Italian', nativeName: 'Italiano' },\n jp: { name: 'Japanese', nativeName: '日本語' },\n nl: { name: 'Dutch', nativeName: 'Nederlands' },\n nz: { name: 'Maori', nativeName: 'Te Reo Māori' },\n pt: { name: 'Portuguese', nativeName: 'Português' },\n se: { name: 'Swedish', nativeName: 'Svenska' },\n vi: { name: 'Vietnamese', nativeName: 'Tiếng Việt' }\n};\n\n// Translation cache\nconst translationCache: Map<SupportedLocale, SDKTranslations> = new Map();\nconst loadingPromises: Map<SupportedLocale, Promise<SDKTranslations>> = new Map();\n\n/**\n * Normalize locale code to supported format\n * Examples: en-US → en, zh-CN → cn, pt-BR → pt\n */\nexport const normalizeLocale = (locale: string): SupportedLocale => {\n if (!locale) return DEFAULT_LOCALE;\n \n // Direct match\n if (SUPPORTED_LOCALES.includes(locale as SupportedLocale)) {\n return locale as SupportedLocale;\n }\n \n // Extract base locale (en-US → en)\n const base = locale.split(/[-_]/)[0].toLowerCase();\n \n // Special mappings\n const mappings: Record<string, SupportedLocale> = {\n 'zh': 'cn',\n 'da': 'dk',\n 'ga': 'ie',\n 'hi': 'in',\n 'ja': 'jp',\n 'mi': 'nz',\n 'sv': 'se',\n };\n \n const mapped = mappings[base] || base;\n \n if (SUPPORTED_LOCALES.includes(mapped as SupportedLocale)) {\n return mapped as SupportedLocale;\n }\n \n return DEFAULT_LOCALE;\n};\n\n/**\n * Load translations for a specific locale with lazy loading\n */\nexport const loadTranslations = async (\n locale: string | SupportedLocale\n): Promise<SDKTranslations> => {\n const normalizedLocale = normalizeLocale(locale);\n \n // Return from cache if available\n if (translationCache.has(normalizedLocale)) {\n return translationCache.get(normalizedLocale)!;\n }\n \n // Return existing loading promise if in progress\n if (loadingPromises.has(normalizedLocale)) {\n return loadingPromises.get(normalizedLocale)!;\n }\n \n // Create loading promise\n const loadingPromise = (async () => {\n try {\n // Dynamic import with webpack chunk names for better debugging\n const module = await import(\n /* webpackChunkName: \"locale-[request]\" */\n `./locales/${normalizedLocale}.json`\n );\n \n const translations = module.default || module;\n translationCache.set(normalizedLocale, translations);\n loadingPromises.delete(normalizedLocale);\n \n return translations;\n } catch (error) {\n console.warn(\n `Failed to load translations for '${normalizedLocale}', falling back to English`,\n error\n );\n \n // Try to load English as fallback\n try {\n const fallback = await import('./locales/en.json');\n const translations = fallback.default || fallback;\n translationCache.set(normalizedLocale, translations);\n return translations;\n } catch (fallbackError) {\n console.error('Failed to load English fallback translations', fallbackError);\n throw new Error('Unable to load any translations');\n }\n }\n })();\n \n loadingPromises.set(normalizedLocale, loadingPromise);\n return loadingPromise;\n};\n\n/**\n * Get translations synchronously (from cache or English fallback)\n */\nexport const getTranslations = (locale: string | SupportedLocale): SDKTranslations => {\n const normalizedLocale = normalizeLocale(locale);\n \n // Return from cache if available\n if (translationCache.has(normalizedLocale)) {\n return translationCache.get(normalizedLocale)!;\n }\n \n // Return English if available\n if (translationCache.has('en')) {\n return translationCache.get('en')!;\n }\n \n // Return a basic fallback structure\n return getDefaultTranslations();\n};\n\n/**\n * Get default translations (hardcoded fallback)\n */\nconst getDefaultTranslations = (): SDKTranslations => ({\n whatsNew: {\n title: \"What's New\",\n tabs: {\n article: \"Articles\",\n productUpdate: \"Product Updates\"\n },\n buttonViewAll: {\n article: \"View all articles\",\n productUpdate: \"View all updates\"\n },\n noData: \"No updates available\"\n },\n growApps: {\n title: \"Grow Your Business\",\n subtitle: \"Recommended apps to help you grow\",\n install: \"Install\",\n installed: \"Installed\",\n dismiss: \"Dismiss\",\n noData: \"No recommendations available\"\n },\n banner: {\n learnMore: \"Learn More\",\n dismiss: \"Dismiss\"\n },\n partnerIntegration: {\n reviewSourcesTitle: \"Review Sources\",\n postPurchaseTitle: \"Post-purchase & Automation\",\n seoSnippetsTitle: \"SEO & Rich Snippets\",\n install: \"Install app\",\n manage: \"Manage\",\n connect: \"Connect\",\n inactive: \"Inactive\",\n active: \"Active\",\n upgradeBadge: {\n upgradeToUnlimited: \"From Unlimited\"\n }\n }\n});\n\n/**\n * Preload specific locales for better performance\n */\nexport const preloadLocales = async (\n locales: (string | SupportedLocale)[]\n): Promise<void> => {\n await Promise.all(\n locales.map(locale => loadTranslations(locale).catch(() => {}))\n );\n};\n\n/**\n * Clear translation cache (useful for testing or memory management)\n */\nexport const clearTranslationCache = (): void => {\n translationCache.clear();\n loadingPromises.clear();\n};\n\n/**\n * Get nested translation value by path\n */\nexport const getTranslationByPath = (\n translations: SDKTranslations,\n path: string\n): string => {\n const keys = path.split('.');\n let value: any = translations;\n \n for (const key of keys) {\n if (value && typeof value === 'object' && key in value) {\n value = value[key];\n } else {\n return path; // Return path as fallback\n }\n }\n \n return typeof value === 'string' ? value : path;\n};\n\n/**\n * Merge custom translations with defaults\n */\nexport const mergeTranslations = (\n defaults: SDKTranslations,\n custom?: Partial<SDKTranslations>\n): SDKTranslations => {\n if (!custom) return defaults;\n \n const deepMerge = (target: any, source: any): any => {\n if (!source) return target;\n \n const result = { ...target };\n \n for (const key in source) {\n if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {\n result[key] = deepMerge(target[key] || {}, source[key]);\n } else {\n result[key] = source[key];\n }\n }\n \n return result;\n };\n \n return deepMerge(defaults, custom);\n};\n\n/**\n * Get bundle size estimate for a locale\n */\nexport const getLocaleBundleSize = (locale: SupportedLocale): number => {\n // Approximate sizes in KB\n const sizes: Record<SupportedLocale, number> = {\n en: 2, cn: 3, de: 2.5, dk: 2.5, es: 2.5, fr: 2.5,\n ie: 2.5, in: 3, it: 2.5, jp: 3, nl: 2.5, \n nz: 2.5, pt: 2.5, se: 2.5, vi: 3\n };\n return sizes[locale] || 2;\n};\n\n/**\n * Initialize SDK translations system\n * Call this once when SDK loads\n */\nexport const initializeTranslations = async (\n initialLocale?: string,\n preloadLocales?: string[]\n): Promise<void> => {\n // Load initial locale\n if (initialLocale) {\n await loadTranslations(initialLocale);\n }\n \n // Preload additional locales\n if (preloadLocales && preloadLocales.length > 0) {\n await Promise.all(\n preloadLocales.map(locale => \n loadTranslations(locale).catch(() => {})\n )\n );\n }\n};"]}
@@ -12,3 +12,4 @@ export interface AppItem {
12
12
  price?: string;
13
13
  featured?: boolean;
14
14
  }
15
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/types/app.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAChB,aAAa,GACb,aAAa,GACb,WAAW,GACX,WAAW,GACX,OAAO,CAAC;AAEZ,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
package/dist/types/app.js CHANGED
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/types/app.ts"],"names":[],"mappings":"","sourcesContent":["export type AppGroup =\n | \"grow_faster\"\n | \"integration\"\n | \"marketing\"\n | \"analytics\"\n | \"other\";\n\nexport interface AppItem {\n id: string | number;\n key: string;\n title: string;\n description: string;\n icon: string;\n link: string;\n group: AppGroup;\n rating?: number;\n installs?: number;\n price?: string;\n featured?: boolean;\n}\n"]}
@@ -13,3 +13,4 @@ export interface ArticleItem {
13
13
  tags?: string[];
14
14
  buttonText?: string;
15
15
  }
16
+ //# sourceMappingURL=article.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"article.d.ts","sourceRoot":"","sources":["../../src/types/article.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=article.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"article.js","sourceRoot":"","sources":["../../src/types/article.ts"],"names":[],"mappings":"","sourcesContent":["export interface ArticleItem {\n id: string | number;\n title: string;\n description?: string;\n content?: string;\n thumbnail?: string;\n imageUrl?: string;\n link: string;\n author?: string;\n publishedDate?: string;\n category?: string;\n readTime?: number;\n tags?: string[];\n buttonText?: string;\n}\n"]}
@@ -20,3 +20,4 @@ export interface BannerItem {
20
20
  priority?: number;
21
21
  isActive?: boolean;
22
22
  }
23
+ //# sourceMappingURL=banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/types/banner.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,eAAe,CAAC;AAClE,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9C,MAAM,WAAW,WAAW;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.js","sourceRoot":"","sources":["../../src/types/banner.ts"],"names":[],"mappings":"","sourcesContent":["export type BannerType = \"popup\" | \"top_banner\" | \"footer_banner\";\nexport type OpenType = \"new_tab\" | \"same_tab\";\n\nexport interface BannerStyle {\n backgroundColor?: string;\n textColor?: string;\n buttonColor?: string;\n buttonTextColor?: string;\n}\n\nexport interface BannerItem {\n id: string | number;\n type: BannerType;\n title: string;\n description?: string;\n image?: string;\n icon?: string;\n link: string;\n linkText?: string;\n openType: OpenType;\n style?: BannerStyle;\n priority?: number;\n isActive?: boolean;\n}\n"]}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Simplified public component APIs
3
+ * Internal defaults and implementation details are handled by the SDK
4
+ */
5
+ import type { BannerItem } from "./banner";
6
+ import type { ArticleItem } from "./article";
7
+ import type { ProductUpdateItem } from "./product-update";
8
+ import type { GrowApp } from "./dashboard";
9
+ import type { IntegrationItem } from "./integration";
10
+ /**
11
+ * TopBanner - Minimal public API
12
+ * Most behavior is handled internally
13
+ */
14
+ export interface TopBannerProps {
15
+ /** Optional CSS class for styling */
16
+ className?: string;
17
+ /** Control visibility (default: true) */
18
+ open?: boolean;
19
+ /** Handle close event */
20
+ onClose?: () => void;
21
+ /** Handle primary action click */
22
+ onAction?: (banner: BannerItem) => void;
23
+ }
24
+ /**
25
+ * WhatsNew - Clean, event-focused API
26
+ */
27
+ export interface WhatsNewProps {
28
+ /** Optional CSS class */
29
+ className?: string;
30
+ /** Handle product update clicks */
31
+ onProductUpdateClick?: (update: ProductUpdateItem) => void;
32
+ /** Handle article clicks */
33
+ onArticleClick?: (article: ArticleItem) => void;
34
+ }
35
+ /**
36
+ * GrowApps - Simplified app carousel
37
+ */
38
+ export interface GrowAppsProps {
39
+ /** Optional CSS class */
40
+ className?: string;
41
+ /** Handle app clicks */
42
+ onAppClick?: (app: GrowApp) => void;
43
+ /** Optional dismiss callback */
44
+ onDismiss?: () => void;
45
+ }
46
+ /**
47
+ * PopupBanner - Event-driven modal banner
48
+ */
49
+ export interface PopupBannerProps {
50
+ /** Optional CSS class */
51
+ className?: string;
52
+ /** Handle close */
53
+ onClose?: () => void;
54
+ /** Handle action */
55
+ onAction?: (banner: BannerItem) => void;
56
+ }
57
+ /**
58
+ * PartnerIntegration - Integration management
59
+ */
60
+ export interface PartnerIntegrationProps {
61
+ /** Optional CSS class */
62
+ className?: string;
63
+ /** Handle manage action */
64
+ onManage?: (item: IntegrationItem) => void;
65
+ /** Handle install action */
66
+ onInstall?: (item: IntegrationItem) => void;
67
+ /** Handle open action */
68
+ onOpen?: (item: IntegrationItem) => void;
69
+ /** Handle upgrade click */
70
+ onUpgradeClick?: (item: IntegrationItem) => void;
71
+ }
72
+ /**
73
+ * Advanced props for power users
74
+ * These are completely optional and have smart defaults
75
+ */
76
+ export interface AdvancedComponentConfig {
77
+ /** Override default max items */
78
+ limits?: {
79
+ maxUpdates?: number;
80
+ maxArticles?: number;
81
+ maxApps?: number;
82
+ maxIntegrations?: number;
83
+ };
84
+ /** Override UI behavior */
85
+ ui?: {
86
+ showNavigation?: boolean;
87
+ showViewAllButtons?: boolean;
88
+ showDismissButtons?: boolean;
89
+ showEmptyStates?: boolean;
90
+ enableSwipeGestures?: boolean;
91
+ };
92
+ /** Override timing */
93
+ timing?: {
94
+ dismissDuration?: number;
95
+ animationDuration?: number;
96
+ debounceDelay?: number;
97
+ };
98
+ /** Override storage keys (rarely needed) */
99
+ storage?: {
100
+ dismissKeyPrefix?: string;
101
+ persistenceEnabled?: boolean;
102
+ };
103
+ }
104
+ /**
105
+ * These props are used internally by the SDK
106
+ * and should not be exposed in the public API
107
+ */
108
+ export interface InternalComponentProps {
109
+ reserveSpace?: boolean;
110
+ skeletonCount?: number;
111
+ minHeight?: number;
112
+ isLoading?: boolean;
113
+ loadingDelay?: number;
114
+ retryAttempts?: number;
115
+ cacheKey?: string;
116
+ cacheTime?: number;
117
+ internalNavigate?: (url: string) => void;
118
+ statusProvider?: any;
119
+ renderBanner?: any;
120
+ renderCard?: any;
121
+ renderItem?: any;
122
+ }
123
+ /**
124
+ * These values come from the SDK Manager
125
+ * Components access them internally via useSDK
126
+ */
127
+ export interface SDKProvidedValues {
128
+ locale: string;
129
+ translations: any;
130
+ config: any;
131
+ navigate: (url: string) => void;
132
+ features: {
133
+ closable: boolean;
134
+ sticky: boolean;
135
+ autoShow: boolean;
136
+ persistClose: boolean;
137
+ };
138
+ defaults: AdvancedComponentConfig;
139
+ }
140
+ //# sourceMappingURL=component-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-props.d.ts","sourceRoot":"","sources":["../../src/types/component-props.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAA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AAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,cAAc,CAAC,EAAE,GAAG,CAAC;IAGrB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAMD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAEhC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,GAAG,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC;IAGZ,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAGhC,QAAQ,EAAE;QACR,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC;QAChB,QAAQ,EAAE,OAAO,CAAC;QAClB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;IAGF,QAAQ,EAAE,uBAAuB,CAAC;CACnC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Simplified public component APIs
3
+ * Internal defaults and implementation details are handled by the SDK
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=component-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-props.js","sourceRoot":"","sources":["../../src/types/component-props.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * Simplified public component APIs\n * Internal defaults and implementation details are handled by the SDK\n */\n\nimport type { BannerItem } from \"./banner\";\nimport type { ArticleItem } from \"./article\";\nimport type { ProductUpdateItem } from \"./product-update\";\nimport type { GrowApp } from \"./dashboard\";\nimport type { IntegrationItem } from \"./integration\";\n\n// ============================================\n// Core Component Props (Public API)\n// ============================================\n\n/**\n * TopBanner - Minimal public API\n * Most behavior is handled internally\n */\nexport interface TopBannerProps {\n /** Optional CSS class for styling */\n className?: string;\n\n /** Control visibility (default: true) */\n open?: boolean;\n\n /** Handle close event */\n onClose?: () => void;\n\n /** Handle primary action click */\n onAction?: (banner: BannerItem) => void;\n}\n\n/**\n * WhatsNew - Clean, event-focused API\n */\nexport interface WhatsNewProps {\n /** Optional CSS class */\n className?: string;\n\n /** Handle product update clicks */\n onProductUpdateClick?: (update: ProductUpdateItem) => void;\n\n /** Handle article clicks */\n onArticleClick?: (article: ArticleItem) => void;\n}\n\n/**\n * GrowApps - Simplified app carousel\n */\nexport interface GrowAppsProps {\n /** Optional CSS class */\n className?: string;\n\n /** Handle app clicks */\n onAppClick?: (app: GrowApp) => void;\n\n /** Optional dismiss callback */\n onDismiss?: () => void;\n}\n\n/**\n * PopupBanner - Event-driven modal banner\n */\nexport interface PopupBannerProps {\n /** Optional CSS class */\n className?: string;\n\n /** Handle close */\n onClose?: () => void;\n\n /** Handle action */\n onAction?: (banner: BannerItem) => void;\n}\n\n/**\n * PartnerIntegration - Integration management\n */\nexport interface PartnerIntegrationProps {\n /** Optional CSS class */\n className?: string;\n\n /** Handle manage action */\n onManage?: (item: IntegrationItem) => void;\n\n /** Handle install action */\n onInstall?: (item: IntegrationItem) => void;\n\n /** Handle open action */\n onOpen?: (item: IntegrationItem) => void;\n\n /** Handle upgrade click */\n onUpgradeClick?: (item: IntegrationItem) => void;\n}\n\n// ============================================\n// Advanced Configuration (Optional)\n// ============================================\n\n/**\n * Advanced props for power users\n * These are completely optional and have smart defaults\n */\nexport interface AdvancedComponentConfig {\n /** Override default max items */\n limits?: {\n maxUpdates?: number; // Default: 5\n maxArticles?: number; // Default: 10\n maxApps?: number; // Default: 6\n maxIntegrations?: number; // Default: 12\n };\n\n /** Override UI behavior */\n ui?: {\n showNavigation?: boolean; // Default: true\n showViewAllButtons?: boolean; // Default: true\n showDismissButtons?: boolean; // Default: true\n showEmptyStates?: boolean; // Default: true\n enableSwipeGestures?: boolean; // Default: true\n };\n\n /** Override timing */\n timing?: {\n dismissDuration?: number; // Default: 7 days\n animationDuration?: number; // Default: 300ms\n debounceDelay?: number; // Default: 100ms\n };\n\n /** Override storage keys (rarely needed) */\n storage?: {\n dismissKeyPrefix?: string; // Default: 'ts-sdk-'\n persistenceEnabled?: boolean; // Default: true\n };\n}\n\n// ============================================\n// Internal Props (SDK Use Only)\n// ============================================\n\n/**\n * These props are used internally by the SDK\n * and should not be exposed in the public API\n */\nexport interface InternalComponentProps {\n // CLS optimization props\n reserveSpace?: boolean;\n skeletonCount?: number;\n minHeight?: number;\n\n // Loading states\n isLoading?: boolean;\n loadingDelay?: number;\n retryAttempts?: number;\n\n // Cache configuration\n cacheKey?: string;\n cacheTime?: number;\n\n // Internal handlers\n internalNavigate?: (url: string) => void;\n statusProvider?: any;\n\n // Render props (replaced with internal rendering)\n renderBanner?: any;\n renderCard?: any;\n renderItem?: any;\n}\n\n// ============================================\n// SDK-Provided Values\n// ============================================\n\n/**\n * These values come from the SDK Manager\n * Components access them internally via useSDK\n */\nexport interface SDKProvidedValues {\n // Data\n locale: string;\n translations: any;\n config: any;\n\n // Navigation\n navigate: (url: string) => void;\n\n // Features\n features: {\n closable: boolean;\n sticky: boolean;\n autoShow: boolean;\n persistClose: boolean;\n };\n\n // Defaults\n defaults: AdvancedComponentConfig;\n}\n"]}
@@ -44,3 +44,4 @@ export interface DashboardState {
44
44
  error: Error | null;
45
45
  lastFetch: Date | null;
46
46
  }
47
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/types/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MA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E,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/types/dashboard.ts"],"names":[],"mappings":"","sourcesContent":["import { BannerItem } from \"./banner\";\nimport { AppItem, AppGroup } from \"./app\";\nimport { ArticleItem } from \"./article\";\nimport { ProductUpdateItem } from \"./product-update\";\nimport { PartnerItem } from \"./partner\";\n\nexport interface GrowApp {\n id: string | number;\n title: string;\n content: string;\n icon_url?: string;\n imageUrl?: string;\n button_text?: string;\n button_get_app?: string;\n button_install_text?: string;\n button_install_link?: string;\n app_url?: string;\n get_app?: string;\n}\n\nexport interface DashboardData {\n locale?: string;\n requested_locale?: string;\n fallback_used?: boolean;\n banners: BannerItem[];\n apps: Record<AppGroup, AppItem[]>;\n articles: ArticleItem[];\n whatsNew: ProductUpdateItem[];\n grow_apps?: GrowApp[];\n grow_apps_display_limit?: number;\n partner_list?: PartnerItem[];\n integrations?: any[]; // Use any[] for now since we're using raw API data\n}\n\nexport interface DashboardConfig {\n apiUrl: string;\n shopId?: string; // Added for tracking purposes\n locale?: string;\n cacheTime?: number;\n retryAttempts?: number;\n retryDelay?: number;\n headers?: Record<string, string>;\n}\n\nexport interface DashboardState {\n data: DashboardData | null;\n loading: boolean;\n error: Error | null;\n lastFetch: Date | null;\n}\n"]}
@@ -5,3 +5,4 @@ export * from "./product-update";
5
5
  export * from "./dashboard";
6
6
  export * from "./partner";
7
7
  export * from "./integration";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
@@ -5,3 +5,4 @@ export * from "./product-update";
5
5
  export * from "./dashboard";
6
6
  export * from "./partner";
7
7
  export * from "./integration";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC","sourcesContent":["export * from \"./banner\";\nexport * from \"./app\";\nexport * from \"./article\";\nexport * from \"./product-update\";\nexport * from \"./dashboard\";\nexport * from \"./partner\";\nexport * from \"./integration\";\n"]}
@@ -31,3 +31,4 @@ export interface IntegrationGroup {
31
31
  key: IntegrationCategory;
32
32
  items: IntegrationItem[];
33
33
  }
34
+ //# sourceMappingURL=integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/types/integration.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,0BAA0B,GAAG,mBAAmB,CAAC;AAEtG,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC5B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,mBAAmB,CAAC;IACzB,KAAK,EAAE,eAAe,EAAE,CAAC;CAC5B"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.js","sourceRoot":"","sources":["../../src/types/integration.ts"],"names":[],"mappings":"","sourcesContent":["export type IntegrationCategory = \"review_sources\" | \"post_purchase_automation\" | \"seo_rich_snippets\";\n\nexport type IntegrationStatus = \"connected\" | \"active\" | \"inactive\";\n\nexport interface IntegrationItem {\n id?: string | number;\n key?: string;\n title: string;\n badge_text?: string;\n sub_title?: string;\n content?: string; // API uses 'content' field\n icon_url?: string;\n category?: IntegrationCategory;\n category_key?: string; // API field name\n status?: IntegrationStatus;\n installed?: boolean;\n button_text?: string; // Old format - generic button text\n button_install_text?: string | null;\n button_install_link?: string | null; // New API field name\n button_install_url?: string; // Old field name\n button_manage_text?: string | null;\n button_manage_url?: string | null;\n button_connect_text?: string;\n button_connect_url?: string;\n app_url?: string; // API field name\n position: number;\n requires_plan?: string;\n source?: string;\n group_type?: string;\n}\n\nexport interface IntegrationGroup {\n title: string;\n key: IntegrationCategory;\n items: IntegrationItem[];\n}"]}
@@ -6,3 +6,4 @@ export interface PartnerItem {
6
6
  app_url: string;
7
7
  key: string;
8
8
  }
9
+ //# sourceMappingURL=partner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partner.d.ts","sourceRoot":"","sources":["../../src/types/partner.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=partner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partner.js","sourceRoot":"","sources":["../../src/types/partner.ts"],"names":[],"mappings":"","sourcesContent":["export interface PartnerItem {\n title: string;\n content: string;\n icon_url: string;\n button_text: string;\n app_url: string;\n key: string;\n}\n"]}
@@ -21,3 +21,4 @@ export interface ProductUpdateItem {
21
21
  text?: string;
22
22
  };
23
23
  }
24
+ //# sourceMappingURL=product-update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-update.d.ts","sourceRoot":"","sources":["../../src/types/product-update.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=product-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-update.js","sourceRoot":"","sources":["../../src/types/product-update.ts"],"names":[],"mappings":"","sourcesContent":["export interface ProductUpdateItem {\n id: string | number;\n title: string;\n description?: string;\n version?: string;\n releaseDate?: string;\n date_time?: string;\n features?: string[];\n improvements?: string[];\n fixes?: string[];\n link?: string;\n imageUrl?: string;\n image_url?: string;\n type?: \"major\" | \"minor\" | \"patch\";\n position?: number;\n button_try_it_now?: string;\n button_try_url?: string;\n button_learn_more?: string;\n button_learn_url?: string;\n content?: {\n text?: string;\n };\n}\n"]}
@@ -54,3 +54,4 @@ export interface SDKTranslations {
54
54
  };
55
55
  }
56
56
  export type TranslationKey = keyof SDKTranslations;
57
+ //# sourceMappingURL=translations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../src/types/translations.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE;YACL,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,aAAa,CAAC,EAAE;YACd,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,kBAAkB,CAAC,EAAE;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE;YACb,cAAc,CAAC,EAAE,MAAM,CAAC;YACxB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;YAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAA;CACF;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,eAAe,CAAC"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=translations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.js","sourceRoot":"","sources":["../../src/types/translations.ts"],"names":[],"mappings":"","sourcesContent":["export interface SDKTranslations {\n whatsNew?: {\n title?: string;\n tabs?: {\n article?: string;\n productUpdate?: string;\n };\n buttonViewAll?: {\n article?: string;\n productUpdate?: string;\n };\n noData?: string;\n };\n growApps?: {\n title?: string;\n subtitle?: string;\n exploreApps?: string;\n install?: string;\n installed?: string;\n dismiss?: string;\n noData?: string;\n };\n banner?: {\n learnMore?: string;\n dismiss?: string;\n };\n partnerIntegration?: {\n title?: string;\n reviewSourcesTitle?: string;\n postPurchaseTitle?: string;\n seoSnippetsTitle?: string;\n noData?: string;\n noDataMessage?: string;\n errorTitle?: string;\n errorMessage?: string;\n install?: string;\n installed?: string;\n manage?: string;\n open?: string;\n connect?: string;\n connected?: string;\n inactive?: string;\n active?: string;\n pending?: string;\n upgradeBadge?: {\n upgradeToBasic?: string;\n upgradeToPro?: string;\n upgradeToUnlimited?: string;\n fromBasic?: string;\n fromPro?: string;\n fromUnlimited?: string;\n upgrade?: string;\n };\n }\n}\n\nexport type TranslationKey = keyof SDKTranslations;"]}