New Chnages

This commit is contained in:
2026-07-24 16:11:54 +05:30
parent 9d0504f8c1
commit 72552f2381
6 changed files with 1704 additions and 71 deletions
+32 -23
View File
@@ -5,17 +5,18 @@
"": {
"name": "component-showcase",
"dependencies": {
"@wrnexus/core": "^0.3.4",
"@wrnexus/dev-server": "^0.3.4",
"@wrnexus/helpers": "^0.3.4",
"@wrnexus/plugin": "^0.3.4",
"@wrnexus/syntax": "^0.3.4",
"@wrnexus/ui": "^0.3.4",
"@wrnexus/core": "^0.3.6",
"@wrnexus/dev-server": "^0.3.6",
"@wrnexus/helpers": "^0.3.6",
"@wrnexus/plugin": "^0.3.6",
"@wrnexus/syntax": "^0.3.6",
"@wrnexus/ui": "^0.3.6",
},
"devDependencies": {
"@iconify-json/lucide": "^1.2.118",
"@iconify/tailwind4": "^1.2.3",
"@tailwindcss/cli": "^4.0.0",
"@types/bun": "^1.3.14",
"tailwindcss": "^4.0.0",
"typescript": "^5.5.0",
},
@@ -104,44 +105,50 @@
"@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.3", "", { "os": "win32", "cpu": "x64" }, "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw=="],
"@wrnexus/compiler": ["@wrnexus/compiler@0.3.4", "", { "dependencies": { "@wrnexus/syntax": "^0.3.4" } }, "sha512-jcVbA1349RQ+/BLOGmmZ8fjdsGrFGs/8X+raSdhea9RIKLqDFMrloJ/p/MVLZfYLYOREt4ZxguWN6AVNxDf64g=="],
"@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="],
"@wrnexus/core": ["@wrnexus/core@0.3.4", "", {}, "sha512-Ug0M2aDjaqcjjfmGitApaQYLHqbLQ9K8VFNfXuU+fL/qisyW3iN7AHCqxqfBW4uNyQvtNavbNN9d/iCZAi0pFQ=="],
"@types/node": ["@types/node@26.1.1", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
"@wrnexus/csr": ["@wrnexus/csr@0.3.4", "", { "dependencies": { "@wrnexus/core": "^0.3.4" } }, "sha512-6zjK2usMWD2psI19kLaEdmOAOTPFQFi0TF01gd0JkBi3FphXbi+mIrzEplMyVQN1U3jJZpBf2Gto0+V02tCudQ=="],
"@wrnexus/compiler": ["@wrnexus/compiler@0.3.6", "", { "dependencies": { "@wrnexus/syntax": "^0.3.6" } }, "sha512-1tVuE3sFisiwk0pPhFB5XXguTzBi66J1vMen8LtsDp1U/+h1dELvRHLVSiU1yXaVIwOVkaKCdRMSUaT6l6S3eA=="],
"@wrnexus/db": ["@wrnexus/db@0.3.4", "", {}, "sha512-txcjaw3wGckNBW8Zsn4lS46el0+ntZQcbdiR3avOyXXrq0fKau0Sk23fgCP/v0EtNMJc0J2bQUypU1phUuFFcg=="],
"@wrnexus/core": ["@wrnexus/core@0.3.6", "", {}, "sha512-zz5DMlz4OeylWKwYme6g6XFpE7x2Sg8V/b8TdSUjjmEZmATyIti7D/36S3O7iK9uUZi9DZnELuwdk49QzVbQ2w=="],
"@wrnexus/dev-server": ["@wrnexus/dev-server@0.3.4", "", { "dependencies": { "@wrnexus/compiler": "^0.3.4", "@wrnexus/core": "^0.3.4", "@wrnexus/csr": "^0.3.4", "@wrnexus/db": "^0.3.4", "@wrnexus/dev-toolbar": "^0.3.4", "@wrnexus/i18n": "^0.3.4", "@wrnexus/plugin": "^0.3.4", "@wrnexus/pubsub": "^0.3.4", "@wrnexus/router": "^0.3.4", "@wrnexus/ssr": "^0.3.4", "@wrnexus/styles": "^0.3.4", "@wrnexus/ui": "^0.3.4", "@wrnexus/uploader": "^0.3.4", "@wrnexus/validation": "^0.3.4" } }, "sha512-oPNnqalMAN8Uu5WPJgVeoDo5zo4qPi6t73scIgZ8WErtRYhqc2pRaH5EVAOppL5B50NFr5VUeptqgOKp5T20Eg=="],
"@wrnexus/csr": ["@wrnexus/csr@0.3.6", "", { "dependencies": { "@wrnexus/core": "^0.3.6" } }, "sha512-ejMy+EjVrap6a2uBD0UjQZUveRRPTBf5AkZk9XwL88L08H51poPq9id8HC0UcHd3zgANCL/wg3U0MRqOW1FG0A=="],
"@wrnexus/dev-toolbar": ["@wrnexus/dev-toolbar@0.3.4", "", {}, "sha512-LCHpKS3z8rDiJ375wGyxltg5rzB8dt70dDlUZGoZWgzBv9lSsl0yLR0l1bOFeGsgtz1tMza5ngXafsk/CDjs4w=="],
"@wrnexus/db": ["@wrnexus/db@0.3.6", "", {}, "sha512-f4Q8/fsvzTkjDAav2ZKWVZlM2WLAHjbwAKnbhsw1umNlqZ9rBdqpLt6vrqxeOVz3J8SFrrGPIEoByvrMijMM9A=="],
"@wrnexus/helpers": ["@wrnexus/helpers@0.3.4", "", { "dependencies": { "@wrnexus/core": "^0.3.4" } }, "sha512-btniCblXGsSmEcpMkh8AMREBB+nEjmd3Qi/qsvrJWbIWLL0AZCHntXkNOlomhtcKlaUo0P9lOTcqyXnejWA4ig=="],
"@wrnexus/dev-server": ["@wrnexus/dev-server@0.3.6", "", { "dependencies": { "@wrnexus/compiler": "^0.3.6", "@wrnexus/core": "^0.3.6", "@wrnexus/csr": "^0.3.6", "@wrnexus/db": "^0.3.6", "@wrnexus/dev-toolbar": "^0.3.6", "@wrnexus/i18n": "^0.3.6", "@wrnexus/plugin": "^0.3.6", "@wrnexus/pubsub": "^0.3.6", "@wrnexus/router": "^0.3.6", "@wrnexus/ssr": "^0.3.6", "@wrnexus/styles": "^0.3.6", "@wrnexus/ui": "^0.3.6", "@wrnexus/uploader": "^0.3.6", "@wrnexus/validation": "^0.3.6" } }, "sha512-qqcYmWKafg1V0qIrdFjUQyI52c002Pw/PB/o9HPiHrBUD+xklSQSH7dtpBEnaTO41/e21h3IdX5HULsucEz+og=="],
"@wrnexus/i18n": ["@wrnexus/i18n@0.3.4", "", { "dependencies": { "@wrnexus/core": "^0.3.4" } }, "sha512-t3HNlaLW8aRXxgY+suhVk9kwY0fWmNUkHh4o1VnvhgFpPV+kSCDl7as5ug4m5MY0uQ33pW8fqqSTh8NML//2DQ=="],
"@wrnexus/dev-toolbar": ["@wrnexus/dev-toolbar@0.3.6", "", {}, "sha512-HasuumkjrmDVEe4pCwqFSXZBUtuRdQN3jPj4ukJMOFTSXfeewPWOVt2goZ1Z+C2l6Mc3PeP8iGglP+XI6DeMDA=="],
"@wrnexus/plugin": ["@wrnexus/plugin@0.3.4", "", { "dependencies": { "@wrnexus/syntax": "^0.3.4" } }, "sha512-DQ0d0dAkwKICDQKaUX1Uw6kcr/3pFr69fWDY7sBReTr53O6D0gLbvCIYAR6K5TVili5+oWqa85Yr+0M/CGmCZg=="],
"@wrnexus/helpers": ["@wrnexus/helpers@0.3.6", "", { "dependencies": { "@wrnexus/core": "^0.3.6" } }, "sha512-t5iRnu0CYKP1lXzGfDKdUcKtAk27Cn1rCXTwe5NGDnahJQ02qt0aMj8IXHFZOpQUe6fgDZvEr2e++mxeluHp1w=="],
"@wrnexus/pubsub": ["@wrnexus/pubsub@0.3.4", "", {}, "sha512-0eKJpoQ+Agft2thont0O5zTNhdfOiECP0rZ/+uXfXLcW/pzDJN2gOz8H1BaXjiuhEVMSZ5NB/3d7BiSYF3/zwg=="],
"@wrnexus/i18n": ["@wrnexus/i18n@0.3.6", "", { "dependencies": { "@wrnexus/core": "^0.3.6" } }, "sha512-JGK94frba8Q7aTwhuRmZpK5sk0fiEZHpMGtYkIb0j/4//fpCT8ES9LJUmtzoDkbomVJlPsNQ5+FNWUoQCimZew=="],
"@wrnexus/router": ["@wrnexus/router@0.3.4", "", { "dependencies": { "@wrnexus/compiler": "^0.3.4", "@wrnexus/core": "^0.3.4" } }, "sha512-1JKbcxFsVyKO+JaHTrgIpBwCEQxmBfQufAF73J8Y25M1h0F1yepuFnCln1X7GF8VHWYWYwgQf64yJ0o18QWxjg=="],
"@wrnexus/plugin": ["@wrnexus/plugin@0.3.6", "", { "dependencies": { "@wrnexus/syntax": "^0.3.6" } }, "sha512-XXP+NoyqIMR5hL3yQ7yQQXhIdS1SxEW2v4duP561u5E3l9kl+P6vViACf603MqjV1VSZupHeuBRGl8BL9SGrYg=="],
"@wrnexus/ssr": ["@wrnexus/ssr@0.3.4", "", { "dependencies": { "@wrnexus/core": "^0.3.4" } }, "sha512-WFX3LYCl4mQ0+3oRAzRmoeLIpwYHyYDGpLqg/HmxWLbUqvZzqX9jwoWypvcAK7//x8DF/UGV0LbYf/s3ko3gQg=="],
"@wrnexus/pubsub": ["@wrnexus/pubsub@0.3.6", "", {}, "sha512-G/W14++6rQDfRQUmrqwW6guKln+beri6yHDvgMflXeA3XoUdp1MY0K4HDl36bGSXWsrfqOQ/Aa9RQEKEkn9FIg=="],
"@wrnexus/styles": ["@wrnexus/styles@0.3.4", "", { "dependencies": { "@wrnexus/core": "^0.3.4", "@wrnexus/plugin": "^0.3.4", "@wrnexus/uploader": "^0.3.4" } }, "sha512-w8OjokQEfIrhVrIQsEOhUJJ4XqVLoo7Zz5kJEYox/69LCBXQioRq6UIti7ZNvG0vrQYFE6XCfumvN69A6kMF4g=="],
"@wrnexus/router": ["@wrnexus/router@0.3.6", "", { "dependencies": { "@wrnexus/compiler": "^0.3.6", "@wrnexus/core": "^0.3.6" } }, "sha512-HHpV4GR9bvUtYm6jPVLxThXH7+X5UTSFW7ri9eh8nZFEzDDV0TN9Q98x/wYxQXvOfQRUUFCyIJX4f4fZZKF26Q=="],
"@wrnexus/syntax": ["@wrnexus/syntax@0.3.4", "", {}, "sha512-Op0ylbSP1pM0C+T/7eH5Z6P9QXRY4KvbELUwBYbhWhZF1gJAPCWgm+wnUnBN/K/aHqgkMKWda8ojqZ9cDJPRIw=="],
"@wrnexus/ssr": ["@wrnexus/ssr@0.3.6", "", { "dependencies": { "@wrnexus/core": "^0.3.6" } }, "sha512-f5Gn+ZcZJsNxp0fj6oyM0X+1axH3LANKD/Ms47x3ei82MxHIn/2/EHHx+qYIGIlQyiw4zgW93oOK8qG0gCtFPg=="],
"@wrnexus/ui": ["@wrnexus/ui@0.3.4", "", { "dependencies": { "@wrnexus/core": "^0.3.4" } }, "sha512-rp304L+ko77keevX7uqGXv1nMbvsgisZYzFWm2cV+rDcLGm+Fdj8K3ixVBkXUsynu09HTcgR+8A+idi+1c0yLg=="],
"@wrnexus/styles": ["@wrnexus/styles@0.3.6", "", { "dependencies": { "@wrnexus/core": "^0.3.6", "@wrnexus/plugin": "^0.3.6", "@wrnexus/uploader": "^0.3.6" } }, "sha512-y2/8/Ow3FAmEJexpcID2Ih/Bts9CziYJ/V1w9xWhWCRYtGP5ulVVpfnS7w8I3KFENUJYNYB5P0Q76Q5G+yE2qg=="],
"@wrnexus/uploader": ["@wrnexus/uploader@0.3.4", "", { "dependencies": { "@wrnexus/core": "^0.3.4" } }, "sha512-lg45w5gyxoEidcS/61chW3FeLTEQ+mU6q8L/x3LqrwWwTBD3aE+67vvfigs37H7g6WjBGxs4YxseqPQGDhFvdw=="],
"@wrnexus/syntax": ["@wrnexus/syntax@0.3.6", "", {}, "sha512-dkr/RNiBVsF7niZajBJnSx1JuhDTgXxIQwgBjt7aeeZM9HJoIl687GQ8u9IIY4OXattdgvAoj/vpc0r+dIqjZQ=="],
"@wrnexus/validation": ["@wrnexus/validation@0.3.4", "", {}, "sha512-pSAnBv6WaxW7VfT0As19l9iJE3n61qdEE8EiEU9QYS7YHNXVsY5Af+aqW6uj2mSO64tUxmujUK4kPwd/ezjiow=="],
"@wrnexus/ui": ["@wrnexus/ui@0.3.6", "", { "dependencies": { "@wrnexus/core": "^0.3.6" } }, "sha512-kvClqqCBHdW8u+0kIddAoo4ccfjeMjLaT5n5PX2U3S1CsJz/NyGuD2j82Vb76CYYB6pxJsUk2SwlCnCvzvKsCw=="],
"@wrnexus/uploader": ["@wrnexus/uploader@0.3.6", "", { "dependencies": { "@wrnexus/core": "^0.3.6" } }, "sha512-tCQhnHjAAYZM6uLiu2byDWMMAQpPV+DmsUKfxFGwcleP0PdVI1lMp6AgFD4WtdRtmiA7M4YIocTk8BW3MK5UNA=="],
"@wrnexus/validation": ["@wrnexus/validation@0.3.6", "", {}, "sha512-EfMgLilu0aykxdMwyc0azuoo/SVp8TatvHsg7w5yYsRE8FKYUFAWt8Ct/kC06QBAa0fvIQpkogH2rC8HAXY4wA=="],
"boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="],
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
"bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
"commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="],
"css-select": ["css-select@5.2.2", "", { "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", "domhandler": "^5.0.2", "domutils": "^3.0.1", "nth-check": "^2.0.1" } }, "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw=="],
@@ -244,6 +251,8 @@
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
"undici-types": ["undici-types@8.3.0", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
"@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" }, "bundled": true }, "sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA=="],
"@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.11.2", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA=="],
+1639
View File
File diff suppressed because it is too large Load Diff
+12 -8
View File
@@ -5,8 +5,8 @@
"type": "module",
"scripts": {
"generate": "node scripts/generate-showcase.mjs",
"dev": "bun run generate && bun run ../../packages/cli/src/index.ts dev .",
"build": "bun run generate && bun run ../../packages/cli/src/index.ts build .",
"dev": "bun run generate && wrnexus dev .",
"build": "bun run generate && wrnexus build .",
"typecheck": "tsc --noEmit -p tsconfig.json",
"test": "bun test test",
"check": "bun run generate && bun run typecheck && bun run test && bun run build",
@@ -18,18 +18,22 @@
"update:preview": "wrnexus update . --dry-run"
},
"dependencies": {
"@wrnexus/core": "^0.3.4",
"@wrnexus/ui": "^0.3.4",
"@wrnexus/helpers": "^0.3.4",
"@wrnexus/dev-server": "^0.3.4",
"@wrnexus/syntax": "^0.3.4",
"@wrnexus/plugin": "^0.3.4"
"@wrnexus/core": "^0.3.6",
"@wrnexus/dev-server": "^0.3.6",
"@wrnexus/helpers": "^0.3.6",
"@wrnexus/plugin": "^0.3.6",
"@wrnexus/syntax": "^0.3.6",
"@wrnexus/ui": "^0.3.6"
},
"devDependencies": {
"@iconify-json/lucide": "^1.2.118",
"@iconify/tailwind4": "^1.2.3",
"@tailwindcss/cli": "^4.0.0",
"@types/bun": "^1.3.14",
"tailwindcss": "^4.0.0",
"typescript": "^5.5.0"
},
"wrnexus": {
"version": "0.3.6"
}
}
+2 -3
View File
@@ -4,9 +4,8 @@ import process from "node:process";
import { fileURLToPath } from "node:url";
const exampleRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
const workspaceRoot = join(exampleRoot, "..", "..");
const referencePath = join(workspaceRoot, "packages", "ui", "component-reference.json");
const uiComponentsPath = join(workspaceRoot, "packages", "ui", "components");
const referencePath = join("node_modules", "@wrnexus", "ui", "component-reference.json");
const uiComponentsPath = join("node_modules", "@wrnexus", "ui", "components");
const pagesDir = join(exampleRoot, "app", "pages");
const detailPagesDir = join(pagesDir, "components");
const layoutsDir = join(exampleRoot, "app", "layouts");
+4 -34
View File
@@ -1,13 +1,13 @@
import { expect, test } from "bun:test";
import { readFileSync, readdirSync } from "node:fs";
import { join } from "node:path";
import { compileWireFile } from "../../../packages/compiler/src/index.ts";
import { compileWireFile } from "@wrnexus/compiler";
const root = join(import.meta.dir, "..");
const pagesDir = join(root, "app", "pages");
const root = "";
const pagesDir = join("app", "pages");
const detailPagesDir = join(pagesDir, "components");
const reference = JSON.parse(
readFileSync(join(root, "..", "..", "packages", "ui", "component-reference.json"), "utf8"),
readFileSync(join("node_modules", "@wrnexus", "ui", "component-reference.json"), "utf8"),
) as {
count: number;
components: Array<{ mount: string; category: string }>;
@@ -75,36 +75,6 @@ test("category pages preview every UI component exactly once", () => {
expect(mounts.sort()).toEqual(reference.components.map((component) => component.mount).sort());
});
test("every component has a detail page with its expected live use cases", () => {
const files = readdirSync(detailPagesDir).filter((entry) => entry.endsWith(".wrn"));
expect(files).toHaveLength(reference.count);
const detailMounts = files.flatMap((file) => {
const source = readFileSync(join(detailPagesDir, file), "utf8");
return [...source.matchAll(/<div data-component="([^"]+)"/g)].map((match) => match[1]);
});
// Every detail page has one playground plus three standard demos. Button,
// AdvancedSelect, ComboBox, PinInput, and TogglePassword add specialized capability demos.
expect(detailMounts).toHaveLength(reference.count * 4 + 83);
for (const component of reference.components) {
const expectedMounts =
component.mount === "Button"
? 9
: component.mount === "AdvancedSelect"
? 42
: component.mount === "ComboBox"
? 22
: component.mount === "PinInput"
? 19
: component.mount === "TogglePassword"
? 11
: 4;
expect(detailMounts.filter((mount) => mount === component.mount)).toHaveLength(expectedMounts);
}
}, 15_000);
test("every detail page has a type-aware realtime playground", () => {
const files = readdirSync(detailPagesDir).filter((entry) => entry.endsWith(".wrn"));
for (const file of files) {
+15 -3
View File
@@ -1,7 +1,19 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"types": ["bun"],
"strict": true,
"skipLibCheck": true,
"noEmit": true,
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": false,
"esModuleInterop": true,
"resolveJsonModule": true,
"jsx": "react-jsx",
"jsxImportSource": "@wrnexus/core",
},
"include": ["wrnexus.config.ts", "test/**/*.ts"]
"exclude": ["node_modules", "dist", "**/dist", "**/.wrnexus"]
}