@pihanga2/shadcn 0.2.10 → 0.2.11

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.
@@ -82,7 +82,7 @@
82
82
  | **Cards available** | All 34 | 30 core (no graphin / jsonViewer / markdownViewer / resizable) |
83
83
  | **Requires `shadcn init`** | Yes | No |
84
84
  | **Files land in your project** | Yes — editable source | No — compiled bundle |
85
- | **Tailwind** | Consumer's own Tailwind config | Add `@source` pointing at `node_modules/@pihanga2/shadcn/dist-lib` |
85
+ | **Tailwind** | Consumer's own Tailwind config | `@import "@pihanga2/shadcn/theme.css"` handles source scanning automatically |
86
86
 
87
87
  Use the **registry** for projects already on shadcn/ui or when you want to
88
88
  customise card source. Use the **npm package** for monorepos, CI, or anywhere
@@ -137,11 +137,17 @@ Then use `registerCard(...)` in your init function exactly as with the registry.
137
137
  **Cards NOT in the npm package** (registry-only due to heavy deps):
138
138
  `graphin`, `jsonViewer`, `markdownViewer`, `resizable`.
139
139
 
140
- **Tailwind:** add `@source` to your CSS so Tailwind can scan the package:
140
+ **Tailwind:** import `theme.css` from the package — it contains `@source "."` which tells Tailwind to scan the package automatically (Tailwind v4.3+):
141
141
  ```css
142
142
  /* src/index.css — Tailwind v4 */
143
143
  @import "tailwindcss";
144
- @source "../../node_modules/@pihanga2/shadcn/dist-lib";
144
+ @import "@pihanga2/shadcn/theme.css";
145
+ ```
146
+
147
+ If you already have your own shadcn/ui theme and skip the `theme.css` import, add `@source` lines pointing at the package's compiled output instead:
148
+ ```css
149
+ @source "../node_modules/@pihanga2/shadcn/cards";
150
+ @source "../node_modules/@pihanga2/shadcn/components";
145
151
  ```
146
152
 
147
153
  ### Migrating a card from npm to a local customised copy
@@ -384,7 +390,7 @@ Full registry index: `https://ivcap-works.github.io/pihanga-shadcn/r/registry.js
384
390
  - Activate cards with `import "@pihanga2/shadcn"` (all) or per-card sub-paths.
385
391
  - `graphin`, `jsonViewer`, `markdownViewer`, `resizable` are not in the npm
386
392
  package — use the registry for those.
387
- - Point Tailwind at `node_modules/@pihanga2/shadcn/dist-lib` to scan classes.
393
+ - Import `@pihanga2/shadcn/theme.css` it handles Tailwind source scanning automatically via `@source "."`.
388
394
  - **Import types from the card index, not deep sub-paths.** The exports map
389
395
  only exposes `@pihanga2/shadcn/cards/<card>` — every type from
390
396
  `<card>.types.ts` is re-exported there. Deep paths like
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pihanga2/shadcn",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Pihanga core card components built on shadcn/ui and Radix UI — the npm distribution of pihanga-shadcn.",
5
5
  "type": "module",
6
6
  "exports": {
package/theme.css CHANGED
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  /* Scan this package's compiled files for Tailwind utility classes */
18
- @source unsafe(".");
18
+ @source ".";
19
19
 
20
20
  /* Map shadcn CSS vars to Tailwind v4 utility tokens */
21
21
  @theme inline {
@@ -99,4 +99,4 @@
99
99
  --chart-3: oklch(0.769 0.188 70.08);
100
100
  --chart-4: oklch(0.627 0.265 303.9);
101
101
  --chart-5: oklch(0.645 0.246 16.439);
102
- }
102
+ }