india-state-district
Version:
A lightweight TypeScript library for handling Indian states and districts data with type safety and easy integration
29 lines (28 loc) • 3.58 kB
TypeScript
/**
* Indian Flag SVG
* Follows official specifications for the Indian national flag
*/
export declare const INDIA_FLAG_SVG = "xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"900\" height=\"600\" viewBox=\"0 0 900 600\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- Background -->\n <rect width=\"900\" height=\"600\" fill=\"#fff\"/>\n \n <!-- Saffron (deep orange) stripe -->\n <rect width=\"900\" height=\"200\" fill=\"#FF9933\"/>\n \n <!-- White stripe -->\n <rect y=\"200\" width=\"900\" height=\"200\" fill=\"#fff\"/>\n \n <!-- Green stripe -->\n <rect y=\"400\" width=\"900\" height=\"200\" fill=\"#138808\"/>\n \n <!-- Ashoka Chakra (24-spoked wheel) -->\n <g transform=\"translate(450,300)\">\n <!-- Outer circle -->\n <circle r=\"90\" fill=\"#000080\"/>\n <circle r=\"85\" fill=\"#fff\"/>\n \n <!-- 24 spokes -->\n <g id=\"spokes\">\n <!-- Generate 24 spokes -->\n <g id=\"spoke\">\n <rect x=\"-2\" y=\"-85\" width=\"4\" height=\"85\" fill=\"#000080\"/>\n <polygon points=\"0,-85 4,-75 -4,-75\" fill=\"#000080\"/>\n </g>\n <g transform=\"rotate(15)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(30)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(45)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(60)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(75)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(90)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(105)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(120)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(135)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(150)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(165)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(180)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(195)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(210)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(225)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(240)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(255)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(270)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(285)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(300)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(315)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(330)\"><use href=\"#spoke\"/></g>\n <g transform=\"rotate(345)\"><use href=\"#spoke\"/></g>\n </g>\n </g>\n</svg>";
/**
* Official colors of the Indian flag
*/
export declare const INDIA_FLAG_COLORS: {
readonly saffron: "#FF9933";
readonly white: "#FFFFFF";
readonly green: "#138808";
readonly navyBlue: "#000080";
};
/**
* Get the flag SVG with custom dimensions
* @param width - Width of the flag
* @param height - If not provided, will maintain 3:2 aspect ratio
* @returns SVG string with custom dimensions
*/
export declare function getIndiaFlagSVG(width: number, height?: number): string;
/**
* Get the flag as a data URL for use in img src
* @param width - Width of the flag
* @param height - If not provided, will maintain 3:2 aspect ratio
* @returns Data URL string
*/
export declare function getIndiaFlagDataUrl(width: number, height?: number): string;