@codecavepro/brand 1.0.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/dist/fonts.css ADDED
@@ -0,0 +1,71 @@
1
+ /* CODECAVE — font faces (standalone)
2
+ *
3
+ * colors_and_type.css already declares these faces with paths relative to the
4
+ * package root. This file exists so `fonts/` can be dropped into another
5
+ * project on its own; the paths here are relative to fonts/ itself.
6
+ *
7
+ * PROVENANCE
8
+ * The production site (codecave.pro/src/styles/global.css) declares ONE face:
9
+ *
10
+ * @font-face { font-family: Satoshi; src: url("../assets/fonts/Satoshi-Regular.ttf"); }
11
+ *
12
+ * with no font-weight descriptor, which is why live 300 and 700 text is
13
+ * browser-synthesized rather than a real cut. The brand asset upload supplied
14
+ * genuine Light / Regular / Medium / Bold / Black cuts, so this package binds
15
+ * them properly. Expect package output at 700 to be marginally tighter than
16
+ * the live site until production ships the same files.
17
+ */
18
+
19
+ @font-face {
20
+ font-family: Satoshi;
21
+ src: url("./Satoshi-Light.woff2") format("woff2"),
22
+ url("./Satoshi-Light.woff") format("woff");
23
+ font-weight: 300;
24
+ font-style: normal;
25
+ font-display: swap;
26
+ }
27
+
28
+ @font-face {
29
+ font-family: Satoshi;
30
+ src: url("./Satoshi-Regular.woff2") format("woff2"),
31
+ url("./Satoshi-Regular.woff") format("woff");
32
+ font-weight: 400;
33
+ font-style: normal;
34
+ font-display: swap;
35
+ }
36
+
37
+ @font-face {
38
+ font-family: Satoshi;
39
+ src: url("./Satoshi-Italic.woff2") format("woff2"),
40
+ url("./Satoshi-Italic.woff") format("woff");
41
+ font-weight: 400;
42
+ font-style: italic;
43
+ font-display: swap;
44
+ }
45
+
46
+ @font-face {
47
+ font-family: Satoshi;
48
+ src: url("./Satoshi-Medium.woff2") format("woff2"),
49
+ url("./Satoshi-Medium.woff") format("woff");
50
+ font-weight: 500;
51
+ font-style: normal;
52
+ font-display: swap;
53
+ }
54
+
55
+ @font-face {
56
+ font-family: Satoshi;
57
+ src: url("./Satoshi-Bold.woff2") format("woff2"),
58
+ url("./Satoshi-Bold.woff") format("woff");
59
+ font-weight: 700;
60
+ font-style: normal;
61
+ font-display: swap;
62
+ }
63
+
64
+ @font-face {
65
+ font-family: Satoshi;
66
+ src: url("./Satoshi-Black.woff2") format("woff2"),
67
+ url("./Satoshi-Black.woff") format("woff");
68
+ font-weight: 900;
69
+ font-style: normal;
70
+ font-display: swap;
71
+ }
@@ -0,0 +1,4 @@
1
+ export * from './tokens/colors.js';
2
+ export * from './tokens/layout.js';
3
+ export * from './tokens/typography.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../.tmp/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // GENERATED by packages/brand/scripts/build.mjs — do not edit.
2
+ // Origin: docs/tokens/*.ts
3
+ export * from './tokens/colors.js';
4
+ export * from './tokens/layout.js';
5
+ export * from './tokens/typography.js';
@@ -0,0 +1,94 @@
1
+ /**
2
+ * CODECAVE — color tokens as a typed module.
3
+ *
4
+ * A faithful mirror of `colors_and_type.css`, for consumers that cannot read a
5
+ * stylesheet: design tooling, canvas/WebGL renderers, PDF and email builders,
6
+ * native apps. The CSS file remains the source of truth — if the two ever
7
+ * disagree, the CSS wins.
8
+ *
9
+ * Originals: source_examples/styles/global.css (codecave.pro @theme,
10
+ * 2026 palette rebuild). Old and new ramps share step names with
11
+ * different values — never map by step name across the rebuild;
12
+ * map by hex or by role.
13
+ */
14
+ /** The violet brand ramp: light to dark, 12 steps.
15
+ * Do NOT consume these directly — use the semantic layer below.
16
+ * Non-monotonic quirk: brand-500 is lighter than brand-400. */
17
+ export declare const brand: {
18
+ readonly 25: "#E8E6F0";
19
+ readonly 50: "#BBB9CB";
20
+ readonly 100: "#B8AFDB";
21
+ readonly 200: "#B19AFE";
22
+ readonly 300: "#735CAB";
23
+ readonly 400: "#5F3ABD";
24
+ readonly 500: "#5F20FE";
25
+ readonly 600: "#4705ED";
26
+ readonly 700: "#4004AF";
27
+ readonly 800: "#1B0D4E";
28
+ readonly 900: "#1E113B";
29
+ readonly 950: "#0A0A0B";
30
+ };
31
+ /** The gray ramp: light to dark, 13 steps.
32
+ * Non-monotonic quirk: gray-1100 (card) is lighter than gray-1000. */
33
+ export declare const gray: {
34
+ readonly 50: "#F4F4F6";
35
+ readonly 100: "#DCDCE5";
36
+ readonly 200: "#D5D5DD";
37
+ readonly 300: "#C7C7DB";
38
+ readonly 400: "#A3A3C2";
39
+ readonly 500: "#9595BB";
40
+ readonly 600: "#6B6699";
41
+ readonly 700: "#2B2848";
42
+ readonly 800: "#232339";
43
+ readonly 900: "#1C1C27";
44
+ readonly 950: "#15151E";
45
+ readonly 1000: "#050505";
46
+ readonly 1100: "#0F0F15";
47
+ };
48
+ /** Single-use accents (global.css calls them "once used"). RAW-OK. */
49
+ export declare const accent: {
50
+ readonly glow25: "#9980FF";
51
+ readonly shadow0: "#281470";
52
+ readonly progress0: "#8252FC";
53
+ };
54
+ /** Technology-card wash — the only place cyan survives (0.1-alpha wash).
55
+ * The old cyan #20EFFE is an imagery-only art literal since the rebuild. */
56
+ export declare const technologyGradient: {
57
+ readonly 0: "#077689";
58
+ readonly 25: "#1A0452";
59
+ readonly 50: "#070312";
60
+ };
61
+ export declare const error: {
62
+ readonly 100: "#FE9A9A";
63
+ readonly 200: "#FE2020";
64
+ readonly 300: "#B42318";
65
+ readonly 400: "#CA1400";
66
+ };
67
+ /** The semantic layer. Consume these. */
68
+ export declare const color: {
69
+ readonly heading: "#F4F4F6";
70
+ readonly action: "#5F20FE";
71
+ readonly neutral: "#6B6699";
72
+ readonly hovered: "#B19AFE";
73
+ readonly outlinePrimaryHover: "#1B0D4E";
74
+ readonly bodyPrimary: "#F4F4F6";
75
+ readonly textBodyPrimary: "#D5D5DD";
76
+ readonly bodySecondary: "#9595BB";
77
+ readonly bodySecondaryLighter: "#C7C7DB";
78
+ readonly surfacePrimary: "#0A0A0B";
79
+ readonly surfacePrimaryHover: "#232339";
80
+ readonly surfaceSecondary: "#0F0F15";
81
+ readonly surfaceTertiary: "#1C1C27";
82
+ readonly surfaceQuaternary: "#2B2848";
83
+ readonly failureproof0: "#050505";
84
+ readonly defaultTransparent: "#DCDCE5";
85
+ readonly error: "#B42318";
86
+ };
87
+ /** Violet to near-white, left to right. Display type and rule accents only.
88
+ * The mid stop is the once-used progress accent, NOT brand-300 — the rebuilt
89
+ * ramp's brand-300 (#735CAB) is a different, muted violet. */
90
+ export declare const gradientBrand: "linear-gradient(to right, #5F20FE 0%, #8252FC 60%, #B19AFE 75%, #E8E6F0 100%)";
91
+ export type BrandStep = keyof typeof brand;
92
+ export type GrayStep = keyof typeof gray;
93
+ export type SemanticColor = keyof typeof color;
94
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../.tmp/tokens/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;gEAEgE;AAChE,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAaR,CAAC;AAEX;uEACuE;AACvE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;CAcP,CAAC;AAEX,sEAAsE;AACtE,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAEX;6EAC6E;AAC7E,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAEX,eAAO,MAAM,KAAK;;;;;CAKR,CAAC;AAEX,yCAAyC;AACzC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;CAqBR,CAAC;AAEX;;+DAE+D;AAC/D,eAAO,MAAM,aAAa,iFAC6F,CAAC;AAExH,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC;AAC3C,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,IAAI,CAAC;AACzC,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,KAAK,CAAC"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * CODECAVE — color tokens as a typed module.
3
+ *
4
+ * A faithful mirror of `colors_and_type.css`, for consumers that cannot read a
5
+ * stylesheet: design tooling, canvas/WebGL renderers, PDF and email builders,
6
+ * native apps. The CSS file remains the source of truth — if the two ever
7
+ * disagree, the CSS wins.
8
+ *
9
+ * Originals: source_examples/styles/global.css (codecave.pro @theme,
10
+ * 2026 palette rebuild). Old and new ramps share step names with
11
+ * different values — never map by step name across the rebuild;
12
+ * map by hex or by role.
13
+ */
14
+ /** The violet brand ramp: light to dark, 12 steps.
15
+ * Do NOT consume these directly — use the semantic layer below.
16
+ * Non-monotonic quirk: brand-500 is lighter than brand-400. */
17
+ export const brand = {
18
+ 25: '#E8E6F0', // near-white tint — gradient endpoint
19
+ 50: '#BBB9CB',
20
+ 100: '#B8AFDB',
21
+ 200: '#B19AFE', // hover foreground
22
+ 300: '#735CAB',
23
+ 400: '#5F3ABD', // feature-card ring mid-stop (was cyan)
24
+ 500: '#5F20FE', // ACTION — links, borders, eyebrows
25
+ 600: '#4705ED',
26
+ 700: '#4004AF', // primary button hover; tertiary border hover
27
+ 800: '#1B0D4E', // text ON the glow button; outline hover
28
+ 900: '#1E113B', // primary button active; secondary fill
29
+ 950: '#0A0A0B', // THE PAGE — a neutral black kept in the brand ramp
30
+ };
31
+ /** The gray ramp: light to dark, 13 steps.
32
+ * Non-monotonic quirk: gray-1100 (card) is lighter than gray-1000. */
33
+ export const gray = {
34
+ 50: '#F4F4F6', // headings, body text
35
+ 100: '#DCDCE5',
36
+ 200: '#D5D5DD', // long-form body copy
37
+ 300: '#C7C7DB', // secondary body, lighter
38
+ 400: '#A3A3C2',
39
+ 500: '#9595BB', // secondary body, placeholders
40
+ 600: '#6B6699', // neutral — muted metadata, LARGE TEXT ONLY (3.76:1)
41
+ 700: '#2B2848', // borders / quaternary surface
42
+ 800: '#232339', // surface hover
43
+ 900: '#1C1C27', // tertiary surface
44
+ 950: '#15151E',
45
+ 1000: '#050505', // one dark section ground ("failureproof")
46
+ 1100: '#0F0F15', // card surface
47
+ };
48
+ /** Single-use accents (global.css calls them "once used"). RAW-OK. */
49
+ export const accent = {
50
+ glow25: '#9980FF', // GLOW BUTTON FILL (takes brand-800 text)
51
+ shadow0: '#281470', // seeds the upward section glow
52
+ progress0: '#8252FC', // gradient mid — .rule / .progress
53
+ };
54
+ /** Technology-card wash — the only place cyan survives (0.1-alpha wash).
55
+ * The old cyan #20EFFE is an imagery-only art literal since the rebuild. */
56
+ export const technologyGradient = {
57
+ 0: '#077689', // deep cyan
58
+ 25: '#1A0452',
59
+ 50: '#070312',
60
+ };
61
+ export const error = {
62
+ 100: '#FE9A9A', // error value + message text (9.71:1 on the page)
63
+ 200: '#FE2020', // error halo
64
+ 300: '#B42318', // --color-error: icons and rules, NOT body text (3.01:1)
65
+ 400: '#CA1400', // the pulsing navigation dot
66
+ };
67
+ /** The semantic layer. Consume these. */
68
+ export const color = {
69
+ heading: gray[50],
70
+ action: brand[500],
71
+ neutral: gray[600],
72
+ hovered: brand[200],
73
+ outlinePrimaryHover: brand[800],
74
+ bodyPrimary: gray[50],
75
+ textBodyPrimary: gray[200],
76
+ bodySecondary: gray[500],
77
+ bodySecondaryLighter: gray[300],
78
+ surfacePrimary: brand[950],
79
+ surfacePrimaryHover: gray[800],
80
+ surfaceSecondary: gray[1100],
81
+ surfaceTertiary: gray[900],
82
+ surfaceQuaternary: gray[700],
83
+ failureproof0: gray[1000],
84
+ defaultTransparent: gray[100],
85
+ error: error[300],
86
+ };
87
+ /** Violet to near-white, left to right. Display type and rule accents only.
88
+ * The mid stop is the once-used progress accent, NOT brand-300 — the rebuilt
89
+ * ramp's brand-300 (#735CAB) is a different, muted violet. */
90
+ export const gradientBrand = `linear-gradient(to right, ${brand[500]} 0%, ${accent.progress0} 60%, ${brand[200]} 75%, ${brand[25]} 100%)`;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * CODECAVE — layout, radius and elevation tokens as a typed module.
3
+ *
4
+ * Mirrors `colors_and_type.css`. Original:
5
+ * source_examples/brand-repo-tokens/layout.css and the production
6
+ * `.section-container` rule in source_examples/styles/global.css.
7
+ */
8
+ export declare const maxWidthDesktop: "1280px";
9
+ export declare const breakpointSm: "457px";
10
+ /**
11
+ * Radii. CODECAVE runs unusually large corners — this is the loudest brand
12
+ * signal in the system, louder than the violet. Only one value here is small,
13
+ * and it exists for a geometric reason rather than a stylistic one: the small
14
+ * checkbox box is 16px, and the 8px control corner on a 16px box is exactly
15
+ * half its side, i.e. a circle, i.e. a radio button rendering for a pick-any
16
+ * control. Use `controlSm` for that box and nothing else.
17
+ *
18
+ * Every key is named for what it wraps rather than for a t-shirt size. `sm` and
19
+ * `md` used to be here, and `--radius-sm` / `--radius-md` are also Tailwind
20
+ * default theme names at *different* values (0.25rem, 0.375rem) — so markup
21
+ * authored against one system and rendered in the other changed shape with
22
+ * nothing to notice. The semantic names cannot collide.
23
+ */
24
+ export declare const radius: {
25
+ readonly controlSm: "0.25rem";
26
+ readonly control: "0.5rem";
27
+ readonly tile: "0.75rem";
28
+ readonly card: "1.5rem";
29
+ readonly article: "2.25rem";
30
+ readonly custom: "2.75rem";
31
+ readonly section: "4rem";
32
+ readonly sectionMd: "7.5rem";
33
+ readonly pill: "9999px";
34
+ };
35
+ /** Page gutters, by breakpoint. */
36
+ export declare const gutter: {
37
+ readonly base: "0.5rem";
38
+ readonly md: "1rem";
39
+ readonly xl: "2rem";
40
+ };
41
+ /**
42
+ * Section rhythm is deliberately asymmetric — a section carries far more air
43
+ * above it than below, so a heading always arrives with space in front of it.
44
+ */
45
+ export declare const spacing: {
46
+ readonly sectionPaddingTop: "12.5rem";
47
+ readonly sectionPaddingBottom: "7.5rem";
48
+ readonly cardPadding: "2rem 2rem 3rem";
49
+ readonly controlHeight: "3rem";
50
+ readonly inputHeight: "4rem";
51
+ };
52
+ /**
53
+ * Elevation. Every Y offset is NEGATIVE: section panels throw violet light
54
+ * upward, as if the source sat beneath the panel edge. It is physically wrong
55
+ * and it is the single most recognizable thing in the system. Cards receive no
56
+ * shadow at all — they separate with radius and a 1px `brand.110` hairline.
57
+ */
58
+ export declare const shadow: {
59
+ readonly section: string;
60
+ readonly glowButton: "0 0 64px 0 #7A58FFA8, 0 0 16px 0 #4F22FFA6, 0 0 4px 2px #5B34FA";
61
+ readonly inputFocus: string;
62
+ readonly inputError: string;
63
+ };
64
+ export type Radius = keyof typeof radius;
65
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../.tmp/tokens/layout.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,eAAO,MAAM,eAAe,EAAG,QAAiB,CAAC;AACjD,eAAO,MAAM,YAAY,EAAG,OAAgB,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;CAUT,CAAC;AAEX,mCAAmC;AACnC,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;;CAMV,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;;;CAuBT,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,MAAM,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * CODECAVE — layout, radius and elevation tokens as a typed module.
3
+ *
4
+ * Mirrors `colors_and_type.css`. Original:
5
+ * source_examples/brand-repo-tokens/layout.css and the production
6
+ * `.section-container` rule in source_examples/styles/global.css.
7
+ */
8
+ // The `.js` extension is required, not a typo: these modules are published as
9
+ // ESM, and Node's resolver needs the extension it will see at runtime.
10
+ // TypeScript maps it back to ./colors.ts when compiling.
11
+ import { accent, brand, error } from './colors.js';
12
+ export const maxWidthDesktop = '1280px';
13
+ export const breakpointSm = '457px';
14
+ /**
15
+ * Radii. CODECAVE runs unusually large corners — this is the loudest brand
16
+ * signal in the system, louder than the violet. Only one value here is small,
17
+ * and it exists for a geometric reason rather than a stylistic one: the small
18
+ * checkbox box is 16px, and the 8px control corner on a 16px box is exactly
19
+ * half its side, i.e. a circle, i.e. a radio button rendering for a pick-any
20
+ * control. Use `controlSm` for that box and nothing else.
21
+ *
22
+ * Every key is named for what it wraps rather than for a t-shirt size. `sm` and
23
+ * `md` used to be here, and `--radius-sm` / `--radius-md` are also Tailwind
24
+ * default theme names at *different* values (0.25rem, 0.375rem) — so markup
25
+ * authored against one system and rendered in the other changed shape with
26
+ * nothing to notice. The semantic names cannot collide.
27
+ */
28
+ export const radius = {
29
+ controlSm: '0.25rem', // 4px — the 16px checkbox box ONLY
30
+ control: '0.5rem', // 8px — inputs, small chips
31
+ tile: '0.75rem', // 12px — inline chips, icon tiles
32
+ card: '1.5rem', // 24px — the DEFAULT card, dominant sitewide
33
+ article: '2.25rem', // 36px — article / insight cards
34
+ custom: '2.75rem', // 44px — feature and testimonial cards
35
+ section: '4rem', // 64px — section panel below 768px
36
+ sectionMd: '7.5rem', // 120px — section panel at and above 768px
37
+ pill: '9999px', // buttons, pills, avatars
38
+ };
39
+ /** Page gutters, by breakpoint. */
40
+ export const gutter = {
41
+ base: '0.5rem', // <768px
42
+ md: '1rem', // >=768px
43
+ xl: '2rem', // >=1280px
44
+ };
45
+ /**
46
+ * Section rhythm is deliberately asymmetric — a section carries far more air
47
+ * above it than below, so a heading always arrives with space in front of it.
48
+ */
49
+ export const spacing = {
50
+ sectionPaddingTop: '12.5rem', // 200px
51
+ sectionPaddingBottom: '7.5rem', // 120px
52
+ cardPadding: '2rem 2rem 3rem', // bottom-heavy: seats a footer action
53
+ controlHeight: '3rem', // 48px — every button (a floor, not a fixed height)
54
+ inputHeight: '4rem', // 64px — every text field
55
+ };
56
+ /**
57
+ * Elevation. Every Y offset is NEGATIVE: section panels throw violet light
58
+ * upward, as if the source sat beneath the panel edge. It is physically wrong
59
+ * and it is the single most recognizable thing in the system. Cards receive no
60
+ * shadow at all — they separate with radius and a 1px `brand.110` hairline.
61
+ */
62
+ export const shadow = {
63
+ // accent.shadow0 (#281470) is what --color-shadow-0 resolves to in
64
+ // colors_and_type.css. This previously read `brand[660]`, a step that has
65
+ // never existed in the ramp, so all three layers interpolated as
66
+ // `hsl(from undefined h s l / …)` — an invalid colour the browser drops.
67
+ section: [
68
+ `0 -64px 64px 0 hsl(from ${accent.shadow0} h s l / 0.20)`,
69
+ `0 -10px 24px 0 hsl(from ${accent.shadow0} h s l / 0.10)`,
70
+ `0 -6px 6px 0 hsl(from ${accent.shadow0} h s l / 0.08)`,
71
+ ].join(', '),
72
+ glowButton: '0 0 64px 0 #7A58FFA8, 0 0 16px 0 #4F22FFA6, 0 0 4px 2px #5B34FA',
73
+ inputFocus: [
74
+ `0 0 16px 0 hsl(from ${brand[500]} h s l / 0.5)`,
75
+ `0 0 4px 0 hsl(from ${brand[500]} h s l / 0.6)`,
76
+ ].join(', '),
77
+ // The invalid-field halo. `--shadow-input-error` has been in
78
+ // colors_and_type.css since the rebuild; this mirror simply never grew the
79
+ // matching key, so a consumer reading tokens from the module could style a
80
+ // focus ring and had nothing to reach for on the error state.
81
+ inputError: [
82
+ `0 0 16px 0 hsl(from ${error[200]} h s l / 0.5)`,
83
+ `0 0 4px 0 hsl(from ${error[100]} h s l / 0.6)`,
84
+ ].join(', '),
85
+ };
@@ -0,0 +1,97 @@
1
+ /**
2
+ * CODECAVE — typography tokens as a typed module.
3
+ *
4
+ * Mirrors `colors_and_type.css`. Original:
5
+ * source_examples/brand-repo-tokens/typography.css, whose named heading sizes
6
+ * come from the production `@theme` block; the remaining steps were measured
7
+ * from the rendered site.
8
+ *
9
+ * One family, no display face, no serif, no second sans.
10
+ */
11
+ export declare const fontFamily: {
12
+ readonly sans: "Satoshi, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif";
13
+ readonly mono: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace";
14
+ };
15
+ /**
16
+ * Nine steps. Size and line-height travel together — never pair them freely.
17
+ *
18
+ * The body steps are named for what they are, not for a t-shirt size, and that
19
+ * is load-bearing rather than stylistic. `lg`, `sm` and `base` are also Tailwind
20
+ * default theme names, at 1.125rem, 0.875rem and 1rem — so while this scale used
21
+ * them, importing the stylesheet into any Tailwind app silently resized every
22
+ * `text-lg` and `text-sm` in it. See CCWEB2-323, and the identical reasoning
23
+ * already recorded against `--radius-sm` / `--radius-md` in colors_and_type.css.
24
+ *
25
+ * `md` survives only because Tailwind happens to have no `--text-md`;
26
+ * `npm run check:collisions` is what will notice if that ever changes.
27
+ */
28
+ export declare const fontSize: {
29
+ readonly headingLg: {
30
+ readonly size: "3.5rem";
31
+ readonly lineHeight: "130%";
32
+ };
33
+ readonly headingMd: {
34
+ readonly size: "2.75rem";
35
+ readonly lineHeight: "115%";
36
+ };
37
+ readonly headingSm: {
38
+ readonly size: "2rem";
39
+ readonly lineHeight: "110%";
40
+ };
41
+ readonly stat: {
42
+ readonly size: "2.25rem";
43
+ readonly lineHeight: "2.5rem";
44
+ };
45
+ readonly subhead: {
46
+ readonly size: "1.5rem";
47
+ readonly lineHeight: "2rem";
48
+ };
49
+ readonly md: {
50
+ readonly size: "1.25rem";
51
+ readonly lineHeight: "1.75rem";
52
+ };
53
+ readonly label: {
54
+ readonly size: "1.125rem";
55
+ readonly lineHeight: "1.75rem";
56
+ };
57
+ readonly body: {
58
+ readonly size: "1rem";
59
+ readonly lineHeight: "1.5rem";
60
+ };
61
+ readonly caption: {
62
+ readonly size: "0.875rem";
63
+ readonly lineHeight: "1.25rem";
64
+ };
65
+ };
66
+ /**
67
+ * Two weights carry the whole system. 300, 500 and 900 exist in `fonts/` and
68
+ * are bound, but no captured source uses them: 400 for everything, 700 for
69
+ * headings, eyebrows, labels and button text.
70
+ *
71
+ * Production ships only Satoshi-Regular and lets the browser synthesize 700.
72
+ * This package binds the real cuts — see DESIGN.md section 10.3.
73
+ */
74
+ export declare const fontWeight: {
75
+ readonly light: 300;
76
+ readonly regular: 400;
77
+ readonly medium: 500;
78
+ readonly bold: 700;
79
+ readonly black: 900;
80
+ };
81
+ /**
82
+ * The eyebrow: the system's one typographic signature. A bold, uppercase-weight
83
+ * violet line paired with a larger light lead line, both `display: block` inside
84
+ * a single heading element — one heading, two voices. Never render the eyebrow
85
+ * as a separate sibling paragraph, and never let it appear without its lead.
86
+ */
87
+ export declare const eyebrow: {
88
+ readonly size: "1rem";
89
+ readonly weight: 700;
90
+ readonly colorToken: "--color-action";
91
+ readonly leadSize: "2rem";
92
+ readonly leadWeight: 400;
93
+ readonly leadColorToken: "--color-heading";
94
+ };
95
+ export type FontSizeStep = keyof typeof fontSize;
96
+ export type FontWeight = keyof typeof fontWeight;
97
+ //# sourceMappingURL=typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../.tmp/tokens/typography.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUX,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,OAAO;;;;;;;CAOV,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,QAAQ,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * CODECAVE — typography tokens as a typed module.
3
+ *
4
+ * Mirrors `colors_and_type.css`. Original:
5
+ * source_examples/brand-repo-tokens/typography.css, whose named heading sizes
6
+ * come from the production `@theme` block; the remaining steps were measured
7
+ * from the rendered site.
8
+ *
9
+ * One family, no display face, no serif, no second sans.
10
+ */
11
+ export const fontFamily = {
12
+ sans: 'Satoshi, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif',
13
+ mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
14
+ };
15
+ /**
16
+ * Nine steps. Size and line-height travel together — never pair them freely.
17
+ *
18
+ * The body steps are named for what they are, not for a t-shirt size, and that
19
+ * is load-bearing rather than stylistic. `lg`, `sm` and `base` are also Tailwind
20
+ * default theme names, at 1.125rem, 0.875rem and 1rem — so while this scale used
21
+ * them, importing the stylesheet into any Tailwind app silently resized every
22
+ * `text-lg` and `text-sm` in it. See CCWEB2-323, and the identical reasoning
23
+ * already recorded against `--radius-sm` / `--radius-md` in colors_and_type.css.
24
+ *
25
+ * `md` survives only because Tailwind happens to have no `--text-md`;
26
+ * `npm run check:collisions` is what will notice if that ever changes.
27
+ */
28
+ export const fontSize = {
29
+ headingLg: { size: '3.5rem', lineHeight: '130%' }, // 56px — hero
30
+ headingMd: { size: '2.75rem', lineHeight: '115%' }, // 44px — section heading
31
+ headingSm: { size: '2rem', lineHeight: '110%' }, // 32px — eyebrow + lead pair
32
+ stat: { size: '2.25rem', lineHeight: '2.5rem' }, // 36px — stat figures
33
+ subhead: { size: '1.5rem', lineHeight: '2rem' }, // 24px — subsection heading
34
+ md: { size: '1.25rem', lineHeight: '1.75rem' }, // 20px — intro copy
35
+ label: { size: '1.125rem', lineHeight: '1.75rem' }, // 18px — names, labels
36
+ body: { size: '1rem', lineHeight: '1.5rem' }, // 16px — body, buttons
37
+ caption: { size: '0.875rem', lineHeight: '1.25rem' }, // 14px — captions, labels
38
+ };
39
+ /**
40
+ * Two weights carry the whole system. 300, 500 and 900 exist in `fonts/` and
41
+ * are bound, but no captured source uses them: 400 for everything, 700 for
42
+ * headings, eyebrows, labels and button text.
43
+ *
44
+ * Production ships only Satoshi-Regular and lets the browser synthesize 700.
45
+ * This package binds the real cuts — see DESIGN.md section 10.3.
46
+ */
47
+ export const fontWeight = {
48
+ light: 300,
49
+ regular: 400,
50
+ medium: 500,
51
+ bold: 700,
52
+ black: 900,
53
+ };
54
+ /**
55
+ * The eyebrow: the system's one typographic signature. A bold, uppercase-weight
56
+ * violet line paired with a larger light lead line, both `display: block` inside
57
+ * a single heading element — one heading, two voices. Never render the eyebrow
58
+ * as a separate sibling paragraph, and never let it appear without its lead.
59
+ */
60
+ export const eyebrow = {
61
+ size: fontSize.body.size,
62
+ weight: fontWeight.bold,
63
+ colorToken: '--color-action',
64
+ leadSize: fontSize.headingSm.size,
65
+ leadWeight: fontWeight.regular,
66
+ leadColorToken: '--color-heading',
67
+ };
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@codecavepro/brand",
3
+ "version": "1.0.0",
4
+ "description": "CODECAVE design system — colour, typography and layout tokens as CSS custom properties and as a typed module.",
5
+ "license": "Unlicense",
6
+ "type": "module",
7
+ "homepage": "https://brand.codecave.pro/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/CodeCavePro/brand.git",
11
+ "directory": "packages/brand"
12
+ },
13
+ "keywords": [
14
+ "codecave",
15
+ "design-system",
16
+ "design-tokens",
17
+ "css-custom-properties"
18
+ ],
19
+ "sideEffects": [
20
+ "*.css"
21
+ ],
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js"
26
+ },
27
+ "./css": "./dist/colors_and_type.css",
28
+ "./fonts.css": "./dist/fonts.css",
29
+ "./package.json": "./package.json"
30
+ },
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "scripts": {
35
+ "build": "node scripts/build.mjs",
36
+ "check": "node scripts/build.mjs --check",
37
+ "prepack": "node scripts/build.mjs"
38
+ },
39
+ "devDependencies": {
40
+ "typescript": "^5.9.2"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ }
45
+ }