@ethlete/core 5.0.0-next.19 → 5.0.0-next.20
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/CHANGELOG.md +18 -0
- package/fesm2022/ethlete-core.mjs +20 -7
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/generators/tailwind-4-color-theme/generator.js +36 -9
- package/generators/tailwind-4-color-theme/schema.json +4 -0
- package/generators/tailwind-4-surface-theme/generator.js +103 -69
- package/generators/tailwind-4-surface-theme/schema.json +9 -1
- package/package.json +1 -1
- package/types/ethlete-core.d.ts +57 -8
|
@@ -55,7 +55,14 @@ export default async function generate(tree, schema) {
|
|
|
55
55
|
}
|
|
56
56
|
tree.write(outputPath, css);
|
|
57
57
|
logger.log(`✅ Generated Tailwind themes at: ${outputPath}`);
|
|
58
|
-
// Step 7:
|
|
58
|
+
// Step 7: Generate the `EthleteColorThemeNameRegistry` augmentation, so `etProvideColor`
|
|
59
|
+
// (and anything else that accepts a `RegisteredColorThemeName`) is checked/autocompleted
|
|
60
|
+
// against this app's actual theme names, instead of a plain `string`.
|
|
61
|
+
const typesOutputPath = schema.typesOutputPath || outputPath.replace(/\.css$/, '.d.ts');
|
|
62
|
+
const typesDts = generateColorThemeNameTypes(themes, schema);
|
|
63
|
+
tree.write(typesOutputPath, typesDts);
|
|
64
|
+
logger.log(`✅ Generated color theme name types at: ${typesOutputPath}`);
|
|
65
|
+
// Step 8: Try to find and update main styles file
|
|
59
66
|
const mainStylesFiles = findMainStylesFile(tree);
|
|
60
67
|
if (mainStylesFiles.length > 0) {
|
|
61
68
|
logger.log('\n📝 Found potential main styles files:');
|
|
@@ -99,12 +106,9 @@ function extractThemesFromContent(content, filePath) {
|
|
|
99
106
|
if (!initializer) {
|
|
100
107
|
throw new Error('THEMES export has no initializer');
|
|
101
108
|
}
|
|
102
|
-
// Handle 'satisfies'
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
// Handle 'as const': [array] as const
|
|
107
|
-
if (initializer.isKind(SyntaxKind.AsExpression)) {
|
|
109
|
+
// Handle 'satisfies X'/'as const' wrappers, in either order: [array] satisfies Type[],
|
|
110
|
+
// [array] as const, or both combined.
|
|
111
|
+
while (initializer.isKind(SyntaxKind.SatisfiesExpression) || initializer.isKind(SyntaxKind.AsExpression)) {
|
|
108
112
|
initializer = initializer.getExpression();
|
|
109
113
|
}
|
|
110
114
|
if (!initializer.isKind(SyntaxKind.ArrayLiteralExpression)) {
|
|
@@ -126,8 +130,9 @@ function extractThemesFromContent(content, filePath) {
|
|
|
126
130
|
logger.warn(`⚠️ Theme ${name} has no initializer`);
|
|
127
131
|
continue;
|
|
128
132
|
}
|
|
129
|
-
// Handle 'as const' on individual theme objects
|
|
130
|
-
|
|
133
|
+
// Handle 'as const' and 'satisfies X' wrappers on individual theme objects, in
|
|
134
|
+
// either order (e.g. `{...} satisfies Theme`, `{...} as const`, or both combined).
|
|
135
|
+
while (themeObj.isKind(SyntaxKind.AsExpression) || themeObj.isKind(SyntaxKind.SatisfiesExpression)) {
|
|
131
136
|
themeObj = themeObj.getExpression();
|
|
132
137
|
}
|
|
133
138
|
if (!themeObj.isKind(SyntaxKind.ObjectLiteralExpression)) {
|
|
@@ -302,6 +307,28 @@ function createCssThemeName(name) {
|
|
|
302
307
|
.replace(/\s+/g, '-')
|
|
303
308
|
.replace(/[^a-z0-9-]/g, '');
|
|
304
309
|
}
|
|
310
|
+
function generateColorThemeNameTypes(themes, schema) {
|
|
311
|
+
const themesPath = schema.themesPath || 'src/themes.ts';
|
|
312
|
+
const outputPath = schema.outputPath || 'src/styles/generated-tailwind-themes.css';
|
|
313
|
+
const typesOutputPath = schema.typesOutputPath || outputPath.replace(/\.css$/, '.d.ts');
|
|
314
|
+
const names = themes.map((theme) => `'${theme.name}'`).join(' | ');
|
|
315
|
+
return `/*
|
|
316
|
+
* Auto-generated by @ethlete/core:tailwind-4-color-theme
|
|
317
|
+
* DO NOT EDIT THIS FILE MANUALLY
|
|
318
|
+
*
|
|
319
|
+
* Regenerate by running:
|
|
320
|
+
* nx g @ethlete/core:tailwind-4-color-theme --themesPath=${themesPath}${schema.outputPath ? ` --outputPath=${outputPath}` : ''}${schema.typesOutputPath ? ` --typesOutputPath=${typesOutputPath}` : ''}${schema.prefix && schema.prefix !== 'et' ? ` --prefix=${schema.prefix}` : ''}${schema.runtimePrefix && schema.runtimePrefix !== schema.prefix ? ` --runtimePrefix=${schema.runtimePrefix}` : ''}
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
declare module '@ethlete/core' {
|
|
324
|
+
interface EthleteColorThemeNameRegistry {
|
|
325
|
+
name: ${names};
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export {};
|
|
330
|
+
`;
|
|
331
|
+
}
|
|
305
332
|
function generateTailwindThemeCss(themes, utilityPrefix, runtimePrefix, schema) {
|
|
306
333
|
const tailwindVars = [];
|
|
307
334
|
const themeVars = [];
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"default": "src/styles/generated-tailwind-themes.css",
|
|
18
18
|
"x-prompt": "Where should the generated CSS be saved?"
|
|
19
19
|
},
|
|
20
|
+
"typesOutputPath": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Where to output the generated `EthleteColorThemeNameRegistry` augmentation (a .d.ts that narrows `etProvideColor` and other theme-name APIs to your actual theme names). Defaults to `outputPath` with its extension swapped to `.d.ts`."
|
|
23
|
+
},
|
|
20
24
|
"prefix": {
|
|
21
25
|
"type": "string",
|
|
22
26
|
"description": "Prefix for Tailwind utility color variable names (e.g., 'et' creates --color-et-primary, usable as bg-et-primary)",
|
|
@@ -5,6 +5,10 @@ export default async function generate(tree, schema) {
|
|
|
5
5
|
const themesPath = schema.themesPath || 'src/surface-themes.ts';
|
|
6
6
|
const outputPath = schema.outputPath || 'src/styles/generated-tailwind-surface-themes.css';
|
|
7
7
|
const prefix = schema.prefix || 'et';
|
|
8
|
+
// The runtime prefix drives the theme-swap CSS variables (--<runtimePrefix>-surface-*)
|
|
9
|
+
// and selectors (.<runtimePrefix>-surface--<name>). It defaults to `prefix` so existing
|
|
10
|
+
// consumers who only ever passed one prefix see no change in output.
|
|
11
|
+
const runtimePrefix = schema.runtimePrefix || prefix;
|
|
8
12
|
if (!tree.exists(themesPath)) {
|
|
9
13
|
logger.error(`❌ Surface themes file not found at: ${themesPath}`);
|
|
10
14
|
logger.log(`\nPlease specify the correct path using --themesPath option.`);
|
|
@@ -38,9 +42,16 @@ export default async function generate(tree, schema) {
|
|
|
38
42
|
return;
|
|
39
43
|
}
|
|
40
44
|
logger.log('\n🎨 Generating Tailwind surface theme CSS...');
|
|
41
|
-
const css = generateSurfaceThemeCss(themes, prefix, schema);
|
|
45
|
+
const css = generateSurfaceThemeCss(themes, prefix, runtimePrefix, schema);
|
|
42
46
|
tree.write(outputPath, css);
|
|
43
47
|
logger.log(`✅ Generated Tailwind surface themes at: ${outputPath}`);
|
|
48
|
+
// Generate the `EthleteSurfaceThemeNameRegistry` augmentation, so `etProvideSurface` (and
|
|
49
|
+
// anything else that accepts a `RegisteredSurfaceThemeName`) is checked/autocompleted
|
|
50
|
+
// against this app's actual surface theme names, instead of a plain `string`.
|
|
51
|
+
const typesOutputPath = schema.typesOutputPath || outputPath.replace(/\.css$/, '.d.ts');
|
|
52
|
+
const typesDts = generateSurfaceThemeNameTypes(themes, schema);
|
|
53
|
+
tree.write(typesOutputPath, typesDts);
|
|
54
|
+
logger.log(`✅ Generated surface theme name types at: ${typesOutputPath}`);
|
|
44
55
|
const mainStylesFiles = findMainStylesFile(tree);
|
|
45
56
|
if (mainStylesFiles.length > 0) {
|
|
46
57
|
logger.log('\n📝 Found potential main styles files:');
|
|
@@ -80,10 +91,9 @@ function extractSurfaceThemesFromContent(content, filePath) {
|
|
|
80
91
|
if (!initializer) {
|
|
81
92
|
throw new Error('SURFACE_THEMES export has no initializer');
|
|
82
93
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (initializer.isKind(SyntaxKind.AsExpression)) {
|
|
94
|
+
// Handle 'satisfies X'/'as const' wrappers, in either order: [array] satisfies Type[],
|
|
95
|
+
// [array] as const, or both combined.
|
|
96
|
+
while (initializer.isKind(SyntaxKind.SatisfiesExpression) || initializer.isKind(SyntaxKind.AsExpression)) {
|
|
87
97
|
initializer = initializer.getExpression();
|
|
88
98
|
}
|
|
89
99
|
if (!initializer.isKind(SyntaxKind.ArrayLiteralExpression)) {
|
|
@@ -103,7 +113,9 @@ function extractSurfaceThemesFromContent(content, filePath) {
|
|
|
103
113
|
logger.warn(`⚠️ Surface theme ${name} has no initializer`);
|
|
104
114
|
continue;
|
|
105
115
|
}
|
|
106
|
-
|
|
116
|
+
// Handle 'as const' and 'satisfies X' wrappers on individual theme objects, in
|
|
117
|
+
// either order (e.g. `{...} satisfies SurfaceTheme`, `{...} as const`, or both).
|
|
118
|
+
while (themeObj.isKind(SyntaxKind.AsExpression) || themeObj.isKind(SyntaxKind.SatisfiesExpression)) {
|
|
107
119
|
themeObj = themeObj.getExpression();
|
|
108
120
|
}
|
|
109
121
|
if (!themeObj.isKind(SyntaxKind.ObjectLiteralExpression)) {
|
|
@@ -214,18 +226,40 @@ function createCssSurfaceName(name) {
|
|
|
214
226
|
.replace(/\s+/g, '-')
|
|
215
227
|
.replace(/[^a-z0-9-]/g, '');
|
|
216
228
|
}
|
|
217
|
-
function
|
|
229
|
+
function generateSurfaceThemeNameTypes(themes, schema) {
|
|
230
|
+
const themesPath = schema.themesPath || 'src/surface-themes.ts';
|
|
231
|
+
const outputPath = schema.outputPath || 'src/styles/generated-tailwind-surface-themes.css';
|
|
232
|
+
const typesOutputPath = schema.typesOutputPath || outputPath.replace(/\.css$/, '.d.ts');
|
|
233
|
+
const names = themes.map((theme) => `'${theme.name}'`).join(' | ');
|
|
234
|
+
return `/*
|
|
235
|
+
* Auto-generated by @ethlete/core:tailwind-4-surface-theme
|
|
236
|
+
* DO NOT EDIT THIS FILE MANUALLY
|
|
237
|
+
*
|
|
238
|
+
* Regenerate by running:
|
|
239
|
+
* nx g @ethlete/core:tailwind-4-surface-theme --themesPath=${themesPath}${schema.outputPath ? ` --outputPath=${outputPath}` : ''}${schema.typesOutputPath ? ` --typesOutputPath=${typesOutputPath}` : ''}${schema.prefix && schema.prefix !== 'et' ? ` --prefix=${schema.prefix}` : ''}
|
|
240
|
+
*/
|
|
241
|
+
|
|
242
|
+
declare module '@ethlete/core' {
|
|
243
|
+
interface EthleteSurfaceThemeNameRegistry {
|
|
244
|
+
name: ${names};
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export {};
|
|
249
|
+
`;
|
|
250
|
+
}
|
|
251
|
+
function generateSurfaceThemeCss(themes, utilityPrefix, runtimePrefix, schema) {
|
|
218
252
|
const tailwindVars = [];
|
|
219
253
|
const themeVars = [];
|
|
220
254
|
const themesPath = schema.themesPath || 'src/surface-themes.ts';
|
|
221
255
|
const outputPath = schema.outputPath || 'src/styles/generated-tailwind-surface-themes.css';
|
|
222
|
-
const header = `/*
|
|
256
|
+
const header = `/*
|
|
223
257
|
* Auto-generated Tailwind 4 surface theme colors from @ethlete/core
|
|
224
258
|
* DO NOT EDIT THIS FILE MANUALLY
|
|
225
|
-
*
|
|
259
|
+
*
|
|
226
260
|
* Generated from your surface theme definitions
|
|
227
261
|
* This file can be regenerated by running:
|
|
228
|
-
* nx g @ethlete/core:tailwind-4-surface-theme --themesPath=${themesPath}${schema.outputPath ? ` --outputPath=${outputPath}` : ''}${schema.prefix && schema.prefix !== 'et' ? ` --prefix=${schema.prefix}` : ''}
|
|
262
|
+
* nx g @ethlete/core:tailwind-4-surface-theme --themesPath=${themesPath}${schema.outputPath ? ` --outputPath=${outputPath}` : ''}${schema.prefix && schema.prefix !== 'et' ? ` --prefix=${schema.prefix}` : ''}${schema.runtimePrefix && schema.runtimePrefix !== schema.prefix ? ` --runtimePrefix=${schema.runtimePrefix}` : ''}
|
|
229
263
|
*/
|
|
230
264
|
|
|
231
265
|
`;
|
|
@@ -235,45 +269,45 @@ function generateSurfaceThemeCss(themes, prefix, schema) {
|
|
|
235
269
|
for (const theme of themes) {
|
|
236
270
|
const name = createCssSurfaceName(theme.name);
|
|
237
271
|
tailwindVars.push(` /* ${theme.name} surface */`);
|
|
238
|
-
tailwindVars.push(` --color-${
|
|
239
|
-
tailwindVars.push(` --color-${
|
|
240
|
-
tailwindVars.push(` --color-${
|
|
241
|
-
tailwindVars.push(` --color-${
|
|
242
|
-
tailwindVars.push(` --color-${
|
|
272
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-bg: rgb(${theme.background});`);
|
|
273
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}: rgb(${theme.color});`);
|
|
274
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-muted: rgb(${theme.colorMuted});`);
|
|
275
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-subtle: rgb(${theme.colorSubtle});`);
|
|
276
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-border: rgb(${theme.border});`);
|
|
243
277
|
if (theme.interactionColor) {
|
|
244
|
-
tailwindVars.push(` --color-${
|
|
245
|
-
tailwindVars.push(` --color-${
|
|
246
|
-
tailwindVars.push(` --color-${
|
|
247
|
-
tailwindVars.push(` --color-${
|
|
248
|
-
tailwindVars.push(` --color-${
|
|
278
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-interaction: rgb(${theme.interactionColor.default});`);
|
|
279
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-interaction-hover: rgb(${theme.interactionColor.hover});`);
|
|
280
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-interaction-focus: rgb(${theme.interactionColor.focus});`);
|
|
281
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-interaction-active: rgb(${theme.interactionColor.active});`);
|
|
282
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-interaction-disabled: rgb(${theme.interactionColor.disabled});`);
|
|
249
283
|
}
|
|
250
284
|
tailwindVars.push('');
|
|
251
285
|
}
|
|
252
286
|
// Dynamic surface colors (reference runtime CSS variables)
|
|
253
287
|
tailwindVars.push(' /* Dynamic surface colors (references runtime CSS variables) */');
|
|
254
|
-
tailwindVars.push(` --color-${
|
|
255
|
-
tailwindVars.push(` --color-${
|
|
256
|
-
tailwindVars.push(` --color-${
|
|
257
|
-
tailwindVars.push(` --color-${
|
|
258
|
-
tailwindVars.push(` --color-${
|
|
288
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-bg: rgb(var(--${runtimePrefix}-surface-background));`);
|
|
289
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface: rgb(var(--${runtimePrefix}-surface-color));`);
|
|
290
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-muted: rgb(var(--${runtimePrefix}-surface-color-muted));`);
|
|
291
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-subtle: rgb(var(--${runtimePrefix}-surface-color-subtle));`);
|
|
292
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-border: rgb(var(--${runtimePrefix}-surface-border));`);
|
|
259
293
|
// Dynamic interaction colors (reference runtime CSS variables)
|
|
260
|
-
tailwindVars.push(` --color-${
|
|
261
|
-
tailwindVars.push(` --color-${
|
|
262
|
-
tailwindVars.push(` --color-${
|
|
263
|
-
tailwindVars.push(` --color-${
|
|
264
|
-
tailwindVars.push(` --color-${
|
|
294
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-interaction: rgb(var(--${runtimePrefix}-surface-interaction));`);
|
|
295
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-interaction-hover: rgb(var(--${runtimePrefix}-surface-interaction-hover));`);
|
|
296
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-interaction-focus: rgb(var(--${runtimePrefix}-surface-interaction-focus));`);
|
|
297
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-interaction-active: rgb(var(--${runtimePrefix}-surface-interaction-active));`);
|
|
298
|
+
tailwindVars.push(` --color-${utilityPrefix}-surface-interaction-disabled: rgb(var(--${runtimePrefix}-surface-interaction-disabled));`);
|
|
265
299
|
// Runtime CSS — theme selector classes
|
|
266
300
|
for (const theme of themes) {
|
|
267
301
|
const name = createCssSurfaceName(theme.name);
|
|
268
302
|
const isDefault = theme.isDefault;
|
|
269
303
|
if (isDefault) {
|
|
270
|
-
const selectors = [`.${
|
|
304
|
+
const selectors = [`.${runtimePrefix}-surface--default-${theme.type}`, `.${runtimePrefix}-surface--${name}`];
|
|
271
305
|
themeVars.push(`${selectors.join(', ')} {`);
|
|
272
306
|
}
|
|
273
307
|
else {
|
|
274
|
-
themeVars.push(`.${
|
|
308
|
+
themeVars.push(`.${runtimePrefix}-surface--${name} {`);
|
|
275
309
|
}
|
|
276
|
-
pushSurfaceVars(themeVars,
|
|
310
|
+
pushSurfaceVars(themeVars, runtimePrefix, theme, ' ');
|
|
277
311
|
themeVars.push('}\n');
|
|
278
312
|
}
|
|
279
313
|
// Media query defaults — apply surface vars to :root based on prefers-color-scheme
|
|
@@ -282,50 +316,50 @@ function generateSurfaceThemeCss(themes, prefix, schema) {
|
|
|
282
316
|
if (defaultLight) {
|
|
283
317
|
themeVars.push(`@media (prefers-color-scheme: light) {`);
|
|
284
318
|
themeVars.push(` :root {`);
|
|
285
|
-
pushSurfaceVars(themeVars,
|
|
319
|
+
pushSurfaceVars(themeVars, runtimePrefix, defaultLight, ' ');
|
|
286
320
|
themeVars.push(` }`);
|
|
287
321
|
themeVars.push(`}\n`);
|
|
288
322
|
}
|
|
289
323
|
if (defaultDark) {
|
|
290
324
|
themeVars.push(`@media (prefers-color-scheme: dark) {`);
|
|
291
325
|
themeVars.push(` :root {`);
|
|
292
|
-
pushSurfaceVars(themeVars,
|
|
326
|
+
pushSurfaceVars(themeVars, runtimePrefix, defaultDark, ' ');
|
|
293
327
|
themeVars.push(` }`);
|
|
294
328
|
themeVars.push(`}\n`);
|
|
295
329
|
}
|
|
296
330
|
// Convenience var aliases — available on any element with a surface class or :root (via media queries)
|
|
297
331
|
const aliasBlock = `/* Convenience aliases (rgb + solid variants) */
|
|
298
332
|
@layer base {
|
|
299
|
-
:root, :where([class*="${
|
|
300
|
-
--${
|
|
301
|
-
--${
|
|
333
|
+
:root, :where([class*="${runtimePrefix}-surface--"]) {
|
|
334
|
+
--${runtimePrefix}-surface-background-rgb: var(--${runtimePrefix}-surface-background);
|
|
335
|
+
--${runtimePrefix}-surface-background-solid: rgb(var(--${runtimePrefix}-surface-background-rgb));
|
|
302
336
|
|
|
303
|
-
--${
|
|
304
|
-
--${
|
|
337
|
+
--${runtimePrefix}-surface-color-rgb: var(--${runtimePrefix}-surface-color);
|
|
338
|
+
--${runtimePrefix}-surface-color-solid: rgb(var(--${runtimePrefix}-surface-color-rgb));
|
|
305
339
|
|
|
306
|
-
--${
|
|
307
|
-
--${
|
|
340
|
+
--${runtimePrefix}-surface-color-muted-rgb: var(--${runtimePrefix}-surface-color-muted);
|
|
341
|
+
--${runtimePrefix}-surface-color-muted-solid: rgb(var(--${runtimePrefix}-surface-color-muted-rgb));
|
|
308
342
|
|
|
309
|
-
--${
|
|
310
|
-
--${
|
|
343
|
+
--${runtimePrefix}-surface-color-subtle-rgb: var(--${runtimePrefix}-surface-color-subtle);
|
|
344
|
+
--${runtimePrefix}-surface-color-subtle-solid: rgb(var(--${runtimePrefix}-surface-color-subtle-rgb));
|
|
311
345
|
|
|
312
|
-
--${
|
|
313
|
-
--${
|
|
346
|
+
--${runtimePrefix}-surface-border-rgb: var(--${runtimePrefix}-surface-border);
|
|
347
|
+
--${runtimePrefix}-surface-border-solid: rgb(var(--${runtimePrefix}-surface-border-rgb));
|
|
314
348
|
|
|
315
|
-
--${
|
|
316
|
-
--${
|
|
349
|
+
--${runtimePrefix}-surface-interaction-rgb: var(--${runtimePrefix}-surface-interaction);
|
|
350
|
+
--${runtimePrefix}-surface-interaction-solid: rgb(var(--${runtimePrefix}-surface-interaction-rgb));
|
|
317
351
|
|
|
318
|
-
--${
|
|
319
|
-
--${
|
|
352
|
+
--${runtimePrefix}-surface-interaction-hover-rgb: var(--${runtimePrefix}-surface-interaction-hover);
|
|
353
|
+
--${runtimePrefix}-surface-interaction-hover-solid: rgb(var(--${runtimePrefix}-surface-interaction-hover-rgb));
|
|
320
354
|
|
|
321
|
-
--${
|
|
322
|
-
--${
|
|
355
|
+
--${runtimePrefix}-surface-interaction-focus-rgb: var(--${runtimePrefix}-surface-interaction-focus);
|
|
356
|
+
--${runtimePrefix}-surface-interaction-focus-solid: rgb(var(--${runtimePrefix}-surface-interaction-focus-rgb));
|
|
323
357
|
|
|
324
|
-
--${
|
|
325
|
-
--${
|
|
358
|
+
--${runtimePrefix}-surface-interaction-active-rgb: var(--${runtimePrefix}-surface-interaction-active);
|
|
359
|
+
--${runtimePrefix}-surface-interaction-active-solid: rgb(var(--${runtimePrefix}-surface-interaction-active-rgb));
|
|
326
360
|
|
|
327
|
-
--${
|
|
328
|
-
--${
|
|
361
|
+
--${runtimePrefix}-surface-interaction-disabled-rgb: var(--${runtimePrefix}-surface-interaction-disabled);
|
|
362
|
+
--${runtimePrefix}-surface-interaction-disabled-solid: rgb(var(--${runtimePrefix}-surface-interaction-disabled-rgb));
|
|
329
363
|
}
|
|
330
364
|
}
|
|
331
365
|
`;
|
|
@@ -339,20 +373,20 @@ ${themeVars.join('\n')}
|
|
|
339
373
|
|
|
340
374
|
${aliasBlock}`;
|
|
341
375
|
}
|
|
342
|
-
function pushSurfaceVars(vars,
|
|
343
|
-
vars.push(`${indent}--${
|
|
344
|
-
vars.push(`${indent}--${
|
|
345
|
-
vars.push(`${indent}--${
|
|
346
|
-
vars.push(`${indent}--${
|
|
347
|
-
vars.push(`${indent}--${
|
|
348
|
-
vars.push(`${indent}--${
|
|
349
|
-
vars.push(`${indent}--${
|
|
376
|
+
function pushSurfaceVars(vars, runtimePrefix, theme, indent) {
|
|
377
|
+
vars.push(`${indent}--${runtimePrefix}-surface-background: ${theme.background};`);
|
|
378
|
+
vars.push(`${indent}--${runtimePrefix}-surface-color: ${theme.color};`);
|
|
379
|
+
vars.push(`${indent}--${runtimePrefix}-surface-color-muted: ${theme.colorMuted};`);
|
|
380
|
+
vars.push(`${indent}--${runtimePrefix}-surface-color-subtle: ${theme.colorSubtle};`);
|
|
381
|
+
vars.push(`${indent}--${runtimePrefix}-surface-border: ${theme.border};`);
|
|
382
|
+
vars.push(`${indent}--${runtimePrefix}-surface-type: ${theme.type};`);
|
|
383
|
+
vars.push(`${indent}--${runtimePrefix}-surface-elevation: ${theme.elevation};`);
|
|
350
384
|
if (theme.interactionColor) {
|
|
351
|
-
vars.push(`${indent}--${
|
|
352
|
-
vars.push(`${indent}--${
|
|
353
|
-
vars.push(`${indent}--${
|
|
354
|
-
vars.push(`${indent}--${
|
|
355
|
-
vars.push(`${indent}--${
|
|
385
|
+
vars.push(`${indent}--${runtimePrefix}-surface-interaction: ${theme.interactionColor.default};`);
|
|
386
|
+
vars.push(`${indent}--${runtimePrefix}-surface-interaction-hover: ${theme.interactionColor.hover};`);
|
|
387
|
+
vars.push(`${indent}--${runtimePrefix}-surface-interaction-focus: ${theme.interactionColor.focus};`);
|
|
388
|
+
vars.push(`${indent}--${runtimePrefix}-surface-interaction-active: ${theme.interactionColor.active};`);
|
|
389
|
+
vars.push(`${indent}--${runtimePrefix}-surface-interaction-disabled: ${theme.interactionColor.disabled};`);
|
|
356
390
|
}
|
|
357
391
|
}
|
|
358
392
|
function findMainStylesFile(tree) {
|
|
@@ -17,11 +17,19 @@
|
|
|
17
17
|
"default": "src/styles/generated-tailwind-surface-themes.css",
|
|
18
18
|
"x-prompt": "Where should the generated CSS be saved?"
|
|
19
19
|
},
|
|
20
|
+
"typesOutputPath": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Where to output the generated `EthleteSurfaceThemeNameRegistry` augmentation (a .d.ts that narrows `etProvideSurface` and other surface-theme-name APIs to your actual surface theme names). Defaults to `outputPath` with its extension swapped to `.d.ts`."
|
|
23
|
+
},
|
|
20
24
|
"prefix": {
|
|
21
25
|
"type": "string",
|
|
22
|
-
"description": "Prefix for surface variable names (e.g., 'et' creates --color-et-surface
|
|
26
|
+
"description": "Prefix for Tailwind utility surface variable names (e.g., 'et' creates --color-et-surface-*, usable as bg-et-surface)",
|
|
23
27
|
"default": "et"
|
|
24
28
|
},
|
|
29
|
+
"runtimePrefix": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Prefix for the runtime theme-swap mechanism: the CSS custom properties (--<runtimePrefix>-surface-*) and selectors (.<runtimePrefix>-surface--<name>) that ProvideSurfaceDirective (etProvideSurface) toggles between. Defaults to the same value as 'prefix'. Set this separately when your Tailwind utility prefix needs to differ from your runtime theme-switching prefix."
|
|
32
|
+
},
|
|
25
33
|
"skipFormat": {
|
|
26
34
|
"type": "boolean",
|
|
27
35
|
"description": "Skip formatting files after generation",
|
package/package.json
CHANGED
package/types/ethlete-core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, AfterViewInit, Signal, ComponentRef, StaticProvider, EmbeddedViewRef, WritableSignal, InputSignalWithTransform, ElementRef, QueryList, RendererStyleFlags2, Type, Provider, Injector, ViewContainerRef, computed, InjectOptions, TemplateRef,
|
|
2
|
+
import { InjectionToken, AfterViewInit, InputSignal, Signal, ComponentRef, StaticProvider, EmbeddedViewRef, WritableSignal, InputSignalWithTransform, ElementRef, QueryList, RendererStyleFlags2, Type, Provider, Injector, ViewContainerRef, computed, InjectOptions, TemplateRef, PipeTransform, TrackByFunction, DestroyRef, OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
4
|
import { Observable, BehaviorSubject, Subject } from 'rxjs';
|
|
5
5
|
import * as _ethlete_core from '@ethlete/core';
|
|
@@ -10,7 +10,7 @@ import { MatchListView, ParticipantViewUnion, MatchRankingView, StageType } from
|
|
|
10
10
|
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
11
11
|
import { AbstractControl, FormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
12
12
|
import * as _angular_router from '@angular/router';
|
|
13
|
-
import { Data, Params } from '@angular/router';
|
|
13
|
+
import { Data, Params, Router } from '@angular/router';
|
|
14
14
|
|
|
15
15
|
declare const ANIMATABLE_TOKEN: InjectionToken<AnimatableDirective>;
|
|
16
16
|
type AnimationEndEvent = {
|
|
@@ -206,6 +206,27 @@ type ColorTheme = {
|
|
|
206
206
|
secondary?: ThemeSwatch;
|
|
207
207
|
tertiary?: ThemeSwatch;
|
|
208
208
|
};
|
|
209
|
+
/**
|
|
210
|
+
* Augmentable registry for the literal set of color theme names an app defines. Left
|
|
211
|
+
* empty by default, which keeps theme-name-accepting APIs (like `etProvideColor`) typed
|
|
212
|
+
* as plain `string`.
|
|
213
|
+
*
|
|
214
|
+
* Apps that want those APIs checked and autocompleted against their own theme names
|
|
215
|
+
* should augment this interface once, near where their themes are defined:
|
|
216
|
+
*
|
|
217
|
+
* ```ts
|
|
218
|
+
* declare module '@ethlete/core' {
|
|
219
|
+
* interface EthleteColorThemeNameRegistry {
|
|
220
|
+
* name: 'pitch-green' | 'red' | 'light-grey';
|
|
221
|
+
* }
|
|
222
|
+
* }
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
interface EthleteColorThemeNameRegistry {
|
|
226
|
+
}
|
|
227
|
+
type RegisteredColorThemeName = EthleteColorThemeNameRegistry extends {
|
|
228
|
+
name: infer N extends string;
|
|
229
|
+
} ? N : string;
|
|
209
230
|
declare const createCssColorThemeName: (name: string) => string;
|
|
210
231
|
declare const ɵProvideColorThemes: (valueOverride?: (ColorTheme | undefined)[] | undefined) => _angular_core.Provider[];
|
|
211
232
|
declare const injectColorThemes: {
|
|
@@ -270,14 +291,14 @@ declare class ProvideColorDirective {
|
|
|
270
291
|
private injector;
|
|
271
292
|
private currentProviderSync;
|
|
272
293
|
private forcedColor;
|
|
273
|
-
color:
|
|
294
|
+
color: InputSignal<RegisteredColorThemeName | ColorTheme | null | undefined>;
|
|
274
295
|
effectiveColor: _angular_core.Signal<string | ColorTheme | null | undefined>;
|
|
275
296
|
colorName: _angular_core.Signal<string | undefined>;
|
|
276
297
|
protected themeClass: _angular_core.Signal<string>;
|
|
277
298
|
syncWithProvider(provider: ProvideColorDirective): void;
|
|
278
299
|
stopSyncWithProvider(): void;
|
|
279
300
|
/** @internal */
|
|
280
|
-
forceColor(color:
|
|
301
|
+
forceColor(color: RegisteredColorThemeName | ColorTheme | null): void;
|
|
281
302
|
/** @internal */
|
|
282
303
|
clearForcedColor(): void;
|
|
283
304
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProvideColorDirective, never>;
|
|
@@ -309,6 +330,27 @@ type SurfaceTheme = {
|
|
|
309
330
|
colorSubtle: SurfaceThemeColor;
|
|
310
331
|
border: SurfaceThemeColor;
|
|
311
332
|
};
|
|
333
|
+
/**
|
|
334
|
+
* Augmentable registry for the literal set of surface theme names an app defines. Left
|
|
335
|
+
* empty by default, which keeps surface-theme-name-accepting APIs (like `etProvideSurface`)
|
|
336
|
+
* typed as plain `string`.
|
|
337
|
+
*
|
|
338
|
+
* Apps that want those APIs checked and autocompleted against their own surface theme
|
|
339
|
+
* names should augment this interface once, near where their surface themes are defined:
|
|
340
|
+
*
|
|
341
|
+
* ```ts
|
|
342
|
+
* declare module '@ethlete/core' {
|
|
343
|
+
* interface EthleteSurfaceThemeNameRegistry {
|
|
344
|
+
* name: 'card' | 'sheet' | 'popover';
|
|
345
|
+
* }
|
|
346
|
+
* }
|
|
347
|
+
* ```
|
|
348
|
+
*/
|
|
349
|
+
interface EthleteSurfaceThemeNameRegistry {
|
|
350
|
+
}
|
|
351
|
+
type RegisteredSurfaceThemeName = EthleteSurfaceThemeNameRegistry extends {
|
|
352
|
+
name: infer N extends string;
|
|
353
|
+
} ? N : string;
|
|
312
354
|
declare const createCssSurfaceName: (name: string) => string;
|
|
313
355
|
declare const resolveSurfaceByElevation: (themes: SurfaceTheme[], type: SurfaceType, elevation: number) => SurfaceTheme | null;
|
|
314
356
|
declare const ɵProvideSurfaceThemes: (valueOverride?: (SurfaceTheme | undefined)[] | undefined) => _angular_core.Provider[];
|
|
@@ -336,7 +378,7 @@ declare class ProvideSurfaceDirective {
|
|
|
336
378
|
private injector;
|
|
337
379
|
private currentProviderSync;
|
|
338
380
|
private forcedSurface;
|
|
339
|
-
surface:
|
|
381
|
+
surface: InputSignal<RegisteredSurfaceThemeName | null | undefined>;
|
|
340
382
|
effectiveSurface: _angular_core.Signal<string | null | undefined>;
|
|
341
383
|
resolvedTheme: _angular_core.Signal<SurfaceTheme | null>;
|
|
342
384
|
elevation: _angular_core.Signal<number>;
|
|
@@ -346,7 +388,7 @@ declare class ProvideSurfaceDirective {
|
|
|
346
388
|
syncWithProvider(provider: ProvideSurfaceDirective): void;
|
|
347
389
|
stopSyncWithProvider(): void;
|
|
348
390
|
/** @internal */
|
|
349
|
-
forceSurface(surface:
|
|
391
|
+
forceSurface(surface: RegisteredSurfaceThemeName | null): void;
|
|
350
392
|
/** @internal */
|
|
351
393
|
clearForcedSurface(): void;
|
|
352
394
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProvideSurfaceDirective, never>;
|
|
@@ -1343,6 +1385,13 @@ declare const injectUrl: () => Signal<string>;
|
|
|
1343
1385
|
* @example "/my-page"
|
|
1344
1386
|
*/
|
|
1345
1387
|
declare const injectRoute: () => Signal<string>;
|
|
1388
|
+
declare const createRouterState: (router: Router) => RouterState;
|
|
1389
|
+
/**
|
|
1390
|
+
* Read the current route (the committed url without query params and fragment) straight from the router.
|
|
1391
|
+
* Unlike the `injectRoute` signal this reads synchronously, so it can be used inside a `router.events` handler
|
|
1392
|
+
* where `router.url` is already committed. Falls back to the browser location before the first navigation commits.
|
|
1393
|
+
*/
|
|
1394
|
+
declare const createRoute: (router: Router) => string;
|
|
1346
1395
|
/**
|
|
1347
1396
|
* Inject the complete router state. This includes the current route data, path params, query params, title and fragment.
|
|
1348
1397
|
*/
|
|
@@ -2783,5 +2832,5 @@ declare const injectTitleStore: {
|
|
|
2783
2832
|
};
|
|
2784
2833
|
declare const applyHeadTitleBinding: (binding: MaybeSignal<string | number | null | undefined>, options?: Omit<TitlePart, "text">) => void;
|
|
2785
2834
|
|
|
2786
|
-
export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, ANIMATION_DEBUG_STORAGE_KEY, AT_LEAST_ONE_REQUIRED, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AnimatedOverlayDirective, BOUNDARY_ELEMENT_TOKEN, BREAKPOINT_INSTANCE_TOKEN, BREAKPOINT_ORDER, COLOR_PROVIDER, ClickOutsideDirective, ColorInteractiveContainerDirective, ColorInteractiveDirective, ColorInteractiveExcludeDirective, ColorInteractiveHasFocusDirective, DEFAULT_MULTI_INSTANCE_RELS, DEFAULT_MULTI_INSTANCE_TAGS, DEFAULT_VIEWPORT_CONFIG, DISABLE_LOGGER_PARAM, DragHandleDirective, ET_DISABLE_SCROLL_TOP, ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE, ET_DISABLE_SCROLL_TOP_ON_PATH_PARAM_CHANGE, ET_PROPERTY_REMOVED, FOCUSABLE_SELECTOR, FOCUS_VISIBLE_TRACKER_TOKEN, HtmlToMarkdownPipe, IS_ARRAY_NOT_EMPTY, IS_EMAIL, InferMimeTypePipe, IsArrayNotEmpty, IsEmail, jsonLd_d as JsonLD, KeyPressManager, MUST_MATCH, MarkdownToHtmlPipe, MatchStateType, MustMatch, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, PropsDirective, ProvideColorDirective, ProvideSurfaceDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeHandlesComponent, RuntimeError, SEO_DIRECTIVE_TOKEN, SURFACE_PROVIDER, SURFACE_TYPE, ScrollObserverDirective, ScrollObserverEndDirective, ScrollObserverStartDirective, SeoDirective, StructuredDataComponent, SurfaceInteractiveDirective, ToArrayPipe, TypedQueryList, ValidateAtLeastOneRequired, Validators, animationDebugLog, applyAlternateBinding, applyAlternateLanguagesBindings, applyArticleBindings, applyAuthorBinding, applyCanonicalBinding, applyCenteredPosition, applyDescriptionBinding, applyGlobalPosition, applyHeadBinding, applyHeadTitleBinding, applyHostListener, applyHostListeners, applyInitialFocus, applyKeywordsBinding, applyLinkBinding, applyMetaBinding, applyNextBinding, applyOgBinding, applyOpenGraphBindings, applyPrevBinding, applyResourceHintsBindings, applyRobotsBinding, applySocialMediaBindings, applyStructuredDataBinding, applyTwitterCardBindings, areScrollStatesEqual, bindProps, boolBreakpointTransform, booleanBreakpointAttribute, boundingClientRectToElementRect, breakpointTransformBase, buildElementSignal, buildSignalEffects, canUseSessionMemory, clamp, clone, cloneFormGroup, computedTillFalsy, computedTillTruthy, controlValueSignal, controlValueSignalWithPrevious, createAnchoredPositionCleanup, createArrayPropertyBinding, createAutoSessionMemoryKey, createBulkPropertyBinding, createCanAnimateSignal, createComponentId, createCssColorThemeName, createCssSurfaceName, createDependencyStash, createDestroy, createDocumentElementSignal, createElementDictionary, createElementDimensions, createEmptyElementSignal, createFlipAnimation, createFlipAnimationGroup, createHostProps, createIsRenderedSignal, createLogger, createOverlayRuntimeRef, createPropHandlers, createPropertyBinding, createProps, createProvider, createRootProvider, createRootThemeCss, createRxHostListener, createSessionMemory, createSetup, createStaticProvider, createStaticRootProvider, createSwatchCss, createSwipeTracker, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createUserConsentProvider, deferredSignal, deleteCookie, easeElastic, easeIn, easeInOut, easeLinear, easeOut, easeOutBack, easeOutBackStrong, elementCanScroll, equal, firstElementSignal, focusElement, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementScrollCoordinates, getFocusableElements, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getHeadingElement, getKnockoutMatchScore, getMatchScoreSubLine, getObjectProperty, getScrollContainerTarget, getScrollItemTarget, getScrollSnapTarget, hasCookie, htmlToMarkdown, inferMimeType, injectAngularRootElement, injectBoundaryElement, injectBreakpointInput, injectBreakpointIsMatched, injectBreakpointObserver, injectCanHover, injectColorThemes, injectColorThemesPrefix, injectCurrentBreakpoint, injectDeviceInputType, injectDisplayOrientation, injectErrorTheme, injectFocusVisibleTracker, injectFragment, injectHasPrecisionInput, injectHasTouchInput, injectHostElement, injectIs2Xl, injectIsLandscape, injectIsLg, injectIsMd, injectIsPortrait, injectIsRouterInitialized, injectIsSm, injectIsXl, injectIsXs, injectLinkStore, injectLinkStoreConfig, injectLocale, injectMediaQueryIsMatched, injectMetaConfig, injectMetaStore, injectObserveBreakpoint, injectObserveMediaQuery, injectOverlayRuntime, injectPathParam, injectPathParamChanges, injectPathParams, injectQueryParam, injectQueryParamChanges, injectQueryParams, injectRenderer, injectRoute, injectRouteData, injectRouteDataItem, injectRouteTitle, injectRouterEvent, injectRouterState, injectScrollbarDimensions, injectStructuredDataConfig, injectStructuredDataStore, injectStyleManager, injectSuccessTheme, injectSurfaceContextTracker, injectSurfaceThemes, injectSurfaceThemesPrefix, injectTemplateRef, injectTitleConfig, injectTitleStore, injectUrl, injectViewportConfig, injectViewportDimensions, injectViewportSize, injectWarningTheme, isAnimationDebugEnabled, isArray, isElementSignal, isElementVisible, isFocusable, isGroupMatch, isHTMLElement, isKnockoutMatch, isObject, markdownToHtml, maybeSignalValue, memoizeSignal, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, numberBreakpointAttribute, numberBreakpointTransform, previousSignalValue, provideBoundaryElement, provideBreakpointInstance, provideBreakpointObserver, provideColorThemes, provideColorThemesWithTailwind4, provideFocusVisibleTracker, provideLinkStore, provideLinkStoreConfig, provideLocale, provideMetaConfig, provideMetaStore, provideOverlayRuntime, provideRenderer, provideStructuredDataConfig, provideStructuredDataStore, provideStyleManager, provideSurfaceContextTracker, provideSurfaceThemesWithTailwind4, provideTitleConfig, provideTitleStore, provideViewportConfig, resetPositioningStyles, resolveSurfaceByElevation, round, routerDisableScrollTop, scrollToElement, setBackdropStyles, setBaseElementStyles, setCookie, setInputSignal, setupFocusTrap, setupPositioning, setupScrollRestoration, signalAnimatedNumber, signalAttributes, signalClasses, signalElementChildren, signalElementDimensions, signalElementIntersection, signalElementLastScrollDirection, signalElementMutations, signalElementScrollState, signalHostAttributes, signalHostClasses, signalHostElementDimensions, signalHostElementIntersection, signalHostElementLastScrollDirection, signalHostElementMutations, signalHostElementScrollState, signalHostStyles, signalIsRendered, signalStyles, switchQueryListChanges, syncSignal, templateComputed, toArray, toArrayTrackByFn, toStringBinding, transformOrReturn, typedBreakpointTransform, unbindProps, useCursorDragScroll, writeScrollbarSizeToCssVariables, writeViewportSizeToCssVariables, ɵProvideColorThemes, ɵProvideColorThemesPrefix, ɵProvideSurfaceThemes, ɵProvideSurfaceThemesPrefix };
|
|
2787
|
-
export type { AlternateLanguagesConfig, AlternateLink, AngularRenderer, AnimatedLifecycleState, AnimatedNumberSignal, AnimatedOverlayComponentBase, AnimatedOverlayMountConfig, AnimatedOverlayState, AnimationEndEvent, AnyTemplateType, ArticleConfig, BindPropsOptions, BoolBreakpointSignal, Breakpoint, BreakpointInput, BreakpointMap, BuildMediaQueryOptions, BuildSignalEffectsConfig, ColorTheme, ColorThemeType, ComponentTemplate, ComponentTypeWithInputs, ConsentHandler, ControlValueSignalOptions, CreateLoggerConfig, CreatePropsOptions, CreateProviderOptions, CreateSessionMemoryConfig, CreateUserConsentProviderOptions, CurrentElementVisibility, CursorDragScrollDirection, CursorDragScrollOptions, DragMoveEvent, ElementDimensions, ElementLastScrollDirection, ElementLastScrollDirectionType, ElementRect, ElementScrollState, ElementSignal, ElementSignalValue, ElementSize, FacebookCard, FlipAnimationConfig, HeadBinding, HostProps, InjectQueryParamConfig, InjectUtilConfig, InjectUtilTransformConfig, IntersectionObserverEntryWithDetails, IsElementVisibleOptions, LinkConfig, LinkStoreConfig, LogicalSize, MaybeObservable, MaybeSignal, MetaConfig, MetaTagConfig, NgClassType, NgTemplateTemplate, NormalizedGameResultType, NormalizedMatchParticipant, NormalizedMatchParticipants, NormalizedMatchScore, NullableElementDimensions, NumberBreakpointSignal, OnThemeColorMap, OpenGraph, OpenGraphConfig, OverlayRuntimeAnchoredPosition, OverlayRuntimeAnimationDelegate, OverlayRuntimeAnimationDelegateEnterContext, OverlayRuntimeAnimationDelegateLeaveContext, OverlayRuntimeAutoFocusTarget, OverlayRuntimeCenteredPosition, OverlayRuntimeCloseEvent, OverlayRuntimeCloseSource, OverlayRuntimeComponentBase, OverlayRuntimeElements, OverlayRuntimeGlobalPosition, OverlayRuntimeGlobalPositionAlignment, OverlayRuntimeMountConfig, OverlayRuntimePositionStrategy, OverlayRuntimeRef, OverlayRuntimeRole, OverlayRuntimeState, PropHandlers, Props, PropsAttachedElements, PropsAttachedElementsInternal, PropsInternal, ProviderResult, ResizeEdge, ResizeMoveEvent, ResourceHintsConfig, RobotsConfig, RootProviderResult, RouterDisableScrollTopConfig, RouterState, ScrollContainerTarget, ScrollItemTarget, ScrollSnapOrigin, ScrollSnapTarget, ScrollToElementOptions, SeoConfig, SetupScrollRestorationConfig, SignalAnimatedNumberOptions, SignalElementBindingComplexType, SignalElementBindingType, SignalElementIntersectionOptions, SignalElementScrollStateOptions, SocialMediaConfig, StaticProviderResult, StringTemplate, StructuredDataConfig, StyleManager, SurfaceContextEntry, SurfaceContextTracker, SurfaceInteractionColor, SurfaceTheme, SurfaceThemeColor, SurfaceType, SwipeEndEvent, SwipeTracker, SwipeUpdateEvent, SyncSignalOptions, TemplateRefWithContext, ThemeColor, ThemeColorMap, ThemeHSLColor, ThemeInkColorMap, ThemeRGBColor, ThemeSwatch, TitleConfig, TitlePart, Translatable, TwitterCard, TwitterCardConfig, TypedBreakpointSignal, UnbindPropsOptions, ValidateAtLeastOneRequiredConfig, Vec2, ViewportConfig };
|
|
2835
|
+
export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, ANIMATION_DEBUG_STORAGE_KEY, AT_LEAST_ONE_REQUIRED, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AnimatedOverlayDirective, BOUNDARY_ELEMENT_TOKEN, BREAKPOINT_INSTANCE_TOKEN, BREAKPOINT_ORDER, COLOR_PROVIDER, ClickOutsideDirective, ColorInteractiveContainerDirective, ColorInteractiveDirective, ColorInteractiveExcludeDirective, ColorInteractiveHasFocusDirective, DEFAULT_MULTI_INSTANCE_RELS, DEFAULT_MULTI_INSTANCE_TAGS, DEFAULT_VIEWPORT_CONFIG, DISABLE_LOGGER_PARAM, DragHandleDirective, ET_DISABLE_SCROLL_TOP, ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE, ET_DISABLE_SCROLL_TOP_ON_PATH_PARAM_CHANGE, ET_PROPERTY_REMOVED, FOCUSABLE_SELECTOR, FOCUS_VISIBLE_TRACKER_TOKEN, HtmlToMarkdownPipe, IS_ARRAY_NOT_EMPTY, IS_EMAIL, InferMimeTypePipe, IsArrayNotEmpty, IsEmail, jsonLd_d as JsonLD, KeyPressManager, MUST_MATCH, MarkdownToHtmlPipe, MatchStateType, MustMatch, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, PropsDirective, ProvideColorDirective, ProvideSurfaceDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeHandlesComponent, RuntimeError, SEO_DIRECTIVE_TOKEN, SURFACE_PROVIDER, SURFACE_TYPE, ScrollObserverDirective, ScrollObserverEndDirective, ScrollObserverStartDirective, SeoDirective, StructuredDataComponent, SurfaceInteractiveDirective, ToArrayPipe, TypedQueryList, ValidateAtLeastOneRequired, Validators, animationDebugLog, applyAlternateBinding, applyAlternateLanguagesBindings, applyArticleBindings, applyAuthorBinding, applyCanonicalBinding, applyCenteredPosition, applyDescriptionBinding, applyGlobalPosition, applyHeadBinding, applyHeadTitleBinding, applyHostListener, applyHostListeners, applyInitialFocus, applyKeywordsBinding, applyLinkBinding, applyMetaBinding, applyNextBinding, applyOgBinding, applyOpenGraphBindings, applyPrevBinding, applyResourceHintsBindings, applyRobotsBinding, applySocialMediaBindings, applyStructuredDataBinding, applyTwitterCardBindings, areScrollStatesEqual, bindProps, boolBreakpointTransform, booleanBreakpointAttribute, boundingClientRectToElementRect, breakpointTransformBase, buildElementSignal, buildSignalEffects, canUseSessionMemory, clamp, clone, cloneFormGroup, computedTillFalsy, computedTillTruthy, controlValueSignal, controlValueSignalWithPrevious, createAnchoredPositionCleanup, createArrayPropertyBinding, createAutoSessionMemoryKey, createBulkPropertyBinding, createCanAnimateSignal, createComponentId, createCssColorThemeName, createCssSurfaceName, createDependencyStash, createDestroy, createDocumentElementSignal, createElementDictionary, createElementDimensions, createEmptyElementSignal, createFlipAnimation, createFlipAnimationGroup, createHostProps, createIsRenderedSignal, createLogger, createOverlayRuntimeRef, createPropHandlers, createPropertyBinding, createProps, createProvider, createRootProvider, createRootThemeCss, createRoute, createRouterState, createRxHostListener, createSessionMemory, createSetup, createStaticProvider, createStaticRootProvider, createSwatchCss, createSwipeTracker, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createUserConsentProvider, deferredSignal, deleteCookie, easeElastic, easeIn, easeInOut, easeLinear, easeOut, easeOutBack, easeOutBackStrong, elementCanScroll, equal, firstElementSignal, focusElement, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementScrollCoordinates, getFocusableElements, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getHeadingElement, getKnockoutMatchScore, getMatchScoreSubLine, getObjectProperty, getScrollContainerTarget, getScrollItemTarget, getScrollSnapTarget, hasCookie, htmlToMarkdown, inferMimeType, injectAngularRootElement, injectBoundaryElement, injectBreakpointInput, injectBreakpointIsMatched, injectBreakpointObserver, injectCanHover, injectColorThemes, injectColorThemesPrefix, injectCurrentBreakpoint, injectDeviceInputType, injectDisplayOrientation, injectErrorTheme, injectFocusVisibleTracker, injectFragment, injectHasPrecisionInput, injectHasTouchInput, injectHostElement, injectIs2Xl, injectIsLandscape, injectIsLg, injectIsMd, injectIsPortrait, injectIsRouterInitialized, injectIsSm, injectIsXl, injectIsXs, injectLinkStore, injectLinkStoreConfig, injectLocale, injectMediaQueryIsMatched, injectMetaConfig, injectMetaStore, injectObserveBreakpoint, injectObserveMediaQuery, injectOverlayRuntime, injectPathParam, injectPathParamChanges, injectPathParams, injectQueryParam, injectQueryParamChanges, injectQueryParams, injectRenderer, injectRoute, injectRouteData, injectRouteDataItem, injectRouteTitle, injectRouterEvent, injectRouterState, injectScrollbarDimensions, injectStructuredDataConfig, injectStructuredDataStore, injectStyleManager, injectSuccessTheme, injectSurfaceContextTracker, injectSurfaceThemes, injectSurfaceThemesPrefix, injectTemplateRef, injectTitleConfig, injectTitleStore, injectUrl, injectViewportConfig, injectViewportDimensions, injectViewportSize, injectWarningTheme, isAnimationDebugEnabled, isArray, isElementSignal, isElementVisible, isFocusable, isGroupMatch, isHTMLElement, isKnockoutMatch, isObject, markdownToHtml, maybeSignalValue, memoizeSignal, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, numberBreakpointAttribute, numberBreakpointTransform, previousSignalValue, provideBoundaryElement, provideBreakpointInstance, provideBreakpointObserver, provideColorThemes, provideColorThemesWithTailwind4, provideFocusVisibleTracker, provideLinkStore, provideLinkStoreConfig, provideLocale, provideMetaConfig, provideMetaStore, provideOverlayRuntime, provideRenderer, provideStructuredDataConfig, provideStructuredDataStore, provideStyleManager, provideSurfaceContextTracker, provideSurfaceThemesWithTailwind4, provideTitleConfig, provideTitleStore, provideViewportConfig, resetPositioningStyles, resolveSurfaceByElevation, round, routerDisableScrollTop, scrollToElement, setBackdropStyles, setBaseElementStyles, setCookie, setInputSignal, setupFocusTrap, setupPositioning, setupScrollRestoration, signalAnimatedNumber, signalAttributes, signalClasses, signalElementChildren, signalElementDimensions, signalElementIntersection, signalElementLastScrollDirection, signalElementMutations, signalElementScrollState, signalHostAttributes, signalHostClasses, signalHostElementDimensions, signalHostElementIntersection, signalHostElementLastScrollDirection, signalHostElementMutations, signalHostElementScrollState, signalHostStyles, signalIsRendered, signalStyles, switchQueryListChanges, syncSignal, templateComputed, toArray, toArrayTrackByFn, toStringBinding, transformOrReturn, typedBreakpointTransform, unbindProps, useCursorDragScroll, writeScrollbarSizeToCssVariables, writeViewportSizeToCssVariables, ɵProvideColorThemes, ɵProvideColorThemesPrefix, ɵProvideSurfaceThemes, ɵProvideSurfaceThemesPrefix };
|
|
2836
|
+
export type { AlternateLanguagesConfig, AlternateLink, AngularRenderer, AnimatedLifecycleState, AnimatedNumberSignal, AnimatedOverlayComponentBase, AnimatedOverlayMountConfig, AnimatedOverlayState, AnimationEndEvent, AnyTemplateType, ArticleConfig, BindPropsOptions, BoolBreakpointSignal, Breakpoint, BreakpointInput, BreakpointMap, BuildMediaQueryOptions, BuildSignalEffectsConfig, ColorTheme, ColorThemeType, ComponentTemplate, ComponentTypeWithInputs, ConsentHandler, ControlValueSignalOptions, CreateLoggerConfig, CreatePropsOptions, CreateProviderOptions, CreateSessionMemoryConfig, CreateUserConsentProviderOptions, CurrentElementVisibility, CursorDragScrollDirection, CursorDragScrollOptions, DragMoveEvent, ElementDimensions, ElementLastScrollDirection, ElementLastScrollDirectionType, ElementRect, ElementScrollState, ElementSignal, ElementSignalValue, ElementSize, EthleteColorThemeNameRegistry, EthleteSurfaceThemeNameRegistry, FacebookCard, FlipAnimationConfig, HeadBinding, HostProps, InjectQueryParamConfig, InjectUtilConfig, InjectUtilTransformConfig, IntersectionObserverEntryWithDetails, IsElementVisibleOptions, LinkConfig, LinkStoreConfig, LogicalSize, MaybeObservable, MaybeSignal, MetaConfig, MetaTagConfig, NgClassType, NgTemplateTemplate, NormalizedGameResultType, NormalizedMatchParticipant, NormalizedMatchParticipants, NormalizedMatchScore, NullableElementDimensions, NumberBreakpointSignal, OnThemeColorMap, OpenGraph, OpenGraphConfig, OverlayRuntimeAnchoredPosition, OverlayRuntimeAnimationDelegate, OverlayRuntimeAnimationDelegateEnterContext, OverlayRuntimeAnimationDelegateLeaveContext, OverlayRuntimeAutoFocusTarget, OverlayRuntimeCenteredPosition, OverlayRuntimeCloseEvent, OverlayRuntimeCloseSource, OverlayRuntimeComponentBase, OverlayRuntimeElements, OverlayRuntimeGlobalPosition, OverlayRuntimeGlobalPositionAlignment, OverlayRuntimeMountConfig, OverlayRuntimePositionStrategy, OverlayRuntimeRef, OverlayRuntimeRole, OverlayRuntimeState, PropHandlers, Props, PropsAttachedElements, PropsAttachedElementsInternal, PropsInternal, ProviderResult, RegisteredColorThemeName, RegisteredSurfaceThemeName, ResizeEdge, ResizeMoveEvent, ResourceHintsConfig, RobotsConfig, RootProviderResult, RouterDisableScrollTopConfig, RouterState, ScrollContainerTarget, ScrollItemTarget, ScrollSnapOrigin, ScrollSnapTarget, ScrollToElementOptions, SeoConfig, SetupScrollRestorationConfig, SignalAnimatedNumberOptions, SignalElementBindingComplexType, SignalElementBindingType, SignalElementIntersectionOptions, SignalElementScrollStateOptions, SocialMediaConfig, StaticProviderResult, StringTemplate, StructuredDataConfig, StyleManager, SurfaceContextEntry, SurfaceContextTracker, SurfaceInteractionColor, SurfaceTheme, SurfaceThemeColor, SurfaceType, SwipeEndEvent, SwipeTracker, SwipeUpdateEvent, SyncSignalOptions, TemplateRefWithContext, ThemeColor, ThemeColorMap, ThemeHSLColor, ThemeInkColorMap, ThemeRGBColor, ThemeSwatch, TitleConfig, TitlePart, Translatable, TwitterCard, TwitterCardConfig, TypedBreakpointSignal, UnbindPropsOptions, ValidateAtLeastOneRequiredConfig, Vec2, ViewportConfig };
|