@g3nomaly/ui 0.3.2 → 0.3.4
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 +145 -0
- package/dist/cli/adapter.d.ts +14 -6
- package/dist/cli/adapter.d.ts.map +1 -1
- package/dist/cli/adapter.js +23 -18
- package/dist/cli/adapter.js.map +1 -1
- package/dist/cli/afterInstall.d.ts +26 -0
- package/dist/cli/afterInstall.d.ts.map +1 -0
- package/dist/cli/afterInstall.js +54 -0
- package/dist/cli/afterInstall.js.map +1 -0
- package/dist/cli/commands/add.d.ts +8 -2
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +9 -4
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +16 -5
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +59 -13
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/ls.d.ts +1 -1
- package/dist/cli/commands/manifest.js +1 -1
- package/dist/cli/commands/manifest.js.map +1 -1
- package/dist/cli/commands/source.d.ts +2 -1
- package/dist/cli/commands/source.d.ts.map +1 -1
- package/dist/cli/commands/source.js +29 -2
- package/dist/cli/commands/source.js.map +1 -1
- package/dist/cli/commands/sourceInit.d.ts +9 -0
- package/dist/cli/commands/sourceInit.d.ts.map +1 -0
- package/dist/cli/commands/sourceInit.js +77 -0
- package/dist/cli/commands/sourceInit.js.map +1 -0
- package/dist/cli/commands/update.d.ts +10 -3
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +9 -4
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +15 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/npmDependencies.d.ts +11 -0
- package/dist/cli/npmDependencies.d.ts.map +1 -0
- package/dist/cli/npmDependencies.js +67 -0
- package/dist/cli/npmDependencies.js.map +1 -0
- package/dist/cli/packageFiles.d.ts +15 -0
- package/dist/cli/packageFiles.d.ts.map +1 -0
- package/dist/cli/packageFiles.js +54 -0
- package/dist/cli/packageFiles.js.map +1 -0
- package/dist/cli/themeTokens.d.ts +12 -0
- package/dist/cli/themeTokens.d.ts.map +1 -0
- package/dist/cli/themeTokens.js +52 -0
- package/dist/cli/themeTokens.js.map +1 -0
- package/dist/packages/dependencies.d.ts +44 -0
- package/dist/packages/dependencies.d.ts.map +1 -0
- package/dist/packages/dependencies.js +60 -0
- package/dist/packages/dependencies.js.map +1 -0
- package/dist/packages/install.d.ts +10 -0
- package/dist/packages/install.d.ts.map +1 -0
- package/dist/packages/install.js +21 -0
- package/dist/packages/install.js.map +1 -0
- package/dist/registry/adapters/shadcn.adapter.d.ts +32 -7
- package/dist/registry/adapters/shadcn.adapter.d.ts.map +1 -1
- package/dist/registry/adapters/shadcn.adapter.js +75 -20
- package/dist/registry/adapters/shadcn.adapter.js.map +1 -1
- package/dist/registry/adapters/shadcnImports.d.ts +10 -0
- package/dist/registry/adapters/shadcnImports.d.ts.map +1 -0
- package/dist/registry/adapters/shadcnImports.js +18 -0
- package/dist/registry/adapters/shadcnImports.js.map +1 -0
- package/dist/registry/componentsJson.d.ts +3 -1
- package/dist/registry/componentsJson.d.ts.map +1 -1
- package/dist/registry/componentsJson.js +15 -1
- package/dist/registry/componentsJson.js.map +1 -1
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +1 -1
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest.d.ts +2 -13
- package/dist/registry/manifest.d.ts.map +1 -1
- package/dist/registry/manifest.js +4 -76
- package/dist/registry/manifest.js.map +1 -1
- package/dist/registry/packageExports.d.ts +9 -0
- package/dist/registry/packageExports.d.ts.map +1 -0
- package/dist/registry/packageExports.js +50 -0
- package/dist/registry/packageExports.js.map +1 -0
- package/dist/registry/readSource.d.ts +4 -2
- package/dist/registry/readSource.d.ts.map +1 -1
- package/dist/registry/readSource.js +27 -3
- package/dist/registry/readSource.js.map +1 -1
- package/dist/registry/types.d.ts +86 -3
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/registry/types.js +46 -3
- package/dist/registry/types.js.map +1 -1
- package/dist/sources/builtins.d.ts +1 -5
- package/dist/sources/builtins.d.ts.map +1 -1
- package/dist/sources/builtins.js +2 -7
- package/dist/sources/builtins.js.map +1 -1
- package/dist/theme/cssVars.d.ts +30 -0
- package/dist/theme/cssVars.d.ts.map +1 -0
- package/dist/theme/cssVars.js +92 -0
- package/dist/theme/cssVars.js.map +1 -0
- package/dist/theme/detectCssFile.d.ts +9 -0
- package/dist/theme/detectCssFile.d.ts.map +1 -0
- package/dist/theme/detectCssFile.js +41 -0
- package/dist/theme/detectCssFile.js.map +1 -0
- package/package.json +8 -21
- package/template/build.ts +25 -0
- package/template/package.json +18 -0
- package/template/src/components/example/Example.css +20 -0
- package/template/src/components/example/Example.tsx +26 -0
- package/template/src/components/example/example.meta.ts +61 -0
- package/dist/components/basic/Card.css +0 -32
- package/dist/components/basic/Card.debug.ts +0 -5
- package/dist/components/basic/Card.tsx +0 -31
- package/dist/components/basic/CardFooter.css +0 -16
- package/dist/components/basic/CardFooter.debug.ts +0 -5
- package/dist/components/basic/CardFooter.tsx +0 -29
- package/dist/components/basic/CardHeader.css +0 -14
- package/dist/components/basic/CardHeader.debug.ts +0 -5
- package/dist/components/basic/CardHeader.tsx +0 -29
- package/dist/components/basic/card.meta.ts +0 -14
- package/dist/components/basic/cardfooter.meta.ts +0 -14
- package/dist/components/basic/cardheader.meta.ts +0 -14
- package/dist/components/input/Button.css +0 -34
- package/dist/components/input/Button.debug.ts +0 -5
- package/dist/components/input/Button.tsx +0 -28
- package/dist/components/input/button.meta.ts +0 -14
- package/dist/components.json +0 -138
|
@@ -27,10 +27,23 @@ export function groupOf(meta) {
|
|
|
27
27
|
const first = meta.files[0]?.path ?? "";
|
|
28
28
|
return first.includes("/") ? first.split("/")[0] ?? "unknown" : "unknown";
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* @brief The source package as an npm dependency of the app, for a component whose files import from it.
|
|
32
|
+
*
|
|
33
|
+
* @param checkout - The source's checkout.
|
|
34
|
+
* @returns `<package>@^<version>`, or `null` when the source is not an npm package and so cannot be imported from.
|
|
35
|
+
*/
|
|
36
|
+
function packageDependency(checkout) {
|
|
37
|
+
if (checkout.spec.kind !== "npm")
|
|
38
|
+
return null;
|
|
39
|
+
return checkout.version === undefined ? checkout.spec.package : `${checkout.spec.package}@^${checkout.version}`;
|
|
40
|
+
}
|
|
30
41
|
/**
|
|
31
42
|
* @brief Reader for a source that is a component package: its `dist/components.json`,
|
|
32
|
-
* with the files the flags leave out dropped.
|
|
33
|
-
*
|
|
43
|
+
* with the files the flags leave out dropped. Files marked `install: "package"`
|
|
44
|
+
* move to `packageFiles`: they are never written, and the source package becomes
|
|
45
|
+
* a runtime dependency of the component, since its files import them by package
|
|
46
|
+
* path. Handed to `loadSourceRegistry` by every g3n-ui command.
|
|
34
47
|
*
|
|
35
48
|
* @param flags - Which optional files to keep.
|
|
36
49
|
* @returns Reader that yields the package's components, skipping any left with no files.
|
|
@@ -39,19 +52,30 @@ export function readComponentSource(flags) {
|
|
|
39
52
|
return async (checkout) => {
|
|
40
53
|
const entries = [];
|
|
41
54
|
const warnings = [];
|
|
55
|
+
const ownPackage = packageDependency(checkout);
|
|
56
|
+
const unreachable = [];
|
|
42
57
|
for (const [key, meta] of Object.entries(readComponentsJson(checkout.dir))) {
|
|
43
|
-
const
|
|
58
|
+
const packageFiles = meta.files.filter((file) => file.install === "package");
|
|
59
|
+
const files = filterFiles(meta.files.filter((file) => file.install !== "package"), flags);
|
|
44
60
|
if (files.length === 0) {
|
|
45
61
|
warnings.push(`${key} has no files left after filtering, skipped`);
|
|
46
62
|
continue;
|
|
47
63
|
}
|
|
64
|
+
if (packageFiles.length > 0 && ownPackage === null)
|
|
65
|
+
unreachable.push(key);
|
|
66
|
+
const dependencies = packageFiles.length > 0 && ownPackage !== null ? [...(meta.dependencies ?? []), ownPackage] : meta.dependencies;
|
|
48
67
|
entries.push([key, {
|
|
49
68
|
...meta,
|
|
50
69
|
group: groupOf(meta),
|
|
51
70
|
origin: { source: checkout.name, dir: COMPONENTS_DIR, commit: checkout.commit, version: checkout.version },
|
|
52
71
|
files,
|
|
72
|
+
...(dependencies === undefined ? {} : { dependencies }),
|
|
73
|
+
...(packageFiles.length === 0 ? {} : { packageFiles }),
|
|
53
74
|
}]);
|
|
54
75
|
}
|
|
76
|
+
if (unreachable.length > 0) {
|
|
77
|
+
warnings.push(`${unreachable.join(", ")} import files that stay in the package, which only resolve when the source is installed with \`bun add\` and registered as \`npm:<package>\``);
|
|
78
|
+
}
|
|
55
79
|
return { entries, warnings };
|
|
56
80
|
};
|
|
57
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readSource.js","sourceRoot":"","sources":["../../src/registry/readSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readSource.js","sourceRoot":"","sources":["../../src/registry/readSource.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AActE;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAA+B,EAAE,KAAyB;IACpF,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAAE,OAAO,KAAK,CAAC,YAAY,CAAC;QAC/D,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;YAAG,OAAO,KAAK,CAAC,WAAW,CAAC;QAC9D,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;G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CAAC,EAAE,CAAC;YAC3B,QAAQ,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,8IAA8I,CAAC,CAAC;QACzL,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAC/B,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/registry/types.d.ts
CHANGED
|
@@ -9,7 +9,19 @@ export declare const ComponentFileTypeSchema: z.ZodEnum<{
|
|
|
9
9
|
}>;
|
|
10
10
|
/** Kind of a component file: `component`, `style`, `util`, `hook`, `type` or `meta`. */
|
|
11
11
|
export type ComponentFileType = z.infer<typeof ComponentFileTypeSchema>;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @brief How a file reaches the app: `copy` (the default) writes it into the app for the user to own;
|
|
14
|
+
* `package` keeps it in the source package, where the component imports it from by package path.
|
|
15
|
+
*/
|
|
16
|
+
export declare const FileInstallSchema: z.ZodEnum<{
|
|
17
|
+
copy: "copy";
|
|
18
|
+
package: "package";
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* @brief One file of a component; `path` is relative to the components directory, e.g. `basic/Card.tsx`.
|
|
22
|
+
*
|
|
23
|
+
* @property install - `package` for a file that stays in the source package, such as a store; absent to copy it.
|
|
24
|
+
*/
|
|
13
25
|
export declare const ComponentFileSchema: z.ZodObject<{
|
|
14
26
|
path: z.ZodString;
|
|
15
27
|
hash: z.ZodOptional<z.ZodString>;
|
|
@@ -22,16 +34,44 @@ export declare const ComponentFileSchema: z.ZodObject<{
|
|
|
22
34
|
type: "type";
|
|
23
35
|
util: "util";
|
|
24
36
|
}>;
|
|
37
|
+
install: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
copy: "copy";
|
|
39
|
+
package: "package";
|
|
40
|
+
}>>;
|
|
25
41
|
}, z.core.$strip>;
|
|
26
42
|
/** A file of a component: the base file entry plus its `ComponentFileType`. */
|
|
27
43
|
export type ComponentFile = z.infer<typeof ComponentFileSchema>;
|
|
44
|
+
/**
|
|
45
|
+
* @brief npm packages a component's files import, each as `name` or `name@range`, e.g. `radix-ui` or
|
|
46
|
+
* `recharts@3.8.0`, the way shadcn lists them.
|
|
47
|
+
*/
|
|
48
|
+
export declare const NpmDependenciesSchema: z.ZodArray<z.ZodString>;
|
|
49
|
+
/**
|
|
50
|
+
* @brief Theme tokens a component needs in the app's global stylesheet, in shadcn's `cssVars` format:
|
|
51
|
+
* names without the leading `--`, e.g. `{ light: { sidebar: "oklch(0.98 0 0)" } }`.
|
|
52
|
+
*
|
|
53
|
+
* @property theme - Tokens for the `@theme inline` block.
|
|
54
|
+
* @property light - Tokens for the `:root` block.
|
|
55
|
+
* @property dark - Tokens for the `.dark` block.
|
|
56
|
+
*/
|
|
57
|
+
export declare const CssVarsSchema: z.ZodObject<{
|
|
58
|
+
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
59
|
+
light: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
60
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
/** Theme tokens a component needs, the type `CssVarsSchema` parses. */
|
|
63
|
+
export type CssVars = z.infer<typeof CssVarsSchema>;
|
|
28
64
|
/**
|
|
29
65
|
* @brief A component as it ships: what a `*.meta.ts` file declares and what
|
|
30
66
|
* `dist/components.json` holds per component, before a source reads it.
|
|
31
67
|
*
|
|
32
68
|
* @property version - Set at build time from the package version.
|
|
33
69
|
* @property registryDependencies - Keys of components this one needs installed beside it, e.g. `button`.
|
|
34
|
-
* @property
|
|
70
|
+
* @property dependencies - npm packages the app needs at runtime for this component, e.g. `radix-ui`.
|
|
71
|
+
* @property devDependencies - npm packages the app needs at build time only, e.g. `@types/d3`.
|
|
72
|
+
* @property cssVars - Theme tokens the component needs in the app's global stylesheet.
|
|
73
|
+
* @property files - Files of the component, each with its path and `ComponentFileType`; `install: "package"`
|
|
74
|
+
* marks one that stays in the package.
|
|
35
75
|
*/
|
|
36
76
|
export declare const PackagedComponentSchema: z.ZodObject<{
|
|
37
77
|
name: z.ZodString;
|
|
@@ -40,6 +80,13 @@ export declare const PackagedComponentSchema: z.ZodObject<{
|
|
|
40
80
|
category: z.ZodOptional<z.ZodString>;
|
|
41
81
|
author: z.ZodOptional<z.ZodString>;
|
|
42
82
|
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
84
|
+
devDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
|
+
cssVars: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
87
|
+
light: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
88
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
43
90
|
files: z.ZodArray<z.ZodObject<{
|
|
44
91
|
path: z.ZodString;
|
|
45
92
|
hash: z.ZodOptional<z.ZodString>;
|
|
@@ -52,17 +99,25 @@ export declare const PackagedComponentSchema: z.ZodObject<{
|
|
|
52
99
|
type: "type";
|
|
53
100
|
util: "util";
|
|
54
101
|
}>;
|
|
102
|
+
install: z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
copy: "copy";
|
|
104
|
+
package: "package";
|
|
105
|
+
}>>;
|
|
55
106
|
}, z.core.$strip>>;
|
|
56
107
|
}, z.core.$strip>;
|
|
57
108
|
/** A component as it ships, the type `PackagedComponentSchema` parses. */
|
|
58
109
|
export type PackagedComponent = z.infer<typeof PackagedComponentSchema>;
|
|
59
110
|
/**
|
|
60
111
|
* @brief One installable component, read from a source by `readComponentSource`
|
|
61
|
-
* or the shadcn adapter, and written per install into the
|
|
112
|
+
* or the shadcn adapter, and written per install into the ui manifest by
|
|
62
113
|
* the `add` and `update` commands.
|
|
63
114
|
*
|
|
64
115
|
* @property group - Display group: the category, or the first folder of the first file, e.g. `basic`.
|
|
116
|
+
* @property dependencies - npm packages the app needs at runtime for this component.
|
|
117
|
+
* @property devDependencies - npm packages the app needs at build time only.
|
|
118
|
+
* @property cssVars - Theme tokens the component needs in the app's global stylesheet.
|
|
65
119
|
* @property files - Files the install writes, each with its path and `ComponentFileType`.
|
|
120
|
+
* @property packageFiles - Files that stay in the source package, imported from it by package path; never written.
|
|
66
121
|
*/
|
|
67
122
|
export declare const ComponentMetaSchema: z.ZodObject<{
|
|
68
123
|
name: z.ZodString;
|
|
@@ -79,6 +134,13 @@ export declare const ComponentMetaSchema: z.ZodObject<{
|
|
|
79
134
|
group: z.ZodString;
|
|
80
135
|
category: z.ZodOptional<z.ZodString>;
|
|
81
136
|
author: z.ZodOptional<z.ZodString>;
|
|
137
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
devDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
cssVars: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
141
|
+
light: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
142
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
143
|
+
}, z.core.$strip>>;
|
|
82
144
|
files: z.ZodArray<z.ZodObject<{
|
|
83
145
|
path: z.ZodString;
|
|
84
146
|
hash: z.ZodOptional<z.ZodString>;
|
|
@@ -91,7 +153,28 @@ export declare const ComponentMetaSchema: z.ZodObject<{
|
|
|
91
153
|
type: "type";
|
|
92
154
|
util: "util";
|
|
93
155
|
}>;
|
|
156
|
+
install: z.ZodOptional<z.ZodEnum<{
|
|
157
|
+
copy: "copy";
|
|
158
|
+
package: "package";
|
|
159
|
+
}>>;
|
|
94
160
|
}, z.core.$strip>>;
|
|
161
|
+
packageFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
162
|
+
path: z.ZodString;
|
|
163
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
164
|
+
version: z.ZodOptional<z.ZodString>;
|
|
165
|
+
type: z.ZodEnum<{
|
|
166
|
+
component: "component";
|
|
167
|
+
hook: "hook";
|
|
168
|
+
meta: "meta";
|
|
169
|
+
style: "style";
|
|
170
|
+
type: "type";
|
|
171
|
+
util: "util";
|
|
172
|
+
}>;
|
|
173
|
+
install: z.ZodOptional<z.ZodEnum<{
|
|
174
|
+
copy: "copy";
|
|
175
|
+
package: "package";
|
|
176
|
+
}>>;
|
|
177
|
+
}, z.core.$strip>>>;
|
|
95
178
|
}, z.core.$strip>;
|
|
96
179
|
/** One installable component, the type `ComponentMetaSchema` parses. */
|
|
97
180
|
export type ComponentMeta = z.infer<typeof ComponentMetaSchema>;
|
|
@@ -1 +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,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,
|
|
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,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;EAA8B,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;iBAG9B,CAAC;AAEH,+EAA+E;AAC/E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,yBAA6B,CAAC;AAEhE;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;iBAIxB,CAAC;AAEH,uEAAuE;AACvE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWlC,CAAC;AAEH,0EAA0E;AAC1E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS9B,CAAC;AAEH,wEAAwE;AACxE,MAAM,MAAM,aAAa,GAAO,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACpE,wEAAwE;AACxE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC"}
|
package/dist/registry/types.js
CHANGED
|
@@ -10,9 +10,37 @@ export const ComponentFileTypeSchema = z.enum([
|
|
|
10
10
|
"type",
|
|
11
11
|
"meta",
|
|
12
12
|
]);
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* @brief How a file reaches the app: `copy` (the default) writes it into the app for the user to own;
|
|
15
|
+
* `package` keeps it in the source package, where the component imports it from by package path.
|
|
16
|
+
*/
|
|
17
|
+
export const FileInstallSchema = z.enum(["copy", "package"]);
|
|
18
|
+
/**
|
|
19
|
+
* @brief One file of a component; `path` is relative to the components directory, e.g. `basic/Card.tsx`.
|
|
20
|
+
*
|
|
21
|
+
* @property install - `package` for a file that stays in the source package, such as a store; absent to copy it.
|
|
22
|
+
*/
|
|
14
23
|
export const ComponentFileSchema = BaseFileEntrySchema.extend({
|
|
15
24
|
type: ComponentFileTypeSchema,
|
|
25
|
+
install: FileInstallSchema.optional(),
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* @brief npm packages a component's files import, each as `name` or `name@range`, e.g. `radix-ui` or
|
|
29
|
+
* `recharts@3.8.0`, the way shadcn lists them.
|
|
30
|
+
*/
|
|
31
|
+
export const NpmDependenciesSchema = z.array(z.string().min(1));
|
|
32
|
+
/**
|
|
33
|
+
* @brief Theme tokens a component needs in the app's global stylesheet, in shadcn's `cssVars` format:
|
|
34
|
+
* names without the leading `--`, e.g. `{ light: { sidebar: "oklch(0.98 0 0)" } }`.
|
|
35
|
+
*
|
|
36
|
+
* @property theme - Tokens for the `@theme inline` block.
|
|
37
|
+
* @property light - Tokens for the `:root` block.
|
|
38
|
+
* @property dark - Tokens for the `.dark` block.
|
|
39
|
+
*/
|
|
40
|
+
export const CssVarsSchema = z.object({
|
|
41
|
+
theme: z.record(z.string(), z.string()).optional(),
|
|
42
|
+
light: z.record(z.string(), z.string()).optional(),
|
|
43
|
+
dark: z.record(z.string(), z.string()).optional(),
|
|
16
44
|
});
|
|
17
45
|
/**
|
|
18
46
|
* @brief A component as it ships: what a `*.meta.ts` file declares and what
|
|
@@ -20,7 +48,11 @@ export const ComponentFileSchema = BaseFileEntrySchema.extend({
|
|
|
20
48
|
*
|
|
21
49
|
* @property version - Set at build time from the package version.
|
|
22
50
|
* @property registryDependencies - Keys of components this one needs installed beside it, e.g. `button`.
|
|
23
|
-
* @property
|
|
51
|
+
* @property dependencies - npm packages the app needs at runtime for this component, e.g. `radix-ui`.
|
|
52
|
+
* @property devDependencies - npm packages the app needs at build time only, e.g. `@types/d3`.
|
|
53
|
+
* @property cssVars - Theme tokens the component needs in the app's global stylesheet.
|
|
54
|
+
* @property files - Files of the component, each with its path and `ComponentFileType`; `install: "package"`
|
|
55
|
+
* marks one that stays in the package.
|
|
24
56
|
*/
|
|
25
57
|
export const PackagedComponentSchema = z.object({
|
|
26
58
|
name: z.string().min(1),
|
|
@@ -29,20 +61,31 @@ export const PackagedComponentSchema = z.object({
|
|
|
29
61
|
category: z.string().optional(),
|
|
30
62
|
author: z.string().optional(),
|
|
31
63
|
registryDependencies: z.array(z.string()).optional(),
|
|
64
|
+
dependencies: NpmDependenciesSchema.optional(),
|
|
65
|
+
devDependencies: NpmDependenciesSchema.optional(),
|
|
66
|
+
cssVars: CssVarsSchema.optional(),
|
|
32
67
|
files: z.array(ComponentFileSchema).min(1),
|
|
33
68
|
});
|
|
34
69
|
/**
|
|
35
70
|
* @brief One installable component, read from a source by `readComponentSource`
|
|
36
|
-
* or the shadcn adapter, and written per install into the
|
|
71
|
+
* or the shadcn adapter, and written per install into the ui manifest by
|
|
37
72
|
* the `add` and `update` commands.
|
|
38
73
|
*
|
|
39
74
|
* @property group - Display group: the category, or the first folder of the first file, e.g. `basic`.
|
|
75
|
+
* @property dependencies - npm packages the app needs at runtime for this component.
|
|
76
|
+
* @property devDependencies - npm packages the app needs at build time only.
|
|
77
|
+
* @property cssVars - Theme tokens the component needs in the app's global stylesheet.
|
|
40
78
|
* @property files - Files the install writes, each with its path and `ComponentFileType`.
|
|
79
|
+
* @property packageFiles - Files that stay in the source package, imported from it by package path; never written.
|
|
41
80
|
*/
|
|
42
81
|
export const ComponentMetaSchema = OriginEntrySchema.extend({
|
|
43
82
|
group: z.string().min(1),
|
|
44
83
|
category: z.string().optional(),
|
|
45
84
|
author: z.string().optional(),
|
|
85
|
+
dependencies: NpmDependenciesSchema.optional(),
|
|
86
|
+
devDependencies: NpmDependenciesSchema.optional(),
|
|
87
|
+
cssVars: CssVarsSchema.optional(),
|
|
46
88
|
files: z.array(ComponentFileSchema).min(1),
|
|
89
|
+
packageFiles: z.array(ComponentFileSchema).optional(),
|
|
47
90
|
});
|
|
48
91
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +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;AAKH,
|
|
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;AAKH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAE7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAK,uBAAuB;IAChC,OAAO,EAAE,iBAAiB,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAKH;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAA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AC,CAAC;CAC1D,CAAC,CAAC;AAKH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAC1D,KAAK,EAAY,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,QAAQ,EAAS,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAW,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAK,qBAAqB,CAAC,QAAQ,EAAE;IACjD,eAAe,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACjD,OAAO,EAAU,aAAa,CAAC,QAAQ,EAAE;IACzC,KAAK,EAAY,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,YAAY,EAAK,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { SourceRecord } from "@g3nomaly/core/sources";
|
|
2
|
-
/**
|
|
3
|
-
* @brief 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
|
-
*/
|
|
2
|
+
/** Sources every project has without registering them; they cannot be removed. */
|
|
7
3
|
export declare const BUILTIN_SOURCES: SourceRecord;
|
|
8
4
|
//# sourceMappingURL=builtins.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/sources/builtins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,kFAAkF;AAClF,eAAO,MAAM,eAAe,EAAE,YAE7B,CAAC"}
|
package/dist/sources/builtins.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @brief 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
|
-
*/
|
|
1
|
+
/** Sources every project has without registering them; they cannot be removed. */
|
|
7
2
|
export const BUILTIN_SOURCES = {
|
|
8
|
-
|
|
3
|
+
"g3n-ui": { kind: "npm", package: "@g3nomaly/g3n-ui" },
|
|
9
4
|
};
|
|
10
5
|
//# sourceMappingURL=builtins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/sources/builtins.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/sources/builtins.ts"],"names":[],"mappings":"AAGA,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE;CACvD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CssVars } from "../registry/types";
|
|
2
|
+
/**
|
|
3
|
+
* @brief The result of adding tokens to a stylesheet.
|
|
4
|
+
*
|
|
5
|
+
* @property css - The stylesheet with the missing tokens added.
|
|
6
|
+
* @property added - Each token added, as `<block> --<name>`, e.g. `:root --sidebar`.
|
|
7
|
+
*/
|
|
8
|
+
export interface CssVarsMerge {
|
|
9
|
+
css: string;
|
|
10
|
+
added: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @brief Adds the theme tokens a stylesheet lacks: `light` to `:root`, `dark` to `.dark`, `theme` to
|
|
14
|
+
* `@theme inline`. When the stylesheet has a `@theme` block (Tailwind v4), each colour token also gets
|
|
15
|
+
* its `--color-<name>: var(--<name>)` mapping there, the way shadcn adds them, so Tailwind classes such
|
|
16
|
+
* as `bg-sidebar` work. Tokens the stylesheet defines keep their value: the app's theme wins.
|
|
17
|
+
*
|
|
18
|
+
* @param css - The stylesheet, e.g. the contents of `src/index.css`.
|
|
19
|
+
* @param vars - Tokens to add.
|
|
20
|
+
* @returns The stylesheet with the missing tokens added, and which were added.
|
|
21
|
+
*/
|
|
22
|
+
export declare function addCssVars(css: string, vars: CssVars): CssVarsMerge;
|
|
23
|
+
/**
|
|
24
|
+
* @brief Merges the theme tokens of several components; the first component naming a token wins.
|
|
25
|
+
*
|
|
26
|
+
* @param all - Tokens per component, in install order.
|
|
27
|
+
* @returns One set of tokens.
|
|
28
|
+
*/
|
|
29
|
+
export declare function mergeCssVars(all: readonly CssVars[]): CssVars;
|
|
30
|
+
//# sourceMappingURL=cssVars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssVars.d.ts","sourceRoot":"","sources":["../../src/theme/cssVars.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAoBjD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAI,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAiDD;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,YAAY,CAenE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAM7D"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
const ROOT = { selector: ":root", find: /(^|\n)[ \t]*:root[ \t]*\{/ };
|
|
2
|
+
const DARK = { selector: ".dark", find: /(^|\n)[ \t]*\.dark[ \t]*\{/ };
|
|
3
|
+
const THEME = { selector: "@theme inline", find: /(^|\n)[ \t]*@theme(?:[ \t]+inline)?[ \t]*\{/ };
|
|
4
|
+
/** Tokens that are no colour, so they get no `--color-<name>` mapping in `@theme inline`. */
|
|
5
|
+
const NOT_COLOURS = new Set(["radius"]);
|
|
6
|
+
/** A token name with its leading `--`, e.g. `--sidebar` for `sidebar`. */
|
|
7
|
+
function property(name) {
|
|
8
|
+
return name.startsWith("--") ? name : `--${name}`;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @brief Where a block's body ends: the index of its closing brace.
|
|
12
|
+
*
|
|
13
|
+
* @param css - The stylesheet.
|
|
14
|
+
* @param open - Index just past the block's opening brace.
|
|
15
|
+
* @returns The index of the matching closing brace, or `-1` when the braces do not balance.
|
|
16
|
+
*/
|
|
17
|
+
function closingBrace(css, open) {
|
|
18
|
+
let depth = 1;
|
|
19
|
+
for (let i = open; i < css.length; i++) {
|
|
20
|
+
if (css[i] === "{")
|
|
21
|
+
depth++;
|
|
22
|
+
else if (css[i] === "}" && --depth === 0)
|
|
23
|
+
return i;
|
|
24
|
+
}
|
|
25
|
+
return -1;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @brief Adds the tokens a block lacks, before its closing brace, or as a new block at the end.
|
|
29
|
+
* A token the block already defines keeps its value.
|
|
30
|
+
*
|
|
31
|
+
* @param css - The stylesheet.
|
|
32
|
+
* @param block - The block to add to.
|
|
33
|
+
* @param tokens - Tokens by name, with or without the leading `--`.
|
|
34
|
+
* @returns The stylesheet and the names of the tokens added.
|
|
35
|
+
*/
|
|
36
|
+
function addToBlock(css, block, tokens) {
|
|
37
|
+
const match = block.find.exec(css);
|
|
38
|
+
const open = match === null ? -1 : match.index + match[0].length;
|
|
39
|
+
const close = open === -1 ? -1 : closingBrace(css, open);
|
|
40
|
+
const body = close === -1 ? "" : css.slice(open, close);
|
|
41
|
+
const defined = new Set([...body.matchAll(/(--[\w-]+)\s*:/g)].map((m) => m[1]));
|
|
42
|
+
const missing = Object.entries(tokens).map(([name, value]) => [property(name), value]).filter(([name]) => !defined.has(name));
|
|
43
|
+
if (missing.length === 0)
|
|
44
|
+
return { css, added: [] };
|
|
45
|
+
const lines = missing.map(([name, value]) => ` ${name}: ${value};\n`).join("");
|
|
46
|
+
const added = missing.map(([name]) => name);
|
|
47
|
+
if (close === -1)
|
|
48
|
+
return { css: `${css.trimEnd()}\n\n${block.selector} {\n${lines}}\n`, added };
|
|
49
|
+
const before = css.slice(0, close);
|
|
50
|
+
return { css: `${before}${before.endsWith("\n") ? "" : "\n"}${lines}${css.slice(close)}`, added };
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @brief Adds the theme tokens a stylesheet lacks: `light` to `:root`, `dark` to `.dark`, `theme` to
|
|
54
|
+
* `@theme inline`. When the stylesheet has a `@theme` block (Tailwind v4), each colour token also gets
|
|
55
|
+
* its `--color-<name>: var(--<name>)` mapping there, the way shadcn adds them, so Tailwind classes such
|
|
56
|
+
* as `bg-sidebar` work. Tokens the stylesheet defines keep their value: the app's theme wins.
|
|
57
|
+
*
|
|
58
|
+
* @param css - The stylesheet, e.g. the contents of `src/index.css`.
|
|
59
|
+
* @param vars - Tokens to add.
|
|
60
|
+
* @returns The stylesheet with the missing tokens added, and which were added.
|
|
61
|
+
*/
|
|
62
|
+
export function addCssVars(css, vars) {
|
|
63
|
+
const colours = [...new Set([...Object.keys(vars.light ?? {}), ...Object.keys(vars.dark ?? {})])]
|
|
64
|
+
.map((name) => name.replace(/^--/, ""))
|
|
65
|
+
.filter((name) => !NOT_COLOURS.has(name));
|
|
66
|
+
const mappings = THEME.find.test(css) ? Object.fromEntries(colours.map((name) => [`color-${name}`, `var(--${name})`])) : {};
|
|
67
|
+
let result = css;
|
|
68
|
+
const added = [];
|
|
69
|
+
for (const [block, tokens] of [[ROOT, vars.light], [DARK, vars.dark], [THEME, { ...mappings, ...vars.theme }]]) {
|
|
70
|
+
if (tokens === undefined || Object.keys(tokens).length === 0)
|
|
71
|
+
continue;
|
|
72
|
+
const merged = addToBlock(result, block, tokens);
|
|
73
|
+
result = merged.css;
|
|
74
|
+
added.push(...merged.added.map((name) => `${block.selector} ${name}`));
|
|
75
|
+
}
|
|
76
|
+
return { css: result, added };
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @brief Merges the theme tokens of several components; the first component naming a token wins.
|
|
80
|
+
*
|
|
81
|
+
* @param all - Tokens per component, in install order.
|
|
82
|
+
* @returns One set of tokens.
|
|
83
|
+
*/
|
|
84
|
+
export function mergeCssVars(all) {
|
|
85
|
+
const merged = { theme: {}, light: {}, dark: {} };
|
|
86
|
+
for (const vars of all) {
|
|
87
|
+
for (const block of ["theme", "light", "dark"])
|
|
88
|
+
merged[block] = { ...vars[block], ...merged[block] };
|
|
89
|
+
}
|
|
90
|
+
return merged;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=cssVars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssVars.js","sourceRoot":"","sources":["../../src/theme/cssVars.ts"],"names":[],"mappings":"AAcA,MAAM,IAAI,GAAc,EAAE,QAAQ,EAAE,OAAO,EAAU,IAAI,EAAE,2BAA2B,EAAE,CAAC;AACzF,MAAM,IAAI,GAAc,EAAE,QAAQ,EAAE,OAAO,EAAU,IAAI,EAAE,4BAA4B,EAAE,CAAC;AAC1F,MAAM,KAAK,GAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,6CAA6C,EAAE,CAAC;AAE3G,6FAA6F;AAC7F,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAaxC,0EAA0E;AAC1E,SAAS,QAAQ,CAAC,IAAY;IAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,YAA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,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAChC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,GAAuB;IAClD,MAAM,MAAM,GAAsB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACrE,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE,CAAC;QACvB,KAAK,MAAM,KAAK,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAU;YAAE,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAChH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @brief Finds the project's global stylesheet: the one shadcn's `components.json` names, else the
|
|
3
|
+
* first common location that exists.
|
|
4
|
+
*
|
|
5
|
+
* @param projectRoot - Absolute project root.
|
|
6
|
+
* @returns The path relative to the project root, e.g. `src/index.css`, or `undefined` when none is found.
|
|
7
|
+
*/
|
|
8
|
+
export declare function detectCssFile(projectRoot: string): string | undefined;
|
|
9
|
+
//# sourceMappingURL=detectCssFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectCssFile.d.ts","sourceRoot":"","sources":["../../src/theme/detectCssFile.ts"],"names":[],"mappings":"AA8BA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIrE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// packages/ui/src/theme/detectCssFile.ts
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
/** Where Vite, Next.js and shadcn templates keep the global stylesheet, most common first. */
|
|
6
|
+
const CANDIDATES = [
|
|
7
|
+
"src/index.css",
|
|
8
|
+
"src/app/globals.css",
|
|
9
|
+
"app/globals.css",
|
|
10
|
+
"src/styles/globals.css",
|
|
11
|
+
"styles/globals.css",
|
|
12
|
+
"src/globals.css",
|
|
13
|
+
];
|
|
14
|
+
const ShadcnConfigSchema = z.object({ tailwind: z.object({ css: z.string().min(1).optional() }).optional() });
|
|
15
|
+
/**
|
|
16
|
+
* @brief The stylesheet shadcn's own `components.json` names, when the project has one.
|
|
17
|
+
*
|
|
18
|
+
* @param projectRoot - Absolute project root.
|
|
19
|
+
* @returns The path relative to the project root, or `undefined` when there is no such file or field.
|
|
20
|
+
*/
|
|
21
|
+
function fromShadcnConfig(projectRoot) {
|
|
22
|
+
const file = path.join(projectRoot, "components.json");
|
|
23
|
+
if (!fs.existsSync(file))
|
|
24
|
+
return undefined;
|
|
25
|
+
const parsed = ShadcnConfigSchema.safeParse(JSON.parse(fs.readFileSync(file, "utf8")));
|
|
26
|
+
return parsed.success ? parsed.data.tailwind?.css : undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @brief Finds the project's global stylesheet: the one shadcn's `components.json` names, else the
|
|
30
|
+
* first common location that exists.
|
|
31
|
+
*
|
|
32
|
+
* @param projectRoot - Absolute project root.
|
|
33
|
+
* @returns The path relative to the project root, e.g. `src/index.css`, or `undefined` when none is found.
|
|
34
|
+
*/
|
|
35
|
+
export function detectCssFile(projectRoot) {
|
|
36
|
+
const named = fromShadcnConfig(projectRoot);
|
|
37
|
+
if (named !== undefined && fs.existsSync(path.join(projectRoot, named)))
|
|
38
|
+
return named;
|
|
39
|
+
return CANDIDATES.find((candidate) => fs.existsSync(path.join(projectRoot, candidate)));
|
|
40
|
+
}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,WAAW,CAAC,CAAC;IAC5C,IAAI,KAAK,KAAK,SAAS,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACtF,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAC1F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g3nomaly/ui",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "Installs React components from any registered source into a project, the way shadcn does.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"g3n-ui": "./dist/cli/index.js"
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"module": "./dist/index.js",
|
|
@@ -33,21 +33,20 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
|
-
"dist"
|
|
36
|
+
"dist",
|
|
37
|
+
"template"
|
|
37
38
|
],
|
|
38
39
|
"scripts": {
|
|
39
40
|
"build:types": "tsc --project tsconfig.build.json",
|
|
40
|
-
"build
|
|
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",
|
|
41
|
+
"build": "rm -rf dist && bun run build:types",
|
|
43
42
|
"dev": "tsc --project tsconfig.build.json --watch",
|
|
44
43
|
"typecheck": "tsc --noEmit",
|
|
45
44
|
"lint": "eslint src --ext .ts,.tsx",
|
|
46
|
-
"
|
|
45
|
+
"ui": "bun run src/cli/index.ts"
|
|
47
46
|
},
|
|
48
47
|
"dependencies": {
|
|
49
48
|
"@clack/prompts": "^1.7.0",
|
|
50
|
-
"@g3nomaly/core": "^0.3.
|
|
49
|
+
"@g3nomaly/core": "^0.3.4",
|
|
51
50
|
"chalk": "^6.0.0",
|
|
52
51
|
"commander": "^15.0.0",
|
|
53
52
|
"glob": "^13.0.6",
|
|
@@ -61,18 +60,6 @@
|
|
|
61
60
|
"@types/node": "^26.2.0",
|
|
62
61
|
"typescript": "^7.0.2"
|
|
63
62
|
},
|
|
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
63
|
"keywords": [
|
|
77
64
|
"components",
|
|
78
65
|
"ui",
|