@nxds/core 0.11.0 → 0.13.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 +9 -0
- package/dist/runtime/catalogue.cjs +711 -641
- package/dist/runtime/catalogue.cjs.map +1 -1
- package/dist/runtime/catalogue.d.cts +22 -8
- package/dist/runtime/catalogue.d.ts +22 -8
- package/dist/runtime/catalogue.js +711 -641
- package/dist/runtime/catalogue.js.map +1 -1
- package/dist/runtime/index.cjs +803 -430
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.d.cts +192 -3
- package/dist/runtime/index.d.ts +192 -3
- package/dist/runtime/index.js +792 -430
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/{surface-ladder-B950TU4_.d.ts → surface-ladder-Cqo5DfZW.d.ts} +9 -2
- package/dist/runtime/{surface-ladder-C8HTwT7z.d.cts → surface-ladder-DZQFqJvm.d.cts} +9 -2
- package/package.json +1 -1
|
@@ -49,6 +49,8 @@ type NxdsElevation = 'flat' | 'quiet' | 'soft' | 'standard' | 'strong';
|
|
|
49
49
|
type NxdsStroke = 'fine' | 'normal' | 'strong';
|
|
50
50
|
interface NxdsAppearancePrefs {
|
|
51
51
|
uiFont: string;
|
|
52
|
+
/** The heading `font-family` stack. `null` follows `uiFont`. */
|
|
53
|
+
headingFont: string | null;
|
|
52
54
|
codeFont: string;
|
|
53
55
|
uiFontSize: number;
|
|
54
56
|
codeFontSize: number;
|
|
@@ -158,10 +160,15 @@ declare const STROKE_OPTIONS: readonly [{
|
|
|
158
160
|
readonly label: "Strong";
|
|
159
161
|
}];
|
|
160
162
|
declare const DEFAULT_NXDS_APPEARANCE: NxdsAppearanceState;
|
|
163
|
+
/** The font sizes, in px, the appearance prefs take. */
|
|
164
|
+
declare const FONT_SIZE_PX_MIN = 8;
|
|
165
|
+
declare const FONT_SIZE_PX_MAX = 32;
|
|
161
166
|
declare function normalizeAppearanceModeIds(raw: unknown): unknown;
|
|
162
167
|
declare function sanitizeNxdsAppearancePrefs(raw: unknown): NxdsAppearancePrefs;
|
|
163
168
|
declare function sanitizeNxdsAppearance(rawInput: unknown): NxdsAppearanceState;
|
|
164
|
-
|
|
169
|
+
/** The appearance fields runtime colours derive from. */
|
|
170
|
+
type NxdsColorAppearance = Pick<NxdsAppearanceState, 'brandColor' | 'surfaceTone' | 'lightContrast' | 'darkContrast'>;
|
|
171
|
+
declare function createNxdsThemeContract(state: NxdsColorAppearance): ThemeDerivationInput;
|
|
165
172
|
declare function appearancePrefsToCss(prefs: NxdsAppearancePrefs): string;
|
|
166
173
|
|
|
167
174
|
/**
|
|
@@ -254,4 +261,4 @@ declare const DARK_SURFACE_LADDER: {
|
|
|
254
261
|
};
|
|
255
262
|
};
|
|
256
263
|
|
|
257
|
-
export { BASE_TONE_OPTIONS as B, CORNER_OPTIONS as C, DARK_SURFACE_LADDER as D, ELEVATION_OPTIONS as E, LIGHT_SURFACE_LADDER as L, type
|
|
264
|
+
export { themeToCss as A, BASE_TONE_OPTIONS as B, CORNER_OPTIONS as C, DARK_SURFACE_LADDER as D, ELEVATION_OPTIONS as E, FONT_SIZE_PX_MAX as F, LIGHT_SURFACE_LADDER as L, type NxdsColorAppearance as N, SURFACE_TOKENS as S, type ThemeDerivationInput as T, type NxdsAppearancePrefs as a, type NxdsPresetField as b, type ShadeAnchor as c, type NxdsAppearanceState as d, type DerivedTheme as e, BASE_TONE_SEEDS as f, DEFAULT_BRAND_COLOR as g, DEFAULT_NXDS_APPEARANCE as h, DENSITY_OPTIONS as i, FONT_SIZE_PX_MIN as j, type NxdsAppearanceMode as k, type NxdsCorners as l, type NxdsDensity as m, type NxdsElevation as n, type NxdsStroke as o, type NxdsThemeContract as p, STROKE_OPTIONS as q, type SurfaceToken as r, type ThemeSeeds as s, type TokenMap as t, appearancePrefsToCss as u, createNxdsThemeContract as v, deriveTheme as w, normalizeAppearanceModeIds as x, sanitizeNxdsAppearance as y, sanitizeNxdsAppearancePrefs as z };
|
|
@@ -49,6 +49,8 @@ type NxdsElevation = 'flat' | 'quiet' | 'soft' | 'standard' | 'strong';
|
|
|
49
49
|
type NxdsStroke = 'fine' | 'normal' | 'strong';
|
|
50
50
|
interface NxdsAppearancePrefs {
|
|
51
51
|
uiFont: string;
|
|
52
|
+
/** The heading `font-family` stack. `null` follows `uiFont`. */
|
|
53
|
+
headingFont: string | null;
|
|
52
54
|
codeFont: string;
|
|
53
55
|
uiFontSize: number;
|
|
54
56
|
codeFontSize: number;
|
|
@@ -158,10 +160,15 @@ declare const STROKE_OPTIONS: readonly [{
|
|
|
158
160
|
readonly label: "Strong";
|
|
159
161
|
}];
|
|
160
162
|
declare const DEFAULT_NXDS_APPEARANCE: NxdsAppearanceState;
|
|
163
|
+
/** The font sizes, in px, the appearance prefs take. */
|
|
164
|
+
declare const FONT_SIZE_PX_MIN = 8;
|
|
165
|
+
declare const FONT_SIZE_PX_MAX = 32;
|
|
161
166
|
declare function normalizeAppearanceModeIds(raw: unknown): unknown;
|
|
162
167
|
declare function sanitizeNxdsAppearancePrefs(raw: unknown): NxdsAppearancePrefs;
|
|
163
168
|
declare function sanitizeNxdsAppearance(rawInput: unknown): NxdsAppearanceState;
|
|
164
|
-
|
|
169
|
+
/** The appearance fields runtime colours derive from. */
|
|
170
|
+
type NxdsColorAppearance = Pick<NxdsAppearanceState, 'brandColor' | 'surfaceTone' | 'lightContrast' | 'darkContrast'>;
|
|
171
|
+
declare function createNxdsThemeContract(state: NxdsColorAppearance): ThemeDerivationInput;
|
|
165
172
|
declare function appearancePrefsToCss(prefs: NxdsAppearancePrefs): string;
|
|
166
173
|
|
|
167
174
|
/**
|
|
@@ -254,4 +261,4 @@ declare const DARK_SURFACE_LADDER: {
|
|
|
254
261
|
};
|
|
255
262
|
};
|
|
256
263
|
|
|
257
|
-
export { BASE_TONE_OPTIONS as B, CORNER_OPTIONS as C, DARK_SURFACE_LADDER as D, ELEVATION_OPTIONS as E, LIGHT_SURFACE_LADDER as L, type
|
|
264
|
+
export { themeToCss as A, BASE_TONE_OPTIONS as B, CORNER_OPTIONS as C, DARK_SURFACE_LADDER as D, ELEVATION_OPTIONS as E, FONT_SIZE_PX_MAX as F, LIGHT_SURFACE_LADDER as L, type NxdsColorAppearance as N, SURFACE_TOKENS as S, type ThemeDerivationInput as T, type NxdsAppearancePrefs as a, type NxdsPresetField as b, type ShadeAnchor as c, type NxdsAppearanceState as d, type DerivedTheme as e, BASE_TONE_SEEDS as f, DEFAULT_BRAND_COLOR as g, DEFAULT_NXDS_APPEARANCE as h, DENSITY_OPTIONS as i, FONT_SIZE_PX_MIN as j, type NxdsAppearanceMode as k, type NxdsCorners as l, type NxdsDensity as m, type NxdsElevation as n, type NxdsStroke as o, type NxdsThemeContract as p, STROKE_OPTIONS as q, type SurfaceToken as r, type ThemeSeeds as s, type TokenMap as t, appearancePrefsToCss as u, createNxdsThemeContract as v, deriveTheme as w, normalizeAppearanceModeIds as x, sanitizeNxdsAppearance as y, sanitizeNxdsAppearancePrefs as z };
|