@eztrak/shared 0.1.0 → 0.1.1

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/README.md +47 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @eztrak/shared
2
+
3
+ Shared utilities, hooks, and UI components for Eztrak applications.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @eztrak/shared
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### `cn` — class name helper
14
+
15
+ Merge conditional class names and resolve conflicting Tailwind CSS utilities:
16
+
17
+ ```js
18
+ import { cn } from "@eztrak/shared/utils";
19
+
20
+ <div className={cn("px-4 py-2", isActive && "bg-blue-500", className)} />
21
+ ```
22
+
23
+ You can also import from the package root:
24
+
25
+ ```js
26
+ import { cn } from "@eztrak/shared";
27
+ ```
28
+
29
+ `cn` combines [`clsx`](https://github.com/lukeed/clsx) with [`tailwind-merge`](https://github.com/dcastil/tailwind-merge).
30
+
31
+ ## Exports
32
+
33
+ | Subpath | Description |
34
+ | --- | --- |
35
+ | `@eztrak/shared` | Main entry — re-exports available utilities |
36
+ | `@eztrak/shared/utils` | Utility functions (`cn`, and more over time) |
37
+
38
+ Additional subpath exports (`/hooks`, `/ui`, etc.) will be added in future releases.
39
+
40
+ ## Requirements
41
+
42
+ - Node.js 18+
43
+ - Works with any bundler that supports the [Node.js `exports` field](https://nodejs.org/api/packages.html#exports)
44
+
45
+ ## License
46
+
47
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eztrak/shared",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Shared hooks, utils, and UI for Eztrak federation apps",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",