@faskai/ui-commons 0.0.0-alpha.2 → 0.0.0-alpha.21

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/README.md CHANGED
@@ -1,20 +1,92 @@
1
1
  # Fask UI Commons
2
2
 
3
- A minimal package containing common UI components and utilities shared between Fask applications:
3
+ A collection of reusable React components and data exports for Fask applications.
4
4
 
5
- * @/fask-web-app-v2 (B2C) is hosted at fask.ai
6
- * @/fask-biz-landing (B2B landing) is at fask.ai/business
7
- * @/powpal-web-app (B2B dashboard) is at biz.fask.ai
5
+ ## Data Exports
8
6
 
9
- ## Installation
7
+ ### Beta Marketing Content
10
8
 
11
- ```bash
12
- yarn add @faskai/ui-commons@0.0.0-alpha.01
9
+ Centralized marketing content for Beta features and offers that can be used across different projects with client-specific styling.
10
+
11
+ #### betaMarketingFeatures
12
+
13
+ Array of feature objects with emoji, title, and description:
14
+
15
+ ```tsx
16
+ import { betaMarketingFeatures } from '@faskai/ui-commons';
17
+
18
+ // Each feature contains:
19
+ // { emoji: string, title: string, description: string }
20
+ ```
21
+
22
+ **Features included:**
23
+ - ⚡ **Fastest Voice** - Industry-leading response times
24
+ - 🧠 **Self-Learning** - Fine-tune with your data
25
+ - 👆 **Easiest Setup** - 1-click deployment worldwide
26
+ - 🌍 **Any Language** - Human-sounding in 100+ languages
27
+ - 🎥 **Truly Multi-Modal** - Voice, Video, and Text channels
28
+ - 📈 **Massively Scalable** - Unlimited concurrent calls and agents
29
+
30
+ #### betaOfferData
31
+
32
+ Beta launch offer content with structured data:
33
+
34
+ ```tsx
35
+ import { betaOfferData } from '@faskai/ui-commons';
36
+
37
+ // Contains:
38
+ // - badge: "LIMITED TIME"
39
+ // - title: "🚀 Beta Launch Special"
40
+ // - description: string
41
+ // - callouts: Array<{emoji, title, description}>
42
+ // - cta: {text, url}
43
+ // - disclaimer: string
13
44
  ```
14
45
 
15
- ## Usage
46
+ **Callouts included:**
47
+ - 💰 **50% OFF First Year** - Exclusive Beta pricing
48
+ - 🤝 **Priority Support** - Direct access to founders
16
49
 
17
- ### GTM Provider
50
+ #### Usage Example
51
+
52
+ ```tsx
53
+ import { betaMarketingFeatures, betaOfferData } from '@faskai/ui-commons';
54
+
55
+ function BetaFeatures() {
56
+ return (
57
+ <section>
58
+ {/* Features */}
59
+ {betaMarketingFeatures.map((feature) => (
60
+ <div key={feature.title}>
61
+ <span>{feature.emoji}</span>
62
+ <h3>{feature.title}</h3>
63
+ <p>{feature.description}</p>
64
+ </div>
65
+ ))}
66
+
67
+ {/* Beta Offer */}
68
+ <div>
69
+ <h2>{betaOfferData.title}</h2>
70
+ <p>{betaOfferData.description}</p>
71
+ {betaOfferData.callouts.map((callout) => (
72
+ <div key={callout.title}>
73
+ <span>{callout.emoji}</span>
74
+ <h4>{callout.title}</h4>
75
+ <p>{callout.description}</p>
76
+ </div>
77
+ ))}
78
+ <a href={betaOfferData.cta.url}>{betaOfferData.cta.text}</a>
79
+ </div>
80
+ </section>
81
+ );
82
+ }
83
+ ```
84
+
85
+ ## Components
86
+
87
+ ### GTMProvider
88
+
89
+ Google Tag Manager integration for tracking and analytics.
18
90
 
19
91
  ```tsx
20
92
  import { GTMProvider } from '@faskai/ui-commons';
@@ -28,7 +100,24 @@ function App() {
28
100
  }
29
101
  ```
30
102
 
31
- ### Tracking Events
103
+ ## Installation
104
+
105
+ ```bash
106
+ npm install @faskai/ui-commons
107
+ # or
108
+ yarn add @faskai/ui-commons
109
+ ```
110
+
111
+ ## Dependencies
112
+
113
+ - React 18+
114
+ - No styling dependencies (bring your own CSS framework)
115
+
116
+ ## License
117
+
118
+ Private - Fask AI
119
+
120
+ ## Tracking Events
32
121
 
33
122
  ```tsx
34
123
  import { trackEvent, trackConversion, trackLinkedInConversion } from '@faskai/ui-commons';
@@ -64,16 +153,27 @@ yarn build
64
153
  yarn publish
65
154
  ```
66
155
 
67
- ## Adding New Components
156
+ ## Design Philosophy
157
+
158
+ This package follows a **data-driven approach**:
159
+
160
+ - **Content centralization**: Marketing copy and data managed in one place
161
+ - **Styling flexibility**: Each project implements its own design system
162
+ - **Type safety**: Full TypeScript support for all exports
163
+ - **Zero styling opinions**: No CSS dependencies or styling conflicts
164
+
165
+ ## Adding New Data
68
166
 
69
- 1. Create your component in `src/components/`
167
+ 1. Create your data export in `src/data/`
70
168
  2. Export it from `src/index.ts`
71
169
  3. Build the package with `yarn build`
72
- 4. The component will be available in all consuming projects
170
+ 4. Import and use in your client projects with custom styling
73
171
 
74
- ## Current Components
172
+ ## Current Exports
75
173
 
76
174
  - **GTMProvider**: Google Tag Manager integration
175
+ - **betaMarketingFeatures**: Beta feature content array
176
+ - **betaOfferData**: Beta offer structured data
77
177
  - **trackEvent**: Custom event tracking
78
178
  - **trackConversion**: Google Ads conversion tracking
79
179
  - **trackLinkedInConversion**: LinkedIn Ads conversion tracking
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface GTMProviderProps {
3
+ gtmId: string;
4
+ children: ReactNode;
5
+ }
6
+ export declare function GTMProvider({ gtmId, children }: GTMProviderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GTMProvider = GTMProvider;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const script_1 = __importDefault(require("next/script"));
9
+ function GTMProvider({ gtmId, children }) {
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(script_1.default, { id: "gtm-head", strategy: "afterInteractive", children: `
11
+ (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
12
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
13
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
14
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
15
+ })(window,document,'script','dataLayer','${gtmId}');
16
+ ` }), (0, jsx_runtime_1.jsx)("noscript", { children: (0, jsx_runtime_1.jsx)("iframe", { src: `https://www.googletagmanager.com/ns.html?id=${gtmId}`, height: "0", width: "0", style: { display: 'none', visibility: 'hidden' } }) }), children] }));
17
+ }
@@ -0,0 +1,2 @@
1
+ export { GTMProvider } from './gtm/gtm-provider';
2
+ export { default as BetaMarketingBanner } from './marketing/BetaMarketingBanner';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BetaMarketingBanner = exports.GTMProvider = void 0;
7
+ var gtm_provider_1 = require("./gtm/gtm-provider");
8
+ Object.defineProperty(exports, "GTMProvider", { enumerable: true, get: function () { return gtm_provider_1.GTMProvider; } });
9
+ var BetaMarketingBanner_1 = require("./marketing/BetaMarketingBanner");
10
+ Object.defineProperty(exports, "BetaMarketingBanner", { enumerable: true, get: function () { return __importDefault(BetaMarketingBanner_1).default; } });
@@ -0,0 +1,7 @@
1
+ interface BetaMarketingBannerProps {
2
+ variant?: 'full' | 'compact';
3
+ showBetaOffer?: boolean;
4
+ className?: string;
5
+ }
6
+ export default function BetaMarketingBanner({ variant, showBetaOffer, className, }: BetaMarketingBannerProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = BetaMarketingBanner;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const features = [
6
+ {
7
+ emoji: '⚡',
8
+ title: 'Fastest AI Voice Chat',
9
+ description: 'Industry-leading response times',
10
+ },
11
+ {
12
+ emoji: '🧠',
13
+ title: 'Self-Learning AI Agents',
14
+ description: 'Fine-tune with your data or bring your own LLM',
15
+ },
16
+ {
17
+ emoji: '👆',
18
+ title: 'Easiest Setup',
19
+ description: '1-click deployment worldwide',
20
+ },
21
+ {
22
+ emoji: '🌍',
23
+ title: 'Any Language',
24
+ description: 'Human-sounding in 100+ languages',
25
+ },
26
+ {
27
+ emoji: '🎥',
28
+ title: 'Truly Multi-Modal',
29
+ description: 'Voice, Video, and Text channels',
30
+ },
31
+ {
32
+ emoji: '📈',
33
+ title: 'Infinitely Scalable',
34
+ description: 'Grows with your business needs',
35
+ },
36
+ ];
37
+ function BetaMarketingBanner({ variant = 'full', showBetaOffer = true, className = '', }) {
38
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `relative overflow-hidden rounded-2xl bg-gradient-to-br from-gray-50 via-white to-gray-100 ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-gray-600 to-gray-800" }), (0, jsx_runtime_1.jsxs)("div", { className: "max-w-6xl mx-auto px-4 py-8 md:py-12", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-8 md:mb-12", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-3xl md:text-4xl font-bold mb-4 text-gray-900", children: "Best-in-Class AI Features" }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg text-gray-600 max-w-2xl mx-auto leading-relaxed", children: "Experience the future of customer engagement with our cutting-edge AI technology" })] }), (0, jsx_runtime_1.jsx)("div", { className: `grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6 ${showBetaOffer ? 'mb-12' : ''}`, children: features.map((feature, index) => ((0, jsx_runtime_1.jsxs)("div", { className: "group bg-white/70 backdrop-blur-sm rounded-xl p-6 border border-gray-100 hover:border-gray-200 hover:shadow-lg hover:-translate-y-1 transition-all duration-300 text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-14 h-14 rounded-full bg-gray-100 hover:bg-gray-200 flex items-center justify-center mx-auto mb-4 text-2xl shadow-md group-hover:shadow-lg transition-all duration-300", children: feature.emoji }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-gray-900 mb-2", children: feature.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 leading-relaxed", children: feature.description })] }, index))) }), showBetaOffer && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-green-50 to-blue-50 rounded-2xl border-2 border-green-200 p-6 md:p-8 relative overflow-hidden", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-green-100/20 to-blue-100/20 animate-pulse" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-8", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex justify-center mb-4", children: (0, jsx_runtime_1.jsx)("span", { className: "inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-green-500 text-white animate-pulse", children: "LIMITED TIME" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-2xl md:text-3xl font-bold text-gray-900 mb-2", children: "\uD83D\uDE80 Beta Launch Special" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 max-w-lg mx-auto leading-relaxed", children: "Join our exclusive Beta program and get unprecedented access to our founders and AI technology." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/60 backdrop-blur-sm rounded-xl p-6 border border-green-200 text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-4xl mb-3", children: "\uD83D\uDCB0" }), (0, jsx_runtime_1.jsx)("h4", { className: "text-lg font-semibold text-gray-900 mb-2", children: "50% OFF First Year" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 leading-relaxed", children: "Exclusive Beta pricing for early adopters. Save hundreds on your first year subscription." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/60 backdrop-blur-sm rounded-xl p-6 border border-green-200 text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-4xl mb-3", children: "\uD83E\uDD1D" }), (0, jsx_runtime_1.jsx)("h4", { className: "text-lg font-semibold text-gray-900 mb-2", children: "Priority Founder Support" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 leading-relaxed", children: "Get immediate, direct access to our founders for support, feature requests, and guidance." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("a", { href: "https://biz.fask.ai/billing?price-tier=beta&period=year", target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center px-8 py-3 rounded-lg bg-gray-900 hover:bg-gray-800 text-white font-semibold text-lg shadow-lg hover:shadow-xl hover:-translate-y-0.5 transition-all duration-300 border border-gray-900", children: "Subscribe Now" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-gray-500 mt-4 opacity-80", children: "* Billed annually. Beta offer valid for limited customers only." })] })] })] }))] })] }));
39
+ }
@@ -0,0 +1,24 @@
1
+ export declare const betaMarketingHeader: {
2
+ title: string;
3
+ description: string;
4
+ };
5
+ export declare const betaMarketingFeatures: {
6
+ emoji: string;
7
+ title: string;
8
+ description: string;
9
+ }[];
10
+ export declare const betaOfferData: {
11
+ badge: string;
12
+ title: string;
13
+ description: string;
14
+ callouts: {
15
+ emoji: string;
16
+ title: string;
17
+ description: string;
18
+ }[];
19
+ cta: {
20
+ text: string;
21
+ url: string;
22
+ };
23
+ disclaimer: string;
24
+ };
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.betaOfferData = exports.betaMarketingFeatures = exports.betaMarketingHeader = void 0;
4
+ exports.betaMarketingHeader = {
5
+ title: 'Best-in-Class AI Phone Calling',
6
+ description: 'Experience the future of customer engagement with our personalized inbound and outbound, voice and video calling AI.',
7
+ };
8
+ exports.betaMarketingFeatures = [
9
+ {
10
+ emoji: '⚡',
11
+ title: 'Fastest Voice',
12
+ description: 'Industry-leading response times',
13
+ },
14
+ {
15
+ emoji: '🧠',
16
+ title: 'Self-Learning',
17
+ description: 'Fine-tune with your data',
18
+ },
19
+ {
20
+ emoji: '👆',
21
+ title: 'Easiest Setup',
22
+ description: '1-click deployment worldwide',
23
+ },
24
+ {
25
+ emoji: '🌍',
26
+ title: 'Any Language',
27
+ description: 'Human-sounding in 100+ languages',
28
+ },
29
+ {
30
+ emoji: '🎥',
31
+ title: 'Truly Multi-Modal',
32
+ description: 'Voice, Video, and Text channels',
33
+ },
34
+ {
35
+ emoji: '📈',
36
+ title: 'Massively Scalable',
37
+ description: 'Unlimited concurrent calls and agents',
38
+ },
39
+ ];
40
+ exports.betaOfferData = {
41
+ badge: 'LIMITED TIME',
42
+ title: 'Beta Launch Special',
43
+ description: 'Join our exclusive Beta program and get unprecedented access to our founders and AI technology.',
44
+ callouts: [
45
+ {
46
+ emoji: '💰',
47
+ title: '50% OFF First Year',
48
+ description: 'Exclusive Beta pricing for early adopters. Save hundreds on your first year subscription.',
49
+ },
50
+ {
51
+ emoji: '🤝',
52
+ title: 'Priority Support',
53
+ description: 'Get immediate, direct access to our founders for support, feature requests, and guidance.',
54
+ },
55
+ ],
56
+ cta: {
57
+ text: 'Subscribe Now',
58
+ url: 'https://biz.fask.ai/billing?price-tier=beta&period=year',
59
+ },
60
+ disclaimer: 'Beta offer valid for limited customers only.',
61
+ };
@@ -0,0 +1,2 @@
1
+ export { GTMProvider } from './components/gtm/gtm-provider';
2
+ export { betaMarketingFeatures, betaMarketingHeader, betaOfferData } from './data/betaMarketingData';
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.betaOfferData = exports.betaMarketingHeader = exports.betaMarketingFeatures = exports.GTMProvider = void 0;
4
+ var gtm_provider_1 = require("./components/gtm/gtm-provider");
5
+ Object.defineProperty(exports, "GTMProvider", { enumerable: true, get: function () { return gtm_provider_1.GTMProvider; } });
6
+ var betaMarketingData_1 = require("./data/betaMarketingData");
7
+ Object.defineProperty(exports, "betaMarketingFeatures", { enumerable: true, get: function () { return betaMarketingData_1.betaMarketingFeatures; } });
8
+ Object.defineProperty(exports, "betaMarketingHeader", { enumerable: true, get: function () { return betaMarketingData_1.betaMarketingHeader; } });
9
+ Object.defineProperty(exports, "betaOfferData", { enumerable: true, get: function () { return betaMarketingData_1.betaOfferData; } });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@faskai/ui-commons",
3
3
  "author": "Fask AI <arko@fask.ai>",
4
- "version": "0.0.0-alpha.02",
5
- "description": "Common UI components and utilities for Fask applications",
4
+ "version": " 0.0.0-alpha.21",
5
+ "description": "Common UI components for Fask applications.",
6
6
  "private": false,
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -10,30 +10,17 @@
10
10
  "files": [
11
11
  "dist"
12
12
  ],
13
- "exports": {
14
- ".": {
15
- "require": "./dist/index.js",
16
- "types": "./dist/index.d.ts"
17
- }
18
- },
19
13
  "scripts": {
20
- "build": "tsc",
21
- "dev": "tsc --watch",
22
- "clean": "rm -rf dist",
23
- "prepare": "yarn build"
14
+ "build": "tsc"
24
15
  },
25
16
  "peerDependencies": {
26
- "next": "^14.0.0",
27
- "react": "^18.0.0",
28
- "react-dom": "^18.0.0"
17
+ "next": ">=13.0.0",
18
+ "react": ">=18.0.0"
29
19
  },
30
20
  "devDependencies": {
31
21
  "@types/react": "^18.0.0",
32
- "@types/react-dom": "^18.0.0",
33
- "@types/node": "^20.0.0",
34
- "typescript": "^5.0.0",
35
- "react": "^18.0.0",
36
- "react-dom": "^18.0.0"
22
+ "next": "^14.0.0",
23
+ "typescript": "^5.0.0"
37
24
  },
38
- "packageManager": "yarn@1.22.22"
39
- }
25
+ "dependencies": {}
26
+ }