@teacss/postcss 0.5.2 → 0.6.2

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 CHANGED
@@ -3,8 +3,7 @@
3
3
  PostCSS 8 integration for TeaCSS.
4
4
 
5
5
  ```sh
6
- npm install teacss
7
- npm install --save-dev @teacss/postcss postcss
6
+ npm install --save-dev teacss @teacss/postcss postcss
8
7
  ```
9
8
 
10
9
  ```js
@@ -25,7 +24,7 @@ export default {
25
24
  ```
26
25
 
27
26
  ```css
28
- @preset "standard";
27
+ @presets "standard";
29
28
  @source "./src/**/*.{ts,tsx,html}";
30
29
  @teacss;
31
30
  ```
package/dist/esm.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFile, stat } from "node:fs/promises";
2
2
  import { dirname, extname, join, normalize, relative, resolve } from "node:path";
3
3
  import process from "node:process";
4
- import { createRecoveryConfigLoader, entryDiscoveryFiles, getConfigSourcesFromError } from "@teacss/config";
4
+ import { ROLE_DIRECTIVES, createRecoveryConfigLoader, entryDiscoveryFiles, getConfigSourcesFromError } from "@teacss/config";
5
5
  import { createGenerator, expandClassGroups, expandVariantGroup, splitClassTokens } from "@teacss/core";
6
6
  import { hasIconFn, hasThemeFn } from "@teacss/rule-helpers";
7
7
  import { defaultFilesystemGlobs } from "@teacss/runtime";
@@ -85,7 +85,7 @@ async function parseApply(root, generator, directiveName, filename) {
85
85
  applyHosts.set(hostRule, applyHost);
86
86
  }
87
87
  }
88
- const css = renderStandaloneApplyUtility(applyHost, utility);
88
+ const css = renderStandaloneApplyUtility(applyHost, utility, filename);
89
89
  const parsedCss = postcss.parse(css);
90
90
  parsedCss.walkDecls((declaration) => {
91
91
  declaration.source = source;
@@ -222,10 +222,11 @@ function replaceRuleWithCss(rule, generatedCss) {
222
222
  rule.replaceWith(css);
223
223
  }
224
224
  const ENTRY_STATEMENT_DIRECTIVES = /* @__PURE__ */ new Set([
225
- "preset",
225
+ "presets",
226
226
  "source",
227
227
  "shortcut",
228
- "safelist"
228
+ "safelist",
229
+ ...ROLE_DIRECTIVES
229
230
  ]);
230
231
  function removeEntryDirectives(root) {
231
232
  root.walkAtRules((rule) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teacss/postcss",
3
- "version": "0.5.2",
3
+ "version": "0.6.2",
4
4
  "description": "PostCSS plugin for TeaCSS — generate utilities within a PostCSS pipeline.",
5
5
  "homepage": "https://css.teasim.com",
6
6
  "funding": "https://github.com/sponsors/billgo",
@@ -23,16 +23,16 @@
23
23
  "dev": "tsdown --watch"
24
24
  },
25
25
  "dependencies": {
26
- "@teacss/config": "0.5.2",
27
- "@teacss/core": "0.5.2",
28
- "@teacss/directives": "0.5.2",
29
- "@teacss/rule-helpers": "0.5.2",
30
- "@teacss/runtime": "0.5.2",
26
+ "@teacss/config": "0.6.2",
27
+ "@teacss/core": "0.6.2",
28
+ "@teacss/directives": "0.6.2",
29
+ "@teacss/rule-helpers": "0.6.2",
30
+ "@teacss/runtime": "0.6.2",
31
31
  "css-tree": "^3.2.1",
32
32
  "tinyglobby": "^0.2.17"
33
33
  },
34
34
  "devDependencies": {
35
- "@teacss/preset-standard": "0.5.2",
35
+ "@teacss/preset-standard": "0.6.2",
36
36
  "@types/css-tree": "^3.2.0",
37
37
  "consola": "^3.4.2",
38
38
  "magic-string": "^1.2.3",