@hagicode/hagilight-starlight 0.20.0 → 0.20.1-dev.193.1.fb8173e

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.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -155,7 +155,7 @@ The pillar icons and the illustration `cat-head.webp` live in `assets/showcase/`
155
155
 
156
156
  Every asset passes the same audit before it is committed: the current `HagiCode` brand, no Steam or other retired-channel content, no third-party promotion, no credentials, private repository names, or personal data, and rasters at least 1200 px wide. A removable offending region may be cropped out, and the crop is recorded. Pick images in this order to keep traffic low: an audited existing image converted to WebP, then a hand-authored SVG, then a newly generated raster only when neither fits. Generated art is an illustration, never a replica of the product UI, contains no text or logos, is captioned as an illustration, is reviewed by a person, and records its prompt and parameters (never credentials). Generation is an authoring step; the package never calls a generator.
157
157
 
158
- Budgets for the shipped sources, enforced by `npm test`: 768 KiB for all showcase sources together, 200 KiB per raster source (WebP only), and 8 KiB per SVG. `npm run build:example` also checks the built output: each delivered raster variant at most 200 KiB, the variants of one format at most 768 KiB together, and each AVIF variant smaller than the WebP variant of the same width.
158
+ Budgets for the shipped sources, enforced by `pnpm test`: 768 KiB for all showcase sources together, 200 KiB per raster source (WebP only), and 8 KiB per SVG. `pnpm run build:example` also checks the built output: each delivered raster variant at most 200 KiB, the variants of one format at most 768 KiB together, and each AVIF variant smaller than the WebP variant of the same width.
159
159
 
160
160
  The illustration renders as a `<picture>` with an AVIF source, a WebP source, and a JPEG `<img>` fallback, at widths 96 and 192 for the call-to-action avatar. The tiers are derived at the consumer's build from the shipped WebP, with the `sharp` service that Astro already bundles, so no conversion runs outside the site's own build and no external service is involved. The chain needs a transforming image service: with the passthrough `astro/assets/services/noop` service the tiers serve the original bytes, and the plugin logs one warning. Opaque images use the JPEG tier. The JPEG tier cannot carry transparency, so an image that needs alpha needs a PNG tier, which the component does not offer yet, and a budget review before it is added.
161
161
 
@@ -174,8 +174,8 @@ To check a deployed site, run `curl -sI https://<site>/_astro/<file>.avif` with
174
174
  The copy and assets mirror `repos/web` and `repos/docs` in the HagiCode monorepo, which this package never edits.
175
175
 
176
176
  - **Copy:** edit `src/article-promotion-copy/<locale>.ts` (every locale must keep the same fields and feature ids). Terminology is pinned in `GLOSSARY` in `src/article-promotion-copy/index.ts`, seeded from the product locale files in `repos/web/src/locales/<locale>/`. `HagiCode`, `OpenSpec`, `Hero Scenario`, `Microsoft Store`, and `Windows` are never translated.
177
- - **Images:** the article footer shows no image now. To show one again, audit the candidate, crop and convert it to WebP (the AVIF and JPEG tiers are derived at build time, so an opaque image needs no extra file), add its `manifest.json` entry, and import it in `ArticlePromotion.astro`. `npm test` (`test/showcase-assets.test.mjs`) checks that the manifest, the files, and the component imports agree.
178
- - **Random illustration (R2 pool):** the `cat-head` entry in `assets/showcase/manifest.json` carries `source` (`repo: img-gen`, `album`, `objectKey`), its audit, and `pool` (`album`, `maxBytes` 200 KiB, `entries` with `key` and `bytes`). `ArticlePromotion.astro` leads the primary "visit HagiCode" call to action with the illustration as a decorative, captionless `<picture>`. When the `randomAvatar` option is on it carries `data-random-fan` and renders `ArticlePromotionPicker.astro`, so the button shows the turning fan; when it is off the illustration stays a static round avatar. Refresh: take keys from the `cat-head-gallery` album `index.json`, keep 12 to 200 unique keys each within `maxBytes`, audit them text-free and current, update `pool.entries`, and keep the footer pool in `repos/hagilight/packages/core/assets/footer/manifest.json` in step. To rebuild the WebP, resize the source to 1200 px (lanczos3) and encode at quality 88. `npm test` (`test/showcase-assets.test.mjs`) checks the entry, the pool, the byte caps and the budgets.
177
+ - **Images:** the article footer shows no image now. To show one again, audit the candidate, crop and convert it to WebP (the AVIF and JPEG tiers are derived at build time, so an opaque image needs no extra file), add its `manifest.json` entry, and import it in `ArticlePromotion.astro`. `pnpm test` (`test/showcase-assets.test.mjs`) checks that the manifest, the files, and the component imports agree.
178
+ - **Random illustration (R2 pool):** the `cat-head` entry in `assets/showcase/manifest.json` carries `source` (`repo: img-gen`, `album`, `objectKey`), its audit, and `pool` (`album`, `maxBytes` 200 KiB, `entries` with `key` and `bytes`). `ArticlePromotion.astro` leads the primary "visit HagiCode" call to action with the illustration as a decorative, captionless `<picture>`. When the `randomAvatar` option is on it carries `data-random-fan` and renders `ArticlePromotionPicker.astro`, so the button shows the turning fan; when it is off the illustration stays a static round avatar. Refresh: take keys from the `cat-head-gallery` album `index.json`, keep 12 to 200 unique keys each within `maxBytes`, audit them text-free and current, update `pool.entries`, and keep the footer pool in `repos/hagilight/packages/core/assets/footer/manifest.json` in step. To rebuild the WebP, resize the source to 1200 px (lanczos3) and encode at quality 88. `pnpm test` (`test/showcase-assets.test.mjs`) checks the entry, the pool, the byte caps and the budgets.
179
179
  - **Options:** `hagicodePromotion: { randomAvatar: false }` keeps the default illustration and loads no picker; `footer: { avatar: false }` removes the footer avatar, and `footer: { randomAvatar: false }` keeps its default. A site whose `img-src` policy blocks `https://img-gen.hagicode.com` keeps the defaults.
180
180
  - **Badge:** the product id is parsed from the Store URL and the badge language map lives in `src/windows-download.ts`. Re-check both against `repos/docs/src/components/MicrosoftStoreBadge.tsx` and the official site when the Store listing or the supported languages change.
181
181
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hagicode/hagilight-starlight",
3
- "version": "0.20.0",
3
+ "version": "0.20.1-dev.193.1.fb8173e",
4
4
  "type": "module",
5
5
  "description": "Starlight plugin and components for HagiCode documentation",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  "assets/showcase/*"
54
54
  ],
55
55
  "dependencies": {
56
- "@hagicode/hagilight-core": "0.20.0"
56
+ "@hagicode/hagilight-core": "0.20.1-dev.193.1.fb8173e"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "@astrojs/starlight": "^0.42.4",