@contentrain/astro-kit 0.46.0 → 0.46.2

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/catalog.json CHANGED
@@ -105,6 +105,7 @@
105
105
  "KitImage.astro",
106
106
  "Lines.astro",
107
107
  "Section.astro",
108
+ "image-widths.ts",
108
109
  "instance-id.ts",
109
110
  "measured.ts",
110
111
  "muted.ts",
@@ -789,6 +790,7 @@
789
790
  "shared": [
790
791
  "KitImage.astro",
791
792
  "Section.astro",
793
+ "image-widths.ts",
792
794
  "image.ts",
793
795
  "instance-id.ts",
794
796
  "measured.ts",
@@ -1400,6 +1402,7 @@
1400
1402
  "shared": [
1401
1403
  "KitImage.astro",
1402
1404
  "Section.astro",
1405
+ "image-widths.ts",
1403
1406
  "instance-id.ts",
1404
1407
  "measured.ts",
1405
1408
  "muted.ts",
@@ -1734,6 +1737,7 @@
1734
1737
  "Button.astro",
1735
1738
  "KitImage.astro",
1736
1739
  "Section.astro",
1740
+ "image-widths.ts",
1737
1741
  "instance-id.ts",
1738
1742
  "measured.ts",
1739
1743
  "muted.ts",
@@ -2327,6 +2331,7 @@
2327
2331
  "KitImage.astro",
2328
2332
  "embed-frame.ts",
2329
2333
  "embed-target.ts",
2334
+ "image-widths.ts",
2330
2335
  "safe-url.ts",
2331
2336
  "types.ts"
2332
2337
  ],
@@ -2715,6 +2720,7 @@
2715
2720
  "shared": [
2716
2721
  "KitImage.astro",
2717
2722
  "Section.astro",
2723
+ "image-widths.ts",
2718
2724
  "instance-id.ts",
2719
2725
  "measured.ts",
2720
2726
  "muted.ts",
@@ -3225,6 +3231,7 @@
3225
3231
  "shared": [
3226
3232
  "KitImage.astro",
3227
3233
  "Section.astro",
3234
+ "image-widths.ts",
3228
3235
  "image.ts",
3229
3236
  "instance-id.ts",
3230
3237
  "measured.ts",
@@ -3549,6 +3556,7 @@
3549
3556
  "shared": [
3550
3557
  "Button.astro",
3551
3558
  "KitImage.astro",
3559
+ "image-widths.ts",
3552
3560
  "instance-id.ts",
3553
3561
  "muted.ts",
3554
3562
  "safe-url.ts",
@@ -3783,6 +3791,7 @@
3783
3791
  "Lines.astro",
3784
3792
  "Section.astro",
3785
3793
  "bleed.ts",
3794
+ "image-widths.ts",
3786
3795
  "instance-id.ts",
3787
3796
  "measured.ts",
3788
3797
  "muted.ts",
@@ -4280,6 +4289,7 @@
4280
4289
  "shared": [
4281
4290
  "KitImage.astro",
4282
4291
  "Section.astro",
4292
+ "image-widths.ts",
4283
4293
  "image.ts",
4284
4294
  "instance-id.ts",
4285
4295
  "measured.ts",
@@ -5005,6 +5015,7 @@
5005
5015
  "uses": [],
5006
5016
  "shared": [
5007
5017
  "KitImage.astro",
5018
+ "image-widths.ts",
5008
5019
  "safe-url.ts",
5009
5020
  "types.ts"
5010
5021
  ],
@@ -6075,6 +6086,7 @@
6075
6086
  "SectionHeader.astro",
6076
6087
  "embed-frame.ts",
6077
6088
  "embed-target.ts",
6089
+ "image-widths.ts",
6078
6090
  "image.ts",
6079
6091
  "instance-id.ts",
6080
6092
  "measured.ts",
@@ -6543,6 +6555,7 @@
6543
6555
  "KitImage.astro",
6544
6556
  "Section.astro",
6545
6557
  "bleed.ts",
6558
+ "image-widths.ts",
6546
6559
  "instance-id.ts",
6547
6560
  "measured.ts",
6548
6561
  "muted.ts",
@@ -6952,6 +6965,7 @@
6952
6965
  "behaviors.ts",
6953
6966
  "embed-frame.ts",
6954
6967
  "embed-target.ts",
6968
+ "image-widths.ts",
6955
6969
  "image.ts",
6956
6970
  "instance-id.ts",
6957
6971
  "measured.ts",
@@ -7259,6 +7273,7 @@
7259
7273
  "shared": [
7260
7274
  "KitImage.astro",
7261
7275
  "Section.astro",
7276
+ "image-widths.ts",
7262
7277
  "image.ts",
7263
7278
  "instance-id.ts",
7264
7279
  "measured.ts",
@@ -7809,6 +7824,7 @@
7809
7824
  "shared": [
7810
7825
  "KitImage.astro",
7811
7826
  "Section.astro",
7827
+ "image-widths.ts",
7812
7828
  "image.ts",
7813
7829
  "instance-id.ts",
7814
7830
  "measured.ts",
@@ -8124,6 +8140,7 @@
8124
8140
  "KitImage.astro",
8125
8141
  "Lines.astro",
8126
8142
  "Section.astro",
8143
+ "image-widths.ts",
8127
8144
  "image.ts",
8128
8145
  "instance-id.ts",
8129
8146
  "measured.ts",
@@ -16,6 +16,7 @@
16
16
  import type { ImageMetadata } from 'astro'
17
17
  import { Image } from 'astro:assets'
18
18
  import { mediaSize } from '../../../lib/media'
19
+ import { widthsUpTo } from './image-widths'
19
20
  import { safeSrc } from './safe-url'
20
21
  import type { ImageInput } from './types'
21
22
 
@@ -54,9 +55,6 @@ const load = decoded === undefined ? undefined : LOCAL[`/public${decoded}`]
54
55
  const local = load ? await load() : undefined
55
56
  // The stored size (WordPress's chosen size of the file), else the file's own.
56
57
  const size = image.width && image.height ? { width: image.width, height: image.height } : {}
57
- // Candidate widths for the srcset, up to the image's own: the browser picks one by `sizes`.
58
- const STEPS = [320, 640, 960, 1280, 1600, 1920, 2560]
59
- const widthsUpTo = (max: number) => [...STEPS.filter(step => step < max), max]
60
58
  ---
61
59
  {url && (
62
60
  local
@@ -19,15 +19,20 @@ import { videoTarget } from './embed-target'
19
19
  type Kind = 'disclosure' | 'tablist' | 'carousel' | 'dialog' | 'countup' | 'toggle' | 'filter' | 'anchor' | 'lightbox'
20
20
 
21
21
  const KINDS: ReadonlySet<string> = new Set<Kind>(['disclosure', 'tablist', 'carousel', 'dialog', 'countup', 'toggle', 'filter', 'anchor', 'lightbox'])
22
- /** Past this many items an island wires the first ones; the rest stay visible as printed (said on the receipt). */
22
+ /**
23
+ * Past this many items an island that wires each item (tabs, a counter, a filter) wires the first ones; the rest stay
24
+ * visible as printed (said on the receipt). A carousel wires none of its slides one by one (one scroll-snap track), so it
25
+ * takes every slide: a 59-slide slider (x10's metaslider) cut at 50 left its track with slides it did not count, and stayed
26
+ * static with no controls.
27
+ */
23
28
  const MAX_ITEMS = 50
24
29
 
25
30
  const reduced = (): boolean => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches
26
31
 
27
32
  /** Elements under the island root for a selector the engine wrote; nothing (never a throw) for a bad selector. */
28
- function within(root: HTMLElement, selector: string | undefined): HTMLElement[] {
33
+ function within(root: HTMLElement, selector: string | undefined, limit = MAX_ITEMS): HTMLElement[] {
29
34
  if (!selector) return []
30
- try { return [...root.querySelectorAll<HTMLElement>(selector)].slice(0, MAX_ITEMS) }
35
+ try { return [...root.querySelectorAll<HTMLElement>(selector)].slice(0, limit) }
31
36
  catch { return [] }
32
37
  }
33
38
 
@@ -94,9 +99,9 @@ function setEnd(button: HTMLButtonElement, off: boolean, measured: boolean): voi
94
99
  }
95
100
 
96
101
  function carousel(root: HTMLElement): void {
97
- const items = within(root, root.dataset.crItems)
102
+ const items = within(root, root.dataset.crItems, Infinity)
98
103
  const track = items[0]?.parentElement
99
- // Past MAX_ITEMS (or other children in the track) the carousel stays static: never squeeze unwired slides into the row.
104
+ // Other children in the track keep the carousel static: never squeeze what is not a slide into the row.
100
105
  if (items.length < 2 || !track || !items.every(item => item.parentElement === track) || track.children.length !== items.length) return
101
106
  // A scroll-snap track: the browser moves it (swipe, keys, scroll); the buttons only scroll it. No timer: a slider
102
107
  // that advanced by itself on the old site waits for the visitor here (said on the receipt).
@@ -0,0 +1,13 @@
1
+ // The width ladder of every resized image (KitImage for sections, the starter's lib/body-images for rich text): the
2
+ // candidates of a srcset, up to the largest one, and the browser picks one by `sizes`.
3
+
4
+ const STEPS = [320, 640, 960, 1280, 1600, 1920, 2560]
5
+
6
+ /** Candidate widths up to `max`, `max` itself the last. */
7
+ export const widthsUpTo = (max: number): number[] => [...STEPS.filter(step => step < max), max]
8
+
9
+ /**
10
+ * The largest width worth making of a file shown at `shown` px: twice that (a 2× screen), never more than the file.
11
+ * Without a shown width, the file's own.
12
+ */
13
+ export const widthCap = (file: number, shown?: number): number => (shown && shown > 0 ? Math.min(file, 2 * shown) : file)
@@ -9,6 +9,7 @@
9
9
  "KitImage.astro",
10
10
  "Lines.astro",
11
11
  "Section.astro",
12
+ "image-widths.ts",
12
13
  "instance-id.ts",
13
14
  "measured.ts",
14
15
  "muted.ts",
@@ -7,6 +7,7 @@
7
7
  "shared": [
8
8
  "KitImage.astro",
9
9
  "Section.astro",
10
+ "image-widths.ts",
10
11
  "image.ts",
11
12
  "instance-id.ts",
12
13
  "measured.ts",
@@ -9,6 +9,7 @@
9
9
  "shared": [
10
10
  "KitImage.astro",
11
11
  "Section.astro",
12
+ "image-widths.ts",
12
13
  "instance-id.ts",
13
14
  "measured.ts",
14
15
  "muted.ts",
@@ -4,7 +4,7 @@
4
4
  "description": "A call to action: a short heading, an optional line of text and one or two buttons — across the whole section, or as a card inside it.",
5
5
  "category": "section",
6
6
  "uses": [],
7
- "shared": ["Button.astro", "KitImage.astro", "Section.astro", "instance-id.ts", "measured.ts", "muted.ts", "safe-url.ts", "types.ts"],
7
+ "shared": ["Button.astro", "KitImage.astro", "Section.astro", "image-widths.ts", "instance-id.ts", "measured.ts", "muted.ts", "safe-url.ts", "types.ts"],
8
8
  "variants": {
9
9
  "layout": { "options": ["inline", "centered", "stacked"], "default": "inline", "description": "inline: text left, buttons right on wide screens. centered: everything centred. stacked: heading, text and buttons in one column at the start edge on every width." },
10
10
  "frame": { "options": ["full", "card"], "default": "full", "description": "full: the tone fills the section. card: a rounded box in a plain section carries the tone." },
@@ -4,7 +4,7 @@
4
4
  "description": "A video, map or player from another site (YouTube, Vimeo, Google Maps, OpenStreetMap, Spotify, SoundCloud, Calendly, Typeform, Google Forms, Loom, Wistia), loaded only on click: until then a poster link to the provider's page, with no iframe, no third-party request and no cookie (YouTube through youtube-nocookie.com). Unknown providers are never framed; they stay a plain link.",
5
5
  "category": "content",
6
6
  "uses": [],
7
- "shared": ["KitImage.astro", "embed-frame.ts", "embed-target.ts", "safe-url.ts", "types.ts"],
7
+ "shared": ["KitImage.astro", "embed-frame.ts", "embed-target.ts", "image-widths.ts", "safe-url.ts", "types.ts"],
8
8
  "variants": {
9
9
  "aspect": { "options": ["auto", "video", "portrait", "square", "map"], "default": "auto", "description": "auto: 16:9 for videos, 9:16 for YouTube Shorts, 4:3 (16:9 wide) for maps, a fixed strip for audio players. The others force a ratio." },
10
10
  "width": { "options": ["prose", "page"], "default": "prose", "description": "prose: as wide as the reading column. page: the full page frame." }
@@ -7,6 +7,7 @@
7
7
  "shared": [
8
8
  "KitImage.astro",
9
9
  "Section.astro",
10
+ "image-widths.ts",
10
11
  "instance-id.ts",
11
12
  "measured.ts",
12
13
  "muted.ts",
@@ -7,6 +7,7 @@
7
7
  "shared": [
8
8
  "KitImage.astro",
9
9
  "Section.astro",
10
+ "image-widths.ts",
10
11
  "image.ts",
11
12
  "instance-id.ts",
12
13
  "measured.ts",
@@ -4,7 +4,7 @@
4
4
  "description": "Site header: brand (logo and/or name), navigation and an optional call-to-action button.",
5
5
  "category": "chrome",
6
6
  "uses": ["nav", "search-box"],
7
- "shared": ["Button.astro", "KitImage.astro", "instance-id.ts", "muted.ts", "safe-url.ts", "types.ts"],
7
+ "shared": ["Button.astro", "KitImage.astro", "image-widths.ts", "instance-id.ts", "muted.ts", "safe-url.ts", "types.ts"],
8
8
  "variants": {
9
9
  "layout": { "options": ["split", "centered", "brand-left"], "default": "split", "description": "split: brand left, navigation right. centered: brand above centred navigation. brand-left: navigation right after the brand." },
10
10
  "tone": { "options": ["default", "inverse", "transparent"], "default": "default", "description": "Surface with a bottom border, dark (ink) background, or transparent over the hero that follows." },
@@ -10,6 +10,7 @@
10
10
  "Lines.astro",
11
11
  "Section.astro",
12
12
  "bleed.ts",
13
+ "image-widths.ts",
13
14
  "instance-id.ts",
14
15
  "measured.ts",
15
16
  "muted.ts",
@@ -7,6 +7,7 @@
7
7
  "shared": [
8
8
  "KitImage.astro",
9
9
  "Section.astro",
10
+ "image-widths.ts",
10
11
  "image.ts",
11
12
  "instance-id.ts",
12
13
  "measured.ts",
@@ -4,7 +4,7 @@
4
4
  "description": "One post in a list (index, archive, related posts): image, category, date, title, excerpt, author. The whole card links to the post.",
5
5
  "category": "content",
6
6
  "uses": [],
7
- "shared": ["KitImage.astro", "safe-url.ts", "types.ts"],
7
+ "shared": ["KitImage.astro", "image-widths.ts", "safe-url.ts", "types.ts"],
8
8
  "variants": {
9
9
  "layout": { "options": ["vertical", "horizontal", "minimal"], "default": "vertical", "description": "Image on top, image beside the text, or text only with a divider." },
10
10
  "surface": { "options": ["plain", "card"], "default": "plain", "description": "plain: no surface. card: its own background (--color-card), radius and shadow (--shadow-card), the text padded (--spacing-card) and the image flush at the edge, as theme cards are drawn on a tinted page." },
@@ -132,6 +132,7 @@ const Root = framed ? 'section' : 'div'
132
132
  const arrow = 'absolute top-1/2 z-10 hidden size-11 -translate-y-1/2 items-center justify-center rounded-full bg-surface/90 text-ink shadow-md ring-1 ring-line hover:bg-surface disabled:opacity-40 sm:group-data-[ready]:flex'
133
133
  // A text card has no picture for the arrows to sit on: over it they would cover its words. A carousel with any text
134
134
  // card (all of them, or mixed with pictures) has its arrows under the row, either side of the dots.
135
+ // The dots wrap (one 24px target per slide): 14 of them between the arrows outgrew a 390 phone and pushed both off it.
135
136
  const cards = slides.some(slide => !slide.image && !slide.video && !slide.player)
136
137
  // A video from another site is a link to its page, so without JavaScript it opens there; its frame keeps the image's
137
138
  // ratio, so the player that replaces the link moves nothing.
@@ -172,7 +173,7 @@ const under = 'flex size-11 shrink-0 items-center justify-center rounded-full bg
172
173
  ? (
173
174
  <div class="mt-4 hidden items-center justify-center gap-3 group-data-[ready]:flex">
174
175
  <button type="button" class={under} aria-label={prevLabel} aria-controls={trackId} data-prev><svg aria-hidden="true" viewBox="0 0 24 24" class="size-5 rtl:-scale-x-100" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6" /></svg></button>
175
- <div class="flex justify-center" data-dots></div>
176
+ <div class="flex min-w-0 flex-wrap justify-center" data-dots></div>
176
177
  <button type="button" class={under} aria-label={nextLabel} aria-controls={trackId} data-next><svg aria-hidden="true" viewBox="0 0 24 24" class="size-5 rtl:-scale-x-100" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 6l6 6-6 6" /></svg></button>
177
178
  </div>
178
179
  )
@@ -180,7 +181,7 @@ const under = 'flex size-11 shrink-0 items-center justify-center rounded-full bg
180
181
  <>
181
182
  <button type="button" class:list={[arrow, 'start-6 md:start-10']} aria-label={prevLabel} aria-controls={trackId} data-prev><svg aria-hidden="true" viewBox="0 0 24 24" class="size-5 rtl:-scale-x-100" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6" /></svg></button>
182
183
  <button type="button" class:list={[arrow, 'end-6 md:end-10']} aria-label={nextLabel} aria-controls={trackId} data-next><svg aria-hidden="true" viewBox="0 0 24 24" class="size-5 rtl:-scale-x-100" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 6l6 6-6 6" /></svg></button>
183
- <div class="mt-4 hidden justify-center group-data-[ready]:flex" data-dots></div>
184
+ <div class="mt-4 hidden flex-wrap justify-center group-data-[ready]:flex" data-dots></div>
184
185
  </>
185
186
  ))}
186
187
  </Root>
@@ -4,6 +4,7 @@
4
4
  { "name": "three-square", "props": { "label": "Team", "perView": "3", "aspect": "square", "slides": [{ "image": { "src": "/kit-fixtures/avatar-1.svg", "alt": "Mira", "width": 96, "height": 96 } }, { "image": { "src": "/kit-fixtures/avatar-2.svg", "alt": "Jon", "width": 96, "height": 96 } }, { "image": { "src": "/kit-fixtures/avatar-3.svg", "alt": "Lea", "width": 96, "height": 96 } }, { "image": { "src": "/kit-fixtures/photo-1.svg", "alt": "Studio", "width": 1200, "height": 800 } }] } },
5
5
  { "name": "five-measured", "props": { "label": "Five slides", "id": "five", "eyebrow": "Recent work", "heading": "Five projects", "intro": "A few of the sites we moved this year.", "actions": [{ "label": "See all work", "href": "/work/" }], "slides": [{ "image": { "src": "/kit-fixtures/photo-1.svg", "alt": "View 1", "width": 1200, "height": 800 }, "title": "Slide 1 title" }, { "image": { "src": "/kit-fixtures/photo-2.svg", "alt": "View 2", "width": 1200, "height": 800 }, "title": "Slide 2 title" }, { "image": { "src": "/kit-fixtures/photo-3.svg", "alt": "View 3", "width": 1200, "height": 800 }, "title": "Slide 3 title" }, { "image": { "src": "/kit-fixtures/photo-4.svg", "alt": "View 4", "width": 1200, "height": 800 }, "title": "Slide 4 title" }, { "image": { "src": "/kit-fixtures/photo-5.svg", "alt": "View 5", "width": 1200, "height": 800 }, "title": "Slide 5 title" }], "measured": { "padY": 24, "columns": { "390": 1, "768": 2, "1280": 3 }, "gap": 20 } } },
6
6
  { "name": "text-cards", "props": { "label": "What clients say", "perView": "3", "heading": "Testimonials", "slides": [{ "title": "Ada Lovelace", "text": "They moved our whole site in a week, and nothing broke." }, { "title": "Grace Hopper", "text": "Every page is ours to edit now, without a developer." }, { "title": "Alan Turing", "text": "The new site is faster, and it looks the same.", "ctaLabel": "Read the story", "ctaHref": "/stories/" }] } },
7
+ { "name": "text-cards-many", "props": { "label": "What clients say", "heading": "Fourteen reviews", "slides": [{ "title": "Ada", "text": "Review 1 of fourteen." }, { "title": "Grace", "text": "Review 2 of fourteen." }, { "title": "Alan", "text": "Review 3 of fourteen." }, { "title": "Edsger", "text": "Review 4 of fourteen." }, { "title": "Barbara", "text": "Review 5 of fourteen." }, { "title": "Donald", "text": "Review 6 of fourteen." }, { "title": "Margaret", "text": "Review 7 of fourteen." }, { "title": "Ken", "text": "Review 8 of fourteen." }, { "title": "Frances", "text": "Review 9 of fourteen." }, { "title": "John", "text": "Review 10 of fourteen." }, { "title": "Radia", "text": "Review 11 of fourteen." }, { "title": "Tim", "text": "Review 12 of fourteen." }, { "title": "Hedy", "text": "Review 13 of fourteen." }, { "title": "Claude", "text": "Review 14 of fourteen." }] } },
7
8
  { "name": "video-slides", "props": { "label": "Feature tour", "heading": "See it work", "slides": [{ "video": "/kit-fixtures/clip-1.mp4", "image": "/kit-fixtures/photo-1.svg", "imageAlt": "", "title": "Import" }, { "video": "/kit-fixtures/clip-2.mp4", "title": "Edit" }, { "video": "/kit-fixtures/clip-3.mp4", "image": "/kit-fixtures/photo-3.svg", "imageAlt": "", "title": "Publish", "text": "One click, and the site is live." }] } },
8
9
  { "name": "mixed-cards", "props": { "label": "Stories", "slides": [{ "title": "Ada Lovelace", "text": "They moved our whole site in a week, and nothing broke." }, { "image": "/kit-fixtures/photo-2.svg", "imageAlt": "Green gradient", "title": "Harbor & Co" }, { "title": "Grace Hopper", "text": "Every page is ours to edit now, without a developer." }] } },
9
10
  {"name": "video-embed", "props": {"label": "Studio videos", "id": "videos", "aspect": "standard", "perView": "2", "slides": [{"embed": "youtube:aqz-KE-bpKQ", "image": {"src": "/kit-fixtures/photo-1.svg", "alt": "Blue gradient", "width": 1200, "height": 800}, "title": "Studio tour"}, {"embed": "https://vimeo.com/76979871", "title": "Behind the scenes"}, {"embed": "youtube:aqz-KE-bpKQ", "image": "https://i.ytimg.com/vi/aqz-KE-bpKQ/hqdefault.jpg", "title": "A provider thumbnail is never loaded"}, {"image": {"src": "/kit-fixtures/photo-3.svg", "alt": "Orange gradient", "width": 1200, "height": 800}, "title": "Field Notes"}]}}
@@ -4,7 +4,7 @@
4
4
  "description": "A carousel of images, videos (a file, or a YouTube/Vimeo link loaded only on click) or text cards, with optional title, text and button per slide. Without JavaScript it is a snapping horizontal scroller; Embla adds paging, arrows and dots.",
5
5
  "category": "section",
6
6
  "uses": [],
7
- "shared": ["Button.astro", "KitImage.astro", "Section.astro", "SectionHeader.astro", "embed-frame.ts", "embed-target.ts", "image.ts", "instance-id.ts", "measured.ts", "muted.ts", "safe-url.ts", "types.ts"],
7
+ "shared": ["Button.astro", "KitImage.astro", "Section.astro", "SectionHeader.astro", "embed-frame.ts", "embed-target.ts", "image-widths.ts", "image.ts", "instance-id.ts", "measured.ts", "muted.ts", "safe-url.ts", "types.ts"],
8
8
  "variants": {
9
9
  "perView": { "options": ["1", "2", "3"], "default": "1", "description": "Slides visible at once on wide screens." },
10
10
  "aspect": { "options": ["wide", "standard", "square"], "default": "wide", "description": "Image aspect ratio: 21:9, 3:2 or 1:1." },
@@ -12,6 +12,7 @@
12
12
  "KitImage.astro",
13
13
  "Section.astro",
14
14
  "bleed.ts",
15
+ "image-widths.ts",
15
16
  "instance-id.ts",
16
17
  "measured.ts",
17
18
  "muted.ts",
@@ -11,6 +11,7 @@
11
11
  "behaviors.ts",
12
12
  "embed-frame.ts",
13
13
  "embed-target.ts",
14
+ "image-widths.ts",
14
15
  "image.ts",
15
16
  "instance-id.ts",
16
17
  "measured.ts",
@@ -7,6 +7,7 @@
7
7
  "shared": [
8
8
  "KitImage.astro",
9
9
  "Section.astro",
10
+ "image-widths.ts",
10
11
  "image.ts",
11
12
  "instance-id.ts",
12
13
  "measured.ts",
@@ -7,6 +7,7 @@
7
7
  "shared": [
8
8
  "KitImage.astro",
9
9
  "Section.astro",
10
+ "image-widths.ts",
10
11
  "image.ts",
11
12
  "instance-id.ts",
12
13
  "measured.ts",
@@ -8,6 +8,7 @@
8
8
  "KitImage.astro",
9
9
  "Lines.astro",
10
10
  "Section.astro",
11
+ "image-widths.ts",
11
12
  "image.ts",
12
13
  "instance-id.ts",
13
14
  "measured.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentrain/astro-kit",
3
- "version": "0.46.0",
3
+ "version": "0.46.2",
4
4
  "license": "MIT",
5
5
  "description": "Copy-in Astro components for Contentrain sites (shadcn model): typed props, tailwind-variants, zero JavaScript by default — with a machine-readable catalog",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  "mapping"
43
43
  ],
44
44
  "dependencies": {
45
- "@contentrain/types": "1.70.0"
45
+ "@contentrain/types": "1.71.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "^22.10.0",