@ubean/seo 0.4.4 → 0.4.6

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.
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * 约定文件类型标识。每个标识映射到 srcDir 下的一个固定文件名和输出 URL。
4
4
  */
5
- type SeoConventionKind = 'sitemap' | 'robots' | 'manifest' | 'opengraph-image' | 'icon' | 'apple-icon';
6
- interface SeoConventionDescriptor {
5
+ export type SeoConventionKind = 'sitemap' | 'robots' | 'manifest' | 'opengraph-image' | 'icon' | 'apple-icon';
6
+ export interface SeoConventionDescriptor {
7
7
  kind: SeoConventionKind;
8
8
  /** srcDir 下的相对文件名(不含扩展名后缀,会尝试 .ts/.js/.mjs/.mts) */
9
9
  fileName: string;
@@ -14,23 +14,23 @@ interface SeoConventionDescriptor {
14
14
  /** 默认 `Cache-Control` */
15
15
  cacheControl: string;
16
16
  }
17
- declare const SEO_CONVENTIONS: readonly SeoConventionDescriptor[];
17
+ export declare const SEO_CONVENTIONS: readonly SeoConventionDescriptor[];
18
18
  /**
19
19
  * 注册约定文件所需的最小 app 接口。`UbeanApp` 满足此接口,
20
20
  * 但为避免 `@ubean/seo` → `@ubean/app` 的硬依赖(后者已经依赖前者的兄弟包),
21
21
  * 此处用结构类型解耦。
22
22
  */
23
- interface SeoConventionApp {
23
+ export interface SeoConventionApp {
24
24
  get(path: string, ...handlers: Array<(c: SeoConventionContext) => unknown>): unknown;
25
25
  }
26
- interface SeoConventionContext {
26
+ export interface SeoConventionContext {
27
27
  req: {
28
28
  method: string;
29
29
  path: string;
30
30
  url: string;
31
31
  };
32
32
  }
33
- interface RegisterSeoConventionsOptions {
33
+ export interface RegisterSeoConventionsOptions {
34
34
  /**
35
35
  * 项目 srcDir 绝对路径或相对 cwd 的路径。约定文件会在该目录根下查找。
36
36
  */
@@ -57,14 +57,14 @@ interface LoadedConvention {
57
57
  * 在 srcDir 下查找约定文件。返回已加载的 `{ descriptor, filePath, handler }` 列表;
58
58
  * 不存在的文件被静默跳过。
59
59
  */
60
- declare function discoverSeoConventions(options: RegisterSeoConventionsOptions): Promise<LoadedConvention[]>;
60
+ export declare function discoverSeoConventions(options: RegisterSeoConventionsOptions): Promise<LoadedConvention[]>;
61
61
  /** Map `sitemap.ts` / `/src/robots.js` to a convention kind. */
62
- declare function conventionKindFromPath(filePath: string): SeoConventionKind | undefined;
62
+ export declare function conventionKindFromPath(filePath: string): SeoConventionKind | undefined;
63
63
  /**
64
64
  * Register convention handlers already loaded (production `import.meta.glob`).
65
65
  * Keys may be absolute or vite-style paths; the basename selects the kind.
66
66
  */
67
- declare function registerSeoConventionModules(app: SeoConventionApp, modules: Record<string, {
67
+ export declare function registerSeoConventionModules(app: SeoConventionApp, modules: Record<string, {
68
68
  default?: unknown;
69
69
  }>): Promise<SeoConventionKind[]>;
70
70
  /**
@@ -76,11 +76,10 @@ declare function registerSeoConventionModules(app: SeoConventionApp, modules: Re
76
76
  *
77
77
  * @returns 已注册的约定 kind 列表(便于日志/调试)
78
78
  */
79
- declare function registerSeoConventions(app: SeoConventionApp, options: RegisterSeoConventionsOptions): Promise<SeoConventionKind[]>;
79
+ export declare function registerSeoConventions(app: SeoConventionApp, options: RegisterSeoConventionsOptions): Promise<SeoConventionKind[]>;
80
80
  /**
81
81
  * 列出 srcDir 下存在的约定文件 kind(不加载)。用于在不启动 app 的情况下
82
82
  * 检测项目使用了哪些约定(例如 CLI 信息展示)。
83
83
  */
84
- declare function listSeoConventions(options: Pick<RegisterSeoConventionsOptions, 'srcDir' | 'extensions'>): SeoConventionKind[];
85
- //#endregion
86
- export { RegisterSeoConventionsOptions, SEO_CONVENTIONS, SeoConventionApp, SeoConventionContext, SeoConventionDescriptor, SeoConventionKind, conventionKindFromPath, discoverSeoConventions, listSeoConventions, registerSeoConventionModules, registerSeoConventions };
84
+ export declare function listSeoConventions(options: Pick<RegisterSeoConventionsOptions, 'srcDir' | 'extensions'>): SeoConventionKind[];
85
+ //#endregion
package/dist/index.d.ts CHANGED
@@ -1,25 +1,25 @@
1
1
  import { JsonLdInput, JsonLdSchema, defineJsonLd, mergeJsonLd, renderJsonLdScript, renderJsonLdScripts, schemaOrg, useSchemaOrg } from "./json-ld.js";
2
2
  import { UseSeoMetaInput } from "@unhead/vue";
3
3
  //#region src/index.d.ts
4
- interface RobotsOptions {
4
+ export interface RobotsOptions {
5
5
  userAgent?: string;
6
6
  allow?: string | string[];
7
7
  disallow?: string | string[];
8
8
  sitemap?: string | string[];
9
9
  crawlDelay?: number;
10
10
  }
11
- interface SitemapUrl {
11
+ export interface SitemapUrl {
12
12
  loc: string;
13
13
  lastmod?: string | Date;
14
14
  changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
15
15
  priority?: number;
16
16
  }
17
- interface MetaTag {
17
+ export interface MetaTag {
18
18
  name?: string;
19
19
  property?: string;
20
20
  content: string;
21
21
  }
22
- interface LinkTag {
22
+ export interface LinkTag {
23
23
  rel: string;
24
24
  href: string;
25
25
  hreflang?: string;
@@ -29,7 +29,7 @@ interface LinkTag {
29
29
  as?: string;
30
30
  crossorigin?: '' | 'anonymous' | 'use-credentials';
31
31
  }
32
- interface OpenGraphMeta {
32
+ export interface OpenGraphMeta {
33
33
  title?: string;
34
34
  description?: string;
35
35
  type?: 'website' | 'article' | 'book' | 'profile' | 'music.song' | 'music.album' | 'video.movie';
@@ -39,14 +39,14 @@ interface OpenGraphMeta {
39
39
  locale?: string;
40
40
  localeAlternate?: string[];
41
41
  }
42
- interface OGImage {
42
+ export interface OGImage {
43
43
  url: string;
44
44
  width?: number;
45
45
  height?: number;
46
46
  alt?: string;
47
47
  type?: string;
48
48
  }
49
- interface TwitterMeta {
49
+ export interface TwitterMeta {
50
50
  card?: 'summary' | 'summary_large_image' | 'app' | 'player';
51
51
  site?: string;
52
52
  creator?: string;
@@ -54,7 +54,7 @@ interface TwitterMeta {
54
54
  description?: string;
55
55
  image?: string;
56
56
  }
57
- interface SeoMetadata {
57
+ export interface SeoMetadata {
58
58
  title?: string;
59
59
  titleTemplate?: string | ((title: string) => string);
60
60
  description?: string;
@@ -72,13 +72,13 @@ interface SeoMetadata {
72
72
  htmlAttrs?: Record<string, string>;
73
73
  bodyAttrs?: Record<string, string>;
74
74
  }
75
- interface ManifestIcon {
75
+ export interface ManifestIcon {
76
76
  src: string;
77
77
  sizes: string;
78
78
  type: string;
79
79
  purpose?: string;
80
80
  }
81
- interface WebAppManifest {
81
+ export interface WebAppManifest {
82
82
  name?: string;
83
83
  short_name?: string;
84
84
  description?: string;
@@ -92,20 +92,20 @@ interface WebAppManifest {
92
92
  lang?: string;
93
93
  dir?: 'ltr' | 'rtl' | 'auto';
94
94
  }
95
- declare function useSeoMeta<T extends Record<string, any>>(meta: T): T;
95
+ export declare function useSeoMeta<T extends Record<string, any>>(meta: T): T;
96
96
  /**
97
97
  * 对 meta tag 数组去重(后定义覆盖先定义)。
98
98
  * 同 `name` 或同 `property` 的 tag 仅保留最后一个;无 name/property 的保留全部。
99
99
  * 不修改入参数组,返回新数组。
100
100
  */
101
- declare function dedupeMetaTags(tags: MetaTag[]): MetaTag[];
101
+ export declare function dedupeMetaTags(tags: MetaTag[]): MetaTag[];
102
102
  /**
103
103
  * 对 link tag 数组去重(后定义覆盖先定义)。
104
104
  * 同 `rel`(+hreflang+type+sizes)的 link 仅保留最后一个;无 rel 的保留全部。
105
105
  * 不修改入参数组,返回新数组。
106
106
  */
107
- declare function dedupeLinkTags(tags: LinkTag[]): LinkTag[];
108
- declare function mergeMetadata(...metadatas: (SeoMetadata | undefined | null)[]): SeoMetadata;
107
+ export declare function dedupeLinkTags(tags: LinkTag[]): LinkTag[];
108
+ export declare function mergeMetadata(...metadatas: (SeoMetadata | undefined | null)[]): SeoMetadata;
109
109
  /**
110
110
  * 按"全局 → 布局 → 页面"优先级合并 SEO metadata(Task 8)。
111
111
  * 页面级覆盖布局级,布局级覆盖全局级;`meta`/`link` 数组自动去重(last-wins)。
@@ -113,19 +113,19 @@ declare function mergeMetadata(...metadatas: (SeoMetadata | undefined | null)[])
113
113
  * 与 `mergeMetadata` 的关系:`mergeSeoLayers(g, l, p)` 等价于
114
114
  * `mergeMetadata(g, l, p)`,仅以命名参数显式表达三层优先级,便于阅读。
115
115
  */
116
- declare function mergeSeoLayers(global?: SeoMetadata | null, layout?: SeoMetadata | null, page?: SeoMetadata | null): SeoMetadata;
117
- declare function buildMetaTags(meta: SeoMetadata): MetaTag[];
118
- declare function buildLinkTags(meta: SeoMetadata): LinkTag[];
119
- declare function buildTitle(meta: SeoMetadata, fallbackTitle?: string): string;
120
- declare function renderHeadTags(meta: SeoMetadata, fallbackTitle?: string): string;
121
- declare function createManifestResponse(manifest: WebAppManifest): Response;
122
- declare function defineManifest(manifest: WebAppManifest): WebAppManifest;
116
+ export declare function mergeSeoLayers(global?: SeoMetadata | null, layout?: SeoMetadata | null, page?: SeoMetadata | null): SeoMetadata;
117
+ export declare function buildMetaTags(meta: SeoMetadata): MetaTag[];
118
+ export declare function buildLinkTags(meta: SeoMetadata): LinkTag[];
119
+ export declare function buildTitle(meta: SeoMetadata, fallbackTitle?: string): string;
120
+ export declare function renderHeadTags(meta: SeoMetadata, fallbackTitle?: string): string;
121
+ export declare function createManifestResponse(manifest: WebAppManifest): Response;
122
+ export declare function defineManifest(manifest: WebAppManifest): WebAppManifest;
123
123
  declare function formatRobotsTxt(options: RobotsOptions[] | RobotsOptions): string;
124
124
  declare function escapeXml(str: string): string;
125
125
  declare function formatSitemapXml(urls: SitemapUrl[]): string;
126
- declare function createRobotsResponse(options: RobotsOptions[] | RobotsOptions): Response;
127
- declare function createSitemapResponse(urls: SitemapUrl[]): Response;
128
- declare function defineRobotsConfig(config: RobotsOptions[] | RobotsOptions): RobotsOptions[] | RobotsOptions;
129
- declare function defineSitemapConfig(urls: SitemapUrl[] | (() => SitemapUrl[] | Promise<SitemapUrl[]>)): SitemapUrl[] | (() => SitemapUrl[] | Promise<SitemapUrl[]>);
126
+ export declare function createRobotsResponse(options: RobotsOptions[] | RobotsOptions): Response;
127
+ export declare function createSitemapResponse(urls: SitemapUrl[]): Response;
128
+ export declare function defineRobotsConfig(config: RobotsOptions[] | RobotsOptions): RobotsOptions[] | RobotsOptions;
129
+ export declare function defineSitemapConfig(urls: SitemapUrl[] | (() => SitemapUrl[] | Promise<SitemapUrl[]>)): SitemapUrl[] | (() => SitemapUrl[] | Promise<SitemapUrl[]>);
130
130
  //#endregion
131
- export { JsonLdInput, JsonLdSchema, LinkTag, ManifestIcon, MetaTag, OGImage, OpenGraphMeta, RobotsOptions, SeoMetadata, SitemapUrl, TwitterMeta, type UseSeoMetaInput, WebAppManifest, buildLinkTags, buildMetaTags, buildTitle, createManifestResponse, createRobotsResponse, createSitemapResponse, dedupeLinkTags, dedupeMetaTags, defineJsonLd, defineManifest, defineRobotsConfig, defineSitemapConfig, escapeXml, formatRobotsTxt, formatSitemapXml, mergeJsonLd, mergeMetadata, mergeSeoLayers, renderHeadTags, renderJsonLdScript, renderJsonLdScripts, schemaOrg, useSchemaOrg, useSeoMeta };
131
+ export { JsonLdInput, JsonLdSchema, type UseSeoMetaInput, defineJsonLd, escapeXml, formatRobotsTxt, formatSitemapXml, mergeJsonLd, renderJsonLdScript, renderJsonLdScripts, schemaOrg, useSchemaOrg };
package/dist/json-ld.d.ts CHANGED
@@ -19,11 +19,11 @@
19
19
  /**
20
20
  * 任意 JSON-LD 节点。必须是可序列化对象,通常包含 `@context` 和 `@type`。
21
21
  */
22
- type JsonLdSchema = Record<string, unknown>;
22
+ export type JsonLdSchema = Record<string, unknown>;
23
23
  /**
24
24
  * JSON-LD schema 输入:可以是对象、对象数组,或返回对象/数组的函数。
25
25
  */
26
- type JsonLdInput = JsonLdSchema | JsonLdSchema[] | (() => JsonLdSchema | JsonLdSchema[] | Promise<JsonLdSchema | JsonLdSchema[]>);
26
+ export type JsonLdInput = JsonLdSchema | JsonLdSchema[] | (() => JsonLdSchema | JsonLdSchema[] | Promise<JsonLdSchema | JsonLdSchema[]>);
27
27
  /**
28
28
  * 渲染为 `<script type="application/ld+json">` HTML 字符串。
29
29
  *
@@ -37,13 +37,13 @@ type JsonLdInput = JsonLdSchema | JsonLdSchema[] | (() => JsonLdSchema | JsonLdS
37
37
  * // => <script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"ubean"}</script>
38
38
  * ```
39
39
  */
40
- declare function renderJsonLdScript(schema: JsonLdSchema | JsonLdSchema[]): string;
40
+ export declare function renderJsonLdScript(schema: JsonLdSchema | JsonLdSchema[]): string;
41
41
  /**
42
42
  * 把多个 JSON-LD schema 合并为 `@graph` 数组(对齐 schema.org 推荐做法)。
43
43
  *
44
44
  * 若输入只有一个 schema,直接返回(避免不必要的 @graph 包装)。
45
45
  */
46
- declare function mergeJsonLd(schemas: JsonLdSchema[]): JsonLdSchema | JsonLdSchema[];
46
+ export declare function mergeJsonLd(schemas: JsonLdSchema[]): JsonLdSchema | JsonLdSchema[];
47
47
  /**
48
48
  * 定义一个 JSON-LD schema(纯函数,无副作用)。
49
49
  *
@@ -59,7 +59,7 @@ declare function mergeJsonLd(schemas: JsonLdSchema[]): JsonLdSchema | JsonLdSche
59
59
  * renderJsonLdScript(org)
60
60
  * ```
61
61
  */
62
- declare function defineJsonLd(schema: JsonLdInput): JsonLdInput;
62
+ export declare function defineJsonLd(schema: JsonLdInput): JsonLdInput;
63
63
  /**
64
64
  * Vue composable:把 JSON-LD schema 注入到 head(通过 `useHead`)。
65
65
  *
@@ -77,15 +77,15 @@ declare function defineJsonLd(schema: JsonLdInput): JsonLdInput;
77
77
  * </script>
78
78
  * ```
79
79
  */
80
- declare function useSchemaOrg(schema: JsonLdInput): JsonLdInput;
80
+ export declare function useSchemaOrg(schema: JsonLdInput): JsonLdInput;
81
81
  /**
82
82
  * 把多个 JSON-LD schema 渲染为 `<script>` 标签数组(SSR 用)。
83
83
  */
84
- declare function renderJsonLdScripts(schemas: JsonLdSchema[]): string;
84
+ export declare function renderJsonLdScripts(schemas: JsonLdSchema[]): string;
85
85
  /**
86
86
  * 常见 Schema.org 类型的便捷工厂函数(覆盖 80% 用例)。
87
87
  */
88
- declare const schemaOrg: {
88
+ export declare const schemaOrg: {
89
89
  organization(options: {
90
90
  name: string;
91
91
  url?: string;
@@ -118,5 +118,4 @@ declare const schemaOrg: {
118
118
  availability?: "InStock" | "OutOfStock" | "PreOrder";
119
119
  }): JsonLdSchema;
120
120
  };
121
- //#endregion
122
- export { JsonLdInput, JsonLdSchema, defineJsonLd, mergeJsonLd, renderJsonLdScript, renderJsonLdScripts, schemaOrg, useSchemaOrg };
121
+ //#endregion
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * 形状与 React.createElement 返回值兼容:`{ type, props: { children, style, ... } }`。
7
7
  */
8
- interface SatoriNode {
8
+ export interface SatoriNode {
9
9
  type: string;
10
10
  props: {
11
11
  children?: SatoriNode | SatoriNode[] | string;
@@ -16,7 +16,7 @@ interface SatoriNode {
16
16
  /**
17
17
  * Satori 字体描述符。
18
18
  */
19
- interface SatoriFont {
19
+ export interface SatoriFont {
20
20
  name: string;
21
21
  data: ArrayBuffer | Buffer;
22
22
  weight?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
@@ -25,7 +25,7 @@ interface SatoriFont {
25
25
  /**
26
26
  * `ImageResponse` / `renderOgImage` 共享的渲染选项。
27
27
  */
28
- interface OgImageOptions {
28
+ export interface OgImageOptions {
29
29
  /** 图像宽度(px)。默认 1200。 */
30
30
  width?: number;
31
31
  /** 图像高度(px)。默认 630。 */
@@ -56,7 +56,7 @@ interface OgImageOptions {
56
56
  /**
57
57
  * 内置模板的输入参数。
58
58
  */
59
- interface OgTemplateInput {
59
+ export interface OgTemplateInput {
60
60
  /** 主标题(必填)。 */
61
61
  title: string;
62
62
  /** 副标题/描述。 */
@@ -77,11 +77,11 @@ interface OgTemplateInput {
77
77
  *
78
78
  * 在生产环境建议使用 `loadFontFromFile()` 加载本地字体,避免运行时网络依赖。
79
79
  */
80
- declare const DEFAULT_FONT_URL = "https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2";
80
+ export declare const DEFAULT_FONT_URL = "https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2";
81
81
  /**
82
82
  * 默认字体名。
83
83
  */
84
- declare const DEFAULT_FONT_NAME = "Inter";
84
+ export declare const DEFAULT_FONT_NAME = "Inter";
85
85
  /**
86
86
  * 从 URL 加载字体(返回 Satori 兼容的 `SatoriFont`)。
87
87
  *
@@ -90,7 +90,7 @@ declare const DEFAULT_FONT_NAME = "Inter";
90
90
  * const font = await loadFontFromUrl('https://fonts.gstatic.com/.../inter.woff2', 'Inter');
91
91
  * ```
92
92
  */
93
- declare function loadFontFromUrl(url: string, name: string, weight?: SatoriFont['weight'], fontStyle?: SatoriFont['style']): Promise<SatoriFont>;
93
+ export declare function loadFontFromUrl(url: string, name: string, weight?: SatoriFont['weight'], fontStyle?: SatoriFont['style']): Promise<SatoriFont>;
94
94
  /**
95
95
  * 从本地文件加载字体。
96
96
  *
@@ -99,24 +99,24 @@ declare function loadFontFromUrl(url: string, name: string, weight?: SatoriFont[
99
99
  * const font = loadFontFromFile('./fonts/inter-regular.woff2', 'Inter');
100
100
  * ```
101
101
  */
102
- declare function loadFontFromFile(path: string, name: string, weight?: SatoriFont['weight'], fontStyle?: SatoriFont['style']): SatoriFont;
102
+ export declare function loadFontFromFile(path: string, name: string, weight?: SatoriFont['weight'], fontStyle?: SatoriFont['style']): SatoriFont;
103
103
  /**
104
104
  * 加载默认字体(Inter Regular,从 Google Fonts CDN 拉取)。
105
105
  *
106
106
  * 注意:此函数依赖网络访问。Cloudflare Workers 等边缘环境需要 fetch API 可用。
107
107
  * 离线/生产环境推荐用 `loadFontFromFile()` 替代。
108
108
  */
109
- declare function loadDefaultFont(): Promise<SatoriFont>;
109
+ export declare function loadDefaultFont(): Promise<SatoriFont>;
110
110
  /**
111
111
  * 默认 OG 图模板:渐变背景 + 居中标题 + 副标题 + 底部站点名。
112
112
  *
113
113
  * 返回 Satori 兼容的 VDOM 树。
114
114
  */
115
- declare function defaultTemplate(input: OgTemplateInput): SatoriNode;
115
+ export declare function defaultTemplate(input: OgTemplateInput): SatoriNode;
116
116
  /**
117
117
  * 文章模板:左对齐标题 + 日期/作者元信息。
118
118
  */
119
- declare function articleTemplate(input: OgTemplateInput & {
119
+ export declare function articleTemplate(input: OgTemplateInput & {
120
120
  author?: string;
121
121
  date?: string;
122
122
  }): SatoriNode;
@@ -125,13 +125,13 @@ declare function articleTemplate(input: OgTemplateInput & {
125
125
  *
126
126
  * `percent` 为负数调暗,正数调亮。范围 -100..100。
127
127
  */
128
- declare function shadeColor(hex: string, percent: number): string;
128
+ export declare function shadeColor(hex: string, percent: number): string;
129
129
  /**
130
130
  * 把 Satori VDOM 节点渲染为 PNG Buffer(或 SVG 字符串,当 `svgOnly: true` 时)。
131
131
  *
132
132
  * @returns `{ body, contentType }` —— body 为 Buffer/字符串,contentType 为 MIME 类型
133
133
  */
134
- declare function renderToImage(node: SatoriNode, options?: OgImageOptions): Promise<{
134
+ export declare function renderToImage(node: SatoriNode, options?: OgImageOptions): Promise<{
135
135
  body: Buffer | string;
136
136
  contentType: string;
137
137
  }>;
@@ -164,7 +164,7 @@ declare function renderToImage(node: SatoriNode, options?: OgImageOptions): Prom
164
164
  * }
165
165
  * ```
166
166
  */
167
- declare class ImageResponse extends Response {
167
+ export declare class ImageResponse extends Response {
168
168
  constructor(node: SatoriNode, options?: OgImageOptions);
169
169
  }
170
170
  /**
@@ -179,11 +179,11 @@ declare class ImageResponse extends Response {
179
179
  * });
180
180
  * ```
181
181
  */
182
- declare function renderOgImage(input: OgTemplateInput, options?: OgImageOptions): Promise<Response>;
182
+ export declare function renderOgImage(input: OgTemplateInput, options?: OgImageOptions): Promise<Response>;
183
183
  /**
184
184
  * 用文章模板渲染 OG 图。
185
185
  */
186
- declare function renderArticleOgImage(input: OgTemplateInput & {
186
+ export declare function renderArticleOgImage(input: OgTemplateInput & {
187
187
  author?: string;
188
188
  date?: string;
189
189
  }, options?: OgImageOptions): Promise<Response>;
@@ -191,6 +191,5 @@ declare function renderArticleOgImage(input: OgTemplateInput & {
191
191
  * 检测运行时是否安装了 OG 图渲染所需的依赖。
192
192
  * 用于在不实际渲染的情况下判断能力可用性(例如 DevTools 信息展示)。
193
193
  */
194
- declare function isOgImageSupported(): Promise<boolean>;
195
- //#endregion
196
- export { DEFAULT_FONT_NAME, DEFAULT_FONT_URL, ImageResponse, OgImageOptions, OgTemplateInput, SatoriFont, SatoriNode, articleTemplate, defaultTemplate, isOgImageSupported, loadDefaultFont, loadFontFromFile, loadFontFromUrl, renderArticleOgImage, renderOgImage, renderToImage, shadeColor };
194
+ export declare function isOgImageSupported(): Promise<boolean>;
195
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubean/seo",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "SEO utilities for ubean (useSeoMeta, robots, sitemap, manifest, file conventions, JSON-LD, OG image)",
5
5
  "files": [
6
6
  "dist"
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^26.5.0",
36
- "typescript": "7.0.2",
37
- "vite-plus": "0.3.0"
36
+ "typescript": "npm:typescript-native-bridge@latest",
37
+ "vite-plus": "0.3.1"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@resvg/resvg-js": "^2.6.0",