@spark-apps/quickpeek 1.0.1 → 1.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.
- package/LICENSE +21 -0
- package/README.md +200 -101
- package/dist/assets/qp.wm +0 -0
- package/dist/highlight.css +15 -0
- package/dist/qp.js +6143 -0
- package/package.json +64 -46
- package/dist/api-client.d.ts +0 -61
- package/dist/api-client.d.ts.map +0 -1
- package/dist/api-client.js +0 -180
- package/dist/api-client.js.map +0 -1
- package/dist/config.d.ts +0 -69
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -43
- package/dist/config.js.map +0 -1
- package/dist/crawl.d.ts +0 -18
- package/dist/crawl.d.ts.map +0 -1
- package/dist/crawl.js +0 -175
- package/dist/crawl.js.map +0 -1
- package/dist/cursor.d.ts +0 -6
- package/dist/cursor.d.ts.map +0 -1
- package/dist/cursor.js +0 -6
- package/dist/cursor.js.map +0 -1
- package/dist/ffmpeg.d.ts +0 -50
- package/dist/ffmpeg.d.ts.map +0 -1
- package/dist/ffmpeg.js +0 -224
- package/dist/ffmpeg.js.map +0 -1
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -26
- package/dist/index.js.map +0 -1
- package/dist/prompts.d.ts +0 -13
- package/dist/prompts.d.ts.map +0 -1
- package/dist/prompts.js +0 -91
- package/dist/prompts.js.map +0 -1
- package/dist/styles.d.ts +0 -16
- package/dist/styles.d.ts.map +0 -1
- package/dist/styles.js +0 -66
- package/dist/styles.js.map +0 -1
- package/dist/tts.d.ts +0 -64
- package/dist/tts.d.ts.map +0 -1
- package/dist/tts.js +0 -236
- package/dist/tts.js.map +0 -1
- package/dist/utils.d.ts +0 -25
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -106
- package/dist/utils.js.map +0 -1
- package/dist/voices.d.ts +0 -2
- package/dist/voices.d.ts.map +0 -1
- package/dist/voices.js +0 -73
- package/dist/voices.js.map +0 -1
- package/dist/watermark.d.ts +0 -27
- package/dist/watermark.d.ts.map +0 -1
- package/dist/watermark.js +0 -57
- package/dist/watermark.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,46 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@spark-apps/quickpeek",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@spark-apps/quickpeek",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Auto-generate demo videos for your web app with AI",
|
|
5
|
+
"main": "dist/qp.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"quickpeek": "dist/qp.js",
|
|
8
|
+
"qp": "dist/qp.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "npx tsx src/qp.ts",
|
|
16
|
+
"build": "tsup",
|
|
17
|
+
"build:tsc": "tsc --noEmit",
|
|
18
|
+
"lint": "biome check src",
|
|
19
|
+
"lint:fix": "biome check --write src",
|
|
20
|
+
"format": "biome format --write src",
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"clean": "rm -rf dist",
|
|
23
|
+
"publish:cli": "npm publish --access public"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"demo",
|
|
27
|
+
"video",
|
|
28
|
+
"screen-recording",
|
|
29
|
+
"playwright",
|
|
30
|
+
"ai",
|
|
31
|
+
"tts",
|
|
32
|
+
"voiceover",
|
|
33
|
+
"automation",
|
|
34
|
+
"cli",
|
|
35
|
+
"documentation"
|
|
36
|
+
],
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"chalk": "^5.6.2",
|
|
40
|
+
"dotenv": "^17.3.1",
|
|
41
|
+
"figlet": "^1.11.0",
|
|
42
|
+
"gradient-string": "^3.0.0",
|
|
43
|
+
"msedge-tts": "^2.0.4",
|
|
44
|
+
"ora": "^9.3.0",
|
|
45
|
+
"playwright": "^1.58.2"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@biomejs/biome": "^2.4.8",
|
|
49
|
+
"@types/node": "^20.19.37",
|
|
50
|
+
"tsup": "^8.5.1",
|
|
51
|
+
"tsx": "^4.21.0",
|
|
52
|
+
"typescript": "^5.9.3",
|
|
53
|
+
"vitest": "^4.1.0"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.0.0"
|
|
57
|
+
},
|
|
58
|
+
"pnpm": {
|
|
59
|
+
"onlyBuiltDependencies": [
|
|
60
|
+
"esbuild",
|
|
61
|
+
"msedge-tts"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
package/dist/api-client.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified API client for groq-backend and stripe-backend
|
|
3
|
-
* SaaS-ready: No CLI-specific code, pure functions with dependency injection
|
|
4
|
-
*/
|
|
5
|
-
import type { UserTier } from './config.js';
|
|
6
|
-
export interface RateLimitInfo {
|
|
7
|
-
used: number;
|
|
8
|
-
limit: number;
|
|
9
|
-
tier: UserTier;
|
|
10
|
-
resetAt?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface AIResponse {
|
|
13
|
-
success: true;
|
|
14
|
-
content: string;
|
|
15
|
-
limits: RateLimitInfo;
|
|
16
|
-
}
|
|
17
|
-
export interface AIError {
|
|
18
|
-
success: false;
|
|
19
|
-
error: string;
|
|
20
|
-
isRateLimit?: boolean;
|
|
21
|
-
isAuthError?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export type AIResult = AIResponse | AIError;
|
|
24
|
-
export interface SubscriptionStatus {
|
|
25
|
-
status: 'active' | 'trialing' | 'lifetime' | 'past_due' | 'canceled' | null;
|
|
26
|
-
currentPeriodEnd?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get API credentials from environment
|
|
30
|
-
*/
|
|
31
|
-
export declare function getCredentials(): {
|
|
32
|
-
appId: string;
|
|
33
|
-
appSecret: string;
|
|
34
|
-
} | null;
|
|
35
|
-
/**
|
|
36
|
-
* Check if API credentials are configured
|
|
37
|
-
*/
|
|
38
|
-
export declare function hasCredentials(): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Call AI via groq-backend proxy
|
|
41
|
-
* Returns structured response with rate limit info
|
|
42
|
-
*/
|
|
43
|
-
export declare function callAI(systemPrompt: string, userPrompt: string, userEmail: string): Promise<AIResult>;
|
|
44
|
-
/**
|
|
45
|
-
* Check subscription status via stripe-backend
|
|
46
|
-
*/
|
|
47
|
-
export declare function checkSubscription(userEmail: string, appId?: string): Promise<SubscriptionStatus>;
|
|
48
|
-
/**
|
|
49
|
-
* Determine user tier based on subscription status
|
|
50
|
-
*/
|
|
51
|
-
export declare function getTier(userEmail: string): Promise<UserTier>;
|
|
52
|
-
/**
|
|
53
|
-
* Check if watermark should be applied
|
|
54
|
-
* Watermark applies to free tier videos longer than 20 seconds
|
|
55
|
-
*/
|
|
56
|
-
export declare function shouldWatermark(tier: UserTier, videoDurationSeconds: number): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Get upgrade URL for pricing page
|
|
59
|
-
*/
|
|
60
|
-
export declare function getUpgradeUrl(userEmail?: string): string;
|
|
61
|
-
//# sourceMappingURL=api-client.d.ts.map
|
package/dist/api-client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAYD;;GAEG;AACH,wBAAgB,cAAc,IAAI;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAS5E;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAYD;;;GAGG;AACH,wBAAsB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuE3G;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAgCtG;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAsBlE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAErF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAWxD"}
|
package/dist/api-client.js
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified API client for groq-backend and stripe-backend
|
|
3
|
-
* SaaS-ready: No CLI-specific code, pure functions with dependency injection
|
|
4
|
-
*/
|
|
5
|
-
// Environment variable names
|
|
6
|
-
const ENV_APP_ID = 'QP_APP_ID';
|
|
7
|
-
const ENV_APP_SECRET = 'QP_APP_SECRET';
|
|
8
|
-
const ENV_GROQ_BACKEND = 'QP_GROQ_BACKEND';
|
|
9
|
-
const ENV_STRIPE_BACKEND = 'QP_STRIPE_BACKEND';
|
|
10
|
-
// Default backend URLs
|
|
11
|
-
const DEFAULT_GROQ_BACKEND = 'https://groq-backend.vercel.app';
|
|
12
|
-
const DEFAULT_STRIPE_BACKEND = 'https://sparkstripe.com';
|
|
13
|
-
/**
|
|
14
|
-
* Get API credentials from environment
|
|
15
|
-
*/
|
|
16
|
-
export function getCredentials() {
|
|
17
|
-
const appId = process.env[ENV_APP_ID];
|
|
18
|
-
const appSecret = process.env[ENV_APP_SECRET];
|
|
19
|
-
if (!appId || !appSecret) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
return { appId, appSecret };
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Check if API credentials are configured
|
|
26
|
-
*/
|
|
27
|
-
export function hasCredentials() {
|
|
28
|
-
return getCredentials() !== null;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Get backend URLs from environment or defaults
|
|
32
|
-
*/
|
|
33
|
-
function getBackendUrls() {
|
|
34
|
-
return {
|
|
35
|
-
groq: process.env[ENV_GROQ_BACKEND] || DEFAULT_GROQ_BACKEND,
|
|
36
|
-
stripe: process.env[ENV_STRIPE_BACKEND] || DEFAULT_STRIPE_BACKEND,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Call AI via groq-backend proxy
|
|
41
|
-
* Returns structured response with rate limit info
|
|
42
|
-
*/
|
|
43
|
-
export async function callAI(systemPrompt, userPrompt, userEmail) {
|
|
44
|
-
const credentials = getCredentials();
|
|
45
|
-
if (!credentials) {
|
|
46
|
-
return {
|
|
47
|
-
success: false,
|
|
48
|
-
error: `Missing API credentials. Set ${ENV_APP_ID} and ${ENV_APP_SECRET} environment variables.`,
|
|
49
|
-
isAuthError: true,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
if (!userEmail) {
|
|
53
|
-
return {
|
|
54
|
-
success: false,
|
|
55
|
-
error: 'User email is required for API access.',
|
|
56
|
-
isAuthError: true,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const { groq } = getBackendUrls();
|
|
60
|
-
try {
|
|
61
|
-
const response = await fetch(`${groq}/api/chat`, {
|
|
62
|
-
method: 'POST',
|
|
63
|
-
headers: { 'Content-Type': 'application/json' },
|
|
64
|
-
body: JSON.stringify({
|
|
65
|
-
appId: credentials.appId,
|
|
66
|
-
appSecret: credentials.appSecret,
|
|
67
|
-
userEmail,
|
|
68
|
-
model: 'llama-3.3-70b-versatile',
|
|
69
|
-
messages: [
|
|
70
|
-
{ role: 'system', content: systemPrompt },
|
|
71
|
-
{ role: 'user', content: userPrompt },
|
|
72
|
-
],
|
|
73
|
-
}),
|
|
74
|
-
});
|
|
75
|
-
const data = await response.json();
|
|
76
|
-
if (!data.success) {
|
|
77
|
-
const error = data.error || 'Unknown API error';
|
|
78
|
-
const isRateLimit = error.toLowerCase().includes('rate limit');
|
|
79
|
-
const isAuthError = error.toLowerCase().includes('invalid') ||
|
|
80
|
-
error.toLowerCase().includes('unknown app') ||
|
|
81
|
-
error.toLowerCase().includes('secret');
|
|
82
|
-
return {
|
|
83
|
-
success: false,
|
|
84
|
-
error,
|
|
85
|
-
isRateLimit,
|
|
86
|
-
isAuthError,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
success: true,
|
|
91
|
-
content: data.response,
|
|
92
|
-
limits: {
|
|
93
|
-
used: data.limits?.used ?? 0,
|
|
94
|
-
limit: data.limits?.limit ?? 50,
|
|
95
|
-
tier: data.limits?.tier ?? 'free',
|
|
96
|
-
resetAt: data.limits?.resetAt,
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
catch (err) {
|
|
101
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
102
|
-
return {
|
|
103
|
-
success: false,
|
|
104
|
-
error: `Network error: ${message}`,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Check subscription status via stripe-backend
|
|
110
|
-
*/
|
|
111
|
-
export async function checkSubscription(userEmail, appId) {
|
|
112
|
-
const credentials = getCredentials();
|
|
113
|
-
const effectiveAppId = appId || credentials?.appId;
|
|
114
|
-
if (!effectiveAppId) {
|
|
115
|
-
return { status: null };
|
|
116
|
-
}
|
|
117
|
-
const { stripe } = getBackendUrls();
|
|
118
|
-
try {
|
|
119
|
-
const params = new URLSearchParams({
|
|
120
|
-
email: userEmail,
|
|
121
|
-
app_id: effectiveAppId,
|
|
122
|
-
});
|
|
123
|
-
const response = await fetch(`${stripe}/api/subscription/status-public?${params}`);
|
|
124
|
-
if (!response.ok) {
|
|
125
|
-
return { status: null };
|
|
126
|
-
}
|
|
127
|
-
const data = await response.json();
|
|
128
|
-
const subscription = data.subscription;
|
|
129
|
-
return {
|
|
130
|
-
status: subscription?.status ?? null,
|
|
131
|
-
currentPeriodEnd: subscription?.current_period_end,
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
catch {
|
|
135
|
-
return { status: null };
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Determine user tier based on subscription status
|
|
140
|
-
*/
|
|
141
|
-
export async function getTier(userEmail) {
|
|
142
|
-
const subscription = await checkSubscription(userEmail);
|
|
143
|
-
if (!subscription.status) {
|
|
144
|
-
return 'free';
|
|
145
|
-
}
|
|
146
|
-
// Pro statuses: active subscription, lifetime purchase, or valid trial
|
|
147
|
-
const proStatuses = ['active', 'trialing', 'lifetime'];
|
|
148
|
-
if (proStatuses.includes(subscription.status)) {
|
|
149
|
-
// For trialing, check if still valid
|
|
150
|
-
if (subscription.status === 'trialing' && subscription.currentPeriodEnd) {
|
|
151
|
-
const endDate = new Date(subscription.currentPeriodEnd);
|
|
152
|
-
if (endDate <= new Date()) {
|
|
153
|
-
return 'free';
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return 'pro';
|
|
157
|
-
}
|
|
158
|
-
return 'free';
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Check if watermark should be applied
|
|
162
|
-
* Watermark applies to free tier videos longer than 20 seconds
|
|
163
|
-
*/
|
|
164
|
-
export function shouldWatermark(tier, videoDurationSeconds) {
|
|
165
|
-
return tier === 'free' && videoDurationSeconds > 20;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Get upgrade URL for pricing page
|
|
169
|
-
*/
|
|
170
|
-
export function getUpgradeUrl(userEmail) {
|
|
171
|
-
const credentials = getCredentials();
|
|
172
|
-
const { stripe } = getBackendUrls();
|
|
173
|
-
const appId = credentials?.appId || 'quickpeek';
|
|
174
|
-
let url = `${stripe}/pricing/${appId}`;
|
|
175
|
-
if (userEmail) {
|
|
176
|
-
url += `?email=${encodeURIComponent(userEmail)}`;
|
|
177
|
-
}
|
|
178
|
-
return url;
|
|
179
|
-
}
|
|
180
|
-
//# sourceMappingURL=api-client.js.map
|
package/dist/api-client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH,6BAA6B;AAC7B,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,cAAc,GAAG,eAAe,CAAC;AACvC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAC3C,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAE/C,uBAAuB;AACvB,MAAM,oBAAoB,GAAG,iCAAiC,CAAC;AAC/D,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AAEzD;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAE9C,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,cAAc,EAAE,KAAK,IAAI,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,SAAS,cAAc;IACrB,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,oBAAoB;QAC3D,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI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,YAAY,CAAC,gBAAgB,CAAC,CAAC;YACxD,IAAI,OAAO,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;gBAC1B,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAc,EAAE,oBAA4B;IAC1E,OAAO,IAAI,KAAK,MAAM,IAAI,oBAAoB,GAAG,EAAE,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAkB;IAC9C,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,WAAW,EAAE,KAAK,IAAI,WAAW,CAAC;IAEhD,IAAI,GAAG,GAAG,GAAG,MAAM,YAAY,KAAK,EAAE,CAAC;IACvC,IAAI,SAAS,EAAE,CAAC;QACd,GAAG,IAAI,UAAU,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC;IACnD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/config.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration types and defaults for QuickPeek
|
|
3
|
-
*/
|
|
4
|
-
export declare const VERSION = "1.2.0";
|
|
5
|
-
export declare const CONFIG_FILE = "quickpeek.config.json";
|
|
6
|
-
export type UserTier = 'free' | 'pro';
|
|
7
|
-
export interface UserConfig {
|
|
8
|
-
email?: string;
|
|
9
|
-
tier?: UserTier;
|
|
10
|
-
}
|
|
11
|
-
export interface Config {
|
|
12
|
-
lang?: string;
|
|
13
|
-
user?: UserConfig;
|
|
14
|
-
plan?: {
|
|
15
|
-
maxSteps: number;
|
|
16
|
-
};
|
|
17
|
-
video: {
|
|
18
|
-
width: number;
|
|
19
|
-
height: number;
|
|
20
|
-
format: string;
|
|
21
|
-
preset: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium' | 'slow' | 'slower' | 'veryslow';
|
|
22
|
-
quality: number;
|
|
23
|
-
fps: number;
|
|
24
|
-
cursor: boolean;
|
|
25
|
-
highlight: boolean;
|
|
26
|
-
fadeIn: number;
|
|
27
|
-
fadeOut: number;
|
|
28
|
-
transition: 'none' | 'fade';
|
|
29
|
-
contrast: number;
|
|
30
|
-
};
|
|
31
|
-
audio?: {
|
|
32
|
-
voice?: string;
|
|
33
|
-
format: string;
|
|
34
|
-
bitrate: string;
|
|
35
|
-
};
|
|
36
|
-
music?: {
|
|
37
|
-
path: string;
|
|
38
|
-
volume: number;
|
|
39
|
-
fadeIn: number;
|
|
40
|
-
fadeOut: number;
|
|
41
|
-
};
|
|
42
|
-
intro?: {
|
|
43
|
-
enabled: boolean;
|
|
44
|
-
text?: string;
|
|
45
|
-
};
|
|
46
|
-
timing: {
|
|
47
|
-
minStepDuration: number;
|
|
48
|
-
};
|
|
49
|
-
output: {
|
|
50
|
-
dir: string;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export interface CaptionWordStyle {
|
|
54
|
-
color: string;
|
|
55
|
-
size: number;
|
|
56
|
-
bold: boolean;
|
|
57
|
-
}
|
|
58
|
-
export interface CaptionStyle {
|
|
59
|
-
font: string;
|
|
60
|
-
outline: string;
|
|
61
|
-
outlineWidth: number;
|
|
62
|
-
shadow: number;
|
|
63
|
-
marginBottom: number;
|
|
64
|
-
regular: CaptionWordStyle;
|
|
65
|
-
highlight: CaptionWordStyle;
|
|
66
|
-
}
|
|
67
|
-
export declare const DEFAULT_CONFIG: Config;
|
|
68
|
-
export declare const DEFAULT_CAPTIONS: CaptionStyle;
|
|
69
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.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AAO,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,EAAE,gBAAgB,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,EAAE,MAmB5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAgB9B,CAAC"}
|
package/dist/config.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration types and defaults for QuickPeek
|
|
3
|
-
*/
|
|
4
|
-
export const VERSION = '1.2.0';
|
|
5
|
-
export const CONFIG_FILE = 'quickpeek.config.json';
|
|
6
|
-
export const DEFAULT_CONFIG = {
|
|
7
|
-
plan: { maxSteps: 8 },
|
|
8
|
-
video: {
|
|
9
|
-
width: 1080,
|
|
10
|
-
height: 1920,
|
|
11
|
-
format: 'mp4',
|
|
12
|
-
preset: 'fast',
|
|
13
|
-
quality: 0.5,
|
|
14
|
-
fps: 30,
|
|
15
|
-
cursor: true,
|
|
16
|
-
highlight: false,
|
|
17
|
-
fadeIn: 0.3,
|
|
18
|
-
fadeOut: 0.3,
|
|
19
|
-
transition: 'none',
|
|
20
|
-
contrast: 0.25,
|
|
21
|
-
},
|
|
22
|
-
audio: { format: 'mp3', bitrate: '192k' },
|
|
23
|
-
timing: { minStepDuration: 1500 },
|
|
24
|
-
output: { dir: './demo' },
|
|
25
|
-
};
|
|
26
|
-
export const DEFAULT_CAPTIONS = {
|
|
27
|
-
font: 'Arial',
|
|
28
|
-
outline: '#000000',
|
|
29
|
-
outlineWidth: 3,
|
|
30
|
-
shadow: 2,
|
|
31
|
-
marginBottom: 80,
|
|
32
|
-
regular: {
|
|
33
|
-
color: '#FFFFFF',
|
|
34
|
-
size: 56,
|
|
35
|
-
bold: true,
|
|
36
|
-
},
|
|
37
|
-
highlight: {
|
|
38
|
-
color: '#FFFF00',
|
|
39
|
-
size: 64,
|
|
40
|
-
bold: true,
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAC/B,MAAM,CAAC,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAoEnD,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;IACrB,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,GAAG;QACZ,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,GAAG;QACX,OAAO,EAAE,GAAG;QACZ,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,IAAI;KACf;IACD,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE;IACzC,MAAM,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;IACjC,MAAM,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,CAAC;IACf,MAAM,EAAE,CAAC;IACT,YAAY,EAAE,EAAE;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,IAAI;KACX;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,IAAI;KACX;CACF,CAAC"}
|
package/dist/crawl.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Page crawling and interactive element extraction
|
|
3
|
-
*/
|
|
4
|
-
export interface ElementInfo {
|
|
5
|
-
type: string;
|
|
6
|
-
text: string;
|
|
7
|
-
selector: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Crawl a page and extract interactive elements with smart selectors
|
|
11
|
-
*/
|
|
12
|
-
export declare function crawlPage(url: string, task: (text: string) => {
|
|
13
|
-
succeed: (text?: string) => void;
|
|
14
|
-
}): Promise<{
|
|
15
|
-
title: string;
|
|
16
|
-
elements: ElementInfo[];
|
|
17
|
-
}>;
|
|
18
|
-
//# sourceMappingURL=crawl.d.ts.map
|
package/dist/crawl.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crawl.d.ts","sourceRoot":"","sources":["../src/crawl.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAaD;;GAEG;AACH,wBAAsB,SAAS,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;IAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAC3D,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAqKrD"}
|