@quicktalog/common 1.16.0 → 1.23.0

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/constants.js CHANGED
@@ -60,25 +60,25 @@ export const layouts = [
60
60
  {
61
61
  key: "variant_1",
62
62
  label: "Side Image",
63
- image: "/layouts/layout_1v_2.jpg",
63
+ image: "/layouts/variant_1.jpg",
64
64
  description: "Grid layout: Catalogue items are displayed in a responsive grid (1 column on mobile, 2 on desktop), with images and details shown together. Best for balanced, easy-to-browse catalogues.",
65
65
  },
66
66
  {
67
67
  key: "variant_2",
68
68
  label: "Top Image",
69
- image: "/layouts/layout_2v_2.jpg",
69
+ image: "/layouts/variant_2.jpg",
70
70
  description: "Horizontal card layout: Catalogue items are arranged in flexible horizontal cards, wrapping as needed. Ideal for showcasing items with wide images or for a modern, card-based look.",
71
71
  },
72
72
  {
73
73
  key: "variant_3",
74
74
  label: "Text Only",
75
- image: "/layouts/layout_3v_2.jpg",
75
+ image: "/layouts/variant_3.jpg",
76
76
  description: "Alternative grid layout: Similar to Layout 1 but with subtle style differences, such as spacing or card appearance. Useful for catalogues needing a slightly different grid presentation. This layout does not contain image.",
77
77
  },
78
78
  {
79
79
  key: "variant_4",
80
80
  label: "Carousel",
81
- image: "/layouts/layout_4v_2.jpg",
81
+ image: "/layouts/variant_4.jpg",
82
82
  description: "Carousel layout: Catalogue items are displayed in a horizontal scrollable carousel, allowing users to swipe or scroll through items. Great for featured items or visually rich catalogues.",
83
83
  },
84
84
  ];
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@quicktalog/common",
3
- "version": "1.16.0",
3
+ "version": "1.23.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
7
10
  "scripts": {
8
11
  "build": "tsc",
9
- "prepare": "husky install"
12
+ "prepare": "husky"
10
13
  },
11
14
  "devDependencies": {
12
15
  "husky": "^9.1.7",
@@ -16,5 +19,9 @@
16
19
  "@types/glob": "^8.0.0",
17
20
  "glob": "^8.1.0",
18
21
  "minimatch": "^9.0.2"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "registry": "https://registry.npmjs.org/"
19
26
  }
20
27
  }
@@ -1,31 +0,0 @@
1
- name: Publish to npm
2
-
3
- on:
4
- push:
5
- branches:
6
- - main # or 'release' if you prefer
7
-
8
- jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v4
15
-
16
- - name: Setup Node.js
17
- uses: actions/setup-node@v4
18
- with:
19
- node-version: 22
20
- registry-url: "https://registry.npmjs.org/"
21
-
22
- - name: Install dependencies
23
- run: npm ci
24
-
25
- - name: Build (optional)
26
- run: npm run build --if-present
27
-
28
- - name: Publish package
29
- run: npm publish --access public
30
- env:
31
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.husky/pre-push DELETED
@@ -1 +0,0 @@
1
- npm version minor
package/src/constants.ts DELETED
@@ -1,98 +0,0 @@
1
- export const themes = [
2
- {
3
- id: 1,
4
- key: "theme-advent-1",
5
- label: "Advent 1",
6
- description:
7
- "A warm and festive theme inspired by the spirit of anticipation and celebration. Advent combines cozy winter tones, gentle contrasts, and elegant typography to evoke a sense of calm preparation and joyful expectation. Ideal for holiday campaigns, seasonal landing pages, or storytelling experiences that blend warmth, tradition, and modern simplicity.",
8
- type: "light",
9
- },
10
- {
11
- id: 2,
12
- key: "theme-advent-2",
13
- label: "Advent 2",
14
- description:
15
- "A warm and festive theme inspired by the spirit of anticipation and celebration. Advent combines cozy winter tones, gentle contrasts, and elegant typography to evoke a sense of calm preparation and joyful expectation. Ideal for holiday campaigns, seasonal landing pages, or storytelling experiences that blend warmth, tradition, and modern simplicity.",
16
- type: "light",
17
- },
18
- {
19
- id: 3,
20
- key: "theme-monochrome",
21
- label: "Monochrome",
22
- description:
23
- "A high-contrast, minimalist look focused on clarity and modern professionalism. Ideal for products that value simplicity, readability, and a timeless aesthetic.",
24
- type: "light",
25
- },
26
- {
27
- id: 4,
28
- key: "theme-elegant",
29
- label: "Elegant",
30
- description:
31
- "A dark, refined theme with a subtle gradient background, light text, and cool blue accents. Ideal for upscale or modern venues seeking a sophisticated, minimal look. Uses serif headings and clean layouts for a premium feel.",
32
- type: "dark",
33
- },
34
- {
35
- id: 5,
36
- key: "theme-organic",
37
- label: "Organic",
38
- description:
39
- "A fresh, natural theme with light beige backgrounds, green and brown accents, and soft, rounded typography. Ideal for organic, vegan, or eco-friendly restaurants seeking a wholesome, earthy vibe.",
40
- type: "light",
41
- },
42
- {
43
- id: 6,
44
- key: "theme-modern",
45
- label: "Modern",
46
- description:
47
- "A bold, contemporary theme with deep blue backgrounds, white and pink accents, and modern sans-serif typography. Perfect for trendy or urban venues wanting a striking, energetic appearance.",
48
- type: "dark",
49
- },
50
- {
51
- id: 7,
52
- key: "theme-luxury",
53
- label: "Luxury",
54
- description:
55
- "A light, luxurious theme with gold and cream tones, dark elegant text, and premium accents. Designed for high-end restaurants, it features classic serif headings, gold highlights, and a soft, inviting background.",
56
- type: "light",
57
- },
58
- {
59
- id: 8,
60
- key: "theme-creative",
61
- label: "Creative",
62
- description:
63
- "A vibrant, artistic theme with dark backgrounds, bright accent colors (red, yellow, blue), and playful, bold typography. Great for creative spaces, cafes, or venues wanting a fun, expressive look.",
64
- type: "dark",
65
- },
66
- ];
67
-
68
- export const layouts = [
69
- {
70
- key: "variant_1",
71
- label: "Side Image",
72
- image: "/layouts/layout_1v_2.jpg",
73
- description:
74
- "Grid layout: Catalogue items are displayed in a responsive grid (1 column on mobile, 2 on desktop), with images and details shown together. Best for balanced, easy-to-browse catalogues.",
75
- },
76
- {
77
- key: "variant_2",
78
- label: "Top Image",
79
- image: "/layouts/layout_2v_2.jpg",
80
- description:
81
- "Horizontal card layout: Catalogue items are arranged in flexible horizontal cards, wrapping as needed. Ideal for showcasing items with wide images or for a modern, card-based look.",
82
- },
83
- {
84
- key: "variant_3",
85
- label: "Text Only",
86
- image: "/layouts/layout_3v_2.jpg",
87
- description:
88
- "Alternative grid layout: Similar to Layout 1 but with subtle style differences, such as spacing or card appearance. Useful for catalogues needing a slightly different grid presentation. This layout does not contain image.",
89
- },
90
- {
91
- key: "variant_4",
92
- label: "Carousel",
93
- image: "/layouts/layout_4v_2.jpg",
94
- description:
95
- "Carousel layout: Catalogue items are displayed in a horizontal scrollable carousel, allowing users to swipe or scroll through items. Great for featured items or visually rich catalogues.",
96
- },
97
- ];
98
- export const DEFAULT_EMAIL = "quicktalog@outlook.com";
package/src/helpers.ts DELETED
@@ -1,35 +0,0 @@
1
- export async function fetchImageFromUnsplash(query: string): Promise<string> {
2
- try {
3
- const res = await fetch(
4
- `https://api.unsplash.com/search/photos?page=1&per_page=1&query=${encodeURIComponent(
5
- query
6
- )}`,
7
- {
8
- headers: {
9
- Authorization: `Client-ID ${process.env.UNSPLASH_API_KEY}`,
10
- },
11
- }
12
- );
13
-
14
- const data = await res.json();
15
-
16
- if (data?.results?.[0]?.urls?.regular) {
17
- return data.results[0].urls.regular;
18
- }
19
- } catch (err) {
20
- console.error(`Failed to fetch image for "${query}":`, err);
21
- }
22
-
23
- return "https://static1.squarespace.com/static/5898e29c725e25e7132d5a5a/58aa11bc9656ca13c4524c68/58aa11e99656ca13c45253e2/1487540713345/600x400-Image-Placeholder.jpg?format=original";
24
- }
25
-
26
- export const generateUniqueSlug = (name: string) => {
27
- const slug = name
28
- .toLowerCase()
29
- .trim()
30
- .replace(/\s+/g, "-")
31
- .replace(/-+/g, "-")
32
- .replace(/^-|-$/g, "");
33
-
34
- return slug;
35
- };
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from "./constants";
2
- export * from "./helpers";
3
- export * from "./types";
4
- export * from "./pricing";
package/src/pricing.ts DELETED
@@ -1,143 +0,0 @@
1
- import { PricingPlan } from "./types";
2
-
3
- export const tiers: PricingPlan[] = [
4
- {
5
- id: 0,
6
- name: "Starter",
7
- type: "standard",
8
- priceId: {
9
- month: "pri_01k27ajepm199twd1x77rpwdrq",
10
- year: "pri_01k27ajepm199twd1x77rpwdrq",
11
- },
12
- description:
13
- "Perfect for individuals and small businesses getting started.",
14
- features: {
15
- support: "Email support",
16
- catalogues: 1,
17
- newsletter: false,
18
- ocr_ai_import: 0,
19
- traffic_limit: 500,
20
- branding: false,
21
- custom_features: false,
22
- analytics: "Basic",
23
- ai_prompts: 0,
24
- categories_per_catalogue: 3,
25
- items_per_catalogue: 15,
26
- },
27
- },
28
- {
29
- id: 1,
30
- name: "Basic",
31
- type: "standard",
32
- priceId: {
33
- month: "pri_01k7bm6p3pnskk0k71akh10mp5",
34
- year: "pri_01k7bme4em8fr22gztzeayny74",
35
- },
36
- description: "Perfect fit for small businesses to digitalize their offer.",
37
- features: {
38
- support: "Email support",
39
- catalogues: 1,
40
- newsletter: false,
41
- ocr_ai_import: 0,
42
- traffic_limit: 2000,
43
- branding: true,
44
- custom_features: false,
45
- analytics: "Basic",
46
- ai_prompts: 0,
47
- categories_per_catalogue: 6,
48
- items_per_catalogue: 30,
49
- },
50
- },
51
- {
52
- id: 2,
53
- name: "Pro",
54
- type: "standard",
55
- priceId: {
56
- month: "pri_01k277hdtkkb1xdbz6karkqek9",
57
- year: "pri_01k277q6ftcjfzy9v7xhe6ckdt",
58
- },
59
- description: "Ideal for growing businesses with multiple services.",
60
- features: {
61
- support: "Email support",
62
- catalogues: 6,
63
- newsletter: false,
64
- ocr_ai_import: 0,
65
- traffic_limit: 5000,
66
- branding: true,
67
- custom_features: false,
68
- analytics: "Basic",
69
- ai_prompts: 10,
70
- categories_per_catalogue: 15,
71
- items_per_catalogue: 100,
72
- },
73
- },
74
- {
75
- id: 3,
76
- name: "Growth",
77
- type: "standard",
78
- priceId: {
79
- month: "pri_01k277kkzqz4ef7nc786ssnw6x",
80
- year: "pri_01k277r7p899gfn5nn3ne87pww",
81
- },
82
- description: "Built for teams that need advanced features and analytics.",
83
- features: {
84
- support: "Email & Chat support",
85
- catalogues: 20,
86
- newsletter: true,
87
- ocr_ai_import: 10,
88
- traffic_limit: 15000,
89
- branding: true,
90
- custom_features: false,
91
- analytics: "Advanced",
92
- ai_prompts: 25,
93
- categories_per_catalogue: 30,
94
- items_per_catalogue: 200,
95
- },
96
- },
97
- {
98
- id: 4,
99
- name: "Premium",
100
- type: "standard",
101
- priceId: {
102
- month: "pri_01k277mzp3tgy7n5wvrsa5v0sx",
103
- year: "pri_01k277see7qtyq30kc5g3vyqy9",
104
- },
105
- description: "Enterprise-grade solution with unlimited possibilities.",
106
- features: {
107
- support: "Priority Support (Email, Chat, Meeting)",
108
- catalogues: 50,
109
- newsletter: true,
110
- ocr_ai_import: 20,
111
- traffic_limit: 40000,
112
- branding: true,
113
- custom_features: true,
114
- analytics: "Advanced",
115
- ai_prompts: 50,
116
- categories_per_catalogue: 50,
117
- items_per_catalogue: 300,
118
- },
119
- },
120
- {
121
- id: 5,
122
- name: "German Silva Custom Plan",
123
- type: "custom",
124
- priceId: {
125
- month: "pri_01k81jpe1487tnvtr4gzmd9jmq",
126
- year: "pri_01k81jpe1487tnvtr4gzmd9jmq",
127
- },
128
- description: "Custom plan tailored for needs of German Silva.",
129
- features: {
130
- support: "Email",
131
- catalogues: 1,
132
- newsletter: false,
133
- ocr_ai_import: 0,
134
- traffic_limit: 4000,
135
- branding: true,
136
- custom_features: false,
137
- analytics: "Basic",
138
- ai_prompts: 0,
139
- categories_per_catalogue: 20,
140
- items_per_catalogue: 200,
141
- },
142
- },
143
- ];
package/src/types.ts DELETED
@@ -1,171 +0,0 @@
1
- import { layouts, themes } from "./constants";
2
-
3
- export type Status =
4
- | "active"
5
- | "inactive"
6
- | "draft"
7
- | "in preparation"
8
- | "error";
9
-
10
- export type CookiePreferences = {
11
- accepted: boolean;
12
- essential: boolean;
13
- analytics: boolean;
14
- marketing: boolean;
15
- timestamp: string;
16
- version: string;
17
- };
18
-
19
- export type CategoryItem = {
20
- name: string;
21
- description: string;
22
- price: string;
23
- image: string;
24
- };
25
-
26
- export type Theme = {
27
- key: string;
28
- label: string;
29
- image: string;
30
- description: string;
31
- };
32
-
33
- export type Layout = Theme;
34
-
35
- export type ThemeVariant = (typeof themes)[number]["key"];
36
- export type LayoutVariant = (typeof layouts)[number]["key"];
37
-
38
- export type CatalogueCategory = {
39
- order: number;
40
- name: string;
41
- layout: LayoutVariant;
42
- items: CategoryItem[];
43
- };
44
- export type Catalogue = {
45
- id?: string;
46
- name: string;
47
- status: Status;
48
- created_by?: string;
49
- theme: ThemeVariant;
50
- logo?: string;
51
- title: string;
52
- currency: string;
53
- contact?: ContactInfo[];
54
- subtitle?: string;
55
- services: CatalogueCategory[];
56
- partners?: Partner[];
57
- legal?: Legal;
58
- configuration?: Configuration;
59
- created_at?: string;
60
- updated_at?: string;
61
- source?: string;
62
- };
63
-
64
- export type CatalogueFormData = Omit<Catalogue, "id" | "created_by" | "">;
65
-
66
- export type Legal = {
67
- name?: string;
68
- address?: string;
69
- terms_and_conditions?: string;
70
- privacy_policy?: string;
71
- };
72
-
73
- export type Partner = {
74
- name: string;
75
- logo: string;
76
- description: string;
77
- rating: number;
78
- url?: string;
79
- };
80
-
81
- export type Configuration = {
82
- ctaNavbar?: {
83
- enabled: boolean;
84
- label: string;
85
- url: string;
86
- };
87
- ctaFooter?: {
88
- enabled: boolean;
89
- label: string;
90
- url: string;
91
- };
92
- newsletter?: {
93
- enabled: boolean;
94
- };
95
- };
96
-
97
- export type Analytics = {
98
- date: string;
99
- current_url: string;
100
- pageview_count: number;
101
- unique_visitors: number;
102
- };
103
-
104
- export type User = {
105
- id: string;
106
- email: string | null;
107
- name: string | null;
108
- created_at: string;
109
- image: string | null;
110
- cookie_preferences?: CookiePreferences | null;
111
- plan_id: string | null;
112
- customer_id: string | null;
113
- };
114
-
115
- export type OCRImageData = {
116
- id: string;
117
- file: File;
118
- originalUrl: string;
119
- confidence?: number;
120
- isProcessed: boolean;
121
- };
122
-
123
- export type ContactInfo = {
124
- type: string;
125
- value: string;
126
- };
127
-
128
- export type Usage = {
129
- traffic: { pageview_count: number; unique_visitors: number };
130
- ocr: number;
131
- prompts: number;
132
- catalogues: number;
133
- };
134
-
135
- export type UserData = User & {
136
- usage: Usage;
137
- currentPlan: PricingPlan;
138
- nextPlan: PricingPlan;
139
- };
140
-
141
- export type PricingPlan = {
142
- id: number;
143
- name: string;
144
- type: string;
145
- priceId: {
146
- month: string;
147
- year: string;
148
- };
149
- description: string;
150
- features: {
151
- support: string;
152
- catalogues: number;
153
- newsletter: boolean;
154
- custom_features: boolean;
155
- ocr_ai_import: number;
156
- traffic_limit: number;
157
- branding: boolean;
158
- analytics: string;
159
- ai_prompts: number;
160
- categories_per_catalogue?: number | "unlimited";
161
- items_per_catalogue?: number | "unlimited";
162
- };
163
- billing_period?: "month" | "year";
164
- };
165
-
166
- export type ContactData = {
167
- message: string;
168
- email: string;
169
- name: string;
170
- subject: string;
171
- };
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "ES2020",
4
- "target": "ES2020",
5
- "declaration": true,
6
- "outDir": "dist",
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true
10
- },
11
- "include": ["src"],
12
- "exclude": ["dist"]
13
- }