dispersa 1.2.0 → 1.3.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 +1 -2
- package/dist/{builders.d.cts → builders-B7_pBy58.d.cts} +180 -6
- package/dist/{builders.d.ts → builders-BEoMaLal.d.ts} +180 -6
- package/dist/{types-8MLtztK3.d.ts → config-schemas-DnEBhIg0.d.cts} +1 -158
- package/dist/{types-BHBHRm0a.d.cts → config-schemas-DnEBhIg0.d.ts} +1 -158
- package/dist/dispersa-DF2ZkG2O.d.ts +567 -0
- package/dist/dispersa-DJeCN0cP.d.cts +567 -0
- package/dist/index.cjs +2117 -2098
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +2117 -2098
- package/dist/index.js.map +1 -1
- package/dist/{lint.cjs → lint/index.cjs} +2 -2
- package/dist/lint/index.cjs.map +1 -0
- package/dist/{lint.d.ts → lint/index.d.cts} +8 -7
- package/dist/{lint.d.cts → lint/index.d.ts} +8 -7
- package/dist/{lint.js → lint/index.js} +2 -2
- package/dist/lint/index.js.map +1 -0
- package/dist/{renderers.d.ts → output-tree-BRbfWSmG.d.ts} +3 -10
- package/dist/{renderers.d.cts → output-tree-Hmi77EMv.d.cts} +3 -10
- package/dist/{builders.cjs → outputs/builders.cjs} +30 -30
- package/dist/outputs/builders.cjs.map +1 -0
- package/dist/outputs/builders.d.cts +7 -0
- package/dist/outputs/builders.d.ts +7 -0
- package/dist/{builders.js → outputs/builders.js} +30 -30
- package/dist/outputs/builders.js.map +1 -0
- package/dist/outputs/index.cjs +3750 -0
- package/dist/outputs/index.cjs.map +1 -0
- package/dist/outputs/index.d.cts +73 -0
- package/dist/outputs/index.d.ts +73 -0
- package/dist/outputs/index.js +3730 -0
- package/dist/outputs/index.js.map +1 -0
- package/dist/{filters.cjs → processing/filters/index.cjs} +24 -18
- package/dist/processing/filters/index.cjs.map +1 -0
- package/dist/processing/filters/index.d.cts +36 -0
- package/dist/processing/filters/index.d.ts +36 -0
- package/dist/{filters.js → processing/filters/index.js} +24 -18
- package/dist/processing/filters/index.js.map +1 -0
- package/dist/{preprocessors.cjs → processing/preprocessors/index.cjs} +3 -3
- package/dist/processing/preprocessors/index.cjs.map +1 -0
- package/dist/processing/preprocessors/index.d.cts +29 -0
- package/dist/processing/preprocessors/index.d.ts +29 -0
- package/dist/{preprocessors.js → processing/preprocessors/index.js} +3 -3
- package/dist/processing/preprocessors/index.js.map +1 -0
- package/dist/{transforms.cjs → processing/transforms/index.cjs} +2 -7
- package/dist/processing/transforms/index.cjs.map +1 -0
- package/dist/{transforms.d.ts → processing/transforms/index.d.cts} +2 -2
- package/dist/{transforms.d.cts → processing/transforms/index.d.ts} +2 -2
- package/dist/{transforms.js → processing/transforms/index.js} +2 -7
- package/dist/processing/transforms/index.js.map +1 -0
- package/dist/{errors.cjs → shared/errors/index.cjs} +12 -2
- package/dist/shared/errors/index.cjs.map +1 -0
- package/dist/{errors-qT4sJgSA.d.ts → shared/errors/index.d.cts} +11 -2
- package/dist/{errors-qT4sJgSA.d.cts → shared/errors/index.d.ts} +11 -2
- package/dist/{errors.js → shared/errors/index.js} +12 -3
- package/dist/shared/errors/index.js.map +1 -0
- package/dist/types-B0cI70Bt.d.cts +453 -0
- package/dist/types-BxDEUCos.d.ts +453 -0
- package/dist/types-DUc4vLZH.d.cts +36 -0
- package/dist/types-s3UoDRKl.d.ts +36 -0
- package/package.json +26 -36
- package/dist/android-CRDfSB3_.d.cts +0 -126
- package/dist/android-DANJjjPO.d.ts +0 -126
- package/dist/builders.cjs.map +0 -1
- package/dist/builders.js.map +0 -1
- package/dist/dispersa-BC1kDF5u.d.ts +0 -118
- package/dist/dispersa-DL3J_Pmz.d.cts +0 -118
- package/dist/errors.cjs.map +0 -1
- package/dist/errors.d.cts +0 -1
- package/dist/errors.d.ts +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/filters.cjs.map +0 -1
- package/dist/filters.d.cts +0 -83
- package/dist/filters.d.ts +0 -83
- package/dist/filters.js.map +0 -1
- package/dist/index-Dajm5rvM.d.ts +0 -895
- package/dist/index-De6SjZYH.d.cts +0 -895
- package/dist/lint.cjs.map +0 -1
- package/dist/lint.js.map +0 -1
- package/dist/preprocessors.cjs.map +0 -1
- package/dist/preprocessors.d.cts +0 -17
- package/dist/preprocessors.d.ts +0 -17
- package/dist/preprocessors.js.map +0 -1
- package/dist/renderers.cjs +0 -28
- package/dist/renderers.cjs.map +0 -1
- package/dist/renderers.js +0 -24
- package/dist/renderers.js.map +0 -1
- package/dist/transforms.cjs.map +0 -1
- package/dist/transforms.js.map +0 -1
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { S as SelectorFunction, M as MediaQueryFunction } from './index-De6SjZYH.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license MIT
|
|
5
|
-
* Copyright (c) 2025-present Dispersa Contributors
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Options for Tailwind CSS v4 renderer
|
|
13
|
-
*
|
|
14
|
-
* Controls how tokens are converted to Tailwind v4 @theme CSS variables.
|
|
15
|
-
*
|
|
16
|
-
* @example Bundle with dark mode overrides
|
|
17
|
-
* ```typescript
|
|
18
|
-
* tailwind({
|
|
19
|
-
* name: 'tailwind',
|
|
20
|
-
* file: 'theme.css',
|
|
21
|
-
* preset: 'bundle',
|
|
22
|
-
* selector: (modifier, context, isBase) => {
|
|
23
|
-
* if (isBase) return ':root'
|
|
24
|
-
* return `[data-${modifier}="${context}"]`
|
|
25
|
-
* },
|
|
26
|
-
* })
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
type TailwindRendererOptions = {
|
|
30
|
-
preset?: 'bundle' | 'standalone';
|
|
31
|
-
includeImport?: boolean;
|
|
32
|
-
namespace?: string;
|
|
33
|
-
minify?: boolean;
|
|
34
|
-
selector?: string | SelectorFunction;
|
|
35
|
-
mediaQuery?: string | MediaQueryFunction;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @license MIT
|
|
40
|
-
* Copyright (c) 2025-present Dispersa Contributors
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Options for iOS/SwiftUI renderer
|
|
48
|
-
*/
|
|
49
|
-
type IosRendererOptions = {
|
|
50
|
-
preset?: 'standalone';
|
|
51
|
-
accessLevel?: 'public' | 'internal';
|
|
52
|
-
/**
|
|
53
|
-
* Output structure:
|
|
54
|
-
* - `'enum'` — nested enums inside a single root enum
|
|
55
|
-
* - `'grouped'` — namespace enum with separate extensions per token group
|
|
56
|
-
*/
|
|
57
|
-
structure?: 'enum' | 'grouped';
|
|
58
|
-
enumName?: string;
|
|
59
|
-
/** Namespace enum name used in grouped mode (default: 'DesignTokens') */
|
|
60
|
-
extensionNamespace?: string;
|
|
61
|
-
colorSpace?: 'sRGB' | 'displayP3';
|
|
62
|
-
/**
|
|
63
|
-
* Target Swift language version.
|
|
64
|
-
* - `'5.9'` (default) — standard static let declarations
|
|
65
|
-
* - `'6.0'` — adds `nonisolated(unsafe)` to static properties for
|
|
66
|
-
* Swift 6 strict concurrency compliance
|
|
67
|
-
*/
|
|
68
|
-
swiftVersion?: '5.9' | '6.0';
|
|
69
|
-
/** Number of spaces per indentation level (default 4) */
|
|
70
|
-
indent?: number;
|
|
71
|
-
/** Add @frozen annotation to enums and structs for ABI stability (default false) */
|
|
72
|
-
frozen?: boolean;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @license MIT
|
|
77
|
-
* Copyright (c) 2025-present Dispersa Contributors
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the MIT license found in the
|
|
80
|
-
* LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Options for Android/Jetpack Compose renderer
|
|
85
|
-
*
|
|
86
|
-
* Note: `packageName` is marked optional for type compatibility with the Renderer
|
|
87
|
-
* generic, but is validated as required at runtime in the renderer's format() method.
|
|
88
|
-
*
|
|
89
|
-
* @experimental This type is experimental. Properties and behavior may change.
|
|
90
|
-
*/
|
|
91
|
-
type AndroidRendererOptions = {
|
|
92
|
-
preset?: 'standalone' | 'bundle';
|
|
93
|
-
packageName?: string;
|
|
94
|
-
objectName?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Color output format for Kotlin Color initializers.
|
|
97
|
-
* - `'argb_hex'` (default) — `Color(0xAARRGGBB)` hex literal
|
|
98
|
-
* - `'argb_float'` — `Color(r, g, b, a)` float components
|
|
99
|
-
*
|
|
100
|
-
* Legacy aliases: `'argb8'` maps to `'argb_hex'`, `'argb_floats'` maps to `'argb_float'`.
|
|
101
|
-
*/
|
|
102
|
-
colorFormat?: 'argb_hex' | 'argb_float' | 'argb8' | 'argb_floats';
|
|
103
|
-
/**
|
|
104
|
-
* Color space for generated Color values.
|
|
105
|
-
* - `'sRGB'` (default) — standard sRGB color space
|
|
106
|
-
* - `'displayP3'` — Display P3 wide gamut via `ColorSpaces.DisplayP3`
|
|
107
|
-
*/
|
|
108
|
-
colorSpace?: 'sRGB' | 'displayP3';
|
|
109
|
-
/**
|
|
110
|
-
* Structure mode for token organization.
|
|
111
|
-
* - `'nested'` (default) — mirror token path hierarchy as nested objects
|
|
112
|
-
* - `'flat'` — group tokens by $type into semantic sub-objects (Colors, Spacing, etc.)
|
|
113
|
-
*/
|
|
114
|
-
structure?: 'nested' | 'flat';
|
|
115
|
-
/**
|
|
116
|
-
* Kotlin visibility modifier for the generated object and its members.
|
|
117
|
-
* - `undefined` (default) — no explicit modifier, which means `public` in Kotlin
|
|
118
|
-
* - `'public'` — explicit `public object` / `public val`
|
|
119
|
-
* - `'internal'` — `internal object` / `internal val` (useful for KMP / multi-module)
|
|
120
|
-
*/
|
|
121
|
-
visibility?: 'public' | 'internal';
|
|
122
|
-
/** Number of spaces per indentation level (default 4) */
|
|
123
|
-
indent?: number;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export type { AndroidRendererOptions as A, IosRendererOptions as I, TailwindRendererOptions as T };
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { S as SelectorFunction, M as MediaQueryFunction } from './index-Dajm5rvM.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license MIT
|
|
5
|
-
* Copyright (c) 2025-present Dispersa Contributors
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Options for Tailwind CSS v4 renderer
|
|
13
|
-
*
|
|
14
|
-
* Controls how tokens are converted to Tailwind v4 @theme CSS variables.
|
|
15
|
-
*
|
|
16
|
-
* @example Bundle with dark mode overrides
|
|
17
|
-
* ```typescript
|
|
18
|
-
* tailwind({
|
|
19
|
-
* name: 'tailwind',
|
|
20
|
-
* file: 'theme.css',
|
|
21
|
-
* preset: 'bundle',
|
|
22
|
-
* selector: (modifier, context, isBase) => {
|
|
23
|
-
* if (isBase) return ':root'
|
|
24
|
-
* return `[data-${modifier}="${context}"]`
|
|
25
|
-
* },
|
|
26
|
-
* })
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
type TailwindRendererOptions = {
|
|
30
|
-
preset?: 'bundle' | 'standalone';
|
|
31
|
-
includeImport?: boolean;
|
|
32
|
-
namespace?: string;
|
|
33
|
-
minify?: boolean;
|
|
34
|
-
selector?: string | SelectorFunction;
|
|
35
|
-
mediaQuery?: string | MediaQueryFunction;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @license MIT
|
|
40
|
-
* Copyright (c) 2025-present Dispersa Contributors
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Options for iOS/SwiftUI renderer
|
|
48
|
-
*/
|
|
49
|
-
type IosRendererOptions = {
|
|
50
|
-
preset?: 'standalone';
|
|
51
|
-
accessLevel?: 'public' | 'internal';
|
|
52
|
-
/**
|
|
53
|
-
* Output structure:
|
|
54
|
-
* - `'enum'` — nested enums inside a single root enum
|
|
55
|
-
* - `'grouped'` — namespace enum with separate extensions per token group
|
|
56
|
-
*/
|
|
57
|
-
structure?: 'enum' | 'grouped';
|
|
58
|
-
enumName?: string;
|
|
59
|
-
/** Namespace enum name used in grouped mode (default: 'DesignTokens') */
|
|
60
|
-
extensionNamespace?: string;
|
|
61
|
-
colorSpace?: 'sRGB' | 'displayP3';
|
|
62
|
-
/**
|
|
63
|
-
* Target Swift language version.
|
|
64
|
-
* - `'5.9'` (default) — standard static let declarations
|
|
65
|
-
* - `'6.0'` — adds `nonisolated(unsafe)` to static properties for
|
|
66
|
-
* Swift 6 strict concurrency compliance
|
|
67
|
-
*/
|
|
68
|
-
swiftVersion?: '5.9' | '6.0';
|
|
69
|
-
/** Number of spaces per indentation level (default 4) */
|
|
70
|
-
indent?: number;
|
|
71
|
-
/** Add @frozen annotation to enums and structs for ABI stability (default false) */
|
|
72
|
-
frozen?: boolean;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @license MIT
|
|
77
|
-
* Copyright (c) 2025-present Dispersa Contributors
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the MIT license found in the
|
|
80
|
-
* LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Options for Android/Jetpack Compose renderer
|
|
85
|
-
*
|
|
86
|
-
* Note: `packageName` is marked optional for type compatibility with the Renderer
|
|
87
|
-
* generic, but is validated as required at runtime in the renderer's format() method.
|
|
88
|
-
*
|
|
89
|
-
* @experimental This type is experimental. Properties and behavior may change.
|
|
90
|
-
*/
|
|
91
|
-
type AndroidRendererOptions = {
|
|
92
|
-
preset?: 'standalone' | 'bundle';
|
|
93
|
-
packageName?: string;
|
|
94
|
-
objectName?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Color output format for Kotlin Color initializers.
|
|
97
|
-
* - `'argb_hex'` (default) — `Color(0xAARRGGBB)` hex literal
|
|
98
|
-
* - `'argb_float'` — `Color(r, g, b, a)` float components
|
|
99
|
-
*
|
|
100
|
-
* Legacy aliases: `'argb8'` maps to `'argb_hex'`, `'argb_floats'` maps to `'argb_float'`.
|
|
101
|
-
*/
|
|
102
|
-
colorFormat?: 'argb_hex' | 'argb_float' | 'argb8' | 'argb_floats';
|
|
103
|
-
/**
|
|
104
|
-
* Color space for generated Color values.
|
|
105
|
-
* - `'sRGB'` (default) — standard sRGB color space
|
|
106
|
-
* - `'displayP3'` — Display P3 wide gamut via `ColorSpaces.DisplayP3`
|
|
107
|
-
*/
|
|
108
|
-
colorSpace?: 'sRGB' | 'displayP3';
|
|
109
|
-
/**
|
|
110
|
-
* Structure mode for token organization.
|
|
111
|
-
* - `'nested'` (default) — mirror token path hierarchy as nested objects
|
|
112
|
-
* - `'flat'` — group tokens by $type into semantic sub-objects (Colors, Spacing, etc.)
|
|
113
|
-
*/
|
|
114
|
-
structure?: 'nested' | 'flat';
|
|
115
|
-
/**
|
|
116
|
-
* Kotlin visibility modifier for the generated object and its members.
|
|
117
|
-
* - `undefined` (default) — no explicit modifier, which means `public` in Kotlin
|
|
118
|
-
* - `'public'` — explicit `public object` / `public val`
|
|
119
|
-
* - `'internal'` — `internal object` / `internal val` (useful for KMP / multi-module)
|
|
120
|
-
*/
|
|
121
|
-
visibility?: 'public' | 'internal';
|
|
122
|
-
/** Number of spaces per indentation level (default 4) */
|
|
123
|
-
indent?: number;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export type { AndroidRendererOptions as A, IosRendererOptions as I, TailwindRendererOptions as T };
|