@sanmid/flux 0.1.5 → 0.1.9

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.
package/README.md CHANGED
@@ -44,26 +44,15 @@ Open your app at `http://localhost:3000` (or your dev URL). Toggle the editor wi
44
44
 
45
45
  ## Tailwind
46
46
 
47
- Include the built bundle in `content` so utilities used inside Flux are generated:
48
-
49
- ```js
50
- // tailwind.config.ts
51
- export default {
52
- content: [
53
- "./app/**/*.{ts,tsx}",
54
- "./components/**/*.{ts,tsx}",
55
- "./node_modules/@sanmid/flux/dist/index.js",
56
- ],
57
- };
58
- ```
47
+ Flux **injects its own utility CSS** for light-DOM UI (floating toggle, panel chrome, etc.), so you **do not** need to add Flux to your Tailwind `content` for normal use.
48
+
49
+ If you fork Flux or build from source and change its class names, add your paths (or the published bundle) to `content` so your build picks up those utilities.
59
50
 
60
51
  ## Next.js
61
52
 
62
- ```js
63
- const nextConfig = {
64
- transpilePackages: ["@sanmid/flux"],
65
- };
66
- ```
53
+ **No extra Next config** — the published build ships **ESM and CJS** (`package.json` `exports`) and a **`"use client"`** banner so the App Router can consume `@sanmid/flux` like any other dependency. Mount `DesignEditor` from a client component (as in [Local development](#local-development-localhost)) and you are done.
54
+
55
+ If you ever hit a resolution error on an older Next.js release, try adding `transpilePackages: ["@sanmid/flux"]` to `next.config` as a fallback.
67
56
 
68
57
  ## Security
69
58
 
@@ -78,6 +67,16 @@ See [SECURITY.md](./SECURITY.md) for data handling (clipboard, `localStorage`, D
78
67
 
79
68
  Optional: enable **provenance** on supported registries for supply-chain transparency.
80
69
 
70
+ ## Repository layout
71
+
72
+ | Path | Role |
73
+ | --- | --- |
74
+ | **`src/`** | Library source (TypeScript / React). |
75
+ | **`dist/`** | Build output (not committed). Produced by `pnpm run build`. |
76
+ | **`package.json` → `files`** | **Only** `dist`, `README.md`, `LICENSE`, and `SECURITY.md` are published to npm — that is what consumers install. |
77
+ | **`playground/`** | Optional Vite app for local testing; **not** on npm, but usually **kept in git** so maintainers can run `pnpm run dev:playground` without a separate repo. |
78
+ | **`scripts/`** | Tailwind → CSS strings, `tsup`, `prepend-use-client`. |
79
+
81
80
  ## Playground
82
81
 
83
82
  This repo includes a **private** Vite app under `playground/` for local demos. It is **not** part of the published npm artifact. See [CONTRIBUTING.md](./CONTRIBUTING.md).