@vestcards/shared 0.2.0 → 0.4.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.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i=(a=>(a.Draft="draft",a.Review="to_review",a.Published="published",a.Archived="archived",a))(i||{});const l=["matemática","geografia","física","biologia","história","literatura","gramática","sociologia","química","filosofia","redação","artes","inglês"],r={história:"quaternary",geografia:"tertiary",matemática:"secondary",biologia:"primary",física:"quinary",gramática:"tertiary",literatura:"secondary",química:"primary",filosofia:"quaternary",sociologia:"quinary",redação:"secondary",artes:"tertiary",inglês:"quinary",default:"default"},e={matemática:"radical",gramática:"spell-check",literatura:"book-open",biologia:"dna",química:"test-tube-diagonal",física:"atom",história:"scroll",geografia:"earth",filosofia:"brain",sociologia:"users-round",redação:"notebook-pen",artes:"palette",inglês:"languages",default:"graduation-cap"},u=a=>e[a]||e.default,d=a=>r[a]||r.default;var t=(a=>(a.Admin="admin",a.Moderator="moderator",a.User="user",a))(t||{}),o=(a=>(a.Owner="owner",a.Admin="admin",a.Member="member",a))(o||{}),n=(a=>(a.Premium="premium",a))(n||{}),c=(a=>(a.Active="active",a.Canceled="canceled",a.Pending="pending",a.Expired="expired",a))(c||{});exports.DeckStatus=i;exports.Entitlement=n;exports.MembershipStatus=c;exports.OrganizationRole=o;exports.SUBJECTS=l;exports.SUBJECT_COLORS=r;exports.SUBJECT_ICONS=e;exports.UserRole=t;exports.getSubjectColor=d;exports.getSubjectIcon=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=["not-reviewed","card-updated","demand-rejected","card-removed"];var t=(a=>(a.Draft="draft",a.Review="to_review",a.Published="published",a.Archived="archived",a))(t||{});const u=["matemática","geografia","física","biologia","história","literatura","gramática","sociologia","química","filosofia","redação","artes","inglês"],e={história:"quaternary",geografia:"tertiary",matemática:"secondary",biologia:"primary",física:"quinary",gramática:"tertiary",literatura:"secondary",química:"primary",filosofia:"quaternary",sociologia:"quinary",redação:"secondary",artes:"tertiary",inglês:"quinary",default:"default"},r={matemática:"radical",gramática:"spell-check",literatura:"book-open",biologia:"dna",química:"test-tube-diagonal",física:"atom",história:"scroll",geografia:"earth",filosofia:"brain",sociologia:"users-round",redação:"notebook-pen",artes:"palette",inglês:"languages",default:"graduation-cap"},l=a=>r[a]||r.default,s=a=>e[a]||e.default;var i=(a=>(a.Admin="admin",a.Moderator="moderator",a.User="user",a))(i||{}),o=(a=>(a.Owner="owner",a.Admin="admin",a.Member="member",a))(o||{}),n=(a=>(a.Premium="premium",a))(n||{}),d=(a=>(a.Active="active",a.Canceled="canceled",a.Pending="pending",a.Expired="expired",a))(d||{});exports.DeckStatus=t;exports.Entitlement=n;exports.MembershipStatus=d;exports.OrganizationRole=o;exports.SUBJECTS=u;exports.SUBJECT_COLORS=e;exports.SUBJECT_ICONS=r;exports.UserRole=i;exports.cardDemandStatus=c;exports.getSubjectColor=s;exports.getSubjectIcon=l;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,10 @@ export declare interface ArchivedLibraryItem {
8
8
 
9
9
  export declare type BillingType = 'PIX' | 'CREDIT_CARD' | 'BOLETO';
10
10
 
11
+ export declare type CardDemandStatus = (typeof cardDemandStatus)[number];
12
+
13
+ export declare const cardDemandStatus: readonly ["not-reviewed", "card-updated", "demand-rejected", "card-removed"];
14
+
11
15
  export declare type CardState = 'New' | 'Learning' | 'Review' | 'Relearning';
12
16
 
13
17
  export declare enum DeckStatus {
@@ -21,6 +25,8 @@ export declare enum Entitlement {
21
25
  Premium = "premium"
22
26
  }
23
27
 
28
+ export declare type EntityType = 'user' | 'organization' | 'official';
29
+
24
30
  export declare const getSubjectColor: (subject: string) => SemanticColor;
25
31
 
26
32
  export declare const getSubjectIcon: (subject: string) => string;
@@ -47,7 +53,6 @@ export declare interface ICard {
47
53
  id: string;
48
54
  question: string;
49
55
  answer: string | null;
50
- order: number;
51
56
  frontImage?: {
52
57
  id: string;
53
58
  url: string;
@@ -82,6 +87,7 @@ export declare interface IDeckDetail extends IDeck {
82
87
  }
83
88
 
84
89
  export declare interface IOwnerInfo {
90
+ type: EntityType;
85
91
  id: string;
86
92
  name: string;
87
93
  image: string | null;
@@ -113,6 +119,8 @@ export declare interface SessionStats {
113
119
  total: number;
114
120
  }
115
121
 
122
+ export declare type StudyStatus = 'not-started' | 'suspended' | 'has-cards' | 'no-cards';
123
+
116
124
  export declare type StudyType = 'ALL' | 'DECK' | 'TOPIC' | 'SUBJECT';
117
125
 
118
126
  export declare type Subject = (typeof SUBJECTS)[number];
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
+ const c = ["not-reviewed", "card-updated", "demand-rejected", "card-removed"];
1
2
  var i = /* @__PURE__ */ ((a) => (a.Draft = "draft", a.Review = "to_review", a.Published = "published", a.Archived = "archived", a))(i || {});
2
- const d = [
3
+ const u = [
3
4
  "matemática",
4
5
  // azul
5
6
  "geografia",
@@ -56,17 +57,18 @@ const d = [
56
57
  artes: "palette",
57
58
  inglês: "languages",
58
59
  default: "graduation-cap"
59
- }, l = (a) => e[a] || e.default, u = (a) => r[a] || r.default;
60
- var t = /* @__PURE__ */ ((a) => (a.Admin = "admin", a.Moderator = "moderator", a.User = "user", a))(t || {}), o = /* @__PURE__ */ ((a) => (a.Owner = "owner", a.Admin = "admin", a.Member = "member", a))(o || {}), n = /* @__PURE__ */ ((a) => (a.Premium = "premium", a))(n || {}), c = /* @__PURE__ */ ((a) => (a.Active = "active", a.Canceled = "canceled", a.Pending = "pending", a.Expired = "expired", a))(c || {});
60
+ }, l = (a) => e[a] || e.default, m = (a) => r[a] || r.default;
61
+ var t = /* @__PURE__ */ ((a) => (a.Admin = "admin", a.Moderator = "moderator", a.User = "user", a))(t || {}), o = /* @__PURE__ */ ((a) => (a.Owner = "owner", a.Admin = "admin", a.Member = "member", a))(o || {}), n = /* @__PURE__ */ ((a) => (a.Premium = "premium", a))(n || {}), d = /* @__PURE__ */ ((a) => (a.Active = "active", a.Canceled = "canceled", a.Pending = "pending", a.Expired = "expired", a))(d || {});
61
62
  export {
62
63
  i as DeckStatus,
63
64
  n as Entitlement,
64
- c as MembershipStatus,
65
+ d as MembershipStatus,
65
66
  o as OrganizationRole,
66
- d as SUBJECTS,
67
+ u as SUBJECTS,
67
68
  r as SUBJECT_COLORS,
68
69
  e as SUBJECT_ICONS,
69
70
  t as UserRole,
70
- u as getSubjectColor,
71
+ c as cardDemandStatus,
72
+ m as getSubjectColor,
71
73
  l as getSubjectIcon
72
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestcards/shared",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {