@tokenami/config 0.0.81 → 0.0.82

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.cjs CHANGED
@@ -86,21 +86,18 @@ function getTokenPropertyParts(tokenProperty2, config) {
86
86
  const selector = firstSelector || secondSelector;
87
87
  const validVariant = [responsive, selector].filter(Boolean).join("_");
88
88
  const variantProp = variantProperty(validVariant, alias);
89
- if (firstVariant && variantProp !== tokenProperty2)
90
- return null;
89
+ if (firstVariant && variantProp !== tokenProperty2) return null;
91
90
  return { alias, responsive, selector, variant: validVariant };
92
91
  }
93
92
  function getValidSelector(selector, config) {
94
93
  var _a;
95
- if (!selector)
96
- return;
94
+ if (!selector) return;
97
95
  const configSelector = (_a = config.selectors) == null ? void 0 : _a[selector];
98
96
  return (getArbitrarySelector(selector) || configSelector) && selector;
99
97
  }
100
98
  function getValidResponsive(responsive, config) {
101
99
  var _a;
102
- if (!responsive)
103
- return;
100
+ if (!responsive) return;
104
101
  const configResponsive = (_a = config.responsive) == null ? void 0 : _a[responsive];
105
102
  return configResponsive && responsive;
106
103
  }
@@ -128,8 +125,7 @@ var escapeSpecialCharsRegex = /[&#.:;>~*[\]=,"'()+{}]/g;
128
125
  function parseProperty(str, options) {
129
126
  const { escapeSpecialChars = true } = options || {};
130
127
  const noColon = encodeColon(str);
131
- if (!escapeSpecialChars)
132
- return noColon;
128
+ if (!escapeSpecialChars) return noColon;
133
129
  return noColon.replace(escapeSpecialCharsRegex, (match) => `\\${match}`);
134
130
  }
135
131
  function stringifyProperty(property) {
package/dist/index.js CHANGED
@@ -81,21 +81,18 @@ function getTokenPropertyParts(tokenProperty2, config) {
81
81
  const selector = firstSelector || secondSelector;
82
82
  const validVariant = [responsive, selector].filter(Boolean).join("_");
83
83
  const variantProp = variantProperty(validVariant, alias);
84
- if (firstVariant && variantProp !== tokenProperty2)
85
- return null;
84
+ if (firstVariant && variantProp !== tokenProperty2) return null;
86
85
  return { alias, responsive, selector, variant: validVariant };
87
86
  }
88
87
  function getValidSelector(selector, config) {
89
88
  var _a;
90
- if (!selector)
91
- return;
89
+ if (!selector) return;
92
90
  const configSelector = (_a = config.selectors) == null ? void 0 : _a[selector];
93
91
  return (getArbitrarySelector(selector) || configSelector) && selector;
94
92
  }
95
93
  function getValidResponsive(responsive, config) {
96
94
  var _a;
97
- if (!responsive)
98
- return;
95
+ if (!responsive) return;
99
96
  const configResponsive = (_a = config.responsive) == null ? void 0 : _a[responsive];
100
97
  return configResponsive && responsive;
101
98
  }
@@ -123,8 +120,7 @@ var escapeSpecialCharsRegex = /[&#.:;>~*[\]=,"'()+{}]/g;
123
120
  function parseProperty(str, options) {
124
121
  const { escapeSpecialChars = true } = options || {};
125
122
  const noColon = encodeColon(str);
126
- if (!escapeSpecialChars)
127
- return noColon;
123
+ if (!escapeSpecialChars) return noColon;
128
124
  return noColon.replace(escapeSpecialCharsRegex, (match) => `\\${match}`);
129
125
  }
130
126
  function stringifyProperty(property) {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@tokenami/config",
3
- "version": "0.0.81",
3
+ "version": "0.0.82",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
- "repository": "https://github.com/tokenami/tokenami",
9
+ "repository": "tokenami/tokenami",
10
10
  "sideEffects": false,
11
11
  "publishConfig": {
12
12
  "access": "public"
@@ -36,8 +36,8 @@
36
36
  "csstype": "^3.1.2"
37
37
  },
38
38
  "devDependencies": {
39
- "tsup": "^7.0.0",
39
+ "tsup": "^8.4.0",
40
40
  "typescript": "^5.1.3"
41
41
  },
42
- "gitHead": "ebf9ebecf6d23586be19b859f7d243de7346f9f7"
42
+ "gitHead": "ba381af577865573615b630033e9fbd429d60bba"
43
43
  }