@datlv-trustshop/shopify-inapp-components 0.3.3 → 0.3.4

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.
package/dist/index.js CHANGED
@@ -4,9 +4,6 @@
4
4
  * Provider-less component architecture for Shopify in-app dashboards
5
5
  * Components work standalone without any provider wrapper required
6
6
  */
7
- // ============================================
8
- // PRIMARY EXPORTS - Component-Driven API
9
- // ============================================
10
7
  // Main UI components (auto-initialize, no provider needed)
11
8
  export { TopBanner } from "./components/TopBanner";
12
9
  export { WhatsNew } from "./components/WhatsNew";
@@ -16,62 +13,17 @@ export { PartnerIntegration } from "./components/PartnerIntegration";
16
13
  export { PartnerList } from "./components/PartnerList";
17
14
  export { FloatingCard } from "./components/FloatingCard";
18
15
  export { FloatingCardContainer } from "./components/FloatingCardContainer";
16
+ export { MarketingCampaignCard } from "./components/MarketingCampaignCard";
19
17
  // FloatingCard props defined inline in component
20
- // ============================================
21
- // ADVANCED CUSTOMIZATION (Optional)
22
- // ============================================
23
18
  // SDK Manager for advanced control (rarely needed)
24
19
  export { SDKManager } from "./core/SDKManager";
25
20
  export { useSDK } from "./core/SDKManager";
26
21
  export { loadTranslations, getTranslations, normalizeLocale, SUPPORTED_LOCALES, LOCALE_METADATA, DEFAULT_LOCALE, } from "./translations/translation-manager";
27
- // ============================================
28
- // UTILITIES (Optional)
29
- // ============================================
30
22
  // CLS monitoring (for performance debugging)
31
23
  export { CLSMonitor, startCLSMonitoring, stopCLSMonitoring, getCLSMetrics, } from "./utils/cls-monitor";
32
24
  // Campaign tracking
33
25
  export { trackCampaignView, trackCampaignClick, clearViewTrackingCache, } from "./utils/campaignTracking";
34
26
  export { getSessionId, clearSession, hasSession } from "./utils/sessionManager";
35
- export { useCampaignTracking, useCampaignVisibility } from "./hooks/useCampaignTracking";
27
+ export { useCampaignTracking, useCampaignVisibility, } from "./hooks/useCampaignTracking";
36
28
  export { useVisibleFloatingCards } from "./hooks/useFloatingCards";
37
- // ============================================
38
- // RECOMMENDED USAGE
39
- // ============================================
40
- /*
41
-
42
- ✨ SIMPLE USAGE (Recommended)
43
-
44
- import { TopBanner, WhatsNew, GrowApps } from '@trustshop/shopify-inapp-components';
45
-
46
- export default function Dashboard() {
47
- return (
48
- <>
49
- <TopBanner />
50
- <WhatsNew />
51
- <GrowApps />
52
- </>
53
- );
54
- }
55
-
56
- 🎨 WITH CUSTOMIZATION
57
-
58
- import { TopBanner, WhatsNew } from '@trustshop/shopify-inapp-components';
59
-
60
- export default function Dashboard() {
61
- return (
62
- <>
63
- <TopBanner
64
- shopInfo={{ id: "12345", domain: "shop.myshopify.com" }}
65
- config={{ apiUrl: "/api/dashboard" }}
66
- onClose={() => console.log('Banner closed')}
67
- />
68
- <WhatsNew
69
- locale="fr"
70
- onProductUpdateClick={(update) => handleUpdate(update)}
71
- />
72
- </>
73
- );
74
- }
75
-
76
- */
77
29
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+CAA+C;AAC/C,yCAAyC;AACzC,+CAA+C;AAE/C,2DAA2D;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAU3E,iDAAiD;AAEjD,+CAA+C;AAC/C,oCAAoC;AACpC,+CAA+C;AAE/C,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAW3C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,oCAAoC,CAAC;AAe5C,+CAA+C;AAC/C,uBAAuB;AACvB,+CAA+C;AAE/C,6CAA6C;AAC7C,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAG7B,oBAAoB;AACpB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,+CAA+C;AAC/C,oBAAoB;AACpB,+CAA+C;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCE","sourcesContent":["/**\n * @trustshop/shopify-inapp-components\n *\n * Provider-less component architecture for Shopify in-app dashboards\n * Components work standalone without any provider wrapper required\n */\n\n// ============================================\n// PRIMARY EXPORTS - Component-Driven API\n// ============================================\n\n// Main UI components (auto-initialize, no provider needed)\nexport { TopBanner } from \"./components/TopBanner\";\nexport { WhatsNew } from \"./components/WhatsNew\";\nexport { GrowApps } from \"./components/GrowApps\";\nexport { PopupBanner } from \"./components/PopupBanner\";\nexport { PartnerIntegration } from \"./components/PartnerIntegration\";\nexport { PartnerList } from \"./components/PartnerList\";\nexport { FloatingCard } from \"./components/FloatingCard\";\nexport { FloatingCardContainer } from \"./components/FloatingCardContainer\";\n\n// Component prop types\nexport type { TopBannerProps } from \"./components/TopBanner\";\nexport type { WhatsNewProps } from \"./components/WhatsNew\";\nexport type { GrowAppsProps } from \"./components/GrowApps\";\nexport type { PopupBannerProps } from \"./components/PopupBanner\";\nexport type { PartnerIntegrationProps, IntegrationStatusInfo } from \"./components/PartnerIntegration\";\nexport type { PartnerListProps } from \"./components/PartnerList\";\nexport type { FloatingCardContainerProps } from \"./components/FloatingCardContainer\";\n// FloatingCard props defined inline in component\n\n// ============================================\n// ADVANCED CUSTOMIZATION (Optional)\n// ============================================\n\n// SDK Manager for advanced control (rarely needed)\nexport { SDKManager } from \"./core/SDKManager\";\nexport { useSDK } from \"./core/SDKManager\";\nexport type { UseSDKOptions } from \"./core/SDKManager\";\n\n// Configuration types\nexport type { ShopInfo, SDKInternalConfig } from \"./config/internal-config\";\n\n// Translation types and utilities\nexport type {\n SupportedLocale,\n SDKTranslations,\n} from \"./translations/translation-manager\";\nexport {\n loadTranslations,\n getTranslations,\n normalizeLocale,\n SUPPORTED_LOCALES,\n LOCALE_METADATA,\n DEFAULT_LOCALE,\n} from \"./translations/translation-manager\";\n\n// ============================================\n// DATA TYPES\n// ============================================\n\n// Core data types\nexport type { BannerItem } from \"./types/banner\";\nexport type { ArticleItem } from \"./types/article\";\nexport type { ProductUpdateItem } from \"./types/product-update\";\nexport type { GrowApp, DashboardConfig } from \"./types/dashboard\";\nexport type { IntegrationItem } from \"./types/integration\";\nexport type { PartnerItem } from \"./types/partner\";\nexport type { FloatingCardData } from \"./components/FloatingCard\";\n\n// ============================================\n// UTILITIES (Optional)\n// ============================================\n\n// CLS monitoring (for performance debugging)\nexport {\n CLSMonitor,\n startCLSMonitoring,\n stopCLSMonitoring,\n getCLSMetrics,\n} from \"./utils/cls-monitor\";\nexport type { CLSMetrics, CLSMonitorOptions } from \"./utils/cls-monitor\";\n\n// Campaign tracking\nexport {\n trackCampaignView,\n trackCampaignClick,\n clearViewTrackingCache,\n} from \"./utils/campaignTracking\";\nexport { getSessionId, clearSession, hasSession } from \"./utils/sessionManager\";\nexport { useCampaignTracking, useCampaignVisibility } from \"./hooks/useCampaignTracking\";\nexport { useVisibleFloatingCards } from \"./hooks/useFloatingCards\";\n\n\n// ============================================\n// RECOMMENDED USAGE\n// ============================================\n\n/*\n\n✨ SIMPLE USAGE (Recommended)\n\nimport { TopBanner, WhatsNew, GrowApps } from '@trustshop/shopify-inapp-components';\n\nexport default function Dashboard() {\n return (\n <>\n <TopBanner />\n <WhatsNew />\n <GrowApps />\n </>\n );\n}\n\n🎨 WITH CUSTOMIZATION\n\nimport { TopBanner, WhatsNew } from '@trustshop/shopify-inapp-components';\n\nexport default function Dashboard() {\n return (\n <>\n <TopBanner \n shopInfo={{ id: \"12345\", domain: \"shop.myshopify.com\" }}\n config={{ apiUrl: \"/api/dashboard\" }}\n onClose={() => console.log('Banner closed')}\n />\n <WhatsNew \n locale=\"fr\"\n onProductUpdateClick={(update) => handleUpdate(update)}\n />\n </>\n );\n}\n\n*/\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,2DAA2D;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAiB3E,iDAAiD;AAEjD,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAW3C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,oCAAoC,CAAC;AAW5C,6CAA6C;AAC7C,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAG7B,oBAAoB;AACpB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["/**\n * @trustshop/shopify-inapp-components\n *\n * Provider-less component architecture for Shopify in-app dashboards\n * Components work standalone without any provider wrapper required\n */\n\n// Main UI components (auto-initialize, no provider needed)\nexport { TopBanner } from \"./components/TopBanner\";\nexport { WhatsNew } from \"./components/WhatsNew\";\nexport { GrowApps } from \"./components/GrowApps\";\nexport { PopupBanner } from \"./components/PopupBanner\";\nexport { PartnerIntegration } from \"./components/PartnerIntegration\";\nexport { PartnerList } from \"./components/PartnerList\";\nexport { FloatingCard } from \"./components/FloatingCard\";\nexport { FloatingCardContainer } from \"./components/FloatingCardContainer\";\nexport { MarketingCampaignCard } from \"./components/MarketingCampaignCard\";\n\n// Component prop types\nexport type { TopBannerProps } from \"./components/TopBanner\";\nexport type { WhatsNewProps } from \"./components/WhatsNew\";\nexport type { GrowAppsProps } from \"./components/GrowApps\";\nexport type { PopupBannerProps } from \"./components/PopupBanner\";\nexport type {\n PartnerIntegrationProps,\n IntegrationStatusInfo,\n} from \"./components/PartnerIntegration\";\nexport type { PartnerListProps } from \"./components/PartnerList\";\nexport type { FloatingCardContainerProps } from \"./components/FloatingCardContainer\";\nexport type {\n MarketingCampaignCardProps,\n MarketingCampaignData,\n} from \"./components/MarketingCampaignCard\";\n// FloatingCard props defined inline in component\n\n// SDK Manager for advanced control (rarely needed)\nexport { SDKManager } from \"./core/SDKManager\";\nexport { useSDK } from \"./core/SDKManager\";\nexport type { UseSDKOptions } from \"./core/SDKManager\";\n\n// Configuration types\nexport type { ShopInfo, SDKInternalConfig } from \"./config/internal-config\";\n\n// Translation types and utilities\nexport type {\n SupportedLocale,\n SDKTranslations,\n} from \"./translations/translation-manager\";\nexport {\n loadTranslations,\n getTranslations,\n normalizeLocale,\n SUPPORTED_LOCALES,\n LOCALE_METADATA,\n DEFAULT_LOCALE,\n} from \"./translations/translation-manager\";\n\n// Core data types\nexport type { BannerItem } from \"./types/banner\";\nexport type { ArticleItem } from \"./types/article\";\nexport type { ProductUpdateItem } from \"./types/product-update\";\nexport type { GrowApp, DashboardConfig } from \"./types/dashboard\";\nexport type { IntegrationItem } from \"./types/integration\";\nexport type { PartnerItem } from \"./types/partner\";\nexport type { FloatingCardData } from \"./components/FloatingCard\";\n\n// CLS monitoring (for performance debugging)\nexport {\n CLSMonitor,\n startCLSMonitoring,\n stopCLSMonitoring,\n getCLSMetrics,\n} from \"./utils/cls-monitor\";\nexport type { CLSMetrics, CLSMonitorOptions } from \"./utils/cls-monitor\";\n\n// Campaign tracking\nexport {\n trackCampaignView,\n trackCampaignClick,\n clearViewTrackingCache,\n} from \"./utils/campaignTracking\";\nexport { getSessionId, clearSession, hasSession } from \"./utils/sessionManager\";\nexport {\n useCampaignTracking,\n useCampaignVisibility,\n} from \"./hooks/useCampaignTracking\";\nexport { useVisibleFloatingCards } from \"./hooks/useFloatingCards\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datlv-trustshop/shopify-inapp-components",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "private": false,
5
5
  "description": "React TypeScript components for Shopify in-app dashboard content",
6
6
  "main": "dist/index.js",