@web-mods/articles 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +250 -0
- package/dist/components/ui/Modal.d.ts +13 -0
- package/dist/components/ui/ToastContainer.d.ts +1 -0
- package/dist/components/ui/Tooltip.d.ts +8 -0
- package/dist/components/ui/toast.d.ts +15 -0
- package/dist/context/index.d.ts +15 -0
- package/dist/index.cjs +135 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +2220 -0
- package/dist/pages/ArticleDetail.d.ts +10 -0
- package/dist/pages/ArticleEdit.d.ts +10 -0
- package/dist/pages/ArticleList.d.ts +3 -0
- package/dist/renderArticle.d.ts +20 -0
- package/dist/router/ReactRouterAdapter.d.ts +15 -0
- package/dist/router/context.d.ts +9 -0
- package/dist/server.cjs +124 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +194 -0
- package/dist/service.d.ts +3 -0
- package/dist/style.css +1 -0
- package/dist/types.d.ts +33 -0
- package/dist/utils/validateHtml.d.ts +22 -0
- package/package.json +63 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import type { Article } from "../types";
|
|
3
|
+
interface ArticleDetailProps {
|
|
4
|
+
/** 非 react-router 环境传入文章 ID */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** 非 react-router 环境传入已有数据,避免重复请求 */
|
|
7
|
+
record?: Article;
|
|
8
|
+
}
|
|
9
|
+
declare const ArticleDetail: FC<ArticleDetailProps>;
|
|
10
|
+
export default ArticleDetail;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import type { Article } from "../types";
|
|
3
|
+
interface ArticleEditProps {
|
|
4
|
+
/** 非 react-router 环境传入文章 ID */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** 非 react-router 环境传入已有数据,避免重复请求 */
|
|
7
|
+
record?: Article;
|
|
8
|
+
}
|
|
9
|
+
declare const ArticleEdit: FC<ArticleEditProps>;
|
|
10
|
+
export default ArticleEdit;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ArticleService } from "./types";
|
|
2
|
+
export interface RenderArticleOptions {
|
|
3
|
+
/** 找不到文章时返回的自定义 404 HTML,不传则使用内置样式 */
|
|
4
|
+
notFoundHtml?: string;
|
|
5
|
+
/** 自动注入 favicon,传入 href 则注入,不传则不处理 */
|
|
6
|
+
faviconHref?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 按 pathname 获取文章内容并返回标准 Web API Response。
|
|
10
|
+
* 适用于 Next.js Route Handler、Remix loader、Cloudflare Workers 等
|
|
11
|
+
* 任何支持 Web Request/Response API 的环境。
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Next.js app/[slug]/route.ts
|
|
15
|
+
* export async function GET(_req, { params }) {
|
|
16
|
+
* const { slug } = await params
|
|
17
|
+
* return renderArticleByPathname(slug, articleService)
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
export declare function renderArticleByPathname(pathname: string, service: ArticleService, options?: RenderArticleOptions): Promise<Response>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* 在 react-router 环境中使用此 Adapter,将路由信息注入组件库上下文。
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // layout.tsx (react-router)
|
|
7
|
+
* <ArticlesProvider basePath="/articles" service={service}>
|
|
8
|
+
* <ReactRouterAdapter>
|
|
9
|
+
* <Outlet />
|
|
10
|
+
* </ReactRouterAdapter>
|
|
11
|
+
* </ArticlesProvider>
|
|
12
|
+
*/
|
|
13
|
+
export declare function ReactRouterAdapter({ children }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ArticlesRouterContextValue {
|
|
2
|
+
navigate: (path: string, options?: {
|
|
3
|
+
state?: any;
|
|
4
|
+
}) => void;
|
|
5
|
+
params: Record<string, string | undefined>;
|
|
6
|
+
locationState: any;
|
|
7
|
+
}
|
|
8
|
+
export declare const ArticlesRouterContext: import("react").Context<ArticlesRouterContextValue>;
|
|
9
|
+
export declare function useArticlesRouter(): ArticlesRouterContextValue;
|
package/dist/server.cjs
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(o="https://api-blog.aisee.live"){const i=o.replace(/\/$/,"");async function a(e,n){const t=await fetch(`${i}${e}`,{headers:{"Content-Type":"application/json"},...n});if(!t.ok)throw new Error(`Request failed: ${t.status}`);return t.json()}return{getList:e=>{const n=new URLSearchParams(Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null).map(([t,r])=>[t,String(r)]))).toString();return a(`/news?${n}`)},getById:async e=>{const n=await a(`/news/detail?id=${encodeURIComponent(e)}`);return(n==null?void 0:n.data)??n??null},getByPathname:async(e,n)=>{const t=await a(`/news/detail?pathname=${encodeURIComponent(e)}&host=${encodeURIComponent(n??"")}`);return(t==null?void 0:t.data)??t??null},create:e=>a("/news",{method:"POST",body:JSON.stringify(e)}),update:(e,n)=>a(`/news/${e}`,{method:"PUT",body:JSON.stringify(n)}),delete:e=>a(`/news/${e}`,{method:"DELETE"})}}const d=c(),s=`<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>404 – Page Not Found</title>
|
|
7
|
+
<style>
|
|
8
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
9
|
+
body {
|
|
10
|
+
min-height: 100vh;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
background: #ffffff;
|
|
16
|
+
font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
17
|
+
color: #111111;
|
|
18
|
+
position: relative;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
body::before {
|
|
22
|
+
content: '';
|
|
23
|
+
position: fixed;
|
|
24
|
+
inset: 0;
|
|
25
|
+
background-image: radial-gradient(circle, #d0d0d0 1px, transparent 1px);
|
|
26
|
+
background-size: 28px 28px;
|
|
27
|
+
opacity: 0.5;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
}
|
|
30
|
+
.watermark {
|
|
31
|
+
position: fixed;
|
|
32
|
+
top: 50%; left: 50%;
|
|
33
|
+
transform: translate(-50%, -50%);
|
|
34
|
+
font-size: clamp(220px, 38vw, 420px);
|
|
35
|
+
font-weight: 900;
|
|
36
|
+
letter-spacing: -0.06em;
|
|
37
|
+
line-height: 1;
|
|
38
|
+
color: #111;
|
|
39
|
+
opacity: 0.04;
|
|
40
|
+
user-select: none;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
}
|
|
44
|
+
.card {
|
|
45
|
+
position: relative;
|
|
46
|
+
z-index: 1;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
align-items: center;
|
|
50
|
+
text-align: center;
|
|
51
|
+
background: rgba(255,255,255,0.82);
|
|
52
|
+
backdrop-filter: blur(12px);
|
|
53
|
+
border: 1.5px solid rgba(17,17,17,0.12);
|
|
54
|
+
border-radius: 24px;
|
|
55
|
+
padding: 56px 52px 48px;
|
|
56
|
+
max-width: 440px;
|
|
57
|
+
width: calc(100% - 48px);
|
|
58
|
+
box-shadow: 0 2px 40px rgba(0,0,0,0.06);
|
|
59
|
+
}
|
|
60
|
+
.badge {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 6px;
|
|
64
|
+
padding: 4px 12px;
|
|
65
|
+
border: 1.5px solid rgba(17,17,17,0.15);
|
|
66
|
+
border-radius: 999px;
|
|
67
|
+
font-size: 0.75rem;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
letter-spacing: 0.08em;
|
|
70
|
+
text-transform: uppercase;
|
|
71
|
+
color: #555;
|
|
72
|
+
margin-bottom: 28px;
|
|
73
|
+
}
|
|
74
|
+
.badge-dot {
|
|
75
|
+
width: 6px; height: 6px;
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
background: #111;
|
|
78
|
+
animation: pulse 2s ease-in-out infinite;
|
|
79
|
+
}
|
|
80
|
+
@keyframes pulse {
|
|
81
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
82
|
+
50% { opacity: 0.3; transform: scale(0.7); }
|
|
83
|
+
}
|
|
84
|
+
.code {
|
|
85
|
+
font-size: clamp(4rem, 14vw, 6.5rem);
|
|
86
|
+
font-weight: 900;
|
|
87
|
+
letter-spacing: -0.04em;
|
|
88
|
+
line-height: 1;
|
|
89
|
+
color: #111;
|
|
90
|
+
margin-bottom: 16px;
|
|
91
|
+
}
|
|
92
|
+
.title { font-size: 1.125rem; font-weight: 600; color: #111; margin-bottom: 10px; }
|
|
93
|
+
.desc { font-size: 0.9375rem; line-height: 1.65; color: #666; margin-bottom: 36px; }
|
|
94
|
+
.btn {
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
gap: 8px;
|
|
99
|
+
padding: 12px 28px;
|
|
100
|
+
border: 1.5px solid #111;
|
|
101
|
+
border-radius: 999px;
|
|
102
|
+
background: #111;
|
|
103
|
+
color: #fff;
|
|
104
|
+
font-size: 0.9375rem;
|
|
105
|
+
font-weight: 500;
|
|
106
|
+
text-decoration: none;
|
|
107
|
+
transition: background 0.2s, color 0.2s, transform 0.2s;
|
|
108
|
+
width: 100%;
|
|
109
|
+
}
|
|
110
|
+
.btn:hover { background: #fff; color: #111; transform: translateY(-1px); }
|
|
111
|
+
</style>
|
|
112
|
+
</head>
|
|
113
|
+
<body>
|
|
114
|
+
<div class="watermark">404</div>
|
|
115
|
+
<div class="card">
|
|
116
|
+
<div class="badge"><span class="badge-dot"></span> Page not found</div>
|
|
117
|
+
<div class="code">404</div>
|
|
118
|
+
<div class="title">Oops, nothing here.</div>
|
|
119
|
+
<p class="desc">This page doesn't exist or has been moved.<br/>Let's get you back on track.</p>
|
|
120
|
+
<a class="btn" href="/">← Back to Home</a>
|
|
121
|
+
</div>
|
|
122
|
+
</body>
|
|
123
|
+
</html>`;function l(o,i){if(/<link[^>]+rel=["'](?:icon|shortcut icon)["'][^>]*>/i.test(o))return o;const e=`<link rel="icon" href="${i}" />`;return o.includes("</head>")?o.replace("</head>",` ${e}
|
|
124
|
+
</head>`):e+o}async function p(o,i,a={}){const{faviconHref:e,notFoundHtml:n}=a;if(!i.getByPathname)return new Response(n??s,{status:404,headers:{"Content-Type":"text/html; charset=utf-8"}});let t=null;try{t=await i.getByPathname(o)}catch{}if(!(t!=null&&t.content))return new Response(n??s,{status:404,headers:{"Content-Type":"text/html; charset=utf-8"}});const r=e?l(t.content,e):t.content;return new Response(r,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}exports.createArticleService=c;exports.defaultArticleService=d;exports.renderArticleByPathname=p;
|
package/dist/server.d.ts
ADDED
package/dist/server.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
function c(o = "https://api-blog.aisee.live") {
|
|
2
|
+
const i = o.replace(/\/$/, "");
|
|
3
|
+
async function a(e, n) {
|
|
4
|
+
const t = await fetch(`${i}${e}`, {
|
|
5
|
+
headers: { "Content-Type": "application/json" },
|
|
6
|
+
...n
|
|
7
|
+
});
|
|
8
|
+
if (!t.ok) throw new Error(`Request failed: ${t.status}`);
|
|
9
|
+
return t.json();
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
getList: (e) => {
|
|
13
|
+
const n = new URLSearchParams(
|
|
14
|
+
Object.fromEntries(
|
|
15
|
+
Object.entries(e).filter(([, t]) => t != null).map(([t, r]) => [t, String(r)])
|
|
16
|
+
)
|
|
17
|
+
).toString();
|
|
18
|
+
return a(`/news?${n}`);
|
|
19
|
+
},
|
|
20
|
+
getById: async (e) => {
|
|
21
|
+
const n = await a(
|
|
22
|
+
`/news/detail?id=${encodeURIComponent(e)}`
|
|
23
|
+
);
|
|
24
|
+
return (n == null ? void 0 : n.data) ?? n ?? null;
|
|
25
|
+
},
|
|
26
|
+
getByPathname: async (e, n) => {
|
|
27
|
+
const t = await a(`/news/detail?pathname=${encodeURIComponent(e)}&host=${encodeURIComponent(n ?? "")}`);
|
|
28
|
+
return (t == null ? void 0 : t.data) ?? t ?? null;
|
|
29
|
+
},
|
|
30
|
+
create: (e) => a("/news", { method: "POST", body: JSON.stringify(e) }),
|
|
31
|
+
update: (e, n) => a(`/news/${e}`, {
|
|
32
|
+
method: "PUT",
|
|
33
|
+
body: JSON.stringify(n)
|
|
34
|
+
}),
|
|
35
|
+
delete: (e) => a(`/news/${e}`, { method: "DELETE" })
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const l = c(), s = `<!DOCTYPE html>
|
|
39
|
+
<html lang="en">
|
|
40
|
+
<head>
|
|
41
|
+
<meta charset="UTF-8" />
|
|
42
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
43
|
+
<title>404 – Page Not Found</title>
|
|
44
|
+
<style>
|
|
45
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
46
|
+
body {
|
|
47
|
+
min-height: 100vh;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
background: #ffffff;
|
|
53
|
+
font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
54
|
+
color: #111111;
|
|
55
|
+
position: relative;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
}
|
|
58
|
+
body::before {
|
|
59
|
+
content: '';
|
|
60
|
+
position: fixed;
|
|
61
|
+
inset: 0;
|
|
62
|
+
background-image: radial-gradient(circle, #d0d0d0 1px, transparent 1px);
|
|
63
|
+
background-size: 28px 28px;
|
|
64
|
+
opacity: 0.5;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
}
|
|
67
|
+
.watermark {
|
|
68
|
+
position: fixed;
|
|
69
|
+
top: 50%; left: 50%;
|
|
70
|
+
transform: translate(-50%, -50%);
|
|
71
|
+
font-size: clamp(220px, 38vw, 420px);
|
|
72
|
+
font-weight: 900;
|
|
73
|
+
letter-spacing: -0.06em;
|
|
74
|
+
line-height: 1;
|
|
75
|
+
color: #111;
|
|
76
|
+
opacity: 0.04;
|
|
77
|
+
user-select: none;
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
}
|
|
81
|
+
.card {
|
|
82
|
+
position: relative;
|
|
83
|
+
z-index: 1;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
align-items: center;
|
|
87
|
+
text-align: center;
|
|
88
|
+
background: rgba(255,255,255,0.82);
|
|
89
|
+
backdrop-filter: blur(12px);
|
|
90
|
+
border: 1.5px solid rgba(17,17,17,0.12);
|
|
91
|
+
border-radius: 24px;
|
|
92
|
+
padding: 56px 52px 48px;
|
|
93
|
+
max-width: 440px;
|
|
94
|
+
width: calc(100% - 48px);
|
|
95
|
+
box-shadow: 0 2px 40px rgba(0,0,0,0.06);
|
|
96
|
+
}
|
|
97
|
+
.badge {
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 6px;
|
|
101
|
+
padding: 4px 12px;
|
|
102
|
+
border: 1.5px solid rgba(17,17,17,0.15);
|
|
103
|
+
border-radius: 999px;
|
|
104
|
+
font-size: 0.75rem;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
letter-spacing: 0.08em;
|
|
107
|
+
text-transform: uppercase;
|
|
108
|
+
color: #555;
|
|
109
|
+
margin-bottom: 28px;
|
|
110
|
+
}
|
|
111
|
+
.badge-dot {
|
|
112
|
+
width: 6px; height: 6px;
|
|
113
|
+
border-radius: 50%;
|
|
114
|
+
background: #111;
|
|
115
|
+
animation: pulse 2s ease-in-out infinite;
|
|
116
|
+
}
|
|
117
|
+
@keyframes pulse {
|
|
118
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
119
|
+
50% { opacity: 0.3; transform: scale(0.7); }
|
|
120
|
+
}
|
|
121
|
+
.code {
|
|
122
|
+
font-size: clamp(4rem, 14vw, 6.5rem);
|
|
123
|
+
font-weight: 900;
|
|
124
|
+
letter-spacing: -0.04em;
|
|
125
|
+
line-height: 1;
|
|
126
|
+
color: #111;
|
|
127
|
+
margin-bottom: 16px;
|
|
128
|
+
}
|
|
129
|
+
.title { font-size: 1.125rem; font-weight: 600; color: #111; margin-bottom: 10px; }
|
|
130
|
+
.desc { font-size: 0.9375rem; line-height: 1.65; color: #666; margin-bottom: 36px; }
|
|
131
|
+
.btn {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
gap: 8px;
|
|
136
|
+
padding: 12px 28px;
|
|
137
|
+
border: 1.5px solid #111;
|
|
138
|
+
border-radius: 999px;
|
|
139
|
+
background: #111;
|
|
140
|
+
color: #fff;
|
|
141
|
+
font-size: 0.9375rem;
|
|
142
|
+
font-weight: 500;
|
|
143
|
+
text-decoration: none;
|
|
144
|
+
transition: background 0.2s, color 0.2s, transform 0.2s;
|
|
145
|
+
width: 100%;
|
|
146
|
+
}
|
|
147
|
+
.btn:hover { background: #fff; color: #111; transform: translateY(-1px); }
|
|
148
|
+
</style>
|
|
149
|
+
</head>
|
|
150
|
+
<body>
|
|
151
|
+
<div class="watermark">404</div>
|
|
152
|
+
<div class="card">
|
|
153
|
+
<div class="badge"><span class="badge-dot"></span> Page not found</div>
|
|
154
|
+
<div class="code">404</div>
|
|
155
|
+
<div class="title">Oops, nothing here.</div>
|
|
156
|
+
<p class="desc">This page doesn't exist or has been moved.<br/>Let's get you back on track.</p>
|
|
157
|
+
<a class="btn" href="/">← Back to Home</a>
|
|
158
|
+
</div>
|
|
159
|
+
</body>
|
|
160
|
+
</html>`;
|
|
161
|
+
function d(o, i) {
|
|
162
|
+
if (/<link[^>]+rel=["'](?:icon|shortcut icon)["'][^>]*>/i.test(o)) return o;
|
|
163
|
+
const e = `<link rel="icon" href="${i}" />`;
|
|
164
|
+
return o.includes("</head>") ? o.replace("</head>", ` ${e}
|
|
165
|
+
</head>`) : e + o;
|
|
166
|
+
}
|
|
167
|
+
async function p(o, i, a = {}) {
|
|
168
|
+
const { faviconHref: e, notFoundHtml: n } = a;
|
|
169
|
+
if (!i.getByPathname)
|
|
170
|
+
return new Response(
|
|
171
|
+
n ?? s,
|
|
172
|
+
{ status: 404, headers: { "Content-Type": "text/html; charset=utf-8" } }
|
|
173
|
+
);
|
|
174
|
+
let t = null;
|
|
175
|
+
try {
|
|
176
|
+
t = await i.getByPathname(o);
|
|
177
|
+
} catch {
|
|
178
|
+
}
|
|
179
|
+
if (!(t != null && t.content))
|
|
180
|
+
return new Response(
|
|
181
|
+
n ?? s,
|
|
182
|
+
{ status: 404, headers: { "Content-Type": "text/html; charset=utf-8" } }
|
|
183
|
+
);
|
|
184
|
+
const r = e ? d(t.content, e) : t.content;
|
|
185
|
+
return new Response(r, {
|
|
186
|
+
status: 200,
|
|
187
|
+
headers: { "Content-Type": "text/html; charset=utf-8" }
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
export {
|
|
191
|
+
c as createArticleService,
|
|
192
|
+
l as defaultArticleService,
|
|
193
|
+
p as renderArticleByPathname
|
|
194
|
+
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease: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-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-amber-500:oklch(76.9% .188 70.08);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-400:oklch(79.2% .209 151.711);--color-green-600:oklch(62.7% .194 149.214);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--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-800:oklch(42.4% .199 265.638);--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-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--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: 1.5 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear 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%;-moz-tab-size:4;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;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]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance: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{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.right-4{right:calc(var(--spacing) * 4)}.bottom-full{bottom:100%}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.z-50{z-index:50}.z-\[9998\]{z-index:9998}.z-\[9999\]{z-index:9999}.m-0{margin:calc(var(--spacing) * 0)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.flex{display:flex}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-64{height:calc(var(--spacing) * 64)}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-44{width:calc(var(--spacing) * 44)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-full{width:100%}.max-w-\[160px\]{max-width:160px}.max-w-\[300px\]{max-width:300px}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.list-none{list-style-type:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-blue-100{border-color:var(--color-blue-100)}.border-gray-50{border-color:var(--color-gray-50)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-200\/60{border-color:#e5e7eb99}@supports (color:color-mix(in lab,red,red)){.border-gray-200\/60{border-color:color-mix(in oklab,var(--color-gray-200) 60%,transparent)}}.border-green-200{border-color:var(--color-green-200)}.border-red-200{border-color:var(--color-red-200)}.border-red-400{border-color:var(--color-red-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-50\/40{background-color:#f9fafb66}@supports (color:color-mix(in lab,red,red)){.bg-gray-50\/40{background-color:color-mix(in oklab,var(--color-gray-50) 40%,transparent)}}.bg-gray-50\/60{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.bg-gray-50\/60{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.bg-gray-100\/60{background-color:#f3f4f699}@supports (color:color-mix(in lab,red,red)){.bg-gray-100\/60{background-color:color-mix(in oklab,var(--color-gray-100) 60%,transparent)}}.bg-gray-100\/70{background-color:#f3f4f6b3}@supports (color:color-mix(in lab,red,red)){.bg-gray-100\/70{background-color:color-mix(in oklab,var(--color-gray-100) 70%,transparent)}}.bg-gray-100\/80{background-color:#f3f4f6cc}@supports (color:color-mix(in lab,red,red)){.bg-gray-100\/80{background-color:color-mix(in oklab,var(--color-gray-100) 80%,transparent)}}.bg-gray-800\/90{background-color:#1e2939e6}@supports (color:color-mix(in lab,red,red)){.bg-gray-800\/90{background-color:color-mix(in oklab,var(--color-gray-800) 90%,transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-green-400\/80{background-color:#05df72cc}@supports (color:color-mix(in lab,red,red)){.bg-green-400\/80{background-color:color-mix(in oklab,var(--color-green-400) 80%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-400\/80{background-color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.bg-red-400\/80{background-color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-400\/80{background-color:#fac800cc}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\/80{background-color:color-mix(in oklab,var(--color-yellow-400) 80%,transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-0{padding-left:calc(var(--spacing) * 0)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-blue-400{color:var(--color-blue-400)}.text-blue-600{color:var(--color-blue-600)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.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-green-600{color:var(--color-green-600)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-gray-200\/50{--tw-ring-color:#e5e7eb80}@supports (color:color-mix(in lab,red,red)){.ring-gray-200\/50{--tw-ring-color:color-mix(in oklab, var(--color-gray-200) 50%, transparent)}}.ring-red-500\/20{--tw-ring-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.ring-red-500\/20{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 20%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.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))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.select-none{-webkit-user-select:none;user-select:none}.focus-within\:border-blue-400:focus-within{border-color:var(--color-blue-400)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-blue-500\/30:focus-within{--tw-ring-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.focus-within\:ring-blue-500\/30:focus-within{--tw-ring-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}@media(hover:hover){.hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-50\/60:hover{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.hover\:bg-gray-50\/60:hover{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-white\/50:hover{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/50:hover{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.hover\:text-blue-500:hover{color:var(--color-blue-500)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}}.focus\:border-blue-400:focus{border-color:var(--color-blue-400)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-400:focus{--tw-ring-color:var(--color-blue-400)}.focus\:ring-blue-500\/30:focus{--tw-ring-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-blue-500\/30:focus{--tw-ring-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}}@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-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@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}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface Article {
|
|
2
|
+
id: string;
|
|
3
|
+
pathname: string;
|
|
4
|
+
content: string;
|
|
5
|
+
host?: string;
|
|
6
|
+
createdAt?: string;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ArticleService {
|
|
10
|
+
getList: (params: Record<string, any>) => Promise<{
|
|
11
|
+
items: Article[];
|
|
12
|
+
total?: number;
|
|
13
|
+
}>;
|
|
14
|
+
getById: (id: string) => Promise<Article>;
|
|
15
|
+
getByPathname?: (pathname: string) => Promise<Article | null>;
|
|
16
|
+
create: (data: Partial<Article>) => Promise<any>;
|
|
17
|
+
update: (id: string, data: Partial<Article>) => Promise<any>;
|
|
18
|
+
delete: (id: string) => Promise<any>;
|
|
19
|
+
}
|
|
20
|
+
export interface ArticlesConfig {
|
|
21
|
+
basePath: string;
|
|
22
|
+
service: ArticleService;
|
|
23
|
+
previewBaseUrl?: string;
|
|
24
|
+
previewTailwind?: boolean;
|
|
25
|
+
/** 非 react-router 环境(如 Next.js)传入导航函数,替代 react-router 的 useNavigate */
|
|
26
|
+
navigate?: (path: string, options?: {
|
|
27
|
+
state?: any;
|
|
28
|
+
}) => void;
|
|
29
|
+
}
|
|
30
|
+
/** Provider props:service 可选,不传时使用内置默认 service */
|
|
31
|
+
export type ArticlesProviderProps = Omit<ArticlesConfig, 'service'> & {
|
|
32
|
+
service?: ArticleService;
|
|
33
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface W3CMessage {
|
|
2
|
+
type: string;
|
|
3
|
+
message: string;
|
|
4
|
+
extract?: string;
|
|
5
|
+
lastLine?: number;
|
|
6
|
+
lastColumn?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface W3CResult {
|
|
9
|
+
isValid: boolean;
|
|
10
|
+
errors: W3CMessage[];
|
|
11
|
+
networkError?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 调用 W3C Nu HTML Checker 校验 HTML 字符串。
|
|
15
|
+
* 网络失败时返回 networkError: true,不阻塞保存。
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkWithW3C(htmlContent: string): Promise<W3CResult>;
|
|
18
|
+
/**
|
|
19
|
+
* 检查 HTML 字符串的完整性,返回问题描述列表。
|
|
20
|
+
* 空字符串返回 []。
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateHtml(html: string): string[];
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@web-mods/articles",
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "git+https://github.com/web-module/aisee-articles.git"
|
|
6
|
+
},
|
|
7
|
+
"version": "1.1.0",
|
|
8
|
+
"description": "Reusable articles management module",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./server": {
|
|
20
|
+
"types": "./dist/server.d.ts",
|
|
21
|
+
"import": "./dist/server.js",
|
|
22
|
+
"require": "./dist/server.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./style.css": "./dist/style.css"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "vite build && tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
31
|
+
"dev": "vite build --watch",
|
|
32
|
+
"playground": "vite --config playground/vite.config.ts",
|
|
33
|
+
"release": "bash scripts/release.sh",
|
|
34
|
+
"release:minor": "bash scripts/release.sh minor",
|
|
35
|
+
"release:major": "bash scripts/release.sh major"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": ">=18",
|
|
39
|
+
"react-dom": ">=18",
|
|
40
|
+
"react-router": ">=7"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@monaco-editor/react": "^4.7.0",
|
|
44
|
+
"@tailwindcss/vite": "^4.2.4",
|
|
45
|
+
"@types/node": "^25.6.0",
|
|
46
|
+
"@types/react": "^19.2.14",
|
|
47
|
+
"@types/react-dom": "^19.2.3",
|
|
48
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
49
|
+
"dayjs": "^1.11.20",
|
|
50
|
+
"lucide-react": "^1.11.0",
|
|
51
|
+
"react": "^19.2.5",
|
|
52
|
+
"react-dom": "^19.2.5",
|
|
53
|
+
"react-router": "^7.14.1",
|
|
54
|
+
"tailwindcss": "^4.2.4",
|
|
55
|
+
"typescript": "^5.9.3",
|
|
56
|
+
"vite": "^6.4.2",
|
|
57
|
+
"vite-plugin-dts": "^4.5.4"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"registry": "https://registry.npmjs.org",
|
|
61
|
+
"access": "public"
|
|
62
|
+
}
|
|
63
|
+
}
|