@newtonedev/configurator 0.1.3 → 0.1.5
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/bridge/toCSS.d.ts.map +1 -1
- package/dist/bridge/toThemeConfig.d.ts.map +1 -1
- package/dist/index.cjs +79 -178
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +79 -178
- package/dist/index.js.map +1 -1
- package/dist/panels/DesignPanel.d.ts.map +1 -1
- package/dist/panels/PreviewPanel.d.ts +1 -3
- package/dist/panels/PreviewPanel.d.ts.map +1 -1
- package/dist/state/actions.d.ts +11 -17
- package/dist/state/actions.d.ts.map +1 -1
- package/dist/state/defaults.d.ts.map +1 -1
- package/dist/state/reducer.d.ts.map +1 -1
- package/dist/types.d.ts +10 -16
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/Configurator.tsx +1 -1
- package/src/bridge/toCSS.ts +6 -8
- package/src/bridge/toThemeConfig.ts +20 -56
- package/src/index.ts +1 -1
- package/src/panels/DesignPanel.tsx +0 -31
- package/src/panels/PalettePanel.tsx +2 -2
- package/src/panels/PreviewPanel.tsx +9 -40
- package/src/state/actions.ts +6 -8
- package/src/state/defaults.ts +28 -13
- package/src/state/reducer.ts +15 -54
- package/src/types.ts +13 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewPanel.d.ts","sourceRoot":"","sources":["../../src/panels/PreviewPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PreviewPanel.d.ts","sourceRoot":"","sources":["../../src/panels/PreviewPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;CAC1C;AAmCD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,iBAAiB,qBAUrE"}
|
package/dist/state/actions.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DesaturationStrength, HueGradingStrength } from 'newtone';
|
|
2
|
-
import type { ColorMode
|
|
3
|
-
import type {
|
|
2
|
+
import type { ColorMode } from '@newtonedev/components';
|
|
3
|
+
import type { TextRole } from '@newtonedev/fonts';
|
|
4
|
+
import type { ConfiguratorState, FontSlotConfig, FontScope, SpacingPreset } from '../types';
|
|
4
5
|
export type ConfiguratorAction = {
|
|
5
6
|
readonly type: 'SET_PALETTE_HUE';
|
|
6
7
|
readonly index: number;
|
|
@@ -80,20 +81,16 @@ export type ConfiguratorAction = {
|
|
|
80
81
|
readonly type: 'SET_ROUNDNESS_INTENSITY';
|
|
81
82
|
readonly intensity: number;
|
|
82
83
|
} | {
|
|
83
|
-
readonly type: '
|
|
84
|
-
readonly
|
|
84
|
+
readonly type: 'SET_FONT';
|
|
85
|
+
readonly scope: FontScope;
|
|
86
|
+
readonly font: FontSlotConfig;
|
|
85
87
|
} | {
|
|
86
|
-
readonly type: '
|
|
87
|
-
readonly
|
|
88
|
+
readonly type: 'SET_TYPE_SCALE_OFFSET';
|
|
89
|
+
readonly offset: number;
|
|
88
90
|
} | {
|
|
89
|
-
readonly type: '
|
|
90
|
-
readonly
|
|
91
|
-
|
|
92
|
-
readonly type: 'SET_FONT_DISPLAY';
|
|
93
|
-
readonly font: FontConfig;
|
|
94
|
-
} | {
|
|
95
|
-
readonly type: 'SET_FONT_DEFAULT';
|
|
96
|
-
readonly font: FontConfig;
|
|
91
|
+
readonly type: 'SET_ROLE_WEIGHT';
|
|
92
|
+
readonly role: TextRole;
|
|
93
|
+
readonly weight: number;
|
|
97
94
|
} | {
|
|
98
95
|
readonly type: 'SET_ICON_VARIANT';
|
|
99
96
|
readonly variant: 'outlined' | 'rounded' | 'sharp';
|
|
@@ -106,9 +103,6 @@ export type ConfiguratorAction = {
|
|
|
106
103
|
} | {
|
|
107
104
|
readonly type: 'SET_PREVIEW_MODE';
|
|
108
105
|
readonly mode: ColorMode;
|
|
109
|
-
} | {
|
|
110
|
-
readonly type: 'SET_PREVIEW_THEME';
|
|
111
|
-
readonly theme: ThemeName;
|
|
112
106
|
} | {
|
|
113
107
|
readonly type: 'RESET';
|
|
114
108
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/state/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/state/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE5F,MAAM,MAAM,kBAAkB,GAE1B;IAAE,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAClF;IAAE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QA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","sources":["../../src/state/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/state/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,iBA+GxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/state/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAoBpD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,kBAAkB,GACzB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/state/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAoBpD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,kBAAkB,GACzB,iBAAiB,CAwRnB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { DesaturationStrength, HueGradingStrength } from 'newtone';
|
|
2
|
-
import type { ColorMode
|
|
2
|
+
import type { ColorMode } from '@newtonedev/components';
|
|
3
|
+
export type { FontConfig, FontScope } from '@newtonedev/fonts';
|
|
4
|
+
export type { FontSlot as FontSlotConfig } from '@newtonedev/fonts';
|
|
5
|
+
import type { FontSlot, TextRole } from '@newtonedev/fonts';
|
|
3
6
|
/** Spacing preset options */
|
|
4
7
|
export type SpacingPreset = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
8
|
/** Per-palette state in the configurator (human-readable, traditional hues) */
|
|
@@ -20,13 +23,6 @@ export interface HueGradingEndpointState {
|
|
|
20
23
|
readonly strength: HueGradingStrength;
|
|
21
24
|
readonly hue: number;
|
|
22
25
|
}
|
|
23
|
-
/** Font configuration for a single font slot */
|
|
24
|
-
export interface FontConfig {
|
|
25
|
-
readonly type: 'system' | 'google' | 'custom';
|
|
26
|
-
readonly family: string;
|
|
27
|
-
readonly customUrl?: string;
|
|
28
|
-
readonly fallback: string;
|
|
29
|
-
}
|
|
30
26
|
/** Complete configurator state */
|
|
31
27
|
export interface ConfiguratorState {
|
|
32
28
|
readonly palettes: readonly PaletteState[];
|
|
@@ -40,7 +36,6 @@ export interface ConfiguratorState {
|
|
|
40
36
|
};
|
|
41
37
|
readonly preview: {
|
|
42
38
|
readonly mode: ColorMode;
|
|
43
|
-
readonly theme: ThemeName;
|
|
44
39
|
};
|
|
45
40
|
readonly spacing?: {
|
|
46
41
|
readonly preset: SpacingPreset;
|
|
@@ -50,14 +45,13 @@ export interface ConfiguratorState {
|
|
|
50
45
|
};
|
|
51
46
|
readonly typography?: {
|
|
52
47
|
readonly fonts: {
|
|
53
|
-
readonly
|
|
54
|
-
readonly display:
|
|
55
|
-
readonly
|
|
56
|
-
|
|
57
|
-
readonly scale: {
|
|
58
|
-
readonly baseSize: number;
|
|
59
|
-
readonly ratio: number;
|
|
48
|
+
readonly main: FontSlot;
|
|
49
|
+
readonly display: FontSlot;
|
|
50
|
+
readonly mono: FontSlot;
|
|
51
|
+
readonly currency: FontSlot;
|
|
60
52
|
};
|
|
53
|
+
readonly typeScaleOffset?: number;
|
|
54
|
+
readonly roleWeights?: Partial<Record<TextRole, number>>;
|
|
61
55
|
};
|
|
62
56
|
readonly icons?: {
|
|
63
57
|
readonly variant: 'outlined' | 'rounded' | 'sharp';
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE/D,YAAY,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,6BAA6B;AAC7B,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7D,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IACpD,QAAQ,CAAC,qBAAqB,EAAE,OAAO,GAAG,MAAM,CAAC;IACjD,QAAQ,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EA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M,CAAC,CAAC,CAAC;KAC1D,CAAC;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE;QACf,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;QACnD,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;QACzD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newtonedev/configurator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Embeddable palette builder widget for Newtone color systems",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"react-native": ">=0.70.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@newtonedev/fonts": "file:../../../newtone-fonts",
|
|
41
42
|
"newtone": "^0.1.0",
|
|
42
43
|
"@newtonedev/components": "^0.1.0",
|
|
43
44
|
"react-native-web": "^0.19.10"
|
package/src/Configurator.tsx
CHANGED
|
@@ -70,7 +70,7 @@ export function Configurator({
|
|
|
70
70
|
</View>
|
|
71
71
|
{showPreview && (
|
|
72
72
|
<View style={styles.topRowPanel}>
|
|
73
|
-
<PreviewPanel state={state}
|
|
73
|
+
<PreviewPanel state={state} themeConfig={themeConfig} />
|
|
74
74
|
</View>
|
|
75
75
|
)}
|
|
76
76
|
</View>
|
package/src/bridge/toCSS.ts
CHANGED
|
@@ -17,9 +17,7 @@ export function toCSS(state: ConfiguratorState): string {
|
|
|
17
17
|
const tokens = computeTokens(
|
|
18
18
|
config.colorSystem,
|
|
19
19
|
mode,
|
|
20
|
-
config.themes.neutral,
|
|
21
20
|
1,
|
|
22
|
-
config.elevation.offsets,
|
|
23
21
|
config.spacing,
|
|
24
22
|
config.radius,
|
|
25
23
|
config.typography,
|
|
@@ -33,13 +31,13 @@ export function toCSS(state: ConfiguratorState): string {
|
|
|
33
31
|
css += ` --newtone-background-sunken: ${srgbToHex(tokens.backgroundSunken.srgb)};\n`;
|
|
34
32
|
css += ` --newtone-text-primary: ${srgbToHex(tokens.textPrimary.srgb)};\n`;
|
|
35
33
|
css += ` --newtone-text-secondary: ${srgbToHex(tokens.textSecondary.srgb)};\n`;
|
|
36
|
-
css += ` --newtone-
|
|
37
|
-
css += ` --newtone-
|
|
38
|
-
css += ` --newtone-
|
|
34
|
+
css += ` --newtone-accent: ${srgbToHex(tokens.accent.fill.srgb)};\n`;
|
|
35
|
+
css += ` --newtone-accent-hover: ${srgbToHex(tokens.accent.fillHover.srgb)};\n`;
|
|
36
|
+
css += ` --newtone-accent-active: ${srgbToHex(tokens.accent.fillActive.srgb)};\n`;
|
|
39
37
|
css += ` --newtone-border: ${srgbToHex(tokens.border.srgb)};\n`;
|
|
40
|
-
css += ` --newtone-success: ${srgbToHex(tokens.success.srgb)};\n`;
|
|
41
|
-
css += ` --newtone-warning: ${srgbToHex(tokens.warning.srgb)};\n`;
|
|
42
|
-
css += ` --newtone-error: ${srgbToHex(tokens.error.srgb)};\n`;
|
|
38
|
+
css += ` --newtone-success: ${srgbToHex(tokens.success.fill.srgb)};\n`;
|
|
39
|
+
css += ` --newtone-warning: ${srgbToHex(tokens.warning.fill.srgb)};\n`;
|
|
40
|
+
css += ` --newtone-error: ${srgbToHex(tokens.error.fill.srgb)};\n`;
|
|
43
41
|
css += `}\n\n`;
|
|
44
42
|
}
|
|
45
43
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ConfiguratorState, SpacingPreset } from '../types';
|
|
2
|
-
import type { NewtoneThemeConfig
|
|
2
|
+
import type { NewtoneThemeConfig } from '@newtonedev/components';
|
|
3
|
+
import { DEFAULT_FONT_SIZES, DEFAULT_LINE_HEIGHTS, DEFAULT_ROLE_SCALES, DEFAULT_FONT_SLOTS, ROLE_DEFAULT_WEIGHTS, migrateToFontSlot, computeBreakpointRoleScales, applyTypeScaleOffset } from '@newtonedev/fonts';
|
|
3
4
|
import type { PaletteConfig, DynamicRange, HueGrading, HueGradingEndpoint } from 'newtone';
|
|
4
5
|
import { traditionalHueToOklch } from '../hue-conversion';
|
|
5
6
|
|
|
@@ -21,43 +22,6 @@ function roundnessToMultiplier(intensity: number): number {
|
|
|
21
22
|
return intensity * 2.0; // lerp(0, 2.0, intensity)
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
/**
|
|
25
|
-
* Compute typography scale from base size and ratio.
|
|
26
|
-
* Uses modular scale: baseSize * ratio^n
|
|
27
|
-
*/
|
|
28
|
-
function computeTypographyScale(baseSize: number, ratio: number) {
|
|
29
|
-
return {
|
|
30
|
-
xs: Math.round(baseSize / (ratio ** 2)),
|
|
31
|
-
sm: Math.round(baseSize / ratio),
|
|
32
|
-
base: baseSize,
|
|
33
|
-
md: Math.round(baseSize * ratio),
|
|
34
|
-
lg: Math.round(baseSize * (ratio ** 2)),
|
|
35
|
-
xl: Math.round(baseSize * (ratio ** 3)),
|
|
36
|
-
xxl: Math.round(baseSize * (ratio ** 4)),
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Default font configurations using system fonts
|
|
42
|
-
*/
|
|
43
|
-
const DEFAULT_FONTS: { readonly mono: FontConfig; readonly display: FontConfig; readonly default: FontConfig } = {
|
|
44
|
-
mono: {
|
|
45
|
-
type: 'system',
|
|
46
|
-
family: 'ui-monospace',
|
|
47
|
-
fallback: 'SFMono-Regular, Menlo, Monaco, Consolas, monospace',
|
|
48
|
-
},
|
|
49
|
-
display: {
|
|
50
|
-
type: 'system',
|
|
51
|
-
family: 'system-ui',
|
|
52
|
-
fallback: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
53
|
-
},
|
|
54
|
-
default: {
|
|
55
|
-
type: 'system',
|
|
56
|
-
family: 'system-ui',
|
|
57
|
-
fallback: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
25
|
/**
|
|
62
26
|
* Default icon configuration using Material Symbols Rounded
|
|
63
27
|
*/
|
|
@@ -122,15 +86,6 @@ export function toThemeConfig(state: ConfiguratorState): NewtoneThemeConfig {
|
|
|
122
86
|
|
|
123
87
|
return {
|
|
124
88
|
colorSystem: { dynamicRange, palettes },
|
|
125
|
-
themes: {
|
|
126
|
-
neutral: { paletteIndex: 0, lightModeNv: 0.95, darkModeNv: 0.1 },
|
|
127
|
-
primary: { paletteIndex: 1, lightModeNv: 0.95, darkModeNv: 0.1 },
|
|
128
|
-
secondary: { paletteIndex: 1, lightModeNv: 0.85, darkModeNv: 0.15 },
|
|
129
|
-
strong: { paletteIndex: 0, lightModeNv: 0.1, darkModeNv: 0.95 },
|
|
130
|
-
},
|
|
131
|
-
elevation: {
|
|
132
|
-
offsets: [-0.02, 0, 0.04] as const,
|
|
133
|
-
},
|
|
134
89
|
spacing: {
|
|
135
90
|
'00': Math.round(spacingBase * 0), // Always 0
|
|
136
91
|
'02': Math.round(spacingBase * 0.25),
|
|
@@ -154,15 +109,24 @@ export function toThemeConfig(state: ConfiguratorState): NewtoneThemeConfig {
|
|
|
154
109
|
xl: Math.round(12 * radiusMultiplier),
|
|
155
110
|
pill: 999,
|
|
156
111
|
},
|
|
157
|
-
typography: {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
112
|
+
typography: (() => {
|
|
113
|
+
const roles = state.typography?.typeScaleOffset != null
|
|
114
|
+
? applyTypeScaleOffset(DEFAULT_ROLE_SCALES, state.typography.typeScaleOffset)
|
|
115
|
+
: DEFAULT_ROLE_SCALES;
|
|
116
|
+
return {
|
|
117
|
+
fonts: {
|
|
118
|
+
main: migrateToFontSlot(state.typography?.fonts.main ?? (state.typography?.fonts as any)?.default, DEFAULT_FONT_SLOTS.main),
|
|
119
|
+
display: migrateToFontSlot(state.typography?.fonts.display, DEFAULT_FONT_SLOTS.display),
|
|
120
|
+
mono: migrateToFontSlot(state.typography?.fonts.mono, DEFAULT_FONT_SLOTS.mono),
|
|
121
|
+
currency: migrateToFontSlot(state.typography?.fonts.currency, DEFAULT_FONT_SLOTS.currency),
|
|
122
|
+
},
|
|
123
|
+
fontSizes: DEFAULT_FONT_SIZES,
|
|
124
|
+
lineHeights: DEFAULT_LINE_HEIGHTS,
|
|
125
|
+
roles,
|
|
126
|
+
breakpointRoles: computeBreakpointRoleScales(roles),
|
|
127
|
+
roleWeights: { ...ROLE_DEFAULT_WEIGHTS, ...state.typography?.roleWeights },
|
|
128
|
+
};
|
|
129
|
+
})(),
|
|
166
130
|
icons: state.icons ?? DEFAULT_ICONS,
|
|
167
131
|
};
|
|
168
132
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { Configurator } from './Configurator';
|
|
|
3
3
|
export type { ConfiguratorProps } from './Configurator.types';
|
|
4
4
|
|
|
5
5
|
// State types
|
|
6
|
-
export type { ConfiguratorState, PaletteState, HueGradingEndpointState, SpacingPreset } from './types';
|
|
6
|
+
export type { ConfiguratorState, PaletteState, HueGradingEndpointState, SpacingPreset, FontConfig, FontScope, FontSlotConfig } from './types';
|
|
7
7
|
export type { ConfiguratorAction } from './state/actions';
|
|
8
8
|
|
|
9
9
|
// Bridge functions (for headless usage)
|
|
@@ -31,8 +31,6 @@ export function DesignPanel({ state, dispatch }: DesignPanelProps) {
|
|
|
31
31
|
|
|
32
32
|
const spacingPreset = state.spacing?.preset ?? 'md';
|
|
33
33
|
const intensity = state.roundness?.intensity ?? 0.5;
|
|
34
|
-
const baseSize = state.typography?.scale.baseSize ?? 16;
|
|
35
|
-
const ratio = state.typography?.scale.ratio ?? 1.25;
|
|
36
34
|
const variant = state.icons?.variant ?? 'rounded';
|
|
37
35
|
const weight = state.icons?.weight ?? 400;
|
|
38
36
|
return (
|
|
@@ -71,35 +69,6 @@ export function DesignPanel({ state, dispatch }: DesignPanelProps) {
|
|
|
71
69
|
showValue
|
|
72
70
|
/>
|
|
73
71
|
|
|
74
|
-
{/* Typography Section */}
|
|
75
|
-
<Text style={[styles.subtitle, { color: srgbToHex(tokens.textSecondary.srgb) }]}>
|
|
76
|
-
Typography
|
|
77
|
-
</Text>
|
|
78
|
-
<View style={styles.row}>
|
|
79
|
-
<View style={styles.flex}>
|
|
80
|
-
<Slider
|
|
81
|
-
value={baseSize}
|
|
82
|
-
onValueChange={(v) => dispatch({ type: 'SET_TYPOGRAPHY_BASE_SIZE', baseSize: v })}
|
|
83
|
-
min={12}
|
|
84
|
-
max={24}
|
|
85
|
-
step={1}
|
|
86
|
-
label="Base Size"
|
|
87
|
-
showValue
|
|
88
|
-
/>
|
|
89
|
-
</View>
|
|
90
|
-
<View style={styles.flex}>
|
|
91
|
-
<Slider
|
|
92
|
-
value={Math.round(ratio * 100)}
|
|
93
|
-
onValueChange={(v) => dispatch({ type: 'SET_TYPOGRAPHY_RATIO', ratio: v / 100 })}
|
|
94
|
-
min={110}
|
|
95
|
-
max={150}
|
|
96
|
-
step={5}
|
|
97
|
-
label="Scale Ratio"
|
|
98
|
-
showValue
|
|
99
|
-
/>
|
|
100
|
-
</View>
|
|
101
|
-
</View>
|
|
102
|
-
|
|
103
72
|
{/* Icons Section */}
|
|
104
73
|
<Text style={[styles.subtitle, { color: srgbToHex(tokens.textSecondary.srgb) }]}>
|
|
105
74
|
Icons
|
|
@@ -174,14 +174,14 @@ export function PalettePanel({ palette, index, dispatch, previewColors, state }:
|
|
|
174
174
|
</View>
|
|
175
175
|
{effectiveKeyColor !== undefined && (
|
|
176
176
|
<Pressable onPress={handleClearKeyColor} style={styles.autoButton}>
|
|
177
|
-
<Text style={[styles.autoText, { color: srgbToHex(tokens.
|
|
177
|
+
<Text style={[styles.autoText, { color: srgbToHex(tokens.accent.fill.srgb) }]}>
|
|
178
178
|
Auto
|
|
179
179
|
</Text>
|
|
180
180
|
</Pressable>
|
|
181
181
|
)}
|
|
182
182
|
</View>
|
|
183
183
|
{hexError !== '' && (
|
|
184
|
-
<Text style={[styles.errorText, { color: srgbToHex(tokens.error.srgb) }]}>
|
|
184
|
+
<Text style={[styles.errorText, { color: srgbToHex(tokens.error.fill.srgb) }]}>
|
|
185
185
|
{hexError}
|
|
186
186
|
</Text>
|
|
187
187
|
)}
|
|
@@ -4,36 +4,20 @@ import {
|
|
|
4
4
|
Card,
|
|
5
5
|
Button,
|
|
6
6
|
TextInput,
|
|
7
|
-
Select,
|
|
8
7
|
NewtoneProvider,
|
|
9
8
|
useTokens,
|
|
10
9
|
} from '@newtonedev/components';
|
|
11
10
|
import { srgbToHex } from 'newtone';
|
|
12
11
|
import type { ConfiguratorState } from '../types';
|
|
13
|
-
import type {
|
|
14
|
-
import type { ThemeName, NewtoneThemeConfig } from '@newtonedev/components';
|
|
15
|
-
|
|
16
|
-
const THEME_OPTIONS = [
|
|
17
|
-
{ label: 'Neutral', value: 'neutral' },
|
|
18
|
-
{ label: 'Primary', value: 'primary' },
|
|
19
|
-
{ label: 'Secondary', value: 'secondary' },
|
|
20
|
-
{ label: 'Strong', value: 'strong' },
|
|
21
|
-
];
|
|
12
|
+
import type { NewtoneThemeConfig } from '@newtonedev/components';
|
|
22
13
|
|
|
23
14
|
interface PreviewPanelProps {
|
|
24
15
|
readonly state: ConfiguratorState;
|
|
25
|
-
readonly dispatch: (action: ConfiguratorAction) => void;
|
|
26
16
|
readonly themeConfig: NewtoneThemeConfig;
|
|
27
17
|
}
|
|
28
18
|
|
|
29
|
-
/** Inner card that reads tokens from the nested provider
|
|
30
|
-
function PreviewCard({
|
|
31
|
-
state,
|
|
32
|
-
dispatch,
|
|
33
|
-
}: {
|
|
34
|
-
readonly state: ConfiguratorState;
|
|
35
|
-
readonly dispatch: (action: ConfiguratorAction) => void;
|
|
36
|
-
}) {
|
|
19
|
+
/** Inner card that reads tokens from the nested provider. */
|
|
20
|
+
function PreviewCard() {
|
|
37
21
|
const tokens = useTokens(1);
|
|
38
22
|
|
|
39
23
|
return (
|
|
@@ -42,15 +26,6 @@ function PreviewCard({
|
|
|
42
26
|
Component Preview
|
|
43
27
|
</Text>
|
|
44
28
|
|
|
45
|
-
<View style={styles.controls}>
|
|
46
|
-
<Select
|
|
47
|
-
options={THEME_OPTIONS}
|
|
48
|
-
value={state.preview.theme}
|
|
49
|
-
onValueChange={(t) => dispatch({ type: 'SET_PREVIEW_THEME', theme: t as ThemeName })}
|
|
50
|
-
label="Theme"
|
|
51
|
-
/>
|
|
52
|
-
</View>
|
|
53
|
-
|
|
54
29
|
<View style={previewStyles.wrapper}>
|
|
55
30
|
<View style={previewStyles.row}>
|
|
56
31
|
<Button variant="primary" semantic="accent" size="sm">Primary</Button>
|
|
@@ -62,11 +37,11 @@ function PreviewCard({
|
|
|
62
37
|
<TextInput label="Sample Input" value="Hello, Newtone" onChangeText={() => {}} />
|
|
63
38
|
|
|
64
39
|
<View style={previewStyles.row}>
|
|
65
|
-
<View style={[previewStyles.statusDot, { backgroundColor: srgbToHex(tokens.success.srgb) }]} />
|
|
40
|
+
<View style={[previewStyles.statusDot, { backgroundColor: srgbToHex(tokens.success.fill.srgb) }]} />
|
|
66
41
|
<Text style={[previewStyles.statusText, { color: srgbToHex(tokens.textPrimary.srgb) }]}>Success</Text>
|
|
67
|
-
<View style={[previewStyles.statusDot, { backgroundColor: srgbToHex(tokens.warning.srgb) }]} />
|
|
42
|
+
<View style={[previewStyles.statusDot, { backgroundColor: srgbToHex(tokens.warning.fill.srgb) }]} />
|
|
68
43
|
<Text style={[previewStyles.statusText, { color: srgbToHex(tokens.textPrimary.srgb) }]}>Warning</Text>
|
|
69
|
-
<View style={[previewStyles.statusDot, { backgroundColor: srgbToHex(tokens.error.srgb) }]} />
|
|
44
|
+
<View style={[previewStyles.statusDot, { backgroundColor: srgbToHex(tokens.error.fill.srgb) }]} />
|
|
70
45
|
<Text style={[previewStyles.statusText, { color: srgbToHex(tokens.textPrimary.srgb) }]}>Error</Text>
|
|
71
46
|
</View>
|
|
72
47
|
</View>
|
|
@@ -74,15 +49,14 @@ function PreviewCard({
|
|
|
74
49
|
);
|
|
75
50
|
}
|
|
76
51
|
|
|
77
|
-
export function PreviewPanel({ state,
|
|
52
|
+
export function PreviewPanel({ state, themeConfig }: PreviewPanelProps) {
|
|
78
53
|
return (
|
|
79
54
|
<NewtoneProvider
|
|
80
|
-
key={
|
|
55
|
+
key={state.preview.mode}
|
|
81
56
|
config={themeConfig}
|
|
82
57
|
initialMode={state.preview.mode}
|
|
83
|
-
initialTheme={state.preview.theme}
|
|
84
58
|
>
|
|
85
|
-
<PreviewCard
|
|
59
|
+
<PreviewCard />
|
|
86
60
|
</NewtoneProvider>
|
|
87
61
|
);
|
|
88
62
|
}
|
|
@@ -95,11 +69,6 @@ const styles = StyleSheet.create({
|
|
|
95
69
|
fontSize: 16,
|
|
96
70
|
fontWeight: '700',
|
|
97
71
|
},
|
|
98
|
-
controls: {
|
|
99
|
-
flexDirection: 'row',
|
|
100
|
-
alignItems: 'flex-end',
|
|
101
|
-
gap: 16,
|
|
102
|
-
},
|
|
103
72
|
});
|
|
104
73
|
|
|
105
74
|
const previewStyles = StyleSheet.create({
|
package/src/state/actions.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DesaturationStrength, HueGradingStrength } from 'newtone';
|
|
2
|
-
import type { ColorMode
|
|
3
|
-
import type {
|
|
2
|
+
import type { ColorMode } from '@newtonedev/components';
|
|
3
|
+
import type { TextRole } from '@newtonedev/fonts';
|
|
4
|
+
import type { ConfiguratorState, FontSlotConfig, FontScope, SpacingPreset } from '../types';
|
|
4
5
|
|
|
5
6
|
export type ConfiguratorAction =
|
|
6
7
|
// Palette actions
|
|
@@ -30,18 +31,15 @@ export type ConfiguratorAction =
|
|
|
30
31
|
// Roundness actions
|
|
31
32
|
| { readonly type: 'SET_ROUNDNESS_INTENSITY'; readonly intensity: number }
|
|
32
33
|
// Typography actions
|
|
33
|
-
| { readonly type: '
|
|
34
|
-
| { readonly type: '
|
|
35
|
-
| { readonly type: '
|
|
36
|
-
| { readonly type: 'SET_FONT_DISPLAY'; readonly font: FontConfig }
|
|
37
|
-
| { readonly type: 'SET_FONT_DEFAULT'; readonly font: FontConfig }
|
|
34
|
+
| { readonly type: 'SET_FONT'; readonly scope: FontScope; readonly font: FontSlotConfig }
|
|
35
|
+
| { readonly type: 'SET_TYPE_SCALE_OFFSET'; readonly offset: number }
|
|
36
|
+
| { readonly type: 'SET_ROLE_WEIGHT'; readonly role: TextRole; readonly weight: number }
|
|
38
37
|
// Icons actions
|
|
39
38
|
| { readonly type: 'SET_ICON_VARIANT'; readonly variant: 'outlined' | 'rounded' | 'sharp' }
|
|
40
39
|
| { readonly type: 'SET_ICON_WEIGHT'; readonly weight: 100 | 200 | 300 | 400 | 500 | 600 | 700 }
|
|
41
40
|
| { readonly type: 'SET_ICON_AUTO_GRADE'; readonly autoGrade: boolean }
|
|
42
41
|
// Preview actions
|
|
43
42
|
| { readonly type: 'SET_PREVIEW_MODE'; readonly mode: ColorMode }
|
|
44
|
-
| { readonly type: 'SET_PREVIEW_THEME'; readonly theme: ThemeName }
|
|
45
43
|
// Control actions
|
|
46
44
|
| { readonly type: 'RESET' }
|
|
47
45
|
| { readonly type: 'LOAD_STATE'; readonly state: ConfiguratorState };
|
package/src/state/defaults.ts
CHANGED
|
@@ -69,7 +69,6 @@ export const DEFAULT_CONFIGURATOR_STATE: ConfiguratorState = {
|
|
|
69
69
|
},
|
|
70
70
|
preview: {
|
|
71
71
|
mode: 'light',
|
|
72
|
-
theme: 'neutral',
|
|
73
72
|
},
|
|
74
73
|
spacing: {
|
|
75
74
|
preset: 'md', // Medium (8px base): default/balanced spacing
|
|
@@ -79,23 +78,39 @@ export const DEFAULT_CONFIGURATOR_STATE: ConfiguratorState = {
|
|
|
79
78
|
},
|
|
80
79
|
typography: {
|
|
81
80
|
fonts: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
main: {
|
|
82
|
+
config: {
|
|
83
|
+
type: 'system',
|
|
84
|
+
family: 'system-ui',
|
|
85
|
+
fallback: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
86
|
+
},
|
|
87
|
+
weights: { regular: 400, medium: 500, bold: 700 },
|
|
86
88
|
},
|
|
87
89
|
display: {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
config: {
|
|
91
|
+
type: 'system',
|
|
92
|
+
family: 'system-ui',
|
|
93
|
+
fallback: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
94
|
+
},
|
|
95
|
+
weights: { regular: 400, medium: 500, bold: 700 },
|
|
96
|
+
},
|
|
97
|
+
mono: {
|
|
98
|
+
config: {
|
|
99
|
+
type: 'system',
|
|
100
|
+
family: 'ui-monospace',
|
|
101
|
+
fallback: 'SFMono-Regular, Menlo, Monaco, Consolas, monospace',
|
|
102
|
+
},
|
|
103
|
+
weights: { regular: 400, medium: 500, bold: 700 },
|
|
91
104
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
105
|
+
currency: {
|
|
106
|
+
config: {
|
|
107
|
+
type: 'system',
|
|
108
|
+
family: 'system-ui',
|
|
109
|
+
fallback: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
110
|
+
},
|
|
111
|
+
weights: { regular: 400, medium: 500, bold: 700 },
|
|
96
112
|
},
|
|
97
113
|
},
|
|
98
|
-
scale: { baseSize: 16, ratio: 1.25 },
|
|
99
114
|
},
|
|
100
115
|
icons: {
|
|
101
116
|
variant: 'rounded', // Material Design 3 aesthetic
|