next 15.4.2-canary.17 → 15.4.2-canary.18
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/dist/bin/next +1 -1
- package/dist/build/index.js +19 -29
- package/dist/build/index.js.map +1 -1
- package/dist/build/swc/index.js +1 -1
- package/dist/build/webpack-config.js +2 -2
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/@vercel/og/emoji/index.d.ts +15 -0
- package/dist/compiled/@vercel/og/figma/index.d.ts +7 -0
- package/dist/compiled/@vercel/og/index.edge.d.ts +5 -9
- package/dist/compiled/@vercel/og/index.edge.js +2587 -3024
- package/dist/compiled/@vercel/og/index.node.d.ts +7 -10
- package/dist/compiled/@vercel/og/index.node.js +2585 -3022
- package/dist/compiled/@vercel/og/language/index.d.ts +28 -0
- package/dist/compiled/@vercel/og/og.d.ts +1 -0
- package/dist/compiled/@vercel/og/package.json +1 -1
- package/dist/compiled/@vercel/og/satori/index.d.ts +4 -1
- package/dist/compiled/@vercel/og/types.d.ts +118 -0
- package/dist/compiled/@vercel/og/yoga.wasm +0 -0
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
- package/dist/esm/build/index.js +20 -30
- package/dist/esm/build/index.js.map +1 -1
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/webpack-config.js +2 -2
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/export/routes/app-page.js +4 -2
- package/dist/esm/export/routes/app-page.js.map +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/shared/lib/canary-only.js +1 -1
- package/dist/export/routes/app-page.js +4 -2
- package/dist/export/routes/app-page.js.map +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/shared/lib/canary-only.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
- package/server.d.ts +1 -1
- package/dist/compiled/@vercel/og/types-d38469ff.d.ts +0 -74
@@ -0,0 +1,28 @@
|
|
1
|
+
export declare class FontDetector {
|
2
|
+
private rangesByLang;
|
3
|
+
detect(text: string, fonts: string[]): Promise<{
|
4
|
+
[lang: string]: string;
|
5
|
+
}>;
|
6
|
+
private detectSegment;
|
7
|
+
private load;
|
8
|
+
private addDetectors;
|
9
|
+
}
|
10
|
+
export declare const languageFontMap: {
|
11
|
+
'ja-JP': string;
|
12
|
+
'ko-KR': string;
|
13
|
+
'zh-CN': string;
|
14
|
+
'zh-TW': string;
|
15
|
+
'zh-HK': string;
|
16
|
+
'th-TH': string;
|
17
|
+
'bn-IN': string;
|
18
|
+
'ar-AR': string;
|
19
|
+
'ta-IN': string;
|
20
|
+
'ml-IN': string;
|
21
|
+
'he-IL': string;
|
22
|
+
'te-IN': string;
|
23
|
+
devanagari: string;
|
24
|
+
kannada: string;
|
25
|
+
symbol: string[];
|
26
|
+
math: string;
|
27
|
+
unknown: string;
|
28
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function render(satori: any, resvg: any, opts: any, defaultFonts: any, element: any): Promise<Uint8Array>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
|
+
type Yoga = any;
|
2
3
|
|
3
4
|
declare const code: {
|
4
5
|
readonly 'ja-JP': RegExp;
|
@@ -148,6 +149,8 @@ interface SatoriNode {
|
|
148
149
|
textContent?: string;
|
149
150
|
}
|
150
151
|
|
152
|
+
declare function init(yoga: Yoga): void;
|
153
|
+
|
151
154
|
type SatoriOptions = ({
|
152
155
|
width: number;
|
153
156
|
height: number;
|
@@ -168,4 +171,4 @@ type SatoriOptions = ({
|
|
168
171
|
|
169
172
|
declare function satori(element: ReactNode, options: SatoriOptions): Promise<string>;
|
170
173
|
|
171
|
-
export { FontOptions as Font, FontStyle, Weight as FontWeight, Locale, SatoriNode, SatoriOptions, satori as default };
|
174
|
+
export { FontOptions as Font, FontStyle, Weight as FontWeight, Locale, SatoriNode, SatoriOptions, satori as default, init };
|
@@ -0,0 +1,118 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
/// <reference types="react" />
|
3
|
+
/// <reference types="node" />
|
4
|
+
/// <reference types="node" />
|
5
|
+
import type { SatoriOptions } from "next/dist/compiled/@vercel/og/satori";
|
6
|
+
import type { EmojiType } from './emoji';
|
7
|
+
import type { OutgoingHttpHeader } from 'http';
|
8
|
+
type ImageOptions = {
|
9
|
+
/**
|
10
|
+
* The width of the image.
|
11
|
+
*
|
12
|
+
* @type {number}
|
13
|
+
* @default 1200
|
14
|
+
*/
|
15
|
+
width?: number;
|
16
|
+
/**
|
17
|
+
* The height of the image.
|
18
|
+
*
|
19
|
+
* @type {number}
|
20
|
+
* @default 630
|
21
|
+
*/
|
22
|
+
height?: number;
|
23
|
+
/**
|
24
|
+
* Display debug information on the image.
|
25
|
+
*
|
26
|
+
* @type {boolean}
|
27
|
+
* @default false
|
28
|
+
*/
|
29
|
+
debug?: boolean;
|
30
|
+
/**
|
31
|
+
* A list of fonts to use.
|
32
|
+
*
|
33
|
+
* @type {{ data: ArrayBuffer; name: string; weight?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900; style?: 'normal' | 'italic' }[]}
|
34
|
+
* @default Noto Sans Latin Regular.
|
35
|
+
*/
|
36
|
+
fonts?: SatoriOptions['fonts'];
|
37
|
+
/**
|
38
|
+
* Using a specific Emoji style. Defaults to `twemoji`.
|
39
|
+
*
|
40
|
+
* @type {EmojiType}
|
41
|
+
* @default 'twemoji'
|
42
|
+
*/
|
43
|
+
emoji?: EmojiType;
|
44
|
+
};
|
45
|
+
export type ImageResponseNodeOptions = ImageOptions & {
|
46
|
+
status?: number;
|
47
|
+
statusText?: string;
|
48
|
+
headers?: OutgoingHttpHeader[];
|
49
|
+
};
|
50
|
+
export type ImageResponseOptions = ImageOptions & ConstructorParameters<typeof Response>[1];
|
51
|
+
export interface FigmaImageResponseProps {
|
52
|
+
/**
|
53
|
+
* Link to the Figma template frame.
|
54
|
+
*
|
55
|
+
* You can get the URL in Figma by right-clicking a frame and selecting "Copy link".
|
56
|
+
* @example https://www.figma.com/file/QjGNQixWnhu300e1Xzdl2y/OG-Images?type=design&node-id=11356-2443&mode=design&t=yLROd7ro8mP1PxMY-4
|
57
|
+
*/
|
58
|
+
url: string;
|
59
|
+
/**
|
60
|
+
* A mapping between Figma layer name and the value you want to replace it with.
|
61
|
+
*
|
62
|
+
* @example Sets Figma text layer named "Title" to "How to create OG Images"
|
63
|
+
* ```js
|
64
|
+
* { "Title": "How to create OG Images" }
|
65
|
+
* ```
|
66
|
+
*
|
67
|
+
* @example Sets multiple Figma text layers and provides custom styles
|
68
|
+
* ```js
|
69
|
+
* {
|
70
|
+
* "Title": { value: "How to create OG Images", props: { color: "red", centerHorizontally: true } },
|
71
|
+
* "Description": { value: "A short story", props: { centerHorizontally: true } },
|
72
|
+
* }
|
73
|
+
* ```
|
74
|
+
*
|
75
|
+
* `centerHorizontally` centers text layer horizontally.
|
76
|
+
*/
|
77
|
+
template: Record<string, FigmaComplexTemplate | string>;
|
78
|
+
/**
|
79
|
+
* The font names must match the font names in Figma.
|
80
|
+
*/
|
81
|
+
fonts?: FontOptions[];
|
82
|
+
/**
|
83
|
+
* The same as {@link ImageResponseOptions} except `width` and `height`. `width` and `height` are automatically set from the Figma frame's size.
|
84
|
+
*/
|
85
|
+
imageResponseOptions?: Omit<ImageResponseOptions, 'width' | 'height'>;
|
86
|
+
}
|
87
|
+
export interface FigmaComplexTemplate {
|
88
|
+
value: string;
|
89
|
+
props?: {
|
90
|
+
centerHorizontally?: boolean;
|
91
|
+
} & React.CSSProperties;
|
92
|
+
}
|
93
|
+
type Weight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
94
|
+
type Style = 'normal' | 'italic';
|
95
|
+
interface FontOptions {
|
96
|
+
data: Buffer | ArrayBuffer;
|
97
|
+
name: string;
|
98
|
+
weight?: Weight;
|
99
|
+
style?: Style;
|
100
|
+
lang?: string;
|
101
|
+
}
|
102
|
+
declare module 'react' {
|
103
|
+
interface HTMLAttributes<T> {
|
104
|
+
/**
|
105
|
+
* Specify styles using Tailwind CSS classes. This feature is currently experimental.
|
106
|
+
* If `style` prop is also specified, styles generated with `tw` prop will be overridden.
|
107
|
+
*
|
108
|
+
* Example:
|
109
|
+
* - `tw='w-full h-full bg-blue-200'`
|
110
|
+
* - `tw='text-9xl'`
|
111
|
+
* - `tw='text-[80px]'`
|
112
|
+
*
|
113
|
+
* @type {string}
|
114
|
+
*/
|
115
|
+
tw?: string;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
export {};
|
Binary file
|