mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 07:53:09 +00:00
815a523d1c
- The design prompt keeps the print rules and adds energy: calm keeps today's rules, lively and loud layer photos, tilt, set oversize display type and block colour. Type sizes come as numbers relative to the page, and the model answers eight silent questions and previews the cover twice before it proposes. - The type scale reaches 2.5 and a display tier sets a cover title up to 200 pt; existing books keep their sizes. - An overlap is severe only where more than half of a photo or a text is covered by accident; a title over a photo, a framed inset or a turned photo is layering. - The assistant may use every icon of the icon tab, checked by name, and every enum of the book tools says what its values mean.
30 lines
1.4 KiB
TypeScript
30 lines
1.4 KiB
TypeScript
/**
|
|
* FE-STUDIO-ICON-001 to FE-STUDIO-ICON-002
|
|
*
|
|
* The icons the book engine takes (BOOK_ICON_NAMES in @trek/shared) are the
|
|
* drawings the Studio's icon tab offers, no more and no fewer: one the engine
|
|
* took that this lucide does not have would print as the fallback glyph, and
|
|
* one the tab offers that the engine refused would be a drawing a person can
|
|
* place and the assistant cannot. When lucide-react moves, run
|
|
* `node scripts/gen-book-icon-names.mjs` in shared/ and this passes again.
|
|
*/
|
|
import { BOOK_DESIGN_ICONS, BOOK_ICON_NAMES } from '@trek/shared';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
import { FEATURED_ICONS, ICON_NAMES } from './iconLibrary';
|
|
|
|
describe('the icons the book engine takes', () => {
|
|
it('FE-STUDIO-ICON-001: are every drawing the icon tab offers, and nothing it does not', () => {
|
|
// `Icon` is the component every drawing is built on, not a drawing.
|
|
const offered = ICON_NAMES.filter((name) => name !== 'Icon');
|
|
const missing = offered.filter((name) => !BOOK_ICON_NAMES.has(name));
|
|
const extra = [...BOOK_ICON_NAMES].filter((name) => !offered.includes(name));
|
|
expect({ missing, extra }).toEqual({ missing: [], extra: [] });
|
|
});
|
|
|
|
it('FE-STUDIO-ICON-002: hold the whole travel shelf the tab opens on', () => {
|
|
expect(BOOK_DESIGN_ICONS.filter((name) => !BOOK_ICON_NAMES.has(name))).toEqual([]);
|
|
expect(FEATURED_ICONS).toEqual([...BOOK_DESIGN_ICONS]);
|
|
});
|
|
});
|