@animus-ui/vite-plugin 0.1.0-next.9 → 0.1.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/package.json CHANGED
@@ -1,31 +1,50 @@
1
1
  {
2
2
  "name": "@animus-ui/vite-plugin",
3
- "version": "0.1.0-next.9",
3
+ "version": "0.1.0",
4
4
  "description": "Animus static CSS extraction Vite plugin",
5
- "author": "codecaaron <airrobb@gmail.com>",
5
+ "keywords": [
6
+ "animus",
7
+ "css",
8
+ "css-in-js",
9
+ "styled",
10
+ "vite",
11
+ "vite-plugin",
12
+ "zero-runtime"
13
+ ],
14
+ "homepage": "https://github.com/codecaaron/animus/tree/main/packages/vite-plugin#readme",
6
15
  "license": "MIT",
7
- "main": "./dist/index.mjs",
8
- "module": "./dist/index.mjs",
9
- "types": "./dist/index.d.ts",
16
+ "author": "codecaaron <airrobb@gmail.com>",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/codecaaron/animus",
20
+ "directory": "packages/vite-plugin"
21
+ },
10
22
  "files": [
11
23
  "dist"
12
24
  ],
25
+ "main": "./dist/index.mjs",
26
+ "module": "./dist/index.mjs",
27
+ "types": "./dist/index.d.ts",
13
28
  "publishConfig": {
14
29
  "access": "public"
15
30
  },
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/codecaaron/animus"
19
- },
20
31
  "scripts": {
21
- "build": "tsdown && tsc -p tsconfig.build.json",
22
- "compile": "tsc --noEmit"
32
+ "build": "bun run build:ts",
33
+ "build:ts": "tsdown && tsgo -p tsconfig.build.json",
34
+ "compile": "tsgo --noEmit"
35
+ },
36
+ "dependencies": {
37
+ "@animus-ui/extract": "0.1.0",
38
+ "browserslist": "^4.24.0",
39
+ "lightningcss": "^1.29.0"
23
40
  },
24
41
  "peerDependencies": {
42
+ "@mdx-js/mdx": "^3.0.0",
25
43
  "vite": ">=5.0.0"
26
44
  },
27
- "dependencies": {
28
- "@animus-ui/core": "0.1.0-next.9",
29
- "@animus-ui/extract": "0.1.0-next.9"
45
+ "peerDependenciesMeta": {
46
+ "@mdx-js/mdx": {
47
+ "optional": true
48
+ }
30
49
  }
31
50
  }
@@ -1,25 +0,0 @@
1
- /**
2
- * Serialize the prop config from @animus-ui/core for the Rust extraction pipeline.
3
- *
4
- * Maps JS transform functions to string identifiers that the Rust crate
5
- * can dispatch to its native implementations.
6
- */
7
- interface PropConfig {
8
- property: string;
9
- properties?: string[];
10
- scale?: string | Record<string, any> | any[];
11
- transform?: Function;
12
- }
13
- /**
14
- * Serialize all prop groups from the animus config into a JSON map.
15
- * Prop config entries with inline scales (object/array) are skipped
16
- * since the Rust crate only handles named theme scales.
17
- */
18
- export declare function serializeConfig(propRegistry: Record<string, PropConfig>): string;
19
- /**
20
- * Serialize the group registry from the Animus config.
21
- * Maps each group name to its array of constituent prop names.
22
- */
23
- export declare function serializeGroupRegistry(groupRegistry: Record<string, string[]>): string;
24
- export {};
25
- //# sourceMappingURL=config-serializer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-serializer.d.ts","sourceRoot":"","sources":["../src/config-serializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC;IAC7C,SAAS,CAAC,EAAE,QAAQ,CAAC;CACtB;AASD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GACvC,MAAM,CA8BR;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACtC,MAAM,CAER"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Standalone script executed via `bun run` to resolve global styles.
3
- *
4
- * Usage: bun run resolve-global-styles.ts <system-path> <theme-json> <output-file>
5
- *
6
- * Imports the system module, extracts globalStyles from .serialize(),
7
- * resolves prop shorthand (bg → background-color, etc.) using the full
8
- * prop config + theme + transforms, and writes the resolved CSS to output.
9
- *
10
- * @keyframes blocks are serialized as raw CSS (no prop resolution needed).
11
- */
12
- export {};
13
- //# sourceMappingURL=resolve-global-styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-global-styles.d.ts","sourceRoot":"","sources":["../src/resolve-global-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Standalone script executed via `bun run` to apply transform placeholders.
3
- *
4
- * Usage: bun run resolve-transforms.ts <input-file> <output-file> [config-path]
5
- *
6
- * Reads CSS from input file containing __TRANSFORM__name__rawValue__ placeholders,
7
- * loads transform functions from @animus-ui/core (and optionally a custom config),
8
- * applies them, and writes the resolved CSS to the output file.
9
- *
10
- * When config-path is provided, transforms from that module are loaded IN ADDITION
11
- * to core transforms. Custom transforms take precedence on name collisions.
12
- */
13
- export {};
14
- //# sourceMappingURL=resolve-transforms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-transforms.d.ts","sourceRoot":"","sources":["../src/resolve-transforms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
@@ -1,32 +0,0 @@
1
- /**
2
- * Evaluate a theme object that has already been loaded/imported.
3
- *
4
- * This is the pure logic: takes a theme object, flattens scales, builds variable CSS.
5
- * Use this when you have already loaded the module yourself.
6
- */
7
- export declare function evaluateThemeObject(theme: Record<string, any>): {
8
- scalesJson: string;
9
- variableMapJson: string;
10
- variableCss: string;
11
- };
12
- /**
13
- * Evaluate a theme module and flatten all scales to a JSON map.
14
- * Format: { "scale_name.key": "css_value" }
15
- *
16
- * Uses Vite's ssrLoadModule to evaluate the theme at build start,
17
- * so all computed scales (shadows, gradients that depend on colors)
18
- * are resolved to their final values.
19
- */
20
- export declare function evaluateTheme(ssrLoadModule: (url: string) => Promise<Record<string, any>>, themePath: string): Promise<{
21
- scalesJson: string;
22
- variableMapJson: string;
23
- variableCss: string;
24
- }>;
25
- /**
26
- * Resolve global style objects to a CSS string.
27
- *
28
- * Each key in `globalStyles` is a CSS selector, each value is a style object
29
- * using the same prop shorthand as component `.styles()` blocks.
30
- */
31
- export declare function resolveGlobalStyles(globalStyles: Record<string, Record<string, any>>, propConfigJson: string, flat: Record<string, string>, transforms: Record<string, (v: any) => any>): string;
32
- //# sourceMappingURL=theme-evaluator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-evaluator.d.ts","sourceRoot":"","sources":["../src/theme-evaluator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB,CAuCA;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAC5D,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IACT,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAWD;AAuKD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EACjD,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC,GAC1C,MAAM,CAiCR"}