@litlab/audx 0.0.1 → 0.5.5
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 +96 -53
- package/dist/bin.js +1212 -0
- package/dist/cc-DgCkkqq8.js +13 -0
- package/dist/cc-he3fHS3P.js +12 -0
- package/dist/index.d.ts +723 -3
- package/dist/index.js +1534 -126
- package/dist/react.d.ts +583 -0
- package/dist/react.js +1556 -0
- package/package.json +64 -39
- package/schemas/pack.schema.json +4 -0
- package/schemas/patch.schema.json +857 -0
- package/dist/codegen/theme-codegen.d.ts +0 -12
- package/dist/codegen/theme-codegen.d.ts.map +0 -1
- package/dist/codegen/theme-codegen.js +0 -153
- package/dist/codegen/theme-codegen.js.map +0 -1
- package/dist/commands/add.d.ts +0 -2
- package/dist/commands/add.d.ts.map +0 -1
- package/dist/commands/add.js +0 -120
- package/dist/commands/add.js.map +0 -1
- package/dist/commands/diff.d.ts +0 -2
- package/dist/commands/diff.d.ts.map +0 -1
- package/dist/commands/diff.js +0 -103
- package/dist/commands/diff.js.map +0 -1
- package/dist/commands/generate.d.ts +0 -12
- package/dist/commands/generate.d.ts.map +0 -1
- package/dist/commands/generate.js +0 -96
- package/dist/commands/generate.js.map +0 -1
- package/dist/commands/init.d.ts +0 -2
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -79
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.d.ts +0 -14
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js +0 -93
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/remove.d.ts +0 -2
- package/dist/commands/remove.d.ts.map +0 -1
- package/dist/commands/remove.js +0 -71
- package/dist/commands/remove.js.map +0 -1
- package/dist/commands/theme.d.ts +0 -31
- package/dist/commands/theme.d.ts.map +0 -1
- package/dist/commands/theme.js +0 -142
- package/dist/commands/theme.js.map +0 -1
- package/dist/commands/update.d.ts +0 -2
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -123
- package/dist/commands/update.js.map +0 -1
- package/dist/core/alias-resolver.d.ts +0 -24
- package/dist/core/alias-resolver.d.ts.map +0 -1
- package/dist/core/alias-resolver.js +0 -87
- package/dist/core/alias-resolver.js.map +0 -1
- package/dist/core/config.d.ts +0 -21
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/config.js +0 -43
- package/dist/core/config.js.map +0 -1
- package/dist/core/file-writer.d.ts +0 -14
- package/dist/core/file-writer.d.ts.map +0 -1
- package/dist/core/file-writer.js +0 -90
- package/dist/core/file-writer.js.map +0 -1
- package/dist/core/package-manager.d.ts +0 -3
- package/dist/core/package-manager.d.ts.map +0 -1
- package/dist/core/package-manager.js +0 -17
- package/dist/core/package-manager.js.map +0 -1
- package/dist/core/registry.d.ts +0 -18
- package/dist/core/registry.d.ts.map +0 -1
- package/dist/core/registry.js +0 -69
- package/dist/core/registry.js.map +0 -1
- package/dist/core/theme-manager.d.ts +0 -35
- package/dist/core/theme-manager.d.ts.map +0 -1
- package/dist/core/theme-manager.js +0 -94
- package/dist/core/theme-manager.js.map +0 -1
- package/dist/core/utils.d.ts +0 -22
- package/dist/core/utils.d.ts.map +0 -1
- package/dist/core/utils.js +0 -44
- package/dist/core/utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types.d.ts +0 -116
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -43
- package/dist/types.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alias-resolver.js","sourceRoot":"","sources":["../../src/core/alias-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGpD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,IAAI,GAAW,CAAC;IAChB,I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AAO,cAAc,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,UAAkB;IACxC,OAAO,UAAU,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC;AAC1D,CAAC"}
|
package/dist/core/config.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type AudxConfig } from "../types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Check whether `audx.config.json` exists in the given project root.
|
|
4
|
-
*/
|
|
5
|
-
export declare function exists(projectRoot: string): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Validate an unknown value against the AudxConfig Zod schema.
|
|
8
|
-
* Returns the parsed config on success; throws a ZodError on failure.
|
|
9
|
-
*/
|
|
10
|
-
export declare function validate(raw: unknown): AudxConfig;
|
|
11
|
-
/**
|
|
12
|
-
* Read and validate `audx.config.json` from the given project root.
|
|
13
|
-
* Throws if the file doesn't exist, contains invalid JSON, or fails validation.
|
|
14
|
-
*/
|
|
15
|
-
export declare function read(projectRoot: string): AudxConfig;
|
|
16
|
-
/**
|
|
17
|
-
* Serialize and write an AudxConfig to `audx.config.json` in the given project root.
|
|
18
|
-
* Uses 2-space indentation for readability.
|
|
19
|
-
*/
|
|
20
|
-
export declare function write(projectRoot: string, config: AudxConfig): void;
|
|
21
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,aAAa,CAAC;AAWhE;;GAEG;AACH,wBAAgB,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,CAEjD;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAKpD;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAInE"}
|
package/dist/core/config.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { audxConfigSchema } from "../types.js";
|
|
4
|
-
const CONFIG_FILE_NAME = "audx.config.json";
|
|
5
|
-
/**
|
|
6
|
-
* Resolve the full path to the config file given a project root.
|
|
7
|
-
*/
|
|
8
|
-
function configPath(projectRoot) {
|
|
9
|
-
return join(projectRoot, CONFIG_FILE_NAME);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Check whether `audx.config.json` exists in the given project root.
|
|
13
|
-
*/
|
|
14
|
-
export function exists(projectRoot) {
|
|
15
|
-
return existsSync(configPath(projectRoot));
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Validate an unknown value against the AudxConfig Zod schema.
|
|
19
|
-
* Returns the parsed config on success; throws a ZodError on failure.
|
|
20
|
-
*/
|
|
21
|
-
export function validate(raw) {
|
|
22
|
-
return audxConfigSchema.parse(raw);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Read and validate `audx.config.json` from the given project root.
|
|
26
|
-
* Throws if the file doesn't exist, contains invalid JSON, or fails validation.
|
|
27
|
-
*/
|
|
28
|
-
export function read(projectRoot) {
|
|
29
|
-
const filePath = configPath(projectRoot);
|
|
30
|
-
const content = readFileSync(filePath, "utf-8");
|
|
31
|
-
const parsed = JSON.parse(content);
|
|
32
|
-
return validate(parsed);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Serialize and write an AudxConfig to `audx.config.json` in the given project root.
|
|
36
|
-
* Uses 2-space indentation for readability.
|
|
37
|
-
*/
|
|
38
|
-
export function write(projectRoot, config) {
|
|
39
|
-
const filePath = configPath(projectRoot);
|
|
40
|
-
const json = JSON.stringify(config, null, 2);
|
|
41
|
-
writeFileSync(filePath, json + "\n", "utf-8");
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=config.js.map
|
package/dist/core/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAmB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAE5C;;GAEG;AACH,SAAS,UAAU,CAAC,WAAmB;IACrC,OAAO,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,WAAmB;IACxC,OAAO,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAY;IACnC,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,WAAmB;IACtC,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChD,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,WAAmB,EAAE,MAAkB;IAC3D,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7C,aAAa,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { AliasMap, AudxConfig, RegistryFile } from "../types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Determine the target directory for a registry file based on its type and
|
|
4
|
-
* path, write the file with rewritten imports, and return the written path.
|
|
5
|
-
*
|
|
6
|
-
* Returns `null` when the file already exists (idempotent skip for deps).
|
|
7
|
-
*/
|
|
8
|
-
export declare function writeRegistryFile(file: RegistryFile, targetDir: string, aliasMap: AliasMap, config: AudxConfig): string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Rewrite `@/lib/` and `@/hooks/` import patterns in registry file content
|
|
11
|
-
* so they resolve correctly in the user's project.
|
|
12
|
-
*/
|
|
13
|
-
export declare function rewriteImports(content: string, sourceFilePath: string, aliasMap: AliasMap, config: AudxConfig): string;
|
|
14
|
-
//# sourceMappingURL=file-writer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-writer.d.ts","sourceRoot":"","sources":["../../src/core/file-writer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGtE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,UAAU,GACjB,MAAM,GAAG,IAAI,CAcf;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,UAAU,GACjB,MAAM,CA4BR"}
|
package/dist/core/file-writer.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { basename, dirname, join } from "node:path";
|
|
3
|
-
import { resolveImport } from "./alias-resolver.js";
|
|
4
|
-
/**
|
|
5
|
-
* Determine the target directory for a registry file based on its type and
|
|
6
|
-
* path, write the file with rewritten imports, and return the written path.
|
|
7
|
-
*
|
|
8
|
-
* Returns `null` when the file already exists (idempotent skip for deps).
|
|
9
|
-
*/
|
|
10
|
-
export function writeRegistryFile(file, targetDir, aliasMap, config) {
|
|
11
|
-
const targetPath = resolveTargetPath(file, targetDir, config);
|
|
12
|
-
// Skip dependency files that already exist (idempotent)
|
|
13
|
-
if (isDependencyFile(file) && existsSync(targetPath)) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const rewritten = rewriteImports(file.content, targetPath, aliasMap, config);
|
|
17
|
-
mkdirSync(dirname(targetPath), { recursive: true });
|
|
18
|
-
writeFileSync(targetPath, rewritten, "utf-8");
|
|
19
|
-
return targetPath;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Rewrite `@/lib/` and `@/hooks/` import patterns in registry file content
|
|
23
|
-
* so they resolve correctly in the user's project.
|
|
24
|
-
*/
|
|
25
|
-
export function rewriteImports(content, sourceFilePath, aliasMap, config) {
|
|
26
|
-
// Match import/export statements with @/lib/ or @/hooks/ paths
|
|
27
|
-
const importPattern = /(from\s+["'])@\/(lib|hooks)\/([^"']+)(["'])/g;
|
|
28
|
-
return content.replace(importPattern, (_match, prefix, category, moduleName, suffix) => {
|
|
29
|
-
const targetModulePath = resolveModuleTargetPath(category, moduleName, config);
|
|
30
|
-
const resolved = resolveImport(aliasMap, sourceFilePath, targetModulePath);
|
|
31
|
-
return `${prefix}${resolved}${suffix}`;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Resolve the filesystem target path for a registry file based on its type
|
|
36
|
-
* and the original registry path.
|
|
37
|
-
*/
|
|
38
|
-
function resolveTargetPath(file, targetDir, config) {
|
|
39
|
-
const fileName = basename(file.path);
|
|
40
|
-
if (file.type === "registry:hook") {
|
|
41
|
-
// Hooks go to a `hooks` directory sibling to libDir
|
|
42
|
-
const hooksDir = join(dirname(config.libDir), "hooks");
|
|
43
|
-
return join(hooksDir, fileName);
|
|
44
|
-
}
|
|
45
|
-
if (file.type === "registry:lib") {
|
|
46
|
-
// Distinguish sound files from actual lib files by path pattern
|
|
47
|
-
if (isSoundFilePath(file.path)) {
|
|
48
|
-
return join(targetDir, fileName);
|
|
49
|
-
}
|
|
50
|
-
// Lib dependency files go to libDir
|
|
51
|
-
return join(config.libDir, fileName);
|
|
52
|
-
}
|
|
53
|
-
// Fallback: write to targetDir (soundDir)
|
|
54
|
-
return join(targetDir, fileName);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Check whether a registry file path points to a sound module
|
|
58
|
-
* (e.g. `registry/audx/sounds/click-001/click-001.ts`).
|
|
59
|
-
*/
|
|
60
|
-
function isSoundFilePath(registryPath) {
|
|
61
|
-
const normalised = registryPath.replace(/\\/g, "/");
|
|
62
|
-
return normalised.includes("/sounds/");
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Check whether a file is a shared dependency (lib or hook) rather than
|
|
66
|
-
* the primary sound module.
|
|
67
|
-
*/
|
|
68
|
-
function isDependencyFile(file) {
|
|
69
|
-
if (file.type === "registry:hook") {
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
if (file.type === "registry:lib" && !isSoundFilePath(file.path)) {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Compute the project-relative target path for a module referenced by an
|
|
79
|
-
* `@/lib/...` or `@/hooks/...` import, so the alias resolver can produce
|
|
80
|
-
* the correct import specifier.
|
|
81
|
-
*/
|
|
82
|
-
function resolveModuleTargetPath(category, moduleName, config) {
|
|
83
|
-
if (category === "hooks") {
|
|
84
|
-
const hooksDir = join(dirname(config.libDir), "hooks");
|
|
85
|
-
return join(hooksDir, `${moduleName}.ts`);
|
|
86
|
-
}
|
|
87
|
-
// category === "lib"
|
|
88
|
-
return join(config.libDir, `${moduleName}.ts`);
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=file-writer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-writer.js","sourceRoot":"","sources":["../../src/core/file-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAkB,EAClB,SAAiB,EACjB,QAAkB,EAClB,MAAkB;IAElB,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAE9D,wDAAwD;IACxD,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACrD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAE7E,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,aAAa,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAE9C,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAe,EACf,cAAsB,EACtB,QAAkB,EAClB,MAAkB;IA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AU,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,IAAkB;IAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,SAAS,uBAAuB,CAC9B,QAAgB,EAChB,UAAkB,EAClB,MAAkB;IAElB,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC,QAAQ,EAAE,GAAG,UAAU,KAAK,CAAC,CAAC;IAC5C,CAAC;IACD,qBAAqB;IACrB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,KAAK,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../../src/core/package-manager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AASlD,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAOxE"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
const LOCK_FILE_PRECEDENCE = [
|
|
4
|
-
{ file: "bun.lock", manager: "bun" },
|
|
5
|
-
{ file: "pnpm-lock.yaml", manager: "pnpm" },
|
|
6
|
-
{ file: "yarn.lock", manager: "yarn" },
|
|
7
|
-
{ file: "package-lock.json", manager: "npm" },
|
|
8
|
-
];
|
|
9
|
-
export function detectPackageManager(projectRoot) {
|
|
10
|
-
for (const { file, manager } of LOCK_FILE_PRECEDENCE) {
|
|
11
|
-
if (existsSync(join(projectRoot, file))) {
|
|
12
|
-
return manager;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return "npm";
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=package-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.js","sourceRoot":"","sources":["../../src/core/package-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,MAAM,oBAAoB,GAAqD;IAC7E,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE;IACpC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE;IAC3C,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE;IACtC,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,KAAK,EAAE;CAC9C,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,WAAmB;IACtD,KAAK,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,oBAAoB,EAAE,CAAC;QACrD,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;YACxC,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/core/registry.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { RegistryItem, RegistryCatalog, GenerateSoundParams } from "../types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Fetch a single registry item by name.
|
|
4
|
-
* GET {registryUrl}/r/{name}.json
|
|
5
|
-
*/
|
|
6
|
-
export declare function fetchItem(registryUrl: string, name: string): Promise<RegistryItem>;
|
|
7
|
-
/**
|
|
8
|
-
* Fetch the full registry catalog.
|
|
9
|
-
* GET {registryUrl}/r/registry.json
|
|
10
|
-
*/
|
|
11
|
-
export declare function fetchCatalog(registryUrl: string): Promise<RegistryCatalog>;
|
|
12
|
-
/**
|
|
13
|
-
* Generate a sound via the API.
|
|
14
|
-
* POST {registryUrl}/api/generate-sound
|
|
15
|
-
* Returns raw audio bytes as a Buffer.
|
|
16
|
-
*/
|
|
17
|
-
export declare function generateSound(registryUrl: string, params: GenerateSoundParams): Promise<Buffer>;
|
|
18
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/core/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,YAAY,CAAC,CAiBvB;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,eAAe,CAAC,CAmB1B;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,MAAM,CAAC,CA6BjB"}
|
package/dist/core/registry.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fetch a single registry item by name.
|
|
3
|
-
* GET {registryUrl}/r/{name}.json
|
|
4
|
-
*/
|
|
5
|
-
export async function fetchItem(registryUrl, name) {
|
|
6
|
-
const url = `${registryUrl}/r/${name}.json`;
|
|
7
|
-
let response;
|
|
8
|
-
try {
|
|
9
|
-
response = await fetch(url);
|
|
10
|
-
}
|
|
11
|
-
catch {
|
|
12
|
-
throw new Error(`Could not reach the audx registry at ${registryUrl}. Check your network connection.`);
|
|
13
|
-
}
|
|
14
|
-
if (!response.ok) {
|
|
15
|
-
throw new Error(`Failed to fetch '${name}': HTTP ${response.status}`);
|
|
16
|
-
}
|
|
17
|
-
return (await response.json());
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Fetch the full registry catalog.
|
|
21
|
-
* GET {registryUrl}/r/registry.json
|
|
22
|
-
*/
|
|
23
|
-
export async function fetchCatalog(registryUrl) {
|
|
24
|
-
const url = `${registryUrl}/r/registry.json`;
|
|
25
|
-
let response;
|
|
26
|
-
try {
|
|
27
|
-
response = await fetch(url);
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
throw new Error(`Could not reach the audx registry at ${registryUrl}. Check your network connection.`);
|
|
31
|
-
}
|
|
32
|
-
if (!response.ok) {
|
|
33
|
-
throw new Error(`Failed to fetch registry catalog: HTTP ${response.status}`);
|
|
34
|
-
}
|
|
35
|
-
return (await response.json());
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Generate a sound via the API.
|
|
39
|
-
* POST {registryUrl}/api/generate-sound
|
|
40
|
-
* Returns raw audio bytes as a Buffer.
|
|
41
|
-
*/
|
|
42
|
-
export async function generateSound(registryUrl, params) {
|
|
43
|
-
const url = `${registryUrl}/api/generate-sound`;
|
|
44
|
-
let response;
|
|
45
|
-
try {
|
|
46
|
-
response = await fetch(url, {
|
|
47
|
-
method: "POST",
|
|
48
|
-
headers: { "Content-Type": "application/json" },
|
|
49
|
-
body: JSON.stringify(params),
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
throw new Error(`Could not reach the audx registry at ${registryUrl}. Check your network connection.`);
|
|
54
|
-
}
|
|
55
|
-
if (!response.ok) {
|
|
56
|
-
let errorMessage;
|
|
57
|
-
try {
|
|
58
|
-
const body = (await response.json());
|
|
59
|
-
errorMessage = body.error ?? `HTTP ${response.status}`;
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
errorMessage = `HTTP ${response.status}`;
|
|
63
|
-
}
|
|
64
|
-
throw new Error(errorMessage);
|
|
65
|
-
}
|
|
66
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
67
|
-
return Buffer.from(arrayBuffer);
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/core/registry.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,WAAmB,EACnB,IAAY;IAEZ,MAAM,GAAG,GAAG,GAAG,WAAW,MAAM,IAAI,OAAO,CAAC;IAC5C,IAAI,QAAkB,CAAC;IAEvB,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,wCAAwC,WAAW,kCAAkC,CACtF,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,WAAW,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAiB,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,WAAmB;IAEnB,MAAM,GAAG,GAAG,GAAG,WAAW,kBAAkB,CAAC;IAC7C,IAAI,QAAkB,CAAC;IAEvB,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CA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CAAC,WAAW,EAAE,CAAC;IACjD,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { type ThemeConfig, type SemanticSoundName } from "../types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Check whether `audx.themes.json` exists in the given project root.
|
|
4
|
-
*/
|
|
5
|
-
export declare function exists(projectRoot: string): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Read and validate `audx.themes.json` from the given project root.
|
|
8
|
-
* Throws if the file doesn't exist, contains invalid JSON, or fails validation.
|
|
9
|
-
*/
|
|
10
|
-
export declare function read(projectRoot: string): ThemeConfig;
|
|
11
|
-
/**
|
|
12
|
-
* Serialize and write a ThemeConfig to `audx.themes.json` in the given project root.
|
|
13
|
-
* Uses 2-space indentation for readability.
|
|
14
|
-
*/
|
|
15
|
-
export declare function write(projectRoot: string, config: ThemeConfig): void;
|
|
16
|
-
/**
|
|
17
|
-
* Return a new ThemeConfig with the active theme set to the given name.
|
|
18
|
-
*/
|
|
19
|
-
export declare function setActiveTheme(config: ThemeConfig, themeName: string): ThemeConfig;
|
|
20
|
-
/**
|
|
21
|
-
* Return a new ThemeConfig with the given semantic name mapped to the sound path
|
|
22
|
-
* in the active theme.
|
|
23
|
-
*/
|
|
24
|
-
export declare function mapSound(config: ThemeConfig, semanticName: SemanticSoundName, soundPath: string): ThemeConfig;
|
|
25
|
-
/**
|
|
26
|
-
* Return a new ThemeConfig with a new theme entry where all 16 semantic names
|
|
27
|
-
* are mapped to null.
|
|
28
|
-
*/
|
|
29
|
-
export declare function createTheme(config: ThemeConfig, themeName: string): ThemeConfig;
|
|
30
|
-
/**
|
|
31
|
-
* Return a new ThemeConfig with all references to the given sound name set to null
|
|
32
|
-
* across all themes.
|
|
33
|
-
*/
|
|
34
|
-
export declare function removeSoundMappings(config: ThemeConfig, soundName: string): ThemeConfig;
|
|
35
|
-
//# sourceMappingURL=theme-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme-manager.d.ts","sourceRoot":"","sources":["../../src/core/theme-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EAGvB,MAAM,aAAa,CAAC;AAWrB;;GAEG;AACH,wBAAgB,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAKrD;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAIpE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,GAChB,WAAW,CAEb;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,MAAM,GAChB,WAAW,CAab;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,GAChB,WAAW,CAYb;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,GAChB,WAAW,CAiBb"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { themeConfigSchema, SEMANTIC_SOUND_NAMES, } from "../types.js";
|
|
4
|
-
const THEME_FILE_NAME = "audx.themes.json";
|
|
5
|
-
/**
|
|
6
|
-
* Resolve the full path to the theme config file given a project root.
|
|
7
|
-
*/
|
|
8
|
-
function themePath(projectRoot) {
|
|
9
|
-
return join(projectRoot, THEME_FILE_NAME);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Check whether `audx.themes.json` exists in the given project root.
|
|
13
|
-
*/
|
|
14
|
-
export function exists(projectRoot) {
|
|
15
|
-
return existsSync(themePath(projectRoot));
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Read and validate `audx.themes.json` from the given project root.
|
|
19
|
-
* Throws if the file doesn't exist, contains invalid JSON, or fails validation.
|
|
20
|
-
*/
|
|
21
|
-
export function read(projectRoot) {
|
|
22
|
-
const filePath = themePath(projectRoot);
|
|
23
|
-
const content = readFileSync(filePath, "utf-8");
|
|
24
|
-
const parsed = JSON.parse(content);
|
|
25
|
-
return themeConfigSchema.parse(parsed);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Serialize and write a ThemeConfig to `audx.themes.json` in the given project root.
|
|
29
|
-
* Uses 2-space indentation for readability.
|
|
30
|
-
*/
|
|
31
|
-
export function write(projectRoot, config) {
|
|
32
|
-
const filePath = themePath(projectRoot);
|
|
33
|
-
const json = JSON.stringify(config, null, 2);
|
|
34
|
-
writeFileSync(filePath, json + "\n", "utf-8");
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Return a new ThemeConfig with the active theme set to the given name.
|
|
38
|
-
*/
|
|
39
|
-
export function setActiveTheme(config, themeName) {
|
|
40
|
-
return { ...config, activeTheme: themeName };
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Return a new ThemeConfig with the given semantic name mapped to the sound path
|
|
44
|
-
* in the active theme.
|
|
45
|
-
*/
|
|
46
|
-
export function mapSound(config, semanticName, soundPath) {
|
|
47
|
-
const activeTheme = config.activeTheme;
|
|
48
|
-
const currentMappings = config.themes[activeTheme];
|
|
49
|
-
return {
|
|
50
|
-
...config,
|
|
51
|
-
themes: {
|
|
52
|
-
...config.themes,
|
|
53
|
-
[activeTheme]: {
|
|
54
|
-
...currentMappings,
|
|
55
|
-
[semanticName]: soundPath,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Return a new ThemeConfig with a new theme entry where all 16 semantic names
|
|
62
|
-
* are mapped to null.
|
|
63
|
-
*/
|
|
64
|
-
export function createTheme(config, themeName) {
|
|
65
|
-
const emptyMappings = Object.fromEntries(SEMANTIC_SOUND_NAMES.map((name) => [name, null]));
|
|
66
|
-
return {
|
|
67
|
-
...config,
|
|
68
|
-
themes: {
|
|
69
|
-
...config.themes,
|
|
70
|
-
[themeName]: emptyMappings,
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Return a new ThemeConfig with all references to the given sound name set to null
|
|
76
|
-
* across all themes.
|
|
77
|
-
*/
|
|
78
|
-
export function removeSoundMappings(config, soundName) {
|
|
79
|
-
const updatedThemes = {};
|
|
80
|
-
for (const [themeName, mappings] of Object.entries(config.themes)) {
|
|
81
|
-
const updatedMappings = { ...mappings };
|
|
82
|
-
for (const [key, value] of Object.entries(updatedMappings)) {
|
|
83
|
-
if (value !== null && value.includes(soundName)) {
|
|
84
|
-
updatedMappings[key] = null;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
updatedThemes[themeName] = updatedMappings;
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
...config,
|
|
91
|
-
themes: updatedThemes,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=theme-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme-manager.js","sourceRoot":"","sources":["../../src/core/theme-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAGL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C;;GAEG;AACH,S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ions for the generate command.
|
|
3
|
-
*
|
|
4
|
-
* - deriveKebabName: derives a kebab-case file name from a prompt string
|
|
5
|
-
* - encodeAudioToDataUri / decodeDataUriToBuffer: base64 data URI round-trip
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Derive a kebab-case name from the first three words of a prompt.
|
|
9
|
-
* Strips special characters, lowercases, and joins with hyphens.
|
|
10
|
-
* Returns at most three segments.
|
|
11
|
-
*/
|
|
12
|
-
export declare function deriveKebabName(prompt: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Encode a raw audio buffer as a data URI with audio/mpeg MIME type.
|
|
15
|
-
*/
|
|
16
|
-
export declare function encodeAudioToDataUri(buffer: Buffer): string;
|
|
17
|
-
/**
|
|
18
|
-
* Decode a base64 data URI back to a Buffer.
|
|
19
|
-
* Expects format: `data:<mime>;base64,<data>`
|
|
20
|
-
*/
|
|
21
|
-
export declare function decodeDataUriToBuffer(dataUri: string): Buffer;
|
|
22
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/core/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/core/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CActD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAO7D"}
|
package/dist/core/utils.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for the generate command.
|
|
3
|
-
*
|
|
4
|
-
* - deriveKebabName: derives a kebab-case file name from a prompt string
|
|
5
|
-
* - encodeAudioToDataUri / decodeDataUriToBuffer: base64 data URI round-trip
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Derive a kebab-case name from the first three words of a prompt.
|
|
9
|
-
* Strips special characters, lowercases, and joins with hyphens.
|
|
10
|
-
* Returns at most three segments.
|
|
11
|
-
*/
|
|
12
|
-
export function deriveKebabName(prompt) {
|
|
13
|
-
const words = prompt
|
|
14
|
-
.replace(/[^a-zA-Z0-9\s]/g, "")
|
|
15
|
-
.trim()
|
|
16
|
-
.split(/\s+/)
|
|
17
|
-
.filter((w) => w.length > 0)
|
|
18
|
-
.slice(0, 3)
|
|
19
|
-
.map((w) => w.toLowerCase());
|
|
20
|
-
if (words.length === 0) {
|
|
21
|
-
return "generated-sound";
|
|
22
|
-
}
|
|
23
|
-
return words.join("-");
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Encode a raw audio buffer as a data URI with audio/mpeg MIME type.
|
|
27
|
-
*/
|
|
28
|
-
export function encodeAudioToDataUri(buffer) {
|
|
29
|
-
const base64 = buffer.toString("base64");
|
|
30
|
-
return `data:audio/mpeg;base64,${base64}`;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Decode a base64 data URI back to a Buffer.
|
|
34
|
-
* Expects format: `data:<mime>;base64,<data>`
|
|
35
|
-
*/
|
|
36
|
-
export function decodeDataUriToBuffer(dataUri) {
|
|
37
|
-
const commaIndex = dataUri.indexOf(",");
|
|
38
|
-
if (commaIndex === -1) {
|
|
39
|
-
throw new Error("Invalid data URI: missing comma separator");
|
|
40
|
-
}
|
|
41
|
-
const base64 = dataUri.slice(commaIndex + 1);
|
|
42
|
-
return Buffer.from(base64, "base64");
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/core/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/core/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,MAAM,KAAK,GAAG,MAAM;SACjB,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC;SAC9B,IAAI,EAAE;SACN,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;SAC3B,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAE/B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc;IACjD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,OAAO,0BAA0B,MAAM,EAAE,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,UAAU,KAAK,CAAC,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":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