@schemavaults/theme 0.22.18 → 0.24.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/README.md
CHANGED
|
@@ -38,45 +38,10 @@ export default config;
|
|
|
38
38
|
|
|
39
39
|
// Import the config factory
|
|
40
40
|
import { SchemaVaultsTailwindConfigFactory } from "@schemavaults/theme";
|
|
41
|
-
|
|
42
|
-
import { lstatSync, exists, type Stats } from "fs";
|
|
43
|
-
|
|
44
|
-
function node_modules(): string {
|
|
45
|
-
const currentDirectory: string = import.meta.dirname;
|
|
46
|
-
|
|
47
|
-
let node_modules_path: string;
|
|
48
|
-
if (currentDirectory.endsWith("/src") || currentDirectory.endsWith("/dist")) {
|
|
49
|
-
node_modules_path = join(currentDirectory, "..", "node_modules");
|
|
50
|
-
} else {
|
|
51
|
-
node_modules_path = join(currentDirectory, "node_modules");
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return node_modules_path;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function isdir(path: string): boolean {
|
|
58
|
-
if (!existsSync(path)) return false;
|
|
59
|
-
|
|
60
|
-
let lstatResult: Stats;
|
|
61
|
-
try {
|
|
62
|
-
lstatResult = lstatSync(path);
|
|
63
|
-
} catch (e: unknown) {
|
|
64
|
-
throw new Error(
|
|
65
|
-
"Error running lstatSync for tailwind.config.ts isdir() function!",
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
return lstatResult.isDirectory();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (!isdir(node_modules())) {
|
|
72
|
-
throw new Error("Failed to resolve node_modules/ directory for test!");
|
|
73
|
-
}
|
|
41
|
+
|
|
74
42
|
|
|
75
43
|
// Initialize the config factory
|
|
76
44
|
const configFactory = new SchemaVaultsTailwindConfigFactory({
|
|
77
|
-
node_modules,
|
|
78
|
-
isdir,
|
|
79
|
-
join,
|
|
80
45
|
scope: 'schemavaults'
|
|
81
46
|
});
|
|
82
47
|
|
|
@@ -85,7 +50,7 @@ const config = configFactory.createConfig({
|
|
|
85
50
|
content: [
|
|
86
51
|
"./src/**/*.tsx|jsx|js|ts",
|
|
87
52
|
"./app/**/*.tsx|jsx|js|ts",
|
|
88
|
-
"@schemavaults/ui", // resolved and converted to an absolute path to the schemavaults package in the node_modules folder
|
|
53
|
+
"@schemavaults/ui", // resolved and converted to an absolute path to the schemavaults package in the node_modules folder. i.e. @schemavaults/ui => .../node_modules/@schemavaults/ui/dist/**/*.tsx|jsx|js|ts
|
|
89
54
|
"@schemavaults/schema-ui",
|
|
90
55
|
],
|
|
91
56
|
});
|
|
@@ -4,11 +4,9 @@ import type { TailwindTheme } from "./TailwindTheme";
|
|
|
4
4
|
type OsJoinFn = (path_segment: string, ...remaining_path_segments: string[]) => string;
|
|
5
5
|
export interface ISchemaVaultsTailwindConfigFactoryInitOptions {
|
|
6
6
|
debug?: boolean;
|
|
7
|
-
join?: OsJoinFn;
|
|
8
|
-
node_modules?: string | (() => string);
|
|
9
|
-
isdir?: (path: string) => boolean;
|
|
10
7
|
scope?: string;
|
|
11
8
|
fileExtensions?: readonly string[];
|
|
9
|
+
project_root?: string;
|
|
12
10
|
}
|
|
13
11
|
export interface ISchemaVaultsTailwindConfigCreationOptions {
|
|
14
12
|
content: readonly string[];
|
|
@@ -22,14 +20,15 @@ type ThemeValue = ThemeExtension[string];
|
|
|
22
20
|
export declare class SchemaVaultsTailwindConfigFactory implements ISchemaVaultsTailwindConfigFactory {
|
|
23
21
|
protected readonly debug: boolean;
|
|
24
22
|
protected readonly join: OsJoinFn;
|
|
25
|
-
protected readonly node_modules_path: string | undefined;
|
|
26
23
|
protected readonly isdir: (path: string) => boolean;
|
|
24
|
+
protected readonly isfile: (path: string) => boolean;
|
|
27
25
|
protected readonly scope: string;
|
|
28
|
-
protected
|
|
26
|
+
protected readonly project_root: string;
|
|
27
|
+
protected static readonly defaultFileExtensionsToSearch: readonly ["js", "jsx", "ts", "tsx", "svelte"];
|
|
29
28
|
protected readonly fileExtensionsToIncludeInTailwindClassNamesSearch: readonly string[];
|
|
30
29
|
private static defaultJoinImplementation;
|
|
31
30
|
private static defaultIsDirImplementation;
|
|
32
|
-
private static
|
|
31
|
+
private static defaultIsFileImplementation;
|
|
33
32
|
constructor(opts?: ISchemaVaultsTailwindConfigFactoryInitOptions);
|
|
34
33
|
/**
|
|
35
34
|
* @description Load TailwindCSS plugins to use in theme configuration
|
|
@@ -41,9 +40,12 @@ export declare class SchemaVaultsTailwindConfigFactory implements ISchemaVaultsT
|
|
|
41
40
|
protected get brandColors(): ThemeValue;
|
|
42
41
|
protected get screenSizes(): Record<ScreenBreakpointID, `${number}px`>;
|
|
43
42
|
protected get themeExtension(): ThemeExtension;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param org_scoped_package_identifier A string representing an organization-scoped package identifier. For example: @schemavaults/ui
|
|
46
|
+
* @returns The resolved path for the organization-scoped package. I.e. the path that contains the package.json file
|
|
47
|
+
*/
|
|
48
|
+
protected resolveOrganizationScopedPackagePath(org_scoped_package_identifier: string): string;
|
|
47
49
|
private static possibleBuildDirectories;
|
|
48
50
|
createConfig(opts?: ISchemaVaultsTailwindConfigCreationOptions): TailwindConfig;
|
|
49
51
|
}
|
|
@@ -3,27 +3,27 @@ import { brandColors } from "./brand_colors";
|
|
|
3
3
|
import DefaultOrgScope from "./DefaultOrgScope"; // @schemavaults organization is default
|
|
4
4
|
import { getScreenBreakpoint, listScreenBreakpoints, } from "./ScreenBreakpoints";
|
|
5
5
|
import { existsSync, lstatSync } from "fs";
|
|
6
|
+
import { normalize, join, dirname } from "path";
|
|
6
7
|
// TailwindCSS Plugins:
|
|
7
8
|
import tailwindAnimatePlugin from "./plugins/tailwindcss-animate";
|
|
9
|
+
import * as resolve from "resolve";
|
|
8
10
|
export class SchemaVaultsTailwindConfigFactory {
|
|
9
11
|
debug;
|
|
10
12
|
join;
|
|
11
|
-
node_modules_path;
|
|
12
13
|
isdir;
|
|
14
|
+
isfile;
|
|
13
15
|
scope;
|
|
16
|
+
project_root;
|
|
14
17
|
static defaultFileExtensionsToSearch = [
|
|
15
18
|
"js",
|
|
16
19
|
"jsx",
|
|
17
20
|
"ts",
|
|
18
21
|
"tsx",
|
|
22
|
+
"svelte",
|
|
19
23
|
];
|
|
20
24
|
fileExtensionsToIncludeInTailwindClassNamesSearch;
|
|
21
25
|
static defaultJoinImplementation(path_segment, ...remaining_path_segments) {
|
|
22
|
-
|
|
23
|
-
path_segment,
|
|
24
|
-
...remaining_path_segments,
|
|
25
|
-
];
|
|
26
|
-
return path_segments.join("/");
|
|
26
|
+
return join(path_segment, ...remaining_path_segments);
|
|
27
27
|
}
|
|
28
28
|
static defaultIsDirImplementation(maybeDirPath) {
|
|
29
29
|
if (!existsSync(maybeDirPath)) {
|
|
@@ -31,42 +31,20 @@ export class SchemaVaultsTailwindConfigFactory {
|
|
|
31
31
|
}
|
|
32
32
|
return lstatSync(maybeDirPath).isDirectory();
|
|
33
33
|
}
|
|
34
|
-
static
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return () => join(cwd, "node_modules");
|
|
38
|
-
}
|
|
39
|
-
else if (isdir(join(cwd, "..", "node_modules"))) {
|
|
40
|
-
return () => join(cwd, "..", "node_modules");
|
|
41
|
-
}
|
|
42
|
-
else if (isdir(join(cwd, "..", "..", "node_modules"))) {
|
|
43
|
-
return () => join(cwd, "..", "..", "node_modules");
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
console.error("Failed to resolve path to 'node_modules' directory from SchemaVaultsTailwindConfigFactory!");
|
|
47
|
-
console.error("You can pass a custom resolver function to the config factory constructor to fix this!");
|
|
48
|
-
process.exit(1);
|
|
34
|
+
static defaultIsFileImplementation(maybeFilePath) {
|
|
35
|
+
if (!existsSync(maybeFilePath)) {
|
|
36
|
+
return false;
|
|
49
37
|
}
|
|
38
|
+
return lstatSync(maybeFilePath).isFile();
|
|
50
39
|
}
|
|
51
40
|
constructor(opts) {
|
|
52
41
|
this.debug = opts?.debug ?? false;
|
|
53
42
|
if (this.debug) {
|
|
54
43
|
console.log("[SchemaVaultsTailwindConfigFactory] constructor()");
|
|
55
44
|
}
|
|
56
|
-
this.join =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
: SchemaVaultsTailwindConfigFactory.defaultJoinImplementation;
|
|
60
|
-
this.isdir =
|
|
61
|
-
typeof opts?.isdir === "function"
|
|
62
|
-
? opts.isdir
|
|
63
|
-
: SchemaVaultsTailwindConfigFactory.defaultIsDirImplementation;
|
|
64
|
-
this.node_modules_path =
|
|
65
|
-
typeof opts?.node_modules === "string"
|
|
66
|
-
? opts.node_modules
|
|
67
|
-
: typeof opts?.node_modules === "function"
|
|
68
|
-
? opts.node_modules()
|
|
69
|
-
: SchemaVaultsTailwindConfigFactory.getDefaultResolveNodeModulesDirectoryPathImplementation(this.join, this.isdir)();
|
|
45
|
+
this.join = SchemaVaultsTailwindConfigFactory.defaultJoinImplementation;
|
|
46
|
+
this.isdir = SchemaVaultsTailwindConfigFactory.defaultIsDirImplementation;
|
|
47
|
+
this.isfile = SchemaVaultsTailwindConfigFactory.defaultIsFileImplementation;
|
|
70
48
|
this.scope = opts?.scope ?? DefaultOrgScope;
|
|
71
49
|
if (this.scope.startsWith("@")) {
|
|
72
50
|
throw new Error("Don't pass the @ in the scope, we'll handle adding passing that!");
|
|
@@ -74,6 +52,7 @@ export class SchemaVaultsTailwindConfigFactory {
|
|
|
74
52
|
this.fileExtensionsToIncludeInTailwindClassNamesSearch = Array.isArray(opts?.fileExtensions)
|
|
75
53
|
? opts.fileExtensions
|
|
76
54
|
: SchemaVaultsTailwindConfigFactory.defaultFileExtensionsToSearch;
|
|
55
|
+
this.project_root = opts?.project_root ?? process.cwd();
|
|
77
56
|
if (this.debug) {
|
|
78
57
|
console.log(`[SchemaVaultsTailwindConfigFactory] Initialized '@${this.scope}' config factory`);
|
|
79
58
|
}
|
|
@@ -118,39 +97,81 @@ export class SchemaVaultsTailwindConfigFactory {
|
|
|
118
97
|
};
|
|
119
98
|
return extend;
|
|
120
99
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// Get the path to the node_modules/ directory
|
|
128
|
-
get node_modules() {
|
|
129
|
-
const path = this.resolveNodeModulesDirectoryPath();
|
|
130
|
-
if (!this.isdir(path)) {
|
|
131
|
-
throw new Error("Expected result of node_modules getter to be the path to a directory!");
|
|
132
|
-
}
|
|
133
|
-
return path;
|
|
134
|
-
}
|
|
135
|
-
resolveSchemaVaultsPackagePath(pkg_blob_string) {
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @param org_scoped_package_identifier A string representing an organization-scoped package identifier. For example: @schemavaults/ui
|
|
103
|
+
* @returns The resolved path for the organization-scoped package. I.e. the path that contains the package.json file
|
|
104
|
+
*/
|
|
105
|
+
resolveOrganizationScopedPackagePath(org_scoped_package_identifier) {
|
|
136
106
|
const scope = this.scope;
|
|
137
|
-
if (!
|
|
107
|
+
if (!org_scoped_package_identifier.startsWith(`@${scope}/`)) {
|
|
138
108
|
throw new Error(`This method should only be called if content path starts with @${scope}/...`);
|
|
139
109
|
}
|
|
140
|
-
const pkg_blob_parts =
|
|
110
|
+
const pkg_blob_parts = org_scoped_package_identifier.split("/");
|
|
141
111
|
if (pkg_blob_parts.length < 2 ||
|
|
142
112
|
!pkg_blob_parts[1] ||
|
|
143
113
|
typeof pkg_blob_parts[1] !== "string") {
|
|
144
114
|
throw new TypeError("Failed to resolve package name from package blob string");
|
|
145
115
|
}
|
|
146
116
|
const package_name = pkg_blob_parts[1];
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
117
|
+
const org_package_identifier = `@${scope}/${package_name}`;
|
|
118
|
+
let package_path;
|
|
119
|
+
try {
|
|
120
|
+
package_path = resolve.sync(org_package_identifier, {
|
|
121
|
+
basedir: this.project_root, // resolve from where tailwind.config.ts is running from
|
|
122
|
+
});
|
|
123
|
+
if (typeof package_path !== "string") {
|
|
124
|
+
throw new TypeError("Failed to resolve package path; result not a string!");
|
|
125
|
+
}
|
|
126
|
+
// Helper function that checks if this is the root directory of a package
|
|
127
|
+
const isAPackageRootDir = (current_path) => {
|
|
128
|
+
if (!this.isdir(current_path)) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
if (this.join(current_path, "package.json")) {
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}; // end fn isAPackageRootDir()
|
|
140
|
+
// Package path should have been loaded-- but 'resolve' likely returns path to:
|
|
141
|
+
// node_modules/@{org}/{pkg}/dist/index.js, not the package root directory
|
|
142
|
+
// We need to traverse upwards until we find the directory containing package.json
|
|
143
|
+
// Or, if we hit node_modules/ and haven't found package.json, throw an error
|
|
144
|
+
let current_path = package_path;
|
|
145
|
+
while (current_path !== "/" && current_path !== "") {
|
|
146
|
+
if (isAPackageRootDir(current_path)) {
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
if (!existsSync(current_path)) {
|
|
150
|
+
throw new Error(`Error resolving package root directory for '@${scope}/${package_name}'`);
|
|
151
|
+
}
|
|
152
|
+
if (this.isdir(current_path)) {
|
|
153
|
+
current_path = normalize(this.join(current_path, ".."));
|
|
154
|
+
}
|
|
155
|
+
else if (this.isfile(current_path)) {
|
|
156
|
+
current_path = dirname(current_path);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
throw new Error("Expected current path to be either a directory or a file!");
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
package_path = current_path;
|
|
163
|
+
if (!this.isdir(package_path)) {
|
|
164
|
+
throw new Error(`Expected there to be a directory for package '@${scope}/${package_name}' at path '${package_path}'!`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
catch (e) {
|
|
168
|
+
console.error(`Failed to resolve path to package '@${scope}/${package_name}':`, e);
|
|
151
169
|
throw new Error(`Failed to resolve path to package: '@${scope}/${package_name}'!`);
|
|
152
170
|
}
|
|
153
|
-
|
|
171
|
+
if (this.debug) {
|
|
172
|
+
console.log(`[SchemaVaultsTailwindConfigFactory] Resolved root directory of package '@${scope}/${package_name}' to directory: `, package_path);
|
|
173
|
+
}
|
|
174
|
+
return package_path;
|
|
154
175
|
}
|
|
155
176
|
static possibleBuildDirectories = [
|
|
156
177
|
"dist",
|
|
@@ -175,7 +196,7 @@ export class SchemaVaultsTailwindConfigFactory {
|
|
|
175
196
|
content_input.forEach((content_path_input) => {
|
|
176
197
|
const content_length_at_start = content.length;
|
|
177
198
|
if (content_path_input.startsWith(`@${scope}/`)) {
|
|
178
|
-
const package_path = this.
|
|
199
|
+
const package_path = this.resolveOrganizationScopedPackagePath(content_path_input);
|
|
179
200
|
SchemaVaultsTailwindConfigFactory.possibleBuildDirectories.forEach((possible_build_dir) => {
|
|
180
201
|
const buildSubdirPath = this.join(package_path, possible_build_dir);
|
|
181
202
|
let hasBuildSubdirectory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TailwindConfigFactory.js","sourceRoot":"","sources":["../src/TailwindConfigFactory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,eAAe,MAAM,mBAAmB,CAAC,CAAC,wCAAwC;AACzF,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAEtB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"TailwindConfigFactory.js","sourceRoot":"","sources":["../src/TailwindConfigFactory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MA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AC;YACf,OAAO,CAAC,GAAG,CACT,qEAAqE,EACrE,MAAM,CACP,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;;AAGH,eAAe,iCAAiC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemavaults/theme",
|
|
3
3
|
"description": "TailwindCSS theme shared by different SchemaVaults applications",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.24.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": {
|
|
@@ -13,13 +13,15 @@
|
|
|
13
13
|
"react": "19.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"tailwindcss-animate": "1.0.7"
|
|
16
|
+
"tailwindcss-animate": "1.0.7",
|
|
17
|
+
"resolve": "1.22.11"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"@types/react": "19.0.0",
|
|
20
21
|
"@types/react-dom": "19.0.0",
|
|
22
|
+
"@types/resolve": "1.20.6",
|
|
21
23
|
"tsc-alias": "1.8.16",
|
|
22
|
-
"bun-types": "1.
|
|
24
|
+
"bun-types": "1.3.3",
|
|
23
25
|
"typescript": "5.9.3",
|
|
24
26
|
"ignore-loader": "0.1.2",
|
|
25
27
|
"tailwindcss": "3.4.17"
|
|
@@ -34,7 +36,8 @@
|
|
|
34
36
|
"build": "bun run build:js",
|
|
35
37
|
"postbuild": "bun run build:cleanup",
|
|
36
38
|
"clean": "rm -rf ./dist",
|
|
37
|
-
"test": "NODE_ENV=test bun test"
|
|
39
|
+
"test:unit": "NODE_ENV=test bun test",
|
|
40
|
+
"test": "bun run test:unit"
|
|
38
41
|
},
|
|
39
42
|
"exports": {
|
|
40
43
|
"./globals.css": {
|
|
@@ -81,5 +84,5 @@
|
|
|
81
84
|
"publishConfig": {
|
|
82
85
|
"access": "public"
|
|
83
86
|
},
|
|
84
|
-
"packageManager": "bun@1.
|
|
87
|
+
"packageManager": "bun@1.3.3"
|
|
85
88
|
}
|