rizzo-css 0.0.37 → 0.0.39

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 (32) hide show
  1. package/README.md +1 -1
  2. package/bin/rizzo-css.js +13 -16
  3. package/package.json +1 -1
  4. package/scaffold/astro-minimal/README-RIZZO.md +5 -5
  5. package/scaffold/svelte-minimal/README-RIZZO.md +5 -5
  6. package/scaffold/vanilla/README-RIZZO.md +6 -6
  7. package/scaffold/vanilla/components/accordion.html +12 -0
  8. package/scaffold/vanilla/components/alert.html +12 -0
  9. package/scaffold/vanilla/components/avatar.html +12 -0
  10. package/scaffold/vanilla/components/badge.html +12 -0
  11. package/scaffold/vanilla/components/breadcrumb.html +12 -0
  12. package/scaffold/vanilla/components/button.html +12 -0
  13. package/scaffold/vanilla/components/cards.html +12 -0
  14. package/scaffold/vanilla/components/copy-to-clipboard.html +12 -0
  15. package/scaffold/vanilla/components/divider.html +12 -0
  16. package/scaffold/vanilla/components/dropdown.html +12 -0
  17. package/scaffold/vanilla/components/forms.html +12 -0
  18. package/scaffold/vanilla/components/icons.html +12 -0
  19. package/scaffold/vanilla/components/index.html +12 -0
  20. package/scaffold/vanilla/components/modal.html +12 -0
  21. package/scaffold/vanilla/components/navbar.html +12 -0
  22. package/scaffold/vanilla/components/pagination.html +12 -0
  23. package/scaffold/vanilla/components/progress-bar.html +12 -0
  24. package/scaffold/vanilla/components/search.html +12 -0
  25. package/scaffold/vanilla/components/settings.html +12 -0
  26. package/scaffold/vanilla/components/spinner.html +12 -0
  27. package/scaffold/vanilla/components/table.html +12 -0
  28. package/scaffold/vanilla/components/tabs.html +12 -0
  29. package/scaffold/vanilla/components/theme-switcher.html +12 -0
  30. package/scaffold/vanilla/components/toast.html +12 -0
  31. package/scaffold/vanilla/components/tooltip.html +12 -0
  32. package/scaffold/vanilla/index.html +12 -0
package/README.md CHANGED
@@ -61,7 +61,7 @@ import 'rizzo-css';
61
61
  **Without a bundler (plain HTML):** Use a CDN. Both unpkg and jsDelivr resolve the package root to the built CSS (via the `unpkg` / `jsdelivr` fields in this package). For reliability or to pin a version, use the explicit path:
62
62
 
63
63
  ```html
64
- <!-- unpkg (pin version: replace @latest with @0.0.37 or any version) -->
64
+ <!-- unpkg (pin version: replace @latest with @0.0.39 or any version) -->
65
65
  <link rel="stylesheet" href="https://unpkg.com/rizzo-css@latest/dist/rizzo.min.css" />
66
66
 
67
67
  <!-- or jsDelivr -->
package/bin/rizzo-css.js CHANGED
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { copyFileSync, mkdirSync, writeFileSync, existsSync, readFileSync, readdirSync, statSync, unlinkSync } = require('fs');
4
- const { join, dirname, resolve: pathResolve, relative: pathRelative } = require('path');
4
+ const { join, dirname, resolve: pathResolve, relative: pathRelative, basename: pathBasename } = require('path');
5
5
  const { spawnSync } = require('child_process');
6
6
  const readline = require('readline');
7
7
 
8
8
  /** ASCII banner for CLI output: cat face (matches SVG logo) + name. Fits narrow terminals. */
9
- const CLI_BANNER = ` /\\___/\\
9
+ const CLI_BANNER = ` /\\___/\\
10
10
  __( o o )__
11
- ( =^= )
12
- _/ ~ \\_
11
+ ( =^= )
12
+ _/ ~ \\_
13
13
  / \\_____/ \\
14
14
  ____ ___ _____________ ____ ____ ____
15
15
  | _ \\|_ _|__ /__ / _ \\ / ___/ ___/ ___|
@@ -1618,19 +1618,16 @@ async function cmdInit(argv) {
1618
1618
  const projectChoice = await selectMenu(
1619
1619
  [
1620
1620
  { value: 'cwd', label: 'Current directory' },
1621
- { value: 'name', label: 'Enter project name (new folder)' },
1622
- { value: 'path', label: 'Enter path (directory to create or use)' },
1621
+ { value: 'path', label: 'Enter path or project name (new folder)' },
1623
1622
  ],
1624
1623
  '? Project location'
1625
1624
  );
1626
- if (projectChoice === 'name') {
1627
- name = await question('Project name (folder name): ');
1628
- } else if (projectChoice === 'path') {
1629
- customProjectPath = await question('Path (relative to current dir or absolute): ');
1630
- customProjectPath = (customProjectPath || '').trim();
1631
- if (!customProjectPath) {
1632
- console.log('No path entered. Using current directory.');
1633
- customProjectPath = null;
1625
+ if (projectChoice === 'path') {
1626
+ const pathInput = await question('Path or project name (relative to cwd or absolute; empty = current directory): ');
1627
+ const trimmed = (pathInput || '').trim();
1628
+ if (trimmed) {
1629
+ customProjectPath = trimmed;
1630
+ name = pathBasename(pathResolve(cwd, trimmed));
1634
1631
  }
1635
1632
  }
1636
1633
 
@@ -1659,12 +1656,12 @@ async function cmdInit(argv) {
1659
1656
  defaultLight = LIGHT_THEMES[0];
1660
1657
  }
1661
1658
 
1662
- const projectDirForPm = customProjectPath ? pathResolve(cwd, customProjectPath) : (name ? join(cwd, name) : cwd);
1659
+ const projectDirForPm = customProjectPath ? pathResolve(cwd, customProjectPath) : cwd;
1663
1660
  const pmArg = getFlagValue(argv, '--package-manager');
1664
1661
  selectedPm = parsePackageManager(pmArg) || await promptPackageManager(projectDirForPm);
1665
1662
  }
1666
1663
 
1667
- const projectDir = customProjectPath ? pathResolve(cwd, customProjectPath) : (name ? join(cwd, name) : cwd);
1664
+ const projectDir = customProjectPath ? pathResolve(cwd, customProjectPath) : cwd;
1668
1665
  if (isDirNonEmpty(projectDir) && !yes) {
1669
1666
  const ok = await confirmNonEmptyDir(projectDir);
1670
1667
  if (!ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rizzo-css",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "scripts": {
5
5
  "prepublishOnly": "cd ../.. && pnpm run lint:css:fix && pnpm run build:css && node scripts/copy-scaffold.js && node scripts/prepare-vanilla-scaffold.js"
6
6
  },
@@ -1,10 +1,10 @@
1
- # Astro + Rizzo CSS (minimal)
1
+ # Astro + Rizzo CSS
2
2
 
3
3
  ```
4
- /\___/\
4
+ /\___/\
5
5
  __( o o )__
6
- ( =^= )
7
- _/ ~ \_
6
+ ( =^= )
7
+ _/ ~ \_
8
8
  / \_____/ \
9
9
  ____ ___ _____________ ____ ____ ____
10
10
  | _ \|_ _|__ /__ / _ \ / ___/ ___/ ___|
@@ -14,7 +14,7 @@
14
14
  Design system · Vanilla · Astro · Svelte
15
15
  ```
16
16
 
17
- Minimal Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init --framework astro --template full`, **minimal**, or **manual**. When you choose **minimal** or **full**, the CLI copies all interactive Rizzo components (Button, Modal, Navbar, Search, Settings, ThemeSwitcher, etc.) into this project so they work together; **manual** lets you pick which of those to include (all are pre-selected by default).
17
+ Astro project with Rizzo CSS. Scaffolded with `npx rizzo-css init --framework astro --template full`, **minimal**, or **manual**. When you choose **Full** or **Minimal**, the CLI copies all interactive Rizzo components (Button, Modal, Navbar, Search, Settings, ThemeSwitcher, etc.) into this project so they work together; **Manual** lets you pick which of those to include (all are pre-selected by default).
18
18
 
19
19
  ## Setup
20
20
 
@@ -1,10 +1,10 @@
1
- # SvelteKit + Rizzo CSS (minimal)
1
+ # SvelteKit + Rizzo CSS
2
2
 
3
3
  ```
4
- /\___/\
4
+ /\___/\
5
5
  __( o o )__
6
- ( =^= )
7
- _/ ~ \_
6
+ ( =^= )
7
+ _/ ~ \_
8
8
  / \_____/ \
9
9
  ____ ___ _____________ ____ ____ ____
10
10
  | _ \|_ _|__ /__ / _ \ / ___/ ___/ ___|
@@ -14,7 +14,7 @@
14
14
  Design system · Vanilla · Astro · Svelte
15
15
  ```
16
16
 
17
- Minimal SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init --framework svelte --template full`, **minimal**, or **manual**. When you choose **minimal** or **full**, the CLI copies all interactive Rizzo components (Button, Modal, Navbar, Search, Settings, ThemeSwitcher, etc.) into this project so they work together; **manual** lets you pick which of those to include (all are pre-selected by default).
17
+ SvelteKit project with Rizzo CSS. Scaffolded with `npx rizzo-css init --framework svelte --template full`, **minimal**, or **manual**. When you choose **Full** or **Minimal**, the CLI copies all interactive Rizzo components (Button, Modal, Navbar, Search, Settings, ThemeSwitcher, etc.) into this project so they work together; **Manual** lets you pick which of those to include (all are pre-selected by default).
18
18
 
19
19
  ## Setup
20
20
 
@@ -1,10 +1,10 @@
1
1
  # Vanilla JS + Rizzo CSS
2
2
 
3
3
  ```
4
- /\___/\
4
+ /\___/\
5
5
  __( o o )__
6
- ( =^= )
7
- _/ ~ \_
6
+ ( =^= )
7
+ _/ ~ \_
8
8
  / \_____/ \
9
9
  ____ ___ _____________ ____ ____ ____
10
10
  | _ \|_ _|__ /__ / _ \ / ___/ ___/ ___|
@@ -27,7 +27,7 @@ If you prefer to load CSS from a CDN instead of the local file, replace the `<li
27
27
  - `<link rel="stylesheet" href="https://unpkg.com/rizzo-css@latest/dist/rizzo.min.css" />`
28
28
  - Or jsDelivr: `https://cdn.jsdelivr.net/npm/rizzo-css@latest/dist/rizzo.min.css`
29
29
 
30
- (Replace `@latest` with a specific version, e.g. `@0.0.37`, in production.)
30
+ (Replace `@latest` with a specific version, e.g. `@0.0.39`, in production.)
31
31
 
32
32
  The CLI replaces placeholders in `index.html` (e.g. `{{DATA_THEME}}`, `{{TITLE}}`) when you run `rizzo-css init`. The theme selected during init is used on first load when you have no saved preference in the browser.
33
33
 
@@ -66,7 +66,7 @@ pnpm dlx serve .
66
66
 
67
67
  ## Other scaffolds
68
68
 
69
- - **Astro:** `scaffold/astro-minimal/` — minimal Astro app; optional components from `scaffold/astro/` (see README-RIZZO.md).
70
- - **Svelte:** `scaffold/svelte-minimal/` — minimal SvelteKit app; optional components from `scaffold/svelte/` (see README-RIZZO.md).
69
+ - **Astro:** `scaffold/astro-minimal/` — Astro app (Full or Minimal template); optional components from `scaffold/astro/` (see README-RIZZO.md).
70
+ - **Svelte:** `scaffold/svelte-minimal/` — SvelteKit app (Full or Minimal template); optional components from `scaffold/svelte/` (see README-RIZZO.md).
71
71
 
72
72
  Docs: [rizzo-css.vercel.app](https://rizzo-css.vercel.app)