@opfr/utils-type 0.5.3 → 0.6.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.
- package/dist/characteristics/constants.d.ts +5 -0
- package/dist/characteristics/constants.d.ts.map +1 -1
- package/dist/characteristics/constants.js +10 -0
- package/dist/characteristics/constants.js.map +1 -1
- package/dist/factions/constants.d.ts +4 -0
- package/dist/factions/constants.d.ts.map +1 -0
- package/dist/factions/constants.js +24 -0
- package/dist/factions/constants.js.map +1 -0
- package/dist/factions/index.d.ts +3 -0
- package/dist/factions/index.d.ts.map +1 -0
- package/dist/factions/index.js +2 -0
- package/dist/factions/index.js.map +1 -0
- package/dist/factions/types.d.ts +8 -0
- package/dist/factions/types.d.ts.map +1 -0
- package/dist/factions/types.js +2 -0
- package/dist/factions/types.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +47 -13
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/sort-values/constants.d.ts +2 -0
- package/dist/sort-values/constants.d.ts.map +1 -0
- package/dist/sort-values/constants.js +2 -0
- package/dist/sort-values/constants.js.map +1 -0
- package/dist/sort-values/index.d.ts +3 -0
- package/dist/sort-values/index.d.ts.map +1 -0
- package/dist/sort-values/index.js +2 -0
- package/dist/sort-values/index.js.map +1 -0
- package/dist/sort-values/types.d.ts +4 -0
- package/dist/sort-values/types.d.ts.map +1 -0
- package/dist/sort-values/types.js +2 -0
- package/dist/sort-values/types.js.map +1 -0
- package/locales/fr.json +6 -0
- package/package.json +2 -3
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export declare const CHARACTERISTICS: readonly ["vitality", "strength", "agility", "intelligence", "chance", "wisdom"];
|
|
2
|
+
export declare const CHARACTERISTIC_POINT_PER_LEVEL = 10;
|
|
3
|
+
export declare const CHARACTERISTIC_DEFAULT_POINT_COST = 1;
|
|
4
|
+
export declare const CHARACTERISTIC_POINT_COSTS: readonly [readonly [200, 4], readonly [100, 3], readonly [50, 2], readonly [0, 1]];
|
|
5
|
+
export declare const DEFAULT_MAX_HP = 100;
|
|
6
|
+
export declare const HP_PER_VITALITY = 10;
|
|
2
7
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/characteristics/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,kFAOlB,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/characteristics/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,kFAOlB,CAAC;AAEX,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,eAAO,MAAM,0BAA0B,oFAK7B,CAAC;AAEX,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,eAAO,MAAM,eAAe,KAAK,CAAC"}
|
|
@@ -6,4 +6,14 @@ export const CHARACTERISTICS = [
|
|
|
6
6
|
'chance',
|
|
7
7
|
'wisdom',
|
|
8
8
|
];
|
|
9
|
+
export const CHARACTERISTIC_POINT_PER_LEVEL = 10;
|
|
10
|
+
export const CHARACTERISTIC_DEFAULT_POINT_COST = 1;
|
|
11
|
+
export const CHARACTERISTIC_POINT_COSTS = [
|
|
12
|
+
[200, 4],
|
|
13
|
+
[100, 3],
|
|
14
|
+
[50, 2],
|
|
15
|
+
[0, CHARACTERISTIC_DEFAULT_POINT_COST],
|
|
16
|
+
];
|
|
17
|
+
export const DEFAULT_MAX_HP = 100;
|
|
18
|
+
export const HP_PER_VITALITY = 10;
|
|
9
19
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +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"}
|
|
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;AAEX,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC;AAEnD,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,CAAC,GAAG,EAAE,CAAC,CAAC;IACR,CAAC,GAAG,EAAE,CAAC,CAAC;IACR,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,CAAC,CAAC,EAAE,iCAAiC,CAAC;CAC9B,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/factions/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtD,eAAO,MAAM,QAAQ,EAAE,WAqBtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAAqB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const FACTIONS = {
|
|
2
|
+
pirate: {
|
|
3
|
+
name: 'pirate',
|
|
4
|
+
color: '#8A1623',
|
|
5
|
+
role: '1047815125282848849',
|
|
6
|
+
},
|
|
7
|
+
marine: {
|
|
8
|
+
name: 'marine',
|
|
9
|
+
color: '#387cbc',
|
|
10
|
+
role: '1047816059937361940',
|
|
11
|
+
},
|
|
12
|
+
revolutionary: {
|
|
13
|
+
name: 'revolutionary',
|
|
14
|
+
color: '#335635',
|
|
15
|
+
role: '1047815105846444152',
|
|
16
|
+
},
|
|
17
|
+
citizen: {
|
|
18
|
+
name: 'citizen',
|
|
19
|
+
color: '#fff',
|
|
20
|
+
role: '1147953458507423874',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export const DEFAULT_FACTION = 'citizen';
|
|
24
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/factions/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAgB;IACnC,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,qBAAqB;KAC5B;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,qBAAqB;KAC5B;IACD,aAAa,EAAE;QACb,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,qBAAqB;KAC5B;IACD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,qBAAqB;KAC5B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factions/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factions/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/factions/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,eAAe,GAAG,SAAS,CAAC;AAE1E,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,IAAI,MAAM,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/factions/types.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -1,21 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
const
|
|
3
|
-
BASIC: { color: "#fff", strength: 0, id:
|
|
4
|
-
COMMON: { color: "#813D31", strength: 1, id:
|
|
5
|
-
RARE: { color: "#5B6870", strength: 2, id:
|
|
6
|
-
EPIC: { color: "#C46619", strength: 3, id:
|
|
7
|
-
LEGENDARY: { color: "#88A3CB", strength: 4, id:
|
|
8
|
-
MYTHIC: { color: "#F6bF62", strength: 5, id:
|
|
9
|
-
},
|
|
1
|
+
var t = /* @__PURE__ */ ((o) => (o.BASIC = "BASIC", o.COMMON = "COMMON", o.RARE = "RARE", o.EPIC = "EPIC", o.LEGENDARY = "LEGENDARY", o.MYTHIC = "MYTHIC", o))(t || {});
|
|
2
|
+
const C = {
|
|
3
|
+
BASIC: { color: "#fff", strength: 0, id: t.BASIC },
|
|
4
|
+
COMMON: { color: "#813D31", strength: 1, id: t.COMMON },
|
|
5
|
+
RARE: { color: "#5B6870", strength: 2, id: t.RARE },
|
|
6
|
+
EPIC: { color: "#C46619", strength: 3, id: t.EPIC },
|
|
7
|
+
LEGENDARY: { color: "#88A3CB", strength: 4, id: t.LEGENDARY },
|
|
8
|
+
MYTHIC: { color: "#F6bF62", strength: 5, id: t.MYTHIC }
|
|
9
|
+
}, e = [
|
|
10
10
|
"vitality",
|
|
11
11
|
"strength",
|
|
12
12
|
"agility",
|
|
13
13
|
"intelligence",
|
|
14
14
|
"chance",
|
|
15
15
|
"wisdom"
|
|
16
|
-
]
|
|
16
|
+
], A = 10, r = 1, c = [
|
|
17
|
+
[200, 4],
|
|
18
|
+
[100, 3],
|
|
19
|
+
[50, 2],
|
|
20
|
+
[0, r]
|
|
21
|
+
], n = 100, E = 10, i = {
|
|
22
|
+
pirate: {
|
|
23
|
+
name: "pirate",
|
|
24
|
+
color: "#8A1623",
|
|
25
|
+
role: "1047815125282848849"
|
|
26
|
+
},
|
|
27
|
+
marine: {
|
|
28
|
+
name: "marine",
|
|
29
|
+
color: "#387cbc",
|
|
30
|
+
role: "1047816059937361940"
|
|
31
|
+
},
|
|
32
|
+
revolutionary: {
|
|
33
|
+
name: "revolutionary",
|
|
34
|
+
color: "#335635",
|
|
35
|
+
role: "1047815105846444152"
|
|
36
|
+
},
|
|
37
|
+
citizen: {
|
|
38
|
+
name: "citizen",
|
|
39
|
+
color: "#fff",
|
|
40
|
+
role: "1147953458507423874"
|
|
41
|
+
}
|
|
42
|
+
}, T = "citizen", I = ["category", "alpha", "quantity"];
|
|
17
43
|
export {
|
|
18
|
-
|
|
19
|
-
r as
|
|
20
|
-
|
|
44
|
+
e as CHARACTERISTICS,
|
|
45
|
+
r as CHARACTERISTIC_DEFAULT_POINT_COST,
|
|
46
|
+
c as CHARACTERISTIC_POINT_COSTS,
|
|
47
|
+
A as CHARACTERISTIC_POINT_PER_LEVEL,
|
|
48
|
+
T as DEFAULT_FACTION,
|
|
49
|
+
n as DEFAULT_MAX_HP,
|
|
50
|
+
i as FACTIONS,
|
|
51
|
+
E as HP_PER_VITALITY,
|
|
52
|
+
C as RANKS,
|
|
53
|
+
t as RankId,
|
|
54
|
+
I as SORT_VALUES
|
|
21
55
|
};
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(C,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(C=typeof globalThis<"u"?globalThis:C||self,T(C.utils={}))})(this,function(C){"use strict";var T=(A=>(A.BASIC="BASIC",A.COMMON="COMMON",A.RARE="RARE",A.EPIC="EPIC",A.LEGENDARY="LEGENDARY",A.MYTHIC="MYTHIC",A))(T||{});const t={BASIC:{color:"#fff",strength:0,id:T.BASIC},COMMON:{color:"#813D31",strength:1,id:T.COMMON},RARE:{color:"#5B6870",strength:2,id:T.RARE},EPIC:{color:"#C46619",strength:3,id:T.EPIC},LEGENDARY:{color:"#88A3CB",strength:4,id:T.LEGENDARY},MYTHIC:{color:"#F6bF62",strength:5,id:T.MYTHIC}},n=["vitality","strength","agility","intelligence","chance","wisdom"],o=10,e=1,i=[[200,4],[100,3],[50,2],[0,e]],E=100,I=10,c={pirate:{name:"pirate",color:"#8A1623",role:"1047815125282848849"},marine:{name:"marine",color:"#387cbc",role:"1047816059937361940"},revolutionary:{name:"revolutionary",color:"#335635",role:"1047815105846444152"},citizen:{name:"citizen",color:"#fff",role:"1147953458507423874"}},R="citizen",S=["category","alpha","quantity"];C.CHARACTERISTICS=n,C.CHARACTERISTIC_DEFAULT_POINT_COST=e,C.CHARACTERISTIC_POINT_COSTS=i,C.CHARACTERISTIC_POINT_PER_LEVEL=o,C.DEFAULT_FACTION=R,C.DEFAULT_MAX_HP=E,C.FACTIONS=c,C.HP_PER_VITALITY=I,C.RANKS=t,C.RankId=T,C.SORT_VALUES=S,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/sort-values/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,4CAA6C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/sort-values/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sort-values/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,SAAS,GACjB,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,GAC5B,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,EAAE,GAClC,IAAI,CAAC;AAET,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/sort-values/types.ts"],"names":[],"mappings":""}
|
package/locales/fr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opfr/utils-type",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OPFR utils-type",
|
|
6
6
|
"author": "Matthieu VEIGA",
|
|
@@ -32,6 +32,5 @@
|
|
|
32
32
|
"eslintIgnore": [
|
|
33
33
|
"node_modules",
|
|
34
34
|
"dist"
|
|
35
|
-
]
|
|
36
|
-
"gitHead": "9b2f7c3603100d7ea60a4c6413e7e2dbe3706b54"
|
|
35
|
+
]
|
|
37
36
|
}
|