@g3nomaly/ui 0.3.0 → 0.3.1

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.
Files changed (92) hide show
  1. package/LICENSE +95 -0
  2. package/dist/cli/adapter.d.ts +48 -0
  3. package/dist/cli/adapter.d.ts.map +1 -0
  4. package/dist/cli/adapter.js +87 -0
  5. package/dist/cli/adapter.js.map +1 -0
  6. package/dist/cli/commands/add.d.ts +16 -0
  7. package/dist/cli/commands/add.d.ts.map +1 -0
  8. package/dist/cli/commands/add.js +20 -0
  9. package/dist/cli/commands/add.js.map +1 -0
  10. package/dist/cli/commands/index.d.ts +15 -0
  11. package/dist/cli/commands/index.d.ts.map +1 -0
  12. package/dist/cli/commands/index.js +9 -0
  13. package/dist/cli/commands/index.js.map +1 -0
  14. package/dist/cli/commands/init.d.ts +25 -0
  15. package/dist/cli/commands/init.d.ts.map +1 -0
  16. package/dist/cli/commands/init.js +148 -0
  17. package/dist/cli/commands/init.js.map +1 -0
  18. package/dist/cli/commands/ls.d.ts +11 -0
  19. package/dist/cli/commands/ls.d.ts.map +1 -0
  20. package/dist/cli/commands/ls.js +20 -0
  21. package/dist/cli/commands/ls.js.map +1 -0
  22. package/dist/cli/commands/manifest.d.ts +12 -0
  23. package/dist/cli/commands/manifest.d.ts.map +1 -0
  24. package/dist/cli/commands/manifest.js +83 -0
  25. package/dist/cli/commands/manifest.js.map +1 -0
  26. package/dist/cli/commands/remove.d.ts +10 -0
  27. package/dist/cli/commands/remove.d.ts.map +1 -0
  28. package/dist/cli/commands/remove.js +12 -0
  29. package/dist/cli/commands/remove.js.map +1 -0
  30. package/dist/cli/commands/source.d.ts +22 -0
  31. package/dist/cli/commands/source.d.ts.map +1 -0
  32. package/dist/cli/commands/source.js +23 -0
  33. package/dist/cli/commands/source.js.map +1 -0
  34. package/dist/cli/commands/update.d.ts +11 -0
  35. package/dist/cli/commands/update.d.ts.map +1 -0
  36. package/dist/cli/commands/update.js +13 -0
  37. package/dist/cli/commands/update.js.map +1 -0
  38. package/dist/cli/index.d.ts +3 -0
  39. package/dist/cli/index.d.ts.map +1 -0
  40. package/dist/cli/index.js +90 -0
  41. package/dist/cli/index.js.map +1 -0
  42. package/dist/components/basic/Card.css +32 -0
  43. package/dist/components/basic/Card.debug.ts +5 -0
  44. package/dist/components/basic/Card.tsx +26 -0
  45. package/dist/components/basic/CardFooter.css +16 -0
  46. package/dist/components/basic/CardFooter.debug.ts +5 -0
  47. package/dist/components/basic/CardFooter.tsx +25 -0
  48. package/dist/components/basic/CardHeader.css +14 -0
  49. package/dist/components/basic/CardHeader.debug.ts +5 -0
  50. package/dist/components/basic/CardHeader.tsx +25 -0
  51. package/dist/components/basic/card.meta.ts +13 -0
  52. package/dist/components/basic/cardfooter.meta.ts +13 -0
  53. package/dist/components/basic/cardheader.meta.ts +13 -0
  54. package/dist/components/input/Button.css +34 -0
  55. package/dist/components/input/Button.debug.ts +5 -0
  56. package/dist/components/input/Button.tsx +25 -0
  57. package/dist/components/input/button.meta.ts +13 -0
  58. package/dist/components.json +138 -0
  59. package/dist/index.d.ts +2 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +3 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/registry/adapters/shadcn.adapter.d.ts +35 -0
  64. package/dist/registry/adapters/shadcn.adapter.d.ts.map +1 -0
  65. package/dist/registry/adapters/shadcn.adapter.js +107 -0
  66. package/dist/registry/adapters/shadcn.adapter.js.map +1 -0
  67. package/dist/registry/componentsJson.d.ts +23 -0
  68. package/dist/registry/componentsJson.d.ts.map +1 -0
  69. package/dist/registry/componentsJson.js +55 -0
  70. package/dist/registry/componentsJson.js.map +1 -0
  71. package/dist/registry/index.d.ts +6 -0
  72. package/dist/registry/index.d.ts.map +1 -0
  73. package/dist/registry/index.js +6 -0
  74. package/dist/registry/index.js.map +1 -0
  75. package/dist/registry/manifest.d.ts +19 -0
  76. package/dist/registry/manifest.d.ts.map +1 -0
  77. package/dist/registry/manifest.js +76 -0
  78. package/dist/registry/manifest.js.map +1 -0
  79. package/dist/registry/readSource.d.ts +20 -0
  80. package/dist/registry/readSource.d.ts.map +1 -0
  81. package/dist/registry/readSource.js +44 -0
  82. package/dist/registry/readSource.js.map +1 -0
  83. package/dist/registry/types.d.ts +88 -0
  84. package/dist/registry/types.d.ts.map +1 -0
  85. package/dist/registry/types.js +44 -0
  86. package/dist/registry/types.js.map +1 -0
  87. package/dist/sources/builtins.d.ts +8 -0
  88. package/dist/sources/builtins.d.ts.map +1 -0
  89. package/dist/sources/builtins.js +10 -0
  90. package/dist/sources/builtins.js.map +1 -0
  91. package/package.json +84 -3
  92. package/README.md +0 -3
@@ -0,0 +1,88 @@
1
+ import { z } from "zod";
2
+ export declare const ComponentFileTypeSchema: z.ZodEnum<{
3
+ component: "component";
4
+ hook: "hook";
5
+ meta: "meta";
6
+ style: "style";
7
+ type: "type";
8
+ util: "util";
9
+ }>;
10
+ export type ComponentFileType = z.infer<typeof ComponentFileTypeSchema>;
11
+ /** One file of a component; `path` is relative to the components directory, e.g. `basic/Card.tsx`. */
12
+ export declare const ComponentFileSchema: z.ZodObject<{
13
+ path: z.ZodString;
14
+ hash: z.ZodOptional<z.ZodString>;
15
+ version: z.ZodOptional<z.ZodString>;
16
+ type: z.ZodEnum<{
17
+ component: "component";
18
+ hook: "hook";
19
+ meta: "meta";
20
+ style: "style";
21
+ type: "type";
22
+ util: "util";
23
+ }>;
24
+ }, z.core.$strip>;
25
+ export type ComponentFile = z.infer<typeof ComponentFileSchema>;
26
+ /**
27
+ * A component as it ships: what a `*.meta.ts` file declares and what
28
+ * `dist/components.json` holds per component, before a source reads it.
29
+ */
30
+ export declare const PackagedComponentSchema: z.ZodObject<{
31
+ name: z.ZodString;
32
+ description: z.ZodOptional<z.ZodString>;
33
+ version: z.ZodOptional<z.ZodString>;
34
+ category: z.ZodOptional<z.ZodString>;
35
+ author: z.ZodOptional<z.ZodString>;
36
+ registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ files: z.ZodArray<z.ZodObject<{
38
+ path: z.ZodString;
39
+ hash: z.ZodOptional<z.ZodString>;
40
+ version: z.ZodOptional<z.ZodString>;
41
+ type: z.ZodEnum<{
42
+ component: "component";
43
+ hook: "hook";
44
+ meta: "meta";
45
+ style: "style";
46
+ type: "type";
47
+ util: "util";
48
+ }>;
49
+ }, z.core.$strip>>;
50
+ }, z.core.$strip>;
51
+ export type PackagedComponent = z.infer<typeof PackagedComponentSchema>;
52
+ /**
53
+ * One installable component, read from a source by `readComponentSource`
54
+ * or the shadcn adapter, and written per install into the g3nui manifest by
55
+ * the `add` and `update` commands. `group` is the category, or the first
56
+ * folder of its first file.
57
+ */
58
+ export declare const ComponentMetaSchema: z.ZodObject<{
59
+ name: z.ZodString;
60
+ description: z.ZodOptional<z.ZodString>;
61
+ version: z.ZodOptional<z.ZodString>;
62
+ registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
+ origin: z.ZodObject<{
64
+ source: z.ZodString;
65
+ dir: z.ZodString;
66
+ commit: z.ZodOptional<z.ZodString>;
67
+ version: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>;
69
+ group: z.ZodString;
70
+ category: z.ZodOptional<z.ZodString>;
71
+ author: z.ZodOptional<z.ZodString>;
72
+ files: z.ZodArray<z.ZodObject<{
73
+ path: z.ZodString;
74
+ hash: z.ZodOptional<z.ZodString>;
75
+ version: z.ZodOptional<z.ZodString>;
76
+ type: z.ZodEnum<{
77
+ component: "component";
78
+ hook: "hook";
79
+ meta: "meta";
80
+ style: "style";
81
+ type: "type";
82
+ util: "util";
83
+ }>;
84
+ }, z.core.$strip>>;
85
+ }, z.core.$strip>;
86
+ export type ComponentMeta = z.infer<typeof ComponentMetaSchema>;
87
+ export type ComponentRegistry = Record<string, ComponentMeta>;
88
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,uBAAuB;;;;;;;EAOlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,sGAAsG;AACtG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;iBAE9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;iBAUlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAO,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ // packages/ui/src/registry/types.ts
2
+ import { z } from "zod";
3
+ import { BaseFileEntrySchema } from "@g3nomaly/core/registry";
4
+ import { OriginEntrySchema } from "@g3nomaly/core/installer";
5
+ export const ComponentFileTypeSchema = z.enum([
6
+ "component",
7
+ "style",
8
+ "util",
9
+ "hook",
10
+ "type",
11
+ "meta",
12
+ ]);
13
+ /** One file of a component; `path` is relative to the components directory, e.g. `basic/Card.tsx`. */
14
+ export const ComponentFileSchema = BaseFileEntrySchema.extend({
15
+ type: ComponentFileTypeSchema,
16
+ });
17
+ /**
18
+ * A component as it ships: what a `*.meta.ts` file declares and what
19
+ * `dist/components.json` holds per component, before a source reads it.
20
+ */
21
+ export const PackagedComponentSchema = z.object({
22
+ name: z.string().min(1),
23
+ description: z.string().optional(),
24
+ /** Set at build time from the package version */
25
+ version: z.string().min(1).optional(),
26
+ category: z.string().optional(),
27
+ author: z.string().optional(),
28
+ /** Keys of components this one needs installed beside it */
29
+ registryDependencies: z.array(z.string()).optional(),
30
+ files: z.array(ComponentFileSchema).min(1),
31
+ });
32
+ /**
33
+ * One installable component, read from a source by `readComponentSource`
34
+ * or the shadcn adapter, and written per install into the g3nui manifest by
35
+ * the `add` and `update` commands. `group` is the category, or the first
36
+ * folder of its first file.
37
+ */
38
+ export const ComponentMetaSchema = OriginEntrySchema.extend({
39
+ group: z.string().min(1),
40
+ category: z.string().optional(),
41
+ author: z.string().optional(),
42
+ files: z.array(ComponentFileSchema).min(1),
43
+ });
44
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5C,WAAW;IACX,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC,CAAC;AAIH,sGAAsG;AACtG,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAE,uBAAuB;CAC9B,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAkB,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,WAAW,EAAW,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3C,iDAAiD;IACjD,OAAO,EAAe,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClD,QAAQ,EAAc,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3C,MAAM,EAAgB,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3C,4DAA4D;IAC5D,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpD,KAAK,EAAiB,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1D,CAAC,CAAC;AAIH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAC1D,KAAK,EAAK,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAI,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,KAAK,EAAK,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9C,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { SourceRecord } from "@g3nomaly/core/sources";
2
+ /**
3
+ * Sources every project has without registering them; they cannot be
4
+ * removed. `g3nui` is this package's own folder, so the components always
5
+ * match the CLI that installs them.
6
+ */
7
+ export declare const BUILTIN_SOURCES: SourceRecord;
8
+ //# sourceMappingURL=builtins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/sources/builtins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,YAE7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { findPackageRoot } from "@g3nomaly/core/utils";
2
+ /**
3
+ * Sources every project has without registering them; they cannot be
4
+ * removed. `g3nui` is this package's own folder, so the components always
5
+ * match the CLI that installs them.
6
+ */
7
+ export const BUILTIN_SOURCES = {
8
+ g3nui: { kind: "local", path: findPackageRoot(import.meta.dir) },
9
+ };
10
+ //# sourceMappingURL=builtins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/sources/builtins.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE;CACjE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,87 @@
1
1
  {
2
2
  "name": "@g3nomaly/ui",
3
- "version": "0.3.0",
4
- "description": "Placeholder. This package name is reserved; no functional release is currently published.",
5
- "license": "MIT"
3
+ "version": "0.3.1",
4
+ "description": "Component library with CLI installer for g3n projects.",
5
+ "type": "module",
6
+ "bin": {
7
+ "g3nui": "./dist/cli/index.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./registry": {
18
+ "types": "./dist/registry/index.d.ts",
19
+ "default": "./dist/registry/index.js"
20
+ },
21
+ "./types": {
22
+ "types": "./dist/registry/types.d.ts",
23
+ "default": "./dist/registry/types.js"
24
+ },
25
+ "./package.json": "./package.json",
26
+ "./cli/adapter": {
27
+ "types": "./dist/cli/adapter.d.ts",
28
+ "default": "./dist/cli/adapter.js"
29
+ },
30
+ "./cli/commands": {
31
+ "types": "./dist/cli/commands/index.d.ts",
32
+ "default": "./dist/cli/commands/index.js"
33
+ }
34
+ },
35
+ "files": [
36
+ "dist"
37
+ ],
38
+ "scripts": {
39
+ "build:types": "tsc --project tsconfig.build.json",
40
+ "build:components": "bun scripts/build-components.ts",
41
+ "build:registry": "bun scripts/build-registry.ts",
42
+ "build": "rm -rf dist && bun run build:types && bun run build:components && bun run build:registry",
43
+ "dev": "tsc --project tsconfig.build.json --watch",
44
+ "typecheck": "tsc --noEmit",
45
+ "lint": "eslint src --ext .ts,.tsx",
46
+ "g3nui": "bun run src/cli/index.ts"
47
+ },
48
+ "dependencies": {
49
+ "@clack/prompts": "^1.7.0",
50
+ "@g3nomaly/core": "^0.3.1",
51
+ "chalk": "^6.0.0",
52
+ "commander": "^15.0.0",
53
+ "glob": "^13.0.6",
54
+ "zod": "^4.4.3"
55
+ },
56
+ "overrides": {
57
+ "minimatch": "^10.2.5"
58
+ },
59
+ "devDependencies": {
60
+ "@types/bun": "^1.4.0",
61
+ "@types/node": "^26.2.0",
62
+ "typescript": "^7.0.2"
63
+ },
64
+ "peerDependencies": {
65
+ "react": "latest",
66
+ "react-dom": "latest"
67
+ },
68
+ "peerDependenciesMeta": {
69
+ "react": {
70
+ "optional": true
71
+ },
72
+ "react-dom": {
73
+ "optional": true
74
+ }
75
+ },
76
+ "keywords": [
77
+ "components",
78
+ "ui",
79
+ "cli",
80
+ "registry",
81
+ "shadcn"
82
+ ],
83
+ "license": "Elastic-2.0",
84
+ "publishConfig": {
85
+ "access": "public"
86
+ }
6
87
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # @g3nomaly/ui
2
-
3
- Placeholder. This package name is reserved; no functional release is currently published.