@stacksjs/ts-css 0.3.1 → 0.3.3

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.
@@ -1,5 +1,5 @@
1
1
  import type { BunPlugin } from 'bun';
2
- import type { TsCssOptions } from './types';
2
+ import type { CssOptions } from './types';
3
3
  /**
4
4
  * Crosswind Bun plugin for processing HTML files
5
5
  *
@@ -14,9 +14,9 @@ import type { TsCssOptions } from './types';
14
14
  * })
15
15
  * ```
16
16
  */
17
- export declare function plugin(options?: TsCssPluginOptions): BunPlugin;
18
- export declare interface TsCssPluginOptions {
19
- config?: TsCssOptions
17
+ export declare function plugin(options?: CssPluginOptions): BunPlugin;
18
+ export declare interface CssPluginOptions {
19
+ config?: CssOptions
20
20
  includePreflight?: boolean
21
21
  }
22
22
  export default plugin;
@@ -1,4 +1,4 @@
1
- import type { TsCssConfig, ParsedClass, UtilityRuleResult } from './types';
1
+ import type { CssConfig, ParsedClass, UtilityRuleResult } from './types';
2
2
  // Resolve a size/spacing token shared by the sizing utilities: fractions,
3
3
  // keyword map, theme spacing, off-scale numbers (0.25rem steps), and
4
4
  // arbitrary values. Unknown words return undefined — they previously
@@ -53,4 +53,4 @@ export declare const borderSideWidthRule: UtilityRule;
53
53
  export declare const borderRadiusRule: UtilityRule;
54
54
  // Export all rules (order matters - more specific rules first)
55
55
  export declare const builtInRules: UtilityRule[];
56
- export type UtilityRule = (_parsed: ParsedClass, _config: TsCssConfig) => Record<string, string> | UtilityRuleResult | undefined;
56
+ export type UtilityRule = (_parsed: ParsedClass, _config: CssConfig) => Record<string, string> | UtilityRuleResult | undefined;
@@ -1,4 +1,4 @@
1
- import type { TsCssConfig } from './types';
1
+ import type { CssConfig } from './types';
2
2
  /**
3
3
  * Extract compile class markers from content
4
4
  */
@@ -24,7 +24,7 @@ export declare class CompileClassTransformer {
24
24
  constructor(options?: CompileClassOptions);
25
25
  processFile(content: string): { content: string, hasChanges: boolean };
26
26
  getCompiledClasses(): Map<string, { className: string, utilities: string[] }>;
27
- generateCSS(config: TsCssConfig, generator: any): string;
27
+ generateCSS(config: CssConfig, generator: any): string;
28
28
  reset(): void;
29
29
  getStats(): {
30
30
  totalGroups: number
@@ -25,7 +25,7 @@ export declare interface FontConfig {
25
25
  display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional'
26
26
  faces?: string[]
27
27
  }
28
- export declare interface TsCssConfig {
28
+ export declare interface CssConfig {
29
29
  content: string[]
30
30
  output: string
31
31
  minify: boolean
@@ -153,4 +153,4 @@ export type CustomRule = [RegExp, (_match: RegExpMatchArray) => Record<string, s
153
153
  declare type DeepPartial<T> = {
154
154
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]
155
155
  }
156
- export type TsCssOptions = DeepPartial<TsCssConfig>;
156
+ export type CssOptions = DeepPartial<CssConfig>;
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@stacksjs/ts-css",
3
3
  "type": "module",
4
- "version": "0.3.1",
4
+ "version": "0.3.3",
5
5
  "description": "Pure-TypeScript CSS toolkit and utility-first CSS engine for Bun/Node — parser, walker, generator, selector engine, minifier, and a Tailwind-compatible utility engine. Zero runtime deps.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
8
- "homepage": "https://github.com/cwcss/crosswind/tree/main/packages/toolkit#readme",
8
+ "homepage": "https://github.com/stacksjs/ts-css/tree/main/packages/toolkit#readme",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/cwcss/crosswind.git",
11
+ "url": "git+https://github.com/stacksjs/ts-css.git",
12
12
  "directory": "packages/toolkit"
13
13
  },
14
14
  "bugs": {
15
- "url": "https://github.com/cwcss/crosswind/issues"
15
+ "url": "https://github.com/stacksjs/ts-css/issues"
16
16
  },
17
17
  "keywords": [
18
18
  "typescript",
@@ -78,20 +78,20 @@
78
78
  ],
79
79
  "scripts": {
80
80
  "build": "bun --bun build.ts && bun run compile",
81
- "compile": "bun build ./bin/cli.ts --compile --minify --outfile bin/ts-css",
81
+ "compile": "bun build ./bin/cssx.ts --compile --minify --outfile bin/cssx",
82
82
  "compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
83
- "compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/ts-css-linux-x64 && bun build ./bin/cssx.ts --compile --minify --target=bun-linux-x64 --outfile bin/cssx-linux-x64",
84
- "compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/ts-css-linux-arm64 && bun build ./bin/cssx.ts --compile --minify --target=bun-linux-arm64 --outfile bin/cssx-linux-arm64",
85
- "compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/ts-css-windows-x64.exe && bun build ./bin/cssx.ts --compile --minify --target=bun-windows-x64 --outfile bin/cssx-windows-x64.exe",
86
- "compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/ts-css-darwin-x64 && bun build ./bin/cssx.ts --compile --minify --target=bun-darwin-x64 --outfile bin/cssx-darwin-x64",
87
- "compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/ts-css-darwin-arm64 && bun build ./bin/cssx.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/cssx-darwin-arm64",
83
+ "compile:linux-x64": "bun build ./bin/cssx.ts --compile --minify --target=bun-linux-x64 --outfile bin/cssx-linux-x64",
84
+ "compile:linux-arm64": "bun build ./bin/cssx.ts --compile --minify --target=bun-linux-arm64 --outfile bin/cssx-linux-arm64",
85
+ "compile:windows-x64": "bun build ./bin/cssx.ts --compile --minify --target=bun-windows-x64 --outfile bin/cssx-windows-x64.exe",
86
+ "compile:darwin-x64": "bun build ./bin/cssx.ts --compile --minify --target=bun-darwin-x64 --outfile bin/cssx-darwin-x64",
87
+ "compile:darwin-arm64": "bun build ./bin/cssx.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/cssx-darwin-arm64",
88
88
  "zip": "bun run zip:all",
89
89
  "zip:all": "bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:windows-x64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64",
90
- "zip:linux-x64": "zip -j bin/ts-css-linux-x64.zip bin/ts-css-linux-x64 && zip -j bin/cssx-linux-x64.zip bin/cssx-linux-x64",
91
- "zip:linux-arm64": "zip -j bin/ts-css-linux-arm64.zip bin/ts-css-linux-arm64 && zip -j bin/cssx-linux-arm64.zip bin/cssx-linux-arm64",
92
- "zip:windows-x64": "zip -j bin/ts-css-windows-x64.zip bin/ts-css-windows-x64.exe && zip -j bin/cssx-windows-x64.zip bin/cssx-windows-x64.exe",
93
- "zip:darwin-x64": "zip -j bin/ts-css-darwin-x64.zip bin/ts-css-darwin-x64 && zip -j bin/cssx-darwin-x64.zip bin/cssx-darwin-x64",
94
- "zip:darwin-arm64": "zip -j bin/ts-css-darwin-arm64.zip bin/ts-css-darwin-arm64 && zip -j bin/cssx-darwin-arm64.zip bin/cssx-darwin-arm64",
90
+ "zip:linux-x64": "zip -j bin/cssx-linux-x64.zip bin/cssx-linux-x64",
91
+ "zip:linux-arm64": "zip -j bin/cssx-linux-arm64.zip bin/cssx-linux-arm64",
92
+ "zip:windows-x64": "zip -j bin/cssx-windows-x64.zip bin/cssx-windows-x64.exe",
93
+ "zip:darwin-x64": "zip -j bin/cssx-darwin-x64.zip bin/cssx-darwin-x64",
94
+ "zip:darwin-arm64": "zip -j bin/cssx-darwin-arm64.zip bin/cssx-darwin-arm64",
95
95
  "fresh": "bunx rimraf node_modules/ bun.lock && bun i",
96
96
  "prepublishOnly": "bun --bun run build && bun run compile:all && bun run zip",
97
97
  "test": "bun test",