@hagicode/hagilight-core 0.9.10-dev.121.1.fc2e4a7 → 0.10.1-dev.123.1.28afdf0

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.
@@ -86,9 +86,11 @@ const { fallback, locale = Astro.currentLocale ?? 'en', siteId } = Astro.props;
86
86
  .hagilight-promoto__shell {
87
87
  position: fixed;
88
88
  z-index: 40;
89
- inset-inline: 0;
89
+ /* Centered in the content area: a theme narrows it by setting these two insets on :root. */
90
+ inset-inline-start: var(--hagilight-promoto-inset-start, 0px);
91
+ inset-inline-end: var(--hagilight-promoto-inset-end, 0px);
90
92
  bottom: max(1rem, env(safe-area-inset-bottom));
91
- width: min(42rem, calc(100vw - 1rem - 2 * max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px))));
93
+ width: min(42rem, calc(100% - var(--hagilight-promoto-inset-start, 0px) - var(--hagilight-promoto-inset-end, 0px) - 1rem - 2 * max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px))));
92
94
  margin-inline: auto;
93
95
  overflow: hidden;
94
96
  border: 1px solid color-mix(in srgb, var(--sl-color-accent, #2563eb) 24%, var(--sl-color-gray-5, #cbd5e1));
package/README.md CHANGED
@@ -107,6 +107,10 @@ export default defineConfig({
107
107
 
108
108
  With the unified processor, pass `rehypeContentImages()` in `rehypePlugins` instead, from `@astrojs/markdown-remark`'s `unified()`. Integrations that wrap Astro can call `registerContentImages({ config, logger, enabled })` in `astro:config:setup` and `checkContentImageRegistration({ config, logger, enabled })` in `astro:config:done`, both exported from the same entry point.
109
109
 
110
+ ## Banner placement
111
+
112
+ The banner is a fixed card at most `42rem` wide, centered between two insets: `--hagilight-promoto-inset-start` and `--hagilight-promoto-inset-end` (both default to `0px`). A layout with a sidebar or a table of contents sets them on `:root` so the card sits in the content column instead of over those rails. `@hagicode/hagilight-starlight` derives them from Starlight's own layout tokens, and `@hagicode/hagilight-docusaurus` measures the doc content column at runtime. A plain Astro site needs nothing.
113
+
110
114
  ## Promotion platforms
111
115
 
112
116
  The shared banner (`PromotoBanner`, `loadActivePromotions`) displays only promotions whose `platforms` array in Index's `/promote.json` includes `web`, in addition to being enabled, inside their activation window, and matched with `/promote_content.json`. This follows the `platforms` flag documented in the Index README. An entry whose `platforms` is missing, empty, or not an array of strings is not displayed, other values such as `hagicode` are ignored, and matching is exact (`Web` does not match). When no promotion remains, the banner shows its site fallback or stays hidden, as before.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hagicode/hagilight-core",
3
- "version": "0.9.10-dev.121.1.fc2e4a7",
3
+ "version": "0.10.1-dev.123.1.28afdf0",
4
4
  "type": "module",
5
5
  "description": "Shared TypeScript utilities, components, and assets for HagiCode Astro and Starlight sites",
6
6
  "repository": {