@lucaismyname/create-l1-stack 0.0.24 → 0.0.26

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/package.json +1 -1
  2. package/src/index.js +10 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaismyname/create-l1-stack",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/index.js CHANGED
@@ -162,7 +162,7 @@ const ICON_SETS = {
162
162
  },
163
163
  radix: {
164
164
  dependency: { name: '@radix-ui/react-icons', version: '^1.3.2' },
165
- tsx: `import * as React from "react"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "@radix-ui/react-icons"\n\ntype IconProps = React.SVGProps<SVGSVGElement>\n\nconst FallbackIcon = (props: IconProps) => (\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}>\n <path d="M12 2l3 7h7l-5.5 4 2 7L12 16l-6.5 4 2-7L2 9h7l3-7z" />\n </svg>\n)\n\nexport const Icons = {\n Check: (props: IconProps) => <CheckIcon {...props} />,\n ChevronDown: (props: IconProps) => <ChevronDownIcon {...props} />,\n ChevronUp: (props: IconProps) => <ChevronUpIcon {...props} />,\n Database: (props: IconProps) => <FallbackIcon {...props} />,\n NotebookPen: (props: IconProps) => <FallbackIcon {...props} />,\n Rocket: (props: IconProps) => <FallbackIcon {...props} />,\n Server: (props: IconProps) => <FallbackIcon {...props} />,\n}\n`,
165
+ tsx: `import * as React from "react"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "@radix-ui/react-icons"\n\ntype IconProps = Omit<React.SVGProps<SVGSVGElement>, "children">\n\nconst FallbackIcon = (props: IconProps) => (\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}>\n <path d="M12 2l3 7h7l-5.5 4 2 7L12 16l-6.5 4 2-7L2 9h7l3-7z" />\n </svg>\n)\n\nexport const Icons = {\n Check: (props: IconProps) => <CheckIcon {...props} />,\n ChevronDown: (props: IconProps) => <ChevronDownIcon {...props} />,\n ChevronUp: (props: IconProps) => <ChevronUpIcon {...props} />,\n Database: (props: IconProps) => <FallbackIcon {...props} />,\n NotebookPen: (props: IconProps) => <FallbackIcon {...props} />,\n Rocket: (props: IconProps) => <FallbackIcon {...props} />,\n Server: (props: IconProps) => <FallbackIcon {...props} />,\n}\n`,
166
166
  jsx: `import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "@radix-ui/react-icons"\n\nconst FallbackIcon = (props) => (\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}>\n <path d="M12 2l3 7h7l-5.5 4 2 7L12 16l-6.5 4 2-7L2 9h7l3-7z" />\n </svg>\n)\n\nexport const Icons = {\n Check: (props) => <CheckIcon {...props} />,\n ChevronDown: (props) => <ChevronDownIcon {...props} />,\n ChevronUp: (props) => <ChevronUpIcon {...props} />,\n Database: (props) => <FallbackIcon {...props} />,\n NotebookPen: (props) => <FallbackIcon {...props} />,\n Rocket: (props) => <FallbackIcon {...props} />,\n Server: (props) => <FallbackIcon {...props} />,\n}\n`,
167
167
  },
168
168
  feather: {
@@ -170,11 +170,6 @@ const ICON_SETS = {
170
170
  tsx: `import * as React from "react"\nimport { Check, ChevronDown, ChevronUp, Database, Edit3, Send, Server } from "react-feather"\n\ntype IconProps = React.SVGProps<SVGSVGElement>\n\nexport const Icons = {\n Check: (props: IconProps) => <Check {...props} />,\n ChevronDown: (props: IconProps) => <ChevronDown {...props} />,\n ChevronUp: (props: IconProps) => <ChevronUp {...props} />,\n Database: (props: IconProps) => <Database {...props} />,\n NotebookPen: (props: IconProps) => <Edit3 {...props} />,\n Rocket: (props: IconProps) => <Send {...props} />,\n Server: (props: IconProps) => <Server {...props} />,\n}\n`,
171
171
  jsx: `import { Check, ChevronDown, ChevronUp, Database, Edit3, Send, Server } from "react-feather"\n\nexport const Icons = {\n Check: (props) => <Check {...props} />,\n ChevronDown: (props) => <ChevronDown {...props} />,\n ChevronUp: (props) => <ChevronUp {...props} />,\n Database: (props) => <Database {...props} />,\n NotebookPen: (props) => <Edit3 {...props} />,\n Rocket: (props) => <Send {...props} />,\n Server: (props) => <Server {...props} />,\n}\n`,
172
172
  },
173
- materialSymbols: {
174
- dependency: { name: 'react-material-symbols', version: '^4.1.0' },
175
- tsx: `import * as React from "react"\nimport { MaterialSymbol } from "react-material-symbols"\n\ntype IconProps = React.SVGProps<SVGSVGElement>\n\ntype MaterialProps = IconProps & { icon: string }\n\nconst MS = ({ icon, className }: MaterialProps) => (\n <MaterialSymbol icon={icon} className={className} size={24} fill={0} grade={0} opticalSize={24} />\n)\n\nexport const Icons = {\n Check: (props: IconProps) => <MS icon="check" {...props} />,\n ChevronDown: (props: IconProps) => <MS icon="keyboard_arrow_down" {...props} />,\n ChevronUp: (props: IconProps) => <MS icon="keyboard_arrow_up" {...props} />,\n Database: (props: IconProps) => <MS icon="database" {...props} />,\n NotebookPen: (props: IconProps) => <MS icon="edit_note" {...props} />,\n Rocket: (props: IconProps) => <MS icon="rocket_launch" {...props} />,\n Server: (props: IconProps) => <MS icon="dns" {...props} />,\n}\n`,
176
- jsx: `import { MaterialSymbol } from "react-material-symbols"\n\nconst MS = ({ icon, className }) => (\n <MaterialSymbol icon={icon} className={className} size={24} fill={0} grade={0} opticalSize={24} />\n)\n\nexport const Icons = {\n Check: (props) => <MS icon="check" {...props} />,\n ChevronDown: (props) => <MS icon="keyboard_arrow_down" {...props} />,\n ChevronUp: (props) => <MS icon="keyboard_arrow_up" {...props} />,\n Database: (props) => <MS icon="database" {...props} />,\n NotebookPen: (props) => <MS icon="edit_note" {...props} />,\n Rocket: (props) => <MS icon="rocket_launch" {...props} />,\n Server: (props) => <MS icon="dns" {...props} />,\n}\n`,
177
- },
178
173
  }
179
174
 
180
175
  function updateCssVarInBlock(css, blockSelector, varName, value) {
@@ -428,7 +423,7 @@ async function applyLayout(targetDir, language, layoutKey, containerPresetKey) {
428
423
 
429
424
  await fse.remove(topNavPath)
430
425
 
431
- const app = `import { Route, Routes } from 'react-router-dom'\nimport SidebarLayout from './components/SidebarLayout'\nimport { ErrorBoundary } from './components/ErrorBoundary'\nimport Home from './pages/Home'\nimport Integrations from './pages/Integrations'\nimport NotFound from './pages/NotFound'\n\nfunction App() {\n return (\n <SidebarLayout>\n <ErrorBoundary>\n <Routes>\n <Route path=\"/\" element={<Home />} />\n <Route path=\"/integrations\" element={<Integrations />} />\n <Route path=\"*\" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>\n </SidebarLayout>\n )\n}\n\nexport default App\n`
426
+ const app = `import { Route, Routes } from 'react-router-dom'\nimport SidebarLayout from './components/SidebarLayout'\nimport { ErrorBoundary } from './components/ErrorBoundary'\nimport Home from './pages/Home'\nimport QuickStart from './pages/QuickStart'\nimport NotFound from './pages/NotFound'\n\nfunction App() {\n return (\n <SidebarLayout>\n <ErrorBoundary>\n <Routes>\n <Route path=\"/\" element={<Home />} />\n <Route path=\"/quick-start\" element={<QuickStart />} />\n <Route path=\"*\" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>\n </SidebarLayout>\n )\n}\n\nexport default App\n`
432
427
  await fs.writeFile(appPath, app, 'utf8')
433
428
  return
434
429
  }
@@ -437,7 +432,7 @@ async function applyLayout(targetDir, language, layoutKey, containerPresetKey) {
437
432
  await fse.remove(topNavPath)
438
433
  await fse.remove(sidebarPath)
439
434
 
440
- const app = `import { Route, Routes } from 'react-router-dom'\nimport { ErrorBoundary } from './components/ErrorBoundary'\nimport Home from './pages/Home'\nimport Integrations from './pages/Integrations'\nimport NotFound from './pages/NotFound'\n\nfunction App() {\n return (\n <div className=\"min-h-dvh\">\n <main className=\"mx-auto ${containerMaxW} px-4 py-10\">\n <ErrorBoundary>\n <Routes>\n <Route path=\"/\" element={<Home />} />\n <Route path=\"/integrations\" element={<Integrations />} />\n <Route path=\"*\" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>\n </main>\n </div>\n )\n}\n\nexport default App\n`
435
+ const app = `import { Route, Routes } from 'react-router-dom'\nimport { ErrorBoundary } from './components/ErrorBoundary'\nimport Home from './pages/Home'\nimport QuickStart from './pages/QuickStart'\nimport NotFound from './pages/NotFound'\n\nfunction App() {\n return (\n <div className=\"min-h-dvh\">\n <main className=\"mx-auto ${containerMaxW} px-4 py-10\">\n <ErrorBoundary>\n <Routes>\n <Route path=\"/\" element={<Home />} />\n <Route path=\"/quick-start\" element={<QuickStart />} />\n <Route path=\"*\" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>\n </main>\n </div>\n )\n}\n\nexport default App\n`
441
436
  await fs.writeFile(appPath, app, 'utf8')
442
437
  return
443
438
  }
@@ -457,15 +452,15 @@ async function applyLayout(targetDir, language, layoutKey, containerPresetKey) {
457
452
  "import TopNav from './components/TopNav'\nimport { ErrorBoundary } from './components/ErrorBoundary'\n"
458
453
  )
459
454
  }
460
- if (!next.includes("./pages/NotFound")) {
461
- next = next.replace(
462
- /import Integrations from '\.\/pages\/Integrations'\n/,
463
- "import Integrations from './pages/Integrations'\nimport NotFound from './pages/NotFound'\n"
464
- )
465
- }
455
+ // if (!next.includes("./pages/NotFound")) {
456
+ // next = next.replace(
457
+ // /import Integrations from '\.\/pages\/Integrations'\n/,
458
+ // "import Integrations from './pages/Integrations'\nimport NotFound from './pages/NotFound'\n"
459
+ // )
460
+ // }
466
461
  next = next.replace(
467
462
  /<Routes>[\s\S]*?<\/Routes>/m,
468
- `<ErrorBoundary>\n <Routes>\n <Route path="/" element={<Home />} />\n <Route path="/integrations" element={<Integrations />} />\n <Route path="*" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>`
463
+ `<ErrorBoundary>\n <Routes>\n <Route path="/" element={<Home />} />\n <Route path="/quick-start" element={<QuickStart />} />\n <Route path="*" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>`
469
464
  )
470
465
  if (next !== src) await fs.writeFile(appPath, next, 'utf8')
471
466
  } catch {
@@ -648,7 +643,6 @@ async function main() {
648
643
  options: [
649
644
  { value: 'lucide', label: 'Lucide (default)' },
650
645
  { value: 'heroicons', label: 'HeroIcons' },
651
- { value: 'materialSymbols', label: 'Material Symbols' },
652
646
  { value: 'tabler', label: 'Tabler Icons' },
653
647
  { value: 'radix', label: 'Radix Icons' },
654
648
  { value: 'feather', label: 'Feather Icons' },