@vestcards/shared 1.3.0 → 1.5.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-Bn1ahM0R.cjs +1 -0
- package/dist/date-D5P-dKAx.js +134 -0
- package/dist/date.cjs +1 -1
- package/dist/date.d.ts +35 -0
- package/dist/date.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +39 -0
- package/dist/index.js +76 -65
- package/dist/spaced-repetition.cjs +1 -1
- package/dist/spaced-repetition.d.ts +28 -4
- package/dist/spaced-repetition.js +266 -223
- package/package.json +5 -3
- package/src/styles/blog.css +245 -0
- package/dist/date-DS8JYZte.js +0 -103
- package/dist/date-DoLsSDIb.cjs +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vestcards/shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -33,10 +33,12 @@
|
|
|
33
33
|
"types": "./dist/utils.d.ts",
|
|
34
34
|
"import": "./dist/utils.js",
|
|
35
35
|
"require": "./dist/utils.cjs"
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"./styles/blog.css": "./src/styles/blog.css"
|
|
37
38
|
},
|
|
38
39
|
"files": [
|
|
39
|
-
"dist"
|
|
40
|
+
"dist",
|
|
41
|
+
"src/styles"
|
|
40
42
|
],
|
|
41
43
|
"scripts": {
|
|
42
44
|
"build": "vite build",
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
.base-formatting {
|
|
2
|
+
a {
|
|
3
|
+
color: var(--blue-11);
|
|
4
|
+
font-weight: 600;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
a:hover {
|
|
8
|
+
text-decoration: underline;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
blockquote {
|
|
12
|
+
font-style: italic;
|
|
13
|
+
background-color: var(--sand-3);
|
|
14
|
+
border-left: 4px solid var(--sand-7);
|
|
15
|
+
padding: 1rem 1.5rem;
|
|
16
|
+
margin: 1.5rem 0;
|
|
17
|
+
border-radius: 4px;
|
|
18
|
+
color: var(--sand-11);
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
blockquote::before {
|
|
23
|
+
content: "“";
|
|
24
|
+
font-size: 4rem;
|
|
25
|
+
line-height: 1;
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: -10px;
|
|
28
|
+
left: 10px;
|
|
29
|
+
color: var(--sand-7);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
blockquote p:last-child {
|
|
33
|
+
margin-bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Table styles */
|
|
37
|
+
table {
|
|
38
|
+
display: block;
|
|
39
|
+
overflow-x: auto;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
width: fit-content;
|
|
43
|
+
min-width: 300px;
|
|
44
|
+
border-collapse: separate;
|
|
45
|
+
border-spacing: 0;
|
|
46
|
+
font-size: 0.95rem;
|
|
47
|
+
line-height: 1.5;
|
|
48
|
+
border: 1px solid var(--sand-6);
|
|
49
|
+
border-radius: 10px;
|
|
50
|
+
margin-bottom: 1.5rem;
|
|
51
|
+
background-color: var(--sand-1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
th,
|
|
55
|
+
td {
|
|
56
|
+
border-bottom: 1px solid var(--sand-6);
|
|
57
|
+
padding: 0.75rem 1rem;
|
|
58
|
+
text-align: left;
|
|
59
|
+
background-color: var(--sand-2);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
th {
|
|
63
|
+
background-color: var(--sand-3);
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
caption {
|
|
68
|
+
caption-side: bottom;
|
|
69
|
+
text-align: center;
|
|
70
|
+
font-size: 0.85rem;
|
|
71
|
+
color: var(--sand-11);
|
|
72
|
+
margin-top: 0.5rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Nested list indentation */
|
|
76
|
+
ul ul,
|
|
77
|
+
ol ul,
|
|
78
|
+
ul ol,
|
|
79
|
+
ol ol {
|
|
80
|
+
margin-left: 2rem;
|
|
81
|
+
list-style-position: outside;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Bullet styles for deeper levels */
|
|
85
|
+
ul ul {
|
|
86
|
+
list-style-type: circle;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
ul ul ul {
|
|
90
|
+
list-style-type: square;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.blog-post-content {
|
|
95
|
+
font-size: 17px;
|
|
96
|
+
line-height: 1.65;
|
|
97
|
+
color: var(--sand-12);
|
|
98
|
+
|
|
99
|
+
p {
|
|
100
|
+
margin-bottom: 1rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
strong {
|
|
104
|
+
font-weight: 600;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
h1,
|
|
108
|
+
h2,
|
|
109
|
+
h3,
|
|
110
|
+
h4,
|
|
111
|
+
h5,
|
|
112
|
+
h6 {
|
|
113
|
+
color: var(--sand-12);
|
|
114
|
+
font-weight: 700;
|
|
115
|
+
letter-spacing: 0;
|
|
116
|
+
line-height: 1.18;
|
|
117
|
+
margin-bottom: 0.85rem;
|
|
118
|
+
scroll-margin-top: 6rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
h1 + p,
|
|
122
|
+
h2 + p,
|
|
123
|
+
h3 + p {
|
|
124
|
+
margin-top: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
h1 {
|
|
128
|
+
font-size: 2.4rem;
|
|
129
|
+
line-height: 1.1;
|
|
130
|
+
margin-top: 3.2rem;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
h2 {
|
|
134
|
+
font-size: 1.85rem;
|
|
135
|
+
line-height: 1.16;
|
|
136
|
+
margin-top: 2.8rem;
|
|
137
|
+
padding-bottom: 0.45rem;
|
|
138
|
+
border-bottom: 1px solid var(--sand-6);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
h3 {
|
|
142
|
+
font-size: 1.45rem;
|
|
143
|
+
margin-top: 2.3rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
h4 {
|
|
147
|
+
font-size: 1.2rem;
|
|
148
|
+
margin-top: 2rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
h5 {
|
|
152
|
+
font-size: 1.05rem;
|
|
153
|
+
margin-top: 1.8rem;
|
|
154
|
+
color: var(--sand-11);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
h6 {
|
|
158
|
+
font-size: 0.95rem;
|
|
159
|
+
margin-top: 1.6rem;
|
|
160
|
+
color: var(--sand-11);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
a {
|
|
164
|
+
color: var(--blue-11);
|
|
165
|
+
text-decoration: none;
|
|
166
|
+
font-weight: 700;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
a:hover {
|
|
170
|
+
color: var(--blue-12);
|
|
171
|
+
text-decoration: underline;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
ul {
|
|
175
|
+
list-style: disc;
|
|
176
|
+
margin-left: 2rem;
|
|
177
|
+
margin-bottom: 1rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
ol {
|
|
181
|
+
list-style: decimal;
|
|
182
|
+
margin-left: 2rem;
|
|
183
|
+
margin-bottom: 1rem;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
li {
|
|
187
|
+
font-weight: 400;
|
|
188
|
+
margin-bottom: 0.5rem;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
hr {
|
|
192
|
+
border: 0;
|
|
193
|
+
height: 0.1px;
|
|
194
|
+
background: #777;
|
|
195
|
+
margin-top: 1rem;
|
|
196
|
+
margin-bottom: 2rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
figure {
|
|
200
|
+
width: 100%;
|
|
201
|
+
flex: auto;
|
|
202
|
+
margin-bottom: 1rem;
|
|
203
|
+
margin-top: 0.2rem;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
figure,
|
|
207
|
+
img:not(figure > img) {
|
|
208
|
+
margin-top: 1rem;
|
|
209
|
+
margin-bottom: 1rem;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
img {
|
|
213
|
+
height: auto;
|
|
214
|
+
max-height: 450px;
|
|
215
|
+
object-fit: cover;
|
|
216
|
+
margin: 0 auto;
|
|
217
|
+
border-radius: 10px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
figcaption {
|
|
221
|
+
text-align: center;
|
|
222
|
+
font-size: 0.8rem;
|
|
223
|
+
margin-top: 0.8rem;
|
|
224
|
+
color: var(--sand-11);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@media (max-width: 640px) {
|
|
229
|
+
.blog-post-content {
|
|
230
|
+
h1 {
|
|
231
|
+
font-size: 2rem;
|
|
232
|
+
margin-top: 2.6rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
h2 {
|
|
236
|
+
font-size: 1.65rem;
|
|
237
|
+
margin-top: 2.3rem;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
h3 {
|
|
241
|
+
font-size: 1.3rem;
|
|
242
|
+
margin-top: 1.9rem;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
package/dist/date-DS8JYZte.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { ptBR as e } from "date-fns/locale";
|
|
2
|
-
import { format as t, formatDistance as n, formatDistanceToNow as r, formatRelative as i, parseISO as a } from "date-fns";
|
|
3
|
-
import { toZonedTime as o } from "date-fns-tz";
|
|
4
|
-
//#region \0rolldown/runtime.js
|
|
5
|
-
var s = Object.defineProperty, c = Object.getOwnPropertyDescriptor, l = Object.getOwnPropertyNames, u = Object.prototype.hasOwnProperty, d = (e, t) => {
|
|
6
|
-
let n = {};
|
|
7
|
-
for (var r in e) s(n, r, {
|
|
8
|
-
get: e[r],
|
|
9
|
-
enumerable: !0
|
|
10
|
-
});
|
|
11
|
-
return t || s(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
12
|
-
}, f = (e, t, n, r) => {
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i = l(t), a = 0, o = i.length, d; a < o; a++) d = i[a], !u.call(e, d) && d !== n && s(e, d, {
|
|
14
|
-
get: ((e) => t[e]).bind(null, d),
|
|
15
|
-
enumerable: !(r = c(t, d)) || r.enumerable
|
|
16
|
-
});
|
|
17
|
-
return e;
|
|
18
|
-
}, p = (e, t, n) => (f(e, t, "default"), n && f(n, t, "default")), m = e, h = "America/Sao_Paulo";
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/date/helpers.ts
|
|
21
|
-
function g(e) {
|
|
22
|
-
return e instanceof Date ? e : typeof e == "number" ? new Date(e) : typeof e == "string" ? a(e) : e;
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/date/fns.ts
|
|
26
|
-
var _ = /* @__PURE__ */ d({
|
|
27
|
-
format: () => x,
|
|
28
|
-
formatDistance: () => y,
|
|
29
|
-
formatDistanceToNow: () => b,
|
|
30
|
-
formatRelative: () => S
|
|
31
|
-
});
|
|
32
|
-
import * as v from "date-fns";
|
|
33
|
-
p(_, v);
|
|
34
|
-
function y(e, t = /* @__PURE__ */ new Date(), r) {
|
|
35
|
-
return n(g(e), g(t), {
|
|
36
|
-
locale: m,
|
|
37
|
-
...r
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function b(e, t) {
|
|
41
|
-
return r(g(e), {
|
|
42
|
-
locale: m,
|
|
43
|
-
...t
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function x(e, n, r) {
|
|
47
|
-
return t(g(e), n, {
|
|
48
|
-
locale: m,
|
|
49
|
-
...r
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function S(e, t = /* @__PURE__ */ new Date(), n) {
|
|
53
|
-
return i(g(e), g(t), {
|
|
54
|
-
locale: m,
|
|
55
|
-
...n
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/date/format.ts
|
|
60
|
-
function C(e, t, n = h) {
|
|
61
|
-
return x(o(g(e), n), t, { locale: m });
|
|
62
|
-
}
|
|
63
|
-
var w = (e) => {
|
|
64
|
-
let t = /* @__PURE__ */ new Date(), n = (0, _.differenceInMinutes)(e, t);
|
|
65
|
-
if (n < 1) return "<1m";
|
|
66
|
-
if (n < 10) return `<${Math.ceil(n / 10) * 10}m`;
|
|
67
|
-
if ((0, _.differenceInHours)(e, t) < 1) return "<1h";
|
|
68
|
-
let r = (0, _.differenceInDays)(e, t);
|
|
69
|
-
if (r < 1) return "<1d";
|
|
70
|
-
if (r < 7) return `${r}d`;
|
|
71
|
-
let i = (0, _.differenceInMonths)(e, t);
|
|
72
|
-
return i < 1 ? `${Math.ceil(r / 30)}M` : i < 12 ? `${i}M` : `${(0, _.differenceInYears)(e, t)}y`;
|
|
73
|
-
};
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/date/relative.ts
|
|
76
|
-
function T(e, t = /* @__PURE__ */ new Date(), n = "às", r = h) {
|
|
77
|
-
let a = i(o(g(e), r), o(g(t), r), { locale: m }).replace(/às/g, n);
|
|
78
|
-
return `${a.charAt(0).toUpperCase()}${a.slice(1)}`;
|
|
79
|
-
}
|
|
80
|
-
function E(t, n) {
|
|
81
|
-
return r(o(g(t), h), {
|
|
82
|
-
locale: e,
|
|
83
|
-
...n
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region src/date/index.ts
|
|
88
|
-
var D = /* @__PURE__ */ d({
|
|
89
|
-
DEFAULT_LOCALE: () => m,
|
|
90
|
-
DEFAULT_TZ: () => h,
|
|
91
|
-
format: () => x,
|
|
92
|
-
formatDateTZ: () => C,
|
|
93
|
-
formatDistance: () => y,
|
|
94
|
-
formatDistanceToNow: () => b,
|
|
95
|
-
formatRelative: () => S,
|
|
96
|
-
formatRelativeDate: () => T,
|
|
97
|
-
formatRelativeDateToNow: () => E,
|
|
98
|
-
formatRelativeReviewDate: () => w,
|
|
99
|
-
toDate: () => g
|
|
100
|
-
});
|
|
101
|
-
p(D, _);
|
|
102
|
-
//#endregion
|
|
103
|
-
export { w as a, b as c, m as d, h as f, C as i, S as l, T as n, x as o, E as r, y as s, D as t, g as u };
|
package/dist/date-DoLsSDIb.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-BK-Lzi7j.cjs`);let t=require(`date-fns/locale`),n=require(`date-fns`),r=require(`date-fns-tz`);var i=t.ptBR,a=`America/Sao_Paulo`;function o(e){return e instanceof Date?e:typeof e==`number`?new Date(e):typeof e==`string`?(0,n.parseISO)(e):e}var s=e.t({format:()=>u,formatDistance:()=>c,formatDistanceToNow:()=>l,formatRelative:()=>d});e.n(s,require(`date-fns`));function c(e,t=new Date,r){return(0,n.formatDistance)(o(e),o(t),{locale:i,...r})}function l(e,t){return(0,n.formatDistanceToNow)(o(e),{locale:i,...t})}function u(e,t,r){return(0,n.format)(o(e),t,{locale:i,...r})}function d(e,t=new Date,r){return(0,n.formatRelative)(o(e),o(t),{locale:i,...r})}function f(e,t,n=a){return u((0,r.toZonedTime)(o(e),n),t,{locale:i})}var p=e=>{let t=new Date,n=(0,s.differenceInMinutes)(e,t);if(n<1)return`<1m`;if(n<10)return`<${Math.ceil(n/10)*10}m`;if((0,s.differenceInHours)(e,t)<1)return`<1h`;let r=(0,s.differenceInDays)(e,t);if(r<1)return`<1d`;if(r<7)return`${r}d`;let i=(0,s.differenceInMonths)(e,t);return i<1?`${Math.ceil(r/30)}M`:i<12?`${i}M`:`${(0,s.differenceInYears)(e,t)}y`};function m(e,t=new Date,s=`às`,c=a){let l=(0,n.formatRelative)((0,r.toZonedTime)(o(e),c),(0,r.toZonedTime)(o(t),c),{locale:i}).replace(/às/g,s);return`${l.charAt(0).toUpperCase()}${l.slice(1)}`}function h(e,i){return(0,n.formatDistanceToNow)((0,r.toZonedTime)(o(e),a),{locale:t.ptBR,...i})}var g=e.t({DEFAULT_LOCALE:()=>i,DEFAULT_TZ:()=>a,format:()=>u,formatDateTZ:()=>f,formatDistance:()=>c,formatDistanceToNow:()=>l,formatRelative:()=>d,formatRelativeDate:()=>m,formatRelativeDateToNow:()=>h,formatRelativeReviewDate:()=>p,toDate:()=>o});e.n(g,s),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return o}});
|