@adityabheke/renderer-package 1.0.4 → 1.0.6

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
@@ -1,6 +1,6 @@
1
1
  # 📦 @adityabheke/renderer-package
2
2
 
3
- A production-ready React page renderer that converts JSON schema into fully responsive UI using Tailwind CSS v4 and runtime CSS variables.
3
+ A production-ready React page renderer that converts JSON schema into fully responsive UI using Tailwind CSS v3 and runtime CSS variables.
4
4
 
5
5
  Built for dynamic website/page builder systems.
6
6
 
@@ -9,13 +9,13 @@ Built for dynamic website/page builder systems.
9
9
  ## 🚀 Features
10
10
 
11
11
  * ⚡ Schema-driven rendering
12
- * 🎨 Tailwind CSS v4 (precompiled – no setup required in consumer app)
12
+ * 🎨 Tailwind CSS v3 (Integration required in consumer app)
13
13
  * 📱 Fully responsive (container query variants supported)
14
14
  * 🎞 Built-in animation support (`tailwindcss-animate`)
15
15
  * 🧩 Plug-and-play integration
16
16
  * 📦 ESM + CJS support
17
17
  * 🧠 TypeScript definitions included
18
- * 🔒 No Tailwind configuration required in the user project
18
+ * ⚠️ Requires Tailwind v3 configuration in the user project
19
19
 
20
20
  ---
21
21
 
@@ -27,6 +27,52 @@ npm install @adityabheke/renderer-package
27
27
 
28
28
  ---
29
29
 
30
+ ## 🎨 Tailwind CSS Setup (Required)
31
+
32
+ > [!CAUTION]
33
+ > **STRICT REQUIREMENT:** This package is built for **Tailwind CSS v3**. **DO NOT** use Tailwind CSS v4, as it is currently not compatible with the generated class system used here.
34
+
35
+ ### 1️⃣ Install Tailwind v3
36
+ If you haven't already, install Tailwind CSS v3 and its peer dependencies:
37
+ ```bash
38
+ npm install -D tailwindcss@3 postcss autoprefixer
39
+ ```
40
+
41
+ ### 2️⃣ Initialize Configuration
42
+ ```bash
43
+ npx tailwindcss init -p
44
+ ```
45
+
46
+ ### 3️⃣ Update `tailwind.config.js`
47
+ You **must** add the package's distribution files to your `content` array so Tailwind can scan them for used classes:
48
+
49
+ ```javascript
50
+ /** @type {import('tailwindcss').Config} */
51
+ module.exports = {
52
+ content: [
53
+ "./index.html",
54
+ "./src/**/*.{js,ts,jsx,tsx}",
55
+ "./node_modules/@adityabheke/renderer-package/dist/**/*.{js,ts,jsx,tsx}", // Add this line
56
+ ],
57
+ theme: {
58
+ extend: {},
59
+ },
60
+ plugins: [
61
+ require("tailwindcss-animate"), // Recommended for animation support
62
+ ],
63
+ }
64
+ ```
65
+
66
+ ### 4️⃣ Add Tailwind Directives
67
+ Ensure your main CSS file (e.g., `src/index.css`) includes the Tailwind directives:
68
+ ```css
69
+ @tailwind base;
70
+ @tailwind components;
71
+ @tailwind utilities;
72
+ ```
73
+
74
+ ---
75
+
30
76
  ## ⚠️ Peer Dependencies
31
77
 
32
78
  Make sure your project has the following installed:
@@ -46,15 +92,11 @@ Required versions:
46
92
 
47
93
  ## 🛠 Usage
48
94
 
49
- ### 1️⃣ Import Styles (Required Once)
50
95
 
51
- ```tsx
52
- import "@adityabheke/renderer-package/styles.css";
53
- ```
54
-
55
- ### 2️⃣ Use the Renderer
96
+ ### Import Styles and Use the Renderer (Required Once)
56
97
 
57
98
  ```tsx
99
+ import "@adityabheke/renderer-package/styles.css";
58
100
  import { PageRenderer } from "@adityabheke/renderer-package";
59
101
 
60
102
  function App() {
@@ -75,7 +117,7 @@ function App() {
75
117
  * Parses JSON schema
76
118
  * Resolves components using internal `ComponentRegistry`
77
119
  * Applies dynamic CSS variables
78
- * Uses precompiled Tailwind CSS
120
+ * Leverages your project's Tailwind CSS v3 configuration for styling
79
121
  * Supports responsive container-based variants
80
122
  * Supports animation classes like:
81
123
 
package/dist/index.cjs CHANGED
@@ -832,7 +832,7 @@ var FooterSimple = ({
832
832
  className
833
833
  ),
834
834
  style: { backgroundColor },
835
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "max-w-6xl mx-auto px-4 flex flex-col md:flex-row justify-between items-center gap-4", children: [
835
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "max-w-6xl mx-auto px-4 flex flex-row md:flex-row justify-between items-center gap-4", children: [
836
836
  slots?.["footer-logo"],
837
837
  slots?.["footer-copy"],
838
838
  slots?.["f-link-1"],
package/dist/index.js CHANGED
@@ -795,7 +795,7 @@ var FooterSimple = ({
795
795
  className
796
796
  ),
797
797
  style: { backgroundColor },
798
- children: /* @__PURE__ */ jsxs5("div", { className: "max-w-6xl mx-auto px-4 flex flex-col md:flex-row justify-between items-center gap-4", children: [
798
+ children: /* @__PURE__ */ jsxs5("div", { className: "max-w-6xl mx-auto px-4 flex flex-row md:flex-row justify-between items-center gap-4", children: [
799
799
  slots?.["footer-logo"],
800
800
  slots?.["footer-copy"],
801
801
  slots?.["f-link-1"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adityabheke/renderer-package",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Production-ready React page renderer",
5
5
  "type": "module",
6
6
  "license": "MIT",