リファレンス
旗の資料と表示の情報
import { … } from "@johnmorrisdotca/hata/manifest";
最小化と gzip 圧縮をしたサイズは 86.9 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
FlagRecord | 型 | Where one flag's drawing comes from, under what licence, and why that drawing was chosen. |
FlagSource | 型 | Where a drawing comes from: Wikimedia Commons (the file Wikidata names as the place's flag), or one of the MIT flag sets, chosen where it draws the same flag at its true proportions and is smaller, or is free where Commons' file is not. |
Framing | 型 | How one frame shows a flag, measured so that no frame misrepresents it (pnpm data:framing): a frame keeps a flag's colours when every colour covering at least 5% of the flag still covers at least half that share. |
FramingCrop | 型 | The crop of a flag at one shape: which crop fit: "auto" chooses, and the side fit: "crop" asked for by name keeps. |
LEFT_OUT | 定数 | Every code Kuni knows that has no flag in this version, with the reason: no source names one, or the only drawing's licence is not one this package can ship. |
leftOut | 関数 | Why a code Kuni knows has no flag in this version. |
LeftOutRecord | 型 | A code Kuni knows that has no flag in this version, and why. |
LicenceKind | 型 | The kinds of licence a shipped drawing can be under: for a Wikimedia Commons file, as Commons states it, public-domain (PD-… templates: a government work, or a design too simple to be copyrighted), cc0, or cc-by (credit asked; NOTICE.md gives it), or accepted (another licence the maintainer decided to accept, written in the licence's name: Mississippi's "Copyrighted free use"); for a flag set's drawing, mit (the set's notice is in NOTICE.md). |
manifest | 関数 | Where one flag's drawing comes from, its licence and author, and why it was chosen. |
MANIFEST | 定数 | Every flag's record, in the order of FLAG_CODES: its source, file, page, licence, author, restrictions, size, aspect ratio, and why that drawing was chosen. |
Variant | 型 | One of a place's flags in real use, for flag(code, { variant }) and variantsOf(code): Afghanistan's Republic tricolour and the Taliban's flag, Bavaria's lozenges and stripes, Guadeloupe's French tricolour and its local flag. |
variantsOf | 関数 | Every flag of a place that has more than one in real use, with its status, dates, reason and drawing: Afghanistan's Republic tricolour (the default) and the Taliban's flag, Bavaria's lozenges and stripes, Northern Ireland's Union Flag and former Ulster Banner (it has no flag of its own by default), the French tricolour and the local flag of each French territory. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。