cck-ui 0.0.1
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 +13 -0
- package/README.md +3 -0
- package/dist/index.css +1 -0
- package/dist/index.full.js +2957 -0
- package/dist/index.full.min.js +21 -0
- package/dist/index.full.min.js.map +1 -0
- package/dist/index.full.min.mjs +21 -0
- package/dist/index.full.min.mjs.map +1 -0
- package/dist/index.full.mjs +2945 -0
- package/es/_virtual/_rolldown/runtime.mjs +27 -0
- package/es/component.d.ts +6 -0
- package/es/component.mjs +8 -0
- package/es/component.mjs.map +1 -0
- package/es/components/base/style/css.mjs +1 -0
- package/es/components/base/style/index.mjs +1 -0
- package/es/components/button/index.d.ts +8 -0
- package/es/components/button/src/button-custom.d.ts +6 -0
- package/es/components/button/src/button.types.d.ts +77 -0
- package/es/components/button/src/button.vue.d.ts +28 -0
- package/es/components/button/src/use-button.d.ts +14 -0
- package/es/components/button/style/css.mjs +2 -0
- package/es/components/form/index.d.ts +4 -0
- package/es/components/form/src/constants.d.ts +7 -0
- package/es/components/form/src/form.types.d.ts +10 -0
- package/es/components/form/src/hooks/index.d.ts +2 -0
- package/es/components/form/src/hooks/use-form-common-props.d.ts +7 -0
- package/es/components/icon/index.d.ts +26 -0
- package/es/components/icon/src/icon.types.d.ts +13 -0
- package/es/components/icon/src/icon.vue.d.ts +17 -0
- package/es/components/icon/style/css.mjs +1 -0
- package/es/components/icon/style/index.mjs +1 -0
- package/es/components/index.d.ts +5 -0
- package/es/constants/index.d.ts +3 -0
- package/es/constants/key.d.ts +4 -0
- package/es/constants/sizes.d.ts +12 -0
- package/es/defaults.d.ts +6 -0
- package/es/defaults.mjs +9 -0
- package/es/defaults.mjs.map +1 -0
- package/es/hooks/index.d.ts +4 -0
- package/es/hooks/use-namespace/index.d.ts +27 -0
- package/es/hooks/use-prop/index.d.ts +6 -0
- package/es/hooks/use-theme/index.d.ts +5 -0
- package/es/index.d.ts +11 -0
- package/es/index.mjs +11 -0
- package/es/index.mjs.map +1 -0
- package/es/make-installer.d.ts +8 -0
- package/es/make-installer.mjs +14 -0
- package/es/make-installer.mjs.map +1 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/conversion.mjs +268 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/conversion.mjs.map +1 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/css-color-names.mjs +158 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/css-color-names.mjs.map +1 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/format-input.mjs +192 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/format-input.mjs.map +1 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/index.mjs +456 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/index.mjs.map +1 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/util.mjs +65 -0
- package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/util.mjs.map +1 -0
- package/es/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs +53 -0
- package/es/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs.map +1 -0
- package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs +22 -0
- package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs.map +1 -0
- package/es/packages/components/button/index.mjs +8 -0
- package/es/packages/components/button/index.mjs.map +1 -0
- package/es/packages/components/button/src/button-custom.mjs +121 -0
- package/es/packages/components/button/src/button-custom.mjs.map +1 -0
- package/es/packages/components/button/src/button.mjs +7 -0
- package/es/packages/components/button/src/button.mjs.map +1 -0
- package/es/packages/components/button/src/button.types.mjs +0 -0
- package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs +139 -0
- package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/packages/components/button/src/use-button.mjs +41 -0
- package/es/packages/components/button/src/use-button.mjs.map +1 -0
- package/es/packages/components/form/index.mjs +3 -0
- package/es/packages/components/form/src/constants.mjs +6 -0
- package/es/packages/components/form/src/constants.mjs.map +1 -0
- package/es/packages/components/form/src/form.types.mjs +0 -0
- package/es/packages/components/form/src/hooks/index.mjs +2 -0
- package/es/packages/components/form/src/hooks/use-form-common-props.mjs +16 -0
- package/es/packages/components/form/src/hooks/use-form-common-props.mjs.map +1 -0
- package/es/packages/components/icon/index.mjs +8 -0
- package/es/packages/components/icon/index.mjs.map +1 -0
- package/es/packages/components/icon/src/icon.mjs +7 -0
- package/es/packages/components/icon/src/icon.mjs.map +1 -0
- package/es/packages/components/icon/src/icon.types.mjs +0 -0
- package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs +42 -0
- package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/packages/components/index.mjs +3 -0
- package/es/packages/constants/index.mjs +3 -0
- package/es/packages/constants/key.mjs +6 -0
- package/es/packages/constants/key.mjs.map +1 -0
- package/es/packages/constants/sizes.mjs +24 -0
- package/es/packages/constants/sizes.mjs.map +1 -0
- package/es/packages/hooks/index.mjs +4 -0
- package/es/packages/hooks/use-namespace/index.mjs +63 -0
- package/es/packages/hooks/use-namespace/index.mjs.map +1 -0
- package/es/packages/hooks/use-prop/index.mjs +10 -0
- package/es/packages/hooks/use-prop/index.mjs.map +1 -0
- package/es/packages/hooks/use-theme/index.mjs +19 -0
- package/es/packages/hooks/use-theme/index.mjs.map +1 -0
- package/es/packages/utils/colors.mjs +109 -0
- package/es/packages/utils/colors.mjs.map +1 -0
- package/es/packages/utils/dom/index.mjs +2 -0
- package/es/packages/utils/dom/style.mjs +11 -0
- package/es/packages/utils/dom/style.mjs.map +1 -0
- package/es/packages/utils/index.mjs +5 -0
- package/es/packages/utils/types.mjs +12 -0
- package/es/packages/utils/types.mjs.map +1 -0
- package/es/packages/utils/vue/index.mjs +2 -0
- package/es/packages/utils/vue/install.mjs +38 -0
- package/es/packages/utils/vue/install.mjs.map +1 -0
- package/es/packages/utils/vue/typescript.mjs +0 -0
- package/es/plugin.d.ts +6 -0
- package/es/plugin.mjs +6 -0
- package/es/plugin.mjs.map +1 -0
- package/es/utils/colors.d.ts +14 -0
- package/es/utils/dom/index.d.ts +2 -0
- package/es/utils/dom/style.d.ts +4 -0
- package/es/utils/index.d.ts +6 -0
- package/es/utils/types.d.ts +8 -0
- package/es/utils/vue/index.d.ts +3 -0
- package/es/utils/vue/install.d.ts +7 -0
- package/es/utils/vue/typescript.d.ts +19 -0
- package/global.d.ts +8 -0
- package/lib/_virtual/_rolldown/runtime.js +37 -0
- package/lib/component.d.ts +6 -0
- package/lib/component.js +12 -0
- package/lib/component.js.map +1 -0
- package/lib/components/base/style/css.js +2 -0
- package/lib/components/base/style/index.js +2 -0
- package/lib/components/button/index.d.ts +8 -0
- package/lib/components/button/src/button-custom.d.ts +6 -0
- package/lib/components/button/src/button.types.d.ts +77 -0
- package/lib/components/button/src/button.vue.d.ts +28 -0
- package/lib/components/button/src/use-button.d.ts +14 -0
- package/lib/components/button/style/css.js +3 -0
- package/lib/components/form/index.d.ts +4 -0
- package/lib/components/form/src/constants.d.ts +7 -0
- package/lib/components/form/src/form.types.d.ts +10 -0
- package/lib/components/form/src/hooks/index.d.ts +2 -0
- package/lib/components/form/src/hooks/use-form-common-props.d.ts +7 -0
- package/lib/components/icon/index.d.ts +26 -0
- package/lib/components/icon/src/icon.types.d.ts +13 -0
- package/lib/components/icon/src/icon.vue.d.ts +17 -0
- package/lib/components/icon/style/css.js +2 -0
- package/lib/components/icon/style/index.js +2 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/key.d.ts +4 -0
- package/lib/constants/sizes.d.ts +12 -0
- package/lib/defaults.d.ts +6 -0
- package/lib/defaults.js +13 -0
- package/lib/defaults.js.map +1 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/use-namespace/index.d.ts +27 -0
- package/lib/hooks/use-prop/index.d.ts +6 -0
- package/lib/hooks/use-theme/index.d.ts +5 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +19 -0
- package/lib/index.js.map +1 -0
- package/lib/make-installer.d.ts +8 -0
- package/lib/make-installer.js +15 -0
- package/lib/make-installer.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/conversion.js +309 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/conversion.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/css-color-names.js +168 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/css-color-names.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/format-input.js +209 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/format-input.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/from-ratio.js +43 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/from-ratio.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js +471 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js +14 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js +50 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/random.js +255 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/random.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/readability.js +96 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/readability.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js +35 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js.map +1 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/util.js +82 -0
- package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/util.js.map +1 -0
- package/lib/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js +53 -0
- package/lib/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js +66 -0
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js +56 -0
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js.map +1 -0
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js +18 -0
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js.map +1 -0
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js +14 -0
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js.map +1 -0
- package/lib/packages/components/button/index.js +13 -0
- package/lib/packages/components/button/index.js.map +1 -0
- package/lib/packages/components/button/src/button-custom.js +122 -0
- package/lib/packages/components/button/src/button-custom.js.map +1 -0
- package/lib/packages/components/button/src/button.js +10 -0
- package/lib/packages/components/button/src/button.js.map +1 -0
- package/lib/packages/components/button/src/button.types.js +1 -0
- package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js +139 -0
- package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/lib/packages/components/button/src/use-button.js +42 -0
- package/lib/packages/components/button/src/use-button.js.map +1 -0
- package/lib/packages/components/form/index.js +6 -0
- package/lib/packages/components/form/src/constants.js +7 -0
- package/lib/packages/components/form/src/constants.js.map +1 -0
- package/lib/packages/components/form/src/form.types.js +1 -0
- package/lib/packages/components/form/src/hooks/index.js +4 -0
- package/lib/packages/components/form/src/hooks/use-form-common-props.js +18 -0
- package/lib/packages/components/form/src/hooks/use-form-common-props.js.map +1 -0
- package/lib/packages/components/icon/index.js +13 -0
- package/lib/packages/components/icon/index.js.map +1 -0
- package/lib/packages/components/icon/src/icon.js +10 -0
- package/lib/packages/components/icon/src/icon.js.map +1 -0
- package/lib/packages/components/icon/src/icon.types.js +1 -0
- package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js +42 -0
- package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/lib/packages/components/index.js +5 -0
- package/lib/packages/constants/index.js +6 -0
- package/lib/packages/constants/key.js +7 -0
- package/lib/packages/constants/key.js.map +1 -0
- package/lib/packages/constants/sizes.js +26 -0
- package/lib/packages/constants/sizes.js.map +1 -0
- package/lib/packages/hooks/index.js +10 -0
- package/lib/packages/hooks/use-namespace/index.js +67 -0
- package/lib/packages/hooks/use-namespace/index.js.map +1 -0
- package/lib/packages/hooks/use-prop/index.js +11 -0
- package/lib/packages/hooks/use-prop/index.js.map +1 -0
- package/lib/packages/hooks/use-theme/index.js +20 -0
- package/lib/packages/hooks/use-theme/index.js.map +1 -0
- package/lib/packages/utils/colors.js +112 -0
- package/lib/packages/utils/colors.js.map +1 -0
- package/lib/packages/utils/dom/index.js +3 -0
- package/lib/packages/utils/dom/style.js +13 -0
- package/lib/packages/utils/dom/style.js.map +1 -0
- package/lib/packages/utils/index.js +21 -0
- package/lib/packages/utils/types.js +21 -0
- package/lib/packages/utils/types.js.map +1 -0
- package/lib/packages/utils/vue/index.js +4 -0
- package/lib/packages/utils/vue/install.js +40 -0
- package/lib/packages/utils/vue/install.js.map +1 -0
- package/lib/packages/utils/vue/typescript.js +1 -0
- package/lib/plugin.d.ts +6 -0
- package/lib/plugin.js +10 -0
- package/lib/plugin.js.map +1 -0
- package/lib/utils/colors.d.ts +14 -0
- package/lib/utils/dom/index.d.ts +2 -0
- package/lib/utils/dom/style.d.ts +4 -0
- package/lib/utils/index.d.ts +6 -0
- package/lib/utils/types.d.ts +8 -0
- package/lib/utils/vue/index.d.ts +3 -0
- package/lib/utils/vue/install.d.ts +7 -0
- package/lib/utils/vue/typescript.d.ts +19 -0
- package/package.json +69 -0
- package/theme-slate/base.css +1 -0
- package/theme-slate/cu-button.css +1 -0
- package/theme-slate/cu-common.css +1 -0
- package/theme-slate/cu-icon.css +1 -0
- package/theme-slate/cu-var.css +1 -0
- package/theme-slate/dark/css-vars.css +0 -0
- package/theme-slate/index.css +1 -0
- package/theme-slate/src/base.scss +2 -0
- package/theme-slate/src/button.scss +317 -0
- package/theme-slate/src/common/var.scss +179 -0
- package/theme-slate/src/common.scss +9 -0
- package/theme-slate/src/dark/css-vars.scss +0 -0
- package/theme-slate/src/icon.scss +43 -0
- package/theme-slate/src/index.scss +4 -0
- package/theme-slate/src/mixins/_var.scss +9 -0
- package/theme-slate/src/mixins/config.scss +5 -0
- package/theme-slate/src/mixins/function.scss +11 -0
- package/theme-slate/src/mixins/mixins.scss +19 -0
- package/theme-slate/src/var.scss +297 -0
package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js
ADDED
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_util$1 = require("./util.js");
|
|
4
|
+
const require_conversion$1 = require("./conversion.js");
|
|
5
|
+
const require_css_color_names$1 = require("./css-color-names.js");
|
|
6
|
+
const require_format_input$1 = require("./format-input.js");
|
|
7
|
+
//#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js
|
|
8
|
+
var require_dist = /* @__PURE__ */ require_runtime.__commonJSMin(((exports) => {
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.TinyColor = void 0;
|
|
11
|
+
const conversion_js_1 = require_conversion$1.default;
|
|
12
|
+
const css_color_names_js_1 = require_css_color_names$1.default;
|
|
13
|
+
const format_input_js_1 = require_format_input$1.default;
|
|
14
|
+
const util_js_1 = require_util$1.default;
|
|
15
|
+
exports.TinyColor = class TinyColor {
|
|
16
|
+
constructor(color = "", opts = {}) {
|
|
17
|
+
if (color instanceof TinyColor) return color;
|
|
18
|
+
if (typeof color === "number") color = (0, conversion_js_1.numberInputToObject)(color);
|
|
19
|
+
this.originalInput = color;
|
|
20
|
+
const rgb = (0, format_input_js_1.inputToRGB)(color);
|
|
21
|
+
this.originalInput = color;
|
|
22
|
+
this.r = rgb.r;
|
|
23
|
+
this.g = rgb.g;
|
|
24
|
+
this.b = rgb.b;
|
|
25
|
+
this.a = rgb.a;
|
|
26
|
+
this.roundA = Math.round(100 * this.a) / 100;
|
|
27
|
+
this.format = opts.format ?? rgb.format;
|
|
28
|
+
this.gradientType = opts.gradientType;
|
|
29
|
+
if (this.r < 1) this.r = Math.round(this.r);
|
|
30
|
+
if (this.g < 1) this.g = Math.round(this.g);
|
|
31
|
+
if (this.b < 1) this.b = Math.round(this.b);
|
|
32
|
+
this.isValid = rgb.ok;
|
|
33
|
+
}
|
|
34
|
+
isDark() {
|
|
35
|
+
return this.getBrightness() < 128;
|
|
36
|
+
}
|
|
37
|
+
isLight() {
|
|
38
|
+
return !this.isDark();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Returns the perceived brightness of the color, from 0-255.
|
|
42
|
+
*/
|
|
43
|
+
getBrightness() {
|
|
44
|
+
const rgb = this.toRgb();
|
|
45
|
+
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns the perceived luminance of a color, from 0-1.
|
|
49
|
+
*/
|
|
50
|
+
getLuminance() {
|
|
51
|
+
const rgb = this.toRgb();
|
|
52
|
+
let R;
|
|
53
|
+
let G;
|
|
54
|
+
let B;
|
|
55
|
+
const RsRGB = rgb.r / 255;
|
|
56
|
+
const GsRGB = rgb.g / 255;
|
|
57
|
+
const BsRGB = rgb.b / 255;
|
|
58
|
+
if (RsRGB <= .03928) R = RsRGB / 12.92;
|
|
59
|
+
else R = Math.pow((RsRGB + .055) / 1.055, 2.4);
|
|
60
|
+
if (GsRGB <= .03928) G = GsRGB / 12.92;
|
|
61
|
+
else G = Math.pow((GsRGB + .055) / 1.055, 2.4);
|
|
62
|
+
if (BsRGB <= .03928) B = BsRGB / 12.92;
|
|
63
|
+
else B = Math.pow((BsRGB + .055) / 1.055, 2.4);
|
|
64
|
+
return .2126 * R + .7152 * G + .0722 * B;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Returns the alpha value of a color, from 0-1.
|
|
68
|
+
*/
|
|
69
|
+
getAlpha() {
|
|
70
|
+
return this.a;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Sets the alpha value on the current color.
|
|
74
|
+
*
|
|
75
|
+
* @param alpha - The new alpha value. The accepted range is 0-1.
|
|
76
|
+
*/
|
|
77
|
+
setAlpha(alpha) {
|
|
78
|
+
this.a = (0, util_js_1.boundAlpha)(alpha);
|
|
79
|
+
this.roundA = Math.round(100 * this.a) / 100;
|
|
80
|
+
return this;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Returns whether the color is monochrome.
|
|
84
|
+
*/
|
|
85
|
+
isMonochrome() {
|
|
86
|
+
const { s } = this.toHsl();
|
|
87
|
+
return s === 0;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Returns the object as a HSVA object.
|
|
91
|
+
*/
|
|
92
|
+
toHsv() {
|
|
93
|
+
const hsv = (0, conversion_js_1.rgbToHsv)(this.r, this.g, this.b);
|
|
94
|
+
return {
|
|
95
|
+
h: hsv.h * 360,
|
|
96
|
+
s: hsv.s,
|
|
97
|
+
v: hsv.v,
|
|
98
|
+
a: this.a
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Returns the hsva values interpolated into a string with the following format:
|
|
103
|
+
* "hsva(xxx, xxx, xxx, xx)".
|
|
104
|
+
*/
|
|
105
|
+
toHsvString() {
|
|
106
|
+
const hsv = (0, conversion_js_1.rgbToHsv)(this.r, this.g, this.b);
|
|
107
|
+
const h = Math.round(hsv.h * 360);
|
|
108
|
+
const s = Math.round(hsv.s * 100);
|
|
109
|
+
const v = Math.round(hsv.v * 100);
|
|
110
|
+
return this.a === 1 ? `hsv(${h}, ${s}%, ${v}%)` : `hsva(${h}, ${s}%, ${v}%, ${this.roundA})`;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Returns the object as a HSLA object.
|
|
114
|
+
*/
|
|
115
|
+
toHsl() {
|
|
116
|
+
const hsl = (0, conversion_js_1.rgbToHsl)(this.r, this.g, this.b);
|
|
117
|
+
return {
|
|
118
|
+
h: hsl.h * 360,
|
|
119
|
+
s: hsl.s,
|
|
120
|
+
l: hsl.l,
|
|
121
|
+
a: this.a
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Returns the hsla values interpolated into a string with the following format:
|
|
126
|
+
* "hsla(xxx, xxx, xxx, xx)".
|
|
127
|
+
*/
|
|
128
|
+
toHslString() {
|
|
129
|
+
const hsl = (0, conversion_js_1.rgbToHsl)(this.r, this.g, this.b);
|
|
130
|
+
const h = Math.round(hsl.h * 360);
|
|
131
|
+
const s = Math.round(hsl.s * 100);
|
|
132
|
+
const l = Math.round(hsl.l * 100);
|
|
133
|
+
return this.a === 1 ? `hsl(${h}, ${s}%, ${l}%)` : `hsla(${h}, ${s}%, ${l}%, ${this.roundA})`;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Returns the hex value of the color.
|
|
137
|
+
* @param allow3Char will shorten hex value to 3 char if possible
|
|
138
|
+
*/
|
|
139
|
+
toHex(allow3Char = false) {
|
|
140
|
+
return (0, conversion_js_1.rgbToHex)(this.r, this.g, this.b, allow3Char);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Returns the hex value of the color -with a # prefixed.
|
|
144
|
+
* @param allow3Char will shorten hex value to 3 char if possible
|
|
145
|
+
*/
|
|
146
|
+
toHexString(allow3Char = false) {
|
|
147
|
+
return "#" + this.toHex(allow3Char);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Returns the hex 8 value of the color.
|
|
151
|
+
* @param allow4Char will shorten hex value to 4 char if possible
|
|
152
|
+
*/
|
|
153
|
+
toHex8(allow4Char = false) {
|
|
154
|
+
return (0, conversion_js_1.rgbaToHex)(this.r, this.g, this.b, this.a, allow4Char);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Returns the hex 8 value of the color -with a # prefixed.
|
|
158
|
+
* @param allow4Char will shorten hex value to 4 char if possible
|
|
159
|
+
*/
|
|
160
|
+
toHex8String(allow4Char = false) {
|
|
161
|
+
return "#" + this.toHex8(allow4Char);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Returns the shorter hex value of the color depends on its alpha -with a # prefixed.
|
|
165
|
+
* @param allowShortChar will shorten hex value to 3 or 4 char if possible
|
|
166
|
+
*/
|
|
167
|
+
toHexShortString(allowShortChar = false) {
|
|
168
|
+
return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Returns the object as a RGBA object.
|
|
172
|
+
*/
|
|
173
|
+
toRgb() {
|
|
174
|
+
return {
|
|
175
|
+
r: Math.round(this.r),
|
|
176
|
+
g: Math.round(this.g),
|
|
177
|
+
b: Math.round(this.b),
|
|
178
|
+
a: this.a
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Returns the RGBA values interpolated into a string with the following format:
|
|
183
|
+
* "RGBA(xxx, xxx, xxx, xx)".
|
|
184
|
+
*/
|
|
185
|
+
toRgbString() {
|
|
186
|
+
const r = Math.round(this.r);
|
|
187
|
+
const g = Math.round(this.g);
|
|
188
|
+
const b = Math.round(this.b);
|
|
189
|
+
return this.a === 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${this.roundA})`;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Returns the object as a RGBA object.
|
|
193
|
+
*/
|
|
194
|
+
toPercentageRgb() {
|
|
195
|
+
const fmt = (x) => `${Math.round((0, util_js_1.bound01)(x, 255) * 100)}%`;
|
|
196
|
+
return {
|
|
197
|
+
r: fmt(this.r),
|
|
198
|
+
g: fmt(this.g),
|
|
199
|
+
b: fmt(this.b),
|
|
200
|
+
a: this.a
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Returns the RGBA relative values interpolated into a string
|
|
205
|
+
*/
|
|
206
|
+
toPercentageRgbString() {
|
|
207
|
+
const rnd = (x) => Math.round((0, util_js_1.bound01)(x, 255) * 100);
|
|
208
|
+
return this.a === 1 ? `rgb(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%)` : `rgba(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%, ${this.roundA})`;
|
|
209
|
+
}
|
|
210
|
+
toCmyk() {
|
|
211
|
+
return { ...(0, conversion_js_1.rgbToCmyk)(this.r, this.g, this.b) };
|
|
212
|
+
}
|
|
213
|
+
toCmykString() {
|
|
214
|
+
const { c, m, y, k } = (0, conversion_js_1.rgbToCmyk)(this.r, this.g, this.b);
|
|
215
|
+
return `cmyk(${c}, ${m}, ${y}, ${k})`;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The 'real' name of the color -if there is one.
|
|
219
|
+
*/
|
|
220
|
+
toName() {
|
|
221
|
+
if (this.a === 0) return "transparent";
|
|
222
|
+
if (this.a < 1) return false;
|
|
223
|
+
const hex = "#" + (0, conversion_js_1.rgbToHex)(this.r, this.g, this.b, false);
|
|
224
|
+
for (const [key, value] of Object.entries(css_color_names_js_1.names)) if (hex === value) return key;
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
toString(format) {
|
|
228
|
+
const formatSet = Boolean(format);
|
|
229
|
+
format = format ?? this.format;
|
|
230
|
+
let formattedString = false;
|
|
231
|
+
const hasAlpha = this.a < 1 && this.a >= 0;
|
|
232
|
+
if (!formatSet && hasAlpha && (format.startsWith("hex") || format === "name")) {
|
|
233
|
+
if (format === "name" && this.a === 0) return this.toName();
|
|
234
|
+
return this.toRgbString();
|
|
235
|
+
}
|
|
236
|
+
if (format === "rgb") formattedString = this.toRgbString();
|
|
237
|
+
if (format === "prgb") formattedString = this.toPercentageRgbString();
|
|
238
|
+
if (format === "hex" || format === "hex6") formattedString = this.toHexString();
|
|
239
|
+
if (format === "hex3") formattedString = this.toHexString(true);
|
|
240
|
+
if (format === "hex4") formattedString = this.toHex8String(true);
|
|
241
|
+
if (format === "hex8") formattedString = this.toHex8String();
|
|
242
|
+
if (format === "name") formattedString = this.toName();
|
|
243
|
+
if (format === "hsl") formattedString = this.toHslString();
|
|
244
|
+
if (format === "hsv") formattedString = this.toHsvString();
|
|
245
|
+
if (format === "cmyk") formattedString = this.toCmykString();
|
|
246
|
+
return formattedString || this.toHexString();
|
|
247
|
+
}
|
|
248
|
+
toNumber() {
|
|
249
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
250
|
+
}
|
|
251
|
+
clone() {
|
|
252
|
+
return new TinyColor(this.toString());
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Lighten the color a given amount. Providing 100 will always return white.
|
|
256
|
+
* @param amount - valid between 1-100
|
|
257
|
+
*/
|
|
258
|
+
lighten(amount = 10) {
|
|
259
|
+
const hsl = this.toHsl();
|
|
260
|
+
hsl.l += amount / 100;
|
|
261
|
+
hsl.l = (0, util_js_1.clamp01)(hsl.l);
|
|
262
|
+
return new TinyColor(hsl);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Brighten the color a given amount, from 0 to 100.
|
|
266
|
+
* @param amount - valid between 1-100
|
|
267
|
+
*/
|
|
268
|
+
brighten(amount = 10) {
|
|
269
|
+
const rgb = this.toRgb();
|
|
270
|
+
rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
|
|
271
|
+
rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
|
|
272
|
+
rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
|
|
273
|
+
return new TinyColor(rgb);
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Darken the color a given amount, from 0 to 100.
|
|
277
|
+
* Providing 100 will always return black.
|
|
278
|
+
* @param amount - valid between 1-100
|
|
279
|
+
*/
|
|
280
|
+
darken(amount = 10) {
|
|
281
|
+
const hsl = this.toHsl();
|
|
282
|
+
hsl.l -= amount / 100;
|
|
283
|
+
hsl.l = (0, util_js_1.clamp01)(hsl.l);
|
|
284
|
+
return new TinyColor(hsl);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Mix the color with pure white, from 0 to 100.
|
|
288
|
+
* Providing 0 will do nothing, providing 100 will always return white.
|
|
289
|
+
* @param amount - valid between 1-100
|
|
290
|
+
*/
|
|
291
|
+
tint(amount = 10) {
|
|
292
|
+
return this.mix("white", amount);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Mix the color with pure black, from 0 to 100.
|
|
296
|
+
* Providing 0 will do nothing, providing 100 will always return black.
|
|
297
|
+
* @param amount - valid between 1-100
|
|
298
|
+
*/
|
|
299
|
+
shade(amount = 10) {
|
|
300
|
+
return this.mix("black", amount);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Desaturate the color a given amount, from 0 to 100.
|
|
304
|
+
* Providing 100 will is the same as calling greyscale
|
|
305
|
+
* @param amount - valid between 1-100
|
|
306
|
+
*/
|
|
307
|
+
desaturate(amount = 10) {
|
|
308
|
+
const hsl = this.toHsl();
|
|
309
|
+
hsl.s -= amount / 100;
|
|
310
|
+
hsl.s = (0, util_js_1.clamp01)(hsl.s);
|
|
311
|
+
return new TinyColor(hsl);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Saturate the color a given amount, from 0 to 100.
|
|
315
|
+
* @param amount - valid between 1-100
|
|
316
|
+
*/
|
|
317
|
+
saturate(amount = 10) {
|
|
318
|
+
const hsl = this.toHsl();
|
|
319
|
+
hsl.s += amount / 100;
|
|
320
|
+
hsl.s = (0, util_js_1.clamp01)(hsl.s);
|
|
321
|
+
return new TinyColor(hsl);
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Completely desaturates a color into greyscale.
|
|
325
|
+
* Same as calling `desaturate(100)`
|
|
326
|
+
*/
|
|
327
|
+
greyscale() {
|
|
328
|
+
return this.desaturate(100);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
332
|
+
* Values outside of this range will be wrapped into this range.
|
|
333
|
+
*/
|
|
334
|
+
spin(amount) {
|
|
335
|
+
const hsl = this.toHsl();
|
|
336
|
+
const hue = (hsl.h + amount) % 360;
|
|
337
|
+
hsl.h = hue < 0 ? 360 + hue : hue;
|
|
338
|
+
return new TinyColor(hsl);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Mix the current color a given amount with another color, from 0 to 100.
|
|
342
|
+
* 0 means no mixing (return current color).
|
|
343
|
+
*/
|
|
344
|
+
mix(color, amount = 50) {
|
|
345
|
+
const rgb1 = this.toRgb();
|
|
346
|
+
const rgb2 = new TinyColor(color).toRgb();
|
|
347
|
+
const p = amount / 100;
|
|
348
|
+
return new TinyColor({
|
|
349
|
+
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
|
350
|
+
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
|
351
|
+
b: (rgb2.b - rgb1.b) * p + rgb1.b,
|
|
352
|
+
a: (rgb2.a - rgb1.a) * p + rgb1.a
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
analogous(results = 6, slices = 30) {
|
|
356
|
+
const hsl = this.toHsl();
|
|
357
|
+
const part = 360 / slices;
|
|
358
|
+
const ret = [this];
|
|
359
|
+
for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
|
|
360
|
+
hsl.h = (hsl.h + part) % 360;
|
|
361
|
+
ret.push(new TinyColor(hsl));
|
|
362
|
+
}
|
|
363
|
+
return ret;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js
|
|
367
|
+
*/
|
|
368
|
+
complement() {
|
|
369
|
+
const hsl = this.toHsl();
|
|
370
|
+
hsl.h = (hsl.h + 180) % 360;
|
|
371
|
+
return new TinyColor(hsl);
|
|
372
|
+
}
|
|
373
|
+
monochromatic(results = 6) {
|
|
374
|
+
const hsv = this.toHsv();
|
|
375
|
+
const { h } = hsv;
|
|
376
|
+
const { s } = hsv;
|
|
377
|
+
let { v } = hsv;
|
|
378
|
+
const res = [];
|
|
379
|
+
const modification = 1 / results;
|
|
380
|
+
while (results--) {
|
|
381
|
+
res.push(new TinyColor({
|
|
382
|
+
h,
|
|
383
|
+
s,
|
|
384
|
+
v
|
|
385
|
+
}));
|
|
386
|
+
v = (v + modification) % 1;
|
|
387
|
+
}
|
|
388
|
+
return res;
|
|
389
|
+
}
|
|
390
|
+
splitcomplement() {
|
|
391
|
+
const hsl = this.toHsl();
|
|
392
|
+
const { h } = hsl;
|
|
393
|
+
return [
|
|
394
|
+
this,
|
|
395
|
+
new TinyColor({
|
|
396
|
+
h: (h + 72) % 360,
|
|
397
|
+
s: hsl.s,
|
|
398
|
+
l: hsl.l
|
|
399
|
+
}),
|
|
400
|
+
new TinyColor({
|
|
401
|
+
h: (h + 216) % 360,
|
|
402
|
+
s: hsl.s,
|
|
403
|
+
l: hsl.l
|
|
404
|
+
})
|
|
405
|
+
];
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Compute how the color would appear on a background
|
|
409
|
+
*/
|
|
410
|
+
onBackground(background) {
|
|
411
|
+
const fg = this.toRgb();
|
|
412
|
+
const bg = new TinyColor(background).toRgb();
|
|
413
|
+
const alpha = fg.a + bg.a * (1 - fg.a);
|
|
414
|
+
return new TinyColor({
|
|
415
|
+
r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
|
|
416
|
+
g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
|
|
417
|
+
b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
|
|
418
|
+
a: alpha
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Alias for `polyad(3)`
|
|
423
|
+
*/
|
|
424
|
+
triad() {
|
|
425
|
+
return this.polyad(3);
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Alias for `polyad(4)`
|
|
429
|
+
*/
|
|
430
|
+
tetrad() {
|
|
431
|
+
return this.polyad(4);
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)
|
|
435
|
+
* monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
|
|
436
|
+
*/
|
|
437
|
+
polyad(n) {
|
|
438
|
+
const hsl = this.toHsl();
|
|
439
|
+
const { h } = hsl;
|
|
440
|
+
const result = [this];
|
|
441
|
+
const increment = 360 / n;
|
|
442
|
+
for (let i = 1; i < n; i++) result.push(new TinyColor({
|
|
443
|
+
h: (h + i * increment) % 360,
|
|
444
|
+
s: hsl.s,
|
|
445
|
+
l: hsl.l
|
|
446
|
+
}));
|
|
447
|
+
return result;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* compare color vs current color
|
|
451
|
+
*/
|
|
452
|
+
equals(color) {
|
|
453
|
+
const comparedColor = new TinyColor(color);
|
|
454
|
+
/**
|
|
455
|
+
* RGB and CMYK do not have the same color gamut, so a CMYK conversion will never be 100%.
|
|
456
|
+
* This means we need to compare CMYK to CMYK to ensure accuracy of the equals function.
|
|
457
|
+
*/
|
|
458
|
+
if (this.format === "cmyk" || comparedColor.format === "cmyk") return this.toCmykString() === comparedColor.toCmykString();
|
|
459
|
+
return this.toRgbString() === comparedColor.toRgbString();
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
}));
|
|
463
|
+
//#endregion
|
|
464
|
+
Object.defineProperty(exports, "default", {
|
|
465
|
+
enumerable: true,
|
|
466
|
+
get: function() {
|
|
467
|
+
return require_dist();
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
//# sourceMappingURL=index.js.map
|
package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TinyColor = void 0;\nconst conversion_js_1 = require(\"./conversion.js\");\nconst css_color_names_js_1 = require(\"./css-color-names.js\");\nconst format_input_js_1 = require(\"./format-input.js\");\nconst util_js_1 = require(\"./util.js\");\nclass TinyColor {\n constructor(color = '', opts = {}) {\n // If input is already a tinycolor, return itself\n if (color instanceof TinyColor) {\n // eslint-disable-next-line no-constructor-return\n return color;\n }\n if (typeof color === 'number') {\n color = (0, conversion_js_1.numberInputToObject)(color);\n }\n this.originalInput = color;\n const rgb = (0, format_input_js_1.inputToRGB)(color);\n this.originalInput = color;\n this.r = rgb.r;\n this.g = rgb.g;\n this.b = rgb.b;\n this.a = rgb.a;\n this.roundA = Math.round(100 * this.a) / 100;\n this.format = opts.format ?? rgb.format;\n this.gradientType = opts.gradientType;\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this.r < 1) {\n this.r = Math.round(this.r);\n }\n if (this.g < 1) {\n this.g = Math.round(this.g);\n }\n if (this.b < 1) {\n this.b = Math.round(this.b);\n }\n this.isValid = rgb.ok;\n }\n isDark() {\n return this.getBrightness() < 128;\n }\n isLight() {\n return !this.isDark();\n }\n /**\n * Returns the perceived brightness of the color, from 0-255.\n */\n getBrightness() {\n // http://www.w3.org/TR/AERT#color-contrast\n const rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n }\n /**\n * Returns the perceived luminance of a color, from 0-1.\n */\n getLuminance() {\n // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n const rgb = this.toRgb();\n let R;\n let G;\n let B;\n const RsRGB = rgb.r / 255;\n const GsRGB = rgb.g / 255;\n const BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) {\n R = RsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n }\n if (GsRGB <= 0.03928) {\n G = GsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n }\n if (BsRGB <= 0.03928) {\n B = BsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n }\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n }\n /**\n * Returns the alpha value of a color, from 0-1.\n */\n getAlpha() {\n return this.a;\n }\n /**\n * Sets the alpha value on the current color.\n *\n * @param alpha - The new alpha value. The accepted range is 0-1.\n */\n setAlpha(alpha) {\n this.a = (0, util_js_1.boundAlpha)(alpha);\n this.roundA = Math.round(100 * this.a) / 100;\n return this;\n }\n /**\n * Returns whether the color is monochrome.\n */\n isMonochrome() {\n const { s } = this.toHsl();\n return s === 0;\n }\n /**\n * Returns the object as a HSVA object.\n */\n toHsv() {\n const hsv = (0, conversion_js_1.rgbToHsv)(this.r, this.g, this.b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };\n }\n /**\n * Returns the hsva values interpolated into a string with the following format:\n * \"hsva(xxx, xxx, xxx, xx)\".\n */\n toHsvString() {\n const hsv = (0, conversion_js_1.rgbToHsv)(this.r, this.g, this.b);\n const h = Math.round(hsv.h * 360);\n const s = Math.round(hsv.s * 100);\n const v = Math.round(hsv.v * 100);\n return this.a === 1 ? `hsv(${h}, ${s}%, ${v}%)` : `hsva(${h}, ${s}%, ${v}%, ${this.roundA})`;\n }\n /**\n * Returns the object as a HSLA object.\n */\n toHsl() {\n const hsl = (0, conversion_js_1.rgbToHsl)(this.r, this.g, this.b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };\n }\n /**\n * Returns the hsla values interpolated into a string with the following format:\n * \"hsla(xxx, xxx, xxx, xx)\".\n */\n toHslString() {\n const hsl = (0, conversion_js_1.rgbToHsl)(this.r, this.g, this.b);\n const h = Math.round(hsl.h * 360);\n const s = Math.round(hsl.s * 100);\n const l = Math.round(hsl.l * 100);\n return this.a === 1 ? `hsl(${h}, ${s}%, ${l}%)` : `hsla(${h}, ${s}%, ${l}%, ${this.roundA})`;\n }\n /**\n * Returns the hex value of the color.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n toHex(allow3Char = false) {\n return (0, conversion_js_1.rgbToHex)(this.r, this.g, this.b, allow3Char);\n }\n /**\n * Returns the hex value of the color -with a # prefixed.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n toHexString(allow3Char = false) {\n return '#' + this.toHex(allow3Char);\n }\n /**\n * Returns the hex 8 value of the color.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n toHex8(allow4Char = false) {\n return (0, conversion_js_1.rgbaToHex)(this.r, this.g, this.b, this.a, allow4Char);\n }\n /**\n * Returns the hex 8 value of the color -with a # prefixed.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n toHex8String(allow4Char = false) {\n return '#' + this.toHex8(allow4Char);\n }\n /**\n * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.\n * @param allowShortChar will shorten hex value to 3 or 4 char if possible\n */\n toHexShortString(allowShortChar = false) {\n return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);\n }\n /**\n * Returns the object as a RGBA object.\n */\n toRgb() {\n return {\n r: Math.round(this.r),\n g: Math.round(this.g),\n b: Math.round(this.b),\n a: this.a,\n };\n }\n /**\n * Returns the RGBA values interpolated into a string with the following format:\n * \"RGBA(xxx, xxx, xxx, xx)\".\n */\n toRgbString() {\n const r = Math.round(this.r);\n const g = Math.round(this.g);\n const b = Math.round(this.b);\n return this.a === 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${this.roundA})`;\n }\n /**\n * Returns the object as a RGBA object.\n */\n toPercentageRgb() {\n const fmt = (x) => `${Math.round((0, util_js_1.bound01)(x, 255) * 100)}%`;\n return {\n r: fmt(this.r),\n g: fmt(this.g),\n b: fmt(this.b),\n a: this.a,\n };\n }\n /**\n * Returns the RGBA relative values interpolated into a string\n */\n toPercentageRgbString() {\n const rnd = (x) => Math.round((0, util_js_1.bound01)(x, 255) * 100);\n return this.a === 1\n ? `rgb(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%)`\n : `rgba(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%, ${this.roundA})`;\n }\n toCmyk() {\n return {\n ...(0, conversion_js_1.rgbToCmyk)(this.r, this.g, this.b),\n };\n }\n toCmykString() {\n const { c, m, y, k } = (0, conversion_js_1.rgbToCmyk)(this.r, this.g, this.b);\n return `cmyk(${c}, ${m}, ${y}, ${k})`;\n }\n /**\n * The 'real' name of the color -if there is one.\n */\n toName() {\n if (this.a === 0) {\n return 'transparent';\n }\n if (this.a < 1) {\n return false;\n }\n const hex = '#' + (0, conversion_js_1.rgbToHex)(this.r, this.g, this.b, false);\n for (const [key, value] of Object.entries(css_color_names_js_1.names)) {\n if (hex === value) {\n return key;\n }\n }\n return false;\n }\n toString(format) {\n const formatSet = Boolean(format);\n format = format ?? this.format;\n let formattedString = false;\n const hasAlpha = this.a < 1 && this.a >= 0;\n const needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this.a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n if (format === 'cmyk') {\n formattedString = this.toCmykString();\n }\n return formattedString || this.toHexString();\n }\n toNumber() {\n return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n }\n clone() {\n return new TinyColor(this.toString());\n }\n /**\n * Lighten the color a given amount. Providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n lighten(amount = 10) {\n const hsl = this.toHsl();\n hsl.l += amount / 100;\n hsl.l = (0, util_js_1.clamp01)(hsl.l);\n return new TinyColor(hsl);\n }\n /**\n * Brighten the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n brighten(amount = 10) {\n const rgb = this.toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return new TinyColor(rgb);\n }\n /**\n * Darken the color a given amount, from 0 to 100.\n * Providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n darken(amount = 10) {\n const hsl = this.toHsl();\n hsl.l -= amount / 100;\n hsl.l = (0, util_js_1.clamp01)(hsl.l);\n return new TinyColor(hsl);\n }\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n tint(amount = 10) {\n return this.mix('white', amount);\n }\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n shade(amount = 10) {\n return this.mix('black', amount);\n }\n /**\n * Desaturate the color a given amount, from 0 to 100.\n * Providing 100 will is the same as calling greyscale\n * @param amount - valid between 1-100\n */\n desaturate(amount = 10) {\n const hsl = this.toHsl();\n hsl.s -= amount / 100;\n hsl.s = (0, util_js_1.clamp01)(hsl.s);\n return new TinyColor(hsl);\n }\n /**\n * Saturate the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n saturate(amount = 10) {\n const hsl = this.toHsl();\n hsl.s += amount / 100;\n hsl.s = (0, util_js_1.clamp01)(hsl.s);\n return new TinyColor(hsl);\n }\n /**\n * Completely desaturates a color into greyscale.\n * Same as calling `desaturate(100)`\n */\n greyscale() {\n return this.desaturate(100);\n }\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n spin(amount) {\n const hsl = this.toHsl();\n const hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return new TinyColor(hsl);\n }\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n mix(color, amount = 50) {\n const rgb1 = this.toRgb();\n const rgb2 = new TinyColor(color).toRgb();\n const p = amount / 100;\n const rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a,\n };\n return new TinyColor(rgba);\n }\n analogous(results = 6, slices = 30) {\n const hsl = this.toHsl();\n const part = 360 / slices;\n const ret = [this];\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(new TinyColor(hsl));\n }\n return ret;\n }\n /**\n * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n */\n complement() {\n const hsl = this.toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return new TinyColor(hsl);\n }\n monochromatic(results = 6) {\n const hsv = this.toHsv();\n const { h } = hsv;\n const { s } = hsv;\n let { v } = hsv;\n const res = [];\n const modification = 1 / results;\n while (results--) {\n res.push(new TinyColor({ h, s, v }));\n v = (v + modification) % 1;\n }\n return res;\n }\n splitcomplement() {\n const hsl = this.toHsl();\n const { h } = hsl;\n return [\n this,\n new TinyColor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n new TinyColor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n ];\n }\n /**\n * Compute how the color would appear on a background\n */\n onBackground(background) {\n const fg = this.toRgb();\n const bg = new TinyColor(background).toRgb();\n const alpha = fg.a + bg.a * (1 - fg.a);\n return new TinyColor({\n r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,\n g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,\n b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,\n a: alpha,\n });\n }\n /**\n * Alias for `polyad(3)`\n */\n triad() {\n return this.polyad(3);\n }\n /**\n * Alias for `polyad(4)`\n */\n tetrad() {\n return this.polyad(4);\n }\n /**\n * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n */\n polyad(n) {\n const hsl = this.toHsl();\n const { h } = hsl;\n const result = [this];\n const increment = 360 / n;\n for (let i = 1; i < n; i++) {\n result.push(new TinyColor({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));\n }\n return result;\n }\n /**\n * compare color vs current color\n */\n equals(color) {\n const comparedColor = new TinyColor(color);\n /**\n * RGB and CMYK do not have the same color gamut, so a CMYK conversion will never be 100%.\n * This means we need to compare CMYK to CMYK to ensure accuracy of the equals function.\n */\n if (this.format === 'cmyk' || comparedColor.format === 'cmyk') {\n return this.toCmykString() === comparedColor.toCmykString();\n }\n return this.toRgbString() === comparedColor.toRgbString();\n }\n}\nexports.TinyColor = TinyColor;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,YAAY,KAAK;CACzB,MAAM,kBAAA,qBAAA;CACN,MAAM,uBAAA,0BAAA;CACN,MAAM,oBAAA,uBAAA;CACN,MAAM,YAAA,eAAA;CAifN,QAAQ,YAAY,MAhfd,UAAU;EACZ,YAAY,QAAQ,IAAI,OAAO,CAAC,GAAG;GAE/B,IAAI,iBAAiB,WAEjB,OAAO;GAEX,IAAI,OAAO,UAAU,UACjB,SAAS,GAAG,gBAAgB,oBAAA,CAAqB,KAAK;GAE1D,KAAK,gBAAgB;GACrB,MAAM,OAAO,GAAG,kBAAkB,WAAA,CAAY,KAAK;GACnD,KAAK,gBAAgB;GACrB,KAAK,IAAI,IAAI;GACb,KAAK,IAAI,IAAI;GACb,KAAK,IAAI,IAAI;GACb,KAAK,IAAI,IAAI;GACb,KAAK,SAAS,KAAK,MAAM,MAAM,KAAK,CAAC,IAAI;GACzC,KAAK,SAAS,KAAK,UAAU,IAAI;GACjC,KAAK,eAAe,KAAK;GAKzB,IAAI,KAAK,IAAI,GACT,KAAK,IAAI,KAAK,M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G,MAAM;IAC9C,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,IAAI,GAAG,MAAM;IAC9C,GAAG;GACP,CAAC;EACL;;;;EAIA,QAAQ;GACJ,OAAO,KAAK,OAAO,CAAC;EACxB;;;;EAIA,SAAS;GACL,OAAO,KAAK,OAAO,CAAC;EACxB;;;;;EAKA,OAAO,GAAG;GACN,MAAM,MAAM,KAAK,MAAM;GACvB,MAAM,EAAE,MAAM;GACd,MAAM,SAAS,CAAC,IAAI;GACpB,MAAM,YAAY,MAAM;GACxB,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KACnB,OAAO,KAAK,IAAI,UAAU;IAAE,IAAI,IAAI,IAAI,aAAa;IAAK,GAAG,IAAI;IAAG,GAAG,IAAI;GAAE,CAAC,CAAC;GAEnF,OAAO;EACX;;;;EAIA,OAAO,OAAO;GACV,MAAM,gBAAgB,IAAI,UAAU,KAAK;;;;;GAKzC,IAAI,KAAK,WAAW,UAAU,cAAc,WAAW,QACnD,OAAO,KAAK,aAAa,MAAM,cAAc,aAAa;GAE9D,OAAO,KAAK,YAAY,MAAM,cAAc,YAAY;EAC5D;CACJ"}
|
package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js
|
|
3
|
+
var require_interfaces = /* @__PURE__ */ require("../../../../../../../_virtual/_rolldown/runtime.js").__commonJSMin(((exports) => {
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function() {
|
|
10
|
+
return require_interfaces();
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"x_google_ignoreList":[0],"mappings":";;;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC"}
|
package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_conversion$1 = require("./conversion.js");
|
|
4
|
+
const require_css_color_names$1 = require("./css-color-names.js");
|
|
5
|
+
const require_format_input$1 = require("./format-input.js");
|
|
6
|
+
const require_index = require("./index.js");
|
|
7
|
+
const require_readability$1 = require("./readability.js");
|
|
8
|
+
const require_to_ms_filter$1 = require("./to-ms-filter.js");
|
|
9
|
+
const require_from_ratio$1 = require("./from-ratio.js");
|
|
10
|
+
const require_random$1 = require("./random.js");
|
|
11
|
+
const require_interfaces$1 = require("./interfaces.js");
|
|
12
|
+
//#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js
|
|
13
|
+
var require_public_api = /* @__PURE__ */ require_runtime.__commonJSMin(((exports) => {
|
|
14
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === void 0) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return m[k];
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === void 0) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
__exportStar(require_index.default, exports);
|
|
33
|
+
__exportStar(require_css_color_names$1.default, exports);
|
|
34
|
+
__exportStar(require_readability$1.default, exports);
|
|
35
|
+
__exportStar(require_to_ms_filter$1.default, exports);
|
|
36
|
+
__exportStar(require_from_ratio$1.default, exports);
|
|
37
|
+
__exportStar(require_format_input$1.default, exports);
|
|
38
|
+
__exportStar(require_random$1.default, exports);
|
|
39
|
+
__exportStar(require_interfaces$1.default, exports);
|
|
40
|
+
__exportStar(require_conversion$1.default, exports);
|
|
41
|
+
}));
|
|
42
|
+
//#endregion
|
|
43
|
+
Object.defineProperty(exports, "default", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function() {
|
|
46
|
+
return require_public_api();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=public_api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public_api.js","names":["exports"],"sources":["../../../../../../../../../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./index.js\"), exports);\n__exportStar(require(\"./css-color-names.js\"), exports);\n__exportStar(require(\"./readability.js\"), exports);\n__exportStar(require(\"./to-ms-filter.js\"), exports);\n__exportStar(require(\"./from-ratio.js\"), exports);\n__exportStar(require(\"./format-input.js\"), exports);\n__exportStar(require(\"./random.js\"), exports);\n__exportStar(require(\"./interfaces.js\"), exports);\n__exportStar(require(\"./conversion.js\"), exports);\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;CACA,IAAI,kBAAA,WAAA,QAAgC,oBAAqB,OAAO,UAAU,SAAS,GAAG,GAAG,GAAG,IAAI;EAC5F,IAAI,OAAO,KAAA,GAAW,KAAK;EAC3B,IAAI,OAAO,OAAO,yBAAyB,GAAG,CAAC;EAC/C,IAAI,CAAC,SAAS,SAAS,OAAO,CAAC,EAAE,aAAa,KAAK,YAAY,KAAK,eAClE,OAAO;GAAE,YAAY;GAAM,KAAK,WAAW;IAAE,OAAO,EAAE;GAAI;EAAE;EAE9D,OAAO,eAAe,GAAG,IAAI,IAAI;CACrC,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI;EACxB,IAAI,OAAO,KAAA,GAAW,KAAK;EAC3B,EAAE,MAAM,EAAE;CACd;CACA,IAAI,eAAA,WAAA,QAA6B,gBAAiB,SAAS,GAAG,WAAS;EACnE,KAAK,IAAI,KAAK,GAAG,IAAI,MAAM,aAAa,CAAC,OAAO,UAAU,eAAe,KAAKA,WAAS,CAAC,GAAG,gBAAgBA,WAAS,GAAG,CAAC;CAC5H;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,aAAA,cAAA,SAAoC,OAAO;CAC3C,aAAA,0BAAA,SAA8C,OAAO;CACrD,aAAA,sBAAA,SAA0C,OAAO;CACjD,aAAA,uBAAA,SAA2C,OAAO;CAClD,aAAA,qBAAA,SAAyC,OAAO;CAChD,aAAA,uBAAA,SAA2C,OAAO;CAClD,aAAA,iBAAA,SAAqC,OAAO;CAC5C,aAAA,qBAAA,SAAyC,OAAO;CAChD,aAAA,qBAAA,SAAyC,OAAO"}
|