@hznrkv/sidebar 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -614,8 +614,12 @@ async function main() {
614
614
  `$1import { TooltipProvider } from "@/components/ui/tooltip"\n`
615
615
  )
616
616
  rootLayout = rootLayout.replace(/<body([^>]*)>(\s*)\{children\}/, `<body$1>$2<TooltipProvider>{children}</TooltipProvider>`)
617
+ rootLayout = rootLayout.replace(/<html([^>]*?)className="([^"]*)"/, (_, attrs, cls) => {
618
+ if (cls.includes("dark")) return `<html${attrs}className="${cls}"`
619
+ return `<html${attrs}className="${cls} dark"`
620
+ })
617
621
  fs.writeFileSync(rootLayoutPath, rootLayout, "utf8")
618
- console.log(" ✔ src/app/layout.tsx (TooltipProvider adicionado)")
622
+ console.log(" ✔ src/app/layout.tsx (TooltipProvider + dark mode)")
619
623
  }
620
624
  }
621
625
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hznrkv/sidebar",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "CLI para instalar a sidebar @hznrkv em projetos Next.js + Shadcn",
5
5
  "bin": {
6
6
  "@hznrkv/sidebar": "./index.js"