@opfr/utils-type 0.18.7 → 1.0.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.
Files changed (95) hide show
  1. package/dist/index.d.ts +1 -6
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.es.js +1 -100
  4. package/dist/index.js +1 -6
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.umd.js +1 -1
  7. package/dist/{object/types.d.ts → object.d.ts} +1 -1
  8. package/dist/object.d.ts.map +1 -0
  9. package/dist/object.js +2 -0
  10. package/dist/object.js.map +1 -0
  11. package/dist/string.d.ts +2 -0
  12. package/dist/string.d.ts.map +1 -0
  13. package/dist/string.js +2 -0
  14. package/dist/string.js.map +1 -0
  15. package/package.json +4 -16
  16. package/dist/characteristics/constants.d.ts +0 -7
  17. package/dist/characteristics/constants.d.ts.map +0 -1
  18. package/dist/characteristics/constants.js +0 -19
  19. package/dist/characteristics/constants.js.map +0 -1
  20. package/dist/characteristics/index.d.ts +0 -3
  21. package/dist/characteristics/index.d.ts.map +0 -1
  22. package/dist/characteristics/index.js +0 -2
  23. package/dist/characteristics/index.js.map +0 -1
  24. package/dist/characteristics/types.d.ts +0 -10
  25. package/dist/characteristics/types.d.ts.map +0 -1
  26. package/dist/characteristics/types.js +0 -2
  27. package/dist/characteristics/types.js.map +0 -1
  28. package/dist/factions/constants.d.ts +0 -4
  29. package/dist/factions/constants.d.ts.map +0 -1
  30. package/dist/factions/constants.js +0 -24
  31. package/dist/factions/constants.js.map +0 -1
  32. package/dist/factions/index.d.ts +0 -3
  33. package/dist/factions/index.d.ts.map +0 -1
  34. package/dist/factions/index.js +0 -2
  35. package/dist/factions/index.js.map +0 -1
  36. package/dist/factions/types.d.ts +0 -8
  37. package/dist/factions/types.d.ts.map +0 -1
  38. package/dist/factions/types.js +0 -2
  39. package/dist/factions/types.js.map +0 -1
  40. package/dist/games/index.d.ts +0 -2
  41. package/dist/games/index.d.ts.map +0 -1
  42. package/dist/games/index.js +0 -2
  43. package/dist/games/index.js.map +0 -1
  44. package/dist/games/types.d.ts +0 -11
  45. package/dist/games/types.d.ts.map +0 -1
  46. package/dist/games/types.js +0 -2
  47. package/dist/games/types.js.map +0 -1
  48. package/dist/object/index.d.ts +0 -2
  49. package/dist/object/index.d.ts.map +0 -1
  50. package/dist/object/index.js +0 -2
  51. package/dist/object/index.js.map +0 -1
  52. package/dist/object/types.d.ts.map +0 -1
  53. package/dist/object/types.js +0 -2
  54. package/dist/object/types.js.map +0 -1
  55. package/dist/ranks/constants.d.ts +0 -6
  56. package/dist/ranks/constants.d.ts.map +0 -1
  57. package/dist/ranks/constants.js +0 -41
  58. package/dist/ranks/constants.js.map +0 -1
  59. package/dist/ranks/index.d.ts +0 -4
  60. package/dist/ranks/index.d.ts.map +0 -1
  61. package/dist/ranks/index.js +0 -3
  62. package/dist/ranks/index.js.map +0 -1
  63. package/dist/ranks/types.d.ts +0 -15
  64. package/dist/ranks/types.d.ts.map +0 -1
  65. package/dist/ranks/types.js +0 -10
  66. package/dist/ranks/types.js.map +0 -1
  67. package/dist/sort-values/constants.d.ts +0 -2
  68. package/dist/sort-values/constants.d.ts.map +0 -1
  69. package/dist/sort-values/constants.js +0 -2
  70. package/dist/sort-values/constants.js.map +0 -1
  71. package/dist/sort-values/index.d.ts +0 -4
  72. package/dist/sort-values/index.d.ts.map +0 -1
  73. package/dist/sort-values/index.js +0 -3
  74. package/dist/sort-values/index.js.map +0 -1
  75. package/dist/sort-values/types.d.ts +0 -4
  76. package/dist/sort-values/types.d.ts.map +0 -1
  77. package/dist/sort-values/types.js +0 -2
  78. package/dist/sort-values/types.js.map +0 -1
  79. package/dist/sort-values/utils.d.ts +0 -3
  80. package/dist/sort-values/utils.d.ts.map +0 -1
  81. package/dist/sort-values/utils.js +0 -10
  82. package/dist/sort-values/utils.js.map +0 -1
  83. package/dist/xp/index.d.ts +0 -3
  84. package/dist/xp/index.d.ts.map +0 -1
  85. package/dist/xp/index.js +0 -2
  86. package/dist/xp/index.js.map +0 -1
  87. package/dist/xp/types.d.ts +0 -2
  88. package/dist/xp/types.d.ts.map +0 -1
  89. package/dist/xp/types.js +0 -2
  90. package/dist/xp/types.js.map +0 -1
  91. package/dist/xp/utils.d.ts +0 -8
  92. package/dist/xp/utils.d.ts.map +0 -1
  93. package/dist/xp/utils.js +0 -18
  94. package/dist/xp/utils.js.map +0 -1
  95. package/locales/fr.json +0 -58
package/dist/index.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- export * from './ranks';
2
- export * from './characteristics';
3
- export * from './factions';
4
- export * from './sort-values';
5
- export * from './games';
6
1
  export * from './object';
7
- export * from './xp';
2
+ export * from './string';
8
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
package/dist/index.es.js CHANGED
@@ -1,100 +1 @@
1
- import { tns as r } from "@opfr/translate";
2
- import { formatNumber as e } from "@opfr/utils-lang";
3
- var n = /* @__PURE__ */ ((o) => (o.BASIC = "BASIC", o.COMMON = "COMMON", o.RARE = "RARE", o.EPIC = "EPIC", o.LEGENDARY = "LEGENDARY", o.MYTHIC = "MYTHIC", o))(n || {});
4
- const R = {
5
- BASIC: {
6
- color: "#fff",
7
- strength: 0,
8
- id: n.BASIC,
9
- name: (o, t = 1) => r("common", `ranks.${n.BASIC}.text`, { count: t, context: o })
10
- },
11
- COMMON: {
12
- color: "#813D31",
13
- strength: 1,
14
- id: n.COMMON,
15
- name: (o, t = 1) => r("common", `ranks.${n.COMMON}.text`, { count: t, context: o })
16
- },
17
- RARE: {
18
- color: "#5B6870",
19
- strength: 2,
20
- id: n.RARE,
21
- name: (o, t = 1) => r("common", `ranks.${n.RARE}.text`, { count: t, context: o })
22
- },
23
- EPIC: {
24
- color: "#C46619",
25
- strength: 3,
26
- id: n.EPIC,
27
- name: (o, t = 1) => r("common", `ranks.${n.EPIC}.text`, { count: t, context: o })
28
- },
29
- LEGENDARY: {
30
- color: "#88A3CB",
31
- strength: 4,
32
- id: n.LEGENDARY,
33
- name: (o, t = 1) => r("common", `ranks.${n.LEGENDARY}.text`, { count: t, context: o })
34
- },
35
- MYTHIC: {
36
- color: "#F6bF62",
37
- strength: 5,
38
- id: n.MYTHIC,
39
- name: (o, t = 1) => r("common", `ranks.${n.MYTHIC}.text`, { count: t, context: o })
40
- }
41
- }, p = [
42
- "vitality",
43
- "strength",
44
- "agility",
45
- "intelligence",
46
- "chance",
47
- "wisdom"
48
- ], M = 10, s = 1, L = [
49
- [200, 4],
50
- [100, 3],
51
- [50, 2],
52
- [0, s]
53
- ], N = 100, O = 10, S = {
54
- pirate: {
55
- name: "pirate",
56
- color: "#8A1623",
57
- role: "1047815125282848849"
58
- },
59
- marine: {
60
- name: "marine",
61
- color: "#387cbc",
62
- role: "1047816059937361940"
63
- },
64
- revolutionary: {
65
- name: "revolutionary",
66
- color: "#335635",
67
- role: "1047815105846444152"
68
- },
69
- citizen: {
70
- name: "citizen",
71
- color: "#fff",
72
- role: "1147953458507423874"
73
- }
74
- }, u = "citizen", l = ["category", "alpha", "quantity"], x = (o, t) => t === null ? null : o === t ? `-${o}` : t, c = {
75
- xp: "<:xp:1084914564379975772>"
76
- }, a = (o) => Math.round(5e3 * Math.pow(200, 0.01 * o) / 10) * 10, m = (o) => o >= 1 ? m(o - 1) + a(o) : 0, i = (o, t = 0) => o < m(t + 1) ? t : i(o, t + 1), A = (o) => Math.round(1e5 * Math.pow(50, 0.01 * o) / 10) * 10, C = (o) => o >= 1 ? C(o - 1) + A(o) : 0, E = (o, t = 0) => o < C(t + 1) ? t : E(o, t + 1), _ = ([o, t]) => t ? `${r("common", "xp.user", { amount: e(o), emoji: c.xp })} ${r("common", "xp.crew", { amount: e(t), emoji: c.xp })}` : r("common", "xp.user", {
77
- amount: e(o),
78
- emoji: c.xp
79
- });
80
- export {
81
- p as CHARACTERISTICS,
82
- s as CHARACTERISTIC_DEFAULT_POINT_COST,
83
- L as CHARACTERISTIC_POINT_COSTS,
84
- M as CHARACTERISTIC_POINT_PER_LEVEL,
85
- u as DEFAULT_FACTION,
86
- N as DEFAULT_MAX_HP,
87
- S as FACTIONS,
88
- O as HP_PER_VITALITY,
89
- R as RANKS,
90
- n as RankId,
91
- l as SORT_VALUES,
92
- A as crewXpToLevel,
93
- _ as displayXp,
94
- E as getCurrentCrewLevel,
95
- i as getCurrentLevel,
96
- x as getNewSortValue,
97
- C as totalCrewXpToLevel,
98
- m as totalXpToLevel,
99
- a as xpToLevel
100
- };
1
+
package/dist/index.js CHANGED
@@ -1,8 +1,3 @@
1
- export * from './ranks';
2
- export * from './characteristics';
3
- export * from './factions';
4
- export * from './sort-values';
5
- export * from './games';
6
1
  export * from './object';
7
- export * from './xp';
2
+ export * from './string';
8
3
  //# sourceMappingURL=index.js.map
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;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(t,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("@opfr/translate"),require("@opfr/utils-lang")):typeof define=="function"&&define.amd?define(["exports","@opfr/translate","@opfr/utils-lang"],C):(t=typeof globalThis<"u"?globalThis:t||self,C(t.utils={},t["@opfr/translate"],t["@opfr/utils-lang"]))})(this,(function(t,C,r){"use strict";var e=(o=>(o.BASIC="BASIC",o.COMMON="COMMON",o.RARE="RARE",o.EPIC="EPIC",o.LEGENDARY="LEGENDARY",o.MYTHIC="MYTHIC",o))(e||{});const R={BASIC:{color:"#fff",strength:0,id:e.BASIC,name:(o,n=1)=>C.tns("common",`ranks.${e.BASIC}.text`,{count:n,context:o})},COMMON:{color:"#813D31",strength:1,id:e.COMMON,name:(o,n=1)=>C.tns("common",`ranks.${e.COMMON}.text`,{count:n,context:o})},RARE:{color:"#5B6870",strength:2,id:e.RARE,name:(o,n=1)=>C.tns("common",`ranks.${e.RARE}.text`,{count:n,context:o})},EPIC:{color:"#C46619",strength:3,id:e.EPIC,name:(o,n=1)=>C.tns("common",`ranks.${e.EPIC}.text`,{count:n,context:o})},LEGENDARY:{color:"#88A3CB",strength:4,id:e.LEGENDARY,name:(o,n=1)=>C.tns("common",`ranks.${e.LEGENDARY}.text`,{count:n,context:o})},MYTHIC:{color:"#F6bF62",strength:5,id:e.MYTHIC,name:(o,n=1)=>C.tns("common",`ranks.${e.MYTHIC}.text`,{count:n,context:o})}},S=["vitality","strength","agility","intelligence","chance","wisdom"],a=10,A=1,s=[[200,4],[100,3],[50,2],[0,A]],f=100,L=10,_={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"}},l="citizen",N=["category","alpha","quantity"],O=(o,n)=>n===null?null:o===n?`-${o}`:n,T={xp:"<:xp:1084914564379975772>"},m=o=>Math.round(5e3*Math.pow(200,.01*o)/10)*10,c=o=>o>=1?c(o-1)+m(o):0,E=(o,n=0)=>o<c(n+1)?n:E(o,n+1),I=o=>Math.round(1e5*Math.pow(50,.01*o)/10)*10,i=o=>o>=1?i(o-1)+I(o):0,u=(o,n=0)=>o<i(n+1)?n:u(o,n+1),M=([o,n])=>n?`${C.tns("common","xp.user",{amount:r.formatNumber(o),emoji:T.xp})} ${C.tns("common","xp.crew",{amount:r.formatNumber(n),emoji:T.xp})}`:C.tns("common","xp.user",{amount:r.formatNumber(o),emoji:T.xp});t.CHARACTERISTICS=S,t.CHARACTERISTIC_DEFAULT_POINT_COST=A,t.CHARACTERISTIC_POINT_COSTS=s,t.CHARACTERISTIC_POINT_PER_LEVEL=a,t.DEFAULT_FACTION=l,t.DEFAULT_MAX_HP=f,t.FACTIONS=_,t.HP_PER_VITALITY=L,t.RANKS=R,t.RankId=e,t.SORT_VALUES=N,t.crewXpToLevel=I,t.displayXp=M,t.getCurrentCrewLevel=u,t.getCurrentLevel=E,t.getNewSortValue=O,t.totalCrewXpToLevel=i,t.totalXpToLevel=c,t.xpToLevel=m,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(n){typeof define=="function"&&define.amd?define(n):n()})((function(){"use strict"}));
@@ -1,4 +1,4 @@
1
1
  export type Path<T> = {
2
2
  [K in keyof T]: T[K] extends object ? `${K & string}.${keyof T[K] & string}` : never;
3
3
  }[keyof T];
4
- //# sourceMappingURL=types.d.ts.map
4
+ //# sourceMappingURL=object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAC/B,GAAG,CAAC,GAAG,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,GACtC,KAAK;CACV,CAAC,MAAM,CAAC,CAAC,CAAC"}
package/dist/object.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.js","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type SnakeToCamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${Lowercase<T>}${Capitalize<SnakeToCamelCase<Lowercase<U>>>}` : Lowercase<S>;
2
+ //# sourceMappingURL=string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAC3C,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,GAC7B,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAC9D,SAAS,CAAC,CAAC,CAAC,CAAC"}
package/dist/string.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=string.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opfr/utils-type",
3
- "version": "0.18.7",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "description": "OPFR utils-type",
6
6
  "author": "Matthieu VEIGA",
@@ -10,16 +10,6 @@
10
10
  "test": "vitest",
11
11
  "test:ci": "vitest run"
12
12
  },
13
- "peerDependencies": {
14
- "@opfr/emojis": "^0.16.0",
15
- "@opfr/translate": "^0.4.0",
16
- "@opfr/utils-lang": "^0.17.0"
17
- },
18
- "devDependencies": {
19
- "@opfr/emojis": "^0.16.0",
20
- "@opfr/translate": "^0.4.3",
21
- "@opfr/utils-lang": "^0.17.3"
22
- },
23
13
  "main": "dist/index.umd.js",
24
14
  "module": "dist/index.es.js",
25
15
  "types": "./dist/index.d.ts",
@@ -28,16 +18,14 @@
28
18
  "types": "./dist/index.d.ts",
29
19
  "import": "./dist/index.es.js",
30
20
  "require": "./dist/index.umd.js"
31
- },
32
- "./locales/*.json": "./locales/*.json"
21
+ }
33
22
  },
34
23
  "files": [
35
- "dist",
36
- "locales"
24
+ "dist"
37
25
  ],
38
26
  "eslintIgnore": [
39
27
  "node_modules",
40
28
  "dist"
41
29
  ],
42
- "gitHead": "3d75a08b966e5099143579f2706860c0cacc31cd"
30
+ "gitHead": "dd1f758862242dd55d92fc3faff5ce7d00584fe6"
43
31
  }
@@ -1,7 +0,0 @@
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;
7
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,19 +0,0 @@
1
- export const CHARACTERISTICS = [
2
- 'vitality',
3
- 'strength',
4
- 'agility',
5
- 'intelligence',
6
- 'chance',
7
- 'wisdom',
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;
19
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
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"}
@@ -1,3 +0,0 @@
1
- export type * from './types';
2
- export * from './constants';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/characteristics/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './constants';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/characteristics/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { CHARACTERISTICS } from './constants';
2
- export type Characteristic = (typeof CHARACTERISTICS)[number];
3
- export type CharacteristicsRecord = Record<Characteristic, number>;
4
- export type CharacteristicRequirement = {
5
- [p in Characteristic]?: number;
6
- } | {
7
- sum: number;
8
- characteristics: Characteristic[];
9
- };
10
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
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;AAEnE,MAAM,MAAM,yBAAyB,GACjC;KAAG,CAAC,IAAI,cAAc,CAAC,CAAC,EAAE,MAAM;CAAE,GAClC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/characteristics/types.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type { FactionId, FactionList } from './types';
2
- export declare const FACTIONS: FactionList;
3
- export declare const DEFAULT_FACTION: FactionId;
4
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,24 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,3 +0,0 @@
1
- export type * from './types';
2
- export * from './constants';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factions/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './constants';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factions/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
@@ -1,8 +0,0 @@
1
- export type FactionId = 'pirate' | 'marine' | 'revolutionary' | 'citizen';
2
- export type Faction = {
3
- name: FactionId;
4
- color: `#${string}`;
5
- role: string;
6
- };
7
- export type FactionList = Record<FactionId, Faction>;
8
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/factions/types.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export type * from './types';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/games/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/games/index.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- export type GameState = -1 | 0 | 1;
2
- export type GameType = 'dice' | 'rps' | 'qod' | 'black_jack' | 'guess';
3
- export type DiceType = 1 | 2 | 3 | 4 | 5 | 6;
4
- export type RPS = 'rock' | 'paper' | 'scissor';
5
- export type CardSuite = 'spades' | 'diamonds' | 'clubs' | 'hearts';
6
- export type CardValue = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | 'J' | 'Q' | 'K';
7
- export type Card = {
8
- suit: CardSuite;
9
- value: CardValue;
10
- };
11
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/games/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEnC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,YAAY,GAAG,OAAO,CAAC;AAEvE,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE7C,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AACnE,MAAM,MAAM,SAAS,GACjB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AAER,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/games/types.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export type * from './types';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/object/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/object/index.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/object/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAC/B,GAAG,CAAC,GAAG,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,GACtC,KAAK;CACV,CAAC,MAAM,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/object/types.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import { RankId } from './types';
2
- import type { Rank } from './types';
3
- export declare const RANKS: {
4
- [Key in RankId]: Rank<Key>;
5
- };
6
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/ranks/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,KAAK,EAAE;KAAG,GAAG,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC;CA2CtC,CAAC"}
@@ -1,41 +0,0 @@
1
- import { tns } from '@opfr/translate';
2
- import { RankId } from './types';
3
- export const RANKS = {
4
- BASIC: {
5
- color: '#fff',
6
- strength: 0,
7
- id: RankId.BASIC,
8
- name: (context, count = 1) => tns('common', `ranks.${RankId.BASIC}.text`, { count, context }),
9
- },
10
- COMMON: {
11
- color: '#813D31',
12
- strength: 1,
13
- id: RankId.COMMON,
14
- name: (context, count = 1) => tns('common', `ranks.${RankId.COMMON}.text`, { count, context }),
15
- },
16
- RARE: {
17
- color: '#5B6870',
18
- strength: 2,
19
- id: RankId.RARE,
20
- name: (context, count = 1) => tns('common', `ranks.${RankId.RARE}.text`, { count, context }),
21
- },
22
- EPIC: {
23
- color: '#C46619',
24
- strength: 3,
25
- id: RankId.EPIC,
26
- name: (context, count = 1) => tns('common', `ranks.${RankId.EPIC}.text`, { count, context }),
27
- },
28
- LEGENDARY: {
29
- color: '#88A3CB',
30
- strength: 4,
31
- id: RankId.LEGENDARY,
32
- name: (context, count = 1) => tns('common', `ranks.${RankId.LEGENDARY}.text`, { count, context }),
33
- },
34
- MYTHIC: {
35
- color: '#F6bF62',
36
- strength: 5,
37
- id: RankId.MYTHIC,
38
- name: (context, count = 1) => tns('common', `ranks.${RankId.MYTHIC}.text`, { count, context }),
39
- },
40
- };
41
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/ranks/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,MAAM,CAAC,MAAM,KAAK,GAAmC;IACnD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,MAAM,CAAC,KAAK;QAChB,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,CAC3B,GAAG,CAAC,QAAQ,EAAE,SAAS,MAAM,CAAC,KAAK,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;KAClE;IACD,MAAM,EAAE;QACN,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,MAAM,CAAC,MAAM;QACjB,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,CAC3B,GAAG,CAAC,QAAQ,EAAE,SAAS,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;KACnE;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,MAAM,CAAC,IAAI;QACf,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,CAC3B,GAAG,CAAC,QAAQ,EAAE,SAAS,MAAM,CAAC,IAAI,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;KACjE;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,MAAM,CAAC,IAAI;QACf,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,CAC3B,GAAG,CAAC,QAAQ,EAAE,SAAS,MAAM,CAAC,IAAI,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;KACjE;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,MAAM,CAAC,SAAS;QACpB,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,CAC3B,GAAG,CAAC,QAAQ,EAAE,SAAS,MAAM,CAAC,SAAS,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;KACtE;IACD,MAAM,EAAE;QACN,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,MAAM,CAAC,MAAM;QACjB,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,CAC3B,GAAG,CAAC,QAAQ,EAAE,SAAS,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;KACnE;CACO,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './constants';
2
- export type { Rank } from './types';
3
- export { RankId } from './types';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ranks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './constants';
2
- export { RankId } from './types';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ranks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
@@ -1,15 +0,0 @@
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
- name: (context: 'm' | 'f', count?: number) => string;
14
- };
15
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
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;IACjB,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CACtD,CAAC"}
@@ -1,10 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export declare const SORT_VALUES: readonly ["category", "alpha", "quantity"];
2
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/sort-values/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,4CAA6C,CAAC"}
@@ -1,2 +0,0 @@
1
- export const SORT_VALUES = ['category', 'alpha', 'quantity'];
2
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
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"}
@@ -1,4 +0,0 @@
1
- export * from './constants';
2
- export type * from './types';
3
- export * from './utils';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './constants';
2
- export * from './utils';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,cAAc,SAAS,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { SORT_VALUES } from './constants';
2
- export type SortValue = (typeof SORT_VALUES)[number] | `-${(typeof SORT_VALUES)[number]}` | null;
3
- export type RestrictedSortValue = (typeof SORT_VALUES)[number] | null;
4
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/sort-values/types.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import type { RestrictedSortValue, SortValue } from './types';
2
- export declare const getNewSortValue: (old: SortValue, newValue: RestrictedSortValue) => SortValue;
3
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/sort-values/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9D,eAAO,MAAM,eAAe,GAC1B,KAAK,SAAS,EACd,UAAU,mBAAmB,KAC5B,SAQF,CAAC"}
@@ -1,10 +0,0 @@
1
- export const getNewSortValue = (old, newValue) => {
2
- if (newValue === null) {
3
- return null;
4
- }
5
- if (old === newValue) {
6
- return `-${old}`;
7
- }
8
- return newValue;
9
- };
10
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/sort-values/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,GAAc,EACd,QAA6B,EAClB,EAAE;IACb,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;QACrB,OAAO,IAAI,GAAG,EAAE,CAAC;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- export type * from './types';
2
- export * from './utils';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/xp/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,cAAc,SAAS,CAAC"}
package/dist/xp/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './utils';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/xp/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export type XpArray = [number, number];
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/xp/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
package/dist/xp/types.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/xp/types.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export declare const xpToLevel: (level: number) => number;
2
- export declare const totalXpToLevel: (level: number) => number;
3
- export declare const getCurrentLevel: (xp: number, level?: number) => number;
4
- export declare const crewXpToLevel: (level: number) => number;
5
- export declare const totalCrewXpToLevel: (level: number) => number;
6
- export declare const getCurrentCrewLevel: (xp: number, level?: number) => number;
7
- export declare const displayXp: ([user, crew]: [number, number]) => string;
8
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/xp/utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,WACqB,CAAC;AAE7D,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MACgB,CAAC;AAEhE,eAAO,MAAM,eAAe,GAAI,IAAI,MAAM,EAAE,QAAO,MAAU,KAAG,MACS,CAAC;AAE1E,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,WACmB,CAAC;AAE/D,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,MACoB,CAAC;AAExE,eAAO,MAAM,mBAAmB,GAAI,IAAI,MAAM,EAAE,QAAO,MAAU,KAAG,MAG5B,CAAC;AAEzC,eAAO,MAAM,SAAS,GAAI,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,WAMhD,CAAC"}
package/dist/xp/utils.js DELETED
@@ -1,18 +0,0 @@
1
- import { emojis } from '@opfr/emojis';
2
- import { tns } from '@opfr/translate';
3
- import { formatNumber } from '@opfr/utils-lang';
4
- export const xpToLevel = (level) => Math.round((5000 * Math.pow(200, 0.01 * level)) / 10) * 10;
5
- export const totalXpToLevel = (level) => level >= 1 ? totalXpToLevel(level - 1) + xpToLevel(level) : 0;
6
- export const getCurrentLevel = (xp, level = 0) => xp < totalXpToLevel(level + 1) ? level : getCurrentLevel(xp, level + 1);
7
- export const crewXpToLevel = (level) => Math.round((100_000 * Math.pow(50, 0.01 * level)) / 10) * 10;
8
- export const totalCrewXpToLevel = (level) => level >= 1 ? totalCrewXpToLevel(level - 1) + crewXpToLevel(level) : 0;
9
- export const getCurrentCrewLevel = (xp, level = 0) => xp < totalCrewXpToLevel(level + 1)
10
- ? level
11
- : getCurrentCrewLevel(xp, level + 1);
12
- export const displayXp = ([user, crew]) => crew
13
- ? `${tns('common', 'xp.user', { amount: formatNumber(user), emoji: emojis.xp })} ${tns('common', 'xp.crew', { amount: formatNumber(crew), emoji: emojis.xp })}`
14
- : tns('common', 'xp.user', {
15
- amount: formatNumber(user),
16
- emoji: emojis.xp,
17
- });
18
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/xp/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE,CACzC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE,CACtD,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAU,EAAE,QAAgB,CAAC,EAAU,EAAE,CACvE,EAAE,GAAG,cAAc,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,EAAE,CAC7C,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;AAE/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAU,EAAE,CAC1D,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAU,EAAE,QAAgB,CAAC,EAAU,EAAE,CAC3E,EAAE,GAAG,kBAAkB,CAAC,KAAK,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC,KAAK;IACP,CAAC,CAAC,mBAAmB,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAmB,EAAE,EAAE,CAC1D,IAAI;IACF,CAAC,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,EAAE;IAC/J,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE;QACvB,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC;QAC1B,KAAK,EAAE,MAAM,CAAC,EAAE;KACjB,CAAC,CAAC"}
package/locales/fr.json DELETED
@@ -1,58 +0,0 @@
1
- {
2
- "xp": {
3
- "user": "{{amount}} {{emoji}}",
4
- "crew": "(équipage: {{amount}} {{emoji}})"
5
- },
6
- "ranks": {
7
- "BASIC": {
8
- "text_one": "basique",
9
- "text_other": "basiques"
10
- },
11
- "COMMON": {
12
- "text_one": "commun",
13
- "text_m_one": "commun",
14
- "text_f_one": "commune",
15
- "text_other": "communs",
16
- "text_m_other": "communs",
17
- "text_f_other": "communes"
18
- },
19
- "RARE": {
20
- "text_one": "rare",
21
- "text_other": "rares"
22
- },
23
- "EPIC": {
24
- "text_one": "épique",
25
- "text_other": "épiques"
26
- },
27
- "LEGENDARY": {
28
- "text_one": "légendaire",
29
- "text_other": "légendaires"
30
- },
31
- "MYTHIC": {
32
- "text_one": "mythique",
33
- "text_other": "mythiques"
34
- }
35
- },
36
- "characteristics": {
37
- "agility": "Agilité",
38
- "agility_min": "Ag.",
39
- "strength": "Force",
40
- "strength_min": "Fo.",
41
- "intelligence": "Intelligence",
42
- "intelligence_min": "Int.",
43
- "chance": "Chance",
44
- "chance_min": "Ch.",
45
- "vitality": "Vitalité",
46
- "vitality_min": "Vit.",
47
- "wisdom": "Sagesse",
48
- "wisdom_min": "Sa.",
49
- "points_one": "1 point",
50
- "points_other": "{{count}} points"
51
- },
52
- "factions": {
53
- "pirate": "Pirate",
54
- "marine": "Marine",
55
- "revolutionary": "Révolutionnaire",
56
- "citizen": "Citoyen"
57
- }
58
- }