From 6241c25af04c0791d82f6d58da3f5ab808dd009a Mon Sep 17 00:00:00 2001 From: echo Date: Fri, 6 Mar 2026 13:22:07 +0100 Subject: [PATCH] shares updated --- .../src/modules/analytics/analytics.dto.ts | 5 +- .../src/modules/analytics/analytics.entity.ts | 6 +- .../modules/analytics/analytics.service.ts | 46 +++-- backend/src/modules/entities.ts | 5 +- frontend/package.json | 1 + .../features/social-share/ShareButton.tsx | 11 +- .../social-share/SocialShareButtons.tsx | 31 +++- frontend/src/lib/social-utils.ts | 31 ++-- package-lock.json | 157 +++++++++++++----- pwa/package-lock.json | 103 +++++------- pwa/package.json | 1 + .../features/social-share/ShareButton.tsx | 11 +- .../social-share/SocialShareButtons.tsx | 31 +++- pwa/src/lib/social-utils.ts | 31 ++-- 14 files changed, 296 insertions(+), 174 deletions(-) diff --git a/backend/src/modules/analytics/analytics.dto.ts b/backend/src/modules/analytics/analytics.dto.ts index 830286c..224f0d0 100644 --- a/backend/src/modules/analytics/analytics.dto.ts +++ b/backend/src/modules/analytics/analytics.dto.ts @@ -5,7 +5,7 @@ export class TrackShareDto { @IsUUID() articleId: string; - @IsEnum(['facebook', 'twitter', 'whatsapp', 'telegram', 'link']) + @IsEnum(['facebook', 'twitter', 'instagram', 'tiktok', 'telegram', 'link']) platform: SharePlatform; @IsOptional() @@ -36,7 +36,8 @@ export class ShareStatsResponse { articleTitle: string; facebookShares: number; twitterShares: number; - whatsappShares: number; + instagramShares: number; + tiktokShares: number; telegramShares: number; linkShares: number; totalShares: number; diff --git a/backend/src/modules/analytics/analytics.entity.ts b/backend/src/modules/analytics/analytics.entity.ts index b8180c0..8316114 100644 --- a/backend/src/modules/analytics/analytics.entity.ts +++ b/backend/src/modules/analytics/analytics.entity.ts @@ -11,7 +11,8 @@ import { Article } from '../entities'; export type SharePlatform = | 'facebook' | 'twitter' - | 'whatsapp' + | 'instagram' + | 'tiktok' | 'telegram' | 'link'; @@ -48,7 +49,8 @@ export interface ShareStats { articleTitle: string; facebookShares: number; twitterShares: number; - whatsappShares: number; + instagramShares: number; + tiktokShares: number; telegramShares: number; linkShares: number; totalShares: number; diff --git a/backend/src/modules/analytics/analytics.service.ts b/backend/src/modules/analytics/analytics.service.ts index 15436f2..123d7c9 100644 --- a/backend/src/modules/analytics/analytics.service.ts +++ b/backend/src/modules/analytics/analytics.service.ts @@ -53,8 +53,10 @@ export class AnalyticsService { return 'facebookShares'; case 'twitter': return 'twitterShares'; - case 'whatsapp': - return 'whatsappShares'; + case 'instagram': + return 'instagramShares'; + case 'tiktok': + return 'tiktokShares'; case 'telegram': return 'telegramShares'; default: @@ -72,20 +74,21 @@ export class AnalyticsService { 'article.title as "articleTitle"', 'article.facebookShares as "facebookShares"', 'article.twitterShares as "twitterShares"', - 'article.whatsappShares as "whatsappShares"', + 'article.instagramShares as "instagramShares"', + 'article.tiktokShares as "tiktokShares"', 'article.telegramShares as "telegramShares"', 'article.views as "views"', 'article.createdAt as "createdAt"', 'article.updatedAt as "updatedAt"', ]) .addSelect( - `(article.facebookShares + article.twitterShares + article.whatsappShares + article.telegramShares) as "totalShares"`, + `(article.facebookShares + article.twitterShares + article.instagramShares + article.tiktokShares + article.telegramShares) as "totalShares"`, ) .addSelect( `CASE WHEN article.views > 0 THEN ROUND( - (article.facebookShares + article.twitterShares + article.whatsappShares + article.telegramShares)::decimal / article.views * 100, + (article.facebookShares + article.twitterShares + article.instagramShares + article.tiktokShares + article.telegramShares)::decimal / article.views * 100, 2 ) ELSE 0 @@ -117,7 +120,8 @@ export class AnalyticsService { articleTitle: string; facebookShares: string; twitterShares: string; - whatsappShares: string; + instagramShares: string; + tiktokShares: string; telegramShares: string; views: string; createdAt: string; @@ -138,11 +142,16 @@ export class AnalyticsService { const facebookShares = parseInt(rawResult.facebookShares) || 0; const twitterShares = parseInt(rawResult.twitterShares) || 0; - const whatsappShares = parseInt(rawResult.whatsappShares) || 0; + const instagramShares = parseInt(rawResult.instagramShares) || 0; + const tiktokShares = parseInt(rawResult.tiktokShares) || 0; const telegramShares = parseInt(rawResult.telegramShares) || 0; const views = parseInt(rawResult.views) || 0; const baseTotalShares = - facebookShares + twitterShares + whatsappShares + telegramShares; + facebookShares + + twitterShares + + instagramShares + + tiktokShares + + telegramShares; const totalShares = baseTotalShares + linkShares; const shareRate = views > 0 ? parseFloat(((totalShares / views) * 100).toFixed(2)) : 0; @@ -152,7 +161,8 @@ export class AnalyticsService { articleTitle: rawResult.articleTitle, facebookShares, twitterShares, - whatsappShares, + instagramShares, + tiktokShares, telegramShares, linkShares, totalShares, @@ -217,14 +227,16 @@ export class AnalyticsService { totalShares: number; facebookShares: number; twitterShares: number; - whatsappShares: number; + instagramShares: number; + tiktokShares: number; telegramShares: number; linkShares: number; }> { interface ArticleStatsRaw { facebookShares: string; twitterShares: string; - whatsappShares: string; + instagramShares: string; + tiktokShares: string; telegramShares: string; } @@ -233,7 +245,8 @@ export class AnalyticsService { .select([ 'SUM(article.facebookShares) as facebookShares', 'SUM(article.twitterShares) as twitterShares', - 'SUM(article.whatsappShares) as whatsappShares', + 'SUM(article.instagramShares) as instagramShares', + 'SUM(article.tiktokShares) as tiktokShares', 'SUM(article.telegramShares) as telegramShares', ]) .getRawOne()) as ArticleStatsRaw; @@ -244,13 +257,15 @@ export class AnalyticsService { const facebookShares = parseInt(articleStats?.facebookShares || '0') || 0; const twitterShares = parseInt(articleStats?.twitterShares || '0') || 0; - const whatsappShares = parseInt(articleStats?.whatsappShares || '0') || 0; + const instagramShares = parseInt(articleStats?.instagramShares || '0') || 0; + const tiktokShares = parseInt(articleStats?.tiktokShares || '0') || 0; const telegramShares = parseInt(articleStats?.telegramShares || '0') || 0; const totalShares = facebookShares + twitterShares + - whatsappShares + + instagramShares + + tiktokShares + telegramShares + linkShares; @@ -258,7 +273,8 @@ export class AnalyticsService { totalShares, facebookShares, twitterShares, - whatsappShares, + instagramShares, + tiktokShares, telegramShares, linkShares, }; diff --git a/backend/src/modules/entities.ts b/backend/src/modules/entities.ts index f5a4a8c..5708b04 100644 --- a/backend/src/modules/entities.ts +++ b/backend/src/modules/entities.ts @@ -249,7 +249,10 @@ export class Article { twitterShares: number; @Column({ default: 0 }) - whatsappShares: number; + instagramShares: number; + + @Column({ default: 0 }) + tiktokShares: number; @Column({ default: 0 }) telegramShares: number; diff --git a/frontend/package.json b/frontend/package.json index f629ecf..b4263ab 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -31,6 +31,7 @@ "posthog-js": "^1.356.1", "react": "^19.2.0", "react-dom": "^19.2.4", + "react-icons": "^5.6.0", "react-markdown": "^10.1.0", "remark-gfm": "^4.0.1" }, diff --git a/frontend/src/components/features/social-share/ShareButton.tsx b/frontend/src/components/features/social-share/ShareButton.tsx index 861bbc0..25fe21d 100644 --- a/frontend/src/components/features/social-share/ShareButton.tsx +++ b/frontend/src/components/features/social-share/ShareButton.tsx @@ -4,12 +4,11 @@ import { type SharePlatform, getPlatformLabel } from '@/lib/social-utils'; import { Facebook, Twitter, - MessageCircle, Send, - Mail, Link, Share2 } from 'lucide-react'; +import { FaInstagram, FaTiktok } from 'react-icons/fa'; interface ShareButtonProps { platform: SharePlatform; @@ -52,12 +51,12 @@ export function ShareButton({ return Facebook; case 'twitter': return Twitter; - case 'whatsapp': - return MessageCircle; + case 'instagram': + return FaInstagram; + case 'tiktok': + return FaTiktok; case 'telegram': return Send; - case 'email': - return Mail; case 'link': return Link; default: diff --git a/frontend/src/components/features/social-share/SocialShareButtons.tsx b/frontend/src/components/features/social-share/SocialShareButtons.tsx index e384b4c..3f89999 100644 --- a/frontend/src/components/features/social-share/SocialShareButtons.tsx +++ b/frontend/src/components/features/social-share/SocialShareButtons.tsx @@ -14,7 +14,7 @@ interface SocialShareButtonsProps extends ShareData { onShare?: (platform: SharePlatform) => void; } -const PLATFORMS: SharePlatform[] = ['facebook', 'twitter', 'whatsapp', 'telegram', 'email', 'link']; +const PLATFORMS: SharePlatform[] = ['facebook', 'twitter', 'instagram', 'tiktok', 'telegram', 'link']; export function SocialShareButtons({ articleId, @@ -62,15 +62,38 @@ export function SocialShareButtons({ onShare(platform); } - // Open share URL in new window for social platforms - if (platform !== 'link') { + // For Instagram and TikTok, use Web Share API if available + if (platform === 'instagram' || platform === 'tiktok') { + if (navigator.share) { + try { + await navigator.share({ + title: shareData.title, + text: shareData.excerpt, + url: shareData.url, + }); + } catch (shareError) { + // User cancelled or share failed - fallback to copying link + if ((shareError as Error).name !== 'AbortError') { + const { copyToClipboard } = await import('@/lib/social-utils'); + await copyToClipboard(shareData.url); + alert('Link copied! You can now paste it in ' + (platform === 'instagram' ? 'Instagram' : 'TikTok')); + } + } + } else { + // Web Share API not available - copy link as fallback + const { copyToClipboard } = await import('@/lib/social-utils'); + await copyToClipboard(shareData.url); + alert('Link copied! You can now paste it in ' + (platform === 'instagram' ? 'Instagram' : 'TikTok')); + } + } else if (platform !== 'link') { + // Open share URL in new window for other social platforms const shareUrl = getShareUrl(platform, shareData); window.open(shareUrl, '_blank', 'noopener,noreferrer'); } } catch (error) { console.error('Failed to track share:', error); // Still open the share URL even if tracking fails - if (platform !== 'link') { + if (platform !== 'link' && platform !== 'instagram' && platform !== 'tiktok') { const shareUrl = getShareUrl(platform, shareData); window.open(shareUrl, '_blank', 'noopener,noreferrer'); } diff --git a/frontend/src/lib/social-utils.ts b/frontend/src/lib/social-utils.ts index 11672a0..eb0ea0e 100644 --- a/frontend/src/lib/social-utils.ts +++ b/frontend/src/lib/social-utils.ts @@ -1,4 +1,4 @@ -export type SharePlatform = 'facebook' | 'twitter' | 'whatsapp' | 'telegram' | 'email' | 'link'; +export type SharePlatform = 'facebook' | 'twitter' | 'instagram' | 'tiktok' | 'telegram' | 'link'; export interface ShareData { title: string; @@ -12,22 +12,23 @@ export const getShareUrl = ( platform: Exclude, data: ShareData ): string => { - const { title, url, excerpt } = data; + const { title, url } = data; const encodedUrl = encodeURIComponent(url); const encodedTitle = encodeURIComponent(title); - const encodedText = encodeURIComponent(excerpt ? `${title} - ${excerpt}` : title); switch (platform) { case 'facebook': return `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`; case 'twitter': return `https://twitter.com/intent/tweet?url=${encodedUrl}&text=${encodedTitle}`; - case 'whatsapp': - return `https://wa.me/?text=${encodedText}%20${encodedUrl}`; + case 'instagram': + // Instagram doesn't have a web share URL, will use Web Share API in component + return url; + case 'tiktok': + // TikTok has limited web share support, will use Web Share API in component + return url; case 'telegram': return `https://t.me/share/url?url=${encodedUrl}&text=${encodedTitle}`; - case 'email': - return `mailto:?subject=${encodedTitle}&body=${encodedUrl}`; default: return url; } @@ -64,12 +65,12 @@ export const getPlatformIcon = (platform: SharePlatform): string => { return 'Facebook'; case 'twitter': return 'Twitter'; - case 'whatsapp': - return 'MessageCircle'; + case 'instagram': + return 'Instagram'; + case 'tiktok': + return 'TikTok'; case 'telegram': return 'Send'; - case 'email': - return 'Mail'; case 'link': return 'Link'; default: @@ -83,12 +84,12 @@ export const getPlatformLabel = (platform: SharePlatform): string => { return 'Facebook'; case 'twitter': return 'Twitter'; - case 'whatsapp': - return 'WhatsApp'; + case 'instagram': + return 'Instagram'; + case 'tiktok': + return 'TikTok'; case 'telegram': return 'Telegram'; - case 'email': - return 'Email'; case 'link': return 'Copy Link'; default: diff --git a/package-lock.json b/package-lock.json index 2795b37..7ec1fcc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -225,6 +225,7 @@ "version": "7.28.5", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -653,7 +654,7 @@ }, "backend/node_modules/@cspotcode/source-map-support": { "version": "0.8.1", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -664,7 +665,7 @@ }, "backend/node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -1760,7 +1761,7 @@ }, "backend/node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -1777,7 +1778,7 @@ }, "backend/node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/@jridgewell/trace-mapping": { @@ -1845,6 +1846,7 @@ "version": "8.17.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -2014,6 +2016,7 @@ "version": "11.1.10", "hasInstallScript": true, "license": "MIT", + "peer": true, "dependencies": { "@nuxt/opencollective": "0.4.1", "fast-safe-stringify": "2.1.1", @@ -2063,6 +2066,7 @@ "backend/node_modules/@nestjs/platform-express": { "version": "11.1.10", "license": "MIT", + "peer": true, "dependencies": { "cors": "2.8.5", "express": "5.2.1", @@ -2321,22 +2325,22 @@ }, "backend/node_modules/@tsconfig/node10": { "version": "1.0.12", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/@tsconfig/node12": { "version": "1.0.11", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/@tsconfig/node14": { "version": "1.0.3", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/@tsconfig/node16": { "version": "1.0.4", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/@types/babel__core": { @@ -2441,8 +2445,9 @@ }, "backend/node_modules/@types/node": { "version": "22.19.3", - "dev": true, + "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -2524,6 +2529,7 @@ "version": "8.50.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.50.1", "@typescript-eslint/types": "8.50.1", @@ -2898,8 +2904,9 @@ }, "backend/node_modules/acorn": { "version": "8.15.0", - "dev": true, + "devOptional": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2928,7 +2935,7 @@ }, "backend/node_modules/acorn-walk": { "version": "8.3.4", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "acorn": "^8.11.0" @@ -2975,6 +2982,7 @@ "version": "6.12.6", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3112,7 +3120,7 @@ }, "backend/node_modules/arg": { "version": "4.1.3", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/argparse": { @@ -3343,6 +3351,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -3596,6 +3605,7 @@ "version": "4.0.3", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "readdirp": "^4.0.1" }, @@ -3877,7 +3887,7 @@ }, "backend/node_modules/create-require": { "version": "1.1.1", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/dayjs": { @@ -4001,7 +4011,7 @@ }, "backend/node_modules/diff": { "version": "4.0.2", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -4189,6 +4199,7 @@ "version": "9.39.2", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -4247,6 +4258,7 @@ "version": "10.1.8", "dev": true, "license": "MIT", + "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -5403,6 +5415,7 @@ "version": "30.2.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@jest/core": "30.2.0", "@jest/types": "30.2.0", @@ -6258,7 +6271,7 @@ }, "backend/node_modules/make-error": { "version": "1.3.6", - "dev": true, + "devOptional": true, "license": "ISC" }, "backend/node_modules/make-fetch-happen": { @@ -7232,6 +7245,7 @@ "version": "3.7.4", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -7847,6 +7861,7 @@ "version": "5.1.7", "hasInstallScript": true, "license": "BSD-3-Clause", + "peer": true, "dependencies": { "bindings": "^1.5.0", "node-addon-api": "^7.0.0", @@ -8188,6 +8203,7 @@ "version": "8.17.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -8468,8 +8484,9 @@ }, "backend/node_modules/ts-node": { "version": "10.9.2", - "dev": true, + "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -8614,6 +8631,7 @@ "backend/node_modules/typeorm": { "version": "0.3.28", "license": "MIT", + "peer": true, "dependencies": { "@sqltools/formatter": "^1.2.5", "ansis": "^4.2.0", @@ -8801,8 +8819,9 @@ }, "backend/node_modules/typescript": { "version": "5.9.3", - "dev": true, + "devOptional": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8847,7 +8866,7 @@ }, "backend/node_modules/undici-types": { "version": "6.21.0", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/unique-filename": { @@ -8968,7 +8987,7 @@ }, "backend/node_modules/v8-compile-cache-lib": { "version": "3.0.1", - "dev": true, + "devOptional": true, "license": "MIT" }, "backend/node_modules/v8-to-istanbul": { @@ -9127,7 +9146,7 @@ }, "backend/node_modules/yn": { "version": "3.1.1", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6" @@ -9261,6 +9280,7 @@ "cms/cms/node_modules/@babel/core": { "version": "7.28.5", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -9829,6 +9849,7 @@ "cms/cms/node_modules/@codemirror/view": { "version": "6.39.7", "license": "MIT", + "peer": true, "dependencies": { "@codemirror/state": "^6.5.0", "crelt": "^1.0.6", @@ -9872,6 +9893,7 @@ "cms/cms/node_modules/@dnd-kit/core": { "version": "6.3.1", "license": "MIT", + "peer": true, "dependencies": { "@dnd-kit/accessibility": "^3.1.1", "@dnd-kit/utilities": "^3.2.2", @@ -9962,6 +9984,7 @@ "cms/cms/node_modules/@emotion/is-prop-valid": { "version": "1.2.2", "license": "MIT", + "peer": true, "dependencies": { "@emotion/memoize": "^0.8.1" } @@ -11981,6 +12004,7 @@ "cms/cms/node_modules/@strapi/admin": { "version": "5.33.0", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@casl/ability": "6.5.0", "@internationalized/date": "3.5.4", @@ -12106,6 +12130,7 @@ "cms/cms/node_modules/@strapi/content-manager": { "version": "5.33.0", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@dnd-kit/core": "6.3.1", "@dnd-kit/sortable": "10.0.0", @@ -12342,6 +12367,7 @@ "cms/cms/node_modules/@strapi/data-transfer": { "version": "5.33.0", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@strapi/logger": "5.33.0", "@strapi/types": "5.33.0", @@ -12503,6 +12529,7 @@ "cms/cms/node_modules/@strapi/icons": { "version": "2.0.1", "license": "MIT", + "peer": true, "peerDependencies": { "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0", @@ -12663,6 +12690,7 @@ "cms/cms/node_modules/@strapi/strapi": { "version": "5.33.0", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@pmmmwh/react-refresh-webpack-plugin": "0.5.15", "@strapi/admin": "5.33.0", @@ -13016,6 +13044,7 @@ "cms/cms/node_modules/@testing-library/dom": { "version": "10.4.1", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -13321,6 +13350,7 @@ "cms/cms/node_modules/@types/react": { "version": "18.3.27", "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.2.2" @@ -13328,8 +13358,9 @@ }, "cms/cms/node_modules/@types/react-dom": { "version": "18.3.7", - "dev": true, + "devOptional": true, "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^18.0.0" } @@ -13612,6 +13643,7 @@ "cms/cms/node_modules/acorn": { "version": "8.15.0", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -13673,6 +13705,7 @@ "cms/cms/node_modules/ajv": { "version": "8.16.0", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -14083,6 +14116,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -15371,6 +15405,7 @@ "version": "0.25.12", "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -15915,6 +15950,7 @@ "cms/cms/node_modules/fork-ts-checker-webpack-plugin/node_modules/ajv": { "version": "6.12.6", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -17573,6 +17609,7 @@ "cms/cms/node_modules/koa": { "version": "2.16.1", "license": "MIT", + "peer": true, "dependencies": { "accepts": "^1.3.5", "cache-content-type": "^1.0.0", @@ -19362,6 +19399,7 @@ "cms/cms/node_modules/picomatch": { "version": "2.3.1", "license": "MIT", + "peer": true, "engines": { "node": ">=8.6" }, @@ -19642,6 +19680,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -20019,6 +20058,7 @@ "cms/cms/node_modules/react": { "version": "18.3.1", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -20064,6 +20104,7 @@ "cms/cms/node_modules/react-dom": { "version": "18.3.1", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -20233,6 +20274,7 @@ "cms/cms/node_modules/react-refresh": { "version": "0.14.0", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -20296,6 +20338,7 @@ "cms/cms/node_modules/react-router-dom": { "version": "6.30.2", "license": "MIT", + "peer": true, "dependencies": { "@remix-run/router": "1.23.1", "react-router": "6.30.2" @@ -20528,6 +20571,7 @@ "cms/cms/node_modules/redux": { "version": "4.2.1", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.9.2" } @@ -20974,6 +21018,7 @@ "cms/cms/node_modules/scheduler": { "version": "0.23.0", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" } @@ -21261,6 +21306,7 @@ "cms/cms/node_modules/slate": { "version": "0.94.1", "license": "MIT", + "peer": true, "dependencies": { "immer": "^9.0.6", "is-plain-object": "^5.0.0", @@ -21522,6 +21568,7 @@ "cms/cms/node_modules/styled-components": { "version": "6.1.19", "license": "MIT", + "peer": true, "dependencies": { "@emotion/is-prop-valid": "1.2.2", "@emotion/unitless": "0.8.1", @@ -21892,6 +21939,7 @@ "cms/cms/node_modules/type-fest": { "version": "0.20.2", "license": "(MIT OR CC0-1.0)", + "peer": true, "engines": { "node": ">=10" }, @@ -21920,6 +21968,7 @@ "cms/cms/node_modules/typedoc": { "version": "0.25.10", "license": "Apache-2.0", + "peer": true, "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", @@ -21947,6 +21996,7 @@ "cms/cms/node_modules/typedoc-plugin-markdown": { "version": "3.17.1", "license": "MIT", + "peer": true, "dependencies": { "handlebars": "^4.7.7" }, @@ -21956,8 +22006,8 @@ }, "cms/cms/node_modules/typescript": { "version": "5.9.3", - "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -22221,6 +22271,7 @@ "cms/cms/node_modules/vite": { "version": "5.4.19", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -22358,6 +22409,7 @@ "cms/cms/node_modules/webpack": { "version": "5.104.1", "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -22480,6 +22532,7 @@ "cms/cms/node_modules/webpack-hot-middleware": { "version": "2.26.1", "license": "MIT", + "peer": true, "dependencies": { "ansi-html-community": "0.0.8", "html-entities": "^2.1.0", @@ -22853,6 +22906,7 @@ "cms/cms/node_modules/zod": { "version": "3.25.67", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -22873,6 +22927,7 @@ "posthog-js": "^1.356.1", "react": "^19.2.0", "react-dom": "^19.2.4", + "react-icons": "^5.6.0", "react-markdown": "^10.1.0", "remark-gfm": "^4.0.1" }, @@ -22922,6 +22977,7 @@ "version": "7.28.5", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -23146,7 +23202,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -24388,7 +24443,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -24400,7 +24454,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -24625,16 +24678,18 @@ }, "frontend/node_modules/@types/node": { "version": "24.10.4", - "dev": true, + "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.16.0" } }, "frontend/node_modules/@types/react-dom": { "version": "19.2.3", - "dev": true, + "devOptional": true, "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -24678,6 +24733,7 @@ "version": "8.50.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.50.1", "@typescript-eslint/types": "8.50.1", @@ -24903,6 +24959,7 @@ "version": "8.15.0", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -24988,6 +25045,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -25104,7 +25162,6 @@ }, "frontend/node_modules/esbuild": { "version": "0.27.2", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -25157,6 +25214,7 @@ "version": "9.39.2", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -25334,7 +25392,6 @@ }, "frontend/node_modules/fdir": { "version": "6.5.0", - "dev": true, "license": "MIT", "engines": { "node": ">=12.0.0" @@ -25700,7 +25757,6 @@ }, "frontend/node_modules/nanoid": { "version": "3.3.11", - "dev": true, "funding": [ { "type": "github", @@ -25790,13 +25846,12 @@ }, "frontend/node_modules/picocolors": { "version": "1.1.1", - "dev": true, "license": "ISC" }, "frontend/node_modules/picomatch": { "version": "4.0.3", - "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -25806,7 +25861,6 @@ }, "frontend/node_modules/postcss": { "version": "8.5.6", - "dev": true, "funding": [ { "type": "opencollective", @@ -25928,7 +25982,6 @@ }, "frontend/node_modules/rollup": { "version": "4.54.0", - "dev": true, "license": "MIT", "dependencies": { "@types/estree": "1.0.8" @@ -25977,6 +26030,7 @@ "frontend/node_modules/seroval": { "version": "1.4.2", "license": "MIT", + "peer": true, "engines": { "node": ">=10" } @@ -26020,7 +26074,8 @@ }, "frontend/node_modules/tailwindcss": { "version": "4.1.18", - "license": "MIT" + "license": "MIT", + "peer": true }, "frontend/node_modules/tailwindcss-animate": { "version": "1.0.7", @@ -26051,7 +26106,6 @@ }, "frontend/node_modules/tinyglobby": { "version": "0.2.15", - "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", @@ -26090,6 +26144,7 @@ "version": "5.9.3", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -26205,8 +26260,8 @@ }, "frontend/node_modules/vite": { "version": "7.3.0", - "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -26304,6 +26359,7 @@ "version": "4.2.1", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -26352,6 +26408,7 @@ "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.13.tgz", "integrity": "sha512-ieqWtipT+VlyDWLz5Rvz0f3E5rXcVAnaAi+D53DEHLjc1kmFxCgZ62qVfTX2vwkywwqNkTNXvBgGR72hYqV//Q==", "license": "MIT", + "peer": true, "dependencies": { "file-type": "21.3.0", "iterare": "1.2.1", @@ -26406,6 +26463,7 @@ "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=8.0.0" } @@ -26945,8 +27003,8 @@ "version": "19.2.10", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.10.tgz", "integrity": "sha512-WPigyYuGhgZ/cTPRXB2EwUw+XvsRA3GqHlsP4qteqrnnjDrApbS7MxcGr/hke5iUoeB7E/gQtrs9I37zAJ0Vjw==", - "dev": true, "license": "MIT", + "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -27172,13 +27230,15 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/class-validator": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.3.tgz", "integrity": "sha512-rXXekcjofVN1LTOSw+u4u9WXVEUvNBVjORW154q/IdmYWy1nMbOU9aNtZB0t8m+FJQ9q91jlr2f9CwwUFdFMRA==", "license": "MIT", + "peer": true, "dependencies": { "@types/validator": "^13.15.3", "libphonenumber-js": "^1.11.1", @@ -27294,6 +27354,7 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.21.0" }, @@ -28694,6 +28755,7 @@ "resolved": "https://registry.npmjs.org/passport/-/passport-0.7.0.tgz", "integrity": "sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==", "license": "MIT", + "peer": true, "dependencies": { "passport-strategy": "1.x.x", "pause": "0.0.1", @@ -28755,6 +28817,7 @@ "resolved": "https://registry.npmjs.org/pg/-/pg-8.18.0.tgz", "integrity": "sha512-xqrUDL1b9MbkydY/s+VZ6v+xiMUmOUk7SS9d/1kpyQxoJ6U9AO1oIJyUWVZojbfe5Cc/oluutcgFG4L9RDP1iQ==", "license": "MIT", + "peer": true, "dependencies": { "pg-connection-string": "^2.11.0", "pg-pool": "^3.11.0", @@ -28883,6 +28946,7 @@ "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.356.1.tgz", "integrity": "sha512-4EQliSyTp3j/xOaWpZmu7fk1b4S+J3qy4JOu5Xy3/MYFxv1SlAylgifRdCbXZxCQWb6PViaNvwRf4EmburgfWA==", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/api-logs": "^0.208.0", @@ -28954,6 +29018,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -28963,6 +29028,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -28970,6 +29036,15 @@ "react": "^19.2.4" } }, + "node_modules/react-icons": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.6.0.tgz", + "integrity": "sha512-RH93p5ki6LfOiIt0UtDyNg/cee+HLVR6cHHtW3wALfo+eOHTp8RnU2kRkI6E+H19zMIs03DyxUG/GfZMOGvmiA==", + "license": "MIT", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-markdown": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz", @@ -29001,7 +29076,8 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", - "license": "Apache-2.0" + "license": "Apache-2.0", + "peer": true }, "node_modules/remark-gfm": { "version": "4.0.1", @@ -29083,6 +29159,7 @@ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", + "peer": true, "dependencies": { "tslib": "^2.1.0" } diff --git a/pwa/package-lock.json b/pwa/package-lock.json index e833870..8494f02 100644 --- a/pwa/package-lock.json +++ b/pwa/package-lock.json @@ -21,6 +21,7 @@ "posthog-js": "^1.356.1", "react": "^19.2.0", "react-dom": "^19.2.4", + "react-icons": "^5.6.0", "react-markdown": "^10.1.0", "remark-gfm": "^4.0.1", "vite-plugin-pwa": "^1.2.0", @@ -80,6 +81,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -1525,7 +1527,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1542,7 +1543,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1559,7 +1559,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1576,7 +1575,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1593,7 +1591,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1610,7 +1607,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1627,7 +1623,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1644,7 +1639,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1661,7 +1655,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1678,7 +1671,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1695,7 +1687,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1712,7 +1703,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1729,7 +1719,6 @@ "cpu": [ "mips64el" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1746,7 +1735,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1763,7 +1751,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1780,7 +1767,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1797,7 +1783,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1814,7 +1799,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1831,7 +1815,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1848,7 +1831,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1865,7 +1847,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1882,7 +1863,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1899,7 +1879,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1916,7 +1895,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1933,7 +1911,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1950,7 +1927,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2276,6 +2252,7 @@ "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=8.0.0" } @@ -3778,7 +3755,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3792,7 +3768,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3806,7 +3781,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3820,7 +3794,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3834,7 +3807,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3848,7 +3820,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3862,7 +3833,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3876,7 +3846,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3890,7 +3859,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3904,7 +3872,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3918,7 +3885,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3932,7 +3898,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3946,7 +3911,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3960,7 +3924,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3974,7 +3937,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3988,7 +3950,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4002,7 +3963,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4016,7 +3976,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4030,7 +3989,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4044,7 +4002,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4058,7 +4015,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4072,7 +4028,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4475,8 +4430,9 @@ "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, + "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -4489,7 +4445,7 @@ "version": "7.27.0", "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" @@ -4499,7 +4455,7 @@ "version": "7.4.4", "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", @@ -4510,7 +4466,7 @@ "version": "7.28.0", "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/types": "^7.28.2" @@ -4584,8 +4540,8 @@ "version": "19.2.7", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", - "dev": true, "license": "MIT", + "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -4594,8 +4550,9 @@ "version": "19.2.3", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", - "dev": true, + "devOptional": true, "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -4663,6 +4620,7 @@ "integrity": "sha512-hM5faZwg7aVNa819m/5r7D0h0c9yC4DUlWAOvHAtISdFTc8xB86VmX5Xqabrama3wIPJ/q9RbGS1worb6JfnMg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.50.1", "@typescript-eslint/types": "8.50.1", @@ -4919,6 +4877,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5158,6 +5117,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -5460,7 +5420,6 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, "license": "MIT" }, "node_modules/data-view-buffer": { @@ -5832,7 +5791,6 @@ "version": "0.27.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -5898,6 +5856,7 @@ "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -8627,7 +8586,6 @@ "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true, "funding": [ { "type": "github", @@ -8888,7 +8846,6 @@ "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", - "dev": true, "funding": [ { "type": "opencollective", @@ -8918,6 +8875,7 @@ "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.356.1.tgz", "integrity": "sha512-4EQliSyTp3j/xOaWpZmu7fk1b4S+J3qy4JOu5Xy3/MYFxv1SlAylgifRdCbXZxCQWb6PViaNvwRf4EmburgfWA==", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/api-logs": "^0.208.0", @@ -9025,10 +8983,11 @@ } }, "node_modules/react": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", - "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", + "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -9038,6 +8997,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -9045,6 +9005,15 @@ "react": "^19.2.4" } }, + "node_modules/react-icons": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.6.0.tgz", + "integrity": "sha512-RH93p5ki6LfOiIt0UtDyNg/cee+HLVR6cHHtW3wALfo+eOHTp8RnU2kRkI6E+H19zMIs03DyxUG/GfZMOGvmiA==", + "license": "MIT", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-markdown": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz", @@ -9355,8 +9324,8 @@ "version": "4.54.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.54.0.tgz", "integrity": "sha512-3nk8Y3a9Ea8szgKhinMlGMhGMw89mqule3KWczxhIzqudyHdCIOHw8WJlj/r329fACjKLEh13ZSk7oE22kyeIw==", - "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -9494,6 +9463,7 @@ "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.4.2.tgz", "integrity": "sha512-N3HEHRCZYn3cQbsC4B5ldj9j+tHdf4JZoYPlcI4rRYu0Xy4qN8MQf1Z08EibzB0WpgRG5BGK08FTrmM66eSzKQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=10" } @@ -9932,7 +9902,8 @@ "version": "4.1.18", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.18.tgz", "integrity": "sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/tailwindcss-animate": { "version": "1.0.7", @@ -10183,6 +10154,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -10521,8 +10493,8 @@ "version": "7.3.0", "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.0.tgz", "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", - "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -10903,6 +10875,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -10964,6 +10937,7 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", "license": "MIT", + "peer": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -11123,6 +11097,7 @@ "integrity": "sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/pwa/package.json b/pwa/package.json index 267d56c..256541b 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -31,6 +31,7 @@ "posthog-js": "^1.356.1", "react": "^19.2.0", "react-dom": "^19.2.4", + "react-icons": "^5.6.0", "react-markdown": "^10.1.0", "remark-gfm": "^4.0.1", "vite-plugin-pwa": "^1.2.0", diff --git a/pwa/src/components/features/social-share/ShareButton.tsx b/pwa/src/components/features/social-share/ShareButton.tsx index 861bbc0..25fe21d 100644 --- a/pwa/src/components/features/social-share/ShareButton.tsx +++ b/pwa/src/components/features/social-share/ShareButton.tsx @@ -4,12 +4,11 @@ import { type SharePlatform, getPlatformLabel } from '@/lib/social-utils'; import { Facebook, Twitter, - MessageCircle, Send, - Mail, Link, Share2 } from 'lucide-react'; +import { FaInstagram, FaTiktok } from 'react-icons/fa'; interface ShareButtonProps { platform: SharePlatform; @@ -52,12 +51,12 @@ export function ShareButton({ return Facebook; case 'twitter': return Twitter; - case 'whatsapp': - return MessageCircle; + case 'instagram': + return FaInstagram; + case 'tiktok': + return FaTiktok; case 'telegram': return Send; - case 'email': - return Mail; case 'link': return Link; default: diff --git a/pwa/src/components/features/social-share/SocialShareButtons.tsx b/pwa/src/components/features/social-share/SocialShareButtons.tsx index 6f9f7b3..6c8afdb 100644 --- a/pwa/src/components/features/social-share/SocialShareButtons.tsx +++ b/pwa/src/components/features/social-share/SocialShareButtons.tsx @@ -13,7 +13,7 @@ interface SocialShareButtonsProps extends ShareData { onShare?: (platform: SharePlatform) => void; } -const PLATFORMS: SharePlatform[] = ['facebook', 'twitter', 'whatsapp', 'telegram', 'email', 'link']; +const PLATFORMS: SharePlatform[] = ['facebook', 'twitter', 'instagram', 'tiktok', 'telegram', 'link']; export function SocialShareButtons({ articleId, @@ -54,15 +54,38 @@ export function SocialShareButtons({ onShare(platform); } - // Open share URL in new window for social platforms - if (platform !== 'link') { + // For Instagram and TikTok, use Web Share API if available + if (platform === 'instagram' || platform === 'tiktok') { + if (navigator.share) { + try { + await navigator.share({ + title: shareData.title, + text: shareData.excerpt, + url: shareData.url, + }); + } catch (shareError) { + // User cancelled or share failed - fallback to copying link + if ((shareError as Error).name !== 'AbortError') { + const { copyToClipboard } = await import('@/lib/social-utils'); + await copyToClipboard(shareData.url); + alert('Link copied! You can now paste it in ' + (platform === 'instagram' ? 'Instagram' : 'TikTok')); + } + } + } else { + // Web Share API not available - copy link as fallback + const { copyToClipboard } = await import('@/lib/social-utils'); + await copyToClipboard(shareData.url); + alert('Link copied! You can now paste it in ' + (platform === 'instagram' ? 'Instagram' : 'TikTok')); + } + } else if (platform !== 'link') { + // Open share URL in new window for other social platforms const shareUrl = getShareUrl(platform, shareData); window.open(shareUrl, '_blank', 'noopener,noreferrer'); } } catch (error) { console.error('Failed to track share:', error); // Still open the share URL even if tracking fails - if (platform !== 'link') { + if (platform !== 'link' && platform !== 'instagram' && platform !== 'tiktok') { const shareUrl = getShareUrl(platform, shareData); window.open(shareUrl, '_blank', 'noopener,noreferrer'); } diff --git a/pwa/src/lib/social-utils.ts b/pwa/src/lib/social-utils.ts index 11672a0..eb0ea0e 100644 --- a/pwa/src/lib/social-utils.ts +++ b/pwa/src/lib/social-utils.ts @@ -1,4 +1,4 @@ -export type SharePlatform = 'facebook' | 'twitter' | 'whatsapp' | 'telegram' | 'email' | 'link'; +export type SharePlatform = 'facebook' | 'twitter' | 'instagram' | 'tiktok' | 'telegram' | 'link'; export interface ShareData { title: string; @@ -12,22 +12,23 @@ export const getShareUrl = ( platform: Exclude, data: ShareData ): string => { - const { title, url, excerpt } = data; + const { title, url } = data; const encodedUrl = encodeURIComponent(url); const encodedTitle = encodeURIComponent(title); - const encodedText = encodeURIComponent(excerpt ? `${title} - ${excerpt}` : title); switch (platform) { case 'facebook': return `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`; case 'twitter': return `https://twitter.com/intent/tweet?url=${encodedUrl}&text=${encodedTitle}`; - case 'whatsapp': - return `https://wa.me/?text=${encodedText}%20${encodedUrl}`; + case 'instagram': + // Instagram doesn't have a web share URL, will use Web Share API in component + return url; + case 'tiktok': + // TikTok has limited web share support, will use Web Share API in component + return url; case 'telegram': return `https://t.me/share/url?url=${encodedUrl}&text=${encodedTitle}`; - case 'email': - return `mailto:?subject=${encodedTitle}&body=${encodedUrl}`; default: return url; } @@ -64,12 +65,12 @@ export const getPlatformIcon = (platform: SharePlatform): string => { return 'Facebook'; case 'twitter': return 'Twitter'; - case 'whatsapp': - return 'MessageCircle'; + case 'instagram': + return 'Instagram'; + case 'tiktok': + return 'TikTok'; case 'telegram': return 'Send'; - case 'email': - return 'Mail'; case 'link': return 'Link'; default: @@ -83,12 +84,12 @@ export const getPlatformLabel = (platform: SharePlatform): string => { return 'Facebook'; case 'twitter': return 'Twitter'; - case 'whatsapp': - return 'WhatsApp'; + case 'instagram': + return 'Instagram'; + case 'tiktok': + return 'TikTok'; case 'telegram': return 'Telegram'; - case 'email': - return 'Email'; case 'link': return 'Copy Link'; default: