@opfr/utils-type 0.5.3 → 0.6.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.
@@ -0,0 +1,4 @@
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
@@ -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,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/factions/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/factions/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,8 @@
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
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/factions/types.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export * from './ranks';
2
2
  export * from './characteristics';
3
+ export * from './factions';
4
+ export * from './sort-values';
3
5
  //# 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"}
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,45 @@
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 || {});
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
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 = [
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
+ ], i = {
17
+ pirate: {
18
+ name: "pirate",
19
+ color: "#8A1623",
20
+ role: "1047815125282848849"
21
+ },
22
+ marine: {
23
+ name: "marine",
24
+ color: "#387cbc",
25
+ role: "1047816059937361940"
26
+ },
27
+ revolutionary: {
28
+ name: "revolutionary",
29
+ color: "#335635",
30
+ role: "1047815105846444152"
31
+ },
32
+ citizen: {
33
+ name: "citizen",
34
+ color: "#fff",
35
+ role: "1147953458507423874"
36
+ }
37
+ }, c = "citizen", n = ["category", "alpha", "quantity"];
17
38
  export {
18
- E as CHARACTERISTICS,
39
+ e as CHARACTERISTICS,
40
+ c as DEFAULT_FACTION,
41
+ i as FACTIONS,
19
42
  r as RANKS,
20
- C as RankId
43
+ t as RankId,
44
+ n as SORT_VALUES
21
45
  };
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
1
  export * from './ranks';
2
2
  export * from './characteristics';
3
+ export * from './factions';
4
+ export * from './sort-values';
3
5
  //# 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"}
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(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}},n=["vitality","strength","agility","intelligence","chance","wisdom"];t.CHARACTERISTICS=n,t.RANKS=o,t.RankId=e,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
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=(o=>(o.BASIC="BASIC",o.COMMON="COMMON",o.RARE="RARE",o.EPIC="EPIC",o.LEGENDARY="LEGENDARY",o.MYTHIC="MYTHIC",o))(e||{});const i={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}},n=["vitality","strength","agility","intelligence","chance","wisdom"],r={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"}},c="citizen",A=["category","alpha","quantity"];t.CHARACTERISTICS=n,t.DEFAULT_FACTION=c,t.FACTIONS=r,t.RANKS=i,t.RankId=e,t.SORT_VALUES=A,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,2 @@
1
+ export declare const SORT_VALUES: readonly ["category", "alpha", "quantity"];
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -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,2 @@
1
+ export const SORT_VALUES = ['category', 'alpha', 'quantity'];
2
+ //# sourceMappingURL=constants.js.map
@@ -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,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/sort-values/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/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,4 @@
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
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/sort-values/types.ts"],"names":[],"mappings":""}
package/locales/fr.json CHANGED
@@ -44,5 +44,11 @@
44
44
  "wisdom_min": "Sa.",
45
45
  "points_one": "1 point",
46
46
  "points_other": "{{count}} points"
47
+ },
48
+ "factions": {
49
+ "pirate": "Pirate",
50
+ "marine": "Marine",
51
+ "revolutionary": "Révolutionnaire",
52
+ "citizen": "Citoyen"
47
53
  }
48
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opfr/utils-type",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
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": "9b2f7c3603100d7ea60a4c6413e7e2dbe3706b54"
36
+ "gitHead": "61ae62b3dc69ba68c59849bccd090f6ef246f110"
37
37
  }