@kensio/colophon 2.5.0 → 2.6.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/README.md +91 -13
- package/dist/astro/index.d.ts +49 -0
- package/dist/astro/index.d.ts.map +1 -0
- package/dist/astro/index.js +42 -0
- package/dist/astro/index.js.map +1 -0
- package/dist/cli/args/command.d.ts +13 -0
- package/dist/cli/args/command.d.ts.map +1 -0
- package/dist/cli/args/command.js +22 -0
- package/dist/cli/args/command.js.map +1 -0
- package/dist/cli/args/index.d.ts +28 -0
- package/dist/cli/args/index.d.ts.map +1 -0
- package/dist/cli/args/index.js +75 -0
- package/dist/cli/args/index.js.map +1 -0
- package/dist/cli/args/switches.d.ts +18 -0
- package/dist/cli/args/switches.d.ts.map +1 -0
- package/dist/cli/args/switches.js +42 -0
- package/dist/cli/args/switches.js.map +1 -0
- package/dist/cli/args/usage.d.ts +3 -0
- package/dist/cli/args/usage.d.ts.map +1 -0
- package/dist/cli/args/usage.js +34 -0
- package/dist/cli/args/usage.js.map +1 -0
- package/dist/cli/args/values.d.ts +11 -0
- package/dist/cli/args/values.d.ts.map +1 -0
- package/dist/cli/args/values.js +29 -0
- package/dist/cli/args/values.js.map +1 -0
- package/dist/cli/build.d.ts +10 -0
- package/dist/cli/build.d.ts.map +1 -0
- package/dist/cli/build.js +41 -0
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/eject/adapters.d.ts +20 -0
- package/dist/cli/eject/adapters.d.ts.map +1 -0
- package/dist/cli/eject/adapters.js +29 -0
- package/dist/cli/eject/adapters.js.map +1 -0
- package/dist/cli/eject/astro.d.ts +13 -0
- package/dist/cli/eject/astro.d.ts.map +1 -0
- package/dist/cli/eject/astro.js +35 -0
- package/dist/cli/eject/astro.js.map +1 -0
- package/dist/cli/eject/hugo.d.ts +19 -0
- package/dist/cli/eject/hugo.d.ts.map +1 -0
- package/dist/cli/eject/hugo.js +127 -0
- package/dist/cli/eject/hugo.js.map +1 -0
- package/dist/cli/eject/index.d.ts +15 -0
- package/dist/cli/eject/index.d.ts.map +1 -0
- package/dist/cli/eject/index.js +46 -0
- package/dist/cli/eject/index.js.map +1 -0
- package/dist/cli/index.js +25 -20
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/fs.d.ts +5 -0
- package/dist/cli/init/fs.d.ts.map +1 -0
- package/dist/cli/init/fs.js +19 -0
- package/dist/cli/init/fs.js.map +1 -0
- package/dist/cli/init/guess.d.ts +9 -0
- package/dist/cli/init/guess.d.ts.map +1 -0
- package/dist/cli/init/guess.js +27 -0
- package/dist/cli/init/guess.js.map +1 -0
- package/dist/cli/init/index.d.ts +11 -0
- package/dist/cli/init/index.d.ts.map +1 -0
- package/dist/cli/init/index.js +36 -0
- package/dist/cli/init/index.js.map +1 -0
- package/dist/cli/init/module.d.ts +12 -0
- package/dist/cli/init/module.d.ts.map +1 -0
- package/dist/cli/init/module.js +45 -0
- package/dist/cli/init/module.js.map +1 -0
- package/dist/cli/init/scaffold.d.ts +10 -0
- package/dist/cli/init/scaffold.d.ts.map +1 -0
- package/dist/cli/init/scaffold.js +52 -0
- package/dist/cli/init/scaffold.js.map +1 -0
- package/dist/cli/message.d.ts +7 -0
- package/dist/cli/message.d.ts.map +1 -0
- package/dist/cli/message.js +9 -0
- package/dist/cli/message.js.map +1 -0
- package/dist/cli/preview/index.d.ts +13 -0
- package/dist/cli/preview/index.d.ts.map +1 -0
- package/dist/cli/preview/index.js +27 -0
- package/dist/cli/preview/index.js.map +1 -0
- package/dist/cli/preview/open.d.ts +10 -0
- package/dist/cli/preview/open.d.ts.map +1 -0
- package/dist/cli/preview/open.js +32 -0
- package/dist/cli/preview/open.js.map +1 -0
- package/dist/cli/preview/render.d.ts +23 -0
- package/dist/cli/preview/render.d.ts.map +1 -0
- package/dist/cli/preview/render.js +40 -0
- package/dist/cli/preview/render.js.map +1 -0
- package/dist/cli/preview/root.d.ts +17 -0
- package/dist/cli/preview/root.d.ts.map +1 -0
- package/dist/cli/preview/root.js +22 -0
- package/dist/cli/preview/root.js.map +1 -0
- package/dist/cli/preview/size.d.ts +7 -0
- package/dist/cli/preview/size.d.ts.map +1 -0
- package/dist/cli/preview/size.js +13 -0
- package/dist/cli/preview/size.js.map +1 -0
- package/dist/cli/report.d.ts +6 -0
- package/dist/cli/report.d.ts.map +1 -0
- package/dist/cli/report.js +23 -0
- package/dist/cli/report.js.map +1 -0
- package/dist/cli/watch/filter.d.ts +14 -0
- package/dist/cli/watch/filter.d.ts.map +1 -0
- package/dist/cli/watch/filter.js +16 -0
- package/dist/cli/watch/filter.js.map +1 -0
- package/dist/cli/watch/index.d.ts +27 -0
- package/dist/cli/watch/index.d.ts.map +1 -0
- package/dist/cli/watch/index.js +38 -0
- package/dist/cli/watch/index.js.map +1 -0
- package/dist/cli/watch/queue.d.ts +24 -0
- package/dist/cli/watch/queue.d.ts.map +1 -0
- package/dist/cli/watch/queue.js +57 -0
- package/dist/cli/watch/queue.js.map +1 -0
- package/dist/config/defaults.d.ts +39 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +38 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +18 -4
- package/dist/config/index.js.map +1 -1
- package/dist/config/output.d.ts +26 -0
- package/dist/config/output.d.ts.map +1 -0
- package/dist/config/output.js +45 -0
- package/dist/config/output.js.map +1 -0
- package/dist/config/resolve.d.ts +10 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +20 -1
- package/dist/config/resolve.js.map +1 -1
- package/dist/content/index.d.ts +1 -0
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +1 -0
- package/dist/content/index.js.map +1 -1
- package/dist/content/read.d.ts +15 -0
- package/dist/content/read.d.ts.map +1 -0
- package/dist/content/read.js +36 -0
- package/dist/content/read.js.map +1 -0
- package/dist/content/walk.d.ts.map +1 -1
- package/dist/content/walk.js +4 -30
- package/dist/content/walk.js.map +1 -1
- package/dist/core/index.d.ts +37 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/encode/fit.d.ts +16 -0
- package/dist/encode/fit.d.ts.map +1 -0
- package/dist/encode/fit.js +23 -0
- package/dist/encode/fit.js.map +1 -0
- package/dist/encode/format.d.ts +12 -0
- package/dist/encode/format.d.ts.map +1 -0
- package/dist/encode/format.js +40 -0
- package/dist/encode/format.js.map +1 -0
- package/dist/encode/index.d.ts +14 -0
- package/dist/encode/index.d.ts.map +1 -0
- package/dist/encode/index.js +52 -0
- package/dist/encode/index.js.map +1 -0
- package/dist/encode/sharp.d.ts +19 -0
- package/dist/encode/sharp.d.ts.map +1 -0
- package/dist/encode/sharp.js +57 -0
- package/dist/encode/sharp.js.map +1 -0
- package/dist/encode/warn.d.ts +10 -0
- package/dist/encode/warn.d.ts.map +1 -0
- package/dist/encode/warn.js +31 -0
- package/dist/encode/warn.js.map +1 -0
- package/dist/fonts/resolve.d.ts.map +1 -1
- package/dist/fonts/resolve.js +2 -8
- package/dist/fonts/resolve.js.map +1 -1
- package/dist/generate/index.d.ts +4 -0
- package/dist/generate/index.d.ts.map +1 -1
- package/dist/generate/index.js +10 -4
- package/dist/generate/index.js.map +1 -1
- package/dist/generate/options.d.ts +11 -1
- package/dist/generate/options.d.ts.map +1 -1
- package/dist/generate/options.js.map +1 -1
- package/dist/generate/output-path.d.ts +6 -2
- package/dist/generate/output-path.d.ts.map +1 -1
- package/dist/generate/output-path.js +7 -2
- package/dist/generate/output-path.js.map +1 -1
- package/dist/generate/plan.d.ts.map +1 -1
- package/dist/generate/plan.js +3 -3
- package/dist/generate/plan.js.map +1 -1
- package/dist/generate/render-image.d.ts +6 -0
- package/dist/generate/render-image.d.ts.map +1 -1
- package/dist/generate/render-image.js +14 -4
- package/dist/generate/render-image.js.map +1 -1
- package/dist/image/index.d.ts +3 -1
- package/dist/image/index.d.ts.map +1 -1
- package/dist/image/index.js +4 -3
- package/dist/image/index.js.map +1 -1
- package/dist/image/jpeg.d.ts +5 -4
- package/dist/image/jpeg.d.ts.map +1 -1
- package/dist/image/jpeg.js +13 -36
- package/dist/image/jpeg.js.map +1 -1
- package/dist/image/load.d.ts.map +1 -1
- package/dist/image/load.js +4 -15
- package/dist/image/load.js.map +1 -1
- package/dist/image/resolve.d.ts.map +1 -1
- package/dist/image/resolve.js +2 -8
- package/dist/image/resolve.js.map +1 -1
- package/dist/image/uri.d.ts.map +1 -1
- package/dist/image/uri.js +2 -3
- package/dist/image/uri.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/jpeg/index.d.ts +10 -0
- package/dist/jpeg/index.d.ts.map +1 -0
- package/dist/jpeg/index.js +2 -0
- package/dist/jpeg/index.js.map +1 -0
- package/dist/jpeg/segments.d.ts +32 -0
- package/dist/jpeg/segments.d.ts.map +1 -0
- package/dist/jpeg/segments.js +66 -0
- package/dist/jpeg/segments.js.map +1 -0
- package/dist/layout/draw.d.ts +20 -0
- package/dist/layout/draw.d.ts.map +1 -0
- package/dist/layout/draw.js +32 -0
- package/dist/layout/draw.js.map +1 -0
- package/dist/layout/extent.d.ts +19 -0
- package/dist/layout/extent.d.ts.map +1 -0
- package/dist/layout/extent.js +24 -0
- package/dist/layout/extent.js.map +1 -0
- package/dist/layout/index.d.ts +7 -4
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +5 -3
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/lines.d.ts +0 -17
- package/dist/layout/lines.d.ts.map +1 -1
- package/dist/layout/lines.js +2 -35
- package/dist/layout/lines.js.map +1 -1
- package/dist/measure/faces.d.ts.map +1 -1
- package/dist/measure/faces.js +8 -2
- package/dist/measure/faces.js.map +1 -1
- package/dist/meta/index.d.ts +1 -0
- package/dist/meta/index.d.ts.map +1 -1
- package/dist/meta/index.js +1 -0
- package/dist/meta/index.js.map +1 -1
- package/dist/meta/path.d.ts +24 -0
- package/dist/meta/path.d.ts.map +1 -0
- package/dist/meta/path.js +41 -0
- package/dist/meta/path.js.map +1 -0
- package/dist/meta/tags.d.ts.map +1 -1
- package/dist/meta/tags.js +6 -1
- package/dist/meta/tags.js.map +1 -1
- package/dist/placement/index.d.ts +7 -2
- package/dist/placement/index.d.ts.map +1 -1
- package/dist/placement/index.js +9 -3
- package/dist/placement/index.js.map +1 -1
- package/dist/placement/relative.d.ts +8 -3
- package/dist/placement/relative.d.ts.map +1 -1
- package/dist/placement/relative.js +12 -5
- package/dist/placement/relative.js.map +1 -1
- package/dist/platform/base64.d.ts +13 -0
- package/dist/platform/base64.d.ts.map +1 -0
- package/dist/platform/base64.js +35 -0
- package/dist/platform/base64.js.map +1 -0
- package/dist/platform/rasteriser.browser.d.ts +16 -0
- package/dist/platform/rasteriser.browser.d.ts.map +1 -0
- package/dist/platform/rasteriser.browser.js +20 -0
- package/dist/platform/rasteriser.browser.js.map +1 -0
- package/dist/platform/rasteriser.node.d.ts +2 -0
- package/dist/platform/rasteriser.node.d.ts.map +1 -0
- package/dist/platform/rasteriser.node.js +2 -0
- package/dist/platform/rasteriser.node.js.map +1 -0
- package/dist/platform/read-file.browser.d.ts +17 -0
- package/dist/platform/read-file.browser.d.ts.map +1 -0
- package/dist/platform/read-file.browser.js +23 -0
- package/dist/platform/read-file.browser.js.map +1 -0
- package/dist/platform/read-file.node.d.ts +19 -0
- package/dist/platform/read-file.node.d.ts.map +1 -0
- package/dist/platform/read-file.node.js +31 -0
- package/dist/platform/read-file.node.js.map +1 -0
- package/dist/png/chunk.d.ts +23 -0
- package/dist/png/chunk.d.ts.map +1 -0
- package/dist/png/chunk.js +48 -0
- package/dist/png/chunk.js.map +1 -0
- package/dist/png/index.d.ts +13 -0
- package/dist/png/index.d.ts.map +1 -0
- package/dist/png/index.js +3 -0
- package/dist/png/index.js.map +1 -0
- package/dist/png/recompress.d.ts +23 -0
- package/dist/png/recompress.d.ts.map +1 -0
- package/dist/png/recompress.js +81 -0
- package/dist/png/recompress.js.map +1 -0
- package/dist/props.d.ts +11 -0
- package/dist/props.d.ts.map +1 -1
- package/dist/props.js +16 -0
- package/dist/props.js.map +1 -1
- package/dist/render/image.d.ts +20 -0
- package/dist/render/image.d.ts.map +1 -0
- package/dist/render/image.js +29 -0
- package/dist/render/image.js.map +1 -0
- package/dist/render/index.d.ts +2 -1
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +5 -4
- package/dist/render/index.js.map +1 -1
- package/dist/render/png.d.ts +14 -4
- package/dist/render/png.d.ts.map +1 -1
- package/dist/render/png.js +22 -23
- package/dist/render/png.js.map +1 -1
- package/dist/render/rasterise.d.ts +15 -0
- package/dist/render/rasterise.d.ts.map +1 -0
- package/dist/render/rasterise.js +34 -0
- package/dist/render/rasterise.js.map +1 -0
- package/dist/render/svg.d.ts.map +1 -1
- package/dist/render/svg.js +1 -0
- package/dist/render/svg.js.map +1 -1
- package/dist/sign/base64url.d.ts +16 -0
- package/dist/sign/base64url.d.ts.map +1 -0
- package/dist/sign/base64url.js +24 -0
- package/dist/sign/base64url.js.map +1 -0
- package/dist/sign/index.d.ts +49 -0
- package/dist/sign/index.d.ts.map +1 -0
- package/dist/sign/index.js +133 -0
- package/dist/sign/index.js.map +1 -0
- package/dist/stamp/carrier/index.d.ts +7 -0
- package/dist/stamp/carrier/index.d.ts.map +1 -0
- package/dist/stamp/carrier/index.js +27 -0
- package/dist/stamp/carrier/index.js.map +1 -0
- package/dist/stamp/carrier/isobmff.d.ts +7 -0
- package/dist/stamp/carrier/isobmff.d.ts.map +1 -0
- package/dist/stamp/carrier/isobmff.js +55 -0
- package/dist/stamp/carrier/isobmff.js.map +1 -0
- package/dist/stamp/carrier/jpeg.d.ts +4 -0
- package/dist/stamp/carrier/jpeg.d.ts.map +1 -0
- package/dist/stamp/carrier/jpeg.js +76 -0
- package/dist/stamp/carrier/jpeg.js.map +1 -0
- package/dist/stamp/carrier/png.d.ts +7 -0
- package/dist/stamp/carrier/png.d.ts.map +1 -0
- package/dist/stamp/carrier/png.js +50 -0
- package/dist/stamp/carrier/png.js.map +1 -0
- package/dist/stamp/carrier/riff.d.ts +4 -0
- package/dist/stamp/carrier/riff.d.ts.map +1 -0
- package/dist/stamp/carrier/riff.js +54 -0
- package/dist/stamp/carrier/riff.js.map +1 -0
- package/dist/stamp/carrier/types.d.ts +25 -0
- package/dist/stamp/carrier/types.d.ts.map +1 -0
- package/dist/stamp/carrier/types.js +2 -0
- package/dist/stamp/carrier/types.js.map +1 -0
- package/dist/stamp/chunk.d.ts +0 -2
- package/dist/stamp/chunk.d.ts.map +1 -1
- package/dist/stamp/chunk.js +10 -18
- package/dist/stamp/chunk.js.map +1 -1
- package/dist/stamp/config-digest.d.ts +18 -0
- package/dist/stamp/config-digest.d.ts.map +1 -1
- package/dist/stamp/config-digest.js +24 -0
- package/dist/stamp/config-digest.js.map +1 -1
- package/dist/stamp/index.d.ts +2 -2
- package/dist/stamp/index.d.ts.map +1 -1
- package/dist/stamp/index.js +2 -2
- package/dist/stamp/index.js.map +1 -1
- package/dist/stamp/payload.d.ts +28 -0
- package/dist/stamp/payload.d.ts.map +1 -0
- package/dist/stamp/payload.js +42 -0
- package/dist/stamp/payload.js.map +1 -0
- package/dist/stamp/read.d.ts +5 -4
- package/dist/stamp/read.d.ts.map +1 -1
- package/dist/stamp/read.js +26 -43
- package/dist/stamp/read.js.map +1 -1
- package/dist/stamp/window.d.ts +11 -0
- package/dist/stamp/window.d.ts.map +1 -0
- package/dist/stamp/window.js +11 -0
- package/dist/stamp/window.js.map +1 -0
- package/dist/stamp/write.d.ts +21 -0
- package/dist/stamp/write.d.ts.map +1 -0
- package/dist/stamp/write.js +31 -0
- package/dist/stamp/write.js.map +1 -0
- package/dist/templates/article/bottom.d.ts +15 -0
- package/dist/templates/article/bottom.d.ts.map +1 -0
- package/dist/templates/article/bottom.js +61 -0
- package/dist/templates/article/bottom.js.map +1 -0
- package/dist/templates/article/index.d.ts +12 -0
- package/dist/templates/article/index.d.ts.map +1 -0
- package/dist/templates/article/index.js +42 -0
- package/dist/templates/article/index.js.map +1 -0
- package/dist/templates/article/lines.d.ts +27 -0
- package/dist/templates/article/lines.d.ts.map +1 -0
- package/dist/templates/article/lines.js +53 -0
- package/dist/templates/article/lines.js.map +1 -0
- package/dist/templates/article/tags.d.ts +25 -0
- package/dist/templates/article/tags.d.ts.map +1 -0
- package/dist/templates/article/tags.js +63 -0
- package/dist/templates/article/tags.js.map +1 -0
- package/dist/templates/attribution.d.ts +2 -6
- package/dist/templates/attribution.d.ts.map +1 -1
- package/dist/templates/attribution.js +8 -22
- package/dist/templates/attribution.js.map +1 -1
- package/dist/templates/banner/version.d.ts.map +1 -1
- package/dist/templates/banner/version.js +4 -4
- package/dist/templates/banner/version.js.map +1 -1
- package/dist/templates/bottom.d.ts +23 -0
- package/dist/templates/bottom.d.ts.map +1 -0
- package/dist/templates/bottom.js +37 -0
- package/dist/templates/bottom.js.map +1 -0
- package/dist/templates/byline.d.ts +19 -0
- package/dist/templates/byline.d.ts.map +1 -0
- package/dist/templates/byline.js +45 -0
- package/dist/templates/byline.js.map +1 -0
- package/dist/templates/code/clip.js +1 -1
- package/dist/templates/code/clip.js.map +1 -1
- package/dist/templates/code/fit.js +1 -1
- package/dist/templates/code/fit.js.map +1 -1
- package/dist/templates/code/warn.d.ts +1 -1
- package/dist/templates/code/warn.d.ts.map +1 -1
- package/dist/templates/code/warn.js +2 -2
- package/dist/templates/code/warn.js.map +1 -1
- package/dist/templates/docs/chrome.d.ts +17 -0
- package/dist/templates/docs/chrome.d.ts.map +1 -0
- package/dist/templates/docs/chrome.js +44 -0
- package/dist/templates/docs/chrome.js.map +1 -0
- package/dist/templates/docs/crumbs.d.ts +14 -0
- package/dist/templates/docs/crumbs.d.ts.map +1 -0
- package/dist/templates/docs/crumbs.js +32 -0
- package/dist/templates/docs/crumbs.js.map +1 -0
- package/dist/templates/docs/index.d.ts +13 -0
- package/dist/templates/docs/index.d.ts.map +1 -0
- package/dist/templates/docs/index.js +47 -0
- package/dist/templates/docs/index.js.map +1 -0
- package/dist/templates/docs/lines.d.ts +14 -0
- package/dist/templates/docs/lines.d.ts.map +1 -0
- package/dist/templates/docs/lines.js +29 -0
- package/dist/templates/docs/lines.js.map +1 -0
- package/dist/templates/event/index.d.ts +12 -0
- package/dist/templates/event/index.d.ts.map +1 -0
- package/dist/templates/event/index.js +59 -0
- package/dist/templates/event/index.js.map +1 -0
- package/dist/templates/event/lines.d.ts +14 -0
- package/dist/templates/event/lines.d.ts.map +1 -0
- package/dist/templates/event/lines.js +29 -0
- package/dist/templates/event/lines.js.map +1 -0
- package/dist/templates/event/plate.d.ts +16 -0
- package/dist/templates/event/plate.d.ts.map +1 -0
- package/dist/templates/event/plate.js +36 -0
- package/dist/templates/event/plate.js.map +1 -0
- package/dist/templates/frame.d.ts +68 -0
- package/dist/templates/frame.d.ts.map +1 -0
- package/dist/templates/frame.js +63 -0
- package/dist/templates/frame.js.map +1 -0
- package/dist/templates/index.d.ts +9 -0
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +27 -0
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/photo/index.d.ts +17 -0
- package/dist/templates/photo/index.d.ts.map +1 -0
- package/dist/templates/photo/index.js +51 -0
- package/dist/templates/photo/index.js.map +1 -0
- package/dist/templates/photo/lines.d.ts +21 -0
- package/dist/templates/photo/lines.d.ts.map +1 -0
- package/dist/templates/photo/lines.js +36 -0
- package/dist/templates/photo/lines.js.map +1 -0
- package/dist/templates/pill.d.ts +33 -0
- package/dist/templates/pill.d.ts.map +1 -0
- package/dist/templates/pill.js +50 -0
- package/dist/templates/pill.js.map +1 -0
- package/dist/templates/portrait.d.ts +40 -0
- package/dist/templates/portrait.d.ts.map +1 -0
- package/dist/templates/portrait.js +56 -0
- package/dist/templates/portrait.js.map +1 -0
- package/dist/templates/quote/index.d.ts +11 -0
- package/dist/templates/quote/index.d.ts.map +1 -0
- package/dist/templates/quote/index.js +60 -0
- package/dist/templates/quote/index.js.map +1 -0
- package/dist/templates/quote/lines.d.ts +24 -0
- package/dist/templates/quote/lines.d.ts.map +1 -0
- package/dist/templates/quote/lines.js +35 -0
- package/dist/templates/quote/lines.js.map +1 -0
- package/dist/templates/quote/mark.d.ts +13 -0
- package/dist/templates/quote/mark.d.ts.map +1 -0
- package/dist/templates/quote/mark.js +39 -0
- package/dist/templates/quote/mark.js.map +1 -0
- package/dist/templates/quote/speaker.d.ts +18 -0
- package/dist/templates/quote/speaker.d.ts.map +1 -0
- package/dist/templates/quote/speaker.js +41 -0
- package/dist/templates/quote/speaker.js.map +1 -0
- package/dist/templates/release/block.d.ts +8 -0
- package/dist/templates/release/block.d.ts.map +1 -0
- package/dist/templates/release/block.js +16 -0
- package/dist/templates/release/block.js.map +1 -0
- package/dist/templates/release/changes.d.ts +23 -0
- package/dist/templates/release/changes.d.ts.map +1 -0
- package/dist/templates/release/changes.js +45 -0
- package/dist/templates/release/changes.js.map +1 -0
- package/dist/templates/release/index.d.ts +11 -0
- package/dist/templates/release/index.d.ts.map +1 -0
- package/dist/templates/release/index.js +55 -0
- package/dist/templates/release/index.js.map +1 -0
- package/dist/templates/release/lines.d.ts +21 -0
- package/dist/templates/release/lines.d.ts.map +1 -0
- package/dist/templates/release/lines.js +36 -0
- package/dist/templates/release/lines.js.map +1 -0
- package/dist/templates/stat/index.d.ts +11 -0
- package/dist/templates/stat/index.d.ts.map +1 -0
- package/dist/templates/stat/index.js +43 -0
- package/dist/templates/stat/index.js.map +1 -0
- package/dist/templates/stat/lines.d.ts +23 -0
- package/dist/templates/stat/lines.d.ts.map +1 -0
- package/dist/templates/stat/lines.js +47 -0
- package/dist/templates/stat/lines.js.map +1 -0
- package/dist/templates/terminal/index.d.ts +16 -0
- package/dist/templates/terminal/index.d.ts.map +1 -0
- package/dist/templates/terminal/index.js +62 -0
- package/dist/templates/terminal/index.js.map +1 -0
- package/dist/templates/terminal/session.d.ts +17 -0
- package/dist/templates/terminal/session.d.ts.map +1 -0
- package/dist/templates/terminal/session.js +86 -0
- package/dist/templates/terminal/session.js.map +1 -0
- package/dist/templates/terminal/window.d.ts +14 -0
- package/dist/templates/terminal/window.d.ts.map +1 -0
- package/dist/templates/terminal/window.js +84 -0
- package/dist/templates/terminal/window.js.map +1 -0
- package/dist/templates/version.d.ts +16 -0
- package/dist/templates/version.d.ts.map +1 -0
- package/dist/templates/version.js +23 -0
- package/dist/templates/version.js.map +1 -0
- package/dist/templates/wordmark/index.d.ts +13 -0
- package/dist/templates/wordmark/index.d.ts.map +1 -0
- package/dist/templates/wordmark/index.js +53 -0
- package/dist/templates/wordmark/index.js.map +1 -0
- package/dist/templates/wordmark/lines.d.ts +22 -0
- package/dist/templates/wordmark/lines.d.ts.map +1 -0
- package/dist/templates/wordmark/lines.js +61 -0
- package/dist/templates/wordmark/lines.js.map +1 -0
- package/dist/templates/wordmark/mark.d.ts +16 -0
- package/dist/templates/wordmark/mark.d.ts.map +1 -0
- package/dist/templates/wordmark/mark.js +30 -0
- package/dist/templates/wordmark/mark.js.map +1 -0
- package/dist/text/clamp.d.ts +12 -0
- package/dist/text/clamp.d.ts.map +1 -0
- package/dist/text/clamp.js +41 -0
- package/dist/text/clamp.js.map +1 -0
- package/dist/text/ellipsis.d.ts +3 -0
- package/dist/text/ellipsis.d.ts.map +1 -0
- package/dist/text/ellipsis.js +3 -0
- package/dist/text/ellipsis.js.map +1 -0
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.js +2 -0
- package/dist/text/index.js.map +1 -1
- package/dist/types.d.ts +158 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/validate/collect.d.ts.map +1 -1
- package/dist/validate/collect.js +2 -1
- package/dist/validate/collect.js.map +1 -1
- package/dist/validate/keys.d.ts +6 -0
- package/dist/validate/keys.d.ts.map +1 -1
- package/dist/validate/keys.js +17 -0
- package/dist/validate/keys.js.map +1 -1
- package/dist/validate/values.d.ts +6 -0
- package/dist/validate/values.d.ts.map +1 -1
- package/dist/validate/values.js +12 -1
- package/dist/validate/values.js.map +1 -1
- package/package.json +16 -2
- package/dist/background.d.ts +0 -13
- package/dist/background.d.ts.map +0 -1
- package/dist/background.js +0 -65
- package/dist/background.js.map +0 -1
- package/dist/cli/args.d.ts +0 -14
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js +0 -67
- package/dist/cli/args.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -102
- package/dist/cli.js.map +0 -1
- package/dist/config.d.ts +0 -95
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -208
- package/dist/config.js.map +0 -1
- package/dist/fonts.d.ts +0 -18
- package/dist/fonts.d.ts.map +0 -1
- package/dist/fonts.js +0 -102
- package/dist/fonts.js.map +0 -1
- package/dist/generate.d.ts +0 -63
- package/dist/generate.d.ts.map +0 -1
- package/dist/generate.js +0 -109
- package/dist/generate.js.map +0 -1
- package/dist/highlight.d.ts +0 -75
- package/dist/highlight.d.ts.map +0 -1
- package/dist/highlight.js +0 -137
- package/dist/highlight.js.map +0 -1
- package/dist/render.d.ts +0 -24
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js +0 -77
- package/dist/render.js.map +0 -1
- package/dist/stamp.d.ts +0 -29
- package/dist/stamp.d.ts.map +0 -1
- package/dist/stamp.js +0 -198
- package/dist/stamp.js.map +0 -1
- package/dist/templates/banner.d.ts +0 -9
- package/dist/templates/banner.d.ts.map +0 -1
- package/dist/templates/banner.js +0 -115
- package/dist/templates/banner.js.map +0 -1
- package/dist/templates/card.d.ts +0 -7
- package/dist/templates/card.d.ts.map +0 -1
- package/dist/templates/card.js +0 -72
- package/dist/templates/card.js.map +0 -1
- package/dist/templates/code.d.ts +0 -12
- package/dist/templates/code.d.ts.map +0 -1
- package/dist/templates/code.js +0 -275
- package/dist/templates/code.js.map +0 -1
- package/dist/templates/measure.d.ts +0 -11
- package/dist/templates/measure.d.ts.map +0 -1
- package/dist/templates/measure.js +0 -11
- package/dist/templates/measure.js.map +0 -1
- package/dist/templates/props.d.ts +0 -7
- package/dist/templates/props.d.ts.map +0 -1
- package/dist/templates/props.js +0 -17
- package/dist/templates/props.js.map +0 -1
- package/dist/templates/text.d.ts +0 -37
- package/dist/templates/text.d.ts.map +0 -1
- package/dist/templates/text.js +0 -26
- package/dist/templates/text.js.map +0 -1
- package/dist/text/stack.d.ts +0 -24
- package/dist/text/stack.d.ts.map +0 -1
- package/dist/text/stack.js +0 -18
- package/dist/text/stack.js.map +0 -1
- package/dist/text.d.ts +0 -56
- package/dist/text.d.ts.map +0 -1
- package/dist/text.js +0 -78
- package/dist/text.js.map +0 -1
- package/dist/validate/sizes.d.ts +0 -9
- package/dist/validate/sizes.d.ts.map +0 -1
- package/dist/validate/sizes.js +0 -27
- package/dist/validate/sizes.js.map +0 -1
- package/dist/validate.d.ts +0 -15
- package/dist/validate.d.ts.map +0 -1
- package/dist/validate.js +0 -300
- package/dist/validate.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { clampLine, measureIn } from "../../layout/index.js";
|
|
2
|
+
import { byline } from "../byline.js";
|
|
3
|
+
import { footerElement, hasFooter } from "../footer.js";
|
|
4
|
+
import { portraitAdvance } from "../portrait.js";
|
|
5
|
+
/** Clear space between the byline and the footer at the other end. */
|
|
6
|
+
const gapScale = 1.2;
|
|
7
|
+
/**
|
|
8
|
+
* The longest form of the byline that fits the room it has, cut only when even
|
|
9
|
+
* the shortest of them does not.
|
|
10
|
+
*/
|
|
11
|
+
function fitByline(parts, room, measure, fontSize) {
|
|
12
|
+
for (const part of parts) {
|
|
13
|
+
if (measure(part, fontSize) <= room) {
|
|
14
|
+
return part;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return clampLine(parts.at(-1) ?? "", room, measure, fontSize);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The bottom line: who wrote the post at the left, whose site it is at the
|
|
21
|
+
* right.
|
|
22
|
+
*
|
|
23
|
+
* The two are measured against each other rather than drawn and hoped for. A
|
|
24
|
+
* byline is a person's name and a date, a footer is a domain, and both are as
|
|
25
|
+
* long as they are, so on a landscape image they meet in the middle and
|
|
26
|
+
* overlap. The site's footer keeps its room, since it is the same on every
|
|
27
|
+
* image and a build can be sure it fits, and the byline takes what is left and
|
|
28
|
+
* is cut to it.
|
|
29
|
+
*/
|
|
30
|
+
export function articleBottom(said, config, frame, imageWidth, avatar, measure) {
|
|
31
|
+
const { pad, footerFontSize: fontSize } = frame;
|
|
32
|
+
const footer = hasFooter(config) ? (config.footer ?? "") : "";
|
|
33
|
+
const footerWidth = footer === ""
|
|
34
|
+
? 0
|
|
35
|
+
: measureIn(measure, config.fontFamily, 500)(footer, fontSize) +
|
|
36
|
+
fontSize * gapScale;
|
|
37
|
+
const room = imageWidth -
|
|
38
|
+
pad * 2 -
|
|
39
|
+
Math.round(footerWidth) -
|
|
40
|
+
(avatar === undefined ? 0 : portraitAdvance(fontSize));
|
|
41
|
+
return (byline(fitByline(said, room, measureIn(measure, config.fontFamily, 600), fontSize), {
|
|
42
|
+
x: pad,
|
|
43
|
+
y: frame.footerY,
|
|
44
|
+
fontSize,
|
|
45
|
+
opacity: 0.9,
|
|
46
|
+
left: pad,
|
|
47
|
+
width: imageWidth - pad * 2,
|
|
48
|
+
}, {
|
|
49
|
+
fontFamily: config.fontFamily,
|
|
50
|
+
fontWeight: 600,
|
|
51
|
+
fill: config.colors.foreground,
|
|
52
|
+
}, avatar, measure) +
|
|
53
|
+
footerElement(config, {
|
|
54
|
+
x: imageWidth - pad,
|
|
55
|
+
y: frame.footerY,
|
|
56
|
+
fontSize,
|
|
57
|
+
opacity: 0.7,
|
|
58
|
+
anchor: "end",
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=bottom.js.map
|
|
@@ -0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G,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC;YAC5D,QAAQ,GAAG,QAAQ,CAAC;IAE1B,MAAM,IAAI,GACR,UAAU;QACV,GAAG,GAAG,CAAC;QACP,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;QACvB,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEzD,OAAO,CACL,MAAM,CACJ,SAAS,CACP,IAAI,EACJ,IAAI,EACJ,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,EAC1C,QAAQ,CACT,EACD;QACE,CAAC,EAAE,GAAG;QACN,CAAC,EAAE,KAAK,CAAC,OAAO;QAChB,QAAQ;QACR,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,UAAU,GAAG,GAAG,GAAG,CAAC;KAC5B,EACD;QACE,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,UAAU,EAAE,GAAG;QACf,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU;KAC/B,EACD,MAAM,EACN,OAAO,CACR;QACD,aAAa,CAAC,MAAM,EAAE;YACpB,CAAC,EAAE,UAAU,GAAG,GAAG;YACnB,CAAC,EAAE,KAAK,CAAC,OAAO;YAChB,QAAQ;YACR,OAAO,EAAE,GAAG;YACZ,MAAM,EAAE,KAAK;SACd,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Template } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The default blog card: tags along the top, the headline and its standfirst
|
|
4
|
+
* in the middle, and who wrote it and when along the bottom.
|
|
5
|
+
*
|
|
6
|
+
* It reads `tags`, `author` and `date` on top of the usual `title` and
|
|
7
|
+
* `subtitle`, and draws the `avatar` prop beside the byline rather than beside
|
|
8
|
+
* the footer. That leaves the two ends of the bottom line saying different
|
|
9
|
+
* things: who wrote this post at the left, and whose site it is at the right.
|
|
10
|
+
*/
|
|
11
|
+
export declare const articleTemplate: Template;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/article/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,gBAAgB,CAAC;AAOhE;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,QAmD7B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { drawLines } from "../../layout/index.js";
|
|
2
|
+
import { contentArea, imageFrame, markRoom } from "../frame.js";
|
|
3
|
+
import { logoElement, logoRect } from "../logo.js";
|
|
4
|
+
import { articleBottom } from "./bottom.js";
|
|
5
|
+
import { articleLines, bylineParts } from "./lines.js";
|
|
6
|
+
import { tagBand } from "./tags.js";
|
|
7
|
+
/**
|
|
8
|
+
* The default blog card: tags along the top, the headline and its standfirst
|
|
9
|
+
* in the middle, and who wrote it and when along the bottom.
|
|
10
|
+
*
|
|
11
|
+
* It reads `tags`, `author` and `date` on top of the usual `title` and
|
|
12
|
+
* `subtitle`, and draws the `avatar` prop beside the byline rather than beside
|
|
13
|
+
* the footer. That leaves the two ends of the bottom line saying different
|
|
14
|
+
* things: who wrote this post at the left, and whose site it is at the right.
|
|
15
|
+
*/
|
|
16
|
+
export const articleTemplate = {
|
|
17
|
+
name: "article",
|
|
18
|
+
render({ props, config, dimensions, measure, logo, avatar, }) {
|
|
19
|
+
const { width, height } = dimensions;
|
|
20
|
+
const { fontFamily, colors } = config;
|
|
21
|
+
const said = bylineParts(props);
|
|
22
|
+
const frame = imageFrame(dimensions, config, avatar, {
|
|
23
|
+
footer: said.length > 0,
|
|
24
|
+
});
|
|
25
|
+
const { pad } = frame;
|
|
26
|
+
const mark = logoRect(logo, dimensions, pad, "start");
|
|
27
|
+
const chips = tagBand(props, config, dimensions, pad, markRoom(mark?.width, pad), measure);
|
|
28
|
+
const topMark = Math.max(chips.height, mark?.height ?? 0);
|
|
29
|
+
const area = contentArea(frame, markRoom(topMark, Math.round(height * 0.035)));
|
|
30
|
+
const body = drawLines(articleLines(props, {
|
|
31
|
+
measure,
|
|
32
|
+
fontFamily,
|
|
33
|
+
contentWidth: area.width,
|
|
34
|
+
titleFs: Math.round(height * 0.082),
|
|
35
|
+
standfirstFs: Math.round(height * 0.042),
|
|
36
|
+
height,
|
|
37
|
+
}), area, { fontFamily, fill: colors.foreground, lineHeight: 1.28 });
|
|
38
|
+
const bottom = articleBottom(said, config, frame, width, avatar, measure);
|
|
39
|
+
return chips.svg + logoElement(logo, mark) + body + bottom;
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/article/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAa;IACvC,IAAI,EAAE,SAAS;IACf,MAAM,CAAC,EACL,KAAK,EACL,MAAM,EACN,UAAU,EACV,OAAO,EACP,IAAI,EACJ,MAAM,GACU;QAChB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;QACrC,MAAM,EAAE,UAAU,EAAE,MAAM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AAM,EAAE,OAAO,CAAC,CAAC;QAE1E,OAAO,KAAK,CAAC,GAAG,GAAG,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,GAAG,MAAM,CAAC;IAC7D,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TextLine } from "../../layout/index.js";
|
|
2
|
+
import type { MeasureText, MetaImageProps } from "../../types.js";
|
|
3
|
+
/** The space the article's text has, and how to measure it into it. */
|
|
4
|
+
export interface ArticleText {
|
|
5
|
+
readonly measure: MeasureText;
|
|
6
|
+
readonly fontFamily: string;
|
|
7
|
+
readonly contentWidth: number;
|
|
8
|
+
readonly titleFs: number;
|
|
9
|
+
readonly standfirstFs: number;
|
|
10
|
+
readonly height: number;
|
|
11
|
+
}
|
|
12
|
+
/** The headline, then the standfirst under it. */
|
|
13
|
+
export declare function articleLines(props: MetaImageProps, text: ArticleText): TextLine[];
|
|
14
|
+
/**
|
|
15
|
+
* The byline in the two forms it can take: who wrote it and when, then who
|
|
16
|
+
* wrote it alone.
|
|
17
|
+
*
|
|
18
|
+
* The bottom line is shared with the site's own footer, so there is not always
|
|
19
|
+
* room for both. Dropping the date is a better answer than cutting the line,
|
|
20
|
+
* which on a square image lands in the middle of the month. Either may be
|
|
21
|
+
* missing to begin with, and a post with neither leaves the avatar to stand
|
|
22
|
+
* for both.
|
|
23
|
+
*/
|
|
24
|
+
export declare function bylineParts(props: MetaImageProps): readonly string[];
|
|
25
|
+
/** The byline as the post would have it, before any of it is given up. */
|
|
26
|
+
export declare function bylineText(props: MetaImageProps): string;
|
|
27
|
+
//# sourceMappingURL=lines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../../src/templates/article/lines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAUlE,uEAAuE;AACvE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,kDAAkD;AAClD,wBAAgB,YAAY,CAC1B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,WAAW,GAChB,QAAQ,EAAE,CAsBZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,MAAM,EAAE,CASpE;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAExD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { blockLines, optionalString } from "../../layout/index.js";
|
|
2
|
+
const maxTitleLines = 4;
|
|
3
|
+
const maxStandfirstLines = 3;
|
|
4
|
+
const titleFloor = 0.6;
|
|
5
|
+
const standfirstFloor = 0.8;
|
|
6
|
+
/** What goes between the author and the date. */
|
|
7
|
+
const separator = " · ";
|
|
8
|
+
/** The headline, then the standfirst under it. */
|
|
9
|
+
export function articleLines(props, text) {
|
|
10
|
+
const { measure, fontFamily, contentWidth } = text;
|
|
11
|
+
return [
|
|
12
|
+
...blockLines(props.title, measure, fontFamily, {
|
|
13
|
+
maxWidth: contentWidth,
|
|
14
|
+
maxLines: maxTitleLines,
|
|
15
|
+
fontSize: text.titleFs,
|
|
16
|
+
floor: titleFloor,
|
|
17
|
+
fontWeight: 800,
|
|
18
|
+
opacity: 1,
|
|
19
|
+
}),
|
|
20
|
+
...blockLines(props.subtitle, measure, fontFamily, {
|
|
21
|
+
maxWidth: contentWidth,
|
|
22
|
+
maxLines: maxStandfirstLines,
|
|
23
|
+
fontSize: text.standfirstFs,
|
|
24
|
+
floor: standfirstFloor,
|
|
25
|
+
fontWeight: 500,
|
|
26
|
+
opacity: 0.85,
|
|
27
|
+
gapBefore: Math.round(text.height * 0.03),
|
|
28
|
+
}),
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The byline in the two forms it can take: who wrote it and when, then who
|
|
33
|
+
* wrote it alone.
|
|
34
|
+
*
|
|
35
|
+
* The bottom line is shared with the site's own footer, so there is not always
|
|
36
|
+
* room for both. Dropping the date is a better answer than cutting the line,
|
|
37
|
+
* which on a square image lands in the middle of the month. Either may be
|
|
38
|
+
* missing to begin with, and a post with neither leaves the avatar to stand
|
|
39
|
+
* for both.
|
|
40
|
+
*/
|
|
41
|
+
export function bylineParts(props) {
|
|
42
|
+
const author = optionalString(props["author"]) ?? "";
|
|
43
|
+
const date = optionalString(props["date"]) ?? "";
|
|
44
|
+
if (author === "" || date === "") {
|
|
45
|
+
return [author === "" ? date : author].filter((part) => part !== "");
|
|
46
|
+
}
|
|
47
|
+
return [`${author}${separator}${date}`, author];
|
|
48
|
+
}
|
|
49
|
+
/** The byline as the post would have it, before any of it is given up. */
|
|
50
|
+
export function bylineText(props) {
|
|
51
|
+
return bylineParts(props)[0] ?? "";
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=lines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lines.js","sourceRoot":"","sources":["../../../src/templates/article/lines.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGnE,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,UAAU,GAAG,GAAG,CAAC;AACvB,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,iDAAiD;AACjD,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AAC;IACvE,CAAC;IAED,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,UAAU,CAAC,KAAqB;IAC9C,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Rect } from "../../layout/index.js";
|
|
2
|
+
import type { Dimensions, MeasureText, MetaImageProps, ResolvedConfig } from "../../types.js";
|
|
3
|
+
import type { PillStyle } from "../pill.js";
|
|
4
|
+
/**
|
|
5
|
+
* A row of tags along the top of the image.
|
|
6
|
+
*
|
|
7
|
+
* Tags that do not fit are dropped rather than being wrapped onto a second
|
|
8
|
+
* line or shrunk. A post's tag list is written for its own pages, where there
|
|
9
|
+
* is a sidebar to hold all nine of them, and the share image wants the first
|
|
10
|
+
* two or three of that list as a hint at the subject. Growing to fit them all
|
|
11
|
+
* would take the room the title is drawn in.
|
|
12
|
+
*/
|
|
13
|
+
export declare function tagRow(tags: readonly string[], area: Rect, style: PillStyle, measure: MeasureText): string;
|
|
14
|
+
/**
|
|
15
|
+
* The row of tags along the top, and how much room it took.
|
|
16
|
+
*
|
|
17
|
+
* Both are wanted at once: the tags are drawn from the top margin, and the
|
|
18
|
+
* headline underneath starts below whichever of them and the logo reaches
|
|
19
|
+
* furthest down.
|
|
20
|
+
*/
|
|
21
|
+
export declare function tagBand(props: MetaImageProps, config: ResolvedConfig, dimensions: Dimensions, pad: number, reserved: number, measure: MeasureText): {
|
|
22
|
+
readonly svg: string;
|
|
23
|
+
readonly height: number;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../src/templates/article/tags.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAS5C;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,WAAW,GACnB,MAAM,CA6BR;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,GACnB;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAyBnD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { row, stringList } from "../../layout/index.js";
|
|
2
|
+
import { pill, pillWidth } from "../pill.js";
|
|
3
|
+
/** The tags' height, as a fraction of the image's. */
|
|
4
|
+
const heightScale = 0.05;
|
|
5
|
+
/** Space between one tag and the next, as a fraction of their height. */
|
|
6
|
+
const gapScale = 0.3;
|
|
7
|
+
/**
|
|
8
|
+
* A row of tags along the top of the image.
|
|
9
|
+
*
|
|
10
|
+
* Tags that do not fit are dropped rather than being wrapped onto a second
|
|
11
|
+
* line or shrunk. A post's tag list is written for its own pages, where there
|
|
12
|
+
* is a sidebar to hold all nine of them, and the share image wants the first
|
|
13
|
+
* two or three of that list as a hint at the subject. Growing to fit them all
|
|
14
|
+
* would take the room the title is drawn in.
|
|
15
|
+
*/
|
|
16
|
+
export function tagRow(tags, area, style, measure) {
|
|
17
|
+
const gap = Math.round(area.height * gapScale);
|
|
18
|
+
const widths = [];
|
|
19
|
+
let used = 0;
|
|
20
|
+
for (const tag of tags) {
|
|
21
|
+
const width = pillWidth(tag, area.height, style, measure);
|
|
22
|
+
const advance = width + (widths.length === 0 ? 0 : gap);
|
|
23
|
+
if (used + advance > area.width) {
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
widths.push(width);
|
|
27
|
+
used += advance;
|
|
28
|
+
}
|
|
29
|
+
const placed = row(widths.map((size, index) => ({
|
|
30
|
+
size,
|
|
31
|
+
...(index > 0 && { gapBefore: gap }),
|
|
32
|
+
})), area, "start");
|
|
33
|
+
return placed
|
|
34
|
+
.map((rect, index) => pill(tags[index] ?? "", rect, style))
|
|
35
|
+
.join("");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The row of tags along the top, and how much room it took.
|
|
39
|
+
*
|
|
40
|
+
* Both are wanted at once: the tags are drawn from the top margin, and the
|
|
41
|
+
* headline underneath starts below whichever of them and the logo reaches
|
|
42
|
+
* furthest down.
|
|
43
|
+
*/
|
|
44
|
+
export function tagBand(props, config, dimensions, pad, reserved, measure) {
|
|
45
|
+
const tags = stringList(props["tags"]);
|
|
46
|
+
const height = tags.length === 0 ? 0 : Math.round(dimensions.height * heightScale);
|
|
47
|
+
return {
|
|
48
|
+
height,
|
|
49
|
+
svg: tagRow(tags, {
|
|
50
|
+
x: pad,
|
|
51
|
+
y: pad,
|
|
52
|
+
width: dimensions.width - pad * 2 - reserved,
|
|
53
|
+
height,
|
|
54
|
+
}, {
|
|
55
|
+
fontFamily: config.fontFamily,
|
|
56
|
+
fontWeight: 700,
|
|
57
|
+
fill: config.colors.foreground,
|
|
58
|
+
background: config.colors.foreground,
|
|
59
|
+
backgroundOpacity: 0.16,
|
|
60
|
+
}, measure),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../src/templates/article/tags.ts"],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SACV,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;SAC1D,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CACrB,KAAqB,EACrB,MAAsB,EACtB,UAAsB,EACtB,GAAW,EACX,QAAgB,EAChB,OAAoB;IAEpB,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,MAAM,MAAM,GACV,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC;IAEtE,OAAO;QACL,MAAM;QACN,GAAG,EAAE,MAAM,CACT,IAAI,EACJ;YACE,CAAC,EAAE,GAAG;YACN,CAAC,EAAE,GAAG;YACN,KAAK,EAAE,UAAU,CAAC,KAAK,GAAG,GAAG,GAAG,CAAC,GAAG,QAAQ;YAC5C,MAAM;SACP,EACD;YACE,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,UAAU,EAAE,GAAG;YACf,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU;YAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU;YACpC,iBAAiB,EAAE,IAAI;SACxB,EACD,OAAO,CACR;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { ImageAsset, MeasureText, ResolvedConfig } from "../types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PortraitPlacement } from "./portrait.js";
|
|
3
3
|
/** Where the attribution line goes: a footer placement, plus room to lay it out. */
|
|
4
|
-
export
|
|
5
|
-
/** Left edge and width of the content area the line is set within. */
|
|
6
|
-
readonly left: number;
|
|
7
|
-
readonly width: number;
|
|
8
|
-
}
|
|
4
|
+
export type AttributionPlacement = PortraitPlacement;
|
|
9
5
|
/**
|
|
10
6
|
* The footer line, with the post's avatar before it.
|
|
11
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../../src/templates/attribution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../../src/templates/attribution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMvD,oFAAoF;AACpF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAErD;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,oBAAoB,EAC/B,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,OAAO,EAAE,WAAW,GACnB,MAAM,CAgBR"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { measureIn } from "../layout/index.js";
|
|
2
2
|
import { footerElement, hasFooter } from "./footer.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** Where a circular avatar's centre sits above the footer's baseline. */
|
|
6
|
-
const avatarRise = 0.34;
|
|
7
|
-
/** Unique within one image, which is as many avatars as there are. */
|
|
3
|
+
import { portraitImage, portraitRow } from "./portrait.js";
|
|
4
|
+
/** Unique within one image, which is as many footer avatars as there are. */
|
|
8
5
|
const avatarId = "colophon-avatar";
|
|
9
6
|
/**
|
|
10
7
|
* The footer line, with the post's avatar before it.
|
|
@@ -17,23 +14,12 @@ export function attribution(config, placement, avatar, measure) {
|
|
|
17
14
|
if (avatar === undefined) {
|
|
18
15
|
return footerElement(config, placement);
|
|
19
16
|
}
|
|
20
|
-
const { fontSize } = placement;
|
|
21
|
-
const size = Math.round(fontSize * avatarScale);
|
|
22
17
|
const text = hasFooter(config) ? (config.footer ?? "") : "";
|
|
23
|
-
const
|
|
24
|
-
const textWidth = text === ""
|
|
18
|
+
const width = text === ""
|
|
25
19
|
? 0
|
|
26
|
-
: measureIn(measure, config.fontFamily, 500)(text, fontSize);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const [portrait, label] = row([{ size }, { size: Math.round(textWidth), gapBefore: gap }], { x: placement.left, y: placement.y, width: placement.width, height: size }, placement.anchor === "middle" ? "centre" : "start");
|
|
31
|
-
const top = Math.round(placement.y - fontSize * avatarRise - size / 2);
|
|
32
|
-
return (image({ x: portrait?.x ?? placement.left, y: top, width: size, height: size }, avatar.href, { fit: "cover", radius: Math.round(size / 2), id: avatarId }) +
|
|
33
|
-
footerElement(config, {
|
|
34
|
-
...placement,
|
|
35
|
-
x: label?.x ?? placement.left,
|
|
36
|
-
anchor: "start",
|
|
37
|
-
}));
|
|
20
|
+
: measureIn(measure, config.fontFamily, 500)(text, placement.fontSize);
|
|
21
|
+
const { rect, labelX } = portraitRow(placement, width);
|
|
22
|
+
return (portraitImage(avatar, rect, avatarId) +
|
|
23
|
+
footerElement(config, { ...placement, x: labelX, anchor: "start" }));
|
|
38
24
|
}
|
|
39
25
|
//# sourceMappingURL=attribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribution.js","sourceRoot":"","sources":["../../src/templates/attribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"attribution.js","sourceRoot":"","sources":["../../src/templates/attribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE3D,6EAA6E;AAC7E,MAAM,QAAQ,GAAG,iBAAiB,CAAC;AAKnC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,MAAsB,EACtB,SAA+B,EAC/B,MAA8B,EAC9B,OAAoB;IAEpB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,MAAM,KAAK,GACT,IAAI,KAAK,EAAE;QACT,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC3E,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAEvD,OAAO,CACL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC;QACrC,aAAa,CAAC,MAAM,EAAE,EAAE,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CACpE,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/templates/banner/version.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/templates/banner/version.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,WAAW,GACjB,SAAS,QAAQ,EAAE,CAgBrB"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { versionLabel } from "../version.js";
|
|
2
2
|
/**
|
|
3
3
|
* The version line, or nothing where there is no version. It is never wrapped
|
|
4
4
|
* or shrunk: a version string that needed either would not be one.
|
|
5
5
|
*/
|
|
6
6
|
export function versionLines(props, sizes) {
|
|
7
|
-
const version =
|
|
8
|
-
if (version === undefined
|
|
7
|
+
const version = versionLabel(props.version);
|
|
8
|
+
if (version === undefined) {
|
|
9
9
|
return [];
|
|
10
10
|
}
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
13
|
-
text:
|
|
13
|
+
text: version,
|
|
14
14
|
fontSize: sizes.versionFs,
|
|
15
15
|
fontWeight: 700,
|
|
16
16
|
opacity: 0.85,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/templates/banner/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/templates/banner/version.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAqB,EACrB,KAAkB;IAElB,MAAM,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE5C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO;QACL;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,KAAK,CAAC,SAAS;YACzB,UAAU,EAAE,GAAG;YACf,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;SAC3C;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { LinesStyle, Rect, TextLine } from "../layout/index.js";
|
|
2
|
+
import type { ImageAsset, MeasureText, ResolvedConfig } from "../types.js";
|
|
3
|
+
import type { Frame } from "./frame.js";
|
|
4
|
+
/**
|
|
5
|
+
* The footer line as most templates want it: on the bottom margin, across the
|
|
6
|
+
* content width, with the post's avatar before it where there is one.
|
|
7
|
+
*
|
|
8
|
+
* Every template ends with the same dozen lines of placement, which is a dozen
|
|
9
|
+
* chances for one of them to drift from the rest. A template wanting something
|
|
10
|
+
* else, such as the `article` with its byline at the other end of the same
|
|
11
|
+
* line, still calls `attribution` itself.
|
|
12
|
+
*/
|
|
13
|
+
export declare function footerLine(config: ResolvedConfig, frame: Frame, imageWidth: number, avatar: ImageAsset | undefined, measure: MeasureText, align?: "start" | "middle", opacity?: number): string;
|
|
14
|
+
/**
|
|
15
|
+
* Draw a block of lines in a slot a `stack` handed back, or nothing where
|
|
16
|
+
* there was no slot to draw it in.
|
|
17
|
+
*
|
|
18
|
+
* A stack returns one rectangle per item, so the missing case never happens;
|
|
19
|
+
* it is the type that says otherwise, and every template that stacks its text
|
|
20
|
+
* would otherwise carry the same conditional to prove it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function drawSlot(lines: readonly TextLine[], slot: Rect | undefined, style: LinesStyle): string;
|
|
23
|
+
//# sourceMappingURL=bottom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom.d.ts","sourceRoot":"","sources":["../../src/templates/bottom.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAKxC;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,OAAO,EAAE,WAAW,EACpB,KAAK,GAAE,OAAO,GAAG,QAAkB,EACnC,OAAO,GAAE,MAAuB,GAC/B,MAAM,CAiBR;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,IAAI,EAAE,IAAI,GAAG,SAAS,EACtB,KAAK,EAAE,UAAU,GAChB,MAAM,CAER"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { drawLines } from "../layout/index.js";
|
|
2
|
+
import { attribution } from "./attribution.js";
|
|
3
|
+
/** How faint the footer is against the image's own text. */
|
|
4
|
+
const defaultOpacity = 0.75;
|
|
5
|
+
/**
|
|
6
|
+
* The footer line as most templates want it: on the bottom margin, across the
|
|
7
|
+
* content width, with the post's avatar before it where there is one.
|
|
8
|
+
*
|
|
9
|
+
* Every template ends with the same dozen lines of placement, which is a dozen
|
|
10
|
+
* chances for one of them to drift from the rest. A template wanting something
|
|
11
|
+
* else, such as the `article` with its byline at the other end of the same
|
|
12
|
+
* line, still calls `attribution` itself.
|
|
13
|
+
*/
|
|
14
|
+
export function footerLine(config, frame, imageWidth, avatar, measure, align = "start", opacity = defaultOpacity) {
|
|
15
|
+
const { pad } = frame;
|
|
16
|
+
return attribution(config, {
|
|
17
|
+
x: align === "middle" ? Math.round(imageWidth / 2) : pad,
|
|
18
|
+
y: frame.footerY,
|
|
19
|
+
fontSize: frame.footerFontSize,
|
|
20
|
+
opacity,
|
|
21
|
+
...(align === "middle" && { anchor: "middle" }),
|
|
22
|
+
left: pad,
|
|
23
|
+
width: imageWidth - pad * 2,
|
|
24
|
+
}, avatar, measure);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Draw a block of lines in a slot a `stack` handed back, or nothing where
|
|
28
|
+
* there was no slot to draw it in.
|
|
29
|
+
*
|
|
30
|
+
* A stack returns one rectangle per item, so the missing case never happens;
|
|
31
|
+
* it is the type that says otherwise, and every template that stacks its text
|
|
32
|
+
* would otherwise carry the same conditional to prove it.
|
|
33
|
+
*/
|
|
34
|
+
export function drawSlot(lines, slot, style) {
|
|
35
|
+
return slot === undefined ? "" : drawLines(lines, slot, style);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=bottom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom.js","sourceRoot":"","sources":["../../src/templates/bottom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,4DAA4D;AAC5D,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CACxB,MAAsB,EACtB,KAAY,EACZ,UAAkB,EAClB,MAA8B,EAC9B,OAAoB,EACpB,KAAK,GAAuB,OAAO,EACnC,OAAO,GAAW,cAAc;IAEhC,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAEtB,OAAO,WAAW,CAChB,MAAM,EACN;QACE,CAAC,EAAE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxD,CAAC,EAAE,KAAK,CAAC,OAAO;QAChB,QAAQ,EAAE,KAAK,CAAC,cAAc;QAC9B,OAAO;QACP,GAAG,CAAC,KAAK,KAAK,QAAQ,IAAI,EAAE,MAAM,EAAE,QAAiB,EAAE,CAAC;QACxD,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,UAAU,GAAG,GAAG,GAAG,CAAC;KAC5B,EACD,MAAM,EACN,OAAO,CACR,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CACtB,KAA0B,EAC1B,IAAsB,EACtB,KAAiB;IAEjB,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ImageAsset, MeasureText } from "../types.js";
|
|
2
|
+
import type { PortraitPlacement } from "./portrait.js";
|
|
3
|
+
/** How a byline is set, which is the part the footer takes from config. */
|
|
4
|
+
export interface BylineStyle {
|
|
5
|
+
readonly fontFamily: string;
|
|
6
|
+
readonly fontWeight: number;
|
|
7
|
+
readonly fill: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A line of the template's own words with the post's avatar before it: an
|
|
11
|
+
* author and a date on an article, the person a quotation is from.
|
|
12
|
+
*
|
|
13
|
+
* This is `attribution` with the text opened up. The footer says who published
|
|
14
|
+
* the site and is the same on every image; a byline says who wrote this one,
|
|
15
|
+
* so it comes from the props. Both are a picture and a line of type on one
|
|
16
|
+
* baseline, and both are drawn by {@link portraitRow}.
|
|
17
|
+
*/
|
|
18
|
+
export declare function byline(text: string, placement: PortraitPlacement, style: BylineStyle, avatar: ImageAsset | undefined, measure: MeasureText): string;
|
|
19
|
+
//# sourceMappingURL=byline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"byline.d.ts","sourceRoot":"","sources":["../../src/templates/byline.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMvD,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,OAAO,EAAE,WAAW,GACnB,MAAM,CAyCR"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { measureIn, textElement } from "../layout/index.js";
|
|
2
|
+
import { portraitImage, portraitRow } from "./portrait.js";
|
|
3
|
+
/** Unique within one image, which is as many bylines as a template draws. */
|
|
4
|
+
const avatarId = "colophon-byline";
|
|
5
|
+
/**
|
|
6
|
+
* A line of the template's own words with the post's avatar before it: an
|
|
7
|
+
* author and a date on an article, the person a quotation is from.
|
|
8
|
+
*
|
|
9
|
+
* This is `attribution` with the text opened up. The footer says who published
|
|
10
|
+
* the site and is the same on every image; a byline says who wrote this one,
|
|
11
|
+
* so it comes from the props. Both are a picture and a line of type on one
|
|
12
|
+
* baseline, and both are drawn by {@link portraitRow}.
|
|
13
|
+
*/
|
|
14
|
+
export function byline(text, placement, style, avatar, measure) {
|
|
15
|
+
if (text === "" && avatar === undefined) {
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
const attributes = {
|
|
19
|
+
fontFamily: style.fontFamily,
|
|
20
|
+
fontSize: placement.fontSize,
|
|
21
|
+
fontWeight: style.fontWeight,
|
|
22
|
+
fill: style.fill,
|
|
23
|
+
fillOpacity: placement.opacity,
|
|
24
|
+
};
|
|
25
|
+
if (avatar === undefined) {
|
|
26
|
+
return textElement(text, {
|
|
27
|
+
...attributes,
|
|
28
|
+
x: placement.x,
|
|
29
|
+
y: placement.y,
|
|
30
|
+
...(placement.anchor !== undefined && { anchor: placement.anchor }),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const width = text === ""
|
|
34
|
+
? 0
|
|
35
|
+
: measureIn(measure, style.fontFamily, style.fontWeight)(text, placement.fontSize);
|
|
36
|
+
const { rect, labelX } = portraitRow(placement, width);
|
|
37
|
+
return (portraitImage(avatar, rect, avatarId) +
|
|
38
|
+
textElement(text, {
|
|
39
|
+
...attributes,
|
|
40
|
+
x: labelX,
|
|
41
|
+
y: placement.y,
|
|
42
|
+
anchor: "start",
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=byline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"byline.js","sourceRoot":"","sources":["../../src/templates/byline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE3D,6EAA6E;AAC7E,MAAM,QAAQ,GAAG,iBAAiB,CAAC;AASnC;;;;;;;;GAQG;AACH,MAAM,UAAU,MAAM,CACpB,IAAY,EACZ,SAA4B,EAC5B,KAAkB,EAClB,MAA8B,EAC9B,OAAoB;IAEpB,IAAI,IAAI,KAAK,EAAE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,UAAU,GAAG;QACjB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,WAAW,EAAE,SAAS,CAAC,OAAO;KAC/B,CAAC;IAEF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC,IAAI,EAAE;YACvB,GAAG,UAAU;YACb,CAAC,EAAE,SAAS,CAAC,CAAC;YACd,CAAC,EAAE,SAAS,CAAC,CAAC;YACd,GAAG,CAAC,SAAS,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,GACT,IAAI,KAAK,EAAE;QACT,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,SAAS,CACP,OAAO,EACP,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,UAAU,CACjB,CAAC,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAEvD,OAAO,CACL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC;QACrC,WAAW,CAAC,IAAI,EAAE;YAChB,GAAG,UAAU;YACb,CAAC,EAAE,MAAM;YACT,CAAC,EAAE,SAAS,CAAC,CAAC;YACd,MAAM,EAAE,OAAO;SAChB,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clip.js","sourceRoot":"","sources":["../../../src/templates/code/clip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"clip.js","sourceRoot":"","sources":["../../../src/templates/code/clip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CACtB,MAA4B,EAC5B,UAAkB;IAElB,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,UAAU,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