Add withIslandAssets (island tools/asset-plugin) per ADR 0008. On next dev and next build it builds the svgo sprite from src/icons and copies the Yekan Bakh fonts into the app's public/ under content-hashed names, puts their paths in env (NEXT_PUBLIC_ISLAND_*) and serves them with an immutable Cache-Control. Files are written in headers(), which only Next calls, because Nx's next plugin also evaluates the config from the workspace root. - island env (setEnv/getEnv); Icon reads the sprite path from it - icon-sprite-plugin becomes icon-name-extraction (IconName type only); the committed sprite.svg is removed - bull and bear register the plugin, validate the paths, pass them to island through their bootstraps, and add an optional CDN origin for fonts - gitignore the generated files; Nx build outputs include them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| 0001-one-platform-shared-by-mobile-and-desktop.md | ||
| 0002-island-layout-and-element-over-native-tags.md | ||
| 0003-semantic-tokens-only-in-theme.md | ||
| 0004-self-hosted-yekan-bakh.md | ||
| 0005-island-components-take-text-as-props.md | ||
| 0006-pnpm-workspaces-and-package-exports.md | ||
| 0007-yekan-bakh-from-public-or-cdn.md | ||
| 0008-island-asset-plugin.md | ||
| README.md | ||
README.md
Decisions
Design (DDR)
- 0002 Render every tag through island
Element, flex layouts throughFlexBox, grid layouts throughGridBox; never native JSX tags orflex/gridclasses, island included. - 0007 Serve Yekan Bakh FaNum (
font-sans, all UI text) and Yekan Bakh (font-latin, شبا and bank codes only) as hashed@font-facefiles from the app'spublic/fonts/or our CDN, nevernext/font.
Architecture (ADR)
- 0001 Share one platform,
platforms/market, betweenapps/bullandapps/bear; tag all threescope:market. - 0008 Register island's asset plugin in each app's
next.config; on dev and build it writes hashed fonts and the svgo sprite intopublic/; the sprite stays same-origin.
Proposed
- 0003 design: Only semantic tokens, named as in the Lumina Design System, produce Tailwind utilities (
@theme inline); primitives stay plain:rootvariables and Tailwind's defaults are removed. - 0005 design: Island holds Lumina's product components and status-to-tone map; they take every text as props (
childrenorlabels) and never import i18next or platform code. - 0006 architecture: Make every non-app project a pnpm workspace package
@lumina/<name>with subpathexports; third-party dependencies stay in the root package.json.