@wonderflow/config 5.1.2 → 7.0.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.
@@ -1,11 +1,12 @@
1
1
  export declare const postcssConfig: {
2
2
  plugins: {
3
3
  'postcss-import': {};
4
+ 'postcss-replace': {
5
+ pattern: RegExp;
6
+ data: Record<string, string>;
7
+ };
4
8
  'postcss-preset-env': {
5
9
  stage: number;
6
- importFrom: {
7
- environmentVariables: Record<string, string>;
8
- }[];
9
10
  features: {
10
11
  'logical-properties-and-values': boolean;
11
12
  'prefers-color-scheme-query': boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/postcss/config.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BzB,CAAA"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/postcss/config.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BzB,CAAA"}
@@ -14,19 +14,20 @@ var flat_1 = __importDefault(require("flat"));
14
14
  var flatTokens = (0, flat_1.default)(tokens_json_1.default, {
15
15
  delimiter: '-'
16
16
  });
17
- var environmentVariables = Object.keys(flatTokens).reduce(function (acc, key) {
18
- var newKey = "--".concat(key);
17
+ var prepareTokens = function () { return Object.keys(flatTokens).reduce(function (acc, key) {
18
+ var newKey = key;
19
19
  acc[newKey] = "".concat(flatTokens[key]);
20
20
  return acc;
21
- }, {});
21
+ }, {}); };
22
22
  exports.postcssConfig = {
23
23
  plugins: {
24
24
  'postcss-import': {},
25
+ 'postcss-replace': {
26
+ pattern: /token\(.*?--([^\s]+?)\)/gi,
27
+ data: prepareTokens()
28
+ },
25
29
  'postcss-preset-env': {
26
30
  stage: 0,
27
- importFrom: [{
28
- environmentVariables: environmentVariables
29
- }],
30
31
  features: {
31
32
  'logical-properties-and-values': false,
32
33
  'prefers-color-scheme-query': false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wonderflow/config",
3
3
  "description": "Wanda design system shared configurations ",
4
- "version": "5.1.2",
4
+ "version": "7.0.0",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",
7
7
  "main": "dist/index",
@@ -35,20 +35,21 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@wonderflow/tokens": "*",
38
- "cssnano": "5.0.16",
39
- "cssnano-preset-default": "5.1.11",
38
+ "cssnano": "5.1.5",
39
+ "cssnano-preset-default": "5.2.5",
40
40
  "flat": "5.0.2",
41
- "postcss-import": "14.0.2",
42
- "postcss-mixins": "9.0.1",
43
- "postcss-preset-env": "7.3.1"
41
+ "postcss-import": "14.1.0",
42
+ "postcss-mixins": "9.0.2",
43
+ "postcss-preset-env": "7.4.3",
44
+ "postcss-replace": "2.0.0"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@types/flat": "5.0.2",
47
- "@typescript-eslint/eslint-plugin": "5.10.2",
48
- "@typescript-eslint/parser": "5.10.2",
48
+ "@typescript-eslint/eslint-plugin": "5.17.0",
49
+ "@typescript-eslint/parser": "5.17.0",
49
50
  "@wonderflow/eslint-config": "1.1.11",
50
51
  "tsconfig": "*",
51
- "typescript": "4.5.5"
52
+ "typescript": "4.6.3"
52
53
  },
53
54
  "types": "./dist/index.d.ts"
54
55
  }