@opfr/utils-type 0.4.0 → 0.4.2
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.es.js +11 -16
- package/dist/index.umd.js +1 -1
- package/dist/ranks/constants.d.ts +2 -2
- package/dist/ranks/constants.d.ts.map +1 -1
- package/dist/ranks/constants.js +7 -12
- package/dist/ranks/constants.js.map +1 -1
- package/dist/ranks/types.d.ts +8 -2
- package/dist/ranks/types.d.ts.map +1 -1
- package/dist/ranks/types.js +9 -1
- package/dist/ranks/types.js.map +1 -1
- package/locales/fr.json +48 -0
- package/package.json +6 -4
package/dist/index.es.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Gold: { color: "#C46619", strength: 3, id: "Gold" },
|
|
11
|
-
Platinum: { color: "#88A3CB", strength: 4, id: "Platinum" },
|
|
12
|
-
Diamond: { color: "#F6bF62", strength: 5, id: "Diamond" }
|
|
13
|
-
}, i = [
|
|
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 = [
|
|
14
10
|
"vitality",
|
|
15
11
|
"strength",
|
|
16
12
|
"agility",
|
|
@@ -19,7 +15,6 @@ const o = [
|
|
|
19
15
|
"wisdom"
|
|
20
16
|
];
|
|
21
17
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
o as RANK_IDS
|
|
18
|
+
E as CHARACTERISTICS,
|
|
19
|
+
r as RANKS
|
|
25
20
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e
|
|
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"})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { RankId } from './types';
|
|
2
|
+
import type { Rank } from './types';
|
|
3
3
|
export declare const RANKS: Record<RankId, Rank>;
|
|
4
4
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/ranks/constants.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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"}
|
package/dist/ranks/constants.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
'Bronze',
|
|
3
|
-
'Silver',
|
|
4
|
-
'Gold',
|
|
5
|
-
'Platinum',
|
|
6
|
-
'Diamond',
|
|
7
|
-
];
|
|
1
|
+
import { RankId } from './types';
|
|
8
2
|
export const RANKS = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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 },
|
|
14
9
|
};
|
|
15
10
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/ranks/constants.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dist/ranks/types.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare enum RankId {
|
|
2
|
+
BASIC = "BASIC",
|
|
3
|
+
COMMON = "COMMON",
|
|
4
|
+
RARE = "RARE",
|
|
5
|
+
EPIC = "EPIC",
|
|
6
|
+
LEGENDARY = "LEGENDARY",
|
|
7
|
+
MYTHIC = "MYTHIC"
|
|
8
|
+
}
|
|
3
9
|
export type Rank = {
|
|
4
10
|
id: RankId;
|
|
5
11
|
color: `#${string}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ranks/types.ts"],"names":[],"mappings":"AAAA,
|
|
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,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,IAAI,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/dist/ranks/types.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export
|
|
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 = {}));
|
|
2
10
|
//# sourceMappingURL=types.js.map
|
package/dist/ranks/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ranks/types.ts"],"names":[],"mappings":""}
|
|
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/locales/fr.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ranks": {
|
|
3
|
+
"BASIC": {
|
|
4
|
+
"text_one": "basique",
|
|
5
|
+
"text_other": "basiques"
|
|
6
|
+
},
|
|
7
|
+
"COMMON": {
|
|
8
|
+
"text_one": "commun",
|
|
9
|
+
"text_m_one": "commun",
|
|
10
|
+
"text_f_one": "commune",
|
|
11
|
+
"text_other": "communs",
|
|
12
|
+
"text_m_other": "communs",
|
|
13
|
+
"text_f_other": "communes"
|
|
14
|
+
},
|
|
15
|
+
"RARE": {
|
|
16
|
+
"text_one": "rare",
|
|
17
|
+
"text_other": "rares"
|
|
18
|
+
},
|
|
19
|
+
"EPIC": {
|
|
20
|
+
"text_one": "épique",
|
|
21
|
+
"text_other": "épiques"
|
|
22
|
+
},
|
|
23
|
+
"LEGENDARY": {
|
|
24
|
+
"text_one": "légendaire",
|
|
25
|
+
"text_other": "légendaires"
|
|
26
|
+
},
|
|
27
|
+
"MYTHIC": {
|
|
28
|
+
"text_one": "mythique",
|
|
29
|
+
"text_other": "mythiques"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"characteristics": {
|
|
33
|
+
"agility": "Agilité",
|
|
34
|
+
"agility_min": "Ag.",
|
|
35
|
+
"strength": "Force",
|
|
36
|
+
"strength_min": "Fo.",
|
|
37
|
+
"intelligence": "Intelligence",
|
|
38
|
+
"intelligence_min": "Int.",
|
|
39
|
+
"chance": "Chance",
|
|
40
|
+
"chance_min": "Ch.",
|
|
41
|
+
"vitality": "Vitalité",
|
|
42
|
+
"vitality_min": "Vit.",
|
|
43
|
+
"wisdom": "Sagesse",
|
|
44
|
+
"wisdom_min": "Sa.",
|
|
45
|
+
"points_one": "1 point",
|
|
46
|
+
"points_other": "{{count}} points"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opfr/utils-type",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OPFR utils-type",
|
|
6
6
|
"author": "Matthieu VEIGA",
|
|
@@ -22,14 +22,16 @@
|
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"import": "./dist/index.es.js",
|
|
24
24
|
"require": "./dist/index.umd.js"
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"./locales/*.json": "./locales/*.json"
|
|
26
27
|
},
|
|
27
28
|
"files": [
|
|
28
|
-
"dist"
|
|
29
|
+
"dist",
|
|
30
|
+
"locales"
|
|
29
31
|
],
|
|
30
32
|
"eslintIgnore": [
|
|
31
33
|
"node_modules",
|
|
32
34
|
"dist"
|
|
33
35
|
],
|
|
34
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "60e5a529a956ef2d0e312c2b344a86de927e78af"
|
|
35
37
|
}
|