@seyuna/postcss 0.0.1-dev.8 → 0.0.1-dev.9

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/plugin.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dynamicFunctionsPlugin = void 0;
4
4
  const functions_1 = require("./functions");
5
+ const at_rules_1 = require("./at-rules");
5
6
  const dynamicFunctionsPlugin = (opts = {}) => {
6
7
  const fnMap = { ...functions_1.functions, ...opts.functions };
7
8
  return {
@@ -19,6 +20,9 @@ const dynamicFunctionsPlugin = (opts = {}) => {
19
20
  }
20
21
  decl.value = value;
21
22
  },
23
+ AtRule: {
24
+ ...at_rules_1.atRuleHandlers,
25
+ },
22
26
  };
23
27
  };
24
28
  exports.dynamicFunctionsPlugin = dynamicFunctionsPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seyuna/postcss",
3
- "version": "0.0.1-dev.8",
3
+ "version": "0.0.1-dev.9",
4
4
  "description": "Seyuna UI's postcss plugin",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/plugin.ts CHANGED
@@ -1,15 +1,19 @@
1
1
  import { PluginCreator } from "postcss";
2
2
  import { functions } from "./functions";
3
+ import { atRuleHandlers } from "./at-rules";
3
4
 
4
5
  export interface PluginOptions {
5
6
  functions?: Record<string, (...args: string[]) => string>;
6
7
  }
7
8
 
8
- export const dynamicFunctionsPlugin: PluginCreator<PluginOptions> = (opts = {}) => {
9
+ export const dynamicFunctionsPlugin: PluginCreator<PluginOptions> = (
10
+ opts = {}
11
+ ) => {
9
12
  const fnMap = { ...functions, ...opts.functions };
10
13
 
11
14
  return {
12
15
  postcssPlugin: "postcss-dynamic-functions",
16
+
13
17
  Declaration(decl) {
14
18
  let value = decl.value;
15
19
 
@@ -26,6 +30,10 @@ export const dynamicFunctionsPlugin: PluginCreator<PluginOptions> = (opts = {})
26
30
 
27
31
  decl.value = value;
28
32
  },
33
+
34
+ AtRule: {
35
+ ...atRuleHandlers,
36
+ },
29
37
  };
30
38
  };
31
39