From b44681a351c15aa92a1f23fa4174acabfb4419e6 Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Fri, 4 Oct 2024 12:48:18 -0300 Subject: [PATCH 1/4] Add shadcn template --- examples/data.ts | 9 + examples/sidebar-shadcn/.gitignore | 31 + examples/sidebar-shadcn/background.ts | 12 + .../sidebar-shadcn/components/ui/button.tsx | 56 ++ .../sidebar-shadcn/components/ui/card.tsx | 79 +++ .../sidebar-shadcn/components/ui/label.tsx | 24 + .../sidebar-shadcn/components/ui/switch.tsx | 27 + .../sidebar-shadcn/images/extension_48.png | Bin 0 -> 1381 bytes examples/sidebar-shadcn/images/shadcn.svg | 7 + examples/sidebar-shadcn/lib/utils.ts | 6 + examples/sidebar-shadcn/manifest.json | 36 + examples/sidebar-shadcn/package.json | 39 ++ examples/sidebar-shadcn/postcss.config.js | 3 + examples/sidebar-shadcn/public/logo.svg | 7 + .../sidebar-shadcn/sidebar/SidebarApp.tsx | 71 ++ examples/sidebar-shadcn/sidebar/index.html | 13 + examples/sidebar-shadcn/sidebar/scripts.tsx | 12 + examples/sidebar-shadcn/sidebar/styles.css | 84 +++ examples/sidebar-shadcn/tailwind.config.js | 81 +++ examples/sidebar-shadcn/tsconfig.json | 24 + pnpm-lock.yaml | 636 ++++++++++++++++-- programs/develop/package.json | 1 + .../webpack/plugin-compilation/index.ts | 11 + .../resolve-ts-path-config.ts | 53 ++ 24 files changed, 1274 insertions(+), 48 deletions(-) create mode 100644 examples/sidebar-shadcn/.gitignore create mode 100644 examples/sidebar-shadcn/background.ts create mode 100644 examples/sidebar-shadcn/components/ui/button.tsx create mode 100644 examples/sidebar-shadcn/components/ui/card.tsx create mode 100644 examples/sidebar-shadcn/components/ui/label.tsx create mode 100644 examples/sidebar-shadcn/components/ui/switch.tsx create mode 100644 examples/sidebar-shadcn/images/extension_48.png create mode 100644 examples/sidebar-shadcn/images/shadcn.svg create mode 100644 examples/sidebar-shadcn/lib/utils.ts create mode 100644 examples/sidebar-shadcn/manifest.json create mode 100644 examples/sidebar-shadcn/package.json create mode 100644 examples/sidebar-shadcn/postcss.config.js create mode 100644 examples/sidebar-shadcn/public/logo.svg create mode 100644 examples/sidebar-shadcn/sidebar/SidebarApp.tsx create mode 100644 examples/sidebar-shadcn/sidebar/index.html create mode 100644 examples/sidebar-shadcn/sidebar/scripts.tsx create mode 100644 examples/sidebar-shadcn/sidebar/styles.css create mode 100644 examples/sidebar-shadcn/tailwind.config.js create mode 100644 examples/sidebar-shadcn/tsconfig.json create mode 100644 programs/develop/webpack/plugin-compilation/resolve-ts-path-config.ts diff --git a/examples/data.ts b/examples/data.ts index 1efa82fa..57f8ff0b 100644 --- a/examples/data.ts +++ b/examples/data.ts @@ -284,6 +284,15 @@ const CUSTOM_TEMPLATES: Template[] = [ hasBackground: false, hasEnv: false, configFiles: ['tsconfig.json'] + }, + { + name: 'sidebar-shadcn', + uiContext: ['sidebar'], + uiFramework: 'react', + css: 'css', + hasBackground: false, + hasEnv: false, + configFiles: ['postcss.config.js', 'tailwind.config.js', 'tsconfig.json'] } ] diff --git a/examples/sidebar-shadcn/.gitignore b/examples/sidebar-shadcn/.gitignore new file mode 100644 index 00000000..5e8c65b7 --- /dev/null +++ b/examples/sidebar-shadcn/.gitignore @@ -0,0 +1,31 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +node_modules + +# testing +coverage + +# production +dist + +# misc +.DS_Store + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# lock files +yarn.lock +package-lock.json + +# debug files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# extension.js +extension-env.d.ts diff --git a/examples/sidebar-shadcn/background.ts b/examples/sidebar-shadcn/background.ts new file mode 100644 index 00000000..810df14e --- /dev/null +++ b/examples/sidebar-shadcn/background.ts @@ -0,0 +1,12 @@ +const isFirefoxLike = + typeof browser !== 'undefined' && typeof browser.sidebarAction !== 'undefined' + +if (isFirefoxLike) { + browser.browserAction.onClicked.addListener(() => { + browser.sidebarAction.open() + }) +} else if (typeof chrome !== 'undefined' && chrome.sidePanel) { + chrome.action.onClicked.addListener(() => { + chrome.sidePanel.setPanelBehavior({openPanelOnActionClick: true}) + }) +} diff --git a/examples/sidebar-shadcn/components/ui/button.tsx b/examples/sidebar-shadcn/components/ui/button.tsx new file mode 100644 index 00000000..ead7fc22 --- /dev/null +++ b/examples/sidebar-shadcn/components/ui/button.tsx @@ -0,0 +1,56 @@ +import * as React from 'react' +import {Slot} from '@radix-ui/react-slot' +import {cva, type VariantProps} from 'class-variance-authority' + +import {cn} from '@/lib/utils' + +const buttonVariants = cva( + 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', + { + variants: { + variant: { + default: 'bg-primary text-primary-foreground hover:bg-primary/90', + destructive: + 'bg-destructive text-destructive-foreground hover:bg-destructive/90', + outline: + 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', + secondary: + 'bg-secondary text-secondary-foreground hover:bg-secondary/80', + ghost: 'hover:bg-accent hover:text-accent-foreground', + link: 'text-primary underline-offset-4 hover:underline' + }, + size: { + default: 'h-10 px-4 py-2', + sm: 'h-9 rounded-md px-3', + lg: 'h-11 rounded-md px-8', + icon: 'h-10 w-10' + } + }, + defaultVariants: { + variant: 'default', + size: 'default' + } + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({className, variant, size, asChild = false, ...props}, ref) => { + const Comp = asChild ? Slot : 'button' + return ( + + ) + } +) +Button.displayName = 'Button' + +export {Button, buttonVariants} diff --git a/examples/sidebar-shadcn/components/ui/card.tsx b/examples/sidebar-shadcn/components/ui/card.tsx new file mode 100644 index 00000000..564a84d6 --- /dev/null +++ b/examples/sidebar-shadcn/components/ui/card.tsx @@ -0,0 +1,79 @@ +import * as React from 'react' + +import {cn} from '@/lib/utils' + +const Card = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({className, ...props}, ref) => ( +
+)) +Card.displayName = 'Card' + +const CardHeader = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({className, ...props}, ref) => ( +
+)) +CardHeader.displayName = 'CardHeader' + +const CardTitle = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({className, ...props}, ref) => ( +

+)) +CardTitle.displayName = 'CardTitle' + +const CardDescription = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({className, ...props}, ref) => ( +

+)) +CardDescription.displayName = 'CardDescription' + +const CardContent = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({className, ...props}, ref) => ( +

+)) +CardContent.displayName = 'CardContent' + +const CardFooter = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({className, ...props}, ref) => ( +
+)) +CardFooter.displayName = 'CardFooter' + +export {Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent} diff --git a/examples/sidebar-shadcn/components/ui/label.tsx b/examples/sidebar-shadcn/components/ui/label.tsx new file mode 100644 index 00000000..31650e7d --- /dev/null +++ b/examples/sidebar-shadcn/components/ui/label.tsx @@ -0,0 +1,24 @@ +import * as React from 'react' +import * as LabelPrimitive from '@radix-ui/react-label' +import {cva, type VariantProps} from 'class-variance-authority' + +import {cn} from '@/lib/utils' + +const labelVariants = cva( + 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70' +) + +const Label = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & + VariantProps +>(({className, ...props}, ref) => ( + +)) +Label.displayName = LabelPrimitive.Root.displayName + +export {Label} diff --git a/examples/sidebar-shadcn/components/ui/switch.tsx b/examples/sidebar-shadcn/components/ui/switch.tsx new file mode 100644 index 00000000..3a3b5269 --- /dev/null +++ b/examples/sidebar-shadcn/components/ui/switch.tsx @@ -0,0 +1,27 @@ +import * as React from 'react' +import * as SwitchPrimitives from '@radix-ui/react-switch' + +import {cn} from '@/lib/utils' + +const Switch = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({className, ...props}, ref) => ( + + + +)) +Switch.displayName = SwitchPrimitives.Root.displayName + +export {Switch} diff --git a/examples/sidebar-shadcn/images/extension_48.png b/examples/sidebar-shadcn/images/extension_48.png new file mode 100644 index 0000000000000000000000000000000000000000..f60575b39c87f9ba3258d23f95127a0e1b27385c GIT binary patch literal 1381 zcmV-r1)BPaP)Z^cdq}l%;&$qIN!05a-^r1yuaP$-E;4KUiZUK4MqBb z@fCgHSW}?hSW}?hsHp;x@Bn>y|BeEIZB#3)s|AfV_bo@t0 z`g={EJ0-T--I*jkewd~Sp=e;+R&oq%Auq=96DN!B3WXvt5*z#E+Mmt-VnJNPz~7bE zvYJ*j!$@q@(RV#jpu4B9{NdvRVTFQWzMjo$pFM}Q^&6Ua?Vs%(#f60&uV0N%uZ{xg zbjFd@jQ1_%N`e}_@|#dbDglM8-swpUBvUgyhx+^I`Liqstr-vx2yEQ<>g598had+_ zRRV0)(--2ugZuVce%mt|1=k}OF=s>o|GQ(S>3tA7k%%+ZLhxQFWl%r@IRpgID#)Pb z3P^xWphWXuo0Nh%flny-T6oFI7=WuS6cRLeLs$=#r~VNTUrBUs=J*`F;|1u0IW;;!}{Rh*>Wy0(xMwGwxdns zP;MbuGZHz;u7n#;41{?d)&=#!QlLzD#n<5D`wE3c8VE;L6uj_w#?1p}TAit|rYf_Z zi4GN?WJ_fLk`9tnHI|n{dKT#J>395`DUE`@Kx42plFw=ZUY*dZR!}FrZHKSF{qFnI z#>F>p-qKFN1b%-D1DU&}6*TCe zT9gRSpJsWWZc_OLH%BSac_Aj;z^<;B*CkLaqRA;ZEC!XeP`{{! zAUpyn8Xa={LL>Yw8+lgMN8CONff2OHJ2UoM#sH-UWM`$S`<((tK+$K{Syc;V5dR`v z3#f#LU{F%hp{kLG literal 0 HcmV?d00001 diff --git a/examples/sidebar-shadcn/images/shadcn.svg b/examples/sidebar-shadcn/images/shadcn.svg new file mode 100644 index 00000000..6cebf193 --- /dev/null +++ b/examples/sidebar-shadcn/images/shadcn.svg @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/examples/sidebar-shadcn/lib/utils.ts b/examples/sidebar-shadcn/lib/utils.ts new file mode 100644 index 00000000..8fb87a34 --- /dev/null +++ b/examples/sidebar-shadcn/lib/utils.ts @@ -0,0 +1,6 @@ +import {clsx, type ClassValue} from 'clsx' +import {twMerge} from 'tailwind-merge' + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +} diff --git a/examples/sidebar-shadcn/manifest.json b/examples/sidebar-shadcn/manifest.json new file mode 100644 index 00000000..e1827974 --- /dev/null +++ b/examples/sidebar-shadcn/manifest.json @@ -0,0 +1,36 @@ +{ + "chromium:manifest_version": 3, + "firefox:manifest_version": 2, + "version": "0.0.1", + "name": "shadcn-extension", + "author": "Your Name", + "description": "An Extension.js example.", + "icons": { + "48": "images/extension_48.png" + }, + "chromium:action": { + "default_icon": { + "48": "images/extension_48.png" + }, + "default_title": "Open Side Panel" + }, + "firefox:browser_action": { + "default_icon": { + "48": "images/extension_48.png" + }, + "default_title": "Open Side Panel" + }, + "chromium:side_panel": { + "default_path": "sidebar/index.html", + "default_title": "Side Panel Content" + }, + "firefox:sidebar_action": { + "default_panel": "sidebar/index.html", + "default_title": "Side Panel Content" + }, + "permissions": ["tabs"], + "background": { + "chromium:service_worker": "background.ts", + "firefox:scripts": ["background.ts"] + } +} diff --git a/examples/sidebar-shadcn/package.json b/examples/sidebar-shadcn/package.json new file mode 100644 index 00000000..03db82f0 --- /dev/null +++ b/examples/sidebar-shadcn/package.json @@ -0,0 +1,39 @@ +{ + "private": true, + "name": "shadcn-extension", + "description": "An Extension.js example.", + "version": "0.0.1", + "author": { + "name": "Your Name", + "email": "your@email.com", + "url": "https://yourwebsite.com" + }, + "license": "MIT", + "scripts": { + "dev": "extension dev", + "start": "extension start", + "build": "extension build" + }, + "dependencies": { + "@radix-ui/react-label": "^2.1.0", + "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-switch": "^1.1.1", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "tailwind-merge": "^2.5.3", + "tailwindcss-animate": "^1.0.7" + }, + "devDependencies": { + "@tailwindcss/typography": "^0.5.15", + "@types/react": "^18.2.64", + "@types/react-dom": "^18.2.21", + "autoprefixer": "^10.4.20", + "daisyui": "^4.12.10", + "extension": "latest", + "postcss": "^8.4.47", + "tailwindcss": "^3.4.13", + "typescript": "5.3.3" + } +} diff --git a/examples/sidebar-shadcn/postcss.config.js b/examples/sidebar-shadcn/postcss.config.js new file mode 100644 index 00000000..fdc8a498 --- /dev/null +++ b/examples/sidebar-shadcn/postcss.config.js @@ -0,0 +1,3 @@ +module.exports = { + plugins: [require('tailwindcss'), require('autoprefixer')] +} diff --git a/examples/sidebar-shadcn/public/logo.svg b/examples/sidebar-shadcn/public/logo.svg new file mode 100644 index 00000000..6cebf193 --- /dev/null +++ b/examples/sidebar-shadcn/public/logo.svg @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/examples/sidebar-shadcn/sidebar/SidebarApp.tsx b/examples/sidebar-shadcn/sidebar/SidebarApp.tsx new file mode 100644 index 00000000..15e15702 --- /dev/null +++ b/examples/sidebar-shadcn/sidebar/SidebarApp.tsx @@ -0,0 +1,71 @@ +import {Button} from '@/components/ui/button' +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle +} from '@/components/ui/card' +import {Label} from '@/components/ui/label' +import {Switch} from '@/components/ui/switch' +import './styles.css' +import shadcnLogo from '../images/shadcn.svg' + +export default function SidebarApp() { + return ( + + + shadcn Logo + + Welcome to your shadcn Extension. + Manage your cookie settings here. + + + +
+ + +
+
+ + +
+
+ + +
+
+ +

+ Learn more about creating cross-browser extensions at{' '} + + https://extension.js.org + + . +

+
+
+ ) +} diff --git a/examples/sidebar-shadcn/sidebar/index.html b/examples/sidebar-shadcn/sidebar/index.html new file mode 100644 index 00000000..87712b5e --- /dev/null +++ b/examples/sidebar-shadcn/sidebar/index.html @@ -0,0 +1,13 @@ + + + + + + shadcn/ui Template + + + +
+ + + diff --git a/examples/sidebar-shadcn/sidebar/scripts.tsx b/examples/sidebar-shadcn/sidebar/scripts.tsx new file mode 100644 index 00000000..83e05aa5 --- /dev/null +++ b/examples/sidebar-shadcn/sidebar/scripts.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import SidebarApp from './SidebarApp' +import './styles.css' + +const root = ReactDOM.createRoot(document.getElementById('root')!) + +root.render( + + + +) diff --git a/examples/sidebar-shadcn/sidebar/styles.css b/examples/sidebar-shadcn/sidebar/styles.css new file mode 100644 index 00000000..3acafa2b --- /dev/null +++ b/examples/sidebar-shadcn/sidebar/styles.css @@ -0,0 +1,84 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 47.4% 11.2%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 47.4% 11.2%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + + --card: 0 0% 100%; + --card-foreground: 222.2 47.4% 11.2%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 100% 50%; + --destructive-foreground: 210 40% 98%; + + --ring: 215 20.2% 65.1%; + + --radius: 0.5rem; + } + + .dark { + --background: 224 71% 4%; + --foreground: 213 31% 91%; + + --muted: 223 47% 11%; + --muted-foreground: 215.4 16.3% 56.9%; + + --accent: 216 34% 17%; + --accent-foreground: 210 40% 98%; + + --popover: 224 71% 4%; + --popover-foreground: 215 20.2% 65.1%; + + --border: 216 34% 17%; + --input: 216 34% 17%; + + --card: 224 71% 4%; + --card-foreground: 213 31% 91%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 1.2%; + + --secondary: 222.2 47.4% 11.2%; + --secondary-foreground: 210 40% 98%; + + --destructive: 0 63% 31%; + --destructive-foreground: 210 40% 98%; + + --ring: 216 34% 17%; + + --radius: 0.5rem; + } +} + +@layer base { + #root * { + @apply border-border; + } + + #root { + @apply bg-background text-foreground h-screen; + font-feature-settings: + 'rlig' 1, + 'calt' 1; + } +} diff --git a/examples/sidebar-shadcn/tailwind.config.js b/examples/sidebar-shadcn/tailwind.config.js new file mode 100644 index 00000000..866c370a --- /dev/null +++ b/examples/sidebar-shadcn/tailwind.config.js @@ -0,0 +1,81 @@ +const {fontFamily} = require('tailwindcss/defaultTheme') + +/** @type {import('tailwindcss').Config} */ +module.exports = { + darkMode: ['class'], + content: [ + './pages/**/*.{ts,tsx}', + './scripts/**/*.{ts,tsx}', + './components/**/*.{ts,tsx}', + './sidebar/**/*.{ts,tsx}' + ], + theme: { + container: { + center: true, + padding: '2rem', + screens: { + '2xl': '1400px' + } + }, + extend: { + colors: { + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))' + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))' + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))' + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))' + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))' + }, + popover: { + DEFAULT: 'hsl(var(--popover))', + foreground: 'hsl(var(--popover-foreground))' + }, + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))' + } + }, + borderRadius: { + lg: `var(--radius)`, + md: `calc(var(--radius) - 2px)`, + sm: 'calc(var(--radius) - 4px)' + }, + fontFamily: { + sans: ['var(--font-sans)', ...fontFamily.sans] + }, + keyframes: { + 'accordion-down': { + from: {height: '0'}, + to: {height: 'var(--radix-accordion-content-height)'} + }, + 'accordion-up': { + from: {height: 'var(--radix-accordion-content-height)'}, + to: {height: '0'} + } + }, + animation: { + 'accordion-down': 'accordion-down 0.2s ease-out', + 'accordion-up': 'accordion-up 0.2s ease-out' + } + } + }, + plugins: [require('tailwindcss-animate')] +} diff --git a/examples/sidebar-shadcn/tsconfig.json b/examples/sidebar-shadcn/tsconfig.json new file mode 100644 index 00000000..59fe9b00 --- /dev/null +++ b/examples/sidebar-shadcn/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "allowJs": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "jsx": "preserve", + "lib": ["dom", "dom.iterable", "esnext"], + "moduleResolution": "node", + "module": "esnext", + "noEmit": true, + "resolveJsonModule": true, + "strict": true, + "target": "esnext", + "isolatedModules": true, + "skipLibCheck": true, + "baseUrl": ".", + "paths": { + "@/*": ["./*"] + } + }, + "include": ["**/*.ts", "**/*.tsx"], + "exclude": ["node_modules", "dist"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fbe70a04..16d94c68 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,7 +53,7 @@ importers: version: 3.3.3 ts-jest: specifier: ^29.1.2 - version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) + version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) ts-node: specifier: ^10.9.2 version: 10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3) @@ -259,7 +259,7 @@ importers: devDependencies: extension: specifier: 2.0.0-beta.1 - version: 2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(esbuild@0.23.1)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3) + version: 2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3) examples/init: {} @@ -272,7 +272,7 @@ importers: version: 7.25.2 babel-loader: specifier: ^9.1.3 - version: 9.2.1(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + version: 9.2.1(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.7.26)) babel-preset-modern-browser-extension: specifier: ^0.7.0 version: 0.7.0(@babel/core@7.25.2) @@ -347,7 +347,7 @@ importers: devDependencies: node-polyfill-webpack-plugin: specifier: ^4.0.0 - version: 4.0.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + version: 4.0.0(webpack@5.92.1(@swc/core@1.7.26)) typescript: specifier: 5.3.3 version: 5.3.3 @@ -368,7 +368,7 @@ importers: devDependencies: node-polyfill-webpack-plugin: specifier: ^4.0.0 - version: 4.0.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + version: 4.0.0(webpack@5.92.1(@swc/core@1.7.26)) typescript: specifier: 5.3.3 version: 5.3.3 @@ -503,12 +503,33 @@ importers: examples/sidebar-shadcn: dependencies: + '@radix-ui/react-label': + specifier: ^2.1.0 + version: 2.1.0(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': + specifier: ^1.1.0 + version: 1.1.0(@types/react@18.3.8)(react@18.3.1) + '@radix-ui/react-switch': + specifier: ^1.1.1 + version: 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + class-variance-authority: + specifier: ^0.7.0 + version: 0.7.0 + clsx: + specifier: ^2.1.1 + version: 2.1.1 react: specifier: ^18.3.1 version: 18.3.1 react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) + tailwind-merge: + specifier: ^2.5.3 + version: 2.5.3 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.13(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3))) devDependencies: '@tailwindcss/typography': specifier: ^0.5.15 @@ -527,7 +548,7 @@ importers: version: 4.12.10(postcss@8.4.47) extension: specifier: latest - version: 2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(esbuild@0.23.1)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3) + version: 2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3) postcss: specifier: ^8.4.47 version: 8.4.47 @@ -594,13 +615,13 @@ importers: version: 7.5.8 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + version: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) mock-fs: specifier: ^5.2.0 version: 5.2.0 ts-jest: specifier: ^29.1.2 - version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) + version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)))(typescript@5.3.3) tsconfig: specifier: '*' version: 7.0.0 @@ -643,10 +664,10 @@ importers: version: 15.9.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + version: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) ts-jest: specifier: ^29.1.2 - version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) + version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)))(typescript@5.3.3) tsconfig: specifier: '*' version: 7.0.0 @@ -767,6 +788,9 @@ importers: tiny-glob: specifier: ^0.2.9 version: 0.2.9 + tsconfig-paths-webpack-plugin: + specifier: ^4.1.0 + version: 4.1.0 webextension-polyfill: specifier: ^0.12.0 version: 0.12.0 @@ -876,10 +900,10 @@ importers: version: 8.5.12 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + version: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) ts-jest: specifier: ^29.1.2 - version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) + version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)))(typescript@5.3.3) tsup: specifier: ^8.0.1 version: 8.3.0(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.47)(typescript@5.3.3)(yaml@2.5.1) @@ -2265,6 +2289,120 @@ packages: preact: ^10.4.0 webpack: ^4.0.0 || ^5.0.0 + '@radix-ui/primitive@1.1.0': + resolution: {integrity: sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==} + + '@radix-ui/react-compose-refs@1.1.0': + resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-context@1.1.1': + resolution: {integrity: sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-label@2.1.0': + resolution: {integrity: sha512-peLblDlFw/ngk3UWq0VnYaOLy6agTZZ+MUO/WhVfm14vJGML+xH4FAl2XQGLqdefjNb7ApRg6Yn7U42ZhmYXdw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-primitive@2.0.0': + resolution: {integrity: sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-slot@1.1.0': + resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-switch@1.1.1': + resolution: {integrity: sha512-diPqDDoBcZPSicYoMWdWx+bCPuTRH4QSp9J+65IvtdS0Kuzt67bI6n32vCj8q6NZmYW/ah+2orOtMwcX5eQwIg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-use-callback-ref@1.1.0': + resolution: {integrity: sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-controllable-state@1.1.0': + resolution: {integrity: sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-layout-effect@1.1.0': + resolution: {integrity: sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-previous@1.1.0': + resolution: {integrity: sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-size@1.1.0': + resolution: {integrity: sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@rollup/rollup-android-arm-eabi@4.22.2': resolution: {integrity: sha512-8Ao+EDmTPjZ1ZBABc1ohN7Ylx7UIYcjReZinigedTOnGFhIctyGPxY2II+hJ6gD2/vkDKZTyQ0e7++kwv6wDrw==} cpu: [arm] @@ -3344,6 +3482,9 @@ packages: cjs-module-lexer@1.4.1: resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + class-variance-authority@0.7.0: + resolution: {integrity: sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -3352,6 +3493,14 @@ packages: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} engines: {node: '>=6'} + clsx@2.0.0: + resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} + engines: {node: '>=6'} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + co@4.6.0: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} @@ -6315,6 +6464,14 @@ packages: resolution: {integrity: sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==} engines: {node: '>=10.0.0'} + tailwind-merge@2.5.3: + resolution: {integrity: sha512-d9ZolCAIzom1nf/5p4LdD5zvjmgSxY0BGgdSvmXIoMYAiPdAW/dSpP7joCDYFY7r/HkEa2qmPtkgsu0xjQeQtw==} + + tailwindcss-animate@1.0.7: + resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + tailwindcss@3.4.12: resolution: {integrity: sha512-Htf/gHj2+soPb9UayUNci/Ja3d8pTmu9ONTfh4QY8r3MATTZOzmv6UYWF7ZwikEIC8okpfqmGqrmDehua8mF8w==} engines: {node: '>=14.0.0'} @@ -6476,6 +6633,14 @@ packages: '@swc/wasm': optional: true + tsconfig-paths-webpack-plugin@4.1.0: + resolution: {integrity: sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA==} + engines: {node: '>=10.13.0'} + + tsconfig-paths@4.2.0: + resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} + engines: {node: '>=6'} + tsconfig@7.0.0: resolution: {integrity: sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==} @@ -8375,6 +8540,41 @@ snapshots: - supports-color - ts-node + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.16.5 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + '@jest/environment@29.7.0': dependencies: '@jest/fake-timers': 29.7.0 @@ -8590,6 +8790,23 @@ snapshots: webpack-dev-server: 5.1.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) optional: true + '@pmmmwh/react-refresh-webpack-plugin@0.5.15(@types/webpack@4.41.39)(react-refresh@0.14.2)(type-fest@4.26.1)(webpack-dev-server@5.1.0(webpack@5.92.1(@swc/core@1.7.26)))(webpack@5.92.1(@swc/core@1.7.26))': + dependencies: + ansi-html: 0.0.9 + core-js-pure: 3.38.1 + error-stack-parser: 2.1.4 + html-entities: 2.5.2 + loader-utils: 2.0.4 + react-refresh: 0.14.2 + schema-utils: 4.2.0 + source-map: 0.7.4 + webpack: 5.92.1(@swc/core@1.7.26) + optionalDependencies: + '@types/webpack': 4.41.39 + type-fest: 4.26.1 + webpack-dev-server: 5.1.0(webpack@5.92.1(@swc/core@1.7.26)) + optional: true + '@preact/signals-core@1.8.0': {} '@preact/signals@1.3.0(preact@10.24.0)': @@ -8616,6 +8833,101 @@ snapshots: webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) optional: true + '@prefresh/webpack@4.0.1(@prefresh/babel-plugin@0.5.1)(preact@10.24.0)(webpack@5.92.1(@swc/core@1.7.26))': + dependencies: + '@prefresh/babel-plugin': 0.5.1 + '@prefresh/core': 1.5.2(preact@10.24.0) + '@prefresh/utils': 1.2.0 + preact: 10.24.0 + webpack: 5.92.1(@swc/core@1.7.26) + optional: true + + '@radix-ui/primitive@1.1.0': {} + + '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.8)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.8 + + '@radix-ui/react-context@1.1.1(@types/react@18.3.8)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.8 + + '@radix-ui/react-label@2.1.0(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.8 + '@types/react-dom': 18.3.0 + + '@radix-ui/react-primitive@2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-slot': 1.1.0(@types/react@18.3.8)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.8 + '@types/react-dom': 18.3.0 + + '@radix-ui/react-slot@1.1.0(@types/react@18.3.8)(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.8)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.8 + + '@radix-ui/react-switch@1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.0 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.8)(react@18.3.1) + '@radix-ui/react-context': 1.1.1(@types/react@18.3.8)(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.8)(react@18.3.1) + '@radix-ui/react-use-previous': 1.1.0(@types/react@18.3.8)(react@18.3.1) + '@radix-ui/react-use-size': 1.1.0(@types/react@18.3.8)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.8 + '@types/react-dom': 18.3.0 + + '@radix-ui/react-use-callback-ref@1.1.0(@types/react@18.3.8)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.8 + + '@radix-ui/react-use-controllable-state@1.1.0(@types/react@18.3.8)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.8)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.8 + + '@radix-ui/react-use-layout-effect@1.1.0(@types/react@18.3.8)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.8 + + '@radix-ui/react-use-previous@1.1.0(@types/react@18.3.8)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.8 + + '@radix-ui/react-use-size@1.1.0(@types/react@18.3.8)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.8)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.8 + '@rollup/rollup-android-arm-eabi@4.22.2': optional: true @@ -9567,6 +9879,14 @@ snapshots: find-cache-dir: 4.0.0 schema-utils: 4.2.0 webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + optional: true + + babel-loader@9.2.1(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + '@babel/core': 7.25.2 + find-cache-dir: 4.0.0 + schema-utils: 4.2.0 + webpack: 5.92.1(@swc/core@1.7.26) babel-plugin-istanbul@6.1.1: dependencies: @@ -9875,6 +10195,10 @@ snapshots: cjs-module-lexer@1.4.1: {} + class-variance-authority@0.7.0: + dependencies: + clsx: 2.0.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -9887,6 +10211,10 @@ snapshots: kind-of: 6.0.3 shallow-clone: 3.0.1 + clsx@2.0.0: {} + + clsx@2.1.1: {} + co@4.6.0: {} code-red@1.0.4: @@ -10059,13 +10387,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)): + create-jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + jest-config: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -10131,6 +10459,19 @@ snapshots: optionalDependencies: webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + css-loader@6.11.0(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + icss-utils: 5.1.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-modules-extract-imports: 3.1.0(postcss@8.4.47) + postcss-modules-local-by-default: 4.0.5(postcss@8.4.47) + postcss-modules-scope: 3.2.0(postcss@8.4.47) + postcss-modules-values: 4.0.0(postcss@8.4.47) + postcss-value-parser: 4.2.0 + semver: 7.6.3 + optionalDependencies: + webpack: 5.92.1(@swc/core@1.7.26) + css-prefers-color-scheme@9.0.1(postcss@8.4.47): dependencies: postcss: 8.4.47 @@ -10312,6 +10653,11 @@ snapshots: dotenv-defaults: 2.0.2 webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + dotenv-webpack@8.1.0(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + dotenv-defaults: 2.0.2 + webpack: 5.92.1(@swc/core@1.7.26) + dotenv@16.4.5: {} dotenv@8.6.0: {} @@ -10594,7 +10940,7 @@ snapshots: go-git-it: 2.0.4 package-manager-detector: 0.2.0 - extension-develop@2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(esbuild@0.23.1)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3): + extension-develop@2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3): dependencies: '@colors/colors': 1.6.0 '@swc/core': 1.7.26 @@ -10610,10 +10956,10 @@ snapshots: chrome-location: 1.2.1 content-security-policy-parser: 0.6.0 cross-spawn: 7.0.3 - css-loader: 6.11.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + css-loader: 6.11.0(webpack@5.92.1(@swc/core@1.7.26)) csv-loader: 3.0.5 dotenv: 16.4.5 - dotenv-webpack: 8.1.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + dotenv-webpack: 8.1.0(webpack@5.92.1(@swc/core@1.7.26)) edge-location: 1.0.0 firefox-profile: 4.7.0 fx-runner: 1.4.0 @@ -10621,7 +10967,7 @@ snapshots: ignore: 5.3.2 loader-utils: 3.3.1 micromatch: 4.0.8 - mini-css-extract-plugin: 2.9.1(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + mini-css-extract-plugin: 2.9.1(webpack@5.92.1(@swc/core@1.7.26)) package-manager-detector: 0.2.0 parse5: 7.1.2 parse5-utils: 2.0.0 @@ -10629,31 +10975,31 @@ snapshots: progress: 2.0.3 schema-utils: 4.2.0 slugify: 1.6.6 - style-loader: 3.3.4(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) - swc-loader: 0.2.6(@swc/core@1.7.26)(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + style-loader: 3.3.4(webpack@5.92.1(@swc/core@1.7.26)) + swc-loader: 0.2.6(@swc/core@1.7.26)(webpack@5.92.1(@swc/core@1.7.26)) tiny-glob: 0.2.9 webextension-polyfill: 0.12.0 - webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) - webpack-dev-server: 5.1.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + webpack: 5.92.1(@swc/core@1.7.26) + webpack-dev-server: 5.1.0(webpack@5.92.1(@swc/core@1.7.26)) webpack-merge: 6.0.1 - webpack-target-webextension: 1.1.2(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + webpack-target-webextension: 1.1.2(webpack@5.92.1(@swc/core@1.7.26)) which: 4.0.0 ws: 8.18.0 optionalDependencies: - '@pmmmwh/react-refresh-webpack-plugin': 0.5.15(@types/webpack@4.41.39)(react-refresh@0.14.2)(type-fest@4.26.1)(webpack-dev-server@5.1.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)))(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) - '@prefresh/webpack': 4.0.1(@prefresh/babel-plugin@0.5.1)(preact@10.24.0)(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) - babel-loader: 9.2.1(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) - less-loader: 12.2.0(less@4.2.0)(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.15(@types/webpack@4.41.39)(react-refresh@0.14.2)(type-fest@4.26.1)(webpack-dev-server@5.1.0(webpack@5.92.1(@swc/core@1.7.26)))(webpack@5.92.1(@swc/core@1.7.26)) + '@prefresh/webpack': 4.0.1(@prefresh/babel-plugin@0.5.1)(preact@10.24.0)(webpack@5.92.1(@swc/core@1.7.26)) + babel-loader: 9.2.1(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.7.26)) + less-loader: 12.2.0(less@4.2.0)(webpack@5.92.1(@swc/core@1.7.26)) postcss-flexbugs-fixes: 5.0.2(postcss@8.4.47) - postcss-loader: 8.1.1(postcss@8.4.47)(typescript@5.3.3)(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + postcss-loader: 8.1.1(postcss@8.4.47)(typescript@5.3.3)(webpack@5.92.1(@swc/core@1.7.26)) postcss-normalize: 10.0.1(browserslist@4.23.3)(postcss@8.4.47) postcss-preset-env: 9.6.0(postcss@8.4.47) postcss-scss: 4.0.9(postcss@8.4.47) react-refresh: 0.14.2 react-refresh-typescript: 2.0.9(react-refresh@0.14.2)(typescript@5.3.3) resolve-url-loader: 5.0.0 - sass-loader: 16.0.2(sass@1.79.2)(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) - vue-loader: 17.4.2(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)) + sass-loader: 16.0.2(sass@1.79.2)(webpack@5.92.1(@swc/core@1.7.26)) + vue-loader: 17.4.2(webpack@5.92.1(@swc/core@1.7.26)) vue-style-loader: 4.1.3 vue-template-compiler: 2.7.16 transitivePeerDependencies: @@ -10683,7 +11029,7 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - extension@2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(esbuild@0.23.1)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3): + extension@2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3): dependencies: '@colors/colors': 1.6.0 '@types/chrome': 0.0.270 @@ -10693,7 +11039,7 @@ snapshots: '@types/react-dom': 18.3.0 commander: 11.1.0 extension-create: 2.0.0-beta.1 - extension-develop: 2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(esbuild@0.23.1)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3) + extension-develop: 2.0.0-beta.1(@babel/core@7.25.2)(@prefresh/babel-plugin@0.5.1)(@types/webpack@4.41.39)(browserslist@4.23.3)(less@4.2.0)(preact@10.24.0)(sass@1.79.2)(type-fest@4.26.1)(typescript@5.3.3) semver: 7.6.3 update-check: 1.5.4 webextension-polyfill: 0.12.0 @@ -11394,16 +11740,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)): + jest-cli@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + create-jest: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + jest-config: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -11444,7 +11790,38 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)): + jest-config@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)): + dependencies: + '@babel/core': 7.25.2 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.25.2) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.16.5 + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)): dependencies: '@babel/core': 7.25.2 '@jest/test-sequencer': 29.7.0 @@ -11470,7 +11847,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 22.5.5 - ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3) + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -11708,12 +12085,12 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)): + jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + jest-cli: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -11791,6 +12168,13 @@ snapshots: webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) optional: true + less-loader@12.2.0(less@4.2.0)(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + less: 4.2.0 + optionalDependencies: + webpack: 5.92.1(@swc/core@1.7.26) + optional: true + less@4.2.0: dependencies: copy-anything: 2.0.6 @@ -11965,6 +12349,12 @@ snapshots: tapable: 2.2.1 webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + mini-css-extract-plugin@2.9.1(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + schema-utils: 4.2.0 + tapable: 2.2.1 + webpack: 5.92.1(@swc/core@1.7.26) + minimalistic-assert@1.0.1: {} minimalistic-crypto-utils@1.0.1: {} @@ -12037,7 +12427,7 @@ snapshots: node-int64@0.4.0: {} - node-polyfill-webpack-plugin@4.0.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)): + node-polyfill-webpack-plugin@4.0.0(webpack@5.92.1(@swc/core@1.7.26)): dependencies: assert: 2.1.0 browserify-zlib: 0.2.0 @@ -12063,7 +12453,7 @@ snapshots: url: 0.11.4 util: 0.12.5 vm-browserify: 1.1.2 - webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + webpack: 5.92.1(@swc/core@1.7.26) node-releases@2.0.18: {} @@ -12480,6 +12870,18 @@ snapshots: - typescript optional: true + postcss-loader@8.1.1(postcss@8.4.47)(typescript@5.3.3)(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + cosmiconfig: 9.0.0(typescript@5.3.3) + jiti: 1.21.6 + postcss: 8.4.47 + semver: 7.6.3 + optionalDependencies: + webpack: 5.92.1(@swc/core@1.7.26) + transitivePeerDependencies: + - typescript + optional: true + postcss-logical@7.0.1(postcss@8.4.47): dependencies: postcss: 8.4.47 @@ -12972,6 +13374,14 @@ snapshots: webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) optional: true + sass-loader@16.0.2(sass@1.79.2)(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + neo-async: 2.6.2 + optionalDependencies: + sass: 1.79.2 + webpack: 5.92.1(@swc/core@1.7.26) + optional: true + sass@1.79.2: dependencies: chokidar: 4.0.0 @@ -13254,6 +13664,10 @@ snapshots: dependencies: webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + style-loader@3.3.4(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + webpack: 5.92.1(@swc/core@1.7.26) + stylelint-config-recommended-scss@14.1.0(postcss@8.4.47)(stylelint@16.9.0(typescript@5.3.3)): dependencies: postcss-scss: 4.0.9(postcss@8.4.47) @@ -13426,6 +13840,12 @@ snapshots: '@swc/counter': 0.1.3 webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + swc-loader@0.2.6(@swc/core@1.7.26)(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + '@swc/core': 1.7.26 + '@swc/counter': 0.1.3 + webpack: 5.92.1(@swc/core@1.7.26) + table@6.8.2: dependencies: ajv: 8.17.1 @@ -13434,6 +13854,12 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + tailwind-merge@2.5.3: {} + + tailwindcss-animate@1.0.7(tailwindcss@3.4.13(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3))): + dependencies: + tailwindcss: 3.4.13(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) + tailwindcss@3.4.12(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)): dependencies: '@alloc/quick-lru': 5.2.0 @@ -13504,6 +13930,17 @@ snapshots: '@swc/core': 1.7.26 esbuild: 0.23.1 + terser-webpack-plugin@5.3.10(@swc/core@1.7.26)(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.2 + terser: 5.33.0 + webpack: 5.92.1(@swc/core@1.7.26) + optionalDependencies: + '@swc/core': 1.7.26 + terser@5.33.0: dependencies: '@jridgewell/source-map': 0.3.6 @@ -13583,12 +14020,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3): + ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)))(typescript@5.3.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + jest: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.3.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -13603,12 +14040,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.25.2) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3): + ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) + jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -13621,7 +14058,6 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.25.2) - esbuild: 0.23.1 ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3): dependencies: @@ -13664,6 +14100,18 @@ snapshots: '@swc/core': 1.7.26 optional: true + tsconfig-paths-webpack-plugin@4.1.0: + dependencies: + chalk: 4.1.2 + enhanced-resolve: 5.17.1 + tsconfig-paths: 4.2.0 + + tsconfig-paths@4.2.0: + dependencies: + json5: 2.2.3 + minimist: 1.2.8 + strip-bom: 3.0.0 + tsconfig@7.0.0: dependencies: '@types/strip-bom': 3.0.0 @@ -13839,6 +14287,14 @@ snapshots: webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) optional: true + vue-loader@17.4.2(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + chalk: 4.1.2 + hash-sum: 2.0.0 + watchpack: 2.4.2 + webpack: 5.92.1(@swc/core@1.7.26) + optional: true + vue-style-loader@4.1.3: dependencies: hash-sum: 1.0.2 @@ -13893,6 +14349,17 @@ snapshots: optionalDependencies: webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + webpack-dev-middleware@7.4.2(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + colorette: 2.0.20 + memfs: 4.12.0 + mime-types: 2.1.35 + on-finished: 2.4.1 + range-parser: 1.2.1 + schema-utils: 4.2.0 + optionalDependencies: + webpack: 5.92.1(@swc/core@1.7.26) + webpack-dev-server@5.1.0(webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1)): dependencies: '@types/bonjour': 3.5.13 @@ -13931,6 +14398,44 @@ snapshots: - supports-color - utf-8-validate + webpack-dev-server@5.1.0(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + '@types/bonjour': 3.5.13 + '@types/connect-history-api-fallback': 1.5.4 + '@types/express': 4.17.21 + '@types/serve-index': 1.9.4 + '@types/serve-static': 1.15.7 + '@types/sockjs': 0.3.36 + '@types/ws': 8.5.12 + ansi-html-community: 0.0.8 + bonjour-service: 1.2.1 + chokidar: 3.6.0 + colorette: 2.0.20 + compression: 1.7.4 + connect-history-api-fallback: 2.0.0 + express: 4.21.0 + graceful-fs: 4.2.11 + html-entities: 2.5.2 + http-proxy-middleware: 2.0.6(@types/express@4.17.21) + ipaddr.js: 2.2.0 + launch-editor: 2.9.1 + open: 10.1.0 + p-retry: 6.2.0 + schema-utils: 4.2.0 + selfsigned: 2.4.1 + serve-index: 1.9.1 + sockjs: 0.3.24 + spdy: 4.0.2 + webpack-dev-middleware: 7.4.2(webpack@5.92.1(@swc/core@1.7.26)) + ws: 8.18.0 + optionalDependencies: + webpack: 5.92.1(@swc/core@1.7.26) + transitivePeerDependencies: + - bufferutil + - debug + - supports-color + - utf-8-validate + webpack-merge@6.0.1: dependencies: clone-deep: 4.0.1 @@ -13943,6 +14448,41 @@ snapshots: dependencies: webpack: 5.92.1(@swc/core@1.7.26)(esbuild@0.23.1) + webpack-target-webextension@1.1.2(webpack@5.92.1(@swc/core@1.7.26)): + dependencies: + webpack: 5.92.1(@swc/core@1.7.26) + + webpack@5.92.1(@swc/core@1.7.26): + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.6 + '@webassemblyjs/ast': 1.12.1 + '@webassemblyjs/wasm-edit': 1.12.1 + '@webassemblyjs/wasm-parser': 1.12.1 + acorn: 8.12.1 + acorn-import-attributes: 1.9.5(acorn@8.12.1) + browserslist: 4.23.3 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.17.1 + es-module-lexer: 1.5.4 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.10(@swc/core@1.7.26)(webpack@5.92.1(@swc/core@1.7.26)) + watchpack: 2.4.2 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + webpack@5.92.1(@swc/core@1.7.26)(esbuild@0.23.1): dependencies: '@types/eslint-scope': 3.7.7 diff --git a/programs/develop/package.json b/programs/develop/package.json index 3b198458..867d41b0 100644 --- a/programs/develop/package.json +++ b/programs/develop/package.json @@ -66,6 +66,7 @@ "style-loader": "^3.3.4", "swc-loader": "^0.2.6", "tiny-glob": "^0.2.9", + "tsconfig-paths-webpack-plugin": "^4.1.0", "vue-template-compiler": "^2.7.16", "webextension-polyfill": "^0.12.0", "webpack": "~5.92.0", diff --git a/programs/develop/webpack/plugin-compilation/index.ts b/programs/develop/webpack/plugin-compilation/index.ts index dbfac355..b1dcd580 100644 --- a/programs/develop/webpack/plugin-compilation/index.ts +++ b/programs/develop/webpack/plugin-compilation/index.ts @@ -1,5 +1,7 @@ +import path from 'path' import {Compiler} from 'webpack' import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin' +import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin' import {EnvPlugin} from './env' import {CleanDistFolderPlugin} from './clean-dist' import * as messages from '../lib/messages' @@ -26,6 +28,15 @@ export class CompilationPlugin { browser: this.browser }).apply(compiler) + compiler.options.resolve.plugins = [ + new TsconfigPathsPlugin({ + configFile: path.resolve( + path.dirname(this.manifestPath), + 'tsconfig.json' + ) + }) + ] + new CleanDistFolderPlugin().apply(compiler) compiler.hooks.done.tap('develop:brand', (stats) => { diff --git a/programs/develop/webpack/plugin-compilation/resolve-ts-path-config.ts b/programs/develop/webpack/plugin-compilation/resolve-ts-path-config.ts new file mode 100644 index 00000000..f0b943d2 --- /dev/null +++ b/programs/develop/webpack/plugin-compilation/resolve-ts-path-config.ts @@ -0,0 +1,53 @@ +import * as fs from 'fs' +import * as path from 'path' +import {Compiler} from 'webpack' + +export class ResolveTsPathsConfig { + apply(compiler: Compiler) { + const tsConfigPath = path.resolve(process.cwd(), 'tsconfig.json') + + if (fs.existsSync(tsConfigPath)) { + const tsConfig = JSON.parse(fs.readFileSync(tsConfigPath, 'utf-8')) + + if (tsConfig.compilerOptions && tsConfig.compilerOptions.paths) { + const {paths} = tsConfig.compilerOptions + + // Convert TS paths to Webpack alias format + const alias: Record = {} + for (const key in paths) { + if (paths.hasOwnProperty(key)) { + const aliasKey = key.replace('/*', '') + const aliasPath = path.resolve( + process.cwd(), + paths[key][0].replace('/*', '') + ) + alias[aliasKey] = aliasPath + } + } + + // Append to Webpack resolve.alias + if (!compiler.options.resolve) { + compiler.options.resolve = {} + } + if (!compiler.options.resolve.alias) { + compiler.options.resolve.alias = {} + } + compiler.options.resolve.alias = { + ...compiler.options.resolve.alias, + ...alias + } + + if (process.env.EXTENSION_ENV === 'development') { + console.log( + 'Successfully appended TypeScript paths to Webpack alias:', + alias + ) + } + } else { + // No paths found in tsconfig.json. Continue silently... + } + } else { + // tsconfig.json not found. Continue silently... + } + } +} From 3ea85d5139e19af25658f43abdaba973eee91a1e Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Fri, 4 Oct 2024 13:50:56 -0300 Subject: [PATCH 2/4] Resolve tsconfig paths, add shadcn template --- examples/sidebar-shadcn/background.ts | 6 +++-- examples/sidebar-shadcn/manifest.json | 2 +- examples/sidebar-shadcn/package.json | 5 ---- examples/sidebar/background.js | 13 +++------- examples/sidebar/manifest.json | 26 ++++++++----------- .../develop/webpack/plugin-compilation/env.ts | 10 +++---- .../webpack/plugin-compilation/index.ts | 11 -------- .../webpack/plugin-js-frameworks/index.ts | 12 +++++++++ 8 files changed, 35 insertions(+), 50 deletions(-) diff --git a/examples/sidebar-shadcn/background.ts b/examples/sidebar-shadcn/background.ts index 810df14e..fd56d616 100644 --- a/examples/sidebar-shadcn/background.ts +++ b/examples/sidebar-shadcn/background.ts @@ -1,11 +1,13 @@ const isFirefoxLike = - typeof browser !== 'undefined' && typeof browser.sidebarAction !== 'undefined' + process.env.EXTENSION_PUBLIC_BROWSER === 'firefox' || + process.env.EXTENSION_PUBLIC_BROWSER === 'gecko-based' + if (isFirefoxLike) { browser.browserAction.onClicked.addListener(() => { browser.sidebarAction.open() }) -} else if (typeof chrome !== 'undefined' && chrome.sidePanel) { +} else { chrome.action.onClicked.addListener(() => { chrome.sidePanel.setPanelBehavior({openPanelOnActionClick: true}) }) diff --git a/examples/sidebar-shadcn/manifest.json b/examples/sidebar-shadcn/manifest.json index e1827974..21066f59 100644 --- a/examples/sidebar-shadcn/manifest.json +++ b/examples/sidebar-shadcn/manifest.json @@ -28,7 +28,7 @@ "default_panel": "sidebar/index.html", "default_title": "Side Panel Content" }, - "permissions": ["tabs"], + "chromium:permissions": ["sidePanel"], "background": { "chromium:service_worker": "background.ts", "firefox:scripts": ["background.ts"] diff --git a/examples/sidebar-shadcn/package.json b/examples/sidebar-shadcn/package.json index 03db82f0..9e036d2d 100644 --- a/examples/sidebar-shadcn/package.json +++ b/examples/sidebar-shadcn/package.json @@ -9,11 +9,6 @@ "url": "https://yourwebsite.com" }, "license": "MIT", - "scripts": { - "dev": "extension dev", - "start": "extension start", - "build": "extension build" - }, "dependencies": { "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-slot": "^1.1.0", diff --git a/examples/sidebar/background.js b/examples/sidebar/background.js index b7680fdc..e8d4ee10 100644 --- a/examples/sidebar/background.js +++ b/examples/sidebar/background.js @@ -1,18 +1,13 @@ -if ( +const isFirefoxLike = process.env.EXTENSION_PUBLIC_BROWSER === 'firefox' || process.env.EXTENSION_PUBLIC_BROWSER === 'gecko-based' -) { - // Firefox (Gecko-based browsers) + +if (isFirefoxLike) { browser.browserAction.onClicked.addListener(() => { - // Opening the sidebar in Firefox browser.sidebarAction.open() }) } else { - // Chromium-based browsers chrome.action.onClicked.addListener(() => { - chrome.sidePanel.setOptions({ - path: 'side_panel/default_path.html', - enabled: true - }) + chrome.sidePanel.setPanelBehavior({openPanelOnActionClick: true}) }) } diff --git a/examples/sidebar/manifest.json b/examples/sidebar/manifest.json index 5f904643..b90970e1 100644 --- a/examples/sidebar/manifest.json +++ b/examples/sidebar/manifest.json @@ -14,27 +14,23 @@ }, "default_title": "Open Side Panel" }, - "firefox:sidebar_action": { - "default_panel": "sidebar/index.html", - "default_title": "Open Sidebar", - "default_icon": "images/extension_48.png" + "firefox:browser_action": { + "default_icon": { + "48": "images/extension_48.png" + }, + "default_title": "Open Side Panel" }, "chromium:side_panel": { "default_path": "sidebar/index.html", "default_title": "Side Panel Content" }, + "firefox:sidebar_action": { + "default_panel": "sidebar/index.html", + "default_title": "Side Panel Content" + }, "chromium:permissions": ["sidePanel"], - "firefox:permissions": ["storage", "tabs"], - "chromium:web_accessible_resources": [ - { - "resources": ["sidebar/index.html"], - "matches": [""] - } - ], - "firefox:web_accessible_resources": ["sidebar/index.html"], "background": { - "chromium:type": "module", - "chromium:service_worker": "background.js", - "firefox:scripts": ["background.js"] + "chromium:service_worker": "background.ts", + "firefox:scripts": ["background.ts"] } } diff --git a/programs/develop/webpack/plugin-compilation/env.ts b/programs/develop/webpack/plugin-compilation/env.ts index 636c9929..16defdf6 100644 --- a/programs/develop/webpack/plugin-compilation/env.ts +++ b/programs/develop/webpack/plugin-compilation/env.ts @@ -39,12 +39,8 @@ export class EnvPlugin { } } - if (!envPath) return - - console.log(messages.envFileLoaded()) - // Load the .env file manually and filter variables prefixed with 'EXTENSION_PUBLIC_' - const envVars = dotenv.config({path: envPath}).parsed || {} + const envVars = envPath ? dotenv.config({path: envPath}).parsed || {} : {} const defaultsPath = path.join(projectPath, '.env.defaults') const defaultsVars = fs.existsSync(defaultsPath) ? dotenv.config({path: defaultsPath}).parsed || {} @@ -70,7 +66,7 @@ export class EnvPlugin { {} as Record ) - // Support native environment variables: + // Ensure default environment variables are always available: // - EXTENSION_PUBLIC_BROWSER // - EXTENSION_PUBLIC_ENV_MODE filteredEnvVars['process.env.EXTENSION_PUBLIC_BROWSER'] = JSON.stringify( @@ -106,7 +102,7 @@ export class EnvPlugin { // Replace environment variables in the format $EXTENSION_PUBLIC_VAR fileContent = fileContent.replace( - /\$EXTENSION_PUBLIC_[A-Z_]+/g, + /$EXTENSION_PUBLIC_[A-Z_]+/g, (match) => { const envVarName = match.slice(1) // Remove the '$' const value = combinedVars[envVarName] || match diff --git a/programs/develop/webpack/plugin-compilation/index.ts b/programs/develop/webpack/plugin-compilation/index.ts index b1dcd580..dbfac355 100644 --- a/programs/develop/webpack/plugin-compilation/index.ts +++ b/programs/develop/webpack/plugin-compilation/index.ts @@ -1,7 +1,5 @@ -import path from 'path' import {Compiler} from 'webpack' import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin' -import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin' import {EnvPlugin} from './env' import {CleanDistFolderPlugin} from './clean-dist' import * as messages from '../lib/messages' @@ -28,15 +26,6 @@ export class CompilationPlugin { browser: this.browser }).apply(compiler) - compiler.options.resolve.plugins = [ - new TsconfigPathsPlugin({ - configFile: path.resolve( - path.dirname(this.manifestPath), - 'tsconfig.json' - ) - }) - ] - new CleanDistFolderPlugin().apply(compiler) compiler.hooks.done.tap('develop:brand', (stats) => { diff --git a/programs/develop/webpack/plugin-js-frameworks/index.ts b/programs/develop/webpack/plugin-js-frameworks/index.ts index 0465180a..80aa935b 100644 --- a/programs/develop/webpack/plugin-js-frameworks/index.ts +++ b/programs/develop/webpack/plugin-js-frameworks/index.ts @@ -1,6 +1,7 @@ import path from 'path' import {type Compiler} from 'webpack' import {PluginInterface} from '../webpack-types' +import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin' import {maybeUseBabel} from './js-tools/babel' import {isUsingPreact, maybeUsePreact} from './js-tools/preact' import {isUsingReact, maybeUseReact} from './js-tools/react' @@ -90,6 +91,17 @@ export class JsFrameworksPlugin { maybeInstallPreact?.plugins?.forEach((plugin) => plugin.apply(compiler)) maybeInstallVue?.plugins?.forEach((plugin) => plugin.apply(compiler)) maybeInstallSvelte?.plugins?.forEach((plugin) => plugin.apply(compiler)) + + if (isUsingTypeScript(projectPath)) { + compiler.options.resolve.plugins = [ + new TsconfigPathsPlugin({ + configFile: path.resolve( + path.dirname(this.manifestPath), + 'tsconfig.json' + ) + }) + ] + } } public async apply(compiler: Compiler) { From 6be8afab83cc519b7055f7b657b6df0c46afa460 Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Fri, 4 Oct 2024 14:14:10 -0300 Subject: [PATCH 3/4] Remove unused import --- programs/develop/webpack/plugin-compilation/env.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/programs/develop/webpack/plugin-compilation/env.ts b/programs/develop/webpack/plugin-compilation/env.ts index 16defdf6..d5882849 100644 --- a/programs/develop/webpack/plugin-compilation/env.ts +++ b/programs/develop/webpack/plugin-compilation/env.ts @@ -2,7 +2,6 @@ import fs from 'fs' import path from 'path' import {Compiler, Compilation, DefinePlugin, sources} from 'webpack' import dotenv from 'dotenv' -import * as messages from '../lib/messages' import {PluginInterface} from '../webpack-types' import {DevOptions} from '../../commands/dev' From df61c6636a04a8d17db2e37de37f1eabe61a880c Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Fri, 4 Oct 2024 14:14:48 -0300 Subject: [PATCH 4/4] Remove initial handmade plugin --- .../resolve-ts-path-config.ts | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 programs/develop/webpack/plugin-compilation/resolve-ts-path-config.ts diff --git a/programs/develop/webpack/plugin-compilation/resolve-ts-path-config.ts b/programs/develop/webpack/plugin-compilation/resolve-ts-path-config.ts deleted file mode 100644 index f0b943d2..00000000 --- a/programs/develop/webpack/plugin-compilation/resolve-ts-path-config.ts +++ /dev/null @@ -1,53 +0,0 @@ -import * as fs from 'fs' -import * as path from 'path' -import {Compiler} from 'webpack' - -export class ResolveTsPathsConfig { - apply(compiler: Compiler) { - const tsConfigPath = path.resolve(process.cwd(), 'tsconfig.json') - - if (fs.existsSync(tsConfigPath)) { - const tsConfig = JSON.parse(fs.readFileSync(tsConfigPath, 'utf-8')) - - if (tsConfig.compilerOptions && tsConfig.compilerOptions.paths) { - const {paths} = tsConfig.compilerOptions - - // Convert TS paths to Webpack alias format - const alias: Record = {} - for (const key in paths) { - if (paths.hasOwnProperty(key)) { - const aliasKey = key.replace('/*', '') - const aliasPath = path.resolve( - process.cwd(), - paths[key][0].replace('/*', '') - ) - alias[aliasKey] = aliasPath - } - } - - // Append to Webpack resolve.alias - if (!compiler.options.resolve) { - compiler.options.resolve = {} - } - if (!compiler.options.resolve.alias) { - compiler.options.resolve.alias = {} - } - compiler.options.resolve.alias = { - ...compiler.options.resolve.alias, - ...alias - } - - if (process.env.EXTENSION_ENV === 'development') { - console.log( - 'Successfully appended TypeScript paths to Webpack alias:', - alias - ) - } - } else { - // No paths found in tsconfig.json. Continue silently... - } - } else { - // tsconfig.json not found. Continue silently... - } - } -}