@mlut/core 2.3.0 → 2.4.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/README.md +1 -1
- package/dist/jit/JitEngine.js +1 -2
- package/dist/jit/SassSourcesLoader.js +4 -4
- package/dist/sass/tools/functions/high/utils/_value-transformers.scss +17 -8
- package/dist/sass/tools/settings/base/_utils.scss +2 -1
- package/dist/sass/tools/settings/common/_utils.scss +79 -0
- package/dist/utils/path.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ When using this package, you will need to install Sass separately. We recommend
|
|
|
18
18
|
This allows you to control the versions of all your dependencies, and to choose which Sass implementation to use.
|
|
19
19
|
|
|
20
20
|
## Documentation ##
|
|
21
|
-
Full documentation available [here](https://
|
|
21
|
+
Full documentation available [here](https://docs.mlut.style/)
|
|
22
22
|
|
|
23
23
|
## License ##
|
|
24
24
|
MIT
|
package/dist/jit/JitEngine.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { path } from '../utils/path.js';
|
|
2
2
|
import { logger } from '../utils/index.js';
|
|
3
|
-
const isNode = globalThis.
|
|
3
|
+
const isNode = globalThis.window?.document === undefined;
|
|
4
4
|
const isTestEnv = globalThis.process?.env?.NODE_ENV === 'test';
|
|
5
5
|
const sass = await import('sass-embedded')
|
|
6
6
|
.catch(() => import('sass'))
|
|
7
|
-
.catch(() => import('https://jspm.dev/sass'))
|
|
8
7
|
.catch(() => {
|
|
9
8
|
throw new Error('The Sass package is not installed. You can do this with `npm i -D sass-embedded`');
|
|
10
9
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const retryPromise = import('
|
|
2
|
-
.catch(() => import('
|
|
1
|
+
const retryPromise = import('@octokit/plugin-retry')
|
|
2
|
+
.catch(() => import('https://esm.sh/@octokit/plugin-retry'))
|
|
3
3
|
.then((r) => r.retry);
|
|
4
|
-
const octokit = await import('
|
|
5
|
-
.catch(() => import('
|
|
4
|
+
const octokit = await import('@octokit/rest')
|
|
5
|
+
.catch(() => import('https://esm.sh/@octokit/rest'))
|
|
6
6
|
.then(async (r) => {
|
|
7
7
|
const retry = await retryPromise;
|
|
8
8
|
const ctr = r.Octokit.plugin(retry);
|
|
@@ -22,20 +22,29 @@ $-directions: map.values(ml.$main-directions);
|
|
|
22
22
|
|
|
23
23
|
@function gradient($values, $data: ()) {
|
|
24
24
|
$first-list: list.nth($values, 1);
|
|
25
|
+
$first-item: list.nth($first-list, 1);
|
|
26
|
+
$css-fn-name: map.get(
|
|
27
|
+
ml.$utils-db, 'utils', 'registry', map.get($data, 'name'), 'css-function'
|
|
28
|
+
);
|
|
25
29
|
|
|
26
|
-
@if
|
|
30
|
+
@if (
|
|
31
|
+
list.index($-directions, $first-item) and
|
|
32
|
+
string.index($css-fn-name, 'linear')
|
|
33
|
+
) {
|
|
27
34
|
$first-list: list.join(to, $first-list);
|
|
35
|
+
} @else if string.index($css-fn-name, 'conic') {
|
|
36
|
+
$is-first-item-calc:
|
|
37
|
+
meta.type-of($first-item) == 'string' and string.index($first-item, 'calc(');
|
|
38
|
+
|
|
39
|
+
@if (meta.type-of($first-item) == 'number' or $is-first-item-calc) {
|
|
40
|
+
$first-list: list.join(from, $first-list);
|
|
41
|
+
}
|
|
28
42
|
}
|
|
29
43
|
|
|
30
44
|
@return meta.call(
|
|
31
45
|
// TODO: add cache with frequently used CSS functions
|
|
32
|
-
meta.get-function(
|
|
33
|
-
|
|
34
|
-
ml.$utils-db, 'utils', 'registry', map.get($data, 'name'), 'css-function'
|
|
35
|
-
),
|
|
36
|
-
true
|
|
37
|
-
),
|
|
38
|
-
list.set-nth($values, 1, $first-list)
|
|
46
|
+
meta.get-function($css-fn-name, true),
|
|
47
|
+
list.set-nth($values, 1, $first-list),
|
|
39
48
|
);
|
|
40
49
|
}
|
|
41
50
|
|
|
@@ -321,7 +321,8 @@
|
|
|
321
321
|
// Usage:
|
|
322
322
|
// ```scss
|
|
323
323
|
// @debug ml.uv('-Gdrl-b;r,black,#ff0'); // repeating-linear-gradient(to bottom right, black, #ff0)
|
|
324
|
-
// @debug ml.uv('-Gdl-50d,blue;3r,cc;80p'); // linear-gradient(50deg, blue 3rem, currentColor 80%)
|
|
324
|
+
// @debug ml.uv('-Gdl-50d,blue;3r,cc;80p'); // linear-gradient(-50deg, blue 3rem, currentColor 80%)
|
|
325
|
+
// @debug ml.uv('-Gdc45d,#000;0.5g,yellow'); // conic-gradient(from 45deg, #000 0.5grad, yellow)
|
|
325
326
|
// ```
|
|
326
327
|
//
|
|
327
328
|
// Styleguide: settings.utils.config.conversion.gradient
|
|
@@ -815,6 +815,62 @@ $utils-db: (
|
|
|
815
815
|
'multi-list-separator': ml.$tULs1,
|
|
816
816
|
'keywords': ('position', 'gradients'),
|
|
817
817
|
),
|
|
818
|
+
'-Gdrd': (
|
|
819
|
+
'properties': background-image,
|
|
820
|
+
'transformer': 'gradient',
|
|
821
|
+
'css-function': 'radial-gradient',
|
|
822
|
+
'conversion': 'gradient',
|
|
823
|
+
'multi-list-separator': ml.$tULs1,
|
|
824
|
+
'keywords': (
|
|
825
|
+
'position',
|
|
826
|
+
'radial-shape',
|
|
827
|
+
'ray-size',
|
|
828
|
+
'color-space',
|
|
829
|
+
'hue-interpolation',
|
|
830
|
+
'gradients',
|
|
831
|
+
),
|
|
832
|
+
),
|
|
833
|
+
'-Gdrr': (
|
|
834
|
+
'properties': background-image,
|
|
835
|
+
'transformer': 'gradient',
|
|
836
|
+
'conversion': 'gradient',
|
|
837
|
+
'css-function': 'repeating-radial-gradient',
|
|
838
|
+
'multi-list-separator': ml.$tULs1,
|
|
839
|
+
'keywords': (
|
|
840
|
+
'position',
|
|
841
|
+
'radial-shape',
|
|
842
|
+
'ray-size',
|
|
843
|
+
'color-space',
|
|
844
|
+
'hue-interpolation',
|
|
845
|
+
'gradients',
|
|
846
|
+
),
|
|
847
|
+
),
|
|
848
|
+
'-Gdc': (
|
|
849
|
+
'properties': background-image,
|
|
850
|
+
'transformer': 'gradient',
|
|
851
|
+
'css-function': 'conic-gradient',
|
|
852
|
+
'conversion': 'gradient',
|
|
853
|
+
'multi-list-separator': ml.$tULs1,
|
|
854
|
+
'keywords': (
|
|
855
|
+
'position',
|
|
856
|
+
'color-space',
|
|
857
|
+
'hue-interpolation',
|
|
858
|
+
'gradients',
|
|
859
|
+
),
|
|
860
|
+
),
|
|
861
|
+
'-Gdrc': (
|
|
862
|
+
'properties': background-image,
|
|
863
|
+
'transformer': 'gradient',
|
|
864
|
+
'css-function': 'repeating-conic-gradient',
|
|
865
|
+
'conversion': 'gradient',
|
|
866
|
+
'multi-list-separator': ml.$tULs1,
|
|
867
|
+
'keywords': (
|
|
868
|
+
'position',
|
|
869
|
+
'color-space',
|
|
870
|
+
'hue-interpolation',
|
|
871
|
+
'gradients',
|
|
872
|
+
),
|
|
873
|
+
),
|
|
818
874
|
|
|
819
875
|
// TRANSFORM
|
|
820
876
|
'Tf': (
|
|
@@ -1831,6 +1887,29 @@ $utils-db: (
|
|
|
1831
1887
|
fill, outline-color, stroke,
|
|
1832
1888
|
),
|
|
1833
1889
|
),
|
|
1890
|
+
'radial-shape': (
|
|
1891
|
+
// c - center, cc - currentColor
|
|
1892
|
+
'cr': circle,
|
|
1893
|
+
'el': ellipse,
|
|
1894
|
+
),
|
|
1895
|
+
'ray-size': (
|
|
1896
|
+
'css': closest-side,
|
|
1897
|
+
'csc': closest-corner,
|
|
1898
|
+
'fts': farthest-side,
|
|
1899
|
+
'ftc': farthest-corner,
|
|
1900
|
+
'sd': sides,
|
|
1901
|
+
),
|
|
1902
|
+
'color-space': (
|
|
1903
|
+
'dpp': display-p3,
|
|
1904
|
+
'dppl': display-p3-linear,
|
|
1905
|
+
'ppr': prophoto-rgb,
|
|
1906
|
+
),
|
|
1907
|
+
'hue-interpolation': (
|
|
1908
|
+
'sr': shorter,
|
|
1909
|
+
'lr': longer,
|
|
1910
|
+
'ic': increasing,
|
|
1911
|
+
'dc': decreasing,
|
|
1912
|
+
),
|
|
1834
1913
|
'sizing': $-sizing-kw,
|
|
1835
1914
|
),
|
|
1836
1915
|
),
|
package/dist/utils/path.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const path = await import('
|
|
2
|
-
.catch(() => import('
|
|
1
|
+
export const path = await import('path')
|
|
2
|
+
.catch(() => import('https://esm.sh/path-browserify-esm'))
|
|
3
3
|
.then((r) => r.default);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlut/core",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "Tailwind CSS alternative for custom websites and creative coding",
|
|
5
5
|
"author": "mr150",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|