PageSourceSearch

https://xhs-textcard.site/client/constants.js

js xhs-textcard.site collected 2026-09-29 02:44:43 UTC 2,220 bytes, 70 lines download raw bytes

1/**
2 * Constants - 全局几何与导出参数
3 */
4
5// 预览画布的基础尺寸 (3:4 比例)
6export const PREVIEW_WIDTH = 500;
7export const PREVIEW_HEIGHT = 667;
8
9export const PAGE_SIZE_PRESETS = {
10    xhsLong: { label: '小红书长文', width: 500, height: 750, hint: '更接近长文卡片' },
11    xhs: { label: '小红书 3:4', width: 500, height: 667, hint: '适合普通图文笔记' },
12    video: { label: '短视频 9:16', width: 500, height: 889, hint: '适合抖音/视频号竖版' }
13};
14
15export const DEFAULT_CONTENT_TEMPLATE_ID = 'minimalist-magazine';
16export const DEFAULT_PAGE_SIZE_ID = 'xhsLong';
17export const DEFAULT_COVER_TEMPLATE_ID = 'basic';
18
19// 输出图片的高清尺寸 (等比放大)
20export const OUTPUT_WIDTH = 1242;
21export const OUTPUT_HEIGHT = 1656;
22
23// 默认文案
24export const DEFAULT_BRAND_TEXT = '极客狐';
25export const DEFAULT_WATERMARK_OPACITY = 0.1;
26export const DEFAULT_DEBOUNCE_DELAY = 300;
27
28
29export const DEFAULT_COVER_IMAGE = 'https://fastly.picsum.photos/id/718/1000/1334.jpg?hmac=OZSv3X37ToDSUpw8VlxLrA9QoZT3PYWHf0_mCqvf7MU';
30
31export const DEFAULT_COVER_CONFIG = Object.freeze({
32    hasCover: false,
33    coverTemplateId: DEFAULT_COVER_TEMPLATE_ID,
34    coverImage: DEFAULT_COVER_IMAGE,
35    coverFontSize: 48,
36    coverLineHeight: 1.4,
37    hasSocialIcons: false,
38    selectedSocialIcons: [],
39    socialIconPosition: 'top-right'
40});
41
42export const DEFAULT_DOCUMENT_CONFIG = Object.freeze({
43    pageSizeId: DEFAULT_PAGE_SIZE_ID
44});
45
46export function createDefaultSharedConfig() {
47    return {
48        ...DEFAULT_DOCUMENT_CONFIG,
49    };
50}
51
52export function createDefaultCoverConfig() {
53    return {
54        ...DEFAULT_COVER_CONFIG,
55    };
56}
57
58/**
59 * 版本更新日志
60 * version: 语义化版本号,localStorage 用此值判断用户是否已读
61 * items: 更新条目列表
62 */
63export const CHANGELOG = {
64    version: '2026.05.25',
65    items: [
66        { icon: 'fa-file-pdf', text: '新增 PDF 导出:一键将所有页面合并为 PDF 文件' },
67        { icon: 'fa-image', text: '内页背景图:空白、极简杂志、效率笔记模板支持自定义全屏背景' },
68        { icon: 'fa-list-ol', text: '空白模板移至模板列表首位,更易选择' },
69    ]
70};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.