UNPKG

@blameitonyourisp/blurrid

Version:

Generate and render blurred placeholders for lazy loaded images.

120 lines (108 loc) 4.29 kB
// Copyright (c) 2022 James Reid. All rights reserved. // // This source code file is licensed under the terms of the MIT license, a copy // of which may be found in the LICENSE.md file in the root of this repository. // // For a template copy of the license see one of the following 3rd party sites: // - <https://opensource.org/licenses/MIT> // - <https://choosealicense.com/licenses/mit> // - <https://spdx.org/licenses/MIT> /** * @ignore * @file Changelog frontmatter, view, and cli option types. * @author James Reid */ // @ts-check // @@no-imports // @@body /** * Type of frontmatter expected at top of changelog file. * * @typedef {object} Frontmatter * @property {string} last-hash - End hash of revision list of last * autogenerated changelog section. * @property {string} last-tag - Suggested version tag listed in last * autogenerated changelog section. */ /** * Type of mustache data view required for rendering mustache template for new * changelog section. * * @typedef {object} ChangelogView * @property {string} repoOwner - Github owner (username or organisation name) * of remote repository. * @property {string} repoName - Github repository name of remote repository. * @property {string} tag - New suggested semver version tag string. * @property {string} longHash - Long hash of end hash of revision list used to * autogenerate new changelog section. * @property {string} shortHash - short hash of end hash of revision list used * to autogenerate new changelog section. * @property {string} date - Date of end hash of revision list used to * autogenerate new changelog section. * @property {ChangelogCategoryView[]} categories - Changelog categories to be * rendered by mustache partial template. */ /** * Type of mustache data view required for rendering mustache partial template * for a category in a new changelog section. * * @typedef {object} ChangelogCategoryView * @property {string} title * @property {ChangelogPromptView[]} commits */ /** * Type of mustache data view required for rendering mustache partial template * for each commit prompt in a new changelog section. * * @typedef {object} ChangelogPromptView * @property {string} repoOwner - Github owner (username or organisation name) * of remote repository. * @property {string} repoName - Github repository name of remote repository. * @property {string} longHash - Long hash of current commit being used to * generate changelog prompt within a given category. * @property {string} shortHash - Short hash of current commit being used to * generate changelog prompt within a given category. * @property {string} date - Date of current commit being used to generate * changelog prompt within a given category. * @property {string} semver - Semver string of changes made by commit * corresponding to this prompt. "Unknown Change" used if the commit is of * non-standard format. * @property {string} category - Changelog category to which current commit * prompt belongs. * @property {string} summary - Changelog prompt summary extracted from commit * title. * @property {{key:string, value:string}[]} trailers - Git trailers extracted * from git commit corresponding to this changelog prompt. */ /** * Type of available cli options for changelog command. * * @typedef ChangelogCliOptions * @property {string} path - Relative path to changelog from repo package.json * file. * @property {string} lastTag - Last tag generated or listed in changelog. * @property {string} startHash - Start hash of revision list to generate * changelog. * @property {string} endHash - End hash of revision list to generate changelog. * @property {string} branch - Deployment branch containing commits in revision * list. * @property {string} repoOwner - Github owner (username or organisation name) * of remote repository. * @property {string} repoName - Github repository name of remote repository. */ // @@exports /** * @ignore * @type {Frontmatter} */ export let Frontmatter /** * @ignore * @type {ChangelogCliOptions} */ export let ChangelogCliOptions /** * @ignore * @type {ChangelogView} */ export let ChangelogView