@teacss/directives 0.9.0-alpha.1 → 0.9.0-alpha.3
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.
|
@@ -3,4 +3,10 @@ import { MagicStringLike } from "@teacss/core";
|
|
|
3
3
|
/** Internal adapter preparation; offsets refer to the original stylesheet. */
|
|
4
4
|
export declare function prepareEasingCss(code: MagicStringLike): void;
|
|
5
5
|
export declare function prepareEasingStylesheet(css: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Whether a stylesheet may hold a `cubic-bezier()` the guard rewrites: the name in plain text, or a
|
|
8
|
+
* function name spelled with escapes. Escaped selectors such as `.p\:4` never end in an unescaped
|
|
9
|
+
* "(", so they no longer force a full parse.
|
|
10
|
+
*/
|
|
11
|
+
export declare function needsEasingEdits(css: string): boolean;
|
|
6
12
|
//#endregion
|
package/dist/internal/easing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parse as e,walk as t}from"css-tree";import{normalizedCssIdentifier as n}from"@teacss/rule-helpers/css-value-syntax";import{prepareEasingOutput as r}from"@teacss/rule-helpers/internal/easing";const i=new Set([`animation`,`animation-timing-function`,`transition`,`transition-timing-function`]);function a(e){
|
|
1
|
+
import{parse as e,walk as t}from"css-tree";import{normalizedCssIdentifier as n}from"@teacss/rule-helpers/css-value-syntax";import{prepareEasingOutput as r}from"@teacss/rule-helpers/internal/easing";const i=new Set([`animation`,`animation-timing-function`,`transition`,`transition-timing-function`]);function a(e){l(e.original,(t,n,r)=>e.overwrite(t,n,r))}function o(e){let t=[],n=0;return l(e,(r,i,a)=>{t.push(e.slice(n,r),a),n=i}),t.length?t.join(``)+e.slice(n):e}const s=/\\(?:[0-9a-f]{1,6}[ \t\n\r\f]?|[^\n\r\f0-9a-f])(?:[\w-]|\\(?:[0-9a-f]{1,6}[ \t\n\r\f]?|[^\n\r\f0-9a-f]))*\(/i;function c(e){return/bezier/i.test(e)||s.test(e)}function l(a,o){if(!c(a))return;let s=e(a,{positions:!0,parseValue:!1,parseCustomProperty:!1,parseAtrulePrelude:!1});t(s,{visit:`Declaration`,enter(e){let t=n(e.property).replace(/^-(?:webkit|moz|o)-/,``);if(!i.has(t)||!e.value.loc)return;let{start:s,end:c}=e.value.loc,l=a.slice(s.offset,c.offset),u=r(l);u!==l&&o(s.offset,c.offset,u)}})}export{c as needsEasingEdits,a as prepareEasingCss,o as prepareEasingStylesheet};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teacss/directives",
|
|
3
|
-
"version": "0.9.0-alpha.
|
|
3
|
+
"version": "0.9.0-alpha.3",
|
|
4
4
|
"description": "Build-time CSS directive transformer for TeaCSS — @apply, theme(), icon(), and @screen.",
|
|
5
5
|
"homepage": "https://css.teasim.com",
|
|
6
6
|
"funding": "https://github.com/sponsors/billgo",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"dev": "tsdown --watch"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@teacss/config": "0.9.0-alpha.
|
|
28
|
-
"@teacss/core": "0.9.0-alpha.
|
|
29
|
-
"@teacss/rule-helpers": "0.9.0-alpha.
|
|
30
|
-
"@teacss/runtime": "0.9.0-alpha.
|
|
27
|
+
"@teacss/config": "0.9.0-alpha.3",
|
|
28
|
+
"@teacss/core": "0.9.0-alpha.3",
|
|
29
|
+
"@teacss/rule-helpers": "0.9.0-alpha.3",
|
|
30
|
+
"@teacss/runtime": "0.9.0-alpha.3",
|
|
31
31
|
"@types/css-tree": "^3.2.0",
|
|
32
32
|
"css-tree": "^3.2.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@teacss/preset-icons": "0.9.0-alpha.
|
|
36
|
-
"@teacss/preset-official": "0.9.0-alpha.
|
|
37
|
-
"@teacss/preset-standard": "0.9.0-alpha.
|
|
35
|
+
"@teacss/preset-icons": "0.9.0-alpha.3",
|
|
36
|
+
"@teacss/preset-official": "0.9.0-alpha.3",
|
|
37
|
+
"@teacss/preset-standard": "0.9.0-alpha.3",
|
|
38
38
|
"magic-string": "^1.2.3"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|