poon-choi 0.0.2 → 0.0.4
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/.output/nitro.json +17 -0
- package/.output/public/assets/about-D4e6L2RX.js +1 -0
- package/.output/public/assets/index-B6P0kA2f.css +1 -0
- package/.output/public/assets/index-CdiJXXIG.js +11 -0
- package/.output/public/assets/routes-BgrRSMVP.js +7 -0
- package/.output/public/assets/styles-DqQrEVt_.css +1 -0
- package/.output/server/_chunks/ssr-renderer.mjs +23 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +15021 -0
- package/.output/server/_libs/clsx.mjs +15 -0
- package/.output/server/_libs/h3+rou3+srvx.mjs +1352 -0
- package/.output/server/_libs/tailwind-merge.mjs +3459 -0
- package/.output/server/_libs/tanstack__history.mjs +363 -0
- package/.output/server/_libs/ufo.mjs +63 -0
- package/.output/server/_runtime.mjs +34 -0
- package/.output/server/_ssr/about-C106R88A.mjs +26 -0
- package/.output/server/_ssr/empty-plugin-adapters-BiGySXWX.mjs +4 -0
- package/.output/server/_ssr/router-B7lhQtFL.mjs +258 -0
- package/.output/server/_ssr/routes-Cutxg__h.mjs +769 -0
- package/.output/server/_ssr/ssr.mjs +7304 -0
- package/.output/server/_ssr/start-CwhArFJN.mjs +3 -0
- package/.output/server/_tanstack-start-manifest_v-Dh5m4VsW.mjs +25 -0
- package/.output/server/index.mjs +311 -0
- package/LICENSE +21 -0
- package/README.md +10 -3
- package/README.zh.md +10 -3
- package/bin/{index.ts → cli.ts} +17 -2
- package/package.json +17 -49
- package/README.tanstack-start.md +0 -224
- package/src/components/DropStage.tsx +0 -64
- package/src/components/FitModeToggle.tsx +0 -34
- package/src/components/Footer.tsx +0 -44
- package/src/components/GapColorPicker.tsx +0 -53
- package/src/components/Header.tsx +0 -78
- package/src/components/PresetColorDropdown.tsx +0 -166
- package/src/components/ThemeToggle.tsx +0 -81
- package/src/components/ThumbnailStrip.tsx +0 -147
- package/src/components/VerticalSeparator.tsx +0 -5
- package/src/hooks/useToast.tsx +0 -23
- package/src/lib/config.ts +0 -48
- package/src/lib/draw.ts +0 -78
- package/src/lib/file.ts +0 -23
- package/src/lib/utils.ts +0 -7
- package/src/routeTree.gen.ts +0 -86
- package/src/router.tsx +0 -19
- package/src/routes/__root.tsx +0 -68
- package/src/routes/about.tsx +0 -23
- package/src/routes/index.css +0 -300
- package/src/routes/index.tsx +0 -511
- package/src/styles.css +0 -375
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-Dh5m4VsW.js
|
|
2
|
+
var tsrStartManifest = () => ({ routes: {
|
|
3
|
+
__root__: {
|
|
4
|
+
filePath: "F:/workspace/github/wechat-cover-studio/wechat-cover-studio/src/routes/__root.tsx",
|
|
5
|
+
children: ["/", "/about"],
|
|
6
|
+
css: ["/assets/index-B6P0kA2f.css"],
|
|
7
|
+
preloads: ["/assets/index-CdiJXXIG.js"],
|
|
8
|
+
scripts: [{ attrs: {
|
|
9
|
+
type: "module",
|
|
10
|
+
async: !0,
|
|
11
|
+
src: "/assets/index-CdiJXXIG.js"
|
|
12
|
+
} }]
|
|
13
|
+
},
|
|
14
|
+
"/": {
|
|
15
|
+
filePath: "F:/workspace/github/wechat-cover-studio/wechat-cover-studio/src/routes/index.tsx",
|
|
16
|
+
children: void 0,
|
|
17
|
+
preloads: ["/assets/routes-BgrRSMVP.js"]
|
|
18
|
+
},
|
|
19
|
+
"/about": {
|
|
20
|
+
filePath: "F:/workspace/github/wechat-cover-studio/wechat-cover-studio/src/routes/about.tsx",
|
|
21
|
+
children: void 0,
|
|
22
|
+
preloads: ["/assets/about-D4e6L2RX.js"]
|
|
23
|
+
}
|
|
24
|
+
} });
|
|
25
|
+
export { tsrStartManifest };
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
globalThis.__nitro_main__ = import.meta.url;
|
|
2
|
+
import { a as toEventHandler, c as serve, i as defineLazyEventHandler, n as HTTPError, r as defineHandler, s as NodeResponse, t as H3Core } from "./_libs/h3+rou3+srvx.mjs";
|
|
3
|
+
import { i as withoutTrailingSlash, n as joinURL, r as withLeadingSlash, t as decodePath } from "./_libs/ufo.mjs";
|
|
4
|
+
import { promises } from "node:fs";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { dirname, resolve } from "node:path";
|
|
7
|
+
// node_modules/.pnpm/nitro@3.0.260610-beta_choki_2510d8f6d72e50fc324cceafae0f8904/node_modules/nitro/dist/runtime/internal/route-rules.mjs
|
|
8
|
+
var headers = ((m) => function headersRouteRule(event) {
|
|
9
|
+
for (const [key, value] of Object.entries(m.options || {})) event.res.headers.set(key, value);
|
|
10
|
+
});
|
|
11
|
+
// #nitro/virtual/public-assets-data
|
|
12
|
+
var public_assets_data_default = {
|
|
13
|
+
"/assets/about-D4e6L2RX.js": {
|
|
14
|
+
"type": "text/javascript; charset=utf-8",
|
|
15
|
+
"etag": "\"2d3-K/Mk8Xwun59XEuZOXW4FszGlmCo\"",
|
|
16
|
+
"mtime": "2026-11-16T07:06:22.977Z",
|
|
17
|
+
"size": 723,
|
|
18
|
+
"path": "../public/assets/about-D4e6L2RX.js"
|
|
19
|
+
},
|
|
20
|
+
"/assets/index-B6P0kA2f.css": {
|
|
21
|
+
"type": "text/css; charset=utf-8",
|
|
22
|
+
"etag": "\"ebc-+E2ER+la0niWYHOeTJb/km1hZ3g\"",
|
|
23
|
+
"mtime": "2026-11-16T07:06:22.978Z",
|
|
24
|
+
"size": 3772,
|
|
25
|
+
"path": "../public/assets/index-B6P0kA2f.css"
|
|
26
|
+
},
|
|
27
|
+
"/assets/styles-DqQrEVt_.css": {
|
|
28
|
+
"type": "text/css; charset=utf-8",
|
|
29
|
+
"etag": "\"65ac-bZPVDa9/uqOQex/J0MEvk6xdijI\"",
|
|
30
|
+
"mtime": "2026-11-16T07:06:22.978Z",
|
|
31
|
+
"size": 26028,
|
|
32
|
+
"path": "../public/assets/styles-DqQrEVt_.css"
|
|
33
|
+
},
|
|
34
|
+
"/assets/routes-BgrRSMVP.js": {
|
|
35
|
+
"type": "text/javascript; charset=utf-8",
|
|
36
|
+
"etag": "\"9cab-F1HqYvl8HqsqA3IdMdtqy0sjW/4\"",
|
|
37
|
+
"mtime": "2026-11-16T07:06:22.977Z",
|
|
38
|
+
"size": 40107,
|
|
39
|
+
"path": "../public/assets/routes-BgrRSMVP.js"
|
|
40
|
+
},
|
|
41
|
+
"/assets/index-CdiJXXIG.js": {
|
|
42
|
+
"type": "text/javascript; charset=utf-8",
|
|
43
|
+
"etag": "\"54f38-+c8k8UEQVPFuHY4Mod+ogEthzBI\"",
|
|
44
|
+
"mtime": "2026-11-16T07:06:22.976Z",
|
|
45
|
+
"size": 347960,
|
|
46
|
+
"path": "../public/assets/index-CdiJXXIG.js"
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
// #nitro/virtual/public-assets-node
|
|
50
|
+
function readAsset(id) {
|
|
51
|
+
const serverDir = dirname(fileURLToPath(globalThis.__nitro_main__));
|
|
52
|
+
return promises.readFile(resolve(serverDir, public_assets_data_default[id].path));
|
|
53
|
+
}
|
|
54
|
+
// #nitro/virtual/public-assets
|
|
55
|
+
var publicAssetBases = {};
|
|
56
|
+
function isPublicAssetURL(id = "") {
|
|
57
|
+
if (public_assets_data_default[id]) return true;
|
|
58
|
+
for (const base in publicAssetBases) if (id.startsWith(base)) return true;
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
function getAsset(id) {
|
|
62
|
+
return public_assets_data_default[id];
|
|
63
|
+
}
|
|
64
|
+
// node_modules/.pnpm/nitro@3.0.260610-beta_choki_2510d8f6d72e50fc324cceafae0f8904/node_modules/nitro/dist/runtime/internal/static.mjs
|
|
65
|
+
var METHODS = /* @__PURE__ */ new Set(["HEAD", "GET"]);
|
|
66
|
+
var EncodingMap = {
|
|
67
|
+
gzip: ".gz",
|
|
68
|
+
br: ".br",
|
|
69
|
+
zstd: ".zst"
|
|
70
|
+
};
|
|
71
|
+
var static_default = defineHandler((event) => {
|
|
72
|
+
if (event.req.method && !METHODS.has(event.req.method)) return;
|
|
73
|
+
let id = decodePath(withLeadingSlash(withoutTrailingSlash(event.url.pathname)));
|
|
74
|
+
let asset;
|
|
75
|
+
const encodings = [...(event.req.headers.get("accept-encoding") || "").split(",").map((e) => EncodingMap[e.trim()]).filter(Boolean).sort(), ""];
|
|
76
|
+
for (const encoding of encodings) for (const _id of [id + encoding, joinURL(id, "index.html" + encoding)]) {
|
|
77
|
+
const _asset = getAsset(_id);
|
|
78
|
+
if (_asset) {
|
|
79
|
+
asset = _asset;
|
|
80
|
+
id = _id;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (!asset) {
|
|
85
|
+
if (isPublicAssetURL(id)) {
|
|
86
|
+
event.res.headers.delete("Cache-Control");
|
|
87
|
+
throw new HTTPError({ status: 404 });
|
|
88
|
+
}
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (encodings.length > 1) event.res.headers.append("Vary", "Accept-Encoding");
|
|
92
|
+
if (event.req.headers.get("if-none-match") === asset.etag) {
|
|
93
|
+
event.res.status = 304;
|
|
94
|
+
event.res.statusText = "Not Modified";
|
|
95
|
+
return "";
|
|
96
|
+
}
|
|
97
|
+
const ifModifiedSinceH = event.req.headers.get("if-modified-since");
|
|
98
|
+
const mtimeDate = new Date(asset.mtime);
|
|
99
|
+
if (ifModifiedSinceH && asset.mtime && new Date(ifModifiedSinceH) >= mtimeDate) {
|
|
100
|
+
event.res.status = 304;
|
|
101
|
+
event.res.statusText = "Not Modified";
|
|
102
|
+
return "";
|
|
103
|
+
}
|
|
104
|
+
if (asset.type) event.res.headers.set("Content-Type", asset.type);
|
|
105
|
+
if (asset.etag && !event.res.headers.has("ETag")) event.res.headers.set("ETag", asset.etag);
|
|
106
|
+
if (asset.mtime && !event.res.headers.has("Last-Modified")) event.res.headers.set("Last-Modified", mtimeDate.toUTCString());
|
|
107
|
+
if (asset.encoding && !event.res.headers.has("Content-Encoding")) event.res.headers.set("Content-Encoding", asset.encoding);
|
|
108
|
+
if (asset.size > 0 && !event.res.headers.has("Content-Length")) event.res.headers.set("Content-Length", asset.size.toString());
|
|
109
|
+
return readAsset(id);
|
|
110
|
+
});
|
|
111
|
+
// #nitro/virtual/routing
|
|
112
|
+
var findRouteRules = /* @__PURE__ */ (() => {
|
|
113
|
+
const $0 = [{
|
|
114
|
+
name: "headers",
|
|
115
|
+
route: "/assets/**",
|
|
116
|
+
handler: headers,
|
|
117
|
+
options: { "cache-control": "public, max-age=31536000, immutable" }
|
|
118
|
+
}];
|
|
119
|
+
return (m, p) => {
|
|
120
|
+
let r = [];
|
|
121
|
+
if (p.charCodeAt(p.length - 1) === 47) p = p.slice(0, -1) || "/";
|
|
122
|
+
let s = p.split("/");
|
|
123
|
+
if (s.length > 1) {
|
|
124
|
+
if (s[1] === "assets") r.unshift({
|
|
125
|
+
data: $0,
|
|
126
|
+
params: { "_": s.slice(2).join("/") }
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return r;
|
|
130
|
+
};
|
|
131
|
+
})();
|
|
132
|
+
var _lazy_raGEJY = defineLazyEventHandler(() => import("./_chunks/ssr-renderer.mjs"));
|
|
133
|
+
var findRoute = /* @__PURE__ */ (() => {
|
|
134
|
+
const data = {
|
|
135
|
+
route: "/**",
|
|
136
|
+
handler: _lazy_raGEJY
|
|
137
|
+
};
|
|
138
|
+
return ((_m, p) => {
|
|
139
|
+
return {
|
|
140
|
+
data,
|
|
141
|
+
params: { "_": p.slice(1) }
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
})();
|
|
145
|
+
var globalMiddleware = [toEventHandler(static_default)].filter(Boolean);
|
|
146
|
+
// node_modules/.pnpm/nitro@3.0.260610-beta_choki_2510d8f6d72e50fc324cceafae0f8904/node_modules/nitro/dist/runtime/internal/error/prod.mjs
|
|
147
|
+
var errorHandler = (error, event) => {
|
|
148
|
+
const res = defaultHandler(error, event);
|
|
149
|
+
return new NodeResponse(typeof res.body === "string" ? res.body : JSON.stringify(res.body, null, 2), res);
|
|
150
|
+
};
|
|
151
|
+
function defaultHandler(error, event) {
|
|
152
|
+
const unhandled = error.unhandled ?? !HTTPError.isError(error);
|
|
153
|
+
const { status = 500, statusText = "" } = unhandled ? {} : error;
|
|
154
|
+
if (status === 404) {
|
|
155
|
+
const url = event.url || new URL(event.req.url);
|
|
156
|
+
const baseURL = "/";
|
|
157
|
+
if (/^\/[^/]/.test(baseURL) && !url.pathname.startsWith(baseURL)) return {
|
|
158
|
+
status: 302,
|
|
159
|
+
headers: new Headers({ location: `${baseURL}${url.pathname.slice(1)}${url.search}` })
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const headers = new Headers(unhandled ? {} : error.headers);
|
|
163
|
+
headers.set("content-type", "application/json; charset=utf-8");
|
|
164
|
+
return {
|
|
165
|
+
status,
|
|
166
|
+
statusText,
|
|
167
|
+
headers,
|
|
168
|
+
body: {
|
|
169
|
+
error: true,
|
|
170
|
+
...unhandled ? {
|
|
171
|
+
status,
|
|
172
|
+
unhandled: true
|
|
173
|
+
} : typeof error.toJSON === "function" ? error.toJSON() : {
|
|
174
|
+
status,
|
|
175
|
+
statusText,
|
|
176
|
+
message: error.message
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
// #nitro/virtual/error-handler
|
|
182
|
+
var errorHandlers = [errorHandler];
|
|
183
|
+
async function error_handler_default(error, event) {
|
|
184
|
+
for (const handler of errorHandlers) try {
|
|
185
|
+
const response = await handler(error, event, { defaultHandler });
|
|
186
|
+
if (response) return response;
|
|
187
|
+
} catch (error) {
|
|
188
|
+
console.error(error);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
// #nitro/virtual/app
|
|
192
|
+
function createNitroApp() {
|
|
193
|
+
const captureError = (error, errorCtx) => {
|
|
194
|
+
if (errorCtx?.event) {
|
|
195
|
+
const errors = errorCtx.event.req.context?.nitro?.errors;
|
|
196
|
+
if (errors) errors.push({
|
|
197
|
+
error,
|
|
198
|
+
context: errorCtx
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
const h3App = createH3App({ onError(error, event) {
|
|
203
|
+
return error_handler_default(error, event);
|
|
204
|
+
} });
|
|
205
|
+
let appHandler = (req) => {
|
|
206
|
+
req.context ||= {};
|
|
207
|
+
req.context.nitro = req.context.nitro || { errors: [] };
|
|
208
|
+
return h3App.fetch(req);
|
|
209
|
+
};
|
|
210
|
+
return {
|
|
211
|
+
fetch: appHandler,
|
|
212
|
+
h3: h3App,
|
|
213
|
+
hooks: void 0,
|
|
214
|
+
captureError
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function createH3App(config) {
|
|
218
|
+
const h3App = new H3Core(config);
|
|
219
|
+
h3App["~findRoute"] = (event) => findRoute(event.req.method, event.url.pathname);
|
|
220
|
+
h3App["~middleware"].push(...globalMiddleware);
|
|
221
|
+
h3App["~getMiddleware"] = (event, route) => {
|
|
222
|
+
const pathname = event.url.pathname;
|
|
223
|
+
const method = event.req.method;
|
|
224
|
+
const middleware = [];
|
|
225
|
+
const routeRules = getRouteRules(method, pathname);
|
|
226
|
+
event.context.routeRules = routeRules?.routeRules;
|
|
227
|
+
if (routeRules?.routeRuleMiddleware.length) middleware.push(...routeRules.routeRuleMiddleware);
|
|
228
|
+
middleware.push(...h3App["~middleware"]);
|
|
229
|
+
if (route?.data?.middleware?.length) middleware.push(...route.data.middleware);
|
|
230
|
+
return middleware;
|
|
231
|
+
};
|
|
232
|
+
return h3App;
|
|
233
|
+
}
|
|
234
|
+
// node_modules/.pnpm/nitro@3.0.260610-beta_choki_2510d8f6d72e50fc324cceafae0f8904/node_modules/nitro/dist/runtime/internal/app.mjs
|
|
235
|
+
var APP_ID = "default";
|
|
236
|
+
function useNitroApp() {
|
|
237
|
+
let instance = useNitroApp._instance;
|
|
238
|
+
if (instance) return instance;
|
|
239
|
+
instance = useNitroApp._instance = createNitroApp();
|
|
240
|
+
globalThis.__nitro__ = globalThis.__nitro__ || {};
|
|
241
|
+
globalThis.__nitro__[APP_ID] = instance;
|
|
242
|
+
return instance;
|
|
243
|
+
}
|
|
244
|
+
function getRouteRules(method, pathname) {
|
|
245
|
+
const m = findRouteRules(method, pathname);
|
|
246
|
+
if (!m?.length) return { routeRuleMiddleware: [] };
|
|
247
|
+
const routeRules = {};
|
|
248
|
+
for (const layer of m) for (const rule of layer.data) {
|
|
249
|
+
const currentRule = routeRules[rule.name];
|
|
250
|
+
if (currentRule) {
|
|
251
|
+
if (rule.options === false) {
|
|
252
|
+
delete routeRules[rule.name];
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
if (typeof currentRule.options === "object" && typeof rule.options === "object") currentRule.options = {
|
|
256
|
+
...currentRule.options,
|
|
257
|
+
...rule.options
|
|
258
|
+
};
|
|
259
|
+
else currentRule.options = rule.options;
|
|
260
|
+
currentRule.route = rule.route;
|
|
261
|
+
currentRule.params = {
|
|
262
|
+
...currentRule.params,
|
|
263
|
+
...layer.params
|
|
264
|
+
};
|
|
265
|
+
} else if (rule.options !== false) routeRules[rule.name] = {
|
|
266
|
+
...rule,
|
|
267
|
+
params: layer.params
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
const middleware = [];
|
|
271
|
+
const orderedRules = Object.values(routeRules).sort((a, b) => (a.handler?.order || 0) - (b.handler?.order || 0));
|
|
272
|
+
for (const rule of orderedRules) {
|
|
273
|
+
if (rule.options === false || !rule.handler) continue;
|
|
274
|
+
middleware.push(rule.handler(rule));
|
|
275
|
+
}
|
|
276
|
+
return {
|
|
277
|
+
routeRules,
|
|
278
|
+
routeRuleMiddleware: middleware
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
// node_modules/.pnpm/nitro@3.0.260610-beta_choki_2510d8f6d72e50fc324cceafae0f8904/node_modules/nitro/dist/runtime/internal/error/hooks.mjs
|
|
282
|
+
function _captureError(error, type) {
|
|
283
|
+
console.error(`[${type}]`, error);
|
|
284
|
+
useNitroApp().captureError?.(error, { tags: [type] });
|
|
285
|
+
}
|
|
286
|
+
function trapUnhandledErrors() {
|
|
287
|
+
process.on("unhandledRejection", (error) => _captureError(error, "unhandledRejection"));
|
|
288
|
+
process.on("uncaughtException", (error) => _captureError(error, "uncaughtException"));
|
|
289
|
+
}
|
|
290
|
+
// #nitro/virtual/tracing
|
|
291
|
+
var tracingSrvxPlugins = [];
|
|
292
|
+
// node_modules/.pnpm/nitro@3.0.260610-beta_choki_2510d8f6d72e50fc324cceafae0f8904/node_modules/nitro/dist/presets/node/runtime/node-server.mjs
|
|
293
|
+
var _parsedPort = Number.parseInt(process.env.NITRO_PORT ?? process.env.PORT ?? "");
|
|
294
|
+
var port = Number.isNaN(_parsedPort) ? 3e3 : _parsedPort;
|
|
295
|
+
var host = process.env.NITRO_HOST || process.env.HOST;
|
|
296
|
+
var cert = process.env.NITRO_SSL_CERT;
|
|
297
|
+
var key = process.env.NITRO_SSL_KEY;
|
|
298
|
+
var nitroApp = useNitroApp();
|
|
299
|
+
serve({
|
|
300
|
+
port,
|
|
301
|
+
hostname: host,
|
|
302
|
+
tls: cert && key ? {
|
|
303
|
+
cert,
|
|
304
|
+
key
|
|
305
|
+
} : void 0,
|
|
306
|
+
fetch: nitroApp.fetch,
|
|
307
|
+
plugins: [...tracingSrvxPlugins]
|
|
308
|
+
});
|
|
309
|
+
trapUnhandledErrors();
|
|
310
|
+
var node_server_default = {};
|
|
311
|
+
export { node_server_default as default };
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 legend80s
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](./README.zh.md)
|
|
4
4
|
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="https://koboyo.com/icons/svg/geometric-mezze-platter.svg" width="30%" />
|
|
7
|
+
</p>
|
|
8
|
+
|
|
5
9
|
> A tiny local server that plates up your images into a WeChat cover — like a **poon choi**, one basin holding many ingredients, layer by layer.
|
|
6
10
|
|
|
7
11
|
[](https://www.npmjs.com/package/poon-choi)
|
|
8
12
|
[](https://www.npmjs.com/package/poon-choi)
|
|
9
|
-
[](./LICENSE)
|
|
10
13
|
|
|
11
14
|
**poon-choi** (盆菜) is a Cantonese dish where many ingredients are stacked in one basin and shared from the top down. This tool does the same for images: drop in 1–6 pictures, and it plates them into a single **2.35:1 WeChat cover (900×383)**, plus a **1:1 thumbnail (383×383)**.
|
|
12
15
|
|
|
@@ -105,6 +108,10 @@ pnpm dev # start the local server in watch mode
|
|
|
105
108
|
pnpm build # build for distribution
|
|
106
109
|
```
|
|
107
110
|
|
|
108
|
-
##
|
|
111
|
+
## Publishing
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
cd wechat-cover-studio
|
|
109
115
|
|
|
110
|
-
|
|
116
|
+
npm run pub:patch/minor/major
|
|
117
|
+
```
|
package/README.zh.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# 🥘 盆菜(poon-choi)
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://koboyo.com/icons/svg/geometric-mezze-platter.svg" width="30%" />
|
|
5
|
+
</p>
|
|
6
|
+
|
|
3
7
|
[English](./README.md) | 中文
|
|
4
8
|
|
|
5
9
|
> 一个轻量本地服务,把多张图片拼合成微信封面——就像一份**盆菜**,一钵容纳多种不同食材。
|
|
6
10
|
|
|
7
11
|
[](https://www.npmjs.com/package/poon-choi)
|
|
8
12
|
[](https://www.npmjs.com/package/poon-choi)
|
|
9
|
-
[](./LICENSE)
|
|
10
13
|
|
|
11
14
|
**poon-choi(盆菜)** 是一道粤菜,多种食材码在同一个盆里,由上至下享用。这个工具也是同理:放入 1–6 张图片,它会自动拼出一张 **2.35:1 的微信封面(900×383)**,同时生成一张 **1:1 的缩略图(383×383)**。
|
|
12
15
|
|
|
@@ -102,6 +105,10 @@ pnpm dev # 启动监听模式的本地服务
|
|
|
102
105
|
pnpm build # 打包发布版本
|
|
103
106
|
```
|
|
104
107
|
|
|
105
|
-
##
|
|
108
|
+
## 发布
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
cd wechat-cover-studio
|
|
106
112
|
|
|
107
|
-
|
|
113
|
+
npm run pub:patch/minor/major
|
|
114
|
+
```
|
package/bin/{index.ts → cli.ts}
RENAMED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { spawn } from 'node:child_process';
|
|
6
6
|
import { parseArgs } from 'node:util';
|
|
7
|
+
import { version, name } from '../wechat-cover-studio/package.json';
|
|
7
8
|
|
|
8
9
|
main();
|
|
9
10
|
|
|
@@ -15,10 +16,15 @@ function main() {
|
|
|
15
16
|
type: 'string',
|
|
16
17
|
default: '3000',
|
|
17
18
|
},
|
|
19
|
+
|
|
20
|
+
version: {
|
|
21
|
+
short: 'v',
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
}
|
|
18
24
|
},
|
|
19
25
|
});
|
|
20
26
|
|
|
21
|
-
console.log(values);
|
|
27
|
+
// console.log(values);
|
|
22
28
|
|
|
23
29
|
const port = Number(values.port);
|
|
24
30
|
// validate port in a valid range
|
|
@@ -30,8 +36,17 @@ function main() {
|
|
|
30
36
|
return
|
|
31
37
|
}
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
if (true || values.version) {
|
|
40
|
+
console.log(`\n${name} v${version}\n\n---\n`);
|
|
41
|
+
// return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
spawn('node', ['.output/server/index.mjs'], {
|
|
34
45
|
stdio: 'inherit',
|
|
35
46
|
shell: true,
|
|
47
|
+
env: {
|
|
48
|
+
...process.env,
|
|
49
|
+
PORT: values.port,
|
|
50
|
+
}
|
|
36
51
|
})
|
|
37
52
|
}
|
package/package.json
CHANGED
|
@@ -1,69 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poon-choi",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "poon-choi 🍲 is a wechat-cover-studio: a cover mosaic tool to generate wechat (2.35:1) cover image using multiple images",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"description": "poon-choi 🍲 is a wechat-cover-studio: a cover mosaic tool to generate wechat (2.35:1) cover image using multiple images.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"imports": {
|
|
8
8
|
"#/*": "./src/*"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
|
-
"poon-choi": "./bin/
|
|
11
|
+
"poon-choi": "./bin/cli.ts"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"
|
|
15
|
-
"src/"
|
|
14
|
+
".output/"
|
|
16
15
|
],
|
|
17
16
|
"scripts": {
|
|
18
|
-
"dev": "
|
|
19
|
-
"
|
|
20
|
-
"build": "vite build",
|
|
21
|
-
"preview": "vite preview",
|
|
22
|
-
"format": "biome format",
|
|
23
|
-
"lint": "biome lint",
|
|
24
|
-
"check": "biome check",
|
|
25
|
-
"start": "node .output/server/index.mjs",
|
|
17
|
+
"dev": "cd wechat-cover-studio && npm run dev",
|
|
18
|
+
"build": "cd wechat-cover-studio && vite build",
|
|
26
19
|
"test": "echo no test yet",
|
|
27
20
|
"pub:patch": "npm version patch",
|
|
28
21
|
"pub:minor": "npm version minor",
|
|
29
22
|
"pub:major": "npm version major",
|
|
30
|
-
"preversion": "npm test",
|
|
31
|
-
"postversion": "npm publish && git commit -m
|
|
23
|
+
"preversion": "cd wechat-cover-studio && npm test && npm run build",
|
|
24
|
+
"postversion": "npm publish && git commit -m \"chore: publish\" package.json && git push && git push --tags"
|
|
32
25
|
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"class-variance-authority": "^0.7.1",
|
|
40
|
-
"clsx": "^2.1.1",
|
|
41
|
-
"lucide-react": "^0.577.0",
|
|
42
|
-
"nitro": "3.0.260610-beta",
|
|
43
|
-
"react": "^19.2.0",
|
|
44
|
-
"react-dom": "^19.2.0",
|
|
45
|
-
"tailwind-merge": "^3.0.2",
|
|
46
|
-
"tailwindcss": "^4.1.18",
|
|
47
|
-
"tw-animate-css": "^1.3.6"
|
|
48
|
-
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@biomejs/biome": "2.4.5",
|
|
51
|
-
"@tailwindcss/typography": "^0.5.16",
|
|
52
|
-
"@tanstack/devtools-vite": "0.8.5",
|
|
53
|
-
"@tanstack/router-cli": "^1.132.0",
|
|
54
|
-
"@types/node": "^22.10.2",
|
|
55
|
-
"@types/react": "^19.2.0",
|
|
56
|
-
"@types/react-dom": "^19.2.0",
|
|
57
|
-
"@vitejs/plugin-react": "^6.0.1",
|
|
58
|
-
"typescript": "^6.0.2",
|
|
59
|
-
"vite": "^8.0.0"
|
|
60
|
-
},
|
|
61
|
-
"pnpm": {
|
|
62
|
-
"onlyBuiltDependencies": [
|
|
63
|
-
"esbuild",
|
|
64
|
-
"lightningcss"
|
|
65
|
-
]
|
|
26
|
+
"dependencies": {},
|
|
27
|
+
"devDependencies": {},
|
|
28
|
+
"pnpm": {},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/legend80s/wechat-cover-studio-poon-choi.git"
|
|
66
32
|
},
|
|
33
|
+
"homepage": "https://github.com/legend80s/wechat-cover-studio-poon-choi/blob/main/wechat-cover-studio/README.md",
|
|
67
34
|
"keywords": [
|
|
68
35
|
"wechat",
|
|
69
36
|
"cover",
|
|
@@ -74,5 +41,6 @@
|
|
|
74
41
|
"photo-merge",
|
|
75
42
|
"canvas",
|
|
76
43
|
"local-server"
|
|
77
|
-
]
|
|
44
|
+
],
|
|
45
|
+
"license": "ISC"
|
|
78
46
|
}
|