@n1kname/components 0.52.0 → 0.53.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n1kname/components",
3
- "version": "0.52.0",
3
+ "version": "0.53.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -66,6 +66,7 @@ interface Props {
66
66
  rings?: Ring[];
67
67
  /** A short legend in the corner: lines of text, the first one bold. */
68
68
  note?: { x: number; y: number; lines: { text: string; tone?: Tone }[] };
69
+ /** The caption as text. For a caption with a link in it, use the `caption` slot instead. */
69
70
  caption?: string;
70
71
  /**
71
72
  * Narrowest the drawing reads well at. Narrower, it still fits the width, smaller, and an
@@ -301,7 +302,13 @@ const lines = (label: string) => {
301
302
  {kind === 'wide' && <DiagramZoom title={title} min={minWidth} id={uid} />}
302
303
  </div>
303
304
  ))}
304
- {caption && <figcaption>{caption}</figcaption>}
305
+ {
306
+ Astro.slots.has('caption') ? (
307
+ <figcaption><slot name="caption" /></figcaption>
308
+ ) : (
309
+ caption && <figcaption>{caption}</figcaption>
310
+ )
311
+ }
305
312
  </figure>
306
313
 
307
314
  <script>