orynn 0.2.0 → 0.6.0
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/LICENSE +1 -1
- package/README.md +57 -58
- package/dist/index.cjs +3353 -495
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1087 -104
- package/dist/index.d.ts +1087 -104
- package/dist/index.js +3272 -497
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2939 -475
- package/package.json +20 -9
- package/scripts/postinstall.mjs +102 -0
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orynn",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "A strongly-typed React UI library: JSON-driven forms + a shadcn-aligned component set (Button, Card, Dialog, Tabs, DropdownMenu, …).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"author": "
|
|
7
|
+
"author": "Rajveer Singh",
|
|
8
|
+
"homepage": "https://orynn-web.pages.dev",
|
|
8
9
|
"keywords": [
|
|
9
10
|
"react",
|
|
10
11
|
"form",
|
|
@@ -22,9 +23,15 @@
|
|
|
22
23
|
"combobox",
|
|
23
24
|
"select",
|
|
24
25
|
"theme",
|
|
25
|
-
"design-tokens"
|
|
26
|
+
"design-tokens",
|
|
27
|
+
"validation",
|
|
28
|
+
"zod",
|
|
29
|
+
"standard-schema",
|
|
30
|
+
"conditional-fields"
|
|
31
|
+
],
|
|
32
|
+
"sideEffects": [
|
|
33
|
+
"**/*.css"
|
|
26
34
|
],
|
|
27
|
-
"sideEffects": ["**/*.css"],
|
|
28
35
|
"main": "./dist/index.cjs",
|
|
29
36
|
"module": "./dist/index.js",
|
|
30
37
|
"types": "./dist/index.d.ts",
|
|
@@ -42,10 +49,10 @@
|
|
|
42
49
|
"./styles.css": "./dist/styles.css",
|
|
43
50
|
"./package.json": "./package.json"
|
|
44
51
|
},
|
|
45
|
-
"files": [
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
52
|
+
"files": [
|
|
53
|
+
"dist",
|
|
54
|
+
"scripts/postinstall.mjs"
|
|
55
|
+
],
|
|
49
56
|
"engines": {
|
|
50
57
|
"node": ">=18"
|
|
51
58
|
},
|
|
@@ -59,6 +66,7 @@
|
|
|
59
66
|
"lint:fix": "biome check --write .",
|
|
60
67
|
"format": "biome format --write .",
|
|
61
68
|
"check:pkg": "publint && attw --pack .",
|
|
69
|
+
"postinstall": "node scripts/postinstall.mjs || exit 0",
|
|
62
70
|
"prepublishOnly": "npm run build"
|
|
63
71
|
},
|
|
64
72
|
"peerDependencies": {
|
|
@@ -70,6 +78,9 @@
|
|
|
70
78
|
"optional": true
|
|
71
79
|
}
|
|
72
80
|
},
|
|
81
|
+
"dependencies": {
|
|
82
|
+
"radix-ui": "^1.6.7"
|
|
83
|
+
},
|
|
73
84
|
"devDependencies": {
|
|
74
85
|
"@arethetypeswrong/cli": "^0.17.4",
|
|
75
86
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* A small hello when someone adds `orynn` to their project — name, licence,
|
|
4
|
+
* the version they just pulled, and a pointer to the AI skill.
|
|
5
|
+
*
|
|
6
|
+
* Rules it lives by: never slow or break an install, stay quiet in CI /
|
|
7
|
+
* scripted / transitive installs, and take `ORYNN_NO_BANNER=1` for an answer.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { readFileSync } from "node:fs";
|
|
11
|
+
import { resolve } from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
|
|
14
|
+
const OFF = "\x1b[0m";
|
|
15
|
+
const useColor = process.env.NO_COLOR == null || process.env.FORCE_COLOR != null;
|
|
16
|
+
const paint = (code) => (s) => (useColor ? `\x1b[${code}m${s}${OFF}` : s);
|
|
17
|
+
const teal = paint("38;2;31;184;204"); // brand #1fb8cc
|
|
18
|
+
const bold = paint("1");
|
|
19
|
+
const dim = paint("2");
|
|
20
|
+
|
|
21
|
+
const QUIET_LEVELS = new Set(["silent", "error", "warn"]);
|
|
22
|
+
|
|
23
|
+
function shouldGreet(root) {
|
|
24
|
+
if (process.env.ORYNN_NO_BANNER) return false;
|
|
25
|
+
if (process.env.CI || process.env.CONTINUOUS_INTEGRATION) return false;
|
|
26
|
+
if (QUIET_LEVELS.has(process.env.npm_config_loglevel ?? "")) return false;
|
|
27
|
+
|
|
28
|
+
// Only greet a direct dependency install — not a dep-of-a-dep, and not the
|
|
29
|
+
// maintainer running `npm install` inside this repo.
|
|
30
|
+
const initCwd = process.env.INIT_CWD;
|
|
31
|
+
if (initCwd && resolve(initCwd, "node_modules", "orynn") !== resolve(root)) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function main() {
|
|
38
|
+
const root = fileURLToPath(new URL("..", import.meta.url));
|
|
39
|
+
if (!shouldGreet(root)) return;
|
|
40
|
+
|
|
41
|
+
let version = "";
|
|
42
|
+
try {
|
|
43
|
+
version = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8")).version;
|
|
44
|
+
} catch {
|
|
45
|
+
/* fall through with an empty version */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const INNER = 62;
|
|
49
|
+
const rule = (l, r) => teal(l + "─".repeat(INNER + 4) + r);
|
|
50
|
+
const row = (segments = []) => {
|
|
51
|
+
const plain = segments.reduce((n, [t]) => n + t.length, 0);
|
|
52
|
+
const body = segments.map(([t, f]) => (f ? f(t) : t)).join("");
|
|
53
|
+
return `${teal("│")} ${body}${" ".repeat(Math.max(0, INNER - plain))} ${teal("│")}`;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const lines = [
|
|
57
|
+
"",
|
|
58
|
+
rule("╭", "╮"),
|
|
59
|
+
row(),
|
|
60
|
+
row([
|
|
61
|
+
[" orynn", (s) => bold(teal(s))],
|
|
62
|
+
[version ? ` v${version}` : "", dim],
|
|
63
|
+
]),
|
|
64
|
+
row(),
|
|
65
|
+
row([["JSON-driven forms + a shadcn-aligned component set for React.", dim]]),
|
|
66
|
+
row(),
|
|
67
|
+
row([
|
|
68
|
+
["author ", dim],
|
|
69
|
+
["Rajveer Singh", null],
|
|
70
|
+
]),
|
|
71
|
+
row([
|
|
72
|
+
["licence ", dim],
|
|
73
|
+
["MIT", null],
|
|
74
|
+
]),
|
|
75
|
+
row([
|
|
76
|
+
["docs ", dim],
|
|
77
|
+
["https://orynn-web.pages.dev", teal],
|
|
78
|
+
]),
|
|
79
|
+
row(),
|
|
80
|
+
row([
|
|
81
|
+
["orynn skill", bold],
|
|
82
|
+
[" ", null],
|
|
83
|
+
["have an AI agent restyle a UI with", dim],
|
|
84
|
+
]),
|
|
85
|
+
row([
|
|
86
|
+
["orynn's tokens: ", dim],
|
|
87
|
+
["npx @rajveer-singh-18/orynn-skill", teal],
|
|
88
|
+
]),
|
|
89
|
+
row(),
|
|
90
|
+
rule("╰", "╯"),
|
|
91
|
+
` ${dim("hide this next time: ORYNN_NO_BANNER=1")}`,
|
|
92
|
+
"",
|
|
93
|
+
];
|
|
94
|
+
|
|
95
|
+
process.stdout.write(`${lines.join("\n")}\n`);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
try {
|
|
99
|
+
main();
|
|
100
|
+
} catch {
|
|
101
|
+
/* a greeting is never worth a failed install */
|
|
102
|
+
}
|