@bamboocss/config 1.41.1 → 1.42.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.
@@ -62,7 +62,7 @@ const format = [
62
62
  "hash",
63
63
  "prefix",
64
64
  "separator",
65
- "strictTokens",
65
+ "strictValues",
66
66
  "strictPropertyValues",
67
67
  "shorthands"
68
68
  ];
@@ -38,7 +38,7 @@ const format = [
38
38
  "hash",
39
39
  "prefix",
40
40
  "separator",
41
- "strictTokens",
41
+ "strictValues",
42
42
  "strictPropertyValues",
43
43
  "shorthands"
44
44
  ];
package/dist/index.cjs CHANGED
@@ -143,7 +143,7 @@ const format = [
143
143
  "hash",
144
144
  "prefix",
145
145
  "separator",
146
- "strictTokens",
146
+ "strictValues",
147
147
  "strictPropertyValues",
148
148
  "shorthands"
149
149
  ];
@@ -1106,7 +1106,7 @@ const validateTokens = (options) => {
1106
1106
  //#region src/validate-config.ts
1107
1107
  /**
1108
1108
  * Validate the config
1109
- * - Check that `strictTokens` names a setting that exists
1109
+ * - Check that `strictValues` names a setting that exists
1110
1110
  * - Check for duplicate between token & semanticTokens names
1111
1111
  * - Check for duplicate between recipes/patterns/slots names
1112
1112
  * - Check for token / semanticTokens paths (must end/contain 'value')
@@ -1137,7 +1137,7 @@ const validateConfig = (config) => {
1137
1137
  return warnings;
1138
1138
  };
1139
1139
  if (config.validation === "off") return report();
1140
- validateStrictTokens(config.strictTokens, addError);
1140
+ validateStrictValues(config.strictValues, addError);
1141
1141
  validateBreakpoints(config.theme?.breakpoints, addError);
1142
1142
  validateConditions(config.conditions, addError);
1143
1143
  const artifacts = {
@@ -1170,16 +1170,16 @@ const validateConfig = (config) => {
1170
1170
  return report();
1171
1171
  };
1172
1172
  /**
1173
- * `strictTokens` has three settings, and a fourth spelling is not one of them.
1173
+ * `strictValues` is a boolean, and a string is not one.
1174
1174
  *
1175
- * It reaches the generated types as a comparison against two known values, so anything else is
1176
- * neither: `strictTokens: 'unknown'` emitted a *fourth* prop shape csstype's keywords without
1177
- * the escape hatch that no setting asks for, silently. A typo in the middle mode's name is the
1178
- * likely way to get there, and the symptom is type errors that match no documented behaviour.
1175
+ * It reaches the generated types as a truthiness test, so a string that is not a setting is
1176
+ * simply *on* and being on means every raw CSS value in the project is a type error, from a
1177
+ * config that looked like it was asking for something else. `'unknown-tokens'` in particular
1178
+ * used to be a setting and now is not, so it is the likely way to arrive here.
1179
1179
  */
1180
- const validateStrictTokens = (value, addError) => {
1181
- if (value === void 0 || value === true || value === false || value === "unknown-tokens") return;
1182
- addError("strictTokens", `\`${JSON.stringify(value)}\` is not a setting. Use \`true\` for tokens only, \`'unknown-tokens'\` to reject a value that is neither a token nor a css keyword, or omit it.`);
1180
+ const validateStrictValues = (value, addError) => {
1181
+ if (value === void 0 || typeof value === "boolean") return;
1182
+ addError("strictValues", `\`${JSON.stringify(value)}\` is not a setting. Use \`true\` to require every value to be a token, or omit it. A misspelled token is reported by the build see \`unresolvedToken\` — and needs no setting.`);
1183
1183
  };
1184
1184
  //#endregion
1185
1185
  //#region src/resolve-config.ts
package/dist/index.d.cts CHANGED
@@ -1753,6 +1753,7 @@ declare const defaultPresets: ({
1753
1753
  value: string;
1754
1754
  };
1755
1755
  };
1756
+ zIndex: import("@bamboocss/types").Recursive<import("@bamboocss/types").Token<string | number>> | undefined;
1756
1757
  };
1757
1758
  mixins: import("@bamboocss/types").Mixins;
1758
1759
  containerSizes: {
package/dist/index.d.mts CHANGED
@@ -1753,6 +1753,7 @@ declare const defaultPresets: ({
1753
1753
  value: string;
1754
1754
  };
1755
1755
  };
1756
+ zIndex: import("@bamboocss/types").Recursive<import("@bamboocss/types").Token<string | number>> | undefined;
1756
1757
  };
1757
1758
  mixins: import("@bamboocss/types").Mixins;
1758
1759
  containerSizes: {
package/dist/index.mjs CHANGED
@@ -115,7 +115,7 @@ const format = [
115
115
  "hash",
116
116
  "prefix",
117
117
  "separator",
118
- "strictTokens",
118
+ "strictValues",
119
119
  "strictPropertyValues",
120
120
  "shorthands"
121
121
  ];
@@ -1078,7 +1078,7 @@ const validateTokens = (options) => {
1078
1078
  //#region src/validate-config.ts
1079
1079
  /**
1080
1080
  * Validate the config
1081
- * - Check that `strictTokens` names a setting that exists
1081
+ * - Check that `strictValues` names a setting that exists
1082
1082
  * - Check for duplicate between token & semanticTokens names
1083
1083
  * - Check for duplicate between recipes/patterns/slots names
1084
1084
  * - Check for token / semanticTokens paths (must end/contain 'value')
@@ -1109,7 +1109,7 @@ const validateConfig = (config) => {
1109
1109
  return warnings;
1110
1110
  };
1111
1111
  if (config.validation === "off") return report();
1112
- validateStrictTokens(config.strictTokens, addError);
1112
+ validateStrictValues(config.strictValues, addError);
1113
1113
  validateBreakpoints(config.theme?.breakpoints, addError);
1114
1114
  validateConditions(config.conditions, addError);
1115
1115
  const artifacts = {
@@ -1142,16 +1142,16 @@ const validateConfig = (config) => {
1142
1142
  return report();
1143
1143
  };
1144
1144
  /**
1145
- * `strictTokens` has three settings, and a fourth spelling is not one of them.
1145
+ * `strictValues` is a boolean, and a string is not one.
1146
1146
  *
1147
- * It reaches the generated types as a comparison against two known values, so anything else is
1148
- * neither: `strictTokens: 'unknown'` emitted a *fourth* prop shape csstype's keywords without
1149
- * the escape hatch that no setting asks for, silently. A typo in the middle mode's name is the
1150
- * likely way to get there, and the symptom is type errors that match no documented behaviour.
1147
+ * It reaches the generated types as a truthiness test, so a string that is not a setting is
1148
+ * simply *on* and being on means every raw CSS value in the project is a type error, from a
1149
+ * config that looked like it was asking for something else. `'unknown-tokens'` in particular
1150
+ * used to be a setting and now is not, so it is the likely way to arrive here.
1151
1151
  */
1152
- const validateStrictTokens = (value, addError) => {
1153
- if (value === void 0 || value === true || value === false || value === "unknown-tokens") return;
1154
- addError("strictTokens", `\`${JSON.stringify(value)}\` is not a setting. Use \`true\` for tokens only, \`'unknown-tokens'\` to reject a value that is neither a token nor a css keyword, or omit it.`);
1152
+ const validateStrictValues = (value, addError) => {
1153
+ if (value === void 0 || typeof value === "boolean") return;
1154
+ addError("strictValues", `\`${JSON.stringify(value)}\` is not a setting. Use \`true\` to require every value to be a token, or omit it. A misspelled token is reported by the build see \`unresolvedToken\` — and needs no setting.`);
1155
1155
  };
1156
1156
  //#endregion
1157
1157
  //#region src/resolve-config.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/config",
3
- "version": "1.41.1",
3
+ "version": "1.42.0",
4
4
  "description": "Find and load bamboo config",
5
5
  "homepage": "https://bamboocss.com",
6
6
  "license": "MIT",
@@ -64,11 +64,11 @@
64
64
  "escalade": "3.2.0",
65
65
  "microdiff": "1.5.0",
66
66
  "typescript": "6.0.2",
67
- "@bamboocss/logger": "1.41.1",
68
- "@bamboocss/preset-bamboo": "1.41.1",
69
- "@bamboocss/preset-base": "1.41.1",
70
- "@bamboocss/shared": "1.41.1",
71
- "@bamboocss/types": "1.41.1"
67
+ "@bamboocss/logger": "1.42.0",
68
+ "@bamboocss/preset-bamboo": "1.42.0",
69
+ "@bamboocss/preset-base": "1.42.0",
70
+ "@bamboocss/shared": "1.42.0",
71
+ "@bamboocss/types": "1.42.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "pkg-types": "2.3.0"