From e10b9fab1112fd8db6928201d9d4a8caf542d672 Mon Sep 17 00:00:00 2001 From: Stephen Akinyemi Date: Sun, 22 Sep 2024 22:37:01 +0100 Subject: [PATCH] fix: remove node_module lol --- node_modules/.modules.yaml | 24 - .../@iconify/tailwind/.eslintrc.cjs | 33 - .../node_modules/@iconify/tailwind/README.md | 20 - .../@iconify/tailwind/dist/plugin.d.ts | 156 --- .../@iconify/tailwind/dist/plugin.js | 958 ------------------ .../@iconify/tailwind/license.txt | 21 - .../@iconify/tailwind/package.json | 49 - .../node_modules/@iconify/types | 1 - .../node_modules/@iconify/types/.prettierrc | 8 - .../node_modules/@iconify/types/README.md | 459 --------- .../node_modules/@iconify/types/license.txt | 21 - .../node_modules/@iconify/types/package.json | 23 - .../@iconify/types/pnpm-lock.yaml | 15 - .../node_modules/@iconify/types/provider.d.ts | 44 - .../node_modules/@iconify/types/provider.js | 3 - .../node_modules/@iconify/types/types.d.ts | 272 ----- .../node_modules/@iconify/types/types.js | 3 - node_modules/.pnpm/lock.yaml | 29 - .../.pnpm/node_modules/@iconify/types | 1 - node_modules/@iconify/tailwind | 1 - 20 files changed, 2141 deletions(-) delete mode 100644 node_modules/.modules.yaml delete mode 100644 node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/.eslintrc.cjs delete mode 100644 node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/README.md delete mode 100644 node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/dist/plugin.d.ts delete mode 100644 node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/dist/plugin.js delete mode 100644 node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/license.txt delete mode 100644 node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/package.json delete mode 120000 node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/types delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/.prettierrc delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/README.md delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/license.txt delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/package.json delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/pnpm-lock.yaml delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/provider.d.ts delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/provider.js delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts delete mode 100644 node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.js delete mode 100644 node_modules/.pnpm/lock.yaml delete mode 120000 node_modules/.pnpm/node_modules/@iconify/types delete mode 120000 node_modules/@iconify/tailwind diff --git a/node_modules/.modules.yaml b/node_modules/.modules.yaml deleted file mode 100644 index 87867f3..0000000 --- a/node_modules/.modules.yaml +++ /dev/null @@ -1,24 +0,0 @@ -hoistPattern: - - '*' -hoistedDependencies: - '@iconify/types@2.0.0': - '@iconify/types': private -included: - dependencies: true - devDependencies: true - optionalDependencies: true -injectedDeps: {} -layoutVersion: 5 -nodeLinker: isolated -packageManager: pnpm@9.6.0 -pendingBuilds: [] -prunedAt: Thu, 19 Sep 2024 22:16:06 GMT -publicHoistPattern: - - '*eslint*' - - '*prettier*' -registries: - default: https://registry.npmjs.org/ -skipped: [] -storeDir: /Users/steveakinyemi/Library/pnpm/store/v3 -virtualStoreDir: .pnpm -virtualStoreDirMaxLength: 120 diff --git a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/.eslintrc.cjs b/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/.eslintrc.cjs deleted file mode 100644 index f559331..0000000 --- a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/.eslintrc.cjs +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = { - env: { - browser: true, - es6: true, - node: true, - }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', - 'plugin:prettier/recommended', - ], - globals: { - Atomics: 'readonly', - SharedArrayBuffer: 'readonly', - }, - parser: '@typescript-eslint/parser', - parserOptions: { - tsconfigRootDir: __dirname, - project: ['tsconfig.json', 'tests/tsconfig.json'], - extraFileExtensions: ['.cjs'], - }, - plugins: ['@typescript-eslint'], - rules: { - 'no-mixed-spaces-and-tabs': ['off'], - 'no-unused-vars': ['off'], - }, - overrides: [ - { - files: ['src/**/*.ts', 'tests/*.ts'], - }, - ], -}; diff --git a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/README.md b/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/README.md deleted file mode 100644 index 2b524eb..0000000 --- a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Iconify for Tailwind CSS - -This plugin creates CSS for over 150k open source icons. - -[Browse icons at Iconify](https://icon-sets.iconify.design/) to see all icons. - -## Usage - -[See Iconify for Tailwind CSS documentation](https://iconify.design/docs/usage/css/tailwind/#installation). - -## License - -This package is licensed under MIT license. - -`SPDX-License-Identifier: MIT` - -This license does not apply to icons. Icons are released under different licenses, see each icon set for details. -Icons available by default are all licensed under some kind of open-source or free license. - -© 2023-PRESENT Vjacheslav Trushkin diff --git a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/dist/plugin.d.ts b/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/dist/plugin.d.ts deleted file mode 100644 index 64afdef..0000000 --- a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/dist/plugin.d.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { Config } from 'tailwindcss/types/config'; -import type { IconifyJSON } from '@iconify/types'; -import { PluginCreator } from 'tailwindcss/types/config'; - -/** - * Generate styles for preset list of icons - * - * Requires knowing full list of icons - * - * Usage in HTML: - * - * @deprecated Use addIconSelectors instead - */ -export declare function addCleanIconSelectors(icons: string[] | string, options?: CleanIconifyPluginOptions): { - handler: PluginCreator; - config?: Partial; -}; - -/** - * Generate styles for dynamic selector - * - * Usage in HTML: - */ -export declare function addDynamicIconSelectors(options?: DynamicIconifyPluginOptions): { - handler: PluginCreator; - config?: Partial; -}; - -/** - * Generate rules for mask, background and selected icon sets - * - * Icons should combine either mask or background selector and icon selector - * - * This plugin generates only square icons. Icons that are not square will be resized to fit square. - * - * Usage in HTML: - */ -export declare function addIconSelectors(options: IconifyPluginOptions): { - handler: PluginCreator; - config?: Partial; -}; - -/** - * Options for clean class names - */ -export declare interface CleanIconifyPluginOptions extends CommonIconifyPluginOptions, Omit { -} - -/** - * Common options - */ -declare interface CommonIconifyPluginOptions { - iconSets?: Record; - customise?: (content: string, name: string, prefix: string) => string; -} - -/** - * Formatting modes. Same as in SASS - */ -declare type CSSFormatMode = 'expanded' | 'compact' | 'compressed'; - -/** - * Options for dynamic class names - */ -export declare interface DynamicIconifyPluginOptions extends CommonIconifyPluginOptions { - prefix?: string; - overrideOnly?: true; - scale?: number; -} - -/** - * Formatting options - */ -declare interface IconCSSFormatOptions { - format?: CSSFormatMode; -} - -/** - * Selector for icon - */ -declare interface IconCSSIconSelectorOptions { - pseudoSelector?: boolean; - iconSelector?: string; -} - -/** - * Options for generating multiple icons as background/mask - */ -declare interface IconCSSIconSetOptions extends IconCSSSharedOptions, IconCSSSelectorOptions, IconCSSModeOptions, IconCSSFormatOptions { - customise?: (content: string, name: string) => string; -} - -/** - * Icon mode - */ -declare type IconCSSMode = 'mask' | 'background'; - -/** - * Mode - */ -declare interface IconCSSModeOptions { - mode?: IconCSSMode; -} - -/** - * Selector for icon when generating data from icon set - */ -declare interface IconCSSSelectorOptions extends IconCSSIconSelectorOptions { - commonSelector?: string; - overrideSelector?: string; -} - -/** - * Options common for both multiple icons and single icon - */ -declare interface IconCSSSharedOptions { - varName?: string | null; - forceSquare?: boolean; - color?: string; - rules?: Record; -} - -declare type IconifyIconSetSource = IconifyJSON | string | (() => IconifyJSON); - -declare type IconifyPluginListOptions = (string | IconSetOptions)[]; - -export declare type IconifyPluginOptions = IconifyPluginOptionsObject | IconifyPluginListOptions; - -declare interface IconifyPluginOptionsObject { - maskSelector?: string; - extraMaskRules?: Record; - backgroundSelector?: string; - extraBackgroundRules?: Record; - iconSelector?: string; - varName?: string; - scale?: number; - square?: boolean; - prefixes?: IconifyPluginListOptions; - customise?: (content: string, name: string, prefix: string) => string; -} - -declare interface IconSetOptions { - prefix?: string; - source?: IconSetSource; - icons?: IconsListOption; - customise?: (content: string, name: string) => string; -} - -declare type IconSetSource = string | IconifyJSON; - -/** - * Options for main plugin - */ -declare type IconsListOption = string[] | ((name: string) => boolean); - -export { } diff --git a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/dist/plugin.js b/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/dist/plugin.js deleted file mode 100644 index b8d792c..0000000 --- a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/dist/plugin.js +++ /dev/null @@ -1,958 +0,0 @@ -/** -* (c) Iconify for Tailwind CSS -* -* For the full copyright and license information, please view the license.txt -* files at https://github.com/iconify/iconify -* -* Licensed under MIT. -* -* @license MIT -* @version 1.1.3 -*/ -'use strict'; - -var plugin = require('tailwindcss/plugin'); -var node_fs = require('node:fs'); - -const defaultIconDimensions = Object.freeze( - { - left: 0, - top: 0, - width: 16, - height: 16 - } -); -const defaultIconTransformations = Object.freeze({ - rotate: 0, - vFlip: false, - hFlip: false -}); -const defaultIconProps = Object.freeze({ - ...defaultIconDimensions, - ...defaultIconTransformations -}); -const defaultExtendedIconProps = Object.freeze({ - ...defaultIconProps, - body: "", - hidden: false -}); - -function mergeIconTransformations(obj1, obj2) { - const result = {}; - if (!obj1.hFlip !== !obj2.hFlip) { - result.hFlip = true; - } - if (!obj1.vFlip !== !obj2.vFlip) { - result.vFlip = true; - } - const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4; - if (rotate) { - result.rotate = rotate; - } - return result; -} - -function mergeIconData(parent, child) { - const result = mergeIconTransformations(parent, child); - for (const key in defaultExtendedIconProps) { - if (key in defaultIconTransformations) { - if (key in parent && !(key in result)) { - result[key] = defaultIconTransformations[key]; - } - } else if (key in child) { - result[key] = child[key]; - } else if (key in parent) { - result[key] = parent[key]; - } - } - return result; -} - -function getIconsTree(data, names) { - const icons = data.icons; - const aliases = data.aliases || /* @__PURE__ */ Object.create(null); - const resolved = /* @__PURE__ */ Object.create(null); - function resolve(name) { - if (icons[name]) { - return resolved[name] = []; - } - if (!(name in resolved)) { - resolved[name] = null; - const parent = aliases[name] && aliases[name].parent; - const value = parent && resolve(parent); - if (value) { - resolved[name] = [parent].concat(value); - } - } - return resolved[name]; - } - (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve); - return resolved; -} - -function internalGetIconData(data, name, tree) { - const icons = data.icons; - const aliases = data.aliases || /* @__PURE__ */ Object.create(null); - let currentProps = {}; - function parse(name2) { - currentProps = mergeIconData( - icons[name2] || aliases[name2], - currentProps - ); - } - parse(name); - tree.forEach(parse); - return mergeIconData(data, currentProps); -} -function getIconData(data, name) { - if (data.icons[name]) { - return internalGetIconData(data, name, []); - } - const tree = getIconsTree(data, [name])[name]; - return tree ? internalGetIconData(data, name, tree) : null; -} - -function iconToHTML(body, attributes) { - let renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"'; - for (const attr in attributes) { - renderAttribsHTML += " " + attr + '="' + attributes[attr] + '"'; - } - return '" + body + ""; -} - -const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g; -const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g; -function calculateSize(size, ratio, precision) { - if (ratio === 1) { - return size; - } - precision = precision || 100; - if (typeof size === "number") { - return Math.ceil(size * ratio * precision) / precision; - } - if (typeof size !== "string") { - return size; - } - const oldParts = size.split(unitsSplit); - if (oldParts === null || !oldParts.length) { - return size; - } - const newParts = []; - let code = oldParts.shift(); - let isNumber = unitsTest.test(code); - while (true) { - if (isNumber) { - const num = parseFloat(code); - if (isNaN(num)) { - newParts.push(code); - } else { - newParts.push(Math.ceil(num * ratio * precision) / precision); - } - } else { - newParts.push(code); - } - code = oldParts.shift(); - if (code === void 0) { - return newParts.join(""); - } - isNumber = !isNumber; - } -} - -function encodeSVGforURL(svg) { - return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(//g, "%3E").replace(/\s+/g, " "); -} -function svgToData(svg) { - return "data:image/svg+xml," + encodeSVGforURL(svg); -} -function svgToURL(svg) { - return 'url("' + svgToData(svg) + '")'; -} - -function makeViewBoxSquare(viewBox) { - const [left, top, width, height] = viewBox; - if (width !== height) { - const max = Math.max(width, height); - return [left - (max - width) / 2, top - (max - height) / 2, max, max]; - } - return viewBox; -} - -const defaultIconSizeCustomisations = Object.freeze({ - width: null, - height: null -}); -const defaultIconCustomisations = Object.freeze({ - // Dimensions - ...defaultIconSizeCustomisations, - // Transformations - ...defaultIconTransformations -}); - -function splitSVGDefs(content, tag = "defs") { - let defs = ""; - const index = content.indexOf("<" + tag); - while (index >= 0) { - const start = content.indexOf(">", index); - const end = content.indexOf("", end); - if (endEnd === -1) { - break; - } - defs += content.slice(start + 1, end).trim(); - content = content.slice(0, index).trim() + content.slice(endEnd + 1); - } - return { - defs, - content - }; -} -function mergeDefsAndContent(defs, content) { - return defs ? "" + defs + "" + content : content; -} -function wrapSVGContent(body, start, end) { - const split = splitSVGDefs(body); - return mergeDefsAndContent(split.defs, start + split.content + end); -} - -const isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none"; -function iconToSVG(icon, customisations) { - const fullIcon = { - ...defaultIconProps, - ...icon - }; - const fullCustomisations = { - ...defaultIconCustomisations, - ...customisations - }; - const box = { - left: fullIcon.left, - top: fullIcon.top, - width: fullIcon.width, - height: fullIcon.height - }; - let body = fullIcon.body; - [fullIcon, fullCustomisations].forEach((props) => { - const transformations = []; - const hFlip = props.hFlip; - const vFlip = props.vFlip; - let rotation = props.rotate; - if (hFlip) { - if (vFlip) { - rotation += 2; - } else { - transformations.push( - "translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")" - ); - transformations.push("scale(-1 1)"); - box.top = box.left = 0; - } - } else if (vFlip) { - transformations.push( - "translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")" - ); - transformations.push("scale(1 -1)"); - box.top = box.left = 0; - } - let tempValue; - if (rotation < 0) { - rotation -= Math.floor(rotation / 4) * 4; - } - rotation = rotation % 4; - switch (rotation) { - case 1: - tempValue = box.height / 2 + box.top; - transformations.unshift( - "rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")" - ); - break; - case 2: - transformations.unshift( - "rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")" - ); - break; - case 3: - tempValue = box.width / 2 + box.left; - transformations.unshift( - "rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")" - ); - break; - } - if (rotation % 2 === 1) { - if (box.left !== box.top) { - tempValue = box.left; - box.left = box.top; - box.top = tempValue; - } - if (box.width !== box.height) { - tempValue = box.width; - box.width = box.height; - box.height = tempValue; - } - } - if (transformations.length) { - body = wrapSVGContent( - body, - '', - "" - ); - } - }); - const customisationsWidth = fullCustomisations.width; - const customisationsHeight = fullCustomisations.height; - const boxWidth = box.width; - const boxHeight = box.height; - let width; - let height; - if (customisationsWidth === null) { - height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight; - width = calculateSize(height, boxWidth / boxHeight); - } else { - width = customisationsWidth === "auto" ? boxWidth : customisationsWidth; - height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight; - } - const attributes = {}; - const setAttr = (prop, value) => { - if (!isUnsetKeyword(value)) { - attributes[prop] = value.toString(); - } - }; - setAttr("width", width); - setAttr("height", height); - const viewBox = [box.left, box.top, boxWidth, boxHeight]; - attributes.viewBox = viewBox.join(" "); - return { - attributes, - viewBox, - body - }; -} - -function getCommonCSSRules(options) { - const result = { - display: "inline-block", - width: "1em", - height: "1em" - }; - const varName = options.varName; - if (options.pseudoSelector) { - result["content"] = "''"; - } - switch (options.mode) { - case "background": - if (varName) { - result["background-image"] = "var(--" + varName + ")"; - } - result["background-repeat"] = "no-repeat"; - result["background-size"] = "100% 100%"; - break; - case "mask": - result["background-color"] = "currentColor"; - if (varName) { - result["mask-image"] = result["-webkit-mask-image"] = "var(--" + varName + ")"; - } - result["mask-repeat"] = result["-webkit-mask-repeat"] = "no-repeat"; - result["mask-size"] = result["-webkit-mask-size"] = "100% 100%"; - break; - } - return result; -} -function generateItemCSSRules(icon, options) { - const result = {}; - const varName = options.varName; - const buildResult = iconToSVG(icon); - let viewBox = buildResult.viewBox; - if (viewBox[2] !== viewBox[3]) { - if (options.forceSquare) { - viewBox = makeViewBoxSquare(viewBox); - } else { - result["width"] = calculateSize("1em", viewBox[2] / viewBox[3]); - } - } - const svg = iconToHTML( - buildResult.body.replace(/currentColor/g, options.color || "black"), - { - viewBox: `${viewBox[0]} ${viewBox[1]} ${viewBox[2]} ${viewBox[3]}`, - width: `${viewBox[2]}`, - height: `${viewBox[3]}` - } - ); - const url = svgToURL(svg); - if (varName) { - result["--" + varName] = url; - } else { - switch (options.mode) { - case "background": - result["background-image"] = url; - break; - case "mask": - result["mask-image"] = result["-webkit-mask-image"] = url; - break; - } - } - return result; -} - -const commonSelector = ".icon--{prefix}"; -const iconSelector = ".icon--{prefix}--{name}"; -const defaultSelectors = { - commonSelector, - iconSelector, - overrideSelector: commonSelector + iconSelector -}; -function getIconsCSSData(iconSet, names, options = {}) { - const css = []; - const errors = []; - const palette = options.color ? true : void 0; - let mode = options.mode || typeof palette === "boolean" && (palette ? "background" : "mask"); - if (!mode) { - for (let i = 0; i < names.length; i++) { - const name = names[i]; - const icon = getIconData(iconSet, name); - if (icon) { - const body = options.customise ? options.customise(icon.body, name) : icon.body; - mode = body.includes("currentColor") ? "mask" : "background"; - break; - } - } - if (!mode) { - mode = "mask"; - errors.push( - "/* cannot detect icon mode: not set in options and icon set is missing info, rendering as " + mode + " */" - ); - } - } - let varName = options.varName; - if (varName === void 0 && mode === "mask") { - varName = "svg"; - } - const newOptions = { - ...options, - // Override mode and varName - mode, - varName - }; - const { commonSelector: commonSelector2, iconSelector: iconSelector2, overrideSelector } = newOptions.iconSelector ? newOptions : defaultSelectors; - const iconSelectorWithPrefix = iconSelector2.replace( - /{prefix}/g, - iconSet.prefix - ); - const commonRules = { - ...options.rules, - ...getCommonCSSRules(newOptions) - }; - const hasCommonRules = commonSelector2 && commonSelector2 !== iconSelector2; - const commonSelectors = /* @__PURE__ */ new Set(); - if (hasCommonRules) { - css.push({ - selector: commonSelector2.replace(/{prefix}/g, iconSet.prefix), - rules: commonRules - }); - } - for (let i = 0; i < names.length; i++) { - const name = names[i]; - const iconData = getIconData(iconSet, name); - if (!iconData) { - errors.push("/* Could not find icon: " + name + " */"); - continue; - } - const body = options.customise ? options.customise(iconData.body, name) : iconData.body; - const rules = generateItemCSSRules( - { - ...defaultIconProps, - ...iconData, - body - }, - newOptions - ); - let requiresOverride = false; - if (hasCommonRules && overrideSelector) { - for (const key in rules) { - if (key in commonRules) { - requiresOverride = true; - } - } - } - const selector = (requiresOverride && overrideSelector ? overrideSelector.replace(/{prefix}/g, iconSet.prefix) : iconSelectorWithPrefix).replace(/{name}/g, name); - css.push({ - selector, - rules - }); - if (!hasCommonRules) { - commonSelectors.add(selector); - } - } - const result = { - css, - errors - }; - if (!hasCommonRules && commonSelectors.size) { - const selector = Array.from(commonSelectors).join( - newOptions.format === "compressed" ? "," : ", " - ); - result.common = { - selector, - rules: commonRules - }; - } - return result; -} - -const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/; - -function locateIconSet(prefix) { - // Try `@iconify-json/{$prefix}` - try { - const main = require.resolve(`@iconify-json/${prefix}/icons.json`); - const info = require.resolve(`@iconify-json/${prefix}/info.json`); - return { - main, - info, - }; - } - catch { - // - } - // Try `@iconify/json` - try { - const main = require.resolve(`@iconify/json/json/${prefix}.json`); - return { - main, - }; - } - catch { - // - } -} -/** - * Cache for loaded icon sets - * - * Tailwind CSS can send multiple separate requests to plugin, this will - * prevent same data from being loaded multiple times. - * - * Key is filename, not prefix! - */ -const cache = Object.create(null); -/** - * Load icon set from file - */ -function loadIconSetFromFile(source) { - try { - const result = JSON.parse(node_fs.readFileSync(source.main, 'utf8')); - if (!result.info && source.info) { - // Load info from a separate file - result.info = JSON.parse(node_fs.readFileSync(source.info, 'utf8')); - } - return result; - } - catch { - // - } -} -/** - * Load icon set from source - */ -function loadIconSet(source) { - if (typeof source === 'function') { - // Callback - return source(); - } - if (typeof source === 'object') { - // IconifyJSON - return source; - } - // String - // Try to parse JSON - if (source.startsWith('{')) { - try { - return JSON.parse(source); - } - catch { - // Invalid JSON - } - } - // Check for cache - if (cache[source]) { - return cache[source]; - } - // Icon set prefix - if (source.match(matchIconName)) { - const filename = locateIconSet(source); - if (filename) { - // Load icon set - const result = loadIconSetFromFile(filename); - if (result) { - cache[source] = result; - } - return result; - } - } - // Filename - const result = loadIconSetFromFile({ - main: source, - }); - if (result) { - cache[source] = result; - } - return result; -} - -/** - * Get icon names from list - */ -function getIconNames(icons) { - const prefixes = Object.create(null); - // Add entry - const add = (prefix, name) => { - if (typeof prefix === 'string' && - prefix.match(matchIconName) && - typeof name === 'string' && - name.match(matchIconName)) { - (prefixes[prefix] || (prefixes[prefix] = new Set())).add(name); - } - }; - // Comma or space separated string - let iconNames; - if (typeof icons === 'string') { - iconNames = icons.split(/[\s,.]/); - } - else if (icons instanceof Array) { - iconNames = []; - // Split each array entry - icons.forEach((item) => { - item.split(/[\s,.]/).forEach((name) => iconNames.push(name)); - }); - } - else { - return; - } - // Parse array - if (iconNames?.length) { - iconNames.forEach((icon) => { - if (!icon.trim()) { - return; - } - // Attempt prefix:name split - const nameParts = icon.split(':'); - if (nameParts.length === 2) { - add(nameParts[0], nameParts[1]); - return; - } - // Attempt icon class: .icon--{prefix}--{name} - // with or without dot - const classParts = icon.split('--'); - if (classParts[0].match(/^\.?icon$/)) { - if (classParts.length === 3) { - add(classParts[1], classParts[2]); - return; - } - if (classParts.length === 2) { - // Partial match - return; - } - } - // Throw error - throw new Error(`Cannot resolve icon: "${icon}"`); - }); - } - else { - return; - } - return prefixes; -} - -/** - * Get CSS rules for icons list - */ -function getCSSRulesForIcons(icons, options = {}) { - const rules = Object.create(null); - // Get all icons - const prefixes = getIconNames(icons); - // Parse all icon sets - for (const prefix in prefixes) { - const iconSet = loadIconSet(options.iconSets?.[prefix] || prefix); - if (!iconSet) { - throw new Error(`Cannot load icon set for "${prefix}". Install "@iconify-json/${prefix}" as dev dependency?`); - } - const generated = getIconsCSSData(iconSet, Array.from(prefixes[prefix]), { - ...options, - customise: (content, name) => options.customise?.(content, name, prefix) ?? content, - }); - const result = generated.common - ? [generated.common, ...generated.css] - : generated.css; - result.forEach((item) => { - const selector = item.selector instanceof Array - ? item.selector.join(', ') - : item.selector; - rules[selector] = item.rules; - }); - } - return rules; -} - -/** - * Get dynamic CSS rules - */ -function getDynamicCSSRules(icon, options = {}) { - const nameParts = icon.split(/--|\:/); - if (nameParts.length !== 2) { - throw new Error(`Invalid icon name: "${icon}"`); - } - const [prefix, name] = nameParts; - if (!(prefix.match(matchIconName) && name.match(matchIconName))) { - throw new Error(`Invalid icon name: "${icon}"`); - } - const iconSet = loadIconSet(options.iconSets?.[prefix] || prefix); - if (!iconSet) { - throw new Error(`Cannot load icon set for "${prefix}". Install "@iconify-json/${prefix}" as dev dependency?`); - } - const generated = getIconsCSSData(iconSet, [name], { - iconSelector: '.icon', - customise: (content, name) => options.customise?.(content, name, prefix) ?? content, - }); - if (generated.css.length !== 1) { - throw new Error(`Cannot find "${icon}". Bad icon name?`); - } - const scale = options.scale ?? 1; - if (scale) { - generated.common.rules.height = scale + 'em'; - generated.common.rules.width = scale + 'em'; - } - else { - delete generated.common.rules.height; - delete generated.common.rules.width; - } - return { - // Common rules - ...(options.overrideOnly || !generated.common?.rules - ? {} - : generated.common.rules), - // Icon rules - ...generated.css[0].rules, - }; -} - -function parseIconSet(data, callback) { - const names = []; - if (typeof data !== "object" || typeof data.icons !== "object") { - return names; - } - if (data.not_found instanceof Array) { - data.not_found.forEach((name) => { - callback(name, null); - names.push(name); - }); - } - const tree = getIconsTree(data); - for (const name in tree) { - const item = tree[name]; - if (item) { - callback(name, internalGetIconData(data, name, item)); - names.push(name); - } - } - return names; -} - -/** - * Convert plugin options to object - */ -function cleanupIconifyPluginOptions(options) { - return Array.isArray(options) - ? { - prefixes: options, - } - : options; -} -/** - * Get CSS rules for main plugin (components) - */ -function getCSSComponentsForPlugin(options) { - const rules = Object.create(null); - // Variable name, default to 'svg' (cannot be empty string) - const varName = options.varName || 'svg'; - // Scale icons - const scale = options.scale ?? 1; - const adjustScale = (obj) => { - if (!scale) { - // Delete width and height - delete obj['width']; - delete obj['height']; - } - else if (scale !== 1) { - // Set custom width and height - obj['width'] = scale + 'em'; - obj['height'] = scale + 'em'; - } - return obj; - }; - // Add common rules - const maskSelector = options.maskSelector ?? '.iconify'; - const backgroundSelector = options.backgroundSelector ?? '.iconify-color'; - if (maskSelector) { - rules[maskSelector] = Object.assign(adjustScale(getCommonCSSRules({ - mode: 'mask', - varName, - })), options.extraMaskRules || {}); - } - if (backgroundSelector) { - rules[backgroundSelector] = Object.assign(adjustScale(getCommonCSSRules({ - mode: 'background', - varName, - })), options.extraBackgroundRules || {}); - } - return rules; -} -/** - * Get CSS rules for main plugin (utilities) - */ -function getCSSRulesForPlugin(options) { - const rules = Object.create(null); - // Variable name, default to 'svg' (cannot be empty string) - const varName = options.varName || 'svg'; - // Add icon sets - const iconSelector = options.iconSelector || '.{prefix}--{name}'; - // Make icons square - const square = options.square !== false; - // Scale - const scale = options.scale ?? 1; - options.prefixes?.forEach((item) => { - let prefix; - let iconSet; - let iconsList; - let customise; - // Load icon set - if (typeof item === 'string') { - // Prefix - prefix = item; - iconSet = loadIconSet(prefix); - } - else if (item.source) { - // Source, possibly with prefix - iconSet = loadIconSet(item.source); - prefix = item.prefix || iconSet?.prefix; - iconsList = item.icons; - customise = item.customise; - if (!prefix) { - throw new Error('Custom icon set does not have a prefix. Please set "prefix" property'); - } - } - else { - // Prefix - prefix = item.prefix || iconSet?.prefix; - iconSet = prefix ? loadIconSet(prefix) : undefined; - iconsList = item.icons; - customise = item.customise; - } - // Validate it - if (!iconSet) { - throw new Error(`Cannot load icon set for "${prefix}". Install "@iconify-json/${prefix}" as dev dependency?`); - } - if (!prefix) { - throw new Error('Bad icon set entry, must have either "prefix" or "source" set'); - } - // Load icons - parseIconSet(iconSet, (name, data) => { - // Check if icon should be rendered - if (iconsList) { - if (Array.isArray(iconsList)) { - if (!iconsList.includes(name)) { - return; - } - } - else if (!iconsList(name)) { - return; - } - } - // Customise icon - const body = customise - ? customise(data.body, name) - : options.customise - ? options.customise(data.body, name, prefix) - : data.body; - // Generate CSS - const iconRules = generateItemCSSRules({ - ...defaultIconProps, - ...data, - body, - }, { - mode: 'mask', // not used because varName is set, but required - varName, - forceSquare: square, - }); - // Generate selector - const selector = iconSelector - .replace('{prefix}', prefix) - .replace('{name}', name); - // Scale non-square icons - if (!square && scale > 0 && scale !== 1 && iconRules.width) { - iconRules.width = calculateSize(iconRules.width, scale); - } - // Add to rules - rules[selector] = iconRules; - }); - }); - // Return - return rules; -} - -/** - * Generate styles for dynamic selector - * - * Usage in HTML: - */ -function addDynamicIconSelectors(options) { - const prefix = options?.prefix || 'icon'; - return plugin(({ matchComponents }) => { - matchComponents({ - [prefix]: (icon) => { - try { - return getDynamicCSSRules(icon, options); - } - catch (err) { - // Log error, but do not throw it - console.error(err.message); - } - }, - }); - }); -} -/** - * Generate rules for mask, background and selected icon sets - * - * Icons should combine either mask or background selector and icon selector - * - * This plugin generates only square icons. Icons that are not square will be resized to fit square. - * - * Usage in HTML: - */ -function addIconSelectors(options) { - const fullOptions = cleanupIconifyPluginOptions(options); - return plugin(({ addComponents, addUtilities }) => { - addComponents(getCSSComponentsForPlugin(fullOptions)); - addUtilities(getCSSRulesForPlugin(fullOptions)); - }); -} -/** - * Generate styles for preset list of icons - * - * Requires knowing full list of icons - * - * Usage in HTML: - * - * @deprecated Use addIconSelectors instead - */ -function addCleanIconSelectors(icons, options) { - const rules = getCSSRulesForIcons(icons, options); - return plugin(({ addUtilities }) => { - addUtilities(rules); - }); -} - -exports.addCleanIconSelectors = addCleanIconSelectors; -exports.addDynamicIconSelectors = addDynamicIconSelectors; -exports.addIconSelectors = addIconSelectors; diff --git a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/license.txt b/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/license.txt deleted file mode 100644 index e34aedc..0000000 --- a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/license.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023-PRESENT Vjacheslav Trushkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/package.json b/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/package.json deleted file mode 100644 index e33b724..0000000 --- a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@iconify/tailwind", - "description": "Iconify plugin for Tailwind CSS", - "author": "Vjacheslav Trushkin (https://iconify.design)", - "version": "1.1.3", - "license": "MIT", - "main": "./dist/plugin.js", - "types": "./dist/plugin.d.ts", - "bugs": "https://github.com/iconify/iconify/issues", - "homepage": "https://iconify.design/", - "funding": "https://github.com/sponsors/cyberalien", - "repository": { - "type": "git", - "url": "https://github.com/iconify/iconify.git", - "directory": "plugins/tailwind" - }, - "dependencies": { - "@iconify/types": "^2.0.0" - }, - "devDependencies": { - "@iconify-json/line-md": "^1.1.38", - "@iconify-json/mdi-light": "^1.1.10", - "@microsoft/api-extractor": "^7.47.2", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-replace": "^5.0.7", - "@types/jest": "^29.5.12", - "@types/jsdom": "^21.1.7", - "@types/node": "^18.19.41", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "eslint": "^8.57.0", - "jest": "^29.7.0", - "rimraf": "^4.4.1", - "rollup": "^3.29.4", - "tailwindcss": "^3.4.6", - "ts-jest": "^29.2.3", - "typescript": "^5.5.3", - "@iconify/utils": "^2.1.32" - }, - "scripts": { - "clean": "rimraf lib dist tsconfig.tsbuildinfo", - "lint": "eslint src/**/*.ts", - "prebuild": "pnpm run lint && pnpm run clean", - "build": "node build", - "build:api": "api-extractor run --local --verbose", - "build:lib": "tsc -b", - "build:dist": "rollup -c rollup.config.mjs", - "test": "jest --runInBand" - } -} \ No newline at end of file diff --git a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/types b/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/types deleted file mode 120000 index 933da83..0000000 --- a/node_modules/.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/types +++ /dev/null @@ -1 +0,0 @@ -../../../@iconify+types@2.0.0/node_modules/@iconify/types \ No newline at end of file diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/.prettierrc b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/.prettierrc deleted file mode 100644 index 103b29e..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "trailingComma": "es5", - "singleQuote": true, - "useTabs": true, - "semi": true, - "quoteProps": "consistent", - "endOfLine": "lf" -} diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/README.md b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/README.md deleted file mode 100644 index 7480c51..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/README.md +++ /dev/null @@ -1,459 +0,0 @@ -# Iconify Types - -Type definitions for using Iconify icon sets with TypeScript. - -## Files structure - -Iconify icon sets are available in several formats: - -- Big JSON files that combine many icons in one file -- Node.js packages split into individual icons - -### Icon format - -Each icon is represented by the `IconifyIcon` type. It is a simple object with multiple string, number or boolean attributes. - -The only required attribute is: - -- `body`: string. Value contains inner HTML of an icon as a string, for example ``. - -Optional attributes are represented by type `IconifyOptional`. They are split into several types: dimensions (`IconifyDimenisons` type) and transformations (`IconifyTransformations` type). - -Dimensions attributes: - -- `width`: number. viewBox width, number. If missing, value is set to 16. -- `height`: number. viewBox height, number. If missing, value is set to 16. -- `left`: number. viewBox left, number. If missing, the value is set to 0. -- `top`: number. viewBox top, number. If missing, the value is set to 0. - -Transformations: - -- `rotate`: number. Icon rotation. Iconify icons can be rotated in 90 degrees increments, allowing to reuse the same source icon for multiple icons, such as arrow-up being a copy of arrow-left rotated by 90 degrees. Values are 0 for 0 degrees, 1 for 90 degrees, 2 for 180 degrees, 3 for 270 degrees. The default value is 0. -- `hFlip`: boolean. Horizontal flip. Similar to the rotation transformation, an icon can be flipped horizontally and vertically. It can be used to quickly create aliases, such as arrow-left being an alias of arrow-right, but with hFlip set to true. The default value is false. -- `vFlip`: boolean. Vertical flip. The default value is false. - -Example of icon object: - -```js -const mdiHandIcon = { - body: '', - width: 24, - height: 24, -}; -``` - -### Icon sets format - -Iconify icon sets format is available from multiple sources: - -- NPM package `@iconify/json` that includes all icon sets -- API responses used by SVG framework - -Icon set format structure is available as the `IconifyJSON` type. It is an object with several fields: - -- `prefix`: string. Icon set prefix. -- `icons`: object. Icons data. Value is an object that represents a set of icons, where the key is an icon name and value is `IconifyIcon` object (see "Icon format" above). -- `aliases`: object. Icon aliases, similar to the `icons` object (see "Aliases" section below). - -Example: - -```json -{ - "prefix": "mdi", - "icons": { - "home": { - "body": "", - "width": 24, - "height": 24 - }, - "arrow-left": { - "body": "", - "width": 24, - "height": 24 - } - } -} -``` - -All icon properties except for `body` are optional and are represented by type `IconifyOptional`. Type `IconifyJSON` also extends type `IconifyOptional`, allowing all optional properties to be placed in the root object. - -If an icon is missing a property, look in the root object for the default value. If the root object does not have the default value, use Iconify default value for that property (see list of properties and default values in the "Icon format" section above). - -Default values in the root object make it possible to reduce duplication. - -Example: - -```json -{ - "prefix": "mdi", - "icons": { - "home": { - "body": "" - }, - "arrow-left": { - "body": "" - } - }, - "width": 24, - "height": 24 -} -``` - -In this example, both icons are 24x24, so width and height have been moved to the root object. - -Another example: - -```json -{ - "prefix": "fa-solid", - "icons": { - "arrow-left": { - "body": "", - "width": 448 - }, - "arrow-circle-left": { - "body": "" - }, - "barcode": { - "body": "" - } - }, - "width": 512, - "height": 512 -} -``` - -In this example `arrow-circle-left` and `barcode` have width of 512, `arrow-left` has width of 448. All icons have a height of 512. - -#### Aliases - -In addition to `icons`, another important field in icon set object is `aliases`. - -Aliases object is similar to icons object, except that instead of icon body icons reference another icon. - -Each entry has the same attributes as an icon, except for `body` and has required attribute `parent` that contains the name of the parent icon. The parent icon must be present in the icon set file. - -Example: - -```json -{ - "prefix": "fa", - "icons": { - "automobile": { - "body": "", - "width": 2048, - "height": 1600 - } - }, - "aliases": { - "car": { - "parent": "automobile" - } - } -} -``` - -In this example `car` is an alias of `automobile`, allowing to use the same icon by multiple names. - -Another example: - -```json -{ - "prefix": "fa", - "icons": { - "caret-left": { - "body": "", - "width": 576, - "height": 1280 - } - }, - "aliases": { - "caret-right": { - "parent": "caret-left", - "hFlip": true - } - } -} -``` - -In this example `caret-right` is alias of `caret-left`, but with additional `hFlip` attribute. It is identical to this: - -```json -{ - "prefix": "fa", - "icons": { - "caret-left": { - "body": "" - }, - "caret-right": { - "body": "", - "hFlip": true - } - }, - "width": 576, - "height": 1280 -} -``` - -##### Merging alias attributes - -If both icon and alias have same attribute, following rules apply: - -- `rotate`: attributes are combined. For example, icon has rotate = 1, alias has rotate = 1. Result will have rotate = 2. To prevent overflow, if rotate > 3, rotate = rotate - 4. -- `hFlip` and `vFlip`: attributes are combined. For example, icon has hFlip = true, alias also has hFlip = true (icon.hFlip !== alias.hFlip). Result is false. false + false = false, false + true = true, true + true = false. -- other attributes are overwritten. - -Example: - -```json -{ - "prefix": "fa", - "icons": { - "caret-left": { - "body": "", - "hFlip": true, - "width": 576, - "height": 1280 - } - }, - "aliases": { - "caret-left-compact": { - "parent": "caret-left", - "left": 64, - "width": 448 - }, - "caret-right": { - "parent": "caret-left", - "hFlip": true - } - } -} -``` - -is identical to: - -```json -{ - "prefix": "fa", - "icons": { - "caret-left": { - "body": "", - "hFlip": true - }, - "caret-left-compact": { - "body": "", - "hFlip": true, // from caret-left - "left": 64, // overwritten - "width": 448 // overwritten - }, - "caret-right": { - "body": "" - // hFlip = false, which is default value, so it was removed - } - }, - "width": 576, - "height": 1280 -} -``` - -#### Metadata - -Icon set files might also contain the metadata. That data is used for browsing icons, searching icons, exporting icon sets as fonts. - -Metadata is a combination of several types, represented as type `IconifyMetaData`. - -##### Icon set information - -Icon set information is part of the metadata, it includes information about an author and license. - -Example: - -```json -{ - "prefix": "dashicons", - "info": { - "name": "Dashicons", - "total": 304, - "author": { - "name": "WordPress", - "url": "https://github.com/WordPress/dashicons" - }, - "license": { - "title": "GPL 2.0", - "spdx": "GPL-2.0-only", - "url": "http://www.gnu.org/licenses/gpl-2.0.html" - }, - "version": "0.9.0", - "samples": ["shortcode", "businessperson", "editor-expand"], - "height": 20, - "category": "General", - "palette": false - }, - "icons": { - // Icons here - } -} -``` - -##### Info - -Information block is part of the metadata, it is used for browsing or searching icon sets. It also contains the license for icons in the icon set and information about the author. - -Info block is represented by the type `IconifyInfo`. You can see an example above in "info" property. - -IconifyInfo type has the following properties, most of them are optional: - -- `name`: string. Icon set name. This field is always set. -- `total`: number. The total number of icons, optional. -- `version`: string. The current version, optional. -- `author`: object. Information about the author, always set. Author information has the following properties: - - `name`: string. Author name. This field is always set. - - `url`: string. Link to icon set, optional. Usually links to GitHub repository. -- `license`: object. Information about the license, always set. License information has the following properties: - - `title`: string. License title. This field is always set. - - `spdx`: string. SPDX license identifier, optional. - - `url`: string. Link to the license, optional. -- `samples`: string[]. Value is an array of icon names that should be used as samples when showing the icon set in an icon sets list. -- `height`: number | number[]. Value is a number or array of numbers, values are pixel grids used in the icon set. If any icons in an icon set do not match the grid, this attribute should not be set. -- `displayHeight`: number. The height value that should be used for displaying samples. Value is a number between 16 and 30 (inclusive). - -##### Characters map - -Characters map is part of the metadata, it is used for icon sets that are either imported from icon fonts or intended to be exported to icon font. - -Characters map allows storing characters for export as well as searching icons by character used in an icon font. - -It is a simple object, where the key is character code in hexadecimal form, value is an icon name. - -Important: each icon can have multiple characters! - -Example: - -```json -{ - "prefix": "fa", - "icons": { - // Icons here - }, - "chars": { - "f000": "glass", - "f001": "music", - "f002": "search", - "f003": "envelope-o", - "f004": "heart", - "f005": "star" - // and so on... - } -} -``` - -##### Categories - -Categories are part of the metadata, used to allow filtering icons when showing the entire icons set. - -Categories list is a simple object, where the key is category name, value is the list of icons. - -Important: each icon can belong to multiple categories! - -```json -{ - "prefix": "fa-solid", - "icons": { - // Icons here - }, - "categories": { - "Accessibility": [ - "american-sign-language-interpreting", - "assistive-listening-systems", - "audio-description", - "blind", - "braille", - "closed-captioning", - "deaf", - "low-vision", - "phone-volume", - "question-circle", - "sign-language", - "tty", - "universal-access", - "wheelchair" - ], - "Alert": [ - "bell", - "bell-slash", - "exclamation", - "exclamation-circle", - "exclamation-triangle", - "radiation", - "radiation-alt", - "skull-crossbones" - ] - // and so on... - } -} -``` - -##### Themes - -Themes are part of the metadata, similar to categories, but using prefixes or suffixes to identify icons that belong to a theme. - -This is useful when icon set has variations of icons, such as "baseline-_", "outline-_". - -Example: - -```json -{ - "prefix": "ic", - "icons": { - // Icons here - }, - "themes": { - "baseline": { - "title": "Baseline", - "prefix": "baseline-" - }, - "outline": { - "title": "Outline", - "prefix": "outline-" - }, - "round": { - "title": "Round", - "prefix": "round-" - }, - "sharp": { - "title": "Sharp", - "prefix": "sharp-" - }, - "twotone": { - "title": "Two-Tone", - "prefix": "twotone-" - } - } -} -``` - -Each theme can have one of the attributes: `prefix` or `suffix`. The prefix must end with `-`, suffix must start with `-`. - -In an example above, all icons that start with "baseline-", such as "baseline-home", are considered part of the "Baseline" theme. - -#### All attributes - -For an example of full icon set files that include metadata, look in icon set files in `@iconify/json` package or browse it at GitHub: [https://github.com/iconify/collections-json](https://github.com/iconify/collections-json) - -For an example of individual icons, look in JavaScript files in NPM packages such as `@iconify/icons-mdi`. - -## Usage - -This repository is intended to be used with any Iconify packages. - -At the moment of writing, multiple Iconify packages are written without TypeScript. At the beginning of the year 2020 plan is to rewrite all of them with TypeScript to make sure data is consistent and avoid duplication, this package will be used for sharing types between Iconify packages. - -## License - -This package is licensed under MIT license. - -`SPDX-License-Identifier: MIT` - -Previous versions of this package were dual-licensed under Apache 2.0 and GPL 2.0 licence, which was messy and confusing. This was later changed to MIT for simplicity. - -© 2021 - 2022 Vjacheslav Trushkin / Iconify OÜ diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/license.txt b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/license.txt deleted file mode 100644 index 4150193..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/license.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 - 2022 Vjacheslav Trushkin / Iconify OÜ - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/package.json b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/package.json deleted file mode 100644 index 44b759b..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@iconify/types", - "type": "module", - "description": "Types for Iconify data", - "version": "2.0.0", - "author": "Vjacheslav Trushkin", - "license": "MIT", - "main": "./types.js", - "types": "./types.d.ts", - "bugs": "https://github.com/iconify/iconify/issues", - "homepage": "https://github.com/iconify/iconify", - "repository": { - "type": "git", - "url": "https://github.com/iconify/iconify.git", - "directory": "packages/types" - }, - "devDependencies": { - "typescript": "^4.8.2" - }, - "scripts": { - "test": "tsc --noEmit --strict --typeRoots '[]' types.d.ts" - } -} \ No newline at end of file diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/pnpm-lock.yaml b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/pnpm-lock.yaml deleted file mode 100644 index d48c5a6..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/pnpm-lock.yaml +++ /dev/null @@ -1,15 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - typescript: ^4.6.2 - -devDependencies: - typescript: 4.7.4 - -packages: - - /typescript/4.7.4: - resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/provider.d.ts b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/provider.d.ts deleted file mode 100644 index ba38007..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/provider.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Raw data sent by API - */ - -// Links -export interface APIProviderRawDataLinks { - // Collections list - home?: string; - // Collection. Available variables: {prefix} - collection?: string; - // Icon. Available variables: {prefix}, {name} - icon?: string; -} - -// NPM -export interface APIProviderRawDataNPM { - // Package name for installation. Available variables: {prefix} - package?: string; - - // Icon import source. Available variables: {prefix}, {name} - icon?: string; -} - -// Main type -export interface APIProviderRawData { - // Provider name (as used in icon names) - provider: string; - - // Provider name (human readable version) - title?: string; - - // API link(s), though they are usually redundant because API end point is used to retrieve data - api?: string | string[]; - - // Links to website - links?: APIProviderRawDataLinks; - - // NPM packages for icons, used when showing code samples - npm?: APIProviderRawDataNPM; - - // SVG generator URL, including full host name, {prefix} and {name} variables - // Example: 'https://api.iconify.design/{prefix}/{name}.svg' - svg?: string; -} diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/provider.js b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/provider.js deleted file mode 100644 index 32027dc..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/provider.js +++ /dev/null @@ -1,3 +0,0 @@ -/** - * Empty file. This repository contains only TypeScript types - */ diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts deleted file mode 100644 index df92487..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts +++ /dev/null @@ -1,272 +0,0 @@ -/** - * Icon dimensions. - * - * Used in: - * icon (as is) - * alias (overwrite icon's properties) - * root of JSON file (default values) - */ -export interface IconifyDimenisons { - // Left position of viewBox. - // Defaults to 0. - left?: number; - - // Top position of viewBox. - // Defaults to 0. - top?: number; - - // Width of viewBox. - // Defaults to 16. - width?: number; - - // Height of viewBox. - // Defaults to 16. - height?: number; -} - -/** - * Icon transformations. - * - * Used in: - * icon (as is) - * alias (merged with icon's properties) - */ -export interface IconifyTransformations { - // Number of 90 degrees rotations. - // 0 = 0, 1 = 90deg and so on. - // Defaults to 0. - // When merged (such as alias + icon), result is icon.rotation + alias.rotation. - rotate?: number; - - // Horizontal flip. - // Defaults to false. - // When merged, result is icon.hFlip !== alias.hFlip - hFlip?: boolean; - - // Vertical flip. (see hFlip comments) - vFlip?: boolean; -} - -/** - * Combination of dimensions and transformations. - */ -export interface IconifyOptional - extends IconifyDimenisons, - IconifyTransformations { - // -} - -/** - * Alias. - */ -export interface IconifyAlias extends IconifyOptional { - // Parent icon index without prefix, required. - parent: string; - - // IconifyOptional properties. - // Alias should have only properties that it overrides. - // Transformations are merged, not overridden. See IconifyTransformations comments. -} - -/** - * Icon. - */ -export interface IconifyIcon extends IconifyOptional { - // Icon body: , required. - body: string; - - // IconifyOptional properties. - // If property is missing in JSON file, look in root object for default value. -} - -/** - * Icon with optional parameters that are provided by API and affect only search - */ -interface APIIconAttributes { - // True if icon is hidden. - // Used in icon sets to keep icons that no longer exist, but should still be accessible - // from API, preventing websites from breaking when icon is removed by developer. - hidden?: boolean; -} - -export interface ExtendedIconifyIcon extends IconifyIcon, APIIconAttributes {} -export interface ExtendedIconifyAlias extends IconifyAlias, APIIconAttributes {} - -/** - * "icons" field of JSON file. - */ -export interface IconifyIcons { - // Index is name of icon, without prefix. Value is ExtendedIconifyIcon object. - [index: string]: ExtendedIconifyIcon; -} - -/** - * "aliases" field of JSON file. - */ -export interface IconifyAliases { - // Index is name of icon, without prefix. Value is ExtendedIconifyAlias object. - [index: string]: ExtendedIconifyAlias; -} - -/** - * Icon set information block. - */ -export interface IconifyInfo { - // Icon set name. - name: string; - - // Total number of icons. - total?: number; - - // Version string. - version?: string; - - // Author information. - author: { - // Author name. - name: string; - - // Link to author's website or icon set website. - url?: string; - }; - - // License - license: { - // Human readable license. - title: string; - - // SPDX license identifier. - spdx?: string; - - // License URL. - url?: string; - }; - - // Array of icons that should be used for samples in icon sets list. - samples?: string[]; - - // Icon grid: number or array of numbers. - height?: number | number[]; - - // Display height for samples: 16 - 24 - displayHeight?: number; - - // Category on Iconify collections list. - category?: string; - - // List of tags to group similar icon sets. - tags?: string[]; - - // Palette status. True if icons have predefined color scheme, false if icons use currentColor. - // Ideally, icon set should not mix icons with and without palette to simplify search. - palette?: boolean; - - // If true, icon set should not appear in icon sets list. - hidden?: boolean; -} - -/** - * Optional themes, old format. - * - * Deprecated because format is unnecessary complicated. Key is meaningless, suffixes and prefixes are mixed together. - */ -export interface LegacyIconifyThemes { - // Key is unique string. - [index: string]: { - // Theme title. - title: string; - - // Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme. - prefix?: string; // Example: 'baseline-' - suffix?: string; // Example: '-filled' - }; -} - -/** - * Characters used in font. - */ -export interface IconifyChars { - // Index is character, such as "f000". - // Value is icon name. - [index: string]: string; -} - -/** - * Icon categories - */ -export interface IconifyCategories { - // Index is category title, such as "Weather". - // Value is array of icons that belong to that category. - // Each icon can belong to multiple categories or no categories. - [index: string]: string[]; -} - -/** - * Meta data stored in JSON file, used for browsing icon set. - */ -export interface IconifyMetaData { - // Icon set information block. Used for public icon sets, can be skipped for private icon sets. - info?: IconifyInfo; - - // Characters used in font. Used for searching by character for icon sets imported from font, exporting icon set to font. - chars?: IconifyChars; - - // Categories. Used for filtering icons. - categories?: IconifyCategories; - - // Optional themes (old format). - themes?: LegacyIconifyThemes; - - // Optional themes (new format). Key is prefix or suffix, value is title. - prefixes?: Record; - suffixes?: Record; -} - -/** - * JSON structure, contains only icon data - */ -export interface IconifyJSONIconsData extends IconifyDimenisons { - // Prefix for icons in JSON file, required. - prefix: string; - - // API provider, optional. - provider?: string; - - // List of icons, required. - icons: IconifyIcons; - - // Optional aliases. - aliases?: IconifyAliases; - - // IconifyDimenisons properties that are used as default viewbox for icons when icon is missing value. - // If viewbox exists in both icon and root, use value from icon. - // This is used to reduce duplication. -} - -/** - * JSON structure. - * - * All optional values can exist in root of JSON file, used as defaults. - */ -export interface IconifyJSON extends IconifyJSONIconsData, IconifyMetaData { - // Last modification time of icons. Unix time stamp in seconds. - // Time is calculated only for icon data, ignoring metadata. - // Used to invalidate icons cache in components. - lastModified?: number; - - // Optional list of missing icons. Returned by Iconify API when querying for icons that do not exist. - not_found?: string[]; -} - -/** - * Structure of exports '@iconify-json/*' packages. - * - * These are small packages, one per icon set, that split JSON structure into multiple files to reduce - * amount of data imported from package. - */ -export interface IconifyJSONPackageExports { - info: IconifyInfo; - icons: IconifyJSON; - metadata: IconifyMetaData; - chars: IconifyChars; -} diff --git a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.js b/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.js deleted file mode 100644 index 32027dc..0000000 --- a/node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.js +++ /dev/null @@ -1,3 +0,0 @@ -/** - * Empty file. This repository contains only TypeScript types - */ diff --git a/node_modules/.pnpm/lock.yaml b/node_modules/.pnpm/lock.yaml deleted file mode 100644 index 6efef5f..0000000 --- a/node_modules/.pnpm/lock.yaml +++ /dev/null @@ -1,29 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@iconify/tailwind': - specifier: ^1.1.3 - version: 1.1.3 - -packages: - - '@iconify/tailwind@1.1.3': - resolution: {integrity: sha512-SfyeT+2b/aKWA6DjwdevXdLUqaEqJ5xWTegD92KItaWc47IYsGuqrt/GOz4dJCPcTVCrsUjlvMpy8cNd+uV5nQ==} - - '@iconify/types@2.0.0': - resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} - -snapshots: - - '@iconify/tailwind@1.1.3': - dependencies: - '@iconify/types': 2.0.0 - - '@iconify/types@2.0.0': {} diff --git a/node_modules/.pnpm/node_modules/@iconify/types b/node_modules/.pnpm/node_modules/@iconify/types deleted file mode 120000 index 40cda82..0000000 --- a/node_modules/.pnpm/node_modules/@iconify/types +++ /dev/null @@ -1 +0,0 @@ -../../@iconify+types@2.0.0/node_modules/@iconify/types \ No newline at end of file diff --git a/node_modules/@iconify/tailwind b/node_modules/@iconify/tailwind deleted file mode 120000 index 3f4d083..0000000 --- a/node_modules/@iconify/tailwind +++ /dev/null @@ -1 +0,0 @@ -../.pnpm/@iconify+tailwind@1.1.3/node_modules/@iconify/tailwind \ No newline at end of file