toolbox-x 1.0.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/LICENSE +201 -0
- package/dist/Color-B3mgF9Dh.d.cts +486 -0
- package/dist/Color-D38Xrw65.d.mts +486 -0
- package/dist/Stylog-Df7eq3-j.d.cts +519 -0
- package/dist/Stylog-jvlLcMQq.d.mts +519 -0
- package/dist/array-DvW0zIu6.d.mts +130 -0
- package/dist/array-rUnEVisO.d.cts +130 -0
- package/dist/basics-D_eSv0cu.cjs +132 -0
- package/dist/basics-Dp_aEK81.mjs +115 -0
- package/dist/basics-WEYWlnRO.d.cts +95 -0
- package/dist/basics-uBSfkBEI.d.mts +95 -0
- package/dist/case-BWIt8Ash.mjs +449 -0
- package/dist/case-C-S-b5YP.d.cts +327 -0
- package/dist/case-CS8Ii3A7.cjs +526 -0
- package/dist/case-CybASFPD.d.mts +327 -0
- package/dist/change-case.cjs +32 -0
- package/dist/change-case.d.cts +18 -0
- package/dist/change-case.d.mts +18 -0
- package/dist/change-case.mjs +19 -0
- package/dist/colors.cjs +574 -0
- package/dist/colors.d.cts +355 -0
- package/dist/colors.d.mts +355 -0
- package/dist/colors.mjs +547 -0
- package/dist/constants-2gAw23_7.mjs +144 -0
- package/dist/constants-B34K0QPi.d.cts +21 -0
- package/dist/constants-BIBDKY1u.cjs +924 -0
- package/dist/constants-BWT-810U.cjs +158 -0
- package/dist/constants-BwbHnXlM.mjs +662 -0
- package/dist/constants-BxN9l5el.cjs +74 -0
- package/dist/constants-CLS_bgKD.d.mts +847 -0
- package/dist/constants-D73iFu8g.mjs +171 -0
- package/dist/constants-DAfRxaa8.mjs +62 -0
- package/dist/constants-DQYeCjlx.cjs +207 -0
- package/dist/constants-Deeie-iH.d.mts +21 -0
- package/dist/constants-DpTG9RP6.d.mts +29 -0
- package/dist/constants-DqwnkJ_d.cjs +740 -0
- package/dist/constants-DvRUY_FY.cjs +150 -0
- package/dist/constants-VcRtQu0K.d.cts +29 -0
- package/dist/constants-X5hm1UtB.mjs +912 -0
- package/dist/constants-eNd-iYsV.mjs +134 -0
- package/dist/constants-qm8FafmD.d.cts +847 -0
- package/dist/constants.cjs +415 -0
- package/dist/constants.d.cts +184 -0
- package/dist/constants.d.mts +184 -0
- package/dist/constants.mjs +378 -0
- package/dist/convert-BOCgUv2D.cjs +252 -0
- package/dist/convert-Bn4jFomQ.mjs +169 -0
- package/dist/convert-BrzlG-m_.cjs +475 -0
- package/dist/convert-DhaUoPVU.mjs +368 -0
- package/dist/converter-1P90_RcP.d.mts +402 -0
- package/dist/converter-CmkcAppi.d.cts +402 -0
- package/dist/converter.cjs +780 -0
- package/dist/converter.d.cts +29 -0
- package/dist/converter.d.mts +29 -0
- package/dist/converter.mjs +771 -0
- package/dist/countries-CIpmtEzV.cjs +1469 -0
- package/dist/countries-Cy0xiqS3.mjs +1463 -0
- package/dist/css-colors-Bx947Ng3.d.cts +179 -0
- package/dist/css-colors-CXCDqQbG.cjs +186 -0
- package/dist/css-colors-CXTp1vvy.d.mts +179 -0
- package/dist/css-colors-DfUW3nTR.mjs +180 -0
- package/dist/date.cjs +332 -0
- package/dist/date.d.cts +213 -0
- package/dist/date.d.mts +213 -0
- package/dist/date.mjs +298 -0
- package/dist/dom.cjs +461 -0
- package/dist/dom.d.cts +228 -0
- package/dist/dom.d.mts +228 -0
- package/dist/dom.mjs +429 -0
- package/dist/form-BMFVGUrN.d.mts +118 -0
- package/dist/form-DRFbryvK.d.cts +118 -0
- package/dist/guards-3kaUX66g.mjs +157 -0
- package/dist/guards-C8gkvIHb.cjs +240 -0
- package/dist/guards-DdyU4h4o.mjs +110 -0
- package/dist/guards-Efhp1mNy.cjs +151 -0
- package/dist/guards.cjs +172 -0
- package/dist/guards.d.cts +399 -0
- package/dist/guards.d.mts +399 -0
- package/dist/guards.mjs +75 -0
- package/dist/hash-B6JPEyAz.d.mts +131 -0
- package/dist/hash-NTpeKYB_.d.cts +131 -0
- package/dist/hash.cjs +2126 -0
- package/dist/hash.d.cts +1239 -0
- package/dist/hash.d.mts +1239 -0
- package/dist/hash.mjs +2095 -0
- package/dist/http-status-BAZdtr7-.d.mts +65 -0
- package/dist/http-status-U_3MtoGb.d.cts +65 -0
- package/dist/http-status.cjs +173 -0
- package/dist/http-status.d.cts +142 -0
- package/dist/http-status.d.mts +142 -0
- package/dist/http-status.mjs +171 -0
- package/dist/index.cjs +2551 -0
- package/dist/index.d.cts +1493 -0
- package/dist/index.d.mts +1493 -0
- package/dist/index.mjs +2357 -0
- package/dist/object-B0TV3eHx.d.mts +8052 -0
- package/dist/object-Blq0Amdv.d.cts +8052 -0
- package/dist/objectify-CDs0Fbr1.mjs +417 -0
- package/dist/objectify-DIJ-OBmo.cjs +524 -0
- package/dist/paginator.cjs +245 -0
- package/dist/paginator.d.cts +144 -0
- package/dist/paginator.d.mts +144 -0
- package/dist/paginator.mjs +243 -0
- package/dist/parse-2ubxXZRp.cjs +211 -0
- package/dist/parse-N7g942uy.mjs +164 -0
- package/dist/pluralizer-BjMIc6uT.d.mts +42 -0
- package/dist/pluralizer-Cb6ZmrDl.d.cts +42 -0
- package/dist/pluralizer.cjs +678 -0
- package/dist/pluralizer.d.cts +152 -0
- package/dist/pluralizer.d.mts +152 -0
- package/dist/pluralizer.mjs +676 -0
- package/dist/primitives-B26uZolQ.cjs +228 -0
- package/dist/primitives-KsFUp3kQ.mjs +144 -0
- package/dist/specials-D48_IZbd.d.mts +108 -0
- package/dist/specials-DzLr1ZgU.cjs +477 -0
- package/dist/specials-LVONlKbQ.d.cts +108 -0
- package/dist/specials-uhDuRg8H.mjs +292 -0
- package/dist/string-CBAbxaG1.d.mts +258 -0
- package/dist/string-CsNsm_65.d.cts +258 -0
- package/dist/stylog.cjs +621 -0
- package/dist/stylog.d.cts +49 -0
- package/dist/stylog.d.mts +49 -0
- package/dist/stylog.mjs +614 -0
- package/dist/timezone-B2OYK6Fh.mjs +5589 -0
- package/dist/timezone-Beh9IGpw.cjs +5625 -0
- package/dist/types/array.cjs +16 -0
- package/dist/types/array.d.cts +18 -0
- package/dist/types/array.d.mts +18 -0
- package/dist/types/array.mjs +17 -0
- package/dist/types/colors.cjs +16 -0
- package/dist/types/colors.d.cts +18 -0
- package/dist/types/colors.d.mts +18 -0
- package/dist/types/colors.mjs +17 -0
- package/dist/types/converter.cjs +16 -0
- package/dist/types/converter.d.cts +18 -0
- package/dist/types/converter.d.mts +18 -0
- package/dist/types/converter.mjs +17 -0
- package/dist/types/form.cjs +16 -0
- package/dist/types/form.d.cts +18 -0
- package/dist/types/form.d.mts +18 -0
- package/dist/types/form.mjs +17 -0
- package/dist/types/hash.cjs +16 -0
- package/dist/types/hash.d.cts +18 -0
- package/dist/types/hash.d.mts +18 -0
- package/dist/types/hash.mjs +17 -0
- package/dist/types/http-status.cjs +16 -0
- package/dist/types/http-status.d.cts +18 -0
- package/dist/types/http-status.d.mts +18 -0
- package/dist/types/http-status.mjs +17 -0
- package/dist/types/index.cjs +16 -0
- package/dist/types/index.d.cts +18 -0
- package/dist/types/index.d.mts +18 -0
- package/dist/types/index.mjs +17 -0
- package/dist/types/number.cjs +16 -0
- package/dist/types/number.d.cts +18 -0
- package/dist/types/number.d.mts +18 -0
- package/dist/types/number.mjs +17 -0
- package/dist/types/object.cjs +16 -0
- package/dist/types/object.d.cts +18 -0
- package/dist/types/object.d.mts +18 -0
- package/dist/types/object.mjs +17 -0
- package/dist/types/pluralizer.cjs +16 -0
- package/dist/types/pluralizer.d.cts +18 -0
- package/dist/types/pluralizer.d.mts +18 -0
- package/dist/types/pluralizer.mjs +17 -0
- package/dist/types/string.cjs +16 -0
- package/dist/types/string.d.cts +18 -0
- package/dist/types/string.d.mts +18 -0
- package/dist/types/string.mjs +17 -0
- package/dist/types/stylog.cjs +16 -0
- package/dist/types/stylog.d.cts +18 -0
- package/dist/types/stylog.d.mts +18 -0
- package/dist/types/stylog.mjs +17 -0
- package/dist/types/utils.cjs +16 -0
- package/dist/types/utils.d.cts +18 -0
- package/dist/types/utils.d.mts +18 -0
- package/dist/types/utils.mjs +17 -0
- package/dist/types/verbalizer.cjs +16 -0
- package/dist/types/verbalizer.d.cts +30 -0
- package/dist/types/verbalizer.d.mts +30 -0
- package/dist/types/verbalizer.mjs +17 -0
- package/dist/utilities-CLUmdQeV.cjs +140 -0
- package/dist/utilities-m5yFKqLd.mjs +105 -0
- package/dist/utils-ClW9LA6f.mjs +449 -0
- package/dist/utils-DLFRgXUC.cjs +568 -0
- package/dist/verbalizer.cjs +998 -0
- package/dist/verbalizer.d.cts +148 -0
- package/dist/verbalizer.d.mts +148 -0
- package/dist/verbalizer.mjs +996 -0
- package/package.json +249 -0
package/dist/colors.mjs
ADDED
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { a as isNonEmptyString, c as isNumber, d as isString } from "./primitives-KsFUp3kQ.mjs";
|
|
18
|
+
import { t as CSS_COLORS } from "./css-colors-DfUW3nTR.mjs";
|
|
19
|
+
import { c as _applyOpacity, l as _generateRandomHSL, n as isHSL, o as isRGB, r as isHSLA, s as isRGBA, u as _isSimilarToLast } from "./guards-3kaUX66g.mjs";
|
|
20
|
+
import { _ as extractSolidColorValues, a as convertHexToRgb, c as convertHslaToHex8, d as convertRgbToHsl, f as convertRgbToRgba, g as extractAlphaColorValues, h as applyOpacityToHex, i as convertHexToHsl, l as convertHslaToRgba, m as convertRgbaToHsla, n as convertHex8ToHsla, o as convertHslToHex, p as convertRgbaToHex8, r as convertHex8ToRgba, s as convertHslToRgb, t as convertColorCode, u as convertRgbToHex, v as percentToHex } from "./convert-DhaUoPVU.mjs";
|
|
21
|
+
import { n as NUMBER_COLOR_PALETTE, t as ALPHABET_COLOR_PALETTE } from "./constants-DAfRxaa8.mjs";
|
|
22
|
+
|
|
23
|
+
//#region src/colors/random.ts
|
|
24
|
+
/** Track previously generated colors. */
|
|
25
|
+
const generatedColors = /* @__PURE__ */ new Set();
|
|
26
|
+
/** Array of recently generated colors. */
|
|
27
|
+
const recentColors = [];
|
|
28
|
+
/**
|
|
29
|
+
* * Utility to generate a unique random HSL color.
|
|
30
|
+
*
|
|
31
|
+
* @param maxColors - The maximum number of recent colors to store in memory. Default is `16`.
|
|
32
|
+
* @returns Generated unique random color in `HSL` format.
|
|
33
|
+
*/
|
|
34
|
+
const generateRandomHSLColor = (maxColors = 16) => {
|
|
35
|
+
let color;
|
|
36
|
+
do
|
|
37
|
+
color = _generateRandomHSL();
|
|
38
|
+
while (generatedColors.has(color) || _isSimilarToLast(recentColors, color));
|
|
39
|
+
generatedColors.add(color);
|
|
40
|
+
recentColors.push(color);
|
|
41
|
+
if (recentColors?.length > maxColors) recentColors?.shift();
|
|
42
|
+
return color;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated For optimized performance and more flexibility, please consider using {@link generateRandomColor}.
|
|
46
|
+
*
|
|
47
|
+
* * Utility to generate a unique random color in `Hex6` and `RGB` format.
|
|
48
|
+
*
|
|
49
|
+
* @param maxColors - The maximum number of recent colors to store in memory. Default is `16`.
|
|
50
|
+
* @returns An object of generated unique random color in both `Hex` and `RGB` formats.
|
|
51
|
+
*/
|
|
52
|
+
const generateRandomColorInHexRGB = (maxColors = 16) => {
|
|
53
|
+
return convertColorCode(generateRandomHSLColor(maxColors));
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* * Generates a random unique color in one of three formats: `Hex6`, `RGB`, or `HSL`.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* - If no `options` or `colorType` option is provided, the function defaults to returning a color in `Hex6` format.
|
|
60
|
+
* - The `colorType` option determines the return type:
|
|
61
|
+
* - `'hex'` → returns a `Hex6` string e.g. `'#34E2EF'`
|
|
62
|
+
* - `'rgb'` → returns an `RGB` string e.g. `'hsl(223, 96%, 53%)'`
|
|
63
|
+
* - `'hsl'` → returns an `HSL` string e.g. `'rgb(235, 159, 45)'`
|
|
64
|
+
* - The `maxColors` option controls how many recently generated colors are kept in memory to prevent repetition.
|
|
65
|
+
* By default, this value is `16`. Increasing it allows more unique color variations before repeating.
|
|
66
|
+
*
|
|
67
|
+
* @param options - Configuration options for random color generation, including `colorType` and `maxColors`.
|
|
68
|
+
* @returns A random unique color in the specified format (`Hex6`, `RGB`, or `HSL`).
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* const hex = generateRandomColor();
|
|
72
|
+
* // hex value with inferred type: Hex6
|
|
73
|
+
*
|
|
74
|
+
* const rgb = generateRandomColor({ colorType: 'rgb' });
|
|
75
|
+
* // rgb value with inferred type: RGB
|
|
76
|
+
*
|
|
77
|
+
* const hsl = generateRandomColor({ colorType: 'hsl', maxColors: 32 });
|
|
78
|
+
* // hsl value with inferred type: HSL, with a larger unique color memory pool
|
|
79
|
+
*/
|
|
80
|
+
function generateRandomColor(options) {
|
|
81
|
+
const { colorType = "hex", maxColors = 16 } = options ?? {};
|
|
82
|
+
const hsl = generateRandomHSLColor(maxColors);
|
|
83
|
+
const hslValues = extractSolidColorValues(hsl);
|
|
84
|
+
switch (colorType) {
|
|
85
|
+
case "hsl": return hsl;
|
|
86
|
+
case "rgb": return convertHslToRgb(...hslValues);
|
|
87
|
+
default: return convertHslToHex(...hslValues);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/colors/Color.ts
|
|
93
|
+
/**
|
|
94
|
+
* @class Represents a color in {@link Hex6 Hex}, {@link Hex8}, {@link RGB}, {@link RGBA}, {@link HSL}, and {@link HSLA} formats.
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
* - Instance methods allow transforming, adjusting, and deriving new colors.
|
|
98
|
+
* - Static methods provide format validation and type-guard–style checks for supported color representations.
|
|
99
|
+
*
|
|
100
|
+
* @property `hex` - {@link Hex6 Hex} color representation (without alpha).
|
|
101
|
+
* @property `hex8` - {@link Hex8} color representation including alpha.
|
|
102
|
+
* @property `rgb` - {@link RGB} color representation (without alpha).
|
|
103
|
+
* @property `rgba` - {@link RGBA} color representation including alpha.
|
|
104
|
+
* @property `hsl` - {@link HSL} color representation (without alpha).
|
|
105
|
+
* @property `hsla` - {@link HSLA} color representation including alpha.
|
|
106
|
+
*/
|
|
107
|
+
var Color = class Color {
|
|
108
|
+
hex;
|
|
109
|
+
hex8;
|
|
110
|
+
rgb;
|
|
111
|
+
rgba;
|
|
112
|
+
hsl;
|
|
113
|
+
hsla;
|
|
114
|
+
/**
|
|
115
|
+
* * Creates a new `Color` instance and automatically converts the input color to all other supported formats: {@link Hex6 Hex}, {@link Hex8}, {@link RGB}, {@link RGBA}, {@link HSL}, and {@link HSLA}.
|
|
116
|
+
*
|
|
117
|
+
* @param color - An optional input color string in any supported format (`Hex`, `Hex8`, `RGB`, `RGBA`, `HSL`, or `HSLA`) or a named color string from standard `150+` CSS color names ({@link CSSColor}) to convert in all other (includes the current format) formats.
|
|
118
|
+
*/
|
|
119
|
+
constructor(color) {
|
|
120
|
+
if (color) {
|
|
121
|
+
const $color = color.trim();
|
|
122
|
+
if (Color.isCSSColor($color)) {
|
|
123
|
+
const { hex, hex8, rgb, rgba, hsl, hsla } = new Color(CSS_COLORS[$color]);
|
|
124
|
+
this.hex = hex;
|
|
125
|
+
this.hex8 = hex8;
|
|
126
|
+
this.rgb = rgb;
|
|
127
|
+
this.rgba = rgba;
|
|
128
|
+
this.hsl = hsl;
|
|
129
|
+
this.hsla = hsla;
|
|
130
|
+
} else {
|
|
131
|
+
const colors = this.#convertColorToOthers($color);
|
|
132
|
+
if ("hex8" in colors) {
|
|
133
|
+
const [r, g, b] = extractAlphaColorValues(colors.rgba);
|
|
134
|
+
const [h, s, l] = extractAlphaColorValues(colors.hsla);
|
|
135
|
+
this.hex = colors.hex8.toUpperCase().slice(0, 7);
|
|
136
|
+
this.hex8 = colors.hex8.toUpperCase();
|
|
137
|
+
this.rgb = `rgb(${r}, ${g}, ${b})`;
|
|
138
|
+
this.rgba = colors.rgba;
|
|
139
|
+
this.hsl = `hsl(${h}, ${s}%, ${l}%)`;
|
|
140
|
+
this.hsla = colors.hsla;
|
|
141
|
+
} else {
|
|
142
|
+
this.hex = colors.hex.toUpperCase();
|
|
143
|
+
this.hex8 = this.#hex6ToHex8(colors.hex);
|
|
144
|
+
this.rgb = colors.rgb;
|
|
145
|
+
this.rgba = this.#rgbToRGBA(colors.rgb);
|
|
146
|
+
this.hsl = colors.hsl;
|
|
147
|
+
this.hsla = this.#hslToHSLA(colors.hsl);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
const hsl = generateRandomHSLColor();
|
|
152
|
+
const { hex, rgb } = convertColorCode(hsl);
|
|
153
|
+
this.hex = hex.toUpperCase();
|
|
154
|
+
this.hex8 = this.#hex6ToHex8(hex);
|
|
155
|
+
this.rgb = rgb;
|
|
156
|
+
this.rgba = this.#rgbToRGBA(rgb);
|
|
157
|
+
this.hsl = hsl;
|
|
158
|
+
this.hsla = this.#hslToHSLA(hsl);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/** Iterates over the color representations (`Hex`, `RGB`, `HSL`). */
|
|
162
|
+
*[Symbol.iterator]() {
|
|
163
|
+
yield this.hex;
|
|
164
|
+
yield this.hex8;
|
|
165
|
+
yield this.rgb;
|
|
166
|
+
yield this.rgba;
|
|
167
|
+
yield this.hsl;
|
|
168
|
+
yield this.hsla;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @private Convert `Hex6` color format to `Hex8` by applying `100%` opacity.
|
|
172
|
+
* @param hex `Hex6` color to convert to `Hex8`.
|
|
173
|
+
*/
|
|
174
|
+
#hex6ToHex8(hex) {
|
|
175
|
+
return `${hex.toUpperCase()}${percentToHex(100)}`;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* @private Convert `RGB` color format to `RGBA`.
|
|
179
|
+
* @param rgb `RGB` color to convert to `RGBA`.
|
|
180
|
+
*/
|
|
181
|
+
#rgbToRGBA(rgb) {
|
|
182
|
+
const [r, g, b] = extractSolidColorValues(rgb);
|
|
183
|
+
return `rgba(${r}, ${g}, ${b}, 1)`;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @private Convert `HSL` color format to `HSLA`.
|
|
187
|
+
* @param hsl `HSL` color to convert to `HSLA`.
|
|
188
|
+
*/
|
|
189
|
+
#hslToHSLA(hsl) {
|
|
190
|
+
const [h, s, l] = extractSolidColorValues(hsl);
|
|
191
|
+
return `hsla(${h}, ${s}%, ${l}%, 1)`;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* @instance Applies or modifies the opacity of a color and returns a new instance.
|
|
195
|
+
*
|
|
196
|
+
* @remarks
|
|
197
|
+
* - For solid colors ({@link Hex6}/{@link RGB}/{@link HSL}): Adds an alpha channel with the specified opacity.
|
|
198
|
+
* - For alpha colors ({@link Hex8}/{@link RGBA}/{@link HSLA}): Updates the existing alpha channel.
|
|
199
|
+
*
|
|
200
|
+
* @param opacity - A number between `0-100` representing the opacity percentage.
|
|
201
|
+
* @returns A new instance of `Color` containing all color formats with the applied opacity.
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* const color = new Color("#ff0000");
|
|
205
|
+
* const alpha50 = color.applyOpacity(50); // 50% opacity
|
|
206
|
+
* console.log(alpha50.rgba); // rgba(255, 0, 0, 0.5)
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* const alphaColor = new Color("#ff000080"); // Color with 50% opacity
|
|
210
|
+
* const alpha75 = alphaColor.applyOpacity(75); // Change to 75% opacity
|
|
211
|
+
* console.log(alpha75.hex8); // #FF0000BF
|
|
212
|
+
*/
|
|
213
|
+
applyOpacity(opacity) {
|
|
214
|
+
return new Color(`${this.hex.slice(0, 7)}${percentToHex(opacity)}`.toUpperCase());
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* @instance Darkens the color by reducing the lightness by the given percentage.
|
|
218
|
+
* @param percent - The percentage to darken (`0–100`).
|
|
219
|
+
* @returns A new `Color` instance with the modified darkness.
|
|
220
|
+
*/
|
|
221
|
+
applyDarkness(percent) {
|
|
222
|
+
const [h, s, l, a] = extractAlphaColorValues(this.hsla);
|
|
223
|
+
return new Color(`hsl(${h}, ${s}%, ${Math.max(0, l - percent)}%)`).applyOpacity(a * 100);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* @instance Lightens the color by increasing the lightness by the given percentage.
|
|
227
|
+
* @param percent - The percentage to brighten (`0–100`).
|
|
228
|
+
* @returns A new `Color` instance with the modified lightness.
|
|
229
|
+
*/
|
|
230
|
+
applyBrightness(percent) {
|
|
231
|
+
const [h, s, l, a] = extractAlphaColorValues(this.hsla);
|
|
232
|
+
return new Color(`hsl(${h}, ${s}%, ${Math.min(100, l + percent)}%)`).applyOpacity(a * 100);
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* @instance Reduces the saturation of the color to make it appear duller.
|
|
236
|
+
* @param percent - The percentage to reduce saturation (`0–100`).
|
|
237
|
+
* @returns A new `Color` instance with the modified saturation.
|
|
238
|
+
*/
|
|
239
|
+
applyDullness(percent) {
|
|
240
|
+
const [h, s, l, a] = extractAlphaColorValues(this.hsla);
|
|
241
|
+
return new Color(`hsl(${h}, ${Math.max(0, s - percent)}%, ${l}%)`).applyOpacity(a * 100);
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @instance Softens the color toward white by reducing saturation and increasing lightness based on a percentage.
|
|
245
|
+
*
|
|
246
|
+
* @remarks
|
|
247
|
+
* This creates a soft UI-like white shade effect (similar to some UI libraries' light color scale).
|
|
248
|
+
*
|
|
249
|
+
* @param percent - Value from `0` to `100` representing how far to push the color toward white.
|
|
250
|
+
* @returns A new `Color` instance shifted toward white.
|
|
251
|
+
*/
|
|
252
|
+
applyWhiteShade(percent) {
|
|
253
|
+
const [h, s, l, a] = extractAlphaColorValues(this.hsla);
|
|
254
|
+
return new Color(`hsl(${h}, ${Math.max(0, s - s * percent / 100)}%, ${Math.min(100, l + (100 - l) * percent / 100)}%)`).applyOpacity(a * 100);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* @instance Blends the current color with another color based on the given weight.
|
|
258
|
+
*
|
|
259
|
+
* @remarks
|
|
260
|
+
* If any of the input colors has opacity (alpha channel), it might be lost or distorted from the generated alpha variants of the respective color formats.
|
|
261
|
+
*
|
|
262
|
+
* @param other - The color in any of 6 ({@link Hex6 Hex}, {@link Hex8}, {@link RGB}, {@link RGBA}, {@link HSL} or {@link HSLA}) formats or a {@link CSSColor} to blend with.
|
|
263
|
+
* @param weight - A number from `0` to `1` indicating the weight of the other color. Defaults to `0.5`.
|
|
264
|
+
* - `weight = 0` → only the original color.
|
|
265
|
+
* - `weight = 1` → only the other color.
|
|
266
|
+
* - `weight = 0.5` → equal blend between the two.
|
|
267
|
+
* @returns A new `Color` instance representing the blended result, with proper alpha blending.
|
|
268
|
+
*/
|
|
269
|
+
blendWith(other, weight = .5) {
|
|
270
|
+
const w = Math.max(0, Math.min(1, weight));
|
|
271
|
+
const converted = Color.isCSSColor(other) ? new Color(other) : new Color(other);
|
|
272
|
+
const [r1, b1, g1, a1] = extractAlphaColorValues(this.rgba);
|
|
273
|
+
const [r2, b2, g2, a2] = extractAlphaColorValues(converted.rgba);
|
|
274
|
+
const alpha = Math.round((a1 * (1 - w) + a2 * w) * 100) / 100;
|
|
275
|
+
const blendChannel = (c1, c2) => {
|
|
276
|
+
return Math.round((c1 * a1 * (1 - w) + c2 * a2 * w) / alpha);
|
|
277
|
+
};
|
|
278
|
+
return new Color(`rgba(${blendChannel(r1, r2)}, ${blendChannel(g1, g2)}, ${blendChannel(b1, b2)}, ${alpha})`);
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* @instance Calculates the contrast ratio between this color and another color (WCAG).
|
|
282
|
+
* @param other - The other color to compare against.
|
|
283
|
+
* @returns A number representing the contrast ratio (rounded to 2 decimal places).
|
|
284
|
+
*/
|
|
285
|
+
contrastRatio(other) {
|
|
286
|
+
const newColor = Color.isCSSColor(other) ? new Color(other) : new Color(other);
|
|
287
|
+
const luminance = (rgb) => {
|
|
288
|
+
const [r, g, b] = extractSolidColorValues(rgb).map((v) => {
|
|
289
|
+
const c = v / 255;
|
|
290
|
+
return c <= .03928 ? c / 12.92 : Math.pow((c + .055) / 1.055, 2.4);
|
|
291
|
+
});
|
|
292
|
+
return .2126 * r + .7152 * g + .0722 * b;
|
|
293
|
+
};
|
|
294
|
+
const lum1 = luminance(this.rgb);
|
|
295
|
+
const lum2 = luminance(newColor.rgb);
|
|
296
|
+
const brighter = Math.max(lum1, lum2);
|
|
297
|
+
const darker = Math.min(lum1, lum2);
|
|
298
|
+
const ratio = (brighter + .05) / (darker + .05);
|
|
299
|
+
return Math.round(ratio * 100) / 100;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* @instance Returns the complementary color by rotating the hue 180 degrees.
|
|
303
|
+
* @returns A new `Color` that is the complement of the current color.
|
|
304
|
+
*/
|
|
305
|
+
getComplementaryColor() {
|
|
306
|
+
const [h, s, l, a] = extractAlphaColorValues(this.hsla);
|
|
307
|
+
return new Color(`hsl(${(h + 180) % 360}, ${s}%, ${l}%)`).applyOpacity(a * 100);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @instance Generates a color scheme of analogous colors, including the base color.
|
|
311
|
+
*
|
|
312
|
+
* @remarks
|
|
313
|
+
* Analogous colors are next to each other on the color wheel (±30°).
|
|
314
|
+
*
|
|
315
|
+
* @returns An array of three `Color` instances: `[base, left, right]`.
|
|
316
|
+
*/
|
|
317
|
+
getAnalogousColors() {
|
|
318
|
+
const [h, s, l, a] = extractAlphaColorValues(this.hsla);
|
|
319
|
+
const left = `hsl(${(h + 330) % 360}, ${s}%, ${l}%)`;
|
|
320
|
+
const right = `hsl(${(h + 30) % 360}, ${s}%, ${l}%)`;
|
|
321
|
+
return [
|
|
322
|
+
this,
|
|
323
|
+
new Color(left),
|
|
324
|
+
new Color(right)
|
|
325
|
+
].map((c) => c.applyOpacity(a * 100));
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* @instance Generates a color triad scheme including the base color.
|
|
329
|
+
*
|
|
330
|
+
* @remarks
|
|
331
|
+
* Triadic colors are evenly spaced (120° apart) on the color wheel.
|
|
332
|
+
*
|
|
333
|
+
* @returns An array of three `Color` instances: `[base, triad1, triad2]`.
|
|
334
|
+
*/
|
|
335
|
+
getTriadColors() {
|
|
336
|
+
const [h, s, l, a] = extractAlphaColorValues(this.hsla);
|
|
337
|
+
const c1 = `hsl(${(h + 120) % 360}, ${s}%, ${l}%)`;
|
|
338
|
+
const c2 = `hsl(${(h + 240) % 360}, ${s}%, ${l}%)`;
|
|
339
|
+
return [
|
|
340
|
+
this,
|
|
341
|
+
new Color(c1),
|
|
342
|
+
new Color(c2)
|
|
343
|
+
].map((c) => c.applyOpacity(a * 100));
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* @instance Generates a tetradic color scheme including the base color.
|
|
347
|
+
*
|
|
348
|
+
* @remarks
|
|
349
|
+
* Tetradic colors form a rectangle on the color wheel (90° apart).
|
|
350
|
+
*
|
|
351
|
+
* @returns An array of four `Color` instances: `[base, tetrad1, tetrad2, tetrad3]`.
|
|
352
|
+
*/
|
|
353
|
+
getTetradColors() {
|
|
354
|
+
const [h, s, l, a] = extractAlphaColorValues(this.hsla);
|
|
355
|
+
const c1 = `hsl(${(h + 90) % 360}, ${s}%, ${l}%)`;
|
|
356
|
+
const c2 = `hsl(${(h + 180) % 360}, ${s}%, ${l}%)`;
|
|
357
|
+
const c3 = `hsl(${(h + 270) % 360}, ${s}%, ${l}%)`;
|
|
358
|
+
return [
|
|
359
|
+
this,
|
|
360
|
+
new Color(c1),
|
|
361
|
+
new Color(c2),
|
|
362
|
+
new Color(c3)
|
|
363
|
+
].map((c) => c.applyOpacity(a * 100));
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* @instance Gets the `WCAG` accessibility rating between this and another color.
|
|
367
|
+
* @param other - The other color to test contrast against.
|
|
368
|
+
* @returns `'Fail'`, `'AA'`, or `'AAA'` based on `WCAG 2.1` contrast standards.
|
|
369
|
+
*/
|
|
370
|
+
getWCAGRating(other) {
|
|
371
|
+
const ratio = this.contrastRatio(other);
|
|
372
|
+
if (ratio >= 7) return "AAA";
|
|
373
|
+
if (ratio >= 4.5) return "AA";
|
|
374
|
+
return "Fail";
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* @instance Determines if the color is light based on its perceived brightness.
|
|
378
|
+
* @param threshold Optional brightness threshold (`0–255`). Defaults to `127.5`.
|
|
379
|
+
* @remarks The brightness {@link threshold} is clamped to the valid *RGB range* (`0–255`) to prevent invalid comparisons.
|
|
380
|
+
* @returns `true` if light, `false` if dark.
|
|
381
|
+
*/
|
|
382
|
+
isLightColor(threshold = 127.5) {
|
|
383
|
+
const [r, g, b] = extractSolidColorValues(this.rgb);
|
|
384
|
+
return (r * 299 + g * 587 + b * 114) / 1e3 > Math.min(255, Math.max(0, threshold));
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* @static Checks if a color is in {@link Hex6} format.
|
|
388
|
+
*
|
|
389
|
+
* @param color Color to check.
|
|
390
|
+
* @returns Boolean: `true` if it's a {@link Hex6} color, `false` if not.
|
|
391
|
+
*/
|
|
392
|
+
static isHex6(color) {
|
|
393
|
+
return /^#[0-9A-Fa-f]{6}$/.test(color?.trim());
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* @static Checks if a color is in {@link Hex8} format.
|
|
397
|
+
*
|
|
398
|
+
* @param color Color to check.
|
|
399
|
+
* @returns Boolean: `true` if it's a {@link Hex8} color, `false` if not.
|
|
400
|
+
*/
|
|
401
|
+
static isHex8(color) {
|
|
402
|
+
return /^#[0-9A-Fa-f]{8}$/.test(color?.trim());
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* @static Checks if a color is in {@link RGB} format and within valid ranges.
|
|
406
|
+
*
|
|
407
|
+
* @param color Color to check.
|
|
408
|
+
* @returns `true` if it's a {@link RGB} color, `false` if not.
|
|
409
|
+
*/
|
|
410
|
+
static isRGB(color) {
|
|
411
|
+
return isRGB(color);
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* @static Checks if a color is in {@link RGBA} format and within valid ranges.
|
|
415
|
+
*
|
|
416
|
+
* @param color Color to check.
|
|
417
|
+
* @returns `true` if it's a {@link RGBA} color, `false` if not.
|
|
418
|
+
*/
|
|
419
|
+
static isRGBA(color) {
|
|
420
|
+
return isRGBA(color);
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* @static Checks if a color is in {@link HSL} format and within valid ranges.
|
|
424
|
+
*
|
|
425
|
+
* @param color Color to check.
|
|
426
|
+
* @returns `true` if it's a {@link HSL} color, `false` if not.
|
|
427
|
+
*/
|
|
428
|
+
static isHSL(color) {
|
|
429
|
+
return isHSL(color);
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* @static Checks if a color is in {@link HSLA} format and within valid ranges.
|
|
433
|
+
*
|
|
434
|
+
* @param color Color to check.
|
|
435
|
+
* @returns `true` if it's a {@link HSLA} color, `false` if not.
|
|
436
|
+
*/
|
|
437
|
+
static isHSLA(color) {
|
|
438
|
+
return isHSLA(color);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* @static Checks if a color is a valid CSS color name ({@link CSSColor}).
|
|
442
|
+
*
|
|
443
|
+
* @remarks
|
|
444
|
+
* - This method checks against a predefined list of CSS color names.
|
|
445
|
+
* - It does not validate format types like `Hex`, `RGB`, or `HSL` or their alpha channels.
|
|
446
|
+
*
|
|
447
|
+
* @param color - The color to check.
|
|
448
|
+
* @returns `true` if the color is a valid CSS color name, `false` otherwise.
|
|
449
|
+
*/
|
|
450
|
+
static isCSSColor(color) {
|
|
451
|
+
return isNonEmptyString(color) && color in CSS_COLORS;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* @private Converts the given color to all other formats while preserving the original.
|
|
455
|
+
*
|
|
456
|
+
* @param color - The color to convert.
|
|
457
|
+
* @returns An object containing `Hex`, `RGB`, and `HSL` representations.
|
|
458
|
+
*/
|
|
459
|
+
#convertColorToOthers(color) {
|
|
460
|
+
if (Color.isHex6(color)) {
|
|
461
|
+
const { rgb, hsl } = convertColorCode(color);
|
|
462
|
+
return {
|
|
463
|
+
hex: color,
|
|
464
|
+
rgb,
|
|
465
|
+
hsl
|
|
466
|
+
};
|
|
467
|
+
} else if (Color.isRGB(color)) {
|
|
468
|
+
const { hex, hsl } = convertColorCode(color);
|
|
469
|
+
return {
|
|
470
|
+
hex,
|
|
471
|
+
rgb: color,
|
|
472
|
+
hsl
|
|
473
|
+
};
|
|
474
|
+
} else if (Color.isHSL(color)) {
|
|
475
|
+
const { hex, rgb } = convertColorCode(color);
|
|
476
|
+
return {
|
|
477
|
+
hex,
|
|
478
|
+
rgb,
|
|
479
|
+
hsl: color
|
|
480
|
+
};
|
|
481
|
+
} else if (Color.isHex8(color)) {
|
|
482
|
+
const { rgba, hsla } = convertColorCode(color);
|
|
483
|
+
return {
|
|
484
|
+
hex8: color,
|
|
485
|
+
rgba,
|
|
486
|
+
hsla
|
|
487
|
+
};
|
|
488
|
+
} else if (Color.isRGBA(color)) {
|
|
489
|
+
const { hex8, hsla } = convertColorCode(color);
|
|
490
|
+
return {
|
|
491
|
+
hex8,
|
|
492
|
+
rgba: color,
|
|
493
|
+
hsla
|
|
494
|
+
};
|
|
495
|
+
} else if (Color.isHSLA(color)) {
|
|
496
|
+
const { hex8, rgba } = convertColorCode(color);
|
|
497
|
+
return {
|
|
498
|
+
hex8,
|
|
499
|
+
rgba,
|
|
500
|
+
hsla: color
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
throw new TypeError(`${color} is not a valid color!`, { cause: "Unrecognized Color Format" });
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region src/colors/initials.ts
|
|
509
|
+
/**
|
|
510
|
+
* * Generates a hex color (`Hex8` format) based on the first character (initial) of a string or number; or an array of hex colors based on the first character (initial) of an array of strings/numbers or even nested arrays of strings/numbers.
|
|
511
|
+
*
|
|
512
|
+
* - For numbers, it uses 10 predefined colors (0-9).
|
|
513
|
+
* - For letters, it uses 26 predefined colors (A-Z).
|
|
514
|
+
* - For empty array it returns all 36 colors.
|
|
515
|
+
* - Invalid characters and inputs are handled with a fallback color.
|
|
516
|
+
* @param input - A string, number, or an array of strings/numbers or even nested arrays of strings/numbers.
|
|
517
|
+
* @param opacity - A value from 0 to 100 representing the opacity percentage.
|
|
518
|
+
* @returns A hex color for a string/number, or an array of hex colors for each element of the provided array.
|
|
519
|
+
*/
|
|
520
|
+
function getColorForInitial(input = "", opacity = 100) {
|
|
521
|
+
let initial;
|
|
522
|
+
const hexOpacity = percentToHex(opacity);
|
|
523
|
+
const NUMBERS = "0123456789";
|
|
524
|
+
const DEFAULT = "#010514";
|
|
525
|
+
if (!input) return _applyOpacity(DEFAULT, hexOpacity);
|
|
526
|
+
if (isString(input)) {
|
|
527
|
+
initial = input[0];
|
|
528
|
+
if (NUMBERS.includes(initial)) return _applyOpacity(NUMBER_COLOR_PALETTE[parseInt(initial, 10)], hexOpacity);
|
|
529
|
+
const index = initial.toUpperCase().charCodeAt(0) - "A".charCodeAt(0);
|
|
530
|
+
if (index >= 0 && index < ALPHABET_COLOR_PALETTE?.length) return _applyOpacity(ALPHABET_COLOR_PALETTE[index], hexOpacity);
|
|
531
|
+
return _applyOpacity(DEFAULT, hexOpacity);
|
|
532
|
+
} else if (isNumber(input)) {
|
|
533
|
+
initial = input.toString()[0];
|
|
534
|
+
if (NUMBERS.includes(initial)) return _applyOpacity(NUMBER_COLOR_PALETTE[parseInt(initial, 10)], hexOpacity);
|
|
535
|
+
return _applyOpacity(DEFAULT, hexOpacity);
|
|
536
|
+
} else if (Array.isArray(input)) {
|
|
537
|
+
if (input?.length < 1) return [...ALPHABET_COLOR_PALETTE, ...NUMBER_COLOR_PALETTE].map((color) => _applyOpacity(color, hexOpacity));
|
|
538
|
+
return input.map((el) => {
|
|
539
|
+
if (Array.isArray(el)) return getColorForInitial(el, opacity);
|
|
540
|
+
return getColorForInitial(el, opacity);
|
|
541
|
+
}).flat();
|
|
542
|
+
}
|
|
543
|
+
return _applyOpacity(DEFAULT, hexOpacity);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
//#endregion
|
|
547
|
+
export { Color, Color as Colour, applyOpacityToHex, convertColorCode, convertHex8ToHsla, convertHex8ToRgba, convertHexToHsl, convertHexToRgb, convertHslToHex, convertHslToRgb, convertHslaToHex8, convertHslaToRgba, convertRgbToHex, convertRgbToHsl, convertRgbToRgba, convertRgbaToHex8, convertRgbaToHsla, extractAlphaColorValues, extractSolidColorValues, generateRandomColor, generateRandomColor as getRandomColor, generateRandomColorInHexRGB, generateRandomHSLColor as generateRandomHSL, generateRandomHSLColor, generateRandomHSLColor as getRandomHSL, getColorForInitial, percentToHex };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
//#region src/string/constants.ts
|
|
18
|
+
/** List of conjunctions, prepositions, auxiliary verbs and articles in lowercase as array of strings */
|
|
19
|
+
const LOWERCASE = /* @__PURE__ */ Object.freeze([
|
|
20
|
+
"and",
|
|
21
|
+
"but",
|
|
22
|
+
"or",
|
|
23
|
+
"nor",
|
|
24
|
+
"for",
|
|
25
|
+
"so",
|
|
26
|
+
"yet",
|
|
27
|
+
"after",
|
|
28
|
+
"although",
|
|
29
|
+
"as",
|
|
30
|
+
"because",
|
|
31
|
+
"before",
|
|
32
|
+
"even",
|
|
33
|
+
"if",
|
|
34
|
+
"once",
|
|
35
|
+
"since",
|
|
36
|
+
"than",
|
|
37
|
+
"that",
|
|
38
|
+
"though",
|
|
39
|
+
"unless",
|
|
40
|
+
"until",
|
|
41
|
+
"when",
|
|
42
|
+
"whenever",
|
|
43
|
+
"where",
|
|
44
|
+
"whereas",
|
|
45
|
+
"wherever",
|
|
46
|
+
"whether",
|
|
47
|
+
"while",
|
|
48
|
+
"about",
|
|
49
|
+
"above",
|
|
50
|
+
"across",
|
|
51
|
+
"after",
|
|
52
|
+
"against",
|
|
53
|
+
"along",
|
|
54
|
+
"among",
|
|
55
|
+
"around",
|
|
56
|
+
"as",
|
|
57
|
+
"at",
|
|
58
|
+
"before",
|
|
59
|
+
"behind",
|
|
60
|
+
"below",
|
|
61
|
+
"beneath",
|
|
62
|
+
"beside",
|
|
63
|
+
"between",
|
|
64
|
+
"beyond",
|
|
65
|
+
"but",
|
|
66
|
+
"by",
|
|
67
|
+
"concerning",
|
|
68
|
+
"considering",
|
|
69
|
+
"despite",
|
|
70
|
+
"down",
|
|
71
|
+
"during",
|
|
72
|
+
"except",
|
|
73
|
+
"following",
|
|
74
|
+
"for",
|
|
75
|
+
"from",
|
|
76
|
+
"in",
|
|
77
|
+
"inside",
|
|
78
|
+
"into",
|
|
79
|
+
"like",
|
|
80
|
+
"minus",
|
|
81
|
+
"near",
|
|
82
|
+
"of",
|
|
83
|
+
"off",
|
|
84
|
+
"on",
|
|
85
|
+
"onto",
|
|
86
|
+
"opposite",
|
|
87
|
+
"out",
|
|
88
|
+
"outside",
|
|
89
|
+
"over",
|
|
90
|
+
"past",
|
|
91
|
+
"per",
|
|
92
|
+
"plus",
|
|
93
|
+
"regarding",
|
|
94
|
+
"round",
|
|
95
|
+
"save",
|
|
96
|
+
"since",
|
|
97
|
+
"than",
|
|
98
|
+
"through",
|
|
99
|
+
"throughout",
|
|
100
|
+
"till",
|
|
101
|
+
"to",
|
|
102
|
+
"toward",
|
|
103
|
+
"towards",
|
|
104
|
+
"under",
|
|
105
|
+
"underneath",
|
|
106
|
+
"unlike",
|
|
107
|
+
"until",
|
|
108
|
+
"up",
|
|
109
|
+
"upon",
|
|
110
|
+
"versus",
|
|
111
|
+
"via",
|
|
112
|
+
"with",
|
|
113
|
+
"within",
|
|
114
|
+
"without",
|
|
115
|
+
"a",
|
|
116
|
+
"an",
|
|
117
|
+
"the",
|
|
118
|
+
"am",
|
|
119
|
+
"are",
|
|
120
|
+
"be",
|
|
121
|
+
"been",
|
|
122
|
+
"being",
|
|
123
|
+
"can",
|
|
124
|
+
"could",
|
|
125
|
+
"do",
|
|
126
|
+
"does",
|
|
127
|
+
"did",
|
|
128
|
+
"had",
|
|
129
|
+
"has",
|
|
130
|
+
"have",
|
|
131
|
+
"is",
|
|
132
|
+
"may",
|
|
133
|
+
"might",
|
|
134
|
+
"must",
|
|
135
|
+
"shall",
|
|
136
|
+
"should",
|
|
137
|
+
"was",
|
|
138
|
+
"were",
|
|
139
|
+
"will",
|
|
140
|
+
"would"
|
|
141
|
+
]);
|
|
142
|
+
|
|
143
|
+
//#endregion
|
|
144
|
+
export { LOWERCASE as t };
|