@arbor-css/preset 0.0.11 → 0.0.13
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/dist/config.d.ts
CHANGED
|
@@ -5,12 +5,11 @@ import { CompiledShadows } from '@arbor-css/shadows';
|
|
|
5
5
|
import { CompiledSpacing } from '@arbor-css/spacing';
|
|
6
6
|
import { TokenSchema } from '@arbor-css/tokens';
|
|
7
7
|
import { CompiledTypography } from '@arbor-css/typography';
|
|
8
|
-
export interface ArborPreset<TModeShape extends ModeSchemaLevel, TCompiledColors extends CompiledColors<any, any> = CompiledColors<any, any>, TTypography extends CompiledTypography<any> = CompiledTypography<any>, TSpacing extends CompiledSpacing<any> = CompiledSpacing<any>, TShadows extends CompiledShadows<any> = CompiledShadows<any>, TOtherTokens extends TokenSchema = TokenSchema> {
|
|
8
|
+
export interface ArborPreset<TModeShape extends ModeSchemaLevel, TModes extends Record<string, PartialModeInstance<TModeShape>>, TCompiledColors extends CompiledColors<any, any> = CompiledColors<any, any>, TTypography extends CompiledTypography<any> = CompiledTypography<any>, TSpacing extends CompiledSpacing<any> = CompiledSpacing<any>, TShadows extends CompiledShadows<any> = CompiledShadows<any>, TOtherTokens extends TokenSchema = TokenSchema> {
|
|
9
9
|
primitives: Primitives<TCompiledColors, TTypography, TSpacing, TShadows, TOtherTokens>;
|
|
10
10
|
modes: {
|
|
11
11
|
base: ModeInstance<TModeShape>;
|
|
12
|
-
|
|
13
|
-
};
|
|
12
|
+
} & TModes;
|
|
14
13
|
}
|
|
15
|
-
export declare function definePreset<TModeShape extends ModeSchemaLevel, TCompiledColors extends CompiledColors<any, any>, TTypography extends CompiledTypography<any>, TSpacing extends CompiledSpacing<any>, TShadows extends CompiledShadows<any>, TOtherTokens extends TokenSchema = TokenSchema>(config: ArborPreset<TModeShape, TCompiledColors, TTypography, TSpacing, TShadows, TOtherTokens>): ArborPreset<TModeShape, TCompiledColors, TTypography, TSpacing, TShadows, TOtherTokens>;
|
|
14
|
+
export declare function definePreset<TModeShape extends ModeSchemaLevel, TModes extends Record<string, PartialModeInstance<TModeShape>>, TCompiledColors extends CompiledColors<any, any>, TTypography extends CompiledTypography<any>, TSpacing extends CompiledSpacing<any>, TShadows extends CompiledShadows<any>, TOtherTokens extends TokenSchema = TokenSchema>(config: ArborPreset<TModeShape, TModes, TCompiledColors, TTypography, TSpacing, TShadows, TOtherTokens>): ArborPreset<TModeShape, TModes, TCompiledColors, TTypography, TSpacing, TShadows, TOtherTokens>;
|
|
16
15
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACN,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,WAAW,CAC3B,UAAU,SAAS,eAAe,EAClC,eAAe,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAC3E,WAAW,SAAS,kBAAkB,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,EACrE,QAAQ,SAAS,eAAe,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,EAC5D,QAAQ,SAAS,eAAe,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,EAC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,KAAK,EAAE;QACN,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;KAC/B,GAAG,MAAM,CAAC;CACX;AAED,wBAAgB,YAAY,CAC3B,UAAU,SAAS,eAAe,EAClC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,EAC9D,eAAe,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAChD,WAAW,SAAS,kBAAkB,CAAC,GAAG,CAAC,EAC3C,QAAQ,SAAS,eAAe,CAAC,GAAG,CAAC,EACrC,QAAQ,SAAS,eAAe,CAAC,GAAG,CAAC,EACrC,YAAY,SAAS,WAAW,GAAG,WAAW,EAE9C,MAAM,EAAE,WAAW,CAClB,UAAU,EACV,MAAM,EACN,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,YAAY,CACZ,GACC,WAAW,CACb,UAAU,EACV,MAAM,EACN,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,YAAY,CACZ,CAEA"}
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,YAAY,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,YAAY,CAS3B,MAQC;IAUD,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColorRangeConfig, CompiledColors, SchemeDefinition } from '@arbor-css/colors';
|
|
2
2
|
import { GlobalConfig } from '@arbor-css/globals';
|
|
3
|
-
import { DeepPartial, ModeValues } from '@arbor-css/modes';
|
|
3
|
+
import { DeepPartial, ModeValues, PartialModeInstance } from '@arbor-css/modes';
|
|
4
4
|
import { ShadowConfig } from '@arbor-css/shadows';
|
|
5
5
|
import { SpacingConfig } from '@arbor-css/spacing';
|
|
6
6
|
import { TypographyConfig } from '@arbor-css/typography';
|
|
@@ -20,7 +20,10 @@ export interface CreateArborPresetConfig<TRanges extends Record<string, ColorRan
|
|
|
20
20
|
shadows?: Omit<ShadowConfig, 'globals'>;
|
|
21
21
|
baseMode?: Partial<ModeValues<(typeof arborModeSchema)['definition']>>;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
24
|
-
|
|
23
|
+
export type ArborPresetInstance<TRanges extends Record<string, ColorRangeConfig<any>>, TSchemes extends Record<string, SchemeDefinition>, TModes extends Record<string, PartialModeInstance<ArborModeSchema['definition']>> = Record<string, PartialModeInstance<ArborModeSchema['definition']>>> = ArborPreset<ArborModeSchema['definition'], TModes, CompiledColors<TRanges, TSchemes>> & {
|
|
24
|
+
withMode: <TName extends string>(name: TName, mode: DeepPartial<ModeValues<ArborModeSchema['definition']>>) => ArborPreset<ArborModeSchema['definition'], TModes & {
|
|
25
|
+
[K in TName]: PartialModeInstance<ArborModeSchema['definition']>;
|
|
26
|
+
}, CompiledColors<TRanges, TSchemes>>;
|
|
25
27
|
};
|
|
28
|
+
export declare function createArborPreset<TRanges extends Record<string, ColorRangeConfig<any>>, TSchemes extends Record<string, SchemeDefinition> = Record<string, never>>(config: CreateArborPresetConfig<TRanges, TSchemes>): ArborPresetInstance<TRanges, TSchemes>;
|
|
26
29
|
//# sourceMappingURL=createArborPreset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createArborPreset.d.ts","sourceRoot":"","sources":["../src/createArborPreset.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAEhB,cAAc,EACd,gBAAgB,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAiB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"createArborPreset.d.ts","sourceRoot":"","sources":["../src/createArborPreset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ot":"","sources":["../src/createArborPreset.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAgB,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAgB,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAiB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAoB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAEN,eAAe,EACf,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"createArborPreset.js","sourceRoot":"","sources":["../src/createArborPreset.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAgB,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAgB,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAiB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAoB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAEN,eAAe,EACf,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AA6C1B,MAAM,UAAU,iBAAiB,CAIhC,MAAkD;IAElD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAEpD,MAAM,MAAM,GAAG,aAAa,CAAC;QAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;QAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO;QAC9B,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,iBAAiB,CAAC;QACpC,GAAG,MAAM,CAAC,UAAU;QACpB,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,cAAc,CAAC;QAC9B,GAAG,MAAM,CAAC,OAAO;QACjB,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,cAAc,CAAC;QAC9B,GAAG,MAAM,CAAC,OAAO;QACjB,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,gBAAgB,CAAC;QACnC,MAAM;QACN,UAAU;QACV,OAAO;QACP,OAAO;QACP,OAAO;QACP,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa;QAC1C,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU;KACpC,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG;QACtB,GAAG,qBAAqB,CAAC;YACxB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAgB;YACzC,UAAU;SACV,CAAC;QACF,GAAG,MAAM,CAAC,QAAQ;KAClB,CAAC;IAEF,MAAM,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5D,MAAM,KAAK,GAAQ;QAClB,IAAI,EAAE,QAAQ;KACd,CAAC;IAEF,OAAO;QACN,KAAK;QACL,UAAU;QACV,QAAQ,CAAC,IAAI,EAAE,IAAI;YAClB,KAAK,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACxD,OAAO,IAAW,CAAC;QACpB,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbor-css/preset",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"typescript": "^6.0.3"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@arbor-css/
|
|
34
|
-
"@arbor-css/modes": "0.0.
|
|
35
|
-
"@arbor-css/
|
|
36
|
-
"@arbor-css/primitives": "0.0.
|
|
37
|
-
"@arbor-css/
|
|
38
|
-
"@arbor-css/
|
|
39
|
-
"@arbor-css/
|
|
40
|
-
"@arbor-css/typography": "0.0.
|
|
33
|
+
"@arbor-css/globals": "0.0.13",
|
|
34
|
+
"@arbor-css/modes": "0.0.13",
|
|
35
|
+
"@arbor-css/shadows": "0.0.13",
|
|
36
|
+
"@arbor-css/primitives": "0.0.13",
|
|
37
|
+
"@arbor-css/colors": "0.0.13",
|
|
38
|
+
"@arbor-css/tokens": "0.0.13",
|
|
39
|
+
"@arbor-css/spacing": "0.0.13",
|
|
40
|
+
"@arbor-css/typography": "0.0.13"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsc",
|