@vestcards/shared 0.1.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/date.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("date-fns/locale"),r=require("date-fns"),i=require("date-fns-tz"),n=l.ptBR,f="America/Sao_Paulo";function a(t){return t instanceof Date?t:typeof t=="number"?new Date(t):typeof t=="string"?r.parseISO(t):t}function D(t,e=new Date,o){return r.formatDistance(a(t),a(e),{locale:n,...o})}function T(t,e){return r.formatDistanceToNow(a(t),{locale:n,...e})}function p(t,e,o){return r.format(a(t),e,{locale:n,...o})}function d(t,e=new Date,o){return r.formatRelative(a(t),a(e),{locale:n,...o})}function b(t,e,o=f){const c=i.toZonedTime(a(t),o);return r.format(c,e,{locale:n})}function w(t,e=new Date,o="às",c=f){const m=i.toZonedTime(a(t),c),u=i.toZonedTime(a(e),c),s=r.formatRelative(m,u,{locale:n}).replace(/às/g,o);return`${s.charAt(0).toUpperCase()}${s.slice(1)}`}function O(t,e){const o=i.toZonedTime(a(t),f);return r.formatDistanceToNow(o,{locale:l.ptBR,...e})}exports.DEFAULT_LOCALE=n;exports.DEFAULT_TZ=f;exports.format=p;exports.formatDateTZ=b;exports.formatDistance=D;exports.formatDistanceToNow=T;exports.formatRelative=d;exports.formatRelativeDate=w;exports.formatRelativeDateToNow=O;exports.toDate=a;Object.keys(r).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>r[t]})});
package/dist/date.d.ts ADDED
@@ -0,0 +1,53 @@
1
+ import { format as format_2 } from 'date-fns';
2
+ import { formatDistance as formatDistance_2 } from 'date-fns';
3
+ import { formatDistanceToNow as formatDistanceToNow_2 } from 'date-fns';
4
+ import { formatRelative as formatRelative_2 } from 'date-fns';
5
+ import { Locale } from 'date-fns/locale';
6
+
7
+ export declare type DateValue = Date | string | number;
8
+
9
+ export declare const DEFAULT_LOCALE: Locale;
10
+
11
+ export declare const DEFAULT_TZ: "America/Sao_Paulo";
12
+
13
+ export declare function format(date: DateValue, pattern: string, options?: Parameters<typeof format_2>[2]): string;
14
+
15
+ /**
16
+ * Format a date in a specific timezone using pre-defined or custom pattern.
17
+ *
18
+ * Example:
19
+ * formatDateTZ('2025-11-12T12:00:00Z', "HH:mm zzzz", 'America/Sao_Paulo');
20
+ * → "09:00 GMT-03:00"
21
+ */
22
+ export declare function formatDateTZ(date: DateValue, pattern: string, timezone?: string): string;
23
+
24
+ export declare function formatDistance(date: DateValue, baseDate?: DateValue, options?: Parameters<typeof formatDistance_2>[2]): string;
25
+
26
+ export declare function formatDistanceToNow(date: DateValue, options?: Parameters<typeof formatDistanceToNow_2>[1]): string;
27
+
28
+ export declare function formatRelative(date: DateValue, baseDate?: DateValue, options?: Parameters<typeof formatRelative_2>[2]): string;
29
+
30
+ /**
31
+ * Formats a date relative to a base date (default: now), with custom separator and timezone.
32
+ * Example outputs:
33
+ * - "Hoje às 10:00"
34
+ * - "Ontem às 17:00"
35
+ * - "11/11/2025 às 09:00"
36
+ */
37
+ export declare function formatRelativeDate(date: DateValue, baseDate?: DateValue, separator?: string, timezone?: string): string;
38
+
39
+ /**
40
+ * Formats a date relative to now, with custom separator and timezone.
41
+ * Example outputs:
42
+ * - "Hoje às 10:00"
43
+ * - "Ontem às 17:00"
44
+ * - "11/11/2025 às 09:00"
45
+ */
46
+ export declare function formatRelativeDateToNow(date: DateValue, options?: Parameters<typeof formatDistanceToNow_2>[1]): string;
47
+
48
+ export declare function toDate(value: DateValue): Date;
49
+
50
+
51
+ export * from "date-fns";
52
+
53
+ export { }
package/dist/date.js ADDED
@@ -0,0 +1,60 @@
1
+ import { ptBR as s } from "date-fns/locale";
2
+ import { parseISO as w, format as m, formatDistance as T, formatDistanceToNow as l, formatRelative as D } from "date-fns";
3
+ export * from "date-fns";
4
+ import { toZonedTime as c } from "date-fns-tz";
5
+ const a = s, f = "America/Sao_Paulo";
6
+ function r(t) {
7
+ return t instanceof Date ? t : typeof t == "number" ? new Date(t) : typeof t == "string" ? w(t) : t;
8
+ }
9
+ function A(t, o = /* @__PURE__ */ new Date(), e) {
10
+ return T(r(t), r(o), {
11
+ locale: a,
12
+ ...e
13
+ });
14
+ }
15
+ function d(t, o) {
16
+ return l(r(t), {
17
+ locale: a,
18
+ ...o
19
+ });
20
+ }
21
+ function j(t, o, e) {
22
+ return m(r(t), o, {
23
+ locale: a,
24
+ ...e
25
+ });
26
+ }
27
+ function L(t, o = /* @__PURE__ */ new Date(), e) {
28
+ return D(r(t), r(o), {
29
+ locale: a,
30
+ ...e
31
+ });
32
+ }
33
+ function N(t, o, e = f) {
34
+ const n = c(r(t), e);
35
+ return m(n, o, {
36
+ locale: a
37
+ });
38
+ }
39
+ function E(t, o = /* @__PURE__ */ new Date(), e = "às", n = f) {
40
+ const u = c(r(t), n), p = c(r(o), n), i = D(u, p, {
41
+ locale: a
42
+ }).replace(/às/g, e);
43
+ return `${i.charAt(0).toUpperCase()}${i.slice(1)}`;
44
+ }
45
+ function S(t, o) {
46
+ const e = c(r(t), f);
47
+ return l(e, { locale: s, ...o });
48
+ }
49
+ export {
50
+ a as DEFAULT_LOCALE,
51
+ f as DEFAULT_TZ,
52
+ j as format,
53
+ N as formatDateTZ,
54
+ A as formatDistance,
55
+ d as formatDistanceToNow,
56
+ L as formatRelative,
57
+ E as formatRelativeDate,
58
+ S as formatRelativeDateToNow,
59
+ r as toDate
60
+ };
package/dist/hooks.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),r=(e,t)=>{const[o,c]=u.useState(e);return u.useEffect(()=>{const n=setTimeout(()=>{c(e)},t);return()=>{clearTimeout(n)}},[e,t]),o};exports.useDebounce=r;
@@ -0,0 +1,3 @@
1
+ export declare const useDebounce: <T>(value: T, delay: number) => T;
2
+
3
+ export { }
package/dist/hooks.js ADDED
@@ -0,0 +1,15 @@
1
+ import { useState as r, useEffect as c } from "react";
2
+ const m = (e, t) => {
3
+ const [o, u] = r(e);
4
+ return c(() => {
5
+ const n = setTimeout(() => {
6
+ u(e);
7
+ }, t);
8
+ return () => {
9
+ clearTimeout(n);
10
+ };
11
+ }, [e, t]), o;
12
+ };
13
+ export {
14
+ m as useDebounce
15
+ };
package/dist/index.cjs ADDED
@@ -0,0 +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;
@@ -0,0 +1,124 @@
1
+ export declare type BillingType = 'PIX' | 'CREDIT_CARD' | 'BOLETO';
2
+
3
+ export declare type CardState = 'New' | 'Learning' | 'Review' | 'Relearning';
4
+
5
+ export declare enum DeckStatus {
6
+ Draft = "draft",
7
+ Review = "to_review",
8
+ Published = "published",
9
+ Archived = "archived"
10
+ }
11
+
12
+ export declare enum Entitlement {
13
+ Premium = "premium"
14
+ }
15
+
16
+ export declare const getSubjectColor: (subject: string) => SemanticColor;
17
+
18
+ export declare const getSubjectIcon: (subject: string) => string;
19
+
20
+ export declare interface GradeCardInput {
21
+ cardId: string;
22
+ userDeckStudyId: string;
23
+ grade: Rating;
24
+ reviewDurationInSeconds: number;
25
+ }
26
+
27
+ export declare interface ICard {
28
+ id: string;
29
+ question: string;
30
+ answer: string | null;
31
+ order: number;
32
+ frontImage?: {
33
+ id: string;
34
+ url: string;
35
+ };
36
+ backImage?: {
37
+ id: string;
38
+ url: string;
39
+ };
40
+ }
41
+
42
+ export declare interface IDeck {
43
+ id: string;
44
+ title: string;
45
+ description: string;
46
+ topicId: string;
47
+ keywords: string[];
48
+ free: boolean;
49
+ status: DeckStatus;
50
+ createdAt: Date;
51
+ updatedAt: Date;
52
+ subject: Subject;
53
+ topic?: string;
54
+ topicIcon?: string | null;
55
+ }
56
+
57
+ export declare interface IDeckDetail extends IDeck {
58
+ subject: Subject;
59
+ topic: string;
60
+ topicIcon: string | null;
61
+ ownerInfo: IOwnerInfo;
62
+ cards: ICard[];
63
+ }
64
+
65
+ export declare interface IOwnerInfo {
66
+ id: string;
67
+ name: string;
68
+ image: string | null;
69
+ }
70
+
71
+ export declare enum MembershipStatus {
72
+ Active = "active",
73
+ Canceled = "canceled",
74
+ Pending = "pending",
75
+ Expired = "expired"
76
+ }
77
+
78
+ export declare enum OrganizationRole {
79
+ Owner = "owner",
80
+ Admin = "admin",
81
+ Member = "member"
82
+ }
83
+
84
+ export declare type OrganizationScopeRole = (typeof OrganizationRole)[keyof typeof OrganizationRole];
85
+
86
+ export declare type Rating = 'Again' | 'Hard' | 'Good' | 'Easy';
87
+
88
+ export declare type SemanticColor = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'quinary' | 'default';
89
+
90
+ export declare interface SessionStats {
91
+ review: number;
92
+ learning: number;
93
+ new: number;
94
+ total: number;
95
+ }
96
+
97
+ export declare type StudyType = 'ALL' | 'DECK' | 'TOPIC' | 'SUBJECT';
98
+
99
+ export declare type Subject = (typeof SUBJECTS)[number];
100
+
101
+ export declare const SUBJECT_COLORS: Record<SubjectWithDefault, SemanticColor>;
102
+
103
+ export declare const SUBJECT_ICONS: Record<SubjectWithDefault, string>;
104
+
105
+ export declare const SUBJECTS: readonly ["matemática", "geografia", "física", "biologia", "história", "literatura", "gramática", "sociologia", "química", "filosofia", "redação", "artes", "inglês"];
106
+
107
+ declare type SubjectWithDefault = Subject | 'default';
108
+
109
+ export declare interface Topic {
110
+ id: string;
111
+ name: string;
112
+ icon: string | null;
113
+ subject: Subject;
114
+ }
115
+
116
+ export declare enum UserRole {
117
+ Admin = "admin",
118
+ Moderator = "moderator",
119
+ User = "user"
120
+ }
121
+
122
+ export declare type UserScopeRole = (typeof UserRole)[keyof typeof UserRole];
123
+
124
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,72 @@
1
+ var i = /* @__PURE__ */ ((a) => (a.Draft = "draft", a.Review = "to_review", a.Published = "published", a.Archived = "archived", a))(i || {});
2
+ const d = [
3
+ "matemática",
4
+ // azul
5
+ "geografia",
6
+ // amarelo
7
+ "física",
8
+ // verde
9
+ "biologia",
10
+ // laranja
11
+ "história",
12
+ // rosa
13
+ "literatura",
14
+ // azul
15
+ "gramática",
16
+ // amarelo
17
+ "sociologia",
18
+ // verde
19
+ "química",
20
+ // laranja
21
+ "filosofia",
22
+ // rosa
23
+ "redação",
24
+ // azul
25
+ "artes",
26
+ // amarelo
27
+ "inglês"
28
+ // verde
29
+ ], r = {
30
+ história: "quaternary",
31
+ geografia: "tertiary",
32
+ matemática: "secondary",
33
+ biologia: "primary",
34
+ física: "quinary",
35
+ gramática: "tertiary",
36
+ literatura: "secondary",
37
+ química: "primary",
38
+ filosofia: "quaternary",
39
+ sociologia: "quinary",
40
+ redação: "secondary",
41
+ artes: "tertiary",
42
+ inglês: "quinary",
43
+ default: "default"
44
+ }, e = {
45
+ matemática: "radical",
46
+ gramática: "spell-check",
47
+ literatura: "book-open",
48
+ biologia: "dna",
49
+ química: "test-tube-diagonal",
50
+ física: "atom",
51
+ história: "scroll",
52
+ geografia: "earth",
53
+ filosofia: "brain",
54
+ sociologia: "users-round",
55
+ redação: "notebook-pen",
56
+ artes: "palette",
57
+ inglês: "languages",
58
+ 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 || {});
61
+ export {
62
+ i as DeckStatus,
63
+ n as Entitlement,
64
+ c as MembershipStatus,
65
+ o as OrganizationRole,
66
+ d as SUBJECTS,
67
+ r as SUBJECT_COLORS,
68
+ e as SUBJECT_ICONS,
69
+ t as UserRole,
70
+ u as getSubjectColor,
71
+ l as getSubjectIcon
72
+ };
package/dist/theme.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@radix-ui/colors");function u(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return a.default=r,Object.freeze(a)}const i=u(b),c=["primary","secondary","tertiary","quaternary","quinary"];function l(r){if(!r)return c[0];let a=0;for(let n=0;n<r.length;n++)a=r.charCodeAt(n)+((a<<5)-a);const t=Math.abs(a)%c.length;return c[t]}const e=(r,a)=>{var n;const t=`${r}${a.charAt(0).toUpperCase()+a.slice(1)}`;return((n=i[r])==null?void 0:n[t])||`var(--${r}-${a})`},s=(r,a,t)=>[r,e(a,t)];function o(r){const a=Array.from({length:12},(t,n)=>{const g=n+1;return[s(g.toString(),r,g.toString()),s(`a${g}`,r,`a${g}`)]}).flat();return a.push(s("DEFAULT",r,"9")),a.push(s("hover",r,"10")),a.push(s("dark",r,"11")),a.push(s("light",r,"4")),a.push(s("lightness",r,"2")),Object.fromEntries(a)}const d={transparent:"transparent",current:"currentColor",brand:{DEFAULT:"#FF7824"},primary:{...o("orange")},secondary:{...o("blue")},tertiary:{...o("amber")},quaternary:{...o("crimson")},quinary:{...o("jade")},gray:{...o("sand")},success:{...o("grass")},warning:{...o("amber")},danger:{...o("red")},black:{DEFAULT:"#000000",a1:"rgba(0, 0, 0, 0.05)",a2:"rgba(0, 0, 0, 0.1)",a3:"rgba(0, 0, 0, 0.15)",a4:"rgba(0, 0, 0, 0.2)",a5:"rgba(0, 0, 0, 0.3)",a6:"rgba(0, 0, 0, 0.4)",a7:"rgba(0, 0, 0, 0.5)",a8:"rgba(0, 0, 0, 0.6)",a9:"rgba(0, 0, 0, 0.7)",a10:"rgba(0, 0, 0, 0.8)",a11:"rgba(0, 0, 0, 0.9)",a12:"rgba(0, 0, 0, 0.95)"},white:{DEFAULT:"#FFFFFF",a1:"rgba(255, 255, 255, 0.05)",a2:"rgba(255, 255, 255, 0.1)",a3:"rgba(255, 255, 255, 0.15)",a4:"rgba(255, 255, 255, 0.2)",a5:"rgba(255, 255, 255, 0.3)",a6:"rgba(255, 255, 255, 0.4)",a7:"rgba(255, 255, 255, 0.5)",a8:"rgba(255, 255, 255, 0.6)",a9:"rgba(255, 255, 255, 0.7)",a10:"rgba(255, 255, 255, 0.8)",a11:"rgba(255, 255, 255, 0.9)",a12:"rgba(255, 255, 255, 0.95)"},foreground:e("sand","12"),background:e("sand","2"),ring:e("blue","6"),muted:{DEFAULT:e("sand","3"),foreground:e("sand","10")},border:e("sand","5"),input:e("sand","4"),accent:e("blue","2"),sidebar:{DEFAULT:e("sand","3"),foreground:e("sand","11"),accent:"white","accent-foreground":e("orange","11"),border:e("sand","6"),ring:e("blue","6")},popover:{DEFAULT:"#FFFFFF",foreground:e("sand","11")}};exports.colors=d;exports.generateScale=o;exports.hashColor=l;
@@ -0,0 +1,74 @@
1
+ export declare const colors: {
2
+ transparent: string;
3
+ current: string;
4
+ brand: {
5
+ DEFAULT: string;
6
+ };
7
+ primary: any;
8
+ secondary: any;
9
+ tertiary: any;
10
+ quaternary: any;
11
+ quinary: any;
12
+ gray: any;
13
+ success: any;
14
+ warning: any;
15
+ danger: any;
16
+ black: {
17
+ DEFAULT: string;
18
+ a1: string;
19
+ a2: string;
20
+ a3: string;
21
+ a4: string;
22
+ a5: string;
23
+ a6: string;
24
+ a7: string;
25
+ a8: string;
26
+ a9: string;
27
+ a10: string;
28
+ a11: string;
29
+ a12: string;
30
+ };
31
+ white: {
32
+ DEFAULT: string;
33
+ a1: string;
34
+ a2: string;
35
+ a3: string;
36
+ a4: string;
37
+ a5: string;
38
+ a6: string;
39
+ a7: string;
40
+ a8: string;
41
+ a9: string;
42
+ a10: string;
43
+ a11: string;
44
+ a12: string;
45
+ };
46
+ foreground: any;
47
+ background: any;
48
+ ring: any;
49
+ muted: {
50
+ DEFAULT: any;
51
+ foreground: any;
52
+ };
53
+ border: any;
54
+ input: any;
55
+ accent: any;
56
+ sidebar: {
57
+ DEFAULT: any;
58
+ foreground: any;
59
+ accent: string;
60
+ 'accent-foreground': any;
61
+ border: any;
62
+ ring: any;
63
+ };
64
+ popover: {
65
+ DEFAULT: string;
66
+ foreground: any;
67
+ };
68
+ };
69
+
70
+ export declare function generateScale(name: string): any;
71
+
72
+ export declare function hashColor(str: string): "primary" | "secondary" | "tertiary" | "quaternary" | "quinary";
73
+
74
+ export { }
package/dist/theme.js ADDED
@@ -0,0 +1,114 @@
1
+ import * as u from "@radix-ui/colors";
2
+ const b = ["primary", "secondary", "tertiary", "quaternary", "quinary"];
3
+ function c(r) {
4
+ if (!r) return b[0];
5
+ let a = 0;
6
+ for (let t = 0; t < r.length; t++)
7
+ a = r.charCodeAt(t) + ((a << 5) - a);
8
+ const g = Math.abs(a) % b.length;
9
+ return b[g];
10
+ }
11
+ const n = (r, a) => {
12
+ var t;
13
+ const g = `${r}${a.charAt(0).toUpperCase() + a.slice(1)}`;
14
+ return ((t = u[r]) == null ? void 0 : t[g]) || `var(--${r}-${a})`;
15
+ }, o = (r, a, g) => [r, n(a, g)];
16
+ function e(r) {
17
+ const a = Array.from({ length: 12 }, (g, t) => {
18
+ const s = t + 1;
19
+ return [o(s.toString(), r, s.toString()), o(`a${s}`, r, `a${s}`)];
20
+ }).flat();
21
+ return a.push(o("DEFAULT", r, "9")), a.push(o("hover", r, "10")), a.push(o("dark", r, "11")), a.push(o("light", r, "4")), a.push(o("lightness", r, "2")), Object.fromEntries(a);
22
+ }
23
+ const d = {
24
+ transparent: "transparent",
25
+ current: "currentColor",
26
+ brand: {
27
+ DEFAULT: "#FF7824"
28
+ },
29
+ primary: {
30
+ ...e("orange")
31
+ },
32
+ secondary: {
33
+ ...e("blue")
34
+ },
35
+ tertiary: {
36
+ ...e("amber")
37
+ },
38
+ quaternary: {
39
+ ...e("crimson")
40
+ },
41
+ quinary: {
42
+ ...e("jade")
43
+ },
44
+ gray: {
45
+ ...e("sand")
46
+ },
47
+ success: {
48
+ ...e("grass")
49
+ },
50
+ warning: {
51
+ ...e("amber")
52
+ },
53
+ danger: {
54
+ ...e("red")
55
+ },
56
+ black: {
57
+ DEFAULT: "#000000",
58
+ a1: "rgba(0, 0, 0, 0.05)",
59
+ a2: "rgba(0, 0, 0, 0.1)",
60
+ a3: "rgba(0, 0, 0, 0.15)",
61
+ a4: "rgba(0, 0, 0, 0.2)",
62
+ a5: "rgba(0, 0, 0, 0.3)",
63
+ a6: "rgba(0, 0, 0, 0.4)",
64
+ a7: "rgba(0, 0, 0, 0.5)",
65
+ a8: "rgba(0, 0, 0, 0.6)",
66
+ a9: "rgba(0, 0, 0, 0.7)",
67
+ a10: "rgba(0, 0, 0, 0.8)",
68
+ a11: "rgba(0, 0, 0, 0.9)",
69
+ a12: "rgba(0, 0, 0, 0.95)"
70
+ },
71
+ white: {
72
+ DEFAULT: "#FFFFFF",
73
+ a1: "rgba(255, 255, 255, 0.05)",
74
+ a2: "rgba(255, 255, 255, 0.1)",
75
+ a3: "rgba(255, 255, 255, 0.15)",
76
+ a4: "rgba(255, 255, 255, 0.2)",
77
+ a5: "rgba(255, 255, 255, 0.3)",
78
+ a6: "rgba(255, 255, 255, 0.4)",
79
+ a7: "rgba(255, 255, 255, 0.5)",
80
+ a8: "rgba(255, 255, 255, 0.6)",
81
+ a9: "rgba(255, 255, 255, 0.7)",
82
+ a10: "rgba(255, 255, 255, 0.8)",
83
+ a11: "rgba(255, 255, 255, 0.9)",
84
+ a12: "rgba(255, 255, 255, 0.95)"
85
+ },
86
+ // shadcn colors
87
+ foreground: n("sand", "12"),
88
+ background: n("sand", "2"),
89
+ ring: n("blue", "6"),
90
+ muted: {
91
+ DEFAULT: n("sand", "3"),
92
+ foreground: n("sand", "10")
93
+ },
94
+ border: n("sand", "5"),
95
+ input: n("sand", "4"),
96
+ accent: n("blue", "2"),
97
+ sidebar: {
98
+ DEFAULT: n("sand", "3"),
99
+ foreground: n("sand", "11"),
100
+ accent: "white",
101
+ "accent-foreground": n("orange", "11"),
102
+ border: n("sand", "6"),
103
+ ring: n("blue", "6")
104
+ },
105
+ popover: {
106
+ DEFAULT: "#FFFFFF",
107
+ foreground: n("sand", "11")
108
+ }
109
+ };
110
+ export {
111
+ d as colors,
112
+ e as generateScale,
113
+ c as hashColor
114
+ };
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@vestcards/shared",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "import": "./dist/index.js",
10
+ "require": "./dist/index.cjs"
11
+ },
12
+ "./theme": {
13
+ "types": "./dist/theme.d.ts",
14
+ "import": "./dist/theme.js",
15
+ "require": "./dist/theme.cjs"
16
+ },
17
+ "./hooks": {
18
+ "types": "./dist/hooks.d.ts",
19
+ "import": "./dist/hooks.js",
20
+ "require": "./dist/hooks.cjs"
21
+ },
22
+ "./date": {
23
+ "types": "./dist/date.d.ts",
24
+ "import": "./dist/date.js",
25
+ "require": "./dist/date.cjs"
26
+ }
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "scripts": {
32
+ "build": "vite build",
33
+ "dev": "vite build --watch",
34
+ "test": "vitest --run",
35
+ "lint": "biome check . --diagnostic-level=error",
36
+ "lint:fix": "biome check . --write --diagnostic-level=error",
37
+ "tsc": "tsc --noEmit",
38
+ "clean": "rm -rf .turbo dist node_modules",
39
+ "build:publish": "vite build"
40
+ },
41
+ "dependencies": {
42
+ "@radix-ui/colors": "^3.0.0",
43
+ "date-fns": "^4.1.0",
44
+ "date-fns-tz": "^3.0.0"
45
+ },
46
+ "peerDependencies": {
47
+ "react": ">=18"
48
+ },
49
+ "peerDependenciesMeta": {
50
+ "react": {
51
+ "optional": true
52
+ }
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "^22.15.14",
56
+ "@types/react": "^18.2.0",
57
+ "@biomejs/biome": "2.1.4",
58
+ "typescript": "^5.2.0",
59
+ "vite": "^6.0.0",
60
+ "vite-plugin-dts": "^4.0.0",
61
+ "vitest": "^3.1.4"
62
+ },
63
+ "packageManager": "bun@1.3.6"
64
+ }