@storm-software/config 1.16.7 → 1.18.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ## 1.18.0 (2024-05-07)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - **config:** Added the `accent` color token to configuration ([a7a24ec1](https://github.com/storm-software/storm-ops/commit/a7a24ec1))
7
+
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **config:** Mark the `accent` color as optional ([156921b6](https://github.com/storm-software/storm-ops/commit/156921b6))
12
+
13
+
14
+ ### ❤️ Thank You
15
+
16
+ - Patrick Sullivan
17
+
18
+ ## 1.17.0 (2024-05-07)
19
+
20
+
21
+ ### 🚀 Features
22
+
23
+ - **config:** Add the `help` color token type ([8a466466](https://github.com/storm-software/storm-ops/commit/8a466466))
24
+
25
+
26
+ ### ❤️ Thank You
27
+
28
+ - Patrick Sullivan
29
+
1
30
  ## 1.16.7 (2024-05-06)
2
31
 
3
32
 
package/index.cjs CHANGED
@@ -31,7 +31,7 @@ __export(src_exports, {
31
31
  });
32
32
  module.exports = __toCommonJS(src_exports);
33
33
 
34
- // node_modules/.pnpm/zod@3.23.4/node_modules/zod/lib/index.mjs
34
+ // node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
35
35
  var util;
36
36
  (function(util2) {
37
37
  util2.assertEqual = (val) => val;
@@ -489,19 +489,14 @@ var isDirty = (x) => x.status === "dirty";
489
489
  var isValid = (x) => x.status === "valid";
490
490
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
491
491
  function __classPrivateFieldGet(receiver, state, kind, f) {
492
- if (kind === "a" && !f)
493
- throw new TypeError("Private accessor was defined without a getter");
494
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
495
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
492
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
493
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
496
494
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
497
495
  }
498
496
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
499
- if (kind === "m")
500
- throw new TypeError("Private method is not writable");
501
- if (kind === "a" && !f)
502
- throw new TypeError("Private accessor was defined without a setter");
503
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
504
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
497
+ if (kind === "m") throw new TypeError("Private method is not writable");
498
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
499
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
505
500
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
506
501
  }
507
502
  var errorUtil;
@@ -2220,8 +2215,7 @@ var ZodObject = class _ZodObject extends ZodType {
2220
2215
  });
2221
2216
  status.dirty();
2222
2217
  }
2223
- } else if (unknownKeys === "strip")
2224
- ;
2218
+ } else if (unknownKeys === "strip") ;
2225
2219
  else {
2226
2220
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
2227
2221
  }
@@ -3709,10 +3703,13 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
3709
3703
  var ZodReadonly = class extends ZodType {
3710
3704
  _parse(input) {
3711
3705
  const result = this._def.innerType._parse(input);
3712
- if (isValid(result)) {
3713
- result.value = Object.freeze(result.value);
3714
- }
3715
- return result;
3706
+ const freeze = (data) => {
3707
+ if (isValid(data)) {
3708
+ data.value = Object.freeze(data.value);
3709
+ }
3710
+ return data;
3711
+ };
3712
+ return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
3716
3713
  }
3717
3714
  unwrap() {
3718
3715
  return this._def.innerType;
@@ -3951,7 +3948,8 @@ var z = /* @__PURE__ */ Object.freeze({
3951
3948
  // packages/config/src/schema.ts
3952
3949
  var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#22272E").describe("The dark background color of the workspace");
3953
3950
  var LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
3954
- var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The first brand specific color of the workspace");
3951
+ var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
3952
+ var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
3955
3953
  var HelpColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
3956
3954
  var SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
3957
3955
  var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#316DCA").describe("The informational color of the workspace");
@@ -3962,6 +3960,7 @@ var DarkThemeColorConfigSchema = z.object({
3962
3960
  foreground: LightColorSchema,
3963
3961
  background: DarkColorSchema,
3964
3962
  brand: BrandColorSchema,
3963
+ accent: AccentColorSchema,
3965
3964
  help: HelpColorSchema,
3966
3965
  success: SuccessColorSchema,
3967
3966
  info: InfoColorSchema,
@@ -3973,6 +3972,7 @@ var LightThemeColorConfigSchema = z.object({
3973
3972
  foreground: DarkColorSchema,
3974
3973
  background: LightColorSchema,
3975
3974
  brand: BrandColorSchema,
3975
+ accent: AccentColorSchema,
3976
3976
  help: HelpColorSchema,
3977
3977
  success: SuccessColorSchema,
3978
3978
  info: InfoColorSchema,
@@ -3988,6 +3988,7 @@ var SingleThemeColorConfigSchema = z.object({
3988
3988
  dark: DarkColorSchema,
3989
3989
  light: LightColorSchema,
3990
3990
  brand: BrandColorSchema,
3991
+ accent: AccentColorSchema,
3991
3992
  help: HelpColorSchema,
3992
3993
  success: SuccessColorSchema,
3993
3994
  info: InfoColorSchema,
@@ -4066,6 +4067,7 @@ var COLOR_KEYS = [
4066
4067
  "light",
4067
4068
  "brand",
4068
4069
  "accent",
4070
+ "help",
4069
4071
  "success",
4070
4072
  "info",
4071
4073
  "warning",
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // node_modules/.pnpm/zod@3.23.4/node_modules/zod/lib/index.mjs
1
+ // node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
2
2
  var util;
3
3
  (function(util2) {
4
4
  util2.assertEqual = (val) => val;
@@ -456,19 +456,14 @@ var isDirty = (x) => x.status === "dirty";
456
456
  var isValid = (x) => x.status === "valid";
457
457
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
458
458
  function __classPrivateFieldGet(receiver, state, kind, f) {
459
- if (kind === "a" && !f)
460
- throw new TypeError("Private accessor was defined without a getter");
461
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
462
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
459
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
460
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
463
461
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
464
462
  }
465
463
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
466
- if (kind === "m")
467
- throw new TypeError("Private method is not writable");
468
- if (kind === "a" && !f)
469
- throw new TypeError("Private accessor was defined without a setter");
470
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
471
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
464
+ if (kind === "m") throw new TypeError("Private method is not writable");
465
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
466
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
472
467
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
473
468
  }
474
469
  var errorUtil;
@@ -2187,8 +2182,7 @@ var ZodObject = class _ZodObject extends ZodType {
2187
2182
  });
2188
2183
  status.dirty();
2189
2184
  }
2190
- } else if (unknownKeys === "strip")
2191
- ;
2185
+ } else if (unknownKeys === "strip") ;
2192
2186
  else {
2193
2187
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
2194
2188
  }
@@ -3676,10 +3670,13 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
3676
3670
  var ZodReadonly = class extends ZodType {
3677
3671
  _parse(input) {
3678
3672
  const result = this._def.innerType._parse(input);
3679
- if (isValid(result)) {
3680
- result.value = Object.freeze(result.value);
3681
- }
3682
- return result;
3673
+ const freeze = (data) => {
3674
+ if (isValid(data)) {
3675
+ data.value = Object.freeze(data.value);
3676
+ }
3677
+ return data;
3678
+ };
3679
+ return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
3683
3680
  }
3684
3681
  unwrap() {
3685
3682
  return this._def.innerType;
@@ -3918,7 +3915,8 @@ var z = /* @__PURE__ */ Object.freeze({
3918
3915
  // packages/config/src/schema.ts
3919
3916
  var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#22272E").describe("The dark background color of the workspace");
3920
3917
  var LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
3921
- var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The first brand specific color of the workspace");
3918
+ var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
3919
+ var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
3922
3920
  var HelpColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
3923
3921
  var SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
3924
3922
  var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#316DCA").describe("The informational color of the workspace");
@@ -3929,6 +3927,7 @@ var DarkThemeColorConfigSchema = z.object({
3929
3927
  foreground: LightColorSchema,
3930
3928
  background: DarkColorSchema,
3931
3929
  brand: BrandColorSchema,
3930
+ accent: AccentColorSchema,
3932
3931
  help: HelpColorSchema,
3933
3932
  success: SuccessColorSchema,
3934
3933
  info: InfoColorSchema,
@@ -3940,6 +3939,7 @@ var LightThemeColorConfigSchema = z.object({
3940
3939
  foreground: DarkColorSchema,
3941
3940
  background: LightColorSchema,
3942
3941
  brand: BrandColorSchema,
3942
+ accent: AccentColorSchema,
3943
3943
  help: HelpColorSchema,
3944
3944
  success: SuccessColorSchema,
3945
3945
  info: InfoColorSchema,
@@ -3955,6 +3955,7 @@ var SingleThemeColorConfigSchema = z.object({
3955
3955
  dark: DarkColorSchema,
3956
3956
  light: LightColorSchema,
3957
3957
  brand: BrandColorSchema,
3958
+ accent: AccentColorSchema,
3958
3959
  help: HelpColorSchema,
3959
3960
  success: SuccessColorSchema,
3960
3961
  info: InfoColorSchema,
@@ -4033,6 +4034,7 @@ var COLOR_KEYS = [
4033
4034
  "light",
4034
4035
  "brand",
4035
4036
  "accent",
4037
+ "help",
4036
4038
  "success",
4037
4039
  "info",
4038
4040
  "warning",
package/meta.cjs.json CHANGED
@@ -1 +1 @@
1
- {"inputs":{"node_modules/.pnpm/zod@3.23.4/node_modules/zod/lib/index.mjs":{"bytes":149301,"imports":[],"format":"esm"},"packages/config/src/schema.ts":{"bytes":8231,"imports":[{"path":"node_modules/.pnpm/zod@3.23.4/node_modules/zod/lib/index.mjs","kind":"import-statement","original":"zod"}],"format":"esm"},"packages/config/src/types.ts":{"bytes":1880,"imports":[],"format":"esm"},"packages/config/src/define-config.ts":{"bytes":313,"imports":[],"format":"esm"},"packages/config/src/index.ts":{"bytes":311,"imports":[{"path":"packages/config/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/config/src/define-config.ts","kind":"import-statement","original":"./define-config"}],"format":"esm"}},"outputs":{"dist/packages/config/index.cjs":{"imports":[],"exports":[],"entryPoint":"packages/config/src/index.ts","inputs":{"packages/config/src/index.ts":{"bytesInOutput":569},"node_modules/.pnpm/zod@3.23.4/node_modules/zod/lib/index.mjs":{"bytesInOutput":116876},"packages/config/src/schema.ts":{"bytesInOutput":6803},"packages/config/src/types.ts":{"bytesInOutput":123},"packages/config/src/define-config.ts":{"bytesInOutput":37}},"bytes":125399}}}
1
+ {"inputs":{"node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs":{"bytes":149466,"imports":[],"format":"esm"},"packages/config/src/schema.ts":{"bytes":8517,"imports":[{"path":"node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs","kind":"import-statement","original":"zod"}],"format":"esm"},"packages/config/src/types.ts":{"bytes":1890,"imports":[],"format":"esm"},"packages/config/src/define-config.ts":{"bytes":313,"imports":[],"format":"esm"},"packages/config/src/index.ts":{"bytes":311,"imports":[{"path":"packages/config/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/config/src/define-config.ts","kind":"import-statement","original":"./define-config"}],"format":"esm"}},"outputs":{"dist/packages/config/index.cjs":{"imports":[],"exports":[],"entryPoint":"packages/config/src/index.ts","inputs":{"packages/config/src/index.ts":{"bytesInOutput":569},"node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs":{"bytesInOutput":116969},"packages/config/src/schema.ts":{"bytesInOutput":7066},"packages/config/src/types.ts":{"bytesInOutput":133},"packages/config/src/define-config.ts":{"bytesInOutput":37}},"bytes":125765}}}
package/meta.esm.json CHANGED
@@ -1 +1 @@
1
- {"inputs":{"node_modules/.pnpm/zod@3.23.4/node_modules/zod/lib/index.mjs":{"bytes":149301,"imports":[],"format":"esm"},"packages/config/src/schema.ts":{"bytes":8231,"imports":[{"path":"node_modules/.pnpm/zod@3.23.4/node_modules/zod/lib/index.mjs","kind":"import-statement","original":"zod"}],"format":"esm"},"packages/config/src/types.ts":{"bytes":1880,"imports":[],"format":"esm"},"packages/config/src/define-config.ts":{"bytes":313,"imports":[],"format":"esm"},"packages/config/src/index.ts":{"bytes":311,"imports":[{"path":"packages/config/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/config/src/define-config.ts","kind":"import-statement","original":"./define-config"}],"format":"esm"}},"outputs":{"dist/packages/config/index.js":{"imports":[],"exports":["COLOR_KEYS","ColorConfigMapSchema","ColorConfigSchema","DarkThemeColorConfigSchema","LightThemeColorConfigSchema","MultiThemeColorConfigSchema","SingleThemeColorConfigSchema","StormConfigSchema","defineConfig"],"entryPoint":"packages/config/src/index.ts","inputs":{"node_modules/.pnpm/zod@3.23.4/node_modules/zod/lib/index.mjs":{"bytesInOutput":116876},"packages/config/src/schema.ts":{"bytesInOutput":6803},"packages/config/src/index.ts":{"bytesInOutput":0},"packages/config/src/types.ts":{"bytesInOutput":123},"packages/config/src/define-config.ts":{"bytesInOutput":37}},"bytes":124242}}}
1
+ {"inputs":{"node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs":{"bytes":149466,"imports":[],"format":"esm"},"packages/config/src/schema.ts":{"bytes":8517,"imports":[{"path":"node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs","kind":"import-statement","original":"zod"}],"format":"esm"},"packages/config/src/types.ts":{"bytes":1890,"imports":[],"format":"esm"},"packages/config/src/define-config.ts":{"bytes":313,"imports":[],"format":"esm"},"packages/config/src/index.ts":{"bytes":311,"imports":[{"path":"packages/config/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/config/src/define-config.ts","kind":"import-statement","original":"./define-config"}],"format":"esm"}},"outputs":{"dist/packages/config/index.js":{"imports":[],"exports":["COLOR_KEYS","ColorConfigMapSchema","ColorConfigSchema","DarkThemeColorConfigSchema","LightThemeColorConfigSchema","MultiThemeColorConfigSchema","SingleThemeColorConfigSchema","StormConfigSchema","defineConfig"],"entryPoint":"packages/config/src/index.ts","inputs":{"node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs":{"bytesInOutput":116969},"packages/config/src/schema.ts":{"bytesInOutput":7066},"packages/config/src/index.ts":{"bytesInOutput":0},"packages/config/src/types.ts":{"bytesInOutput":133},"packages/config/src/define-config.ts":{"bytesInOutput":37}},"bytes":124608}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/config",
3
- "version": "1.16.7",
3
+ "version": "1.18.0",
4
4
  "private": false,
5
5
  "description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "module": "./index.js",
23
23
  "types": "./declarations.d.ts",
24
24
  "dependencies": {
25
- "zod": "3.23.4"
25
+ "zod": "3.23.8"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
@@ -181,9 +181,16 @@
181
181
  "minLength": 7,
182
182
  "maxLength": 7,
183
183
  "default": "#1fb2a6",
184
- "description": "The first brand specific color of the workspace"
184
+ "description": "The primary brand specific color of the workspace"
185
185
  },
186
186
  "accent": {
187
+ "type": "string",
188
+ "pattern": "^#([0-9a-f]{3}){1,2}$",
189
+ "minLength": 7,
190
+ "maxLength": 7,
191
+ "description": "The secondary brand specific color of the workspace"
192
+ },
193
+ "help": {
187
194
  "type": "string",
188
195
  "pattern": "^#([0-9a-f]{3}){1,2}$",
189
196
  "minLength": 7,
@@ -251,6 +258,9 @@
251
258
  "accent": {
252
259
  "$ref": "#/definitions/StormConfiguration/properties/colors/anyOf/0/anyOf/0/properties/accent"
253
260
  },
261
+ "help": {
262
+ "$ref": "#/definitions/StormConfiguration/properties/colors/anyOf/0/anyOf/0/properties/help"
263
+ },
254
264
  "success": {
255
265
  "$ref": "#/definitions/StormConfiguration/properties/colors/anyOf/0/anyOf/0/properties/success"
256
266
  },
@@ -284,6 +294,9 @@
284
294
  "accent": {
285
295
  "$ref": "#/definitions/StormConfiguration/properties/colors/anyOf/0/anyOf/0/properties/accent"
286
296
  },
297
+ "help": {
298
+ "$ref": "#/definitions/StormConfiguration/properties/colors/anyOf/0/anyOf/0/properties/help"
299
+ },
287
300
  "success": {
288
301
  "$ref": "#/definitions/StormConfiguration/properties/colors/anyOf/0/anyOf/0/properties/success"
289
302
  },