diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..23edd67
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+@wrnexus:registry=https://registry.workroot.in/repository/npm/
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..98896c3
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,29 @@
+
+---
+
+## 4) `LICENSE` (MIT)
+
+> Replace the year/name.
+
+```text
+MIT License
+
+Copyright (c) 2025 Your Name
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the βSoftwareβ), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED βAS ISβ, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README.md b/README.md
index 87b813a..6b78b72 100644
--- a/README.md
+++ b/README.md
@@ -1,43 +1,19 @@
-# Astro Starter Kit: Minimal
+# @wrnexus/astro
-```sh
-npm create astro@latest -- --template minimal
-```
+Form + field components for **Astro** with Tailwind utilities and Zod-ready validation hooks.
-> π§βπ **Seasoned astronaut?** Delete this file. Have fun!
+- β `
` β submit handling + client validation plumbing
+- β `` β text/email/password/number/textarea/select/date/time/file/checkbox/radio/switch
+- β `` β searchable, checkbox-driven multi select dropdown
+- β ``, `` helpers
+- π― Works with your Tailwind tokens (e.g., `bg-primary`, `text-foreground`, `border-border`)
+- π§ͺ Zod integration: pass `schemaName` to `` and expose a schema as `window[schemaName]`
-## π Project Structure
+---
-Inside of your Astro project, you'll see the following folders and files:
+## Installation
-```text
-/
-βββ public/
-βββ src/
-β βββ pages/
-β βββ index.astro
-βββ package.json
-```
-
-Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
-
-There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
-
-Any static assets, like images, can be placed in the `public/` directory.
-
-## π§ Commands
-
-All commands are run from the root of the project, from a terminal:
-
-| Command | Action |
-| :------------------------ | :----------------------------------------------- |
-| `npm install` | Installs dependencies |
-| `npm run dev` | Starts local dev server at `localhost:4321` |
-| `npm run build` | Build your production site to `./dist/` |
-| `npm run preview` | Preview your build locally, before deploying |
-| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
-| `npm run astro -- --help` | Get help using the Astro CLI |
-
-## π Want to learn more?
-
-Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
+```bash
+pnpm add @wrnexus/astro
+# or
+npm i @wrnexus/astro
\ No newline at end of file
diff --git a/package.json b/package.json
index 9565039..d987fd2 100644
--- a/package.json
+++ b/package.json
@@ -10,28 +10,63 @@
"type": "git",
"url": "https://git.workroot.in/WorkRoot/Astro-UI.git"
},
+ "bugs": {
+ "url": "https://git.workroot.in/WorkRoot/Astro-UI/issues"
+ },
"keywords": [
"astro",
"astro-component",
- "astro-component-library",
- "astro-ui-library",
- "astro-ui"
+ "forms",
+ "tailwindcss",
+ "zod",
+ "ui",
+ "components"
],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./components/*": "./src/components/*",
+ "./utils/*": "./src/utils/*"
+ },
+ "files": [
+ "src",
+ "dist",
+ "README.md",
+ "LICENSE"
+ ],
+ "peerDependencies": {
+ "astro": ">=4.0.0",
+ "class-variance-authority": ">=0.7.0",
+ "tailwindcss": ">=3.4.0"
+ },
+ "peerDependenciesMeta": {
+ "tailwindcss": {
+ "optional": true
+ }
+ },
+ "engines": {
+ "node": ">=18.17"
+ },
"scripts": {
"dev": "astro dev",
- "build": "astro build",
+ "build": "node ./scripts/make-dist.mjs",
"preview": "astro preview",
"astro": "astro",
"check": "astro check",
- "build:prod": "astro check && astro build"
- },
- "exports": {
- "./*": "./src/components/*"
+ "build:prod": "astro check && astro build",
+ "prepublishOnly": "npm run verify",
+ "verify": "node -e \"console.log('β ready to publish')\"",
+ "version:patch": "npm version patch -m \"chore(release): %s\"",
+ "version:minor": "npm version minor -m \"chore(release): %s\"",
+ "version:major": "npm version major -m \"chore(release): %s\"",
+ "release:canary": "npm version prerelease --preid=canary && npm publish --tag canary",
+ "release": "npm publish --access public"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.12",
- "astro": "^5.13.0",
- "tailwindcss": "^4.1.12",
"zod": "^3.25.76"
},
"devDependencies": {
@@ -39,7 +74,6 @@
"@iconify/json": "^2.2.373",
"@iconify/utils": "^3.0.1",
"@tailwindcss/forms": "^0.5.10",
- "class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"tailwind-merge": "^3.3.1"
}
diff --git a/scripts/make-dist.mjs b/scripts/make-dist.mjs
new file mode 100644
index 0000000..3efd90a
--- /dev/null
+++ b/scripts/make-dist.mjs
@@ -0,0 +1,30 @@
+// scripts/make-dist.mjs
+import fs from "node:fs";
+import path from "node:path";
+
+const distDir = path.resolve("dist");
+if (!fs.existsSync(distDir)) fs.mkdirSync(distDir, { recursive: true });
+
+const indexJs = `/* Auto-generated by scripts/make-dist.mjs */
+export { default as Button } from "../src/components/Button.astro";
+export { default as Form } from "../src/components/Form.astro";
+export { default as Field } from "../src/components/Field.astro";
+export { default as MultiSelect } from "../src/components/MultiSelect.astro";
+export { default as Icon } from "../src/components/Icon.astro";
+export { cn } from "../src/utils/cn.js";
+`;
+
+const indexDts = `/* Auto-generated types (lightweight) */
+///
+export const Button: any;
+export const Form: any;
+export const Field: any;
+export const MultiSelect: any;
+export const Icon: any;
+export function cn(...classes: Array): string;
+`;
+
+fs.writeFileSync(path.join(distDir, "index.js"), indexJs, "utf8");
+fs.writeFileSync(path.join(distDir, "index.d.ts"), indexDts, "utf8");
+
+console.log("π§± Wrote dist/index.js and dist/index.d.ts");
diff --git a/src/index.ts b/src/index.ts
new file mode 100644
index 0000000..5477ead
--- /dev/null
+++ b/src/index.ts
@@ -0,0 +1,8 @@
+export { default as Button } from "./components/Button.astro";
+export { default as Form } from "./components/Form.astro";
+export { default as Field } from "./components/Field.astro";
+export { default as MultiSelect } from "./components/MultiSelect.astro";
+export { default as Icon } from "./components/Icon.astro";
+
+// Utils
+export { cn } from "./utils/cn";
\ No newline at end of file