@haroonwaves/blog-kit-react 1.3.0 → 1.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/README.md +1 -1
- package/dist/index.cjs +244 -93
- package/dist/index.d.cts +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.js +237 -89
- package/dist/style.css +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @haroonwaves/blog-kit-react
|
|
2
2
|
|
|
3
3
|
React components and hooks for rendering markdown blogs. Includes blog renderer with syntax
|
|
4
|
-
highlighting, blog cards, lists, and
|
|
4
|
+
highlighting, blog cards, lists with built-in search, filtering, and customization.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,9 @@ __export(src_exports, {
|
|
|
34
34
|
BlogList: () => BlogList,
|
|
35
35
|
BlogPlaceholder: () => BlogPlaceholder,
|
|
36
36
|
BlogRenderer: () => BlogRenderer,
|
|
37
|
+
Filter: () => Filter,
|
|
38
|
+
filterBlogs: () => filterBlogs,
|
|
39
|
+
getAvailableCategories: () => getAvailableCategories,
|
|
37
40
|
useBlogs: () => useBlogs
|
|
38
41
|
});
|
|
39
42
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -49,15 +52,15 @@ var import_rehype_slug_custom_id = __toESM(require("rehype-slug-custom-id"), 1);
|
|
|
49
52
|
// src/components/Badge.tsx
|
|
50
53
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
54
|
var colorVariants = [
|
|
52
|
-
"bg-blue-100 dark:bg-blue-900/30 text-blue-500 dark:text-blue-300",
|
|
53
|
-
"bg-orange-100 dark:bg-orange-900/30 text-orange-500 dark:text-orange-300",
|
|
54
|
-
"bg-emerald-100 dark:bg-emerald-900/30 text-emerald-500 dark:text-emerald-300",
|
|
55
|
-
"bg-violet-100 dark:bg-violet-900/30 text-violet-500 dark:text-violet-300",
|
|
56
|
-
"bg-amber-100 dark:bg-amber-900/30 text-amber-500 dark:text-amber-300",
|
|
57
|
-
"bg-rose-100 dark:bg-rose-900/30 text-rose-500 dark:text-rose-300",
|
|
58
|
-
"bg-cyan-100 dark:bg-cyan-900/30 text-cyan-500 dark:text-cyan-300",
|
|
59
|
-
"bg-fuchsia-100 dark:bg-fuchsia-900/30 text-fuchsia-500 dark:text-fuchsia-300",
|
|
60
|
-
"bg-teal-100 dark:bg-teal-900/30 text-teal-500 dark:text-teal-300"
|
|
55
|
+
"bk:bg-blue-100 bk:dark:bg-blue-900/30 bk:text-blue-500 bk:dark:text-blue-300",
|
|
56
|
+
"bk:bg-orange-100 bk:dark:bg-orange-900/30 bk:text-orange-500 bk:dark:text-orange-300",
|
|
57
|
+
"bk:bg-emerald-100 bk:dark:bg-emerald-900/30 bk:text-emerald-500 bk:dark:text-emerald-300",
|
|
58
|
+
"bk:bg-violet-100 bk:dark:bg-violet-900/30 bk:text-violet-500 bk:dark:text-violet-300",
|
|
59
|
+
"bk:bg-amber-100 bk:dark:bg-amber-900/30 bk:text-amber-500 bk:dark:text-amber-300",
|
|
60
|
+
"bk:bg-rose-100 bk:dark:bg-rose-900/30 bk:text-rose-500 bk:dark:text-rose-300",
|
|
61
|
+
"bk:bg-cyan-100 bk:dark:bg-cyan-900/30 bk:text-cyan-500 bk:dark:text-cyan-300",
|
|
62
|
+
"bk:bg-fuchsia-100 bk:dark:bg-fuchsia-900/30 bk:text-fuchsia-500 bk:dark:text-fuchsia-300",
|
|
63
|
+
"bk:bg-teal-100 bk:dark:bg-teal-900/30 bk:text-teal-500 bk:dark:text-teal-300"
|
|
61
64
|
];
|
|
62
65
|
function getColorIndex(text) {
|
|
63
66
|
let hash = 5381;
|
|
@@ -72,7 +75,7 @@ function Badge({ children, className }) {
|
|
|
72
75
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
76
|
"span",
|
|
74
77
|
{
|
|
75
|
-
className: `inline-flex items-center rounded-full border border-transparent px-2.5 py-0.5 text-xs font-semibold shrink-0 ${colorClass} ${className ?? ""}`,
|
|
78
|
+
className: `bk:inline-flex bk:items-center bk:rounded-full bk:border bk:border-transparent bk:px-2.5 bk:py-0.5 bk:text-xs bk:font-semibold bk:shrink-0 ${colorClass} ${className ?? ""}`,
|
|
76
79
|
children
|
|
77
80
|
}
|
|
78
81
|
);
|
|
@@ -84,55 +87,67 @@ var defaultComponents = {
|
|
|
84
87
|
h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
85
88
|
"h1",
|
|
86
89
|
{
|
|
87
|
-
className: "mt-10 first:mt-0 mb-5 text-3xl md:text-4xl font-semibold tracking-tight text-gray-800 dark:text-gray-200",
|
|
90
|
+
className: "bk:mt-10 bk:first:mt-0 bk:mb-5 bk:text-3xl bk:md:text-4xl bk:font-semibold bk:tracking-tight bk:text-gray-800 bk:dark:text-gray-200",
|
|
88
91
|
...props
|
|
89
92
|
}
|
|
90
93
|
),
|
|
91
94
|
h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
92
95
|
"h2",
|
|
93
96
|
{
|
|
94
|
-
className: "mt-8 first:mt-0 mb-4 text-2xl md:text-3xl font-semibold tracking-tight text-gray-800 dark:text-gray-200",
|
|
97
|
+
className: "bk:mt-8 bk:first:mt-0 bk:mb-4 bk:text-2xl bk:md:text-3xl bk:font-semibold bk:tracking-tight bk:text-gray-800 bk:dark:text-gray-200",
|
|
95
98
|
...props
|
|
96
99
|
}
|
|
97
100
|
),
|
|
98
101
|
h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
99
102
|
"h3",
|
|
100
103
|
{
|
|
101
|
-
className: "mt-6 mb-4 first:mt-0 text-xl md:text-2xl font-semibold text-gray-800 dark:text-gray-200",
|
|
104
|
+
className: "bk:mt-6 bk:mb-4 bk:first:mt-0 bk:text-xl bk:md:text-2xl bk:font-semibold bk:text-gray-800 bk:dark:text-gray-200",
|
|
102
105
|
...props
|
|
103
106
|
}
|
|
104
107
|
),
|
|
105
108
|
h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
106
109
|
"h4",
|
|
107
110
|
{
|
|
108
|
-
className: "mt-5 mb-3 first:mt-0 text-lg font-semibold text-gray-800 dark:text-gray-200",
|
|
111
|
+
className: "bk:mt-5 bk:mb-3 bk:first:mt-0 bk:text-lg bk:font-semibold bk:text-gray-800 bk:dark:text-gray-200",
|
|
109
112
|
...props
|
|
110
113
|
}
|
|
111
114
|
),
|
|
112
115
|
h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
113
116
|
"h5",
|
|
114
117
|
{
|
|
115
|
-
className: "mt-4 mb-2 first:mt-0 text-base font-semibold text-gray-700 dark:text-gray-200",
|
|
118
|
+
className: "bk:mt-4 bk:mb-2 bk:first:mt-0 bk:text-base bk:font-semibold bk:text-gray-700 bk:dark:text-gray-200",
|
|
116
119
|
...props
|
|
117
120
|
}
|
|
118
121
|
),
|
|
119
122
|
h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
120
123
|
"h6",
|
|
121
124
|
{
|
|
122
|
-
className: "mt-4 mb-2 text-sm first:mt-0 font-semibold uppercase tracking-wide text-gray-600 dark:text-gray-300",
|
|
125
|
+
className: "bk:mt-4 bk:mb-2 bk:text-sm bk:first:mt-0 bk:font-semibold bk:uppercase bk:tracking-wide bk:text-gray-600 bk:dark:text-gray-300",
|
|
126
|
+
...props
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
p: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "bk:mb-4 bk:leading-7 bk:text-gray-700 bk:dark:text-gray-300", ...props }),
|
|
130
|
+
ul: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
131
|
+
"ul",
|
|
132
|
+
{
|
|
133
|
+
className: "bk:mb-4 bk:ml-6 bk:list-disc bk:space-y-2 bk:text-gray-700 bk:dark:text-gray-300",
|
|
134
|
+
...props
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
ol: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
138
|
+
"ol",
|
|
139
|
+
{
|
|
140
|
+
className: "bk:mb-4 bk:ml-6 bk:list-decimal bk:space-y-2 bk:text-gray-700 bk:dark:text-gray-300",
|
|
123
141
|
...props
|
|
124
142
|
}
|
|
125
143
|
),
|
|
126
|
-
p: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "mb-4 leading-7 text-gray-700 dark:text-gray-300", ...props }),
|
|
127
|
-
ul: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "mb-4 ml-6 list-disc space-y-2 text-gray-700 dark:text-gray-300", ...props }),
|
|
128
|
-
ol: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ol", { className: "mb-4 ml-6 list-decimal space-y-2 text-gray-700 dark:text-gray-300", ...props }),
|
|
129
144
|
li: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { ...props }),
|
|
130
145
|
code: ({ className, children, ...props }) => {
|
|
131
146
|
const isInline = !className;
|
|
132
147
|
return isInline ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
133
148
|
"code",
|
|
134
149
|
{
|
|
135
|
-
className: "rounded bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 text-sm font-mono text-rose-600 dark:text-rose-400",
|
|
150
|
+
className: "bk:rounded bk:bg-gray-100 bk:dark:bg-gray-800 bk:px-1.5 bk:py-0.5 bk:text-sm bk:font-mono bk:text-rose-600 bk:dark:text-rose-400",
|
|
136
151
|
...props,
|
|
137
152
|
children
|
|
138
153
|
}
|
|
@@ -142,7 +157,7 @@ var defaultComponents = {
|
|
|
142
157
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
143
158
|
"pre",
|
|
144
159
|
{
|
|
145
|
-
className: `mb-4 rounded-lg overflow-x-auto [&>code]:block [&>code]:p-4 ${preClassName || ""}`,
|
|
160
|
+
className: `bk:mb-4 bk:rounded-lg bk:overflow-x-auto [&>code]:bk:block [&>code]:bk:p-4 ${preClassName || ""}`,
|
|
146
161
|
...props,
|
|
147
162
|
children
|
|
148
163
|
}
|
|
@@ -151,36 +166,48 @@ var defaultComponents = {
|
|
|
151
166
|
blockquote: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
152
167
|
"blockquote",
|
|
153
168
|
{
|
|
154
|
-
className: "my-6 border-l-4 border-blue-500 pl-4 italic text-gray-600 dark:text-gray-400",
|
|
169
|
+
className: "bk:my-6 bk:border-l-4 bk:border-blue-500 bk:pl-4 bk:italic bk:text-gray-600 bk:dark:text-gray-400",
|
|
155
170
|
...props
|
|
156
171
|
}
|
|
157
172
|
),
|
|
158
173
|
a: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
159
174
|
"a",
|
|
160
175
|
{
|
|
161
|
-
className: "text-blue-600 dark:text-blue-400 underline underline-offset-4 hover:text-blue-800 dark:hover:text-blue-300",
|
|
176
|
+
className: "bk:text-blue-600 bk:dark:text-blue-400 bk:underline bk:underline-offset-4 bk:hover:text-blue-800 bk:dark:hover:text-blue-300",
|
|
162
177
|
...props
|
|
163
178
|
}
|
|
164
179
|
),
|
|
165
|
-
strong: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { className: "font-semibold text-gray-800 dark:text-gray-200", ...props }),
|
|
166
|
-
em: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("em", { className: "italic text-gray-800 dark:text-gray-200", ...props }),
|
|
167
|
-
del: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("del", { className: "text-gray-500 dark:text-gray-400", ...props }),
|
|
168
|
-
hr: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", { className: "my-9 border-gray-200 dark:border-neutral-900", ...props }),
|
|
180
|
+
strong: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { className: "bk:font-semibold bk:text-gray-800 bk:dark:text-gray-200", ...props }),
|
|
181
|
+
em: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("em", { className: "bk:italic bk:text-gray-800 bk:dark:text-gray-200", ...props }),
|
|
182
|
+
del: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("del", { className: "bk:text-gray-500 bk:dark:text-gray-400", ...props }),
|
|
183
|
+
hr: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", { className: "bk:my-9 bk:border-gray-200 bk:dark:border-neutral-900", ...props }),
|
|
169
184
|
br: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("br", { ...props }),
|
|
170
|
-
img: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { className: "my-6 rounded-xl max-w-full h-auto", ...props }),
|
|
171
|
-
table: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "my-6 overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
185
|
+
img: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { className: "bk:my-6 bk:rounded-xl bk:max-w-full bk:h-auto", ...props }),
|
|
186
|
+
table: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "bk:my-6 bk:overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
172
187
|
"table",
|
|
173
188
|
{
|
|
174
|
-
className: "w-full border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden text-sm",
|
|
189
|
+
className: "bk:w-full bk:border bk:border-gray-200 bk:dark:border-gray-700 bk:rounded-lg bk:overflow-hidden bk:text-sm",
|
|
175
190
|
...props
|
|
176
191
|
}
|
|
177
192
|
) }),
|
|
178
|
-
thead: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
193
|
+
thead: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
194
|
+
"thead",
|
|
195
|
+
{
|
|
196
|
+
className: "bk:bg-gray-50 bk:dark:bg-gray-800 bk:text-gray-700 bk:dark:text-gray-200",
|
|
197
|
+
...props
|
|
198
|
+
}
|
|
199
|
+
),
|
|
179
200
|
tbody: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tbody", { ...props }),
|
|
180
|
-
tr: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
201
|
+
tr: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
202
|
+
"tr",
|
|
203
|
+
{
|
|
204
|
+
className: "bk:border-b bk:last:border-b-0 bk:border-gray-200 bk:dark:border-gray-700",
|
|
205
|
+
...props
|
|
206
|
+
}
|
|
207
|
+
),
|
|
208
|
+
th: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { className: "bk:px-4 bk:py-3 bk:text-left bk:font-semibold", ...props }),
|
|
209
|
+
td: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "bk:px-4 bk:py-3 bk:text-gray-700 bk:dark:text-gray-300", ...props }),
|
|
210
|
+
input: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("input", { type: "checkbox", disabled: true, className: "bk:mr-2 bk:accent-blue-600", ...props })
|
|
184
211
|
};
|
|
185
212
|
function BlogRenderer({
|
|
186
213
|
content,
|
|
@@ -193,9 +220,9 @@ function BlogRenderer({
|
|
|
193
220
|
}) {
|
|
194
221
|
const mergedComponents = { ...defaultComponents, ...components };
|
|
195
222
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
196
|
-
(showCategory || showReadingTime || showDate) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
197
|
-
showCategory && metadata.categories?.length ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center gap-1.5 flex-wrap", children: metadata.categories.map((cat) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Badge, { children: cat }, cat)) }) : null,
|
|
198
|
-
(showReadingTime || showDate) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap", children: [
|
|
223
|
+
(showCategory || showReadingTime || showDate) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bk:flex bk:items-center bk:gap-3 bk:mb-4", children: [
|
|
224
|
+
showCategory && metadata.categories?.length ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "bk:flex bk:items-center bk:gap-1.5 bk:flex-wrap", children: metadata.categories.map((cat) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Badge, { children: cat }, cat)) }) : null,
|
|
225
|
+
(showReadingTime || showDate) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bk:flex bk:items-center bk:gap-2 bk:text-sm bk:text-gray-500 bk:dark:text-gray-400 bk:whitespace-nowrap", children: [
|
|
199
226
|
showReadingTime && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: metadata.readingTime }),
|
|
200
227
|
showReadingTime && showDate && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u2022" }),
|
|
201
228
|
showDate && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("time", { dateTime: metadata.date, children: new Date(metadata.date).toLocaleDateString("en-US", {
|
|
@@ -205,7 +232,7 @@ function BlogRenderer({
|
|
|
205
232
|
}) })
|
|
206
233
|
] })
|
|
207
234
|
] }),
|
|
208
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: `prose prose-slate dark:prose-invert max-w-none ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
235
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: `bk:prose bk:prose-slate bk:dark:prose-invert bk:max-w-none ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
209
236
|
import_react_markdown.default,
|
|
210
237
|
{
|
|
211
238
|
remarkPlugins: [import_remark_gfm.default],
|
|
@@ -235,11 +262,11 @@ function BlogCard({
|
|
|
235
262
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
236
263
|
"article",
|
|
237
264
|
{
|
|
238
|
-
className: `rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 bg-white dark:bg-gray-800 p-6 transition-colors min-h-[200px] flex flex-col ${className}`,
|
|
265
|
+
className: `bk:rounded-lg bk:border bk:border-gray-200 bk:dark:border-gray-700 bk:hover:border-gray-300 bk:dark:hover:border-gray-600 bk:bg-white bk:dark:bg-gray-800 bk:p-6 bk:transition-colors bk:min-h-[200px] bk:flex bk:flex-col ${className}`,
|
|
239
266
|
children: [
|
|
240
|
-
(showCategory || showReadingTime || showDate) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-3 justify-between", children: [
|
|
241
|
-
showCategory && metadata.categories?.length ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex items-center gap-1.5 flex-nowrap overflow-hidden", children: metadata.categories.slice(0, 2).map((cat) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Badge, { children: cat }, cat)) }) : null,
|
|
242
|
-
(showReadingTime || showDate) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap", children: [
|
|
267
|
+
(showCategory || showReadingTime || showDate) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "bk:mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "bk:flex bk:items-center bk:gap-3 bk:justify-between", children: [
|
|
268
|
+
showCategory && metadata.categories?.length ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "bk:flex bk:items-center bk:gap-1.5 bk:flex-nowrap bk:overflow-hidden", children: metadata.categories.slice(0, 2).map((cat) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Badge, { children: cat }, cat)) }) : null,
|
|
269
|
+
(showReadingTime || showDate) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "bk:flex bk:items-center bk:gap-2 bk:text-sm bk:text-gray-500 bk:dark:text-gray-400 bk:whitespace-nowrap", children: [
|
|
243
270
|
showReadingTime && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: metadata.readingTime }),
|
|
244
271
|
showReadingTime && showDate && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u2022" }),
|
|
245
272
|
showDate && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("time", { dateTime: metadata.date, children: new Date(metadata.date).toLocaleDateString("en-US", {
|
|
@@ -251,12 +278,12 @@ function BlogCard({
|
|
|
251
278
|
] }) }),
|
|
252
279
|
Link(
|
|
253
280
|
href,
|
|
254
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "font-semibold text-xl text-gray-700 dark:text-gray-100 mb-2 hover:underline transition-colors line-clamp-2", children: metadata.title })
|
|
281
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "bk:font-semibold bk:text-xl bk:text-gray-700 bk:dark:text-gray-100 bk:mb-2 bk:hover:underline bk:transition-colors bk:line-clamp-2", children: metadata.title })
|
|
255
282
|
),
|
|
256
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-300 mb-2 leading-6 line-clamp-2", children: metadata.description }),
|
|
257
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mt-auto", children: Link(
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "bk:text-sm bk:text-gray-500 bk:dark:text-gray-300 bk:mb-2 bk:leading-6 bk:line-clamp-2", children: metadata.description }),
|
|
284
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "bk:mt-auto", children: Link(
|
|
258
285
|
href,
|
|
259
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium text-sm", children: "Read more \u2192" })
|
|
286
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "bk:inline-flex bk:items-center bk:text-blue-600 bk:dark:text-blue-400 bk:hover:text-blue-700 bk:dark:hover:text-blue-300 bk:font-medium bk:text-sm", children: "Read more \u2192" })
|
|
260
287
|
) })
|
|
261
288
|
]
|
|
262
289
|
}
|
|
@@ -264,41 +291,155 @@ function BlogCard({
|
|
|
264
291
|
}
|
|
265
292
|
|
|
266
293
|
// src/components/BlogList.tsx
|
|
294
|
+
var import_react3 = require("react");
|
|
267
295
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
268
296
|
function BlogList({
|
|
269
297
|
metadata,
|
|
298
|
+
title,
|
|
299
|
+
description,
|
|
270
300
|
basePath = "/blog",
|
|
271
301
|
renderLink,
|
|
272
302
|
className = "",
|
|
273
303
|
emptyMessage = "No blog posts found.",
|
|
274
|
-
cardProps
|
|
304
|
+
cardProps,
|
|
305
|
+
classNames = {}
|
|
275
306
|
}) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "bk:w-full", children: [
|
|
308
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
309
|
+
"h1",
|
|
310
|
+
{
|
|
311
|
+
className: `bk:text-4xl bk:font-bold bk:mb-4 bk:mt-8 bk:text-gray-800 bk:dark:text-gray-100 ${classNames.title ?? ""}`,
|
|
312
|
+
children: title
|
|
313
|
+
}
|
|
314
|
+
),
|
|
315
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
316
|
+
"p",
|
|
317
|
+
{
|
|
318
|
+
className: `bk:text-gray-600 bk:dark:text-gray-400 bk:mb-8 ${classNames.description ?? ""}`,
|
|
319
|
+
children: description
|
|
320
|
+
}
|
|
321
|
+
),
|
|
322
|
+
metadata.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
323
|
+
"div",
|
|
324
|
+
{
|
|
325
|
+
className: `bk:text-center bk:text-gray-500 bk:dark:text-gray-400 bk:py-12 ${className}`,
|
|
326
|
+
children: emptyMessage
|
|
327
|
+
}
|
|
328
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: `bk:flex bk:flex-col bk:gap-6 ${className}`, children: metadata.map((meta) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
329
|
+
BlogCard,
|
|
330
|
+
{
|
|
331
|
+
metadata: meta,
|
|
332
|
+
basePath,
|
|
333
|
+
renderLink,
|
|
334
|
+
...cardProps
|
|
335
|
+
},
|
|
336
|
+
meta.slug
|
|
337
|
+
)) })
|
|
338
|
+
] });
|
|
289
339
|
}
|
|
290
340
|
|
|
291
|
-
// src/components/
|
|
341
|
+
// src/components/Filter.tsx
|
|
342
|
+
var import_react4 = require("react");
|
|
292
343
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
344
|
+
function Filter({
|
|
345
|
+
searchTerm,
|
|
346
|
+
setSearchTerm,
|
|
347
|
+
selectedCategory,
|
|
348
|
+
setSelectedCategory,
|
|
349
|
+
categories,
|
|
350
|
+
postsCount,
|
|
351
|
+
className = "",
|
|
352
|
+
placeholder = "Search blogs...",
|
|
353
|
+
classNames = {}
|
|
354
|
+
}) {
|
|
355
|
+
const pillBase = `bk:px-2.5 bk:py-1 bk:cursor-pointer bk:rounded-md bk:text-xs bk:font-medium bk:transition-colors ${classNames.pill ?? ""}`;
|
|
356
|
+
const pillActive = `bk:bg-gray-700 bk:dark:bg-gray-200 bk:text-white bk:dark:text-gray-800 ${classNames.activePill ?? ""}`;
|
|
357
|
+
const pillInactive = `bk:bg-gray-100 bk:dark:bg-gray-700 bk:text-gray-500 bk:dark:text-gray-300 bk:hover:bg-gray-200 bk:dark:hover:bg-gray-600 ${classNames.inactivePill ?? ""}`;
|
|
358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: `bk:flex bk:flex-col bk:gap-4 bk:mb-6 ${className}`, children: [
|
|
359
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "bk:flex bk:flex-col bk:sm:flex-row bk:gap-3", children: [
|
|
360
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "bk:relative bk:flex-1", children: [
|
|
361
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
362
|
+
"svg",
|
|
363
|
+
{
|
|
364
|
+
className: "bk:absolute bk:left-3 bk:top-1/2 bk:-translate-y-1/2 bk:w-3.5 bk:h-3.5 bk:text-gray-400 bk:pointer-events-none",
|
|
365
|
+
fill: "none",
|
|
366
|
+
stroke: "currentColor",
|
|
367
|
+
strokeWidth: 2,
|
|
368
|
+
viewBox: "0 0 24 24",
|
|
369
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
370
|
+
"path",
|
|
371
|
+
{
|
|
372
|
+
strokeLinecap: "round",
|
|
373
|
+
strokeLinejoin: "round",
|
|
374
|
+
d: "M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z"
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
}
|
|
378
|
+
),
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
380
|
+
"input",
|
|
381
|
+
{
|
|
382
|
+
id: "blog-search",
|
|
383
|
+
type: "search",
|
|
384
|
+
value: searchTerm,
|
|
385
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
386
|
+
placeholder,
|
|
387
|
+
className: `bk:w-full bk:pl-8 bk:pr-4 bk:py-2 bk:rounded-md bk:border bk:border-gray-200 bk:dark:border-gray-700 bk:bg-white bk:dark:bg-gray-800 bk:text-sm bk:text-gray-700 bk:dark:text-gray-200 bk:placeholder-gray-400 bk:focus:outline-none bk:focus:border-gray-400 bk:dark:focus:border-gray-500 bk:transition-colors ${classNames.input ?? ""}`
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
] }),
|
|
391
|
+
categories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
392
|
+
"div",
|
|
393
|
+
{
|
|
394
|
+
className: `bk:flex bk:flex-wrap bk:gap-2 bk:items-center ${classNames.categoryContainer ?? ""}`,
|
|
395
|
+
children: [
|
|
396
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
397
|
+
"button",
|
|
398
|
+
{
|
|
399
|
+
onClick: () => setSelectedCategory(null),
|
|
400
|
+
className: `${pillBase} ${selectedCategory === null ? pillActive : pillInactive}`,
|
|
401
|
+
children: "All"
|
|
402
|
+
}
|
|
403
|
+
),
|
|
404
|
+
categories.slice(0, 3).map((cat) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
405
|
+
"button",
|
|
406
|
+
{
|
|
407
|
+
onClick: () => setSelectedCategory(cat),
|
|
408
|
+
className: `${pillBase} ${selectedCategory === cat ? pillActive : pillInactive}`,
|
|
409
|
+
children: cat
|
|
410
|
+
},
|
|
411
|
+
cat
|
|
412
|
+
))
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
] }),
|
|
417
|
+
postsCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
418
|
+
"p",
|
|
419
|
+
{
|
|
420
|
+
className: `bk:text-[10px] bk:uppercase bk:tracking-wider bk:text-gray-400 bk:dark:text-gray-500 ${classNames.postsCount ?? ""}`,
|
|
421
|
+
children: [
|
|
422
|
+
postsCount,
|
|
423
|
+
" ",
|
|
424
|
+
postsCount === 1 ? "post" : "posts",
|
|
425
|
+
" found"
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
)
|
|
429
|
+
] });
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// src/components/BlogPlaceholder.tsx
|
|
433
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
293
434
|
function BlogPlaceholder({ count = 3, className = "" }) {
|
|
294
|
-
return /* @__PURE__ */ (0,
|
|
435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `${className}`, children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
295
436
|
"div",
|
|
296
437
|
{
|
|
297
|
-
className: "bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-6 animate-pulse",
|
|
438
|
+
className: "bk:bg-white bk:dark:bg-gray-800 bk:rounded-lg bk:border bk:border-gray-200 bk:dark:border-gray-700 bk:p-6 bk:animate-pulse",
|
|
298
439
|
children: [
|
|
299
|
-
/* @__PURE__ */ (0,
|
|
300
|
-
/* @__PURE__ */ (0,
|
|
301
|
-
/* @__PURE__ */ (0,
|
|
440
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "bk:h-4 bk:bg-gray-200 bk:dark:bg-gray-700 bk:rounded bk:mb-3" }),
|
|
441
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "bk:h-6 bk:bg-gray-200 bk:dark:bg-gray-700 bk:rounded bk:mb-2" }),
|
|
442
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "bk:h-4 bk:bg-gray-200 bk:dark:bg-gray-700 bk:rounded bk:w-3/4" })
|
|
302
443
|
]
|
|
303
444
|
},
|
|
304
445
|
i
|
|
@@ -306,13 +447,13 @@ function BlogPlaceholder({ count = 3, className = "" }) {
|
|
|
306
447
|
}
|
|
307
448
|
|
|
308
449
|
// src/hooks/useBlogs.ts
|
|
309
|
-
var
|
|
450
|
+
var import_react6 = require("react");
|
|
310
451
|
|
|
311
452
|
// src/hooks/useDebounce.ts
|
|
312
|
-
var
|
|
453
|
+
var import_react5 = require("react");
|
|
313
454
|
function useDebounce(value, delay) {
|
|
314
|
-
const [debouncedValue, setDebouncedValue] = (0,
|
|
315
|
-
(0,
|
|
455
|
+
const [debouncedValue, setDebouncedValue] = (0, import_react5.useState)(value);
|
|
456
|
+
(0, import_react5.useEffect)(() => {
|
|
316
457
|
const timer = setTimeout(() => {
|
|
317
458
|
setDebouncedValue(value);
|
|
318
459
|
}, delay);
|
|
@@ -323,33 +464,40 @@ function useDebounce(value, delay) {
|
|
|
323
464
|
return debouncedValue;
|
|
324
465
|
}
|
|
325
466
|
|
|
467
|
+
// src/utils/filter-utils.ts
|
|
468
|
+
function filterBlogs(blogs, searchTerm = "", selectedCategory = null) {
|
|
469
|
+
let filtered = blogs;
|
|
470
|
+
if (searchTerm) {
|
|
471
|
+
const lowerSearch = searchTerm.toLowerCase();
|
|
472
|
+
filtered = filtered.filter(
|
|
473
|
+
(blog) => (blog.title?.toLowerCase() || "").includes(lowerSearch) || (blog.description?.toLowerCase() || "").includes(lowerSearch)
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
if (selectedCategory) {
|
|
477
|
+
filtered = filtered.filter((blog) => {
|
|
478
|
+
const categories = blog.categories ?? [];
|
|
479
|
+
return categories.includes(selectedCategory);
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
return filtered;
|
|
483
|
+
}
|
|
484
|
+
function getAvailableCategories(blogs) {
|
|
485
|
+
return Array.from(new Set(blogs.flatMap((blog) => blog.categories ?? [])));
|
|
486
|
+
}
|
|
487
|
+
|
|
326
488
|
// src/hooks/useBlogs.ts
|
|
327
489
|
function useBlogs(blogsMeta) {
|
|
328
|
-
const [
|
|
329
|
-
const [
|
|
330
|
-
const [selectedCategory, setSelectedCategory] = (0, import_react4.useState)(null);
|
|
490
|
+
const [searchTerm, setSearchTerm] = (0, import_react6.useState)("");
|
|
491
|
+
const [selectedCategory, setSelectedCategory] = (0, import_react6.useState)(null);
|
|
331
492
|
const debouncedSearchTerm = useDebounce(searchTerm, 500);
|
|
332
|
-
const
|
|
333
|
-
return
|
|
334
|
-
};
|
|
335
|
-
(0, import_react4.useEffect)(() => {
|
|
336
|
-
let filtered = blogsMeta;
|
|
337
|
-
if (debouncedSearchTerm) {
|
|
338
|
-
filtered = filtered.filter(
|
|
339
|
-
(blog) => blog.title.toLowerCase().includes(debouncedSearchTerm.toLowerCase()) || blog.description.toLowerCase().includes(debouncedSearchTerm.toLowerCase())
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
if (selectedCategory) {
|
|
343
|
-
filtered = filtered.filter((blog) => {
|
|
344
|
-
const blogCategories = getBlogCategories(blog);
|
|
345
|
-
return blogCategories.includes(selectedCategory);
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
setFilteredBlogs(filtered);
|
|
493
|
+
const metadata = (0, import_react6.useMemo)(() => {
|
|
494
|
+
return filterBlogs(blogsMeta, debouncedSearchTerm, selectedCategory);
|
|
349
495
|
}, [blogsMeta, debouncedSearchTerm, selectedCategory]);
|
|
350
|
-
const categories =
|
|
496
|
+
const categories = (0, import_react6.useMemo)(() => {
|
|
497
|
+
return getAvailableCategories(blogsMeta);
|
|
498
|
+
}, [blogsMeta]);
|
|
351
499
|
return {
|
|
352
|
-
metadata
|
|
500
|
+
metadata,
|
|
353
501
|
searchTerm,
|
|
354
502
|
setSearchTerm,
|
|
355
503
|
selectedCategory,
|
|
@@ -363,5 +511,8 @@ function useBlogs(blogsMeta) {
|
|
|
363
511
|
BlogList,
|
|
364
512
|
BlogPlaceholder,
|
|
365
513
|
BlogRenderer,
|
|
514
|
+
Filter,
|
|
515
|
+
filterBlogs,
|
|
516
|
+
getAvailableCategories,
|
|
366
517
|
useBlogs
|
|
367
518
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -43,13 +43,43 @@ declare function BlogCard({ metadata, basePath, renderLink, className, showCateg
|
|
|
43
43
|
|
|
44
44
|
interface BlogListProps {
|
|
45
45
|
metadata: BlogMeta[];
|
|
46
|
+
title?: string;
|
|
47
|
+
description?: string;
|
|
46
48
|
basePath?: string;
|
|
47
49
|
renderLink?: BlogCardProps['renderLink'];
|
|
48
50
|
className?: string;
|
|
49
51
|
emptyMessage?: string;
|
|
50
52
|
cardProps?: Omit<BlogCardProps, 'metadata' | 'basePath' | 'renderLink'>;
|
|
53
|
+
classNames?: {
|
|
54
|
+
title?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
};
|
|
51
57
|
}
|
|
52
|
-
|
|
58
|
+
/**
|
|
59
|
+
* A pure, stateless BlogList component that renders a list of blog cards.
|
|
60
|
+
* Accepts metadata and renders it exactly as provided.
|
|
61
|
+
*/
|
|
62
|
+
declare function BlogList({ metadata, title, description, basePath, renderLink, className, emptyMessage, cardProps, classNames, }: BlogListProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
interface FilterProps {
|
|
65
|
+
searchTerm: string;
|
|
66
|
+
setSearchTerm: (searchTerm: string) => void;
|
|
67
|
+
selectedCategory: string | null;
|
|
68
|
+
setSelectedCategory: (selectedCategory: string | null) => void;
|
|
69
|
+
categories: string[];
|
|
70
|
+
postsCount?: number;
|
|
71
|
+
className?: string;
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
classNames?: {
|
|
74
|
+
input?: string;
|
|
75
|
+
categoryContainer?: string;
|
|
76
|
+
pill?: string;
|
|
77
|
+
activePill?: string;
|
|
78
|
+
inactivePill?: string;
|
|
79
|
+
postsCount?: string;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
declare function Filter({ searchTerm, setSearchTerm, selectedCategory, setSelectedCategory, categories, postsCount, className, placeholder, classNames, }: FilterProps): react_jsx_runtime.JSX.Element;
|
|
53
83
|
|
|
54
84
|
interface BlogPlaceholderProps {
|
|
55
85
|
count?: number;
|
|
@@ -66,4 +96,7 @@ declare function useBlogs(blogsMeta: BlogMeta[]): {
|
|
|
66
96
|
categories: string[];
|
|
67
97
|
};
|
|
68
98
|
|
|
69
|
-
|
|
99
|
+
declare function filterBlogs(blogs: BlogMeta[], searchTerm?: string, selectedCategory?: string | null): BlogMeta[];
|
|
100
|
+
declare function getAvailableCategories(blogs: BlogMeta[]): string[];
|
|
101
|
+
|
|
102
|
+
export { type Blog, BlogCard, type BlogCardProps, type BlogConfig, BlogList, type BlogListProps, type BlogMeta, BlogPlaceholder, type BlogPlaceholderProps, BlogRenderer, type BlogRendererProps, Filter, type FilterProps, filterBlogs, getAvailableCategories, useBlogs };
|
package/dist/index.d.ts
CHANGED
|
@@ -43,13 +43,43 @@ declare function BlogCard({ metadata, basePath, renderLink, className, showCateg
|
|
|
43
43
|
|
|
44
44
|
interface BlogListProps {
|
|
45
45
|
metadata: BlogMeta[];
|
|
46
|
+
title?: string;
|
|
47
|
+
description?: string;
|
|
46
48
|
basePath?: string;
|
|
47
49
|
renderLink?: BlogCardProps['renderLink'];
|
|
48
50
|
className?: string;
|
|
49
51
|
emptyMessage?: string;
|
|
50
52
|
cardProps?: Omit<BlogCardProps, 'metadata' | 'basePath' | 'renderLink'>;
|
|
53
|
+
classNames?: {
|
|
54
|
+
title?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
};
|
|
51
57
|
}
|
|
52
|
-
|
|
58
|
+
/**
|
|
59
|
+
* A pure, stateless BlogList component that renders a list of blog cards.
|
|
60
|
+
* Accepts metadata and renders it exactly as provided.
|
|
61
|
+
*/
|
|
62
|
+
declare function BlogList({ metadata, title, description, basePath, renderLink, className, emptyMessage, cardProps, classNames, }: BlogListProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
interface FilterProps {
|
|
65
|
+
searchTerm: string;
|
|
66
|
+
setSearchTerm: (searchTerm: string) => void;
|
|
67
|
+
selectedCategory: string | null;
|
|
68
|
+
setSelectedCategory: (selectedCategory: string | null) => void;
|
|
69
|
+
categories: string[];
|
|
70
|
+
postsCount?: number;
|
|
71
|
+
className?: string;
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
classNames?: {
|
|
74
|
+
input?: string;
|
|
75
|
+
categoryContainer?: string;
|
|
76
|
+
pill?: string;
|
|
77
|
+
activePill?: string;
|
|
78
|
+
inactivePill?: string;
|
|
79
|
+
postsCount?: string;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
declare function Filter({ searchTerm, setSearchTerm, selectedCategory, setSelectedCategory, categories, postsCount, className, placeholder, classNames, }: FilterProps): react_jsx_runtime.JSX.Element;
|
|
53
83
|
|
|
54
84
|
interface BlogPlaceholderProps {
|
|
55
85
|
count?: number;
|
|
@@ -66,4 +96,7 @@ declare function useBlogs(blogsMeta: BlogMeta[]): {
|
|
|
66
96
|
categories: string[];
|
|
67
97
|
};
|
|
68
98
|
|
|
69
|
-
|
|
99
|
+
declare function filterBlogs(blogs: BlogMeta[], searchTerm?: string, selectedCategory?: string | null): BlogMeta[];
|
|
100
|
+
declare function getAvailableCategories(blogs: BlogMeta[]): string[];
|
|
101
|
+
|
|
102
|
+
export { type Blog, BlogCard, type BlogCardProps, type BlogConfig, BlogList, type BlogListProps, type BlogMeta, BlogPlaceholder, type BlogPlaceholderProps, BlogRenderer, type BlogRendererProps, Filter, type FilterProps, filterBlogs, getAvailableCategories, useBlogs };
|
package/dist/index.js
CHANGED
|
@@ -9,15 +9,15 @@ import rehypeSlugCustomId from "rehype-slug-custom-id";
|
|
|
9
9
|
// src/components/Badge.tsx
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
var colorVariants = [
|
|
12
|
-
"bg-blue-100 dark:bg-blue-900/30 text-blue-500 dark:text-blue-300",
|
|
13
|
-
"bg-orange-100 dark:bg-orange-900/30 text-orange-500 dark:text-orange-300",
|
|
14
|
-
"bg-emerald-100 dark:bg-emerald-900/30 text-emerald-500 dark:text-emerald-300",
|
|
15
|
-
"bg-violet-100 dark:bg-violet-900/30 text-violet-500 dark:text-violet-300",
|
|
16
|
-
"bg-amber-100 dark:bg-amber-900/30 text-amber-500 dark:text-amber-300",
|
|
17
|
-
"bg-rose-100 dark:bg-rose-900/30 text-rose-500 dark:text-rose-300",
|
|
18
|
-
"bg-cyan-100 dark:bg-cyan-900/30 text-cyan-500 dark:text-cyan-300",
|
|
19
|
-
"bg-fuchsia-100 dark:bg-fuchsia-900/30 text-fuchsia-500 dark:text-fuchsia-300",
|
|
20
|
-
"bg-teal-100 dark:bg-teal-900/30 text-teal-500 dark:text-teal-300"
|
|
12
|
+
"bk:bg-blue-100 bk:dark:bg-blue-900/30 bk:text-blue-500 bk:dark:text-blue-300",
|
|
13
|
+
"bk:bg-orange-100 bk:dark:bg-orange-900/30 bk:text-orange-500 bk:dark:text-orange-300",
|
|
14
|
+
"bk:bg-emerald-100 bk:dark:bg-emerald-900/30 bk:text-emerald-500 bk:dark:text-emerald-300",
|
|
15
|
+
"bk:bg-violet-100 bk:dark:bg-violet-900/30 bk:text-violet-500 bk:dark:text-violet-300",
|
|
16
|
+
"bk:bg-amber-100 bk:dark:bg-amber-900/30 bk:text-amber-500 bk:dark:text-amber-300",
|
|
17
|
+
"bk:bg-rose-100 bk:dark:bg-rose-900/30 bk:text-rose-500 bk:dark:text-rose-300",
|
|
18
|
+
"bk:bg-cyan-100 bk:dark:bg-cyan-900/30 bk:text-cyan-500 bk:dark:text-cyan-300",
|
|
19
|
+
"bk:bg-fuchsia-100 bk:dark:bg-fuchsia-900/30 bk:text-fuchsia-500 bk:dark:text-fuchsia-300",
|
|
20
|
+
"bk:bg-teal-100 bk:dark:bg-teal-900/30 bk:text-teal-500 bk:dark:text-teal-300"
|
|
21
21
|
];
|
|
22
22
|
function getColorIndex(text) {
|
|
23
23
|
let hash = 5381;
|
|
@@ -32,7 +32,7 @@ function Badge({ children, className }) {
|
|
|
32
32
|
return /* @__PURE__ */ jsx(
|
|
33
33
|
"span",
|
|
34
34
|
{
|
|
35
|
-
className: `inline-flex items-center rounded-full border border-transparent px-2.5 py-0.5 text-xs font-semibold shrink-0 ${colorClass} ${className ?? ""}`,
|
|
35
|
+
className: `bk:inline-flex bk:items-center bk:rounded-full bk:border bk:border-transparent bk:px-2.5 bk:py-0.5 bk:text-xs bk:font-semibold bk:shrink-0 ${colorClass} ${className ?? ""}`,
|
|
36
36
|
children
|
|
37
37
|
}
|
|
38
38
|
);
|
|
@@ -44,55 +44,67 @@ var defaultComponents = {
|
|
|
44
44
|
h1: (props) => /* @__PURE__ */ jsx2(
|
|
45
45
|
"h1",
|
|
46
46
|
{
|
|
47
|
-
className: "mt-10 first:mt-0 mb-5 text-3xl md:text-4xl font-semibold tracking-tight text-gray-800 dark:text-gray-200",
|
|
47
|
+
className: "bk:mt-10 bk:first:mt-0 bk:mb-5 bk:text-3xl bk:md:text-4xl bk:font-semibold bk:tracking-tight bk:text-gray-800 bk:dark:text-gray-200",
|
|
48
48
|
...props
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
51
|
h2: (props) => /* @__PURE__ */ jsx2(
|
|
52
52
|
"h2",
|
|
53
53
|
{
|
|
54
|
-
className: "mt-8 first:mt-0 mb-4 text-2xl md:text-3xl font-semibold tracking-tight text-gray-800 dark:text-gray-200",
|
|
54
|
+
className: "bk:mt-8 bk:first:mt-0 bk:mb-4 bk:text-2xl bk:md:text-3xl bk:font-semibold bk:tracking-tight bk:text-gray-800 bk:dark:text-gray-200",
|
|
55
55
|
...props
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
58
|
h3: (props) => /* @__PURE__ */ jsx2(
|
|
59
59
|
"h3",
|
|
60
60
|
{
|
|
61
|
-
className: "mt-6 mb-4 first:mt-0 text-xl md:text-2xl font-semibold text-gray-800 dark:text-gray-200",
|
|
61
|
+
className: "bk:mt-6 bk:mb-4 bk:first:mt-0 bk:text-xl bk:md:text-2xl bk:font-semibold bk:text-gray-800 bk:dark:text-gray-200",
|
|
62
62
|
...props
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
65
|
h4: (props) => /* @__PURE__ */ jsx2(
|
|
66
66
|
"h4",
|
|
67
67
|
{
|
|
68
|
-
className: "mt-5 mb-3 first:mt-0 text-lg font-semibold text-gray-800 dark:text-gray-200",
|
|
68
|
+
className: "bk:mt-5 bk:mb-3 bk:first:mt-0 bk:text-lg bk:font-semibold bk:text-gray-800 bk:dark:text-gray-200",
|
|
69
69
|
...props
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
72
|
h5: (props) => /* @__PURE__ */ jsx2(
|
|
73
73
|
"h5",
|
|
74
74
|
{
|
|
75
|
-
className: "mt-4 mb-2 first:mt-0 text-base font-semibold text-gray-700 dark:text-gray-200",
|
|
75
|
+
className: "bk:mt-4 bk:mb-2 bk:first:mt-0 bk:text-base bk:font-semibold bk:text-gray-700 bk:dark:text-gray-200",
|
|
76
76
|
...props
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
79
|
h6: (props) => /* @__PURE__ */ jsx2(
|
|
80
80
|
"h6",
|
|
81
81
|
{
|
|
82
|
-
className: "mt-4 mb-2 text-sm first:mt-0 font-semibold uppercase tracking-wide text-gray-600 dark:text-gray-300",
|
|
82
|
+
className: "bk:mt-4 bk:mb-2 bk:text-sm bk:first:mt-0 bk:font-semibold bk:uppercase bk:tracking-wide bk:text-gray-600 bk:dark:text-gray-300",
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
p: (props) => /* @__PURE__ */ jsx2("p", { className: "bk:mb-4 bk:leading-7 bk:text-gray-700 bk:dark:text-gray-300", ...props }),
|
|
87
|
+
ul: (props) => /* @__PURE__ */ jsx2(
|
|
88
|
+
"ul",
|
|
89
|
+
{
|
|
90
|
+
className: "bk:mb-4 bk:ml-6 bk:list-disc bk:space-y-2 bk:text-gray-700 bk:dark:text-gray-300",
|
|
91
|
+
...props
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
ol: (props) => /* @__PURE__ */ jsx2(
|
|
95
|
+
"ol",
|
|
96
|
+
{
|
|
97
|
+
className: "bk:mb-4 bk:ml-6 bk:list-decimal bk:space-y-2 bk:text-gray-700 bk:dark:text-gray-300",
|
|
83
98
|
...props
|
|
84
99
|
}
|
|
85
100
|
),
|
|
86
|
-
p: (props) => /* @__PURE__ */ jsx2("p", { className: "mb-4 leading-7 text-gray-700 dark:text-gray-300", ...props }),
|
|
87
|
-
ul: (props) => /* @__PURE__ */ jsx2("ul", { className: "mb-4 ml-6 list-disc space-y-2 text-gray-700 dark:text-gray-300", ...props }),
|
|
88
|
-
ol: (props) => /* @__PURE__ */ jsx2("ol", { className: "mb-4 ml-6 list-decimal space-y-2 text-gray-700 dark:text-gray-300", ...props }),
|
|
89
101
|
li: (props) => /* @__PURE__ */ jsx2("li", { ...props }),
|
|
90
102
|
code: ({ className, children, ...props }) => {
|
|
91
103
|
const isInline = !className;
|
|
92
104
|
return isInline ? /* @__PURE__ */ jsx2(
|
|
93
105
|
"code",
|
|
94
106
|
{
|
|
95
|
-
className: "rounded bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 text-sm font-mono text-rose-600 dark:text-rose-400",
|
|
107
|
+
className: "bk:rounded bk:bg-gray-100 bk:dark:bg-gray-800 bk:px-1.5 bk:py-0.5 bk:text-sm bk:font-mono bk:text-rose-600 bk:dark:text-rose-400",
|
|
96
108
|
...props,
|
|
97
109
|
children
|
|
98
110
|
}
|
|
@@ -102,7 +114,7 @@ var defaultComponents = {
|
|
|
102
114
|
return /* @__PURE__ */ jsx2(
|
|
103
115
|
"pre",
|
|
104
116
|
{
|
|
105
|
-
className: `mb-4 rounded-lg overflow-x-auto [&>code]:block [&>code]:p-4 ${preClassName || ""}`,
|
|
117
|
+
className: `bk:mb-4 bk:rounded-lg bk:overflow-x-auto [&>code]:bk:block [&>code]:bk:p-4 ${preClassName || ""}`,
|
|
106
118
|
...props,
|
|
107
119
|
children
|
|
108
120
|
}
|
|
@@ -111,36 +123,48 @@ var defaultComponents = {
|
|
|
111
123
|
blockquote: (props) => /* @__PURE__ */ jsx2(
|
|
112
124
|
"blockquote",
|
|
113
125
|
{
|
|
114
|
-
className: "my-6 border-l-4 border-blue-500 pl-4 italic text-gray-600 dark:text-gray-400",
|
|
126
|
+
className: "bk:my-6 bk:border-l-4 bk:border-blue-500 bk:pl-4 bk:italic bk:text-gray-600 bk:dark:text-gray-400",
|
|
115
127
|
...props
|
|
116
128
|
}
|
|
117
129
|
),
|
|
118
130
|
a: (props) => /* @__PURE__ */ jsx2(
|
|
119
131
|
"a",
|
|
120
132
|
{
|
|
121
|
-
className: "text-blue-600 dark:text-blue-400 underline underline-offset-4 hover:text-blue-800 dark:hover:text-blue-300",
|
|
133
|
+
className: "bk:text-blue-600 bk:dark:text-blue-400 bk:underline bk:underline-offset-4 bk:hover:text-blue-800 bk:dark:hover:text-blue-300",
|
|
122
134
|
...props
|
|
123
135
|
}
|
|
124
136
|
),
|
|
125
|
-
strong: (props) => /* @__PURE__ */ jsx2("strong", { className: "font-semibold text-gray-800 dark:text-gray-200", ...props }),
|
|
126
|
-
em: (props) => /* @__PURE__ */ jsx2("em", { className: "italic text-gray-800 dark:text-gray-200", ...props }),
|
|
127
|
-
del: (props) => /* @__PURE__ */ jsx2("del", { className: "text-gray-500 dark:text-gray-400", ...props }),
|
|
128
|
-
hr: (props) => /* @__PURE__ */ jsx2("hr", { className: "my-9 border-gray-200 dark:border-neutral-900", ...props }),
|
|
137
|
+
strong: (props) => /* @__PURE__ */ jsx2("strong", { className: "bk:font-semibold bk:text-gray-800 bk:dark:text-gray-200", ...props }),
|
|
138
|
+
em: (props) => /* @__PURE__ */ jsx2("em", { className: "bk:italic bk:text-gray-800 bk:dark:text-gray-200", ...props }),
|
|
139
|
+
del: (props) => /* @__PURE__ */ jsx2("del", { className: "bk:text-gray-500 bk:dark:text-gray-400", ...props }),
|
|
140
|
+
hr: (props) => /* @__PURE__ */ jsx2("hr", { className: "bk:my-9 bk:border-gray-200 bk:dark:border-neutral-900", ...props }),
|
|
129
141
|
br: (props) => /* @__PURE__ */ jsx2("br", { ...props }),
|
|
130
|
-
img: (props) => /* @__PURE__ */ jsx2("img", { className: "my-6 rounded-xl max-w-full h-auto", ...props }),
|
|
131
|
-
table: (props) => /* @__PURE__ */ jsx2("div", { className: "my-6 overflow-x-auto", children: /* @__PURE__ */ jsx2(
|
|
142
|
+
img: (props) => /* @__PURE__ */ jsx2("img", { className: "bk:my-6 bk:rounded-xl bk:max-w-full bk:h-auto", ...props }),
|
|
143
|
+
table: (props) => /* @__PURE__ */ jsx2("div", { className: "bk:my-6 bk:overflow-x-auto", children: /* @__PURE__ */ jsx2(
|
|
132
144
|
"table",
|
|
133
145
|
{
|
|
134
|
-
className: "w-full border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden text-sm",
|
|
146
|
+
className: "bk:w-full bk:border bk:border-gray-200 bk:dark:border-gray-700 bk:rounded-lg bk:overflow-hidden bk:text-sm",
|
|
135
147
|
...props
|
|
136
148
|
}
|
|
137
149
|
) }),
|
|
138
|
-
thead: (props) => /* @__PURE__ */ jsx2(
|
|
150
|
+
thead: (props) => /* @__PURE__ */ jsx2(
|
|
151
|
+
"thead",
|
|
152
|
+
{
|
|
153
|
+
className: "bk:bg-gray-50 bk:dark:bg-gray-800 bk:text-gray-700 bk:dark:text-gray-200",
|
|
154
|
+
...props
|
|
155
|
+
}
|
|
156
|
+
),
|
|
139
157
|
tbody: (props) => /* @__PURE__ */ jsx2("tbody", { ...props }),
|
|
140
|
-
tr: (props) => /* @__PURE__ */ jsx2(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
158
|
+
tr: (props) => /* @__PURE__ */ jsx2(
|
|
159
|
+
"tr",
|
|
160
|
+
{
|
|
161
|
+
className: "bk:border-b bk:last:border-b-0 bk:border-gray-200 bk:dark:border-gray-700",
|
|
162
|
+
...props
|
|
163
|
+
}
|
|
164
|
+
),
|
|
165
|
+
th: (props) => /* @__PURE__ */ jsx2("th", { className: "bk:px-4 bk:py-3 bk:text-left bk:font-semibold", ...props }),
|
|
166
|
+
td: (props) => /* @__PURE__ */ jsx2("td", { className: "bk:px-4 bk:py-3 bk:text-gray-700 bk:dark:text-gray-300", ...props }),
|
|
167
|
+
input: (props) => /* @__PURE__ */ jsx2("input", { type: "checkbox", disabled: true, className: "bk:mr-2 bk:accent-blue-600", ...props })
|
|
144
168
|
};
|
|
145
169
|
function BlogRenderer({
|
|
146
170
|
content,
|
|
@@ -153,9 +177,9 @@ function BlogRenderer({
|
|
|
153
177
|
}) {
|
|
154
178
|
const mergedComponents = { ...defaultComponents, ...components };
|
|
155
179
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
156
|
-
(showCategory || showReadingTime || showDate) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
157
|
-
showCategory && metadata.categories?.length ? /* @__PURE__ */ jsx2("div", { className: "flex items-center gap-1.5 flex-wrap", children: metadata.categories.map((cat) => /* @__PURE__ */ jsx2(Badge, { children: cat }, cat)) }) : null,
|
|
158
|
-
(showReadingTime || showDate) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap", children: [
|
|
180
|
+
(showCategory || showReadingTime || showDate) && /* @__PURE__ */ jsxs("div", { className: "bk:flex bk:items-center bk:gap-3 bk:mb-4", children: [
|
|
181
|
+
showCategory && metadata.categories?.length ? /* @__PURE__ */ jsx2("div", { className: "bk:flex bk:items-center bk:gap-1.5 bk:flex-wrap", children: metadata.categories.map((cat) => /* @__PURE__ */ jsx2(Badge, { children: cat }, cat)) }) : null,
|
|
182
|
+
(showReadingTime || showDate) && /* @__PURE__ */ jsxs("div", { className: "bk:flex bk:items-center bk:gap-2 bk:text-sm bk:text-gray-500 bk:dark:text-gray-400 bk:whitespace-nowrap", children: [
|
|
159
183
|
showReadingTime && /* @__PURE__ */ jsx2("span", { children: metadata.readingTime }),
|
|
160
184
|
showReadingTime && showDate && /* @__PURE__ */ jsx2("span", { children: "\u2022" }),
|
|
161
185
|
showDate && /* @__PURE__ */ jsx2("time", { dateTime: metadata.date, children: new Date(metadata.date).toLocaleDateString("en-US", {
|
|
@@ -165,7 +189,7 @@ function BlogRenderer({
|
|
|
165
189
|
}) })
|
|
166
190
|
] })
|
|
167
191
|
] }),
|
|
168
|
-
/* @__PURE__ */ jsx2("div", { className: `prose prose-slate dark:prose-invert max-w-none ${className}`, children: /* @__PURE__ */ jsx2(
|
|
192
|
+
/* @__PURE__ */ jsx2("div", { className: `bk:prose bk:prose-slate bk:dark:prose-invert bk:max-w-none ${className}`, children: /* @__PURE__ */ jsx2(
|
|
169
193
|
ReactMarkdown,
|
|
170
194
|
{
|
|
171
195
|
remarkPlugins: [remarkGfm],
|
|
@@ -195,11 +219,11 @@ function BlogCard({
|
|
|
195
219
|
return /* @__PURE__ */ jsxs2(
|
|
196
220
|
"article",
|
|
197
221
|
{
|
|
198
|
-
className: `rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 bg-white dark:bg-gray-800 p-6 transition-colors min-h-[200px] flex flex-col ${className}`,
|
|
222
|
+
className: `bk:rounded-lg bk:border bk:border-gray-200 bk:dark:border-gray-700 bk:hover:border-gray-300 bk:dark:hover:border-gray-600 bk:bg-white bk:dark:bg-gray-800 bk:p-6 bk:transition-colors bk:min-h-[200px] bk:flex bk:flex-col ${className}`,
|
|
199
223
|
children: [
|
|
200
|
-
(showCategory || showReadingTime || showDate) && /* @__PURE__ */ jsx3("div", { className: "mb-3", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3 justify-between", children: [
|
|
201
|
-
showCategory && metadata.categories?.length ? /* @__PURE__ */ jsx3("div", { className: "flex items-center gap-1.5 flex-nowrap overflow-hidden", children: metadata.categories.slice(0, 2).map((cat) => /* @__PURE__ */ jsx3(Badge, { children: cat }, cat)) }) : null,
|
|
202
|
-
(showReadingTime || showDate) && /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap", children: [
|
|
224
|
+
(showCategory || showReadingTime || showDate) && /* @__PURE__ */ jsx3("div", { className: "bk:mb-3", children: /* @__PURE__ */ jsxs2("div", { className: "bk:flex bk:items-center bk:gap-3 bk:justify-between", children: [
|
|
225
|
+
showCategory && metadata.categories?.length ? /* @__PURE__ */ jsx3("div", { className: "bk:flex bk:items-center bk:gap-1.5 bk:flex-nowrap bk:overflow-hidden", children: metadata.categories.slice(0, 2).map((cat) => /* @__PURE__ */ jsx3(Badge, { children: cat }, cat)) }) : null,
|
|
226
|
+
(showReadingTime || showDate) && /* @__PURE__ */ jsxs2("div", { className: "bk:flex bk:items-center bk:gap-2 bk:text-sm bk:text-gray-500 bk:dark:text-gray-400 bk:whitespace-nowrap", children: [
|
|
203
227
|
showReadingTime && /* @__PURE__ */ jsx3("span", { children: metadata.readingTime }),
|
|
204
228
|
showReadingTime && showDate && /* @__PURE__ */ jsx3("span", { children: "\u2022" }),
|
|
205
229
|
showDate && /* @__PURE__ */ jsx3("time", { dateTime: metadata.date, children: new Date(metadata.date).toLocaleDateString("en-US", {
|
|
@@ -211,12 +235,12 @@ function BlogCard({
|
|
|
211
235
|
] }) }),
|
|
212
236
|
Link(
|
|
213
237
|
href,
|
|
214
|
-
/* @__PURE__ */ jsx3("h2", { className: "font-semibold text-xl text-gray-700 dark:text-gray-100 mb-2 hover:underline transition-colors line-clamp-2", children: metadata.title })
|
|
238
|
+
/* @__PURE__ */ jsx3("h2", { className: "bk:font-semibold bk:text-xl bk:text-gray-700 bk:dark:text-gray-100 bk:mb-2 bk:hover:underline bk:transition-colors bk:line-clamp-2", children: metadata.title })
|
|
215
239
|
),
|
|
216
|
-
/* @__PURE__ */ jsx3("p", { className: "text-sm text-gray-500 dark:text-gray-300 mb-2 leading-6 line-clamp-2", children: metadata.description }),
|
|
217
|
-
/* @__PURE__ */ jsx3("div", { className: "mt-auto", children: Link(
|
|
240
|
+
/* @__PURE__ */ jsx3("p", { className: "bk:text-sm bk:text-gray-500 bk:dark:text-gray-300 bk:mb-2 bk:leading-6 bk:line-clamp-2", children: metadata.description }),
|
|
241
|
+
/* @__PURE__ */ jsx3("div", { className: "bk:mt-auto", children: Link(
|
|
218
242
|
href,
|
|
219
|
-
/* @__PURE__ */ jsx3("span", { className: "inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium text-sm", children: "Read more \u2192" })
|
|
243
|
+
/* @__PURE__ */ jsx3("span", { className: "bk:inline-flex bk:items-center bk:text-blue-600 bk:dark:text-blue-400 bk:hover:text-blue-700 bk:dark:hover:text-blue-300 bk:font-medium bk:text-sm", children: "Read more \u2192" })
|
|
220
244
|
) })
|
|
221
245
|
]
|
|
222
246
|
}
|
|
@@ -224,41 +248,155 @@ function BlogCard({
|
|
|
224
248
|
}
|
|
225
249
|
|
|
226
250
|
// src/components/BlogList.tsx
|
|
227
|
-
import
|
|
251
|
+
import "react";
|
|
252
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
228
253
|
function BlogList({
|
|
229
254
|
metadata,
|
|
255
|
+
title,
|
|
256
|
+
description,
|
|
230
257
|
basePath = "/blog",
|
|
231
258
|
renderLink,
|
|
232
259
|
className = "",
|
|
233
260
|
emptyMessage = "No blog posts found.",
|
|
234
|
-
cardProps
|
|
261
|
+
cardProps,
|
|
262
|
+
classNames = {}
|
|
235
263
|
}) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
264
|
+
return /* @__PURE__ */ jsxs3("div", { className: "bk:w-full", children: [
|
|
265
|
+
title && /* @__PURE__ */ jsx4(
|
|
266
|
+
"h1",
|
|
267
|
+
{
|
|
268
|
+
className: `bk:text-4xl bk:font-bold bk:mb-4 bk:mt-8 bk:text-gray-800 bk:dark:text-gray-100 ${classNames.title ?? ""}`,
|
|
269
|
+
children: title
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
description && /* @__PURE__ */ jsx4(
|
|
273
|
+
"p",
|
|
274
|
+
{
|
|
275
|
+
className: `bk:text-gray-600 bk:dark:text-gray-400 bk:mb-8 ${classNames.description ?? ""}`,
|
|
276
|
+
children: description
|
|
277
|
+
}
|
|
278
|
+
),
|
|
279
|
+
metadata.length === 0 ? /* @__PURE__ */ jsx4(
|
|
280
|
+
"div",
|
|
281
|
+
{
|
|
282
|
+
className: `bk:text-center bk:text-gray-500 bk:dark:text-gray-400 bk:py-12 ${className}`,
|
|
283
|
+
children: emptyMessage
|
|
284
|
+
}
|
|
285
|
+
) : /* @__PURE__ */ jsx4("div", { className: `bk:flex bk:flex-col bk:gap-6 ${className}`, children: metadata.map((meta) => /* @__PURE__ */ jsx4(
|
|
286
|
+
BlogCard,
|
|
287
|
+
{
|
|
288
|
+
metadata: meta,
|
|
289
|
+
basePath,
|
|
290
|
+
renderLink,
|
|
291
|
+
...cardProps
|
|
292
|
+
},
|
|
293
|
+
meta.slug
|
|
294
|
+
)) })
|
|
295
|
+
] });
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// src/components/Filter.tsx
|
|
299
|
+
import "react";
|
|
300
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
301
|
+
function Filter({
|
|
302
|
+
searchTerm,
|
|
303
|
+
setSearchTerm,
|
|
304
|
+
selectedCategory,
|
|
305
|
+
setSelectedCategory,
|
|
306
|
+
categories,
|
|
307
|
+
postsCount,
|
|
308
|
+
className = "",
|
|
309
|
+
placeholder = "Search blogs...",
|
|
310
|
+
classNames = {}
|
|
311
|
+
}) {
|
|
312
|
+
const pillBase = `bk:px-2.5 bk:py-1 bk:cursor-pointer bk:rounded-md bk:text-xs bk:font-medium bk:transition-colors ${classNames.pill ?? ""}`;
|
|
313
|
+
const pillActive = `bk:bg-gray-700 bk:dark:bg-gray-200 bk:text-white bk:dark:text-gray-800 ${classNames.activePill ?? ""}`;
|
|
314
|
+
const pillInactive = `bk:bg-gray-100 bk:dark:bg-gray-700 bk:text-gray-500 bk:dark:text-gray-300 bk:hover:bg-gray-200 bk:dark:hover:bg-gray-600 ${classNames.inactivePill ?? ""}`;
|
|
315
|
+
return /* @__PURE__ */ jsxs4("div", { className: `bk:flex bk:flex-col bk:gap-4 bk:mb-6 ${className}`, children: [
|
|
316
|
+
/* @__PURE__ */ jsxs4("div", { className: "bk:flex bk:flex-col bk:sm:flex-row bk:gap-3", children: [
|
|
317
|
+
/* @__PURE__ */ jsxs4("div", { className: "bk:relative bk:flex-1", children: [
|
|
318
|
+
/* @__PURE__ */ jsx5(
|
|
319
|
+
"svg",
|
|
320
|
+
{
|
|
321
|
+
className: "bk:absolute bk:left-3 bk:top-1/2 bk:-translate-y-1/2 bk:w-3.5 bk:h-3.5 bk:text-gray-400 bk:pointer-events-none",
|
|
322
|
+
fill: "none",
|
|
323
|
+
stroke: "currentColor",
|
|
324
|
+
strokeWidth: 2,
|
|
325
|
+
viewBox: "0 0 24 24",
|
|
326
|
+
children: /* @__PURE__ */ jsx5(
|
|
327
|
+
"path",
|
|
328
|
+
{
|
|
329
|
+
strokeLinecap: "round",
|
|
330
|
+
strokeLinejoin: "round",
|
|
331
|
+
d: "M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z"
|
|
332
|
+
}
|
|
333
|
+
)
|
|
334
|
+
}
|
|
335
|
+
),
|
|
336
|
+
/* @__PURE__ */ jsx5(
|
|
337
|
+
"input",
|
|
338
|
+
{
|
|
339
|
+
id: "blog-search",
|
|
340
|
+
type: "search",
|
|
341
|
+
value: searchTerm,
|
|
342
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
343
|
+
placeholder,
|
|
344
|
+
className: `bk:w-full bk:pl-8 bk:pr-4 bk:py-2 bk:rounded-md bk:border bk:border-gray-200 bk:dark:border-gray-700 bk:bg-white bk:dark:bg-gray-800 bk:text-sm bk:text-gray-700 bk:dark:text-gray-200 bk:placeholder-gray-400 bk:focus:outline-none bk:focus:border-gray-400 bk:dark:focus:border-gray-500 bk:transition-colors ${classNames.input ?? ""}`
|
|
345
|
+
}
|
|
346
|
+
)
|
|
347
|
+
] }),
|
|
348
|
+
categories.length > 0 && /* @__PURE__ */ jsxs4(
|
|
349
|
+
"div",
|
|
350
|
+
{
|
|
351
|
+
className: `bk:flex bk:flex-wrap bk:gap-2 bk:items-center ${classNames.categoryContainer ?? ""}`,
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ jsx5(
|
|
354
|
+
"button",
|
|
355
|
+
{
|
|
356
|
+
onClick: () => setSelectedCategory(null),
|
|
357
|
+
className: `${pillBase} ${selectedCategory === null ? pillActive : pillInactive}`,
|
|
358
|
+
children: "All"
|
|
359
|
+
}
|
|
360
|
+
),
|
|
361
|
+
categories.slice(0, 3).map((cat) => /* @__PURE__ */ jsx5(
|
|
362
|
+
"button",
|
|
363
|
+
{
|
|
364
|
+
onClick: () => setSelectedCategory(cat),
|
|
365
|
+
className: `${pillBase} ${selectedCategory === cat ? pillActive : pillInactive}`,
|
|
366
|
+
children: cat
|
|
367
|
+
},
|
|
368
|
+
cat
|
|
369
|
+
))
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
)
|
|
373
|
+
] }),
|
|
374
|
+
postsCount !== void 0 && /* @__PURE__ */ jsxs4(
|
|
375
|
+
"p",
|
|
376
|
+
{
|
|
377
|
+
className: `bk:text-[10px] bk:uppercase bk:tracking-wider bk:text-gray-400 bk:dark:text-gray-500 ${classNames.postsCount ?? ""}`,
|
|
378
|
+
children: [
|
|
379
|
+
postsCount,
|
|
380
|
+
" ",
|
|
381
|
+
postsCount === 1 ? "post" : "posts",
|
|
382
|
+
" found"
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
)
|
|
386
|
+
] });
|
|
249
387
|
}
|
|
250
388
|
|
|
251
389
|
// src/components/BlogPlaceholder.tsx
|
|
252
|
-
import { jsx as
|
|
390
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
253
391
|
function BlogPlaceholder({ count = 3, className = "" }) {
|
|
254
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ jsx6("div", { className: `${className}`, children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsxs5(
|
|
255
393
|
"div",
|
|
256
394
|
{
|
|
257
|
-
className: "bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-6 animate-pulse",
|
|
395
|
+
className: "bk:bg-white bk:dark:bg-gray-800 bk:rounded-lg bk:border bk:border-gray-200 bk:dark:border-gray-700 bk:p-6 bk:animate-pulse",
|
|
258
396
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ jsx6("div", { className: "bk:h-4 bk:bg-gray-200 bk:dark:bg-gray-700 bk:rounded bk:mb-3" }),
|
|
398
|
+
/* @__PURE__ */ jsx6("div", { className: "bk:h-6 bk:bg-gray-200 bk:dark:bg-gray-700 bk:rounded bk:mb-2" }),
|
|
399
|
+
/* @__PURE__ */ jsx6("div", { className: "bk:h-4 bk:bg-gray-200 bk:dark:bg-gray-700 bk:rounded bk:w-3/4" })
|
|
262
400
|
]
|
|
263
401
|
},
|
|
264
402
|
i
|
|
@@ -266,7 +404,7 @@ function BlogPlaceholder({ count = 3, className = "" }) {
|
|
|
266
404
|
}
|
|
267
405
|
|
|
268
406
|
// src/hooks/useBlogs.ts
|
|
269
|
-
import { useState as useState2,
|
|
407
|
+
import { useState as useState2, useMemo } from "react";
|
|
270
408
|
|
|
271
409
|
// src/hooks/useDebounce.ts
|
|
272
410
|
import { useEffect, useState } from "react";
|
|
@@ -283,33 +421,40 @@ function useDebounce(value, delay) {
|
|
|
283
421
|
return debouncedValue;
|
|
284
422
|
}
|
|
285
423
|
|
|
424
|
+
// src/utils/filter-utils.ts
|
|
425
|
+
function filterBlogs(blogs, searchTerm = "", selectedCategory = null) {
|
|
426
|
+
let filtered = blogs;
|
|
427
|
+
if (searchTerm) {
|
|
428
|
+
const lowerSearch = searchTerm.toLowerCase();
|
|
429
|
+
filtered = filtered.filter(
|
|
430
|
+
(blog) => (blog.title?.toLowerCase() || "").includes(lowerSearch) || (blog.description?.toLowerCase() || "").includes(lowerSearch)
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
if (selectedCategory) {
|
|
434
|
+
filtered = filtered.filter((blog) => {
|
|
435
|
+
const categories = blog.categories ?? [];
|
|
436
|
+
return categories.includes(selectedCategory);
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
return filtered;
|
|
440
|
+
}
|
|
441
|
+
function getAvailableCategories(blogs) {
|
|
442
|
+
return Array.from(new Set(blogs.flatMap((blog) => blog.categories ?? [])));
|
|
443
|
+
}
|
|
444
|
+
|
|
286
445
|
// src/hooks/useBlogs.ts
|
|
287
446
|
function useBlogs(blogsMeta) {
|
|
288
|
-
const [filteredBlogs, setFilteredBlogs] = useState2(blogsMeta);
|
|
289
447
|
const [searchTerm, setSearchTerm] = useState2("");
|
|
290
448
|
const [selectedCategory, setSelectedCategory] = useState2(null);
|
|
291
449
|
const debouncedSearchTerm = useDebounce(searchTerm, 500);
|
|
292
|
-
const
|
|
293
|
-
return
|
|
294
|
-
};
|
|
295
|
-
useEffect2(() => {
|
|
296
|
-
let filtered = blogsMeta;
|
|
297
|
-
if (debouncedSearchTerm) {
|
|
298
|
-
filtered = filtered.filter(
|
|
299
|
-
(blog) => blog.title.toLowerCase().includes(debouncedSearchTerm.toLowerCase()) || blog.description.toLowerCase().includes(debouncedSearchTerm.toLowerCase())
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
if (selectedCategory) {
|
|
303
|
-
filtered = filtered.filter((blog) => {
|
|
304
|
-
const blogCategories = getBlogCategories(blog);
|
|
305
|
-
return blogCategories.includes(selectedCategory);
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
setFilteredBlogs(filtered);
|
|
450
|
+
const metadata = useMemo(() => {
|
|
451
|
+
return filterBlogs(blogsMeta, debouncedSearchTerm, selectedCategory);
|
|
309
452
|
}, [blogsMeta, debouncedSearchTerm, selectedCategory]);
|
|
310
|
-
const categories =
|
|
453
|
+
const categories = useMemo(() => {
|
|
454
|
+
return getAvailableCategories(blogsMeta);
|
|
455
|
+
}, [blogsMeta]);
|
|
311
456
|
return {
|
|
312
|
-
metadata
|
|
457
|
+
metadata,
|
|
313
458
|
searchTerm,
|
|
314
459
|
setSearchTerm,
|
|
315
460
|
selectedCategory,
|
|
@@ -322,5 +467,8 @@ export {
|
|
|
322
467
|
BlogList,
|
|
323
468
|
BlogPlaceholder,
|
|
324
469
|
BlogRenderer,
|
|
470
|
+
Filter,
|
|
471
|
+
filterBlogs,
|
|
472
|
+
getAvailableCategories,
|
|
325
473
|
useBlogs
|
|
326
474
|
};
|
package/dist/style.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-900:oklch(40.8% .123 38.172);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-900:oklch(41.4% .112 45.904);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-900:oklch(38.6% .063 188.416);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-900:oklch(39.8% .07 227.392);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-900:oklch(38% .189 293.745);--color-fuchsia-100:oklch(95.2% .037 318.852);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-fuchsia-900:oklch(40.1% .17 325.612);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-900:oklch(41% .159 10.272);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-neutral-900:oklch(20.5% 0 0);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.my-6{margin-block:calc(var(--spacing)*6)}.my-9{margin-block:calc(var(--spacing)*9)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-6{margin-left:calc(var(--spacing)*6)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-auto{height:auto}.min-h-\[200px\]{min-height:200px}.w-3\/4{width:75%}.w-full{width:100%}.max-w-full{max-width:100%}.max-w-none{max-width:none}.shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-transparent{border-color:#0000}.bg-amber-100{background-color:var(--color-amber-100)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-fuchsia-100{background-color:var(--color-fuchsia-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-white{background-color:var(--color-white)}.p-6{padding:calc(var(--spacing)*6)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-12{padding-block:calc(var(--spacing)*12)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-7{--tw-leading:calc(var(--spacing)*7);line-height:calc(var(--spacing)*7)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-amber-500{color:var(--color-amber-500)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-emerald-500{color:var(--color-emerald-500)}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-orange-500{color:var(--color-orange-500)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-teal-500{color:var(--color-teal-500)}.text-violet-500{color:var(--color-violet-500)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.accent-blue-600{accent-color:var(--color-blue-600)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\:mt-0:first-child{margin-top:calc(var(--spacing)*0)}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\:text-blue-700:hover{color:var(--color-blue-700)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:underline:hover{text-decoration-line:underline}}@media (min-width:48rem){.md\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.md\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}.dark\:border-gray-700:is(html.dark *){border-color:var(--color-gray-700)}.dark\:border-neutral-900:is(html.dark *){border-color:var(--color-neutral-900)}.dark\:bg-amber-900\/30:is(html.dark *){background-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-amber-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-amber-900)30%,transparent)}}.dark\:bg-blue-900\/30:is(html.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-blue-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\:bg-cyan-900\/30:is(html.dark *){background-color:#104e644d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-cyan-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-cyan-900)30%,transparent)}}.dark\:bg-emerald-900\/30:is(html.dark *){background-color:#004e3b4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-emerald-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-emerald-900)30%,transparent)}}.dark\:bg-fuchsia-900\/30:is(html.dark *){background-color:#7213784d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-fuchsia-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-fuchsia-900)30%,transparent)}}.dark\:bg-gray-700:is(html.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-800:is(html.dark *){background-color:var(--color-gray-800)}.dark\:bg-orange-900\/30:is(html.dark *){background-color:#7e2a0c4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-orange-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-orange-900)30%,transparent)}}.dark\:bg-rose-900\/30:is(html.dark *){background-color:#8b08364d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-rose-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-rose-900)30%,transparent)}}.dark\:bg-teal-900\/30:is(html.dark *){background-color:#0b4f4a4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-teal-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-teal-900)30%,transparent)}}.dark\:bg-violet-900\/30:is(html.dark *){background-color:#4d179a4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-violet-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--color-violet-900)30%,transparent)}}.dark\:text-amber-300:is(html.dark *){color:var(--color-amber-300)}.dark\:text-blue-300:is(html.dark *){color:var(--color-blue-300)}.dark\:text-blue-400:is(html.dark *){color:var(--color-blue-400)}.dark\:text-cyan-300:is(html.dark *){color:var(--color-cyan-300)}.dark\:text-emerald-300:is(html.dark *){color:var(--color-emerald-300)}.dark\:text-fuchsia-300:is(html.dark *){color:var(--color-fuchsia-300)}.dark\:text-gray-100:is(html.dark *){color:var(--color-gray-100)}.dark\:text-gray-200:is(html.dark *){color:var(--color-gray-200)}.dark\:text-gray-300:is(html.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:is(html.dark *){color:var(--color-gray-400)}.dark\:text-orange-300:is(html.dark *){color:var(--color-orange-300)}.dark\:text-rose-300:is(html.dark *){color:var(--color-rose-300)}.dark\:text-rose-400:is(html.dark *){color:var(--color-rose-400)}.dark\:text-teal-300:is(html.dark *){color:var(--color-teal-300)}.dark\:text-violet-300:is(html.dark *){color:var(--color-violet-300)}@media (hover:hover){.dark\:hover\:border-gray-600:is(html.dark *):hover{border-color:var(--color-gray-600)}.dark\:hover\:text-blue-300:is(html.dark *):hover{color:var(--color-blue-300)}}.\[\&\>code\]\:block>code{display:block}.\[\&\>code\]\:p-4>code{padding:calc(var(--spacing)*4)}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}}}@layer theme{:root,:host{--bk-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bk-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bk-color-orange-100:oklch(95.4% .038 75.164);--bk-color-orange-300:oklch(83.7% .128 66.29);--bk-color-orange-500:oklch(70.5% .213 47.604);--bk-color-orange-900:oklch(40.8% .123 38.172);--bk-color-amber-100:oklch(96.2% .059 95.617);--bk-color-amber-300:oklch(87.9% .169 91.605);--bk-color-amber-500:oklch(76.9% .188 70.08);--bk-color-amber-900:oklch(41.4% .112 45.904);--bk-color-emerald-100:oklch(95% .052 163.051);--bk-color-emerald-300:oklch(84.5% .143 164.978);--bk-color-emerald-500:oklch(69.6% .17 162.48);--bk-color-emerald-900:oklch(37.8% .077 168.94);--bk-color-teal-100:oklch(95.3% .051 180.801);--bk-color-teal-300:oklch(85.5% .138 181.071);--bk-color-teal-500:oklch(70.4% .14 182.503);--bk-color-teal-900:oklch(38.6% .063 188.416);--bk-color-cyan-100:oklch(95.6% .045 203.388);--bk-color-cyan-300:oklch(86.5% .127 207.078);--bk-color-cyan-500:oklch(71.5% .143 215.221);--bk-color-cyan-900:oklch(39.8% .07 227.392);--bk-color-blue-100:oklch(93.2% .032 255.585);--bk-color-blue-300:oklch(80.9% .105 251.813);--bk-color-blue-400:oklch(70.7% .165 254.624);--bk-color-blue-500:oklch(62.3% .214 259.815);--bk-color-blue-600:oklch(54.6% .245 262.881);--bk-color-blue-700:oklch(48.8% .243 264.376);--bk-color-blue-800:oklch(42.4% .199 265.638);--bk-color-blue-900:oklch(37.9% .146 265.522);--bk-color-violet-100:oklch(94.3% .029 294.588);--bk-color-violet-300:oklch(81.1% .111 293.571);--bk-color-violet-500:oklch(60.6% .25 292.717);--bk-color-violet-900:oklch(38% .189 293.745);--bk-color-fuchsia-100:oklch(95.2% .037 318.852);--bk-color-fuchsia-300:oklch(83.3% .145 321.434);--bk-color-fuchsia-500:oklch(66.7% .295 322.15);--bk-color-fuchsia-900:oklch(40.1% .17 325.612);--bk-color-rose-100:oklch(94.1% .03 12.58);--bk-color-rose-300:oklch(81% .117 11.638);--bk-color-rose-400:oklch(71.2% .194 13.428);--bk-color-rose-500:oklch(64.5% .246 16.439);--bk-color-rose-600:oklch(58.6% .253 17.585);--bk-color-rose-900:oklch(41% .159 10.272);--bk-color-gray-50:oklch(98.5% .002 247.839);--bk-color-gray-100:oklch(96.7% .003 264.542);--bk-color-gray-200:oklch(92.8% .006 264.531);--bk-color-gray-300:oklch(87.2% .01 258.338);--bk-color-gray-400:oklch(70.7% .022 261.325);--bk-color-gray-500:oklch(55.1% .027 264.364);--bk-color-gray-600:oklch(44.6% .03 256.802);--bk-color-gray-700:oklch(37.3% .034 259.733);--bk-color-gray-800:oklch(27.8% .033 256.848);--bk-color-neutral-900:oklch(20.5% 0 0);--bk-color-white:#fff;--bk-spacing:.25rem;--bk-text-xs:.75rem;--bk-text-xs--line-height:calc(1/.75);--bk-text-sm:.875rem;--bk-text-sm--line-height:calc(1.25/.875);--bk-text-base:1rem;--bk-text-base--line-height:calc(1.5/1);--bk-text-lg:1.125rem;--bk-text-lg--line-height:calc(1.75/1.125);--bk-text-xl:1.25rem;--bk-text-xl--line-height:calc(1.75/1.25);--bk-text-2xl:1.5rem;--bk-text-2xl--line-height:calc(2/1.5);--bk-text-3xl:1.875rem;--bk-text-3xl--line-height:calc(2.25/1.875);--bk-text-4xl:2.25rem;--bk-text-4xl--line-height:calc(2.5/2.25);--bk-font-weight-medium:500;--bk-font-weight-semibold:600;--bk-font-weight-bold:700;--bk-tracking-tight:-.025em;--bk-tracking-wide:.025em;--bk-tracking-wider:.05em;--bk-radius-md:.375rem;--bk-radius-lg:.5rem;--bk-radius-xl:.75rem;--bk-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--bk-default-font-family:var(--bk-font-sans);--bk-default-mono-font-family:var(--bk-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--bk-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--bk-default-font-feature-settings,normal);font-variation-settings:var(--bk-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--bk-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--bk-default-mono-font-feature-settings,normal);font-variation-settings:var(--bk-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.bk\:pointer-events-none{pointer-events:none}.bk\:absolute{position:absolute}.bk\:relative{position:relative}.bk\:top-1\/2{top:50%}.bk\:left-3{left:calc(var(--bk-spacing)*3)}.bk\:my-6{margin-block:calc(var(--bk-spacing)*6)}.bk\:my-9{margin-block:calc(var(--bk-spacing)*9)}.bk\:mt-4{margin-top:calc(var(--bk-spacing)*4)}.bk\:mt-5{margin-top:calc(var(--bk-spacing)*5)}.bk\:mt-6{margin-top:calc(var(--bk-spacing)*6)}.bk\:mt-8{margin-top:calc(var(--bk-spacing)*8)}.bk\:mt-10{margin-top:calc(var(--bk-spacing)*10)}.bk\:mt-auto{margin-top:auto}.bk\:mr-2{margin-right:calc(var(--bk-spacing)*2)}.bk\:mb-2{margin-bottom:calc(var(--bk-spacing)*2)}.bk\:mb-3{margin-bottom:calc(var(--bk-spacing)*3)}.bk\:mb-4{margin-bottom:calc(var(--bk-spacing)*4)}.bk\:mb-5{margin-bottom:calc(var(--bk-spacing)*5)}.bk\:mb-6{margin-bottom:calc(var(--bk-spacing)*6)}.bk\:mb-8{margin-bottom:calc(var(--bk-spacing)*8)}.bk\:ml-6{margin-left:calc(var(--bk-spacing)*6)}.bk\:line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.bk\:flex{display:flex}.bk\:inline-flex{display:inline-flex}.bk\:h-3\.5{height:calc(var(--bk-spacing)*3.5)}.bk\:h-4{height:calc(var(--bk-spacing)*4)}.bk\:h-6{height:calc(var(--bk-spacing)*6)}.bk\:h-auto{height:auto}.bk\:min-h-\[200px\]{min-height:200px}.bk\:w-3\.5{width:calc(var(--bk-spacing)*3.5)}.bk\:w-3\/4{width:75%}.bk\:w-full{width:100%}.bk\:max-w-full{max-width:100%}.bk\:max-w-none{max-width:none}.bk\:flex-1{flex:1}.bk\:shrink-0{flex-shrink:0}.bk\:-translate-y-1\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.bk\:animate-pulse{animation:var(--bk-animate-pulse)}.bk\:cursor-pointer{cursor:pointer}.bk\:list-decimal{list-style-type:decimal}.bk\:list-disc{list-style-type:disc}.bk\:flex-col{flex-direction:column}.bk\:flex-nowrap{flex-wrap:nowrap}.bk\:flex-wrap{flex-wrap:wrap}.bk\:items-center{align-items:center}.bk\:justify-between{justify-content:space-between}.bk\:gap-1\.5{gap:calc(var(--bk-spacing)*1.5)}.bk\:gap-2{gap:calc(var(--bk-spacing)*2)}.bk\:gap-3{gap:calc(var(--bk-spacing)*3)}.bk\:gap-4{gap:calc(var(--bk-spacing)*4)}.bk\:gap-6{gap:calc(var(--bk-spacing)*6)}:where(.bk\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--bk-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--bk-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}.bk\:overflow-hidden{overflow:hidden}.bk\:overflow-x-auto{overflow-x:auto}.bk\:rounded{border-radius:.25rem}.bk\:rounded-full{border-radius:3.40282e38px}.bk\:rounded-lg{border-radius:var(--bk-radius-lg)}.bk\:rounded-md{border-radius:var(--bk-radius-md)}.bk\:rounded-xl{border-radius:var(--bk-radius-xl)}.bk\:border{border-style:var(--tw-border-style);border-width:1px}.bk\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.bk\:border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.bk\:border-blue-500{border-color:var(--bk-color-blue-500)}.bk\:border-gray-200{border-color:var(--bk-color-gray-200)}.bk\:border-transparent{border-color:#0000}.bk\:bg-amber-100{background-color:var(--bk-color-amber-100)}.bk\:bg-blue-100{background-color:var(--bk-color-blue-100)}.bk\:bg-cyan-100{background-color:var(--bk-color-cyan-100)}.bk\:bg-emerald-100{background-color:var(--bk-color-emerald-100)}.bk\:bg-fuchsia-100{background-color:var(--bk-color-fuchsia-100)}.bk\:bg-gray-50{background-color:var(--bk-color-gray-50)}.bk\:bg-gray-100{background-color:var(--bk-color-gray-100)}.bk\:bg-gray-200{background-color:var(--bk-color-gray-200)}.bk\:bg-gray-700{background-color:var(--bk-color-gray-700)}.bk\:bg-orange-100{background-color:var(--bk-color-orange-100)}.bk\:bg-rose-100{background-color:var(--bk-color-rose-100)}.bk\:bg-teal-100{background-color:var(--bk-color-teal-100)}.bk\:bg-violet-100{background-color:var(--bk-color-violet-100)}.bk\:bg-white{background-color:var(--bk-color-white)}.bk\:p-6{padding:calc(var(--bk-spacing)*6)}.bk\:px-1\.5{padding-inline:calc(var(--bk-spacing)*1.5)}.bk\:px-2\.5{padding-inline:calc(var(--bk-spacing)*2.5)}.bk\:px-4{padding-inline:calc(var(--bk-spacing)*4)}.bk\:py-0\.5{padding-block:calc(var(--bk-spacing)*.5)}.bk\:py-1{padding-block:calc(var(--bk-spacing)*1)}.bk\:py-2{padding-block:calc(var(--bk-spacing)*2)}.bk\:py-3{padding-block:calc(var(--bk-spacing)*3)}.bk\:py-12{padding-block:calc(var(--bk-spacing)*12)}.bk\:pr-4{padding-right:calc(var(--bk-spacing)*4)}.bk\:pl-4{padding-left:calc(var(--bk-spacing)*4)}.bk\:pl-8{padding-left:calc(var(--bk-spacing)*8)}.bk\:text-center{text-align:center}.bk\:text-left{text-align:left}.bk\:font-mono{font-family:var(--bk-font-mono)}.bk\:text-2xl{font-size:var(--bk-text-2xl);line-height:var(--tw-leading,var(--bk-text-2xl--line-height))}.bk\:text-3xl{font-size:var(--bk-text-3xl);line-height:var(--tw-leading,var(--bk-text-3xl--line-height))}.bk\:text-4xl{font-size:var(--bk-text-4xl);line-height:var(--tw-leading,var(--bk-text-4xl--line-height))}.bk\:text-base{font-size:var(--bk-text-base);line-height:var(--tw-leading,var(--bk-text-base--line-height))}.bk\:text-lg{font-size:var(--bk-text-lg);line-height:var(--tw-leading,var(--bk-text-lg--line-height))}.bk\:text-sm{font-size:var(--bk-text-sm);line-height:var(--tw-leading,var(--bk-text-sm--line-height))}.bk\:text-xl{font-size:var(--bk-text-xl);line-height:var(--tw-leading,var(--bk-text-xl--line-height))}.bk\:text-xs{font-size:var(--bk-text-xs);line-height:var(--tw-leading,var(--bk-text-xs--line-height))}.bk\:text-\[10px\]{font-size:10px}.bk\:leading-6{--tw-leading:calc(var(--bk-spacing)*6);line-height:calc(var(--bk-spacing)*6)}.bk\:leading-7{--tw-leading:calc(var(--bk-spacing)*7);line-height:calc(var(--bk-spacing)*7)}.bk\:font-bold{--tw-font-weight:var(--bk-font-weight-bold);font-weight:var(--bk-font-weight-bold)}.bk\:font-medium{--tw-font-weight:var(--bk-font-weight-medium);font-weight:var(--bk-font-weight-medium)}.bk\:font-semibold{--tw-font-weight:var(--bk-font-weight-semibold);font-weight:var(--bk-font-weight-semibold)}.bk\:tracking-tight{--tw-tracking:var(--bk-tracking-tight);letter-spacing:var(--bk-tracking-tight)}.bk\:tracking-wide{--tw-tracking:var(--bk-tracking-wide);letter-spacing:var(--bk-tracking-wide)}.bk\:tracking-wider{--tw-tracking:var(--bk-tracking-wider);letter-spacing:var(--bk-tracking-wider)}.bk\:whitespace-nowrap{white-space:nowrap}.bk\:text-amber-500{color:var(--bk-color-amber-500)}.bk\:text-blue-500{color:var(--bk-color-blue-500)}.bk\:text-blue-600{color:var(--bk-color-blue-600)}.bk\:text-cyan-500{color:var(--bk-color-cyan-500)}.bk\:text-emerald-500{color:var(--bk-color-emerald-500)}.bk\:text-fuchsia-500{color:var(--bk-color-fuchsia-500)}.bk\:text-gray-400{color:var(--bk-color-gray-400)}.bk\:text-gray-500{color:var(--bk-color-gray-500)}.bk\:text-gray-600{color:var(--bk-color-gray-600)}.bk\:text-gray-700{color:var(--bk-color-gray-700)}.bk\:text-gray-800{color:var(--bk-color-gray-800)}.bk\:text-orange-500{color:var(--bk-color-orange-500)}.bk\:text-rose-500{color:var(--bk-color-rose-500)}.bk\:text-rose-600{color:var(--bk-color-rose-600)}.bk\:text-teal-500{color:var(--bk-color-teal-500)}.bk\:text-violet-500{color:var(--bk-color-violet-500)}.bk\:text-white{color:var(--bk-color-white)}.bk\:uppercase{text-transform:uppercase}.bk\:italic{font-style:italic}.bk\:underline{text-decoration-line:underline}.bk\:underline-offset-4{text-underline-offset:4px}.bk\:placeholder-gray-400::placeholder{color:var(--bk-color-gray-400)}.bk\:accent-blue-600{accent-color:var(--bk-color-blue-600)}.bk\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.bk\:first\:mt-0:first-child{margin-top:calc(var(--bk-spacing)*0)}.bk\:last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.bk\:hover\:border-gray-300:hover{border-color:var(--bk-color-gray-300)}.bk\:hover\:bg-gray-200:hover{background-color:var(--bk-color-gray-200)}.bk\:hover\:text-blue-700:hover{color:var(--bk-color-blue-700)}.bk\:hover\:text-blue-800:hover{color:var(--bk-color-blue-800)}.bk\:hover\:underline:hover{text-decoration-line:underline}}.bk\:focus\:border-gray-400:focus{border-color:var(--bk-color-gray-400)}.bk\:focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media (min-width:40rem){.bk\:sm\:flex-row{flex-direction:row}}@media (min-width:48rem){.bk\:md\:text-2xl{font-size:var(--bk-text-2xl);line-height:var(--tw-leading,var(--bk-text-2xl--line-height))}.bk\:md\:text-3xl{font-size:var(--bk-text-3xl);line-height:var(--tw-leading,var(--bk-text-3xl--line-height))}.bk\:md\:text-4xl{font-size:var(--bk-text-4xl);line-height:var(--tw-leading,var(--bk-text-4xl--line-height))}}.bk\:dark\:border-gray-700:is(html.dark *){border-color:var(--bk-color-gray-700)}.bk\:dark\:border-neutral-900:is(html.dark *){border-color:var(--bk-color-neutral-900)}.bk\:dark\:bg-amber-900\/30:is(html.dark *){background-color:var(--bk-color-amber-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-amber-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-amber-900)30%,transparent)}}.bk\:dark\:bg-blue-900\/30:is(html.dark *){background-color:var(--bk-color-blue-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-blue-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-blue-900)30%,transparent)}}.bk\:dark\:bg-cyan-900\/30:is(html.dark *){background-color:var(--bk-color-cyan-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-cyan-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-cyan-900)30%,transparent)}}.bk\:dark\:bg-emerald-900\/30:is(html.dark *){background-color:var(--bk-color-emerald-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-emerald-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-emerald-900)30%,transparent)}}.bk\:dark\:bg-fuchsia-900\/30:is(html.dark *){background-color:var(--bk-color-fuchsia-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-fuchsia-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-fuchsia-900)30%,transparent)}}.bk\:dark\:bg-gray-200:is(html.dark *){background-color:var(--bk-color-gray-200)}.bk\:dark\:bg-gray-700:is(html.dark *){background-color:var(--bk-color-gray-700)}.bk\:dark\:bg-gray-800:is(html.dark *){background-color:var(--bk-color-gray-800)}.bk\:dark\:bg-orange-900\/30:is(html.dark *){background-color:var(--bk-color-orange-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-orange-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-orange-900)30%,transparent)}}.bk\:dark\:bg-rose-900\/30:is(html.dark *){background-color:var(--bk-color-rose-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-rose-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-rose-900)30%,transparent)}}.bk\:dark\:bg-teal-900\/30:is(html.dark *){background-color:var(--bk-color-teal-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-teal-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-teal-900)30%,transparent)}}.bk\:dark\:bg-violet-900\/30:is(html.dark *){background-color:var(--bk-color-violet-900)}@supports (color:color-mix(in lab, red, red)){.bk\:dark\:bg-violet-900\/30:is(html.dark *){background-color:color-mix(in oklab,var(--bk-color-violet-900)30%,transparent)}}.bk\:dark\:text-amber-300:is(html.dark *){color:var(--bk-color-amber-300)}.bk\:dark\:text-blue-300:is(html.dark *){color:var(--bk-color-blue-300)}.bk\:dark\:text-blue-400:is(html.dark *){color:var(--bk-color-blue-400)}.bk\:dark\:text-cyan-300:is(html.dark *){color:var(--bk-color-cyan-300)}.bk\:dark\:text-emerald-300:is(html.dark *){color:var(--bk-color-emerald-300)}.bk\:dark\:text-fuchsia-300:is(html.dark *){color:var(--bk-color-fuchsia-300)}.bk\:dark\:text-gray-100:is(html.dark *){color:var(--bk-color-gray-100)}.bk\:dark\:text-gray-200:is(html.dark *){color:var(--bk-color-gray-200)}.bk\:dark\:text-gray-300:is(html.dark *){color:var(--bk-color-gray-300)}.bk\:dark\:text-gray-400:is(html.dark *){color:var(--bk-color-gray-400)}.bk\:dark\:text-gray-500:is(html.dark *){color:var(--bk-color-gray-500)}.bk\:dark\:text-gray-800:is(html.dark *){color:var(--bk-color-gray-800)}.bk\:dark\:text-orange-300:is(html.dark *){color:var(--bk-color-orange-300)}.bk\:dark\:text-rose-300:is(html.dark *){color:var(--bk-color-rose-300)}.bk\:dark\:text-rose-400:is(html.dark *){color:var(--bk-color-rose-400)}.bk\:dark\:text-teal-300:is(html.dark *){color:var(--bk-color-teal-300)}.bk\:dark\:text-violet-300:is(html.dark *){color:var(--bk-color-violet-300)}@media (hover:hover){.bk\:dark\:hover\:border-gray-600:is(html.dark *):hover{border-color:var(--bk-color-gray-600)}.bk\:dark\:hover\:bg-gray-600:is(html.dark *):hover{background-color:var(--bk-color-gray-600)}.bk\:dark\:hover\:text-blue-300:is(html.dark *):hover{color:var(--bk-color-blue-300)}}.bk\:dark\:focus\:border-gray-500:is(html.dark *):focus{border-color:var(--bk-color-gray-500)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haroonwaves/blog-kit-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
"markdown",
|
|
15
15
|
"react",
|
|
16
16
|
"nextjs",
|
|
17
|
+
"nextjs-blog",
|
|
17
18
|
"blog-engine",
|
|
18
19
|
"ssg",
|
|
20
|
+
"server-components",
|
|
19
21
|
"blog-kit"
|
|
20
22
|
],
|
|
21
23
|
"author": "Haroon (https://github.com/haroonwaves)",
|