UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: build fixes
Dillion Vermaacd92cdad02a
diff --git a/__registry__/index.tsx b/__registry__/index.tsxindex 85d52c87..0be98355 100644--- a/__registry__/index.tsx+++ b/__registry__/index.tsx@@ -3838,6 +3838,29 @@ export const Index: Record<string, any> = {}),meta: undefined,},+ "terminal-demo": {+ name: "terminal-demo",+ description: "Example showing a terminal with animated text.",+ type: "registry:example",+ registryDependencies: undefined,+ files: [+ {+ path: "registry/example/terminal-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],+ component: React.lazy(async () => {+ const mod = await import("@/registry/example/terminal-demo.tsx");+ const exportName =+ Object.keys(mod).find(+ (key) =>+ typeof mod[key] === "function" || typeof mod[key] === "object",+ ) || item.name;+ return { default: mod.default || mod[exportName] };+ }),+ meta: undefined,+ },utils: {name: "utils",description: "",diff --git a/components/theme-provider.tsx b/components/theme-provider.tsxindex f0584299..10a2bf6e 100644--- a/components/theme-provider.tsx+++ b/components/theme-provider.tsx@@ -1,7 +1,9 @@"use client";-import { ThemeProvider as NextThemesProvider } from "next-themes";-import { ThemeProviderProps } from "next-themes/dist/types";+import {+ ThemeProvider as NextThemesProvider,+ ThemeProviderProps,+} from "next-themes";export function ThemeProvider({ children, ...props }: ThemeProviderProps) {return <NextThemesProvider {...props}>{children}</NextThemesProvider>;diff --git a/package.json b/package.jsonindex 17a10ad9..3314b73d 100644--- a/package.json+++ b/package.json@@ -59,8 +59,8 @@"lodash.template": "^4.5.0","lucide-react": "^0.401.0","motion": "^11.15.0",- "next": "14.2.13",- "next-themes": "^0.3.0",+ "next": "^14",+ "next-themes": "^0.4.4","octokit": "^4.0.2","postcss": "8.4.39","posthog-js": "^1.144.2",@@ -109,7 +109,7 @@"remark-code-import": "^1.2.0","remark-gfm": "^4.0.0","rimraf": "^5.0.7",- "shiki": "^1.20.0",+ "shiki": "^2.3.1","tailwindcss": "3.4.1","tailwindcss-animate": "^1.0.7","tsx": "^4.11.0",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 05c08105..bb54b222 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -114,11 +114,11 @@ importers:specifier: ^11.15.0version: 11.15.0(@emotion/[email protected])([email protected]([email protected]))([email protected])next:- specifier: 14.2.13+ specifier: ^14version: 14.2.13(@babel/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])next-themes:- specifier: ^0.3.0+ specifier: ^0.4.4octokit:specifier: ^4.0.2version: 4.0.2@@ -242,7 +242,7 @@ importers:version: 7.1.0rehype-pretty-code:specifier: ^0.13.2- version: 0.13.2([email protected])+ version: 0.13.2([email protected])rehype-slug:specifier: 6.0.0version: 6.0.0@@ -259,8 +259,8 @@ importers:specifier: ^5.0.7version: 5.0.7shiki:- specifier: ^1.20.0- version: 1.20.0+ specifier: ^2.3.1+ version: 2.3.1tailwindcss:specifier: 3.4.1@@ -1969,20 +1969,26 @@ packages:'@rushstack/[email protected]':resolution: {integrity: sha512-kkKUDVlII2DQiKy7UstOR1ErJP8kUKAQ4oa+SQtM0K+lPdmmjj0YnnxBgtTVYH7mUKtbsxeFC9y0AmK7Yb78/A==}- '@shikijs/[email protected]':- resolution: {integrity: sha512-KlO3iE0THzSdYkzDFugt8SHe6FR3qNYTkmpbdW1d6xo8juQkMjybxAw/cBi2npL2eb2F4PbbnSs5Z9tDusfvyg==}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-u9WTI0CgQUicTJjkHoJbZosxLP2AlBPr8RV3cuh4SQDsXYqMomjnAoo4lZSqVq8a8kpMwyv/LqoSrg69dH0ZeA==}- '@shikijs/[email protected]':- resolution: {integrity: sha512-ZUMo758uduM0Tfgzi/kd+0IKMbNdumCxxWjY36uf1DIs2Qyg9HIq3vA1Wfa/vc6HE7tHWFpANRi3mv7UzJ68MQ==}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-sZLM4utrD1D28ENLtVS1+b7TIf1OIr3Gt0gLejMIG69lmFQI8mY0eGBdvbuvvM3Ys2M0kNYJF6BaWct27PggHw==}- '@shikijs/[email protected]':- resolution: {integrity: sha512-MQ40WkVTZk7by33ces4PGK6XNFSo6PYvKTSAr2kTWdRNhFmOcnaX+1XzvFwB26eySXR7U74t91czZ1qJkEgxTA==}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-UKJEMht1gkF2ROigCgb3FE2ssmbR8CJEwUneImJ2QoZqayH/96Vp88p2N+RmyqJEHo1rsOivlJKeU9shhKpfSA==}- '@shikijs/[email protected]':- resolution: {integrity: sha512-y+EaDvU2K6/GaXOKXxJaGnr1XtmZMF7MfS0pSEDdxEq66gCtKsLwQvVwoQFdp7R7dLlNAro3ijEE19sMZ0pzqg==}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-3csAX8RGm2EQCbpCb1Eq+r4DSpkku6gxb4jiHnOxlV4D36VYZsmunUiDo/4NZvpFA0CW33v/JoYmFJ3yQ2TvSw==}- '@shikijs/[email protected]':- resolution: {integrity: sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-QtkIM4Vz166+m4KED7/U5iVpgAdhfsHqMbBbjIzdTyTM1GIk2XQLcaB9b/LQY0y83Zl4lg7A7Hg+FT8+vAGL5A==}++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-1BQV6R4zF4pDPpPTbML8mPFX6RsNYtROfhgPT2YX+KW4B99a2UNtwuvmNj03BRy/sDz9GeAx9gAmnv8NroS/2w==}++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==}'@swc/[email protected]':resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}@@ -2793,6 +2799,9 @@ packages:resolution: {integrity: sha512-3avY1B+vUzNxEgkBDpKOP8WarvUAEwpRaiCL0He5OKWEFxzaOFiq4WoZEZe7qh0ReS7DiWoHMnYoQCKxNZNzSg==}+ resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==}+resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==}@@ -3360,6 +3369,9 @@ packages:resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==}+ resolution: {integrity: sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==}+resolution: {integrity: sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==}@@ -4265,11 +4277,11 @@ packages:resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}- resolution: {integrity: sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w==}+ resolution: {integrity: sha512-LDQ2qIOJF0VnuVrrMSMLrWGjRMkq+0mpgl6e0juCLqdJ+oo8Q84JRWT6Wh11VDQKkMMe+dVzDKLWs5n87T+PkQ==}peerDependencies:- react: ^16.8 || ^17 || ^18- react-dom: ^16.8 || ^17 || ^18+ react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc+ react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rcresolution: {integrity: sha512-BseY9YNw8QJSwLYD7hlZzl6QVDoSFHL/URN5K64kVEVpCsSOWeyjbIGK+dZUaRViHTaMQX8aqmnn0PHBbGZezg==}@@ -4387,8 +4399,8 @@ packages:resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==}engines: {node: '>=12'}- resolution: {integrity: sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==}+ resolution: {integrity: sha512-BJ3Jy22YlgejHSO7Fvmz1kKazlaPmRSUH+4adTDUS/dKQ4wLxI+gALZ8updbaux7/m7fIlpgOZ5fp/Inq5jUAw==}resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==}@@ -4880,8 +4892,14 @@ packages:resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}- resolution: {integrity: sha512-kK/AA3A9K6q2js89+VMymcboLOlF5lZRCYJv3gzszXFHBr6kO6qLGzbm+UIugBEV8SMMKCTR59txoY6ctRHYVw==}+ resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==}++ resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==}++ resolution: {integrity: sha512-uorlqlzAKjKQZ5P+kTJr3eeJGSVroLKoHmquUj4zHWuR+hEyNqlXsSKlYYF5F4NI6nl7tWCs0apKJ0lmfsXAPA==}resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==}@@ -5094,8 +5112,8 @@ packages:resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}- resolution: {integrity: sha512-MZJJ1PCFsQB1Piq+25wiz0a75yUv8Q3/fzy7SzRx5ONdjdtGdyiKwYn8vb/FnK5kjS0voWGnPpjG16POauUR+g==}+ resolution: {integrity: sha512-bD1XuVAyZBVxHiPlO/m2nM2F5g8G5MwSZHNYx+ArpcOW52+fCN6peGP5gG61O0gZpzUVbImeR3ar8cF+Z5WM8g==}resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}@@ -5145,10 +5163,6 @@ packages:react: ^18.0.0react-dom: ^18.0.0- resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}- engines: {node: '>=0.10.0'}-resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==}engines: {node: '>=0.10.0'}@@ -7489,32 +7503,40 @@ snapshots:'@rushstack/[email protected]': {}- '@shikijs/[email protected]':+ '@shikijs/[email protected]':dependencies:- '@shikijs/engine-javascript': 1.20.0- '@shikijs/engine-oniguruma': 1.20.0- '@shikijs/types': 1.20.0- '@shikijs/vscode-textmate': 9.2.2+ '@shikijs/engine-javascript': 2.3.1+ '@shikijs/engine-oniguruma': 2.3.1+ '@shikijs/types': 2.3.1+ '@shikijs/vscode-textmate': 10.0.1'@types/hast': 3.0.4- hast-util-to-html: 9.0.3+ hast-util-to-html: 9.0.4- '@shikijs/[email protected]':+ '@shikijs/[email protected]':dependencies:- '@shikijs/types': 1.20.0- '@shikijs/vscode-textmate': 9.2.2- oniguruma-to-js: 0.4.3+ '@shikijs/types': 2.3.1+ '@shikijs/vscode-textmate': 10.0.1+ oniguruma-to-es: 3.1.0- '@shikijs/[email protected]':+ '@shikijs/[email protected]':dependencies:- '@shikijs/types': 1.20.0- '@shikijs/vscode-textmate': 9.2.2+ '@shikijs/types': 2.3.1+ '@shikijs/vscode-textmate': 10.0.1- '@shikijs/[email protected]':+ '@shikijs/[email protected]':dependencies:- '@shikijs/vscode-textmate': 9.2.2+ '@shikijs/types': 2.3.1++ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 2.3.1++ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/vscode-textmate': 10.0.1'@types/hast': 3.0.4- '@shikijs/[email protected]': {}+ '@shikijs/[email protected]': {}'@swc/[email protected]': {}@@ -8209,12 +8231,12 @@ snapshots:dependencies:mdn-data: 2.0.28- source-map-js: 1.0.2+ source-map-js: 1.2.0dependencies:mdn-data: 2.0.30- source-map-js: 1.0.2+ source-map-js: 1.2.0@@ -8400,6 +8422,8 @@ snapshots:+ [email protected]: {}+@@ -8645,7 +8669,7 @@ snapshots:eslint: 8.57.1eslint-import-resolver-node: 0.3.9eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])- eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])+ eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected]))([email protected])eslint-plugin-jsx-a11y: 6.10.2([email protected])eslint-plugin-react: 7.37.4([email protected])eslint-plugin-react-hooks: 4.6.2([email protected])@@ -8672,8 +8696,8 @@ snapshots:debug: 4.3.4enhanced-resolve: 5.15.1eslint: 8.57.1- eslint-module-utils: 2.12.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])([email protected])- eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])+ eslint-module-utils: 2.12.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected]))([email protected])+ eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected]))([email protected])fast-glob: 3.3.2get-tsconfig: 4.7.5is-core-module: 2.16.1@@ -8684,7 +8708,7 @@ snapshots:- eslint-import-resolver-webpack- supports-color- [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])([email protected]):+ [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected]))([email protected]):dependencies:debug: 3.2.7optionalDependencies:@@ -8695,7 +8719,7 @@ snapshots:transitivePeerDependencies:- supports-color- [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]):+ [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected]))([email protected]):dependencies:'@rtsao/scc': 1.1.0array-includes: 3.1.8@@ -8706,7 +8730,7 @@ snapshots:doctrine: 2.1.0eslint: 8.57.1eslint-import-resolver-node: 0.3.9- eslint-module-utils: 2.12.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])([email protected])+ eslint-module-utils: 2.12.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected]))([email protected])hasown: 2.0.2is-core-module: 2.16.1is-glob: 4.0.3@@ -9280,6 +9304,20 @@ snapshots:stringify-entities: 4.0.3zwitch: 2.0.4+ dependencies:+ '@types/hast': 3.0.4+ '@types/unist': 3.0.3+ ccount: 2.0.1+ comma-separated-tokens: 2.0.3+ hast-util-whitespace: 3.0.0+ html-void-elements: 3.0.0+ mdast-util-to-hast: 13.2.0+ property-information: 6.4.1+ space-separated-tokens: 2.0.2+ stringify-entities: 4.0.3+ zwitch: 2.0.4+dependencies:'@types/estree': 1.0.5@@ -10533,7 +10571,7 @@ snapshots:dependencies:react: 18.3.1react-dom: 18.3.1([email protected])@@ -10686,9 +10724,11 @@ snapshots:dependencies:mimic-fn: 4.0.0dependencies:- regex: 4.3.2+ emoji-regex-xs: 1.0.0+ regex: 6.0.1+ regex-recursion: 6.0.2dependencies:@@ -11167,7 +11207,15 @@ snapshots:- [email protected]: {}+ dependencies:+ regex-utilities: 2.3.0++ [email protected]: {}++ dependencies:+ regex-utilities: 2.3.0dependencies:@@ -11200,13 +11248,13 @@ snapshots:hast-util-from-html: 2.0.3unified: 11.0.5dependencies:'@types/hast': 3.0.4hast-util-to-string: 3.0.0parse-numeric-range: 1.3.0rehype-parse: 9.0.0- shiki: 1.20.0+ shiki: 2.3.1unified: 11.0.5unist-util-visit: 5.0.0@@ -11502,13 +11550,15 @@ snapshots:dependencies:- '@shikijs/core': 1.20.0- '@shikijs/engine-javascript': 1.20.0- '@shikijs/engine-oniguruma': 1.20.0- '@shikijs/types': 1.20.0- '@shikijs/vscode-textmate': 9.2.2+ '@shikijs/core': 2.3.1+ '@shikijs/engine-javascript': 2.3.1+ '@shikijs/engine-oniguruma': 2.3.1+ '@shikijs/langs': 2.3.1+ '@shikijs/themes': 2.3.1+ '@shikijs/types': 2.3.1+ '@shikijs/vscode-textmate': 10.0.1'@types/hast': 3.0.4@@ -11569,8 +11619,6 @@ snapshots:react: 18.3.1react-dom: 18.3.1([email protected])- [email protected]: {}-@@ -11791,7 +11839,7 @@ snapshots:css-tree: 2.3.1css-what: 6.1.0csso: 5.0.5- picocolors: 1.0.0+ picocolors: 1.0.1dependencies:diff --git a/registry.json b/registry.jsonindex 47558aaf..745bb619 100644--- a/registry.json+++ b/registry.json@@ -2713,6 +2713,18 @@}]},+ {+ "name": "terminal-demo",+ "type": "registry:example",+ "title": "Terminal Demo",+ "description": "Example showing a terminal with animated text.",+ "files": [+ {+ "path": "registry/example/terminal-demo.tsx",+ "type": "registry:example"+ }+ ]+ },{"name": "utils","type": "registry:lib",diff --git a/registry/example/code-comparison-demo.tsx b/registry/example/code-comparison-demo.tsxindex 5555b575..e984964f 100644--- a/registry/example/code-comparison-demo.tsx+++ b/registry/example/code-comparison-demo.tsx@@ -1,4 +1,4 @@-import CodeComparison from "@/registry/magicui/code-comparison";+import { CodeComparison } from "@/registry/magicui/code-comparison";const beforeCode = `import { NextRequest } from 'next/server';diff --git a/registry/example/confetti-custom-shapes.tsx b/registry/example/confetti-custom-shapes.tsxindex d22e93ea..2afcaa07 100644--- a/registry/example/confetti-custom-shapes.tsx+++ b/registry/example/confetti-custom-shapes.tsx@@ -1,3 +1,5 @@+"use client";+import confetti from "canvas-confetti";import { Button } from "@/components/ui/button";diff --git a/registry/example/confetti-emoji.tsx b/registry/example/confetti-emoji.tsxindex d09a05c1..2f20ea2b 100644--- a/registry/example/confetti-emoji.tsx+++ b/registry/example/confetti-emoji.tsx@@ -1,3 +1,5 @@+"use client";+import confetti from "canvas-confetti";import { Button } from "@/components/ui/button";diff --git a/registry/example/confetti-fireworks.tsx b/registry/example/confetti-fireworks.tsxindex 19e1f0d5..56e9ea95 100644--- a/registry/example/confetti-fireworks.tsx+++ b/registry/example/confetti-fireworks.tsx@@ -1,3 +1,5 @@+"use client";+import confetti from "canvas-confetti";import { Button } from "@/components/ui/button";diff --git a/registry/example/confetti-side-cannons.tsx b/registry/example/confetti-side-cannons.tsxindex 01a29508..afaf712a 100644--- a/registry/example/confetti-side-cannons.tsx+++ b/registry/example/confetti-side-cannons.tsx@@ -1,3 +1,5 @@+"use client";+import confetti from "canvas-confetti";import { Button } from "@/components/ui/button";diff --git a/registry/example/confetti-stars.tsx b/registry/example/confetti-stars.tsxindex 6cc9b884..61a82d73 100644--- a/registry/example/confetti-stars.tsx+++ b/registry/example/confetti-stars.tsx@@ -1,3 +1,5 @@+"use client";+import confetti from "canvas-confetti";import { Button } from "@/components/ui/button";diff --git a/registry/example/line-shadow-text-demo.tsx b/registry/example/line-shadow-text-demo.tsxindex 5fc4aea6..7a7fff2b 100644--- a/registry/example/line-shadow-text-demo.tsx+++ b/registry/example/line-shadow-text-demo.tsx@@ -1,3 +1,5 @@+"use client";+import { LineShadowText } from "@/registry/magicui/line-shadow-text";import { useTheme } from "next-themes";diff --git a/registry/example/scratch-to-reveal-demo.tsx b/registry/example/scratch-to-reveal-demo.tsxindex 91ab8641..84b7f608 100644--- a/registry/example/scratch-to-reveal-demo.tsx+++ b/registry/example/scratch-to-reveal-demo.tsx@@ -1,22 +1,15 @@import { ScratchToReveal } from "@/registry/magicui/scratch-to-reveal";-const ScratchToRevealDemo = () => {- const handleComplete = () => {- // Do Something- };-+export default function ScratchToRevealDemo() {return (<ScratchToRevealwidth={250}height={250}minScratchPercentage={70}className="flex items-center justify-center overflow-hidden rounded-2xl border-2 bg-gray-100"- onComplete={handleComplete}gradientColors={["#A97CF8", "#F38CB8", "#FDCC92"]}><p className="text-9xl">😎</p></ScratchToReveal>);-};--export default ScratchToRevealDemo;+}diff --git a/registry/example/shine-border-demo-2.tsx b/registry/example/shine-border-demo-2.tsxindex efe1275b..b8bcbdfb 100644--- a/registry/example/shine-border-demo-2.tsx+++ b/registry/example/shine-border-demo-2.tsx@@ -1,3 +1,5 @@+"use client";+import { useTheme } from "next-themes";import { ShineBorder } from "@/registry/magicui/shine-border";diff --git a/registry/magicui/aurora-text.tsx b/registry/magicui/aurora-text.tsxindex 76758df2..83fbdab2 100644--- a/registry/magicui/aurora-text.tsx+++ b/registry/magicui/aurora-text.tsx@@ -1,3 +1,5 @@+"use client";+import { cn } from "@/lib/utils";import { motion, MotionProps } from "motion/react";import React from "react";diff --git a/registry/magicui/code-comparison.tsx b/registry/magicui/code-comparison.tsxindex ac9076dd..0b4ddfd5 100644--- a/registry/magicui/code-comparison.tsx+++ b/registry/magicui/code-comparison.tsx@@ -3,7 +3,6 @@import { FileIcon } from "lucide-react";import { useTheme } from "next-themes";import { useEffect, useState } from "react";-import { codeToHtml } from "shiki";interface CodeComparisonProps {beforeCode: string;@@ -14,7 +13,7 @@ interface CodeComparisonProps {darkTheme: string;}-export default function CodeComparison({+export function CodeComparison({beforeCode,afterCode,language,@@ -31,18 +30,24 @@ export default function CodeComparison({const selectedTheme = currentTheme === "dark" ? darkTheme : lightTheme;async function highlightCode() {- const before = await codeToHtml(beforeCode, {- lang: language,- theme: selectedTheme,- });- const after = await codeToHtml(afterCode, {- lang: language,- theme: selectedTheme,- });- setHighlightedBefore(before);- setHighlightedAfter(after);+ try {+ const { codeToHtml } = await import("shiki");+ const before = await codeToHtml(beforeCode, {+ lang: language,+ theme: selectedTheme,+ });+ const after = await codeToHtml(afterCode, {+ lang: language,+ theme: selectedTheme,+ });+ setHighlightedBefore(before);+ setHighlightedAfter(after);+ } catch (error) {+ console.error("Error highlighting code:", error);+ setHighlightedBefore(`<pre>${beforeCode}</pre>`);+ setHighlightedAfter(`<pre>${afterCode}</pre>`);+ }}-highlightCode();}, [theme,diff --git a/registry/magicui/scratch-to-reveal.tsx b/registry/magicui/scratch-to-reveal.tsxindex 149ee33a..07219958 100644--- a/registry/magicui/scratch-to-reveal.tsx+++ b/registry/magicui/scratch-to-reveal.tsx@@ -1,4 +1,5 @@"use client";+import { cn } from "@/lib/utils";import { motion, useAnimation } from "motion/react";import React, { useEffect, useRef, useState } from "react";diff --git a/registry/magicui/script-copy-btn.tsx b/registry/magicui/script-copy-btn.tsxindex 58bf2b9e..da83ded7 100644--- a/registry/magicui/script-copy-btn.tsx+++ b/registry/magicui/script-copy-btn.tsx@@ -6,7 +6,6 @@ import { Check, Copy } from "lucide-react";import { motion } from "motion/react";import { useTheme } from "next-themes";import { HTMLAttributes, useEffect, useState } from "react";-import { codeToHtml } from "shiki";interface ScriptCopyBtnProps extends HTMLAttributes<HTMLDivElement> {showMultiplePackageOptions?: boolean;@@ -35,6 +34,7 @@ export function ScriptCopyBtn({useEffect(() => {async function loadHighlightedCode() {try {+ const { codeToHtml } = await import("shiki");const highlighted = await codeToHtml(command, {lang: codeLanguage,themes: {diff --git a/registry/magicui/warp-background.tsx b/registry/magicui/warp-background.tsxindex 731449b9..550ddd7c 100644--- a/registry/magicui/warp-background.tsx+++ b/registry/magicui/warp-background.tsx@@ -1,3 +1,5 @@+"use client";+import { cn } from "@/lib/utils";import { motion } from "motion/react";import React, { HTMLAttributes, useCallback, useMemo } from "react";diff --git a/registry/registry-examples.ts b/registry/registry-examples.tsindex 860c0fb3..60c2788e 100644--- a/registry/registry-examples.ts+++ b/registry/registry-examples.ts@@ -981,4 +981,11 @@ export const examples: Registry["items"] = [},],},+ {+ name: "terminal-demo",+ type: "registry:example",+ title: "Terminal Demo",+ description: "Example showing a terminal with animated text.",+ files: [{ path: "example/terminal-demo.tsx", type: "registry:example" }],+ },];