@n1kname/components 0.51.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 +1 -1
- package/src/FlowDiagram.astro +18 -1
package/package.json
CHANGED
package/src/FlowDiagram.astro
CHANGED
|
@@ -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
|
-
{
|
|
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>
|
|
@@ -410,6 +417,16 @@ const lines = (label: string) => {
|
|
|
410
417
|
fill: var(--c-on-accent);
|
|
411
418
|
}
|
|
412
419
|
|
|
420
|
+
/* An icon node's name and line sit under the disc, on the page, so they keep the page's text
|
|
421
|
+
* colour; only the glyph inside turns to the on-accent colour. */
|
|
422
|
+
.solid.icon-node .name {
|
|
423
|
+
fill: var(--c-text);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.solid.icon-node .glyph {
|
|
427
|
+
color: var(--c-on-accent);
|
|
428
|
+
}
|
|
429
|
+
|
|
413
430
|
.glyph {
|
|
414
431
|
fill: none;
|
|
415
432
|
stroke: currentColor;
|