@teacss/directives 0.9.0-alpha.2 → 0.9.0-alpha.4
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/dist/index.d.ts +2 -2
- package/dist/internal/easing.d.ts +3 -3
- package/dist/internal/easing.js +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -34,10 +34,10 @@ export interface GenerateEntryOptions {
|
|
|
34
34
|
base: string;
|
|
35
35
|
/** Entry filename, when known, so local `@import` cycles include the root identity. */
|
|
36
36
|
entryFile?: string;
|
|
37
|
-
/**
|
|
37
|
+
/** Scan content for the given include/exclude globs; `sources` may be omitted so the runtime reads the files. Omit when `contents` is given. */
|
|
38
38
|
readSources?: (includes: string[], excludes: string[]) => Promise<{
|
|
39
39
|
files: string[];
|
|
40
|
-
sources
|
|
40
|
+
sources?: string[];
|
|
41
41
|
}>;
|
|
42
42
|
/** Inline content to extract utilities from — skips `readSources` (tests / programmatic use). */
|
|
43
43
|
contents?: string[];
|
|
@@ -4,9 +4,9 @@ import { MagicStringLike } from "@teacss/core";
|
|
|
4
4
|
export declare function prepareEasingCss(code: MagicStringLike): void;
|
|
5
5
|
export declare function prepareEasingStylesheet(css: string): string;
|
|
6
6
|
/**
|
|
7
|
-
* Whether a stylesheet may hold a `cubic-bezier()` the guard rewrites:
|
|
8
|
-
* function name spelled with escapes
|
|
9
|
-
*
|
|
7
|
+
* Whether a stylesheet may hold a `cubic-bezier()` the guard rewrites: one whose arguments call a math
|
|
8
|
+
* function, a function name spelled with escapes, or arguments a plain scan cannot delimit. Literal
|
|
9
|
+
* curves never change, so they no longer force a full parse.
|
|
10
10
|
*/
|
|
11
11
|
export declare function needsEasingEdits(css: string): boolean;
|
|
12
12
|
//#endregion
|
package/dist/internal/easing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createRequire as e}from"node:module";import{normalizedCssIdentifier as t}from"@teacss/rule-helpers/css-value-syntax";import{prepareEasingOutput as n}from"@teacss/rule-helpers/internal/easing";const r=new Set([`animation`,`animation-timing-function`,`transition`,`transition-timing-function`]);function i(e){d(e.original,(t,n,r)=>e.overwrite(t,n,r))}function a(e){let t=[],n=0;return d(e,(r,i,a)=>{t.push(e.slice(n,r),a),n=i}),t.length?t.join(``)+e.slice(n):e}const o=/\\(?:[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,s=/(?<![\w-])(?:calc|min|max|clamp|round|mod|rem|abs|sign|pow|sqrt|hypot|log|exp|sin|cos|tan|asin|acos|atan2?)\(/i;function c(e,t){let n=1;for(let r=t;r<e.length;r++){let i=e[r];if(i===`"`||i===`'`||i===`\\`||i===`/`&&e[r+1]===`*`)return;if(i===`(`)n++;else if(i===`)`&&--n===0)return e.slice(t,r)}}function l(e){if(o.test(e))return!0;for(let t of e.matchAll(/cubic-bezier\(/gi)){let n=c(e,t.index+t[0].length);if(n===void 0||s.test(n))return!0}return!1}let u;function d(i,a){if(!l(i))return;let{parse:o,walk:s}=u??=e(import.meta.url)(`css-tree`);s(o(i,{positions:!0,parseValue:!1,parseCustomProperty:!1,parseAtrulePrelude:!1}),{visit:`Declaration`,enter(e){let o=t(e.property).replace(/^-(?:webkit|moz|o)-/,``);if(!r.has(o)||!e.value.loc)return;let{start:s,end:c}=e.value.loc,l=i.slice(s.offset,c.offset),u=n(l);u!==l&&a(s.offset,c.offset,u)}})}export{l as needsEasingEdits,i as prepareEasingCss,a 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.4",
|
|
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.4",
|
|
28
|
+
"@teacss/core": "0.9.0-alpha.4",
|
|
29
|
+
"@teacss/rule-helpers": "0.9.0-alpha.4",
|
|
30
|
+
"@teacss/runtime": "0.9.0-alpha.4",
|
|
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.4",
|
|
36
|
+
"@teacss/preset-official": "0.9.0-alpha.4",
|
|
37
|
+
"@teacss/preset-standard": "0.9.0-alpha.4",
|
|
38
38
|
"magic-string": "^1.2.3"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|