@opfr/utils-type 0.5.0 → 0.5.1

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.
@@ -0,0 +1,2 @@
1
+ export declare const CHARACTERISTICS: readonly ["vitality", "strength", "agility", "intelligence", "chance", "wisdom"];
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/characteristics/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,kFAOlB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export const CHARACTERISTICS = [
2
+ 'vitality',
3
+ 'strength',
4
+ 'agility',
5
+ 'intelligence',
6
+ 'chance',
7
+ 'wisdom',
8
+ ];
9
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/characteristics/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU;IACV,UAAU;IACV,SAAS;IACT,cAAc;IACd,QAAQ;IACR,QAAQ;CACA,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type * from './types';
2
+ export * from './constants';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/characteristics/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/characteristics/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { CHARACTERISTICS } from './constants';
2
+ export type Characteristic = (typeof CHARACTERISTICS)[number];
3
+ export type CharacteristicsRecord = Record<Characteristic, number>;
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/characteristics/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/characteristics/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './ranks';
2
+ export * from './characteristics';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,20 @@
1
+ var C = /* @__PURE__ */ ((t) => (t.BASIC = "BASIC", t.COMMON = "COMMON", t.RARE = "RARE", t.EPIC = "EPIC", t.LEGENDARY = "LEGENDARY", t.MYTHIC = "MYTHIC", t))(C || {});
2
+ const r = {
3
+ BASIC: { color: "#fff", strength: 0, id: C.BASIC },
4
+ COMMON: { color: "#813D31", strength: 1, id: C.COMMON },
5
+ RARE: { color: "#5B6870", strength: 2, id: C.RARE },
6
+ EPIC: { color: "#C46619", strength: 3, id: C.EPIC },
7
+ LEGENDARY: { color: "#88A3CB", strength: 4, id: C.LEGENDARY },
8
+ MYTHIC: { color: "#F6bF62", strength: 5, id: C.MYTHIC }
9
+ }, E = [
10
+ "vitality",
11
+ "strength",
12
+ "agility",
13
+ "intelligence",
14
+ "chance",
15
+ "wisdom"
16
+ ];
17
+ export {
18
+ E as CHARACTERISTICS,
19
+ r as RANKS
20
+ };
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './ranks';
2
+ export * from './characteristics';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1 @@
1
+ (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.utils={}))})(this,function(t){"use strict";var e=(i=>(i.BASIC="BASIC",i.COMMON="COMMON",i.RARE="RARE",i.EPIC="EPIC",i.LEGENDARY="LEGENDARY",i.MYTHIC="MYTHIC",i))(e||{});const o={BASIC:{color:"#fff",strength:0,id:e.BASIC},COMMON:{color:"#813D31",strength:1,id:e.COMMON},RARE:{color:"#5B6870",strength:2,id:e.RARE},EPIC:{color:"#C46619",strength:3,id:e.EPIC},LEGENDARY:{color:"#88A3CB",strength:4,id:e.LEGENDARY},MYTHIC:{color:"#F6bF62",strength:5,id:e.MYTHIC}},C=["vitality","strength","agility","intelligence","chance","wisdom"];t.CHARACTERISTICS=C,t.RANKS=o,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,4 @@
1
+ import { RankId } from './types';
2
+ import type { Rank } from './types';
3
+ export declare const RANKS: Record<RankId, Rank>;
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/ranks/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAO7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { RankId } from './types';
2
+ export const RANKS = {
3
+ BASIC: { color: '#fff', strength: 0, id: RankId.BASIC },
4
+ COMMON: { color: '#813D31', strength: 1, id: RankId.COMMON },
5
+ RARE: { color: '#5B6870', strength: 2, id: RankId.RARE },
6
+ EPIC: { color: '#C46619', strength: 3, id: RankId.EPIC },
7
+ LEGENDARY: { color: '#88A3CB', strength: 4, id: RankId.LEGENDARY },
8
+ MYTHIC: { color: '#F6bF62', strength: 5, id: RankId.MYTHIC },
9
+ };
10
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/ranks/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,MAAM,CAAC,MAAM,KAAK,GAAyB;IACzC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,EAAE;IACvD,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE;IAC5D,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,IAAI,EAAE;IACxD,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,IAAI,EAAE;IACxD,SAAS,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE;IAClE,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE;CACpD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './constants';
2
+ export type * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ranks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ranks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare enum RankId {
2
+ BASIC = "BASIC",
3
+ COMMON = "COMMON",
4
+ RARE = "RARE",
5
+ EPIC = "EPIC",
6
+ LEGENDARY = "LEGENDARY",
7
+ MYTHIC = "MYTHIC"
8
+ }
9
+ export type Rank<T extends RankId = RankId> = {
10
+ id: T;
11
+ color: `#${string}`;
12
+ strength: number;
13
+ };
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ranks/types.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IAC5C,EAAE,EAAE,CAAC,CAAC;IACN,KAAK,EAAE,IAAI,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export var RankId;
2
+ (function (RankId) {
3
+ RankId["BASIC"] = "BASIC";
4
+ RankId["COMMON"] = "COMMON";
5
+ RankId["RARE"] = "RARE";
6
+ RankId["EPIC"] = "EPIC";
7
+ RankId["LEGENDARY"] = "LEGENDARY";
8
+ RankId["MYTHIC"] = "MYTHIC";
9
+ })(RankId || (RankId = {}));
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ranks/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,iCAAuB,CAAA;IACvB,2BAAiB,CAAA;AACnB,CAAC,EAPW,MAAM,KAAN,MAAM,QAOjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opfr/utils-type",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "private": false,
5
5
  "description": "OPFR utils-type",
6
6
  "author": "Matthieu VEIGA",
@@ -33,5 +33,5 @@
33
33
  "node_modules",
34
34
  "dist"
35
35
  ],
36
- "gitHead": "6ddd4c0f7292e270a7cedb386e92c80ce195ee1f"
36
+ "gitHead": "029ab4b4c30e279aa90f28c6397382ff7d6e5996"
37
37
  }