@igstack/app-catalog-frontend-core 4.0.0-alpha-20260920165419 → 4.0.0-alpha-20260921150913
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/esm/__tests__/stylesheetAnimations.test.d.ts +1 -0
- package/dist/esm/__tests__/stylesheetFonts.test.d.ts +1 -0
- package/dist/index.css +22 -4
- package/package.json +4 -4
- package/src/__tests__/stylesheetAnimations.test.ts +22 -0
- package/src/__tests__/stylesheetFonts.test.ts +49 -0
- package/src/index.css +22 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.css
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
/* @import url(./modules/resourceJump/ui/JumpMainButton.css); */
|
|
2
|
-
@import 'tailwindcss';
|
|
3
1
|
/* Warm, crafted type to match the hand-drawn logo (see issue #31 redesign):
|
|
4
|
-
Fraunces = characterful display serif, Nunito Sans = friendly readable body.
|
|
2
|
+
Fraunces = characterful display serif, Nunito Sans = friendly readable body.
|
|
3
|
+
|
|
4
|
+
This has to come before every other at-rule: a remote @import that follows
|
|
5
|
+
any rule is invalid where it stands, so the minifier drops it — and the only
|
|
6
|
+
symptom is body text quietly falling back to a system face on machines that
|
|
7
|
+
don't happen to have the family installed. */
|
|
5
8
|
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Nunito+Sans:wght@400;500;600;700;800&display=swap');
|
|
9
|
+
/* @import url(./modules/resourceJump/ui/JumpMainButton.css); */
|
|
10
|
+
@import 'tailwindcss';
|
|
6
11
|
/* Other module imports this css, and we need to tell tailwind to scan our tsx files */
|
|
7
12
|
@source ".";
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
@import 'tw-animate-css';
|
|
10
15
|
|
|
11
16
|
@layer base {
|
|
12
17
|
/* Warm "crayon" palette derived from the hand-drawn app-catalog logo
|
|
@@ -243,3 +248,16 @@
|
|
|
243
248
|
list-style-type: disc;
|
|
244
249
|
padding-left: 1.25rem;
|
|
245
250
|
}
|
|
251
|
+
|
|
252
|
+
/* tw-animate-css ships no reduced-motion rules of its own, so honour the
|
|
253
|
+
preference here — the overlay animations it provides are all decorative. */
|
|
254
|
+
@media (prefers-reduced-motion: reduce) {
|
|
255
|
+
*,
|
|
256
|
+
*::before,
|
|
257
|
+
*::after {
|
|
258
|
+
animation-duration: 0.01ms !important;
|
|
259
|
+
animation-iteration-count: 1 !important;
|
|
260
|
+
transition-duration: 0.01ms !important;
|
|
261
|
+
scroll-behavior: auto !important;
|
|
262
|
+
}
|
|
263
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igstack/app-catalog-frontend-core",
|
|
3
|
-
"version": "4.0.0-alpha-
|
|
3
|
+
"version": "4.0.0-alpha-20260921150913",
|
|
4
4
|
"description": "Frontend core library for App Catalog",
|
|
5
5
|
"homepage": "https://github.com/lislon/app-catalog",
|
|
6
6
|
"repository": {
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"tailwindcss": "^4.1.7",
|
|
114
114
|
"tiptap-markdown": "^0.8.0",
|
|
115
115
|
"tslib": "^2.3.0",
|
|
116
|
-
"@igstack/app-catalog-shared-core": "4.0.0-alpha-
|
|
116
|
+
"@igstack/app-catalog-shared-core": "4.0.0-alpha-20260921150913"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
119
|
"@tailwindcss/vite": "^4.0.5",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"vite-plugin-static-copy": "^3.1.4",
|
|
141
141
|
"vite-plugin-svgr": "^4.2.0",
|
|
142
142
|
"vitest": "^4.1.2",
|
|
143
|
-
"@igstack/app-catalog-backend-core": "4.0.0-alpha-
|
|
143
|
+
"@igstack/app-catalog-backend-core": "4.0.0-alpha-20260921150913"
|
|
144
144
|
},
|
|
145
145
|
"peerDependencies": {
|
|
146
146
|
"react": "19.1.2",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"vite": "^6.3.5",
|
|
150
150
|
"vite-plugin-svgr": "^4.2.0"
|
|
151
151
|
},
|
|
152
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "566f4d88adfcd492e6ac4fe0ecccc88a94106f49",
|
|
153
153
|
"scripts": {
|
|
154
154
|
"build": "vite build",
|
|
155
155
|
"build:lenient": "vite build --mode lenient",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The overlay primitives carry `animate-in` / `animate-out` classes, so a unit
|
|
6
|
+
* test that asserts the class is on the element passes whether or not the
|
|
7
|
+
* utilities exist — and this import sat commented out for months with nothing
|
|
8
|
+
* moving on screen. So assert the wiring, like stylesheetFonts does.
|
|
9
|
+
*/
|
|
10
|
+
// The path is relative to the package root, which is where vitest runs.
|
|
11
|
+
const css = readFileSync('src/index.css', 'utf8')
|
|
12
|
+
const withoutComments = css.replace(/\/\*[\s\S]*?\*\//g, '')
|
|
13
|
+
|
|
14
|
+
describe('animation utilities', () => {
|
|
15
|
+
it('imports tw-animate-css outside a comment', () => {
|
|
16
|
+
expect(withoutComments).toMatch(/@import\s+['"]tw-animate-css['"]/)
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it('disables animation for prefers-reduced-motion', () => {
|
|
20
|
+
expect(css).toContain('prefers-reduced-motion: reduce')
|
|
21
|
+
})
|
|
22
|
+
})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A font family named in a theme token but never requested is invisible on any
|
|
6
|
+
* machine that happens to have it installed — which is every developer's, and
|
|
7
|
+
* no user's. So assert the wiring instead of the rendering.
|
|
8
|
+
*/
|
|
9
|
+
// The path is relative to the package root, which is where vitest runs.
|
|
10
|
+
const css = readFileSync('src/index.css', 'utf8')
|
|
11
|
+
const withoutComments = css.replace(/\/\*[\s\S]*?\*\//g, '')
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The first family of every non-aliased declaration of a token. The first one
|
|
15
|
+
* is the webfont; everything after it is a fallback by definition.
|
|
16
|
+
*/
|
|
17
|
+
function primaryFamilies(token: string): string[] {
|
|
18
|
+
const declarations = [
|
|
19
|
+
...css.matchAll(new RegExp(`--${token}:\\s*([^;]+);`, 'g')),
|
|
20
|
+
]
|
|
21
|
+
.map((match) => (match[1] ?? '').trim())
|
|
22
|
+
.filter((value) => !value.startsWith('var('))
|
|
23
|
+
expect(declarations.length).toBeGreaterThan(0)
|
|
24
|
+
return declarations.map((value) =>
|
|
25
|
+
(value.split(',')[0] ?? '').trim().replace(/^'|'$/g, ''),
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
describe('web fonts', () => {
|
|
30
|
+
it('requests its families before any other at-rule', () => {
|
|
31
|
+
// Anywhere later it is invalid where it stands, so the minifier drops it
|
|
32
|
+
// and the only symptom is a silent fallback to a system face.
|
|
33
|
+
const atRules = [...withoutComments.matchAll(/^@[\w-]+[^;{]*/gm)].map(
|
|
34
|
+
(match) => match[0].trim(),
|
|
35
|
+
)
|
|
36
|
+
expect(atRules[0]).toMatch(/^@import url\('https:\/\/fonts\./)
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it.each(['font-sans', 'font-serif'])(
|
|
40
|
+
'--%s names a family the stylesheet actually requests',
|
|
41
|
+
(token) => {
|
|
42
|
+
for (const family of primaryFamilies(token)) {
|
|
43
|
+
// A system stack has nothing to download.
|
|
44
|
+
if (family.startsWith('ui-') || family === 'system-ui') continue
|
|
45
|
+
expect(withoutComments).toContain(`family=${family.replace(/ /g, '+')}`)
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
)
|
|
49
|
+
})
|
package/src/index.css
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
/* @import url(./modules/resourceJump/ui/JumpMainButton.css); */
|
|
2
|
-
@import 'tailwindcss';
|
|
3
1
|
/* Warm, crafted type to match the hand-drawn logo (see issue #31 redesign):
|
|
4
|
-
Fraunces = characterful display serif, Nunito Sans = friendly readable body.
|
|
2
|
+
Fraunces = characterful display serif, Nunito Sans = friendly readable body.
|
|
3
|
+
|
|
4
|
+
This has to come before every other at-rule: a remote @import that follows
|
|
5
|
+
any rule is invalid where it stands, so the minifier drops it — and the only
|
|
6
|
+
symptom is body text quietly falling back to a system face on machines that
|
|
7
|
+
don't happen to have the family installed. */
|
|
5
8
|
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Nunito+Sans:wght@400;500;600;700;800&display=swap');
|
|
9
|
+
/* @import url(./modules/resourceJump/ui/JumpMainButton.css); */
|
|
10
|
+
@import 'tailwindcss';
|
|
6
11
|
/* Other module imports this css, and we need to tell tailwind to scan our tsx files */
|
|
7
12
|
@source ".";
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
@import 'tw-animate-css';
|
|
10
15
|
|
|
11
16
|
@layer base {
|
|
12
17
|
/* Warm "crayon" palette derived from the hand-drawn app-catalog logo
|
|
@@ -243,3 +248,16 @@
|
|
|
243
248
|
list-style-type: disc;
|
|
244
249
|
padding-left: 1.25rem;
|
|
245
250
|
}
|
|
251
|
+
|
|
252
|
+
/* tw-animate-css ships no reduced-motion rules of its own, so honour the
|
|
253
|
+
preference here — the overlay animations it provides are all decorative. */
|
|
254
|
+
@media (prefers-reduced-motion: reduce) {
|
|
255
|
+
*,
|
|
256
|
+
*::before,
|
|
257
|
+
*::after {
|
|
258
|
+
animation-duration: 0.01ms !important;
|
|
259
|
+
animation-iteration-count: 1 !important;
|
|
260
|
+
transition-duration: 0.01ms !important;
|
|
261
|
+
scroll-behavior: auto !important;
|
|
262
|
+
}
|
|
263
|
+
}
|