baseline-foundry 0.1.3
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/LICENSE +21 -0
- package/README.md +588 -0
- package/config/experiments/ibm-plex-engine-smoke.json +115 -0
- package/config/experiments/ubuntu-engine-smoke.json +115 -0
- package/config/foundation-theme.json +117 -0
- package/config/tiers/app.json +120 -0
- package/config/tiers/documentation.json +120 -0
- package/config/tiers/editorial.json +120 -0
- package/config/tiers/os.json +120 -0
- package/dist/accordion.d.ts +5 -0
- package/dist/accordion.js +32 -0
- package/dist/application-layout.d.ts +4 -0
- package/dist/application-layout.js +181 -0
- package/dist/baseline-grid-overlay.d.ts +5 -0
- package/dist/baseline-grid-overlay.js +50 -0
- package/dist/baseline-grid-theme.d.ts +3 -0
- package/dist/baseline-grid-theme.js +3 -0
- package/dist/baseline-grid.d.ts +7 -0
- package/dist/baseline-grid.js +35 -0
- package/dist/build.d.ts +21 -0
- package/dist/build.js +440 -0
- package/dist/code-snippet.d.ts +6 -0
- package/dist/code-snippet.js +95 -0
- package/dist/contextual-menu.d.ts +4 -0
- package/dist/contextual-menu.js +156 -0
- package/dist/css-app-tier.d.ts +1 -0
- package/dist/css-app-tier.js +77 -0
- package/dist/css-components/article-pagination.d.ts +13 -0
- package/dist/css-components/article-pagination.js +151 -0
- package/dist/css-components/button-actions.d.ts +7 -0
- package/dist/css-components/button-actions.js +165 -0
- package/dist/css-components/cards-options.d.ts +6 -0
- package/dist/css-components/cards-options.js +180 -0
- package/dist/css-components/chip-badge-status.d.ts +10 -0
- package/dist/css-components/chip-badge-status.js +162 -0
- package/dist/css-components/content-card.d.ts +25 -0
- package/dist/css-components/content-card.js +517 -0
- package/dist/css-components/control-row.d.ts +2 -0
- package/dist/css-components/control-row.js +18 -0
- package/dist/css-components/cta-figure-aspect.d.ts +1 -0
- package/dist/css-components/cta-figure-aspect.js +123 -0
- package/dist/css-components/document-navigation.d.ts +13 -0
- package/dist/css-components/document-navigation.js +400 -0
- package/dist/css-components/editorial-content.d.ts +6 -0
- package/dist/css-components/editorial-content.js +52 -0
- package/dist/css-components/icon.d.ts +1 -0
- package/dist/css-components/icon.js +75 -0
- package/dist/css-components/interactive-feedback.d.ts +2 -0
- package/dist/css-components/interactive-feedback.js +230 -0
- package/dist/css-components/interactive-tables.d.ts +7 -0
- package/dist/css-components/interactive-tables.js +164 -0
- package/dist/css-components/linked-logo-site-layout.d.ts +21 -0
- package/dist/css-components/linked-logo-site-layout.js +214 -0
- package/dist/css-components/list-tree.d.ts +5 -0
- package/dist/css-components/list-tree.js +98 -0
- package/dist/css-components/list.d.ts +3 -0
- package/dist/css-components/list.js +119 -0
- package/dist/css-components/logo-media.d.ts +16 -0
- package/dist/css-components/logo-media.js +219 -0
- package/dist/css-components/navigation-layout.d.ts +5 -0
- package/dist/css-components/navigation-layout.js +151 -0
- package/dist/css-components/panel.d.ts +6 -0
- package/dist/css-components/panel.js +148 -0
- package/dist/css-components/search-box-and-filter.d.ts +9 -0
- package/dist/css-components/search-box-and-filter.js +267 -0
- package/dist/css-components/sites-editorial-ports.d.ts +19 -0
- package/dist/css-components/sites-editorial-ports.js +264 -0
- package/dist/css-components/sites-foundation.d.ts +17 -0
- package/dist/css-components/sites-foundation.js +173 -0
- package/dist/css-components/sites-rich-lists.d.ts +18 -0
- package/dist/css-components/sites-rich-lists.js +364 -0
- package/dist/css-components/static-content-ports.d.ts +14 -0
- package/dist/css-components/static-content-ports.js +206 -0
- package/dist/css-components/tab-section.d.ts +19 -0
- package/dist/css-components/tab-section.js +103 -0
- package/dist/css-components/table.d.ts +7 -0
- package/dist/css-components/table.js +79 -0
- package/dist/css-components/tabs-choice-breadcrumbs.d.ts +9 -0
- package/dist/css-components/tabs-choice-breadcrumbs.js +307 -0
- package/dist/css-components/tiered-list-equal-height-row.d.ts +1 -0
- package/dist/css-components/tiered-list-equal-height-row.js +286 -0
- package/dist/css-components.d.ts +2 -0
- package/dist/css-components.js +2701 -0
- package/dist/css-grid.d.ts +1 -0
- package/dist/css-grid.js +179 -0
- package/dist/css.d.ts +6 -0
- package/dist/css.js +431 -0
- package/dist/experiments/ibm-plex-engine-smoke/styles.css +8969 -0
- package/dist/experiments/ibm-plex-engine-smoke/surfaces.json +604 -0
- package/dist/experiments/ibm-plex-engine-smoke/tokens.json +217 -0
- package/dist/in-page-navigation.d.ts +7 -0
- package/dist/in-page-navigation.js +136 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +18 -0
- package/dist/interactive-feedback.d.ts +14 -0
- package/dist/interactive-feedback.js +96 -0
- package/dist/interactive-tables.d.ts +28 -0
- package/dist/interactive-tables.js +184 -0
- package/dist/list-tree.d.ts +4 -0
- package/dist/list-tree.js +44 -0
- package/dist/panel-drawer.d.ts +4 -0
- package/dist/panel-drawer.js +171 -0
- package/dist/presets/app-tier/styles.css +9459 -0
- package/dist/presets/app-tier/surfaces.json +1225 -0
- package/dist/presets/app-tier/tokens.json +221 -0
- package/dist/presets/prose/styles.css +9442 -0
- package/dist/presets/prose/surfaces.json +1225 -0
- package/dist/presets/prose/tokens.json +221 -0
- package/dist/presets.d.ts +6 -0
- package/dist/presets.js +27 -0
- package/dist/range-controls.d.ts +9 -0
- package/dist/range-controls.js +73 -0
- package/dist/resizable-aside.d.ts +4 -0
- package/dist/resizable-aside.js +328 -0
- package/dist/side-navigation.d.ts +4 -0
- package/dist/side-navigation.js +219 -0
- package/dist/styles.css +9442 -0
- package/dist/surfaces.json +1225 -0
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.js +88 -0
- package/dist/tier-registry.d.ts +10 -0
- package/dist/tier-registry.js +25 -0
- package/dist/tiers/app/styles.css +9459 -0
- package/dist/tiers/app/surfaces.json +1225 -0
- package/dist/tiers/app/tokens.json +221 -0
- package/dist/tiers/documentation/styles.css +9442 -0
- package/dist/tiers/documentation/surfaces.json +1225 -0
- package/dist/tiers/documentation/tokens.json +221 -0
- package/dist/tiers/editorial/styles.css +9442 -0
- package/dist/tiers/editorial/surfaces.json +1225 -0
- package/dist/tiers/editorial/tokens.json +221 -0
- package/dist/tiers/os/styles.css +9442 -0
- package/dist/tiers/os/surfaces.json +1225 -0
- package/dist/tiers/os/tokens.json +221 -0
- package/dist/tokens.json +221 -0
- package/dist/tooltip.d.ts +4 -0
- package/dist/tooltip.js +70 -0
- package/dist/top-navigation.d.ts +4 -0
- package/dist/top-navigation.js +354 -0
- package/dist/types.d.ts +155 -0
- package/dist/types.js +1 -0
- package/dist/vanilla-theme-colors.d.ts +5 -0
- package/dist/vanilla-theme-colors.js +208 -0
- package/docs/publishing.md +66 -0
- package/package.json +108 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
const VANILLA_THEME_COLOR_VARS = {
|
|
2
|
+
light: {
|
|
3
|
+
"--vf-color-text-default": "#000000",
|
|
4
|
+
"--vf-color-text-muted": "rgba(0, 0, 0, 0.6)",
|
|
5
|
+
"--vf-color-text-inactive": "rgba(0, 0, 0, 0.75)",
|
|
6
|
+
"--vf-color-link-default": "#0066cc",
|
|
7
|
+
"--vf-color-link-visited": "#7d42b8",
|
|
8
|
+
"--vf-color-focus": "#2e96ff",
|
|
9
|
+
"--vf-color-background-default": "#ffffff",
|
|
10
|
+
"--vf-color-background-alt": "#f7f7f7",
|
|
11
|
+
"--vf-color-background-code": "rgba(0, 0, 0, 0.03)",
|
|
12
|
+
"--vf-color-background-inputs": "#f5f5f5",
|
|
13
|
+
"--vf-color-background-active": "#ebebeb",
|
|
14
|
+
"--vf-color-background-hover": "#f2f2f2",
|
|
15
|
+
"--vf-color-background-overlay": "rgba(17, 17, 17, 0.85)",
|
|
16
|
+
"--vf-color-border-default": "rgba(0, 0, 0, 0.2)",
|
|
17
|
+
"--vf-color-border-high-contrast": "#707070",
|
|
18
|
+
"--vf-color-border-low-contrast": "rgba(0, 0, 0, 0.1)",
|
|
19
|
+
"--vf-color-border-neutral": "#707070",
|
|
20
|
+
"--vf-color-border-positive": "#0e8420",
|
|
21
|
+
"--vf-color-border-caution": "#cc7900",
|
|
22
|
+
"--vf-color-border-negative": "#c7162b",
|
|
23
|
+
"--vf-color-border-information": "#24598f",
|
|
24
|
+
"--vf-color-background-neutral-default": "#f2f2f2",
|
|
25
|
+
"--vf-color-background-neutral-hover": "#e5e5e5",
|
|
26
|
+
"--vf-color-background-neutral-active": "#d9d9d9",
|
|
27
|
+
"--vf-color-background-positive-default": "hsl(129deg 90% 39% / 10%)",
|
|
28
|
+
"--vf-color-background-positive-hover": "hsl(129deg 100% 39% / 15%)",
|
|
29
|
+
"--vf-color-background-positive-active": "hsl(129deg 100% 39% / 18%)",
|
|
30
|
+
"--vf-color-background-caution-default": "hsl(27deg 100% 39% / 10%)",
|
|
31
|
+
"--vf-color-background-caution-hover": "hsl(27deg 100% 39% / 15%)",
|
|
32
|
+
"--vf-color-background-caution-active": "hsl(27deg 100% 39% / 18%)",
|
|
33
|
+
"--vf-color-background-negative-default": "hsl(354deg 100% 39% / 10%)",
|
|
34
|
+
"--vf-color-background-negative-hover": "hsl(354deg 100% 39% / 15%)",
|
|
35
|
+
"--vf-color-background-negative-active": "hsl(354deg 100% 39% / 18%)",
|
|
36
|
+
"--vf-color-background-information-default": "hsl(210deg 100% 39% / 10%)",
|
|
37
|
+
"--vf-color-background-information-hover": "hsl(210deg 100% 39% / 15%)",
|
|
38
|
+
"--vf-color-background-information-active": "hsl(210deg 100% 39% / 18%)",
|
|
39
|
+
"--vf-color-button-positive-default": "#0e8420",
|
|
40
|
+
"--vf-color-button-positive-hover": "#0c6d1a",
|
|
41
|
+
"--vf-color-button-positive-active": "#0a5f17",
|
|
42
|
+
"--vf-color-button-positive-text": "#ffffff",
|
|
43
|
+
"--vf-color-button-negative-default": "#c7162b",
|
|
44
|
+
"--vf-color-button-negative-hover": "#b01326",
|
|
45
|
+
"--vf-color-button-negative-active": "#a21223",
|
|
46
|
+
"--vf-color-button-negative-text": "#ffffff",
|
|
47
|
+
"--vf-color-accent": "#0f95a1",
|
|
48
|
+
"--vf-color-brand": "#e95420"
|
|
49
|
+
},
|
|
50
|
+
dark: {
|
|
51
|
+
"--vf-color-text-default": "#ffffff",
|
|
52
|
+
"--vf-color-text-muted": "rgba(255, 255, 255, 0.6)",
|
|
53
|
+
"--vf-color-text-inactive": "rgba(255, 255, 255, 0.75)",
|
|
54
|
+
"--vf-color-link-default": "#6699cc",
|
|
55
|
+
"--vf-color-link-visited": "#a679d2",
|
|
56
|
+
"--vf-color-focus": "#99ccff",
|
|
57
|
+
"--vf-color-background-default": "#262626",
|
|
58
|
+
"--vf-color-background-alt": "#202020",
|
|
59
|
+
"--vf-color-background-code": "rgba(255, 255, 255, 0.3)",
|
|
60
|
+
"--vf-color-background-inputs": "#2f2f2f",
|
|
61
|
+
"--vf-color-background-active": "#373737",
|
|
62
|
+
"--vf-color-background-hover": "#313131",
|
|
63
|
+
"--vf-color-background-overlay": "rgba(17, 17, 17, 0.85)",
|
|
64
|
+
"--vf-color-border-default": "rgba(255, 255, 255, 0.2)",
|
|
65
|
+
"--vf-color-border-high-contrast": "#939393",
|
|
66
|
+
"--vf-color-border-low-contrast": "rgba(255, 255, 255, 0.1)",
|
|
67
|
+
"--vf-color-border-neutral": "hsl(0deg 0% 65%)",
|
|
68
|
+
"--vf-color-border-positive": "#62a36c",
|
|
69
|
+
"--vf-color-border-caution": "#c48831",
|
|
70
|
+
"--vf-color-border-negative": "#d17b85",
|
|
71
|
+
"--vf-color-border-information": "hsl(210deg 80% 65%)",
|
|
72
|
+
"--vf-color-background-neutral-default": "rgba(255, 255, 255, 0.15)",
|
|
73
|
+
"--vf-color-background-neutral-hover": "rgba(255, 255, 255, 0.2)",
|
|
74
|
+
"--vf-color-background-neutral-active": "rgba(255, 255, 255, 0.25)",
|
|
75
|
+
"--vf-color-background-positive-default": "hsl(129deg 90% 39% / 20%)",
|
|
76
|
+
"--vf-color-background-positive-hover": "hsl(129deg 100% 39% / 30%)",
|
|
77
|
+
"--vf-color-background-positive-active": "hsl(129deg 100% 39% / 36%)",
|
|
78
|
+
"--vf-color-background-caution-default": "hsl(27deg 100% 50% / 20%)",
|
|
79
|
+
"--vf-color-background-caution-hover": "hsl(27deg 100% 60% / 30%)",
|
|
80
|
+
"--vf-color-background-caution-active": "hsl(27deg 100% 50% / 36%)",
|
|
81
|
+
"--vf-color-background-negative-default": "hsl(353deg 100% 70% / 20%)",
|
|
82
|
+
"--vf-color-background-negative-hover": "hsl(353deg 100% 70% / 30%)",
|
|
83
|
+
"--vf-color-background-negative-active": "hsl(353deg 100% 70% / 36%)",
|
|
84
|
+
"--vf-color-background-information-default": "hsl(210deg 100% 50% / 20%)",
|
|
85
|
+
"--vf-color-background-information-hover": "hsl(210deg 100% 50% / 30%)",
|
|
86
|
+
"--vf-color-background-information-active": "hsl(210deg 100% 50% / 36%)",
|
|
87
|
+
"--vf-color-button-positive-default": "#008013",
|
|
88
|
+
"--vf-color-button-positive-hover": "#00670f",
|
|
89
|
+
"--vf-color-button-positive-active": "#00570d",
|
|
90
|
+
"--vf-color-button-positive-text": "#ffffff",
|
|
91
|
+
"--vf-color-button-negative-default": "#a11223",
|
|
92
|
+
"--vf-color-button-negative-hover": "#8a0f1e",
|
|
93
|
+
"--vf-color-button-negative-active": "#7c0e1b",
|
|
94
|
+
"--vf-color-button-negative-text": "#ffffff",
|
|
95
|
+
"--vf-color-accent": "#70bbc2",
|
|
96
|
+
"--vf-color-brand": "#e95420"
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const FOUNDRY_THEME_ROOT_COLOR_SOURCES = {
|
|
100
|
+
"--bf-color-bg": "--vf-color-background-default",
|
|
101
|
+
"--bf-color-surface": "--vf-color-background-alt",
|
|
102
|
+
"--bf-color-text": "--vf-color-text-default",
|
|
103
|
+
"--bf-color-muted": "--vf-color-text-muted",
|
|
104
|
+
"--bf-color-positive": "--vf-color-border-positive",
|
|
105
|
+
"--bf-color-positive-background": "--vf-color-background-positive-default",
|
|
106
|
+
"--bf-color-negative": "--vf-color-border-negative",
|
|
107
|
+
"--bf-color-negative-background": "--vf-color-background-negative-default",
|
|
108
|
+
"--bf-color-rule": "--vf-color-border-low-contrast",
|
|
109
|
+
"--bf-color-link": "--vf-color-link-default",
|
|
110
|
+
"--bf-color-link-visited": "--vf-color-link-visited",
|
|
111
|
+
"--bf-color-focus": "--vf-color-focus",
|
|
112
|
+
"--bf-color-accent": "--vf-color-accent",
|
|
113
|
+
"--bf-color-brand": "--vf-color-brand"
|
|
114
|
+
};
|
|
115
|
+
const FOUNDRY_COMPONENT_COLOR_SOURCES = {
|
|
116
|
+
"--bf-color-text-default": "--vf-color-text-default",
|
|
117
|
+
"--bf-color-text-muted": "--vf-color-text-muted",
|
|
118
|
+
"--bf-color-text-inactive": "--vf-color-text-inactive",
|
|
119
|
+
"--bf-color-link-default": "--vf-color-link-default",
|
|
120
|
+
"--bf-color-link-visited": "--vf-color-link-visited",
|
|
121
|
+
"--bf-color-background-default": "--vf-color-background-default",
|
|
122
|
+
"--bf-color-background-alt": "--vf-color-background-alt",
|
|
123
|
+
"--bf-color-background-code": "--vf-color-background-code",
|
|
124
|
+
"--bf-color-background-inputs": "--vf-color-background-inputs",
|
|
125
|
+
"--bf-color-background-hover": "--vf-color-background-hover",
|
|
126
|
+
"--bf-color-background-active": "--vf-color-background-active",
|
|
127
|
+
"--bf-color-background-overlay": "--vf-color-background-overlay",
|
|
128
|
+
"--bf-color-border-default": "--vf-color-border-default",
|
|
129
|
+
"--bf-color-border-high-contrast": "--vf-color-border-high-contrast",
|
|
130
|
+
"--bf-color-border-low-contrast": "--vf-color-border-low-contrast",
|
|
131
|
+
"--bf-color-border-neutral": "--vf-color-border-neutral",
|
|
132
|
+
"--bf-color-border-positive": "--vf-color-border-positive",
|
|
133
|
+
"--bf-color-border-caution": "--vf-color-border-caution",
|
|
134
|
+
"--bf-color-border-negative": "--vf-color-border-negative",
|
|
135
|
+
"--bf-color-border-information": "--vf-color-border-information",
|
|
136
|
+
"--bf-color-background-neutral-default": "--vf-color-background-neutral-default",
|
|
137
|
+
"--bf-color-background-neutral-hover": "--vf-color-background-neutral-hover",
|
|
138
|
+
"--bf-color-background-neutral-active": "--vf-color-background-neutral-active",
|
|
139
|
+
"--bf-color-background-positive-default": "--vf-color-background-positive-default",
|
|
140
|
+
"--bf-color-background-positive-hover": "--vf-color-background-positive-hover",
|
|
141
|
+
"--bf-color-background-positive-active": "--vf-color-background-positive-active",
|
|
142
|
+
"--bf-color-background-caution-default": "--vf-color-background-caution-default",
|
|
143
|
+
"--bf-color-background-caution-hover": "--vf-color-background-caution-hover",
|
|
144
|
+
"--bf-color-background-caution-active": "--vf-color-background-caution-active",
|
|
145
|
+
"--bf-color-background-negative-default": "--vf-color-background-negative-default",
|
|
146
|
+
"--bf-color-background-negative-hover": "--vf-color-background-negative-hover",
|
|
147
|
+
"--bf-color-background-negative-active": "--vf-color-background-negative-active",
|
|
148
|
+
"--bf-color-background-information-default": "--vf-color-background-information-default",
|
|
149
|
+
"--bf-color-background-information-hover": "--vf-color-background-information-hover",
|
|
150
|
+
"--bf-color-background-information-active": "--vf-color-background-information-active",
|
|
151
|
+
"--bf-color-button-positive-default": "--vf-color-button-positive-default",
|
|
152
|
+
"--bf-color-button-positive-hover": "--vf-color-button-positive-hover",
|
|
153
|
+
"--bf-color-button-positive-active": "--vf-color-button-positive-active",
|
|
154
|
+
"--bf-color-button-positive-text": "--vf-color-button-positive-text",
|
|
155
|
+
"--bf-color-button-negative-default": "--vf-color-button-negative-default",
|
|
156
|
+
"--bf-color-button-negative-hover": "--vf-color-button-negative-hover",
|
|
157
|
+
"--bf-color-button-negative-active": "--vf-color-button-negative-active",
|
|
158
|
+
"--bf-color-button-negative-text": "--vf-color-button-negative-text",
|
|
159
|
+
"--bf-color-accent": "--vf-color-accent",
|
|
160
|
+
"--bf-color-brand": "--vf-color-brand",
|
|
161
|
+
"--bf-color-focus": "--vf-color-focus"
|
|
162
|
+
};
|
|
163
|
+
function cssVarBlock(vars) {
|
|
164
|
+
return `${Object.entries(vars)
|
|
165
|
+
.map(([name, value]) => ` ${name}: ${value};`)
|
|
166
|
+
.join("\n")}\n`;
|
|
167
|
+
}
|
|
168
|
+
function themeVars(tone) {
|
|
169
|
+
return VANILLA_THEME_COLOR_VARS[tone];
|
|
170
|
+
}
|
|
171
|
+
function themeValue(tone, source) {
|
|
172
|
+
return themeVars(tone)[source];
|
|
173
|
+
}
|
|
174
|
+
function componentAliasFallback(alias, tone, source) {
|
|
175
|
+
const fallback = themeValue(tone, source);
|
|
176
|
+
if (alias === "--bf-color-text-default") {
|
|
177
|
+
return `var(--bf-color-text, ${fallback})`;
|
|
178
|
+
}
|
|
179
|
+
if (alias === "--bf-color-text-muted") {
|
|
180
|
+
return `var(--bf-color-muted, ${fallback})`;
|
|
181
|
+
}
|
|
182
|
+
if (alias === "--bf-color-link-default") {
|
|
183
|
+
return `var(--bf-color-link, ${fallback})`;
|
|
184
|
+
}
|
|
185
|
+
if (alias === "--bf-color-background-default") {
|
|
186
|
+
return `var(--bf-color-bg, ${fallback})`;
|
|
187
|
+
}
|
|
188
|
+
if (alias === "--bf-color-background-alt") {
|
|
189
|
+
return `var(--bf-color-surface, ${fallback})`;
|
|
190
|
+
}
|
|
191
|
+
return fallback;
|
|
192
|
+
}
|
|
193
|
+
function aliasBlock(sources, tone, getFallback = (_alias, currentTone, source) => themeValue(currentTone, source)) {
|
|
194
|
+
const vars = {};
|
|
195
|
+
for (const [alias, source] of Object.entries(sources)) {
|
|
196
|
+
vars[alias] = `var(${source}, ${getFallback(alias, tone, source)})`;
|
|
197
|
+
}
|
|
198
|
+
return cssVarBlock(vars);
|
|
199
|
+
}
|
|
200
|
+
export function vanillaThemeColorVars(tone) {
|
|
201
|
+
return cssVarBlock(themeVars(tone));
|
|
202
|
+
}
|
|
203
|
+
export function foundryThemeRootColorVars(tone) {
|
|
204
|
+
return aliasBlock(FOUNDRY_THEME_ROOT_COLOR_SOURCES, tone);
|
|
205
|
+
}
|
|
206
|
+
export function foundryComponentColorVars(tone) {
|
|
207
|
+
return aliasBlock(FOUNDRY_COMPONENT_COLOR_SOURCES, tone, componentAliasFallback);
|
|
208
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# npm publication and downstream migration
|
|
2
|
+
|
|
3
|
+
Baseline Foundry is a public npm package named `baseline-foundry`. The GitHub
|
|
4
|
+
repository may remain private: npm publishes
|
|
5
|
+
only the allowlisted package contents (`dist/`, `config/`, this publishing
|
|
6
|
+
guide, `README.md`, `LICENSE`, and package metadata), not the source, demos,
|
|
7
|
+
specs, or tests.
|
|
8
|
+
|
|
9
|
+
A private npm package would still require account or organisation access and
|
|
10
|
+
would not solve the collaborator problem. Publication therefore uses the
|
|
11
|
+
public registry explicitly.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
Install the registry package:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install baseline-foundry
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The attached GitHub release tarball is the fallback:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install https://github.com/lyubomir-popov/baseline-foundry/releases/download/v0.1.3/baseline-foundry-0.1.3.tgz
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Do not install the Git tag or GitHub source archive. `dist/` is generated and
|
|
28
|
+
gitignored, so only the npm package and attached npm tarball contain the public
|
|
29
|
+
CSS, JSON, JavaScript, and type declarations.
|
|
30
|
+
|
|
31
|
+
## Release checklist
|
|
32
|
+
|
|
33
|
+
The initial `0.1.3` publication is bootstrapped interactively because npm can
|
|
34
|
+
only attach a trusted publisher after a package exists. Routine releases use
|
|
35
|
+
the OIDC workflow below.
|
|
36
|
+
|
|
37
|
+
1. Bump BF to the next unused version and regenerate `package-lock.json`.
|
|
38
|
+
2. Run `npm run release:check` and `npm pack --dry-run`; confirm the tarball
|
|
39
|
+
contains `dist/`, `config/`, `docs/publishing.md`, `README.md`, `LICENSE`,
|
|
40
|
+
and no source or local temporary files.
|
|
41
|
+
3. Commit and push the exact release candidate.
|
|
42
|
+
4. Publish from `.github/workflows/publish.yml`; npm trusted publishing uses a
|
|
43
|
+
short-lived GitHub Actions OIDC credential, so no npm token is stored.
|
|
44
|
+
5. Verify `npm view baseline-foundry version`, then install the exact published
|
|
45
|
+
version into an empty directory and smoke-test the root, `build`, CSS, token,
|
|
46
|
+
surface, and four tier export paths.
|
|
47
|
+
6. Tag the same commit and publish the GitHub release with the npm tarball
|
|
48
|
+
attached as a fallback artifact.
|
|
49
|
+
|
|
50
|
+
## Compatibility
|
|
51
|
+
|
|
52
|
+
Keeping the package name means normal consumers do not change imports:
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
import { setupBaselineGridToggle } from "baseline-foundry";
|
|
56
|
+
import { buildThemeFromConfig } from "baseline-foundry/build";
|
|
57
|
+
import "baseline-foundry/styles.css";
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Consumers using the attached `.tgz` can switch their dependency value to a
|
|
61
|
+
semver range after publication; their JavaScript and CSS imports remain the
|
|
62
|
+
same. Lockfiles will record a registry tarball instead of a file or URL source.
|
|
63
|
+
|
|
64
|
+
Diagram Registry currently vendors generated CSS/tokens from a sibling
|
|
65
|
+
checkout, so publishing does not alter its present build. It can adopt the npm
|
|
66
|
+
artifact later as a separate, lockfile-visible migration.
|
package/package.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "baseline-foundry",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Lean baseline-aligned design system focused on typography, editorial flow, spacing, and grid primitives.",
|
|
5
|
+
"author": "Lyubomir Popov",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/lyubomir-popov/baseline-foundry.git"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"config",
|
|
17
|
+
"docs/publishing.md",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./build": {
|
|
27
|
+
"types": "./dist/build.d.ts",
|
|
28
|
+
"import": "./dist/build.js"
|
|
29
|
+
},
|
|
30
|
+
"./presets": {
|
|
31
|
+
"types": "./dist/presets.d.ts",
|
|
32
|
+
"import": "./dist/presets.js"
|
|
33
|
+
},
|
|
34
|
+
"./types": {
|
|
35
|
+
"types": "./dist/types.d.ts",
|
|
36
|
+
"import": "./dist/types.js"
|
|
37
|
+
},
|
|
38
|
+
"./styles.css": "./dist/styles.css",
|
|
39
|
+
"./tokens.json": "./dist/tokens.json",
|
|
40
|
+
"./surfaces.json": "./dist/surfaces.json",
|
|
41
|
+
"./tiers/editorial.css": "./dist/tiers/editorial/styles.css",
|
|
42
|
+
"./tiers/documentation.css": "./dist/tiers/documentation/styles.css",
|
|
43
|
+
"./tiers/app.css": "./dist/tiers/app/styles.css",
|
|
44
|
+
"./tiers/os.css": "./dist/tiers/os/styles.css",
|
|
45
|
+
"./tiers/editorial.tokens.json": "./dist/tiers/editorial/tokens.json",
|
|
46
|
+
"./tiers/documentation.tokens.json": "./dist/tiers/documentation/tokens.json",
|
|
47
|
+
"./tiers/app.tokens.json": "./dist/tiers/app/tokens.json",
|
|
48
|
+
"./tiers/os.tokens.json": "./dist/tiers/os/tokens.json",
|
|
49
|
+
"./tiers/editorial.surfaces.json": "./dist/tiers/editorial/surfaces.json",
|
|
50
|
+
"./tiers/documentation.surfaces.json": "./dist/tiers/documentation/surfaces.json",
|
|
51
|
+
"./tiers/app.surfaces.json": "./dist/tiers/app/surfaces.json",
|
|
52
|
+
"./tiers/os.surfaces.json": "./dist/tiers/os/surfaces.json",
|
|
53
|
+
"./presets/prose.css": "./dist/presets/prose/styles.css",
|
|
54
|
+
"./presets/app-tier.css": "./dist/presets/app-tier/styles.css",
|
|
55
|
+
"./presets/prose.tokens.json": "./dist/presets/prose/tokens.json",
|
|
56
|
+
"./presets/app-tier.tokens.json": "./dist/presets/app-tier/tokens.json",
|
|
57
|
+
"./presets/prose.surfaces.json": "./dist/presets/prose/surfaces.json",
|
|
58
|
+
"./presets/app-tier.surfaces.json": "./dist/presets/app-tier/surfaces.json"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"clean": "tsx scripts/clean.ts",
|
|
62
|
+
"setup:demo-font": "tsx scripts/setup-demo-font.ts",
|
|
63
|
+
"build:theme": "tsx scripts/build-theme.ts",
|
|
64
|
+
"build:lib": "tsc -p tsconfig.json",
|
|
65
|
+
"build": "npm run build:theme && npm run build:lib",
|
|
66
|
+
"demo:serve": "vite",
|
|
67
|
+
"demo": "npm run build && npm run demo:serve",
|
|
68
|
+
"test:build": "tsx scripts/validate-build.ts",
|
|
69
|
+
"test:behavior": "tsx scripts/verify-component-behavior.ts",
|
|
70
|
+
"test:components": "tsx scripts/verify-component-baselines.ts",
|
|
71
|
+
"test": "npm run build && npm run test:build && npm run test:components && npm run test:behavior",
|
|
72
|
+
"check:types": "tsc -p tsconfig.json --noEmit",
|
|
73
|
+
"audit": "npm audit && npm audit --omit=dev",
|
|
74
|
+
"release:check": "npm run setup:demo-font && npm run check:types && npm test && npm run qa:components && npm run audit",
|
|
75
|
+
"prepublishOnly": "npm run release:check",
|
|
76
|
+
"playwright:install": "playwright install chromium",
|
|
77
|
+
"compare:controls": "npm run build && tsx scripts/compare-controls.ts",
|
|
78
|
+
"compare:inline-surfaces": "npm run build && tsx scripts/compare-inline-surfaces.ts",
|
|
79
|
+
"verify:behavior": "npm run build && tsx scripts/verify-component-behavior.ts",
|
|
80
|
+
"verify:components": "npm run build && tsx scripts/verify-component-baselines.ts",
|
|
81
|
+
"screenshots:components": "npm run build && tsx scripts/capture-component-screenshots.ts",
|
|
82
|
+
"qa:components": "npm run build && tsx scripts/capture-component-screenshots.ts && tsx scripts/verify-component-baselines.ts",
|
|
83
|
+
"build:app": "tsx examples/app-tier/build.ts",
|
|
84
|
+
"demo:app": "npm run build:app && vite --host 127.0.0.1 --port 4175 --strictPort --open /examples/app-tier/",
|
|
85
|
+
"build:app-tier": "tsx examples/app-tier/build.ts",
|
|
86
|
+
"demo:app-tier": "npm run demo:app"
|
|
87
|
+
},
|
|
88
|
+
"keywords": [
|
|
89
|
+
"baseline-grid",
|
|
90
|
+
"vertical-rhythm",
|
|
91
|
+
"typography",
|
|
92
|
+
"editorial",
|
|
93
|
+
"grid"
|
|
94
|
+
],
|
|
95
|
+
"license": "MIT",
|
|
96
|
+
"dependencies": {
|
|
97
|
+
"@lyubomir-popov/baseline-nudge-generator": "^1.5.1"
|
|
98
|
+
},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@fontsource-variable/ibm-plex-sans": "^5.3.0",
|
|
101
|
+
"@types/node": "^24.13.3",
|
|
102
|
+
"playwright": "^1.62.1",
|
|
103
|
+
"postcss": "^8.5.26",
|
|
104
|
+
"tsx": "^4.23.12",
|
|
105
|
+
"typescript": "^5.8.2",
|
|
106
|
+
"vite": "^7.3.6"
|
|
107
|
+
}
|
|
108
|
+
}
|