@stacksjs/ts-css 0.1.0 → 0.1.2

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,2 +1,2 @@
1
- import type { CssNode } from '../../parse';
1
+ import type { CssNode } from '../../parse/index';
2
2
  export declare function removeComments(ast: CssNode, options?: { exclamation?: boolean | 'first-exclamation' }): void;
@@ -1,2 +1,2 @@
1
- import type { CssNode } from '../../parse';
1
+ import type { CssNode } from '../../parse/index';
2
2
  export declare function dedupeDeclarations(ast: CssNode): void;
@@ -0,0 +1,5 @@
1
+ export declare function shortenHex(hex: string): string;
2
+ export declare function colorNameToHex(name: string): string | null;
3
+ export declare function hexToShortName(hex: string): string | null;
4
+ export declare function rgbToHex(r: number, g: number, b: number): string;
5
+ export declare function compressRgbToHex(value: string): string;
@@ -1,4 +1,4 @@
1
- import type { CssNode } from '../../parse';
1
+ import type { CssNode } from '../../parse/index';
2
2
  export declare function compressTree(ast: CssNode, options?: CompressOptions): void;
3
3
  export declare interface CompressOptions {
4
4
  floatPrecision?: number | null
@@ -0,0 +1,9 @@
1
+ export declare function compressNumber(value: string): string;
2
+ export declare function compressDimension(value: string, unit: string): { value: string, unit: string };
3
+ export declare function compressPercentage(value: string): string;
4
+ /**
5
+ * Round a numeric string to `precision` decimal places. Returns the input
6
+ * unchanged when it's not a finite number — calling sites should still
7
+ * follow up with `compressNumber` to strip leading zeros etc.
8
+ */
9
+ export declare function roundNumberString(value: string, precision: number): string;
@@ -7,7 +7,7 @@ export declare const syntax: { specificity: typeof _specificity };
7
7
  * CSS minifier — the API surface that csso users (notably SVGO's
8
8
  * `minifyStyles` and `inlineStyles`) depend on.
9
9
  */
10
- export { dedupeDeclarations, removeComments } from './clean';
11
- export { compressTree } from './compress';
10
+ export { dedupeDeclarations, removeComments } from './clean/index';
11
+ export { compressTree } from './compress/index';
12
12
  export { minify, minifyBlock } from './minify';
13
13
  export { specificity, specificityToString } from './specificity';