katanakit-js 6.2.0 → 6.6.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/README.md +11 -3
- package/dist/adapters/better-auth/better-auth.service.d.ts +83 -0
- package/dist/adapters/better-auth/better-auth.service.d.ts.map +1 -0
- package/dist/adapters/better-auth/better-auth.service.js +110 -0
- package/dist/adapters/better-auth/better-auth.service.js.map +1 -0
- package/dist/adapters/better-auth/client.d.ts +51 -0
- package/dist/adapters/better-auth/client.d.ts.map +1 -0
- package/dist/adapters/better-auth/client.js +67 -0
- package/dist/adapters/better-auth/client.js.map +1 -0
- package/dist/adapters/better-auth/index.d.ts +3 -0
- package/dist/adapters/better-auth/index.d.ts.map +1 -0
- package/dist/adapters/better-auth/index.js +3 -0
- package/dist/adapters/better-auth/index.js.map +1 -0
- package/dist/adapters/express/server.d.ts +133 -1
- package/dist/adapters/express/server.d.ts.map +1 -1
- package/dist/adapters/express/server.js +199 -97
- package/dist/adapters/express/server.js.map +1 -1
- package/dist/adapters/index.d.ts +2 -0
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +2 -0
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/insforge/insforge.service.d.ts +139 -4
- package/dist/adapters/insforge/insforge.service.d.ts.map +1 -1
- package/dist/adapters/insforge/insforge.service.js +383 -213
- package/dist/adapters/insforge/insforge.service.js.map +1 -1
- package/dist/adapters/notion/notion.service.d.ts +130 -144
- package/dist/adapters/notion/notion.service.d.ts.map +1 -1
- package/dist/adapters/notion/notion.service.js +330 -341
- package/dist/adapters/notion/notion.service.js.map +1 -1
- package/dist/adapters/photoswipe/index.d.ts +2 -0
- package/dist/adapters/photoswipe/index.d.ts.map +1 -0
- package/dist/adapters/photoswipe/index.js +2 -0
- package/dist/adapters/photoswipe/index.js.map +1 -0
- package/dist/adapters/photoswipe/photoswipe.service.d.ts +99 -0
- package/dist/adapters/photoswipe/photoswipe.service.d.ts.map +1 -0
- package/dist/adapters/photoswipe/photoswipe.service.js +150 -0
- package/dist/adapters/photoswipe/photoswipe.service.js.map +1 -0
- package/dist/adapters/telegram/telegram.service.d.ts +82 -13
- package/dist/adapters/telegram/telegram.service.d.ts.map +1 -1
- package/dist/adapters/telegram/telegram.service.js +133 -55
- package/dist/adapters/telegram/telegram.service.js.map +1 -1
- package/dist/adapters/wordpress/wordpress.service.d.ts +181 -110
- package/dist/adapters/wordpress/wordpress.service.d.ts.map +1 -1
- package/dist/adapters/wordpress/wordpress.service.js +556 -465
- package/dist/adapters/wordpress/wordpress.service.js.map +1 -1
- package/dist/config/seo.service.d.ts +1 -1
- package/dist/config/seo.service.d.ts.map +1 -1
- package/dist/config/seo.service.js +1 -1
- package/dist/config/seo.service.js.map +1 -1
- package/dist/core/services/access.service.d.ts +167 -4
- package/dist/core/services/access.service.d.ts.map +1 -1
- package/dist/core/services/access.service.js +241 -31
- package/dist/core/services/access.service.js.map +1 -1
- package/dist/core/services/agent.service.d.ts +182 -27
- package/dist/core/services/agent.service.d.ts.map +1 -1
- package/dist/core/services/agent.service.js +296 -164
- package/dist/core/services/agent.service.js.map +1 -1
- package/dist/core/services/assistant.service.d.ts +96 -5
- package/dist/core/services/assistant.service.d.ts.map +1 -1
- package/dist/core/services/assistant.service.js +171 -66
- package/dist/core/services/assistant.service.js.map +1 -1
- package/dist/core/services/dates.service.d.ts +183 -11
- package/dist/core/services/dates.service.d.ts.map +1 -1
- package/dist/core/services/dates.service.js +256 -57
- package/dist/core/services/dates.service.js.map +1 -1
- package/dist/core/services/http.service.d.ts +172 -133
- package/dist/core/services/http.service.d.ts.map +1 -1
- package/dist/core/services/http.service.js +367 -310
- package/dist/core/services/http.service.js.map +1 -1
- package/dist/core/services/logger.service.d.ts +96 -34
- package/dist/core/services/logger.service.d.ts.map +1 -1
- package/dist/core/services/logger.service.js +128 -41
- package/dist/core/services/logger.service.js.map +1 -1
- package/dist/core/services/query.service.d.ts +101 -0
- package/dist/core/services/query.service.d.ts.map +1 -1
- package/dist/core/services/query.service.js +131 -14
- package/dist/core/services/query.service.js.map +1 -1
- package/dist/core/services/utils.service.d.ts +286 -131
- package/dist/core/services/utils.service.d.ts.map +1 -1
- package/dist/core/services/utils.service.js +417 -227
- package/dist/core/services/utils.service.js.map +1 -1
- package/dist/core/services/validation.service.d.ts +48 -3
- package/dist/core/services/validation.service.d.ts.map +1 -1
- package/dist/core/services/validation.service.js +75 -23
- package/dist/core/services/validation.service.js.map +1 -1
- package/dist/infrastructure/decorators/cache.decorator.d.ts +53 -0
- package/dist/infrastructure/decorators/cache.decorator.d.ts.map +1 -0
- package/dist/infrastructure/decorators/cache.decorator.js +47 -0
- package/dist/infrastructure/decorators/cache.decorator.js.map +1 -0
- package/dist/infrastructure/decorators/index.d.ts +4 -0
- package/dist/infrastructure/decorators/index.d.ts.map +1 -0
- package/dist/infrastructure/decorators/index.js +4 -0
- package/dist/infrastructure/decorators/index.js.map +1 -0
- package/dist/infrastructure/decorators/logger.decorator.d.ts +38 -0
- package/dist/infrastructure/decorators/logger.decorator.d.ts.map +1 -0
- package/dist/infrastructure/decorators/logger.decorator.js +66 -0
- package/dist/infrastructure/decorators/logger.decorator.js.map +1 -0
- package/dist/infrastructure/decorators/retry.decorator.d.ts +37 -0
- package/dist/infrastructure/decorators/retry.decorator.d.ts.map +1 -0
- package/dist/infrastructure/decorators/retry.decorator.js +54 -0
- package/dist/infrastructure/decorators/retry.decorator.js.map +1 -0
- package/dist/infrastructure/index.d.ts +1 -0
- package/dist/infrastructure/index.d.ts.map +1 -1
- package/dist/infrastructure/index.js +1 -0
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/styles.css +2 -0
- package/package.json +49 -14
- package/scss/_flags.scss +179 -0
- package/scss/_functions.scss +168 -0
- package/scss/_mixins.scss +658 -0
- package/scss/_reset.scss +275 -0
- package/scss/_utilities.scss +449 -0
- package/scss/_variables.scss +539 -0
- package/scss/components/_index.scss +50 -0
- package/scss/demo.scss +12 -0
- package/scss/main.scss +56 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// _functions.scss
|
|
3
|
+
// Pure Sass functions: unit conversion, color manipulation and
|
|
4
|
+
// fluid typography. They emit no CSS by themselves — use them
|
|
5
|
+
// inside your own rules or mixins.
|
|
6
|
+
// ============================================================
|
|
7
|
+
@use "sass:math";
|
|
8
|
+
@use "sass:color";
|
|
9
|
+
@use "sass:meta";
|
|
10
|
+
@use "sass:string";
|
|
11
|
+
@use "sass:list";
|
|
12
|
+
|
|
13
|
+
// Root font-size. Must match the --root-font-size you set in the reset
|
|
14
|
+
// (62.5% → 10px on 16px browsers). This makes 1rem = 10px, so rem()
|
|
15
|
+
// and px() produce values where rem ≈ px.
|
|
16
|
+
// Override before importing this module (!default semantics).
|
|
17
|
+
$base-font-size: 10px !default;
|
|
18
|
+
|
|
19
|
+
// ============================================================
|
|
20
|
+
// PRIVATE HELPERS
|
|
21
|
+
// ============================================================
|
|
22
|
+
|
|
23
|
+
// Recursively replaces every occurrence of $search inside $string.
|
|
24
|
+
// Used by to-class() to escape CSS selectors.
|
|
25
|
+
@function _str-replace($string, $search, $replace: "") {
|
|
26
|
+
$index: string.index($string, $search);
|
|
27
|
+
@if not $index { @return $string; }
|
|
28
|
+
@return string.slice($string, 1, $index - 1) + $replace +
|
|
29
|
+
_str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ============================================================
|
|
33
|
+
// UNIT CONVERSION
|
|
34
|
+
// Convert between px, rem and other CSS units.
|
|
35
|
+
// All conversions respect $base-font-size (default 10px).
|
|
36
|
+
// ============================================================
|
|
37
|
+
|
|
38
|
+
// Convert a px value to rem. Accepts unitless numbers (treated as px)
|
|
39
|
+
// or values with a px unit.
|
|
40
|
+
// Example: f.rem(16px) → 1.6rem (16 / 10).
|
|
41
|
+
@function rem($size) {
|
|
42
|
+
@if meta.type-of($size) != "number" {
|
|
43
|
+
@error "rem(): se esperaba un número, recibió #{meta.inspect($size)}.";
|
|
44
|
+
}
|
|
45
|
+
$px: if(sass(math.is-unitless($size)): $size; else: math.div($size, 1px));
|
|
46
|
+
$base: math.div($base-font-size, 1px);
|
|
47
|
+
@return math.div($px, $base) * 1rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Convert a rem value to px. Unitless numbers are treated as rem.
|
|
51
|
+
// Example: f.px(1.6rem) → 16px (1.6 * 10).
|
|
52
|
+
@function px($size) {
|
|
53
|
+
@if meta.type-of($size) != "number" {
|
|
54
|
+
@error "px(): se esperaba un número, recibió #{meta.inspect($size)}.";
|
|
55
|
+
}
|
|
56
|
+
$num: if(sass(math.is-unitless($size)): $size; else: math.div($size, 1rem));
|
|
57
|
+
$base: math.div($base-font-size, 1px);
|
|
58
|
+
@return $num * $base * 1px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Append a unit to a unitless number (values that already have a
|
|
62
|
+
// unit are returned unchanged). Valid units: rem, px, em, %.
|
|
63
|
+
// Example: f.to-unit(4, "rem") → 4rem.
|
|
64
|
+
@function to-unit($value, $unit: "rem") {
|
|
65
|
+
@if meta.type-of($value) != "number" {
|
|
66
|
+
@error "to-unit(): se esperaba un número, recibió #{meta.inspect($value)}.";
|
|
67
|
+
}
|
|
68
|
+
@if not math.is-unitless($value) { @return $value; }
|
|
69
|
+
$valid: ("rem", "px", "em", "%");
|
|
70
|
+
@if not list.index($valid, $unit) {
|
|
71
|
+
@error "to-unit(): unidad '#{$unit}' no válida. Use: rem, px, em, %.";
|
|
72
|
+
}
|
|
73
|
+
@if $unit == "rem" { @return $value * 1rem; }
|
|
74
|
+
@if $unit == "px" { @return $value * 1px; }
|
|
75
|
+
@if $unit == "em" { @return $value * 1em; }
|
|
76
|
+
@if $unit == "%" { @return $value * 1%; }
|
|
77
|
+
@error "to-unit(): caso no cubierto para '#{$unit}'.";
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Remove the unit from a number by dividing by its own unit.
|
|
81
|
+
// Example: f.strip-unit(16px) → 16.
|
|
82
|
+
@function strip-unit($value) {
|
|
83
|
+
@if meta.type-of($value) != "number" { @error "strip-unit(): se esperaba un número."; }
|
|
84
|
+
@return math.div($value, ($value * 0 + 1));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ============================================================
|
|
88
|
+
// FLUID TYPOGRAPHY (clamp)
|
|
89
|
+
// ============================================================
|
|
90
|
+
|
|
91
|
+
// Builds a clamp() value that scales linearly from $min at
|
|
92
|
+
// $min-vw viewport width to $max at $max-vw. Unitless numbers are
|
|
93
|
+
// treated as px. Uses the classic slope/intercept formula:
|
|
94
|
+
// preferred = slope * 100vw ± intercept, clamped between min and max.
|
|
95
|
+
// Example: f.fluid(16, 24) →
|
|
96
|
+
// clamp(16px, 0.5vw + 14.4px, 24px) between 320px and 1920px.
|
|
97
|
+
@function fluid($min, $max, $min-vw: 320px, $max-vw: 1920px) {
|
|
98
|
+
$min-val: if(sass(math.is-unitless($min)): $min * 1px; else: $min);
|
|
99
|
+
$max-val: if(sass(math.is-unitless($max)): $max * 1px; else: $max);
|
|
100
|
+
$vw-min: if(sass(math.is-unitless($min-vw)): $min-vw * 1px; else: $min-vw);
|
|
101
|
+
$vw-max: if(sass(math.is-unitless($max-vw)): $max-vw * 1px; else: $max-vw);
|
|
102
|
+
|
|
103
|
+
$slope: math.div(
|
|
104
|
+
strip-unit($max-val) - strip-unit($min-val),
|
|
105
|
+
strip-unit($vw-max) - strip-unit($vw-min)
|
|
106
|
+
);
|
|
107
|
+
$intercept: strip-unit($min-val) - ($slope * strip-unit($vw-min));
|
|
108
|
+
|
|
109
|
+
$sign: if(sass($intercept >= 0): "+"; else: "-");
|
|
110
|
+
$preferred: #{$slope * 100}vw #{$sign} #{math.abs($intercept)}px;
|
|
111
|
+
|
|
112
|
+
@return clamp(#{$min-val}, #{$preferred}, #{$max-val});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ============================================================
|
|
116
|
+
// COLOR MANIPULATION
|
|
117
|
+
// ============================================================
|
|
118
|
+
|
|
119
|
+
// Mix a color toward white. $amount is a percentage (unitless
|
|
120
|
+
// numbers are treated as %). f.tint($c, 20%) = 20% white + 80% $c.
|
|
121
|
+
@function tint($color, $amount: 10%) {
|
|
122
|
+
@if meta.type-of($color) != "color" { @error "tint(): se esperaba un color."; }
|
|
123
|
+
$pct: if(sass(math.is-unitless($amount)): $amount * 1%; else: $amount);
|
|
124
|
+
@return color.mix(white, $color, $pct);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Mix a color toward black. Inverse of tint().
|
|
128
|
+
@function shade($color, $amount: 10%) {
|
|
129
|
+
@if meta.type-of($color) != "color" { @error "shade(): se esperaba un color."; }
|
|
130
|
+
$pct: if(sass(math.is-unitless($amount)): $amount * 1%; else: $amount);
|
|
131
|
+
@return color.mix(black, $color, $pct);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Scale saturation up/down by $amount percentage points.
|
|
135
|
+
@function saturate-color($color, $amount: 10%) { @return color.scale($color, $saturation: $amount); }
|
|
136
|
+
@function desaturate-color($color, $amount: 10%) { @return color.scale($color, $saturation: -$amount); }
|
|
137
|
+
// Hue-rotate the color by 180° (the complementary color).
|
|
138
|
+
@function complement($color) { @return color.complement($color); }
|
|
139
|
+
|
|
140
|
+
// Returns black or white (or your own pair) depending on which has
|
|
141
|
+
// better contrast against $color, using perceptual luminance weights
|
|
142
|
+
// (0.299/0.587/0.114). Bright colors return $dark, dark ones $light.
|
|
143
|
+
@function contrast($color, $light: white, $dark: black) {
|
|
144
|
+
$brightness: (color.red($color) * 0.299 + color.green($color) * 0.587 + color.blue($color) * 0.114) / 255;
|
|
145
|
+
@return if(sass($brightness > 0.5): $dark; else: $light);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Builds a CSS color-mix() that blends a custom property with
|
|
149
|
+
// another color at runtime. $var-name is accepted with or without
|
|
150
|
+
// the var() wrapper. Example:
|
|
151
|
+
// f.color-mix-var(--purple-500, 20%) →
|
|
152
|
+
// color-mix(in srgb, var(--purple-500) 80%, white).
|
|
153
|
+
@function color-mix-var($var-name, $amount: 10%, $mix-with: white) {
|
|
154
|
+
$name: if(sass(string.index($var-name, "var(") == 1): $var-name; else: "var(#{$var-name})");
|
|
155
|
+
$pct: if(sass(math.is-unitless($amount)): $amount * 1%; else: $amount);
|
|
156
|
+
$color-pct: 100% - $pct;
|
|
157
|
+
@return color-mix(in srgb, #{$name} #{$color-pct}, #{$mix-with});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Escapes characters that are invalid in CSS class selectors
|
|
161
|
+
// ('.', '/', '%') so a token key can be used as a class name.
|
|
162
|
+
@function to-class($key) {
|
|
163
|
+
$str: "#{$key}";
|
|
164
|
+
$str: _str-replace($str, ".", "\\.");
|
|
165
|
+
$str: _str-replace($str, "/", "\\/");
|
|
166
|
+
$str: _str-replace($str, "%", "\\%");
|
|
167
|
+
@return $str;
|
|
168
|
+
}
|