rotion 1.8.0 → 1.10.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/dist/exporter/blocks.js +15 -7
- package/dist/exporter/blocks.js.map +1 -1
- package/dist/exporter/database.js +10 -5
- package/dist/exporter/database.js.map +1 -1
- package/dist/exporter/files.d.ts +3 -8
- package/dist/exporter/files.js +71 -15
- package/dist/exporter/files.js.map +1 -1
- package/dist/exporter/github.js +4 -2
- package/dist/exporter/github.js.map +1 -1
- package/dist/exporter/page.js +8 -4
- package/dist/exporter/page.js.map +1 -1
- package/dist/exporter/types.d.ts +16 -6
- package/dist/ui/cjs/index.js +1 -1
- package/dist/ui/cjs/index.js.map +1 -1
- package/dist/ui/cjs/types/exporter/files.d.ts +3 -8
- package/dist/ui/cjs/types/exporter/types.d.ts +16 -6
- package/dist/ui/esm/index.js +1 -1
- package/dist/ui/esm/index.js.map +1 -1
- package/dist/ui/esm/types/exporter/files.d.ts +3 -8
- package/dist/ui/esm/types/exporter/types.d.ts +16 -6
- package/dist/ui/types.d.ts +12 -7
- package/dist/ui/umd/index.js +1 -1
- package/dist/ui/umd/index.js.map +1 -1
- package/dist/ui/umd/types/exporter/files.d.ts +3 -8
- package/dist/ui/umd/types/exporter/types.d.ts +16 -6
- package/package.json +39 -38
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VideoBlockObjectResponseEx, EmbedBlockObjectResponseEx } from './types.js';
|
|
1
|
+
import type { VideoBlockObjectResponseEx, EmbedBlockObjectResponseEx, HtmlMetadata, ImagePathWithSize } from './types.js';
|
|
2
2
|
export declare const findLocationUrl: (rawHeaders: string[]) => string;
|
|
3
3
|
export declare function getHTTP(reqUrl: string): Promise<string>;
|
|
4
4
|
export declare function getJson<T>(reqUrl: string): Promise<T>;
|
|
@@ -12,19 +12,14 @@ export declare function saveFile(fileUrl: string, prefix: string): Promise<{
|
|
|
12
12
|
src: string;
|
|
13
13
|
size: number;
|
|
14
14
|
}>;
|
|
15
|
-
export declare const saveImage: (imageUrl: string, prefix: string) => Promise<
|
|
15
|
+
export declare const saveImage: (imageUrl: string, prefix: string) => Promise<ImagePathWithSize>;
|
|
16
16
|
export declare const findHtmlByRegexp: (regexps: RegExp[], html: string) => string | null;
|
|
17
17
|
export declare const titleRegexps: RegExp[];
|
|
18
18
|
export declare const descRegexps: RegExp[];
|
|
19
19
|
export declare const imageRegexps: RegExp[];
|
|
20
20
|
export declare const iconRegexps: RegExp[];
|
|
21
21
|
export declare const findImage: (html: string) => string | null;
|
|
22
|
-
export declare const getHtmlMeta: (reqUrl: string, httpFunc?: (reqUrl: string) => Promise<string>) => Promise<
|
|
23
|
-
title: string;
|
|
24
|
-
desc: string;
|
|
25
|
-
image: string;
|
|
26
|
-
icon: string;
|
|
27
|
-
}>;
|
|
22
|
+
export declare const getHtmlMeta: (reqUrl: string, httpFunc?: (reqUrl: string) => Promise<string>) => Promise<HtmlMetadata>;
|
|
28
23
|
export declare const getVideoHtml: (block: VideoBlockObjectResponseEx) => Promise<string>;
|
|
29
24
|
export declare function getSlideshareOembedUrl(reqUrl: string, httpFunc?: (reqUrl: string) => Promise<string>): Promise<string>;
|
|
30
25
|
export declare const getEmbedHtml: (block: EmbedBlockObjectResponseEx) => Promise<string>;
|
|
@@ -81,12 +81,7 @@ export type BookmarkBlockObjectResponseEx = BookmarkBlockObjectResponse & {
|
|
|
81
81
|
bookmark: {
|
|
82
82
|
url: string;
|
|
83
83
|
caption: Array<RichTextItemResponse>;
|
|
84
|
-
site:
|
|
85
|
-
title: string;
|
|
86
|
-
desc: string;
|
|
87
|
-
image: string;
|
|
88
|
-
icon: string;
|
|
89
|
-
};
|
|
84
|
+
site: HtmlMetadata;
|
|
90
85
|
};
|
|
91
86
|
};
|
|
92
87
|
export type CalloutBlockObjectResponseEx = CalloutBlockObjectResponse & {
|
|
@@ -121,6 +116,8 @@ export type ImageBlockObjectResponseEx = ImageBlockObjectResponse & {
|
|
|
121
116
|
};
|
|
122
117
|
caption: Array<RichTextItemResponse>;
|
|
123
118
|
src: string;
|
|
119
|
+
width?: number;
|
|
120
|
+
height?: number;
|
|
124
121
|
} | {
|
|
125
122
|
type: 'file';
|
|
126
123
|
file: {
|
|
@@ -129,6 +126,8 @@ export type ImageBlockObjectResponseEx = ImageBlockObjectResponse & {
|
|
|
129
126
|
};
|
|
130
127
|
caption: Array<RichTextItemResponse>;
|
|
131
128
|
src: string;
|
|
129
|
+
width?: number;
|
|
130
|
+
height?: number;
|
|
132
131
|
};
|
|
133
132
|
};
|
|
134
133
|
export type VideoExternal = {
|
|
@@ -736,3 +735,14 @@ export type LastEditedTimeDatabasePropertyConfigResponse = {
|
|
|
736
735
|
last_edited_time: EmptyObject;
|
|
737
736
|
id: string;
|
|
738
737
|
};
|
|
738
|
+
export type ImagePathWithSize = {
|
|
739
|
+
path: string;
|
|
740
|
+
width?: number;
|
|
741
|
+
height?: number;
|
|
742
|
+
};
|
|
743
|
+
export type HtmlMetadata = {
|
|
744
|
+
title: string;
|
|
745
|
+
desc: string;
|
|
746
|
+
image: string;
|
|
747
|
+
icon: string;
|
|
748
|
+
};
|
package/dist/ui/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { QueryDatabaseResponse, PageObjectResponse, GetPagePropertyResponse, DatabaseObjectResponse, TextRichTextItemResponse, MentionRichTextItemResponse, GetSelfResponse, EquationRichTextItemResponse, ListBlockChildrenResponse, ParagraphBlockObjectResponse, Heading1BlockObjectResponse, Heading2BlockObjectResponse, Heading3BlockObjectResponse, BulletedListItemBlockObjectResponse, NumberedListItemBlockObjectResponse, QuoteBlockObjectResponse, ToDoBlockObjectResponse, ToggleBlockObjectResponse, TemplateBlockObjectResponse, SyncedBlockBlockObjectResponse, ChildPageBlockObjectResponse, ChildDatabaseBlockObjectResponse, EquationBlockObjectResponse, CodeBlockObjectResponse, CalloutBlockObjectResponse, RichTextItemResponse, DividerBlockObjectResponse, BreadcrumbBlockObjectResponse, TableOfContentsBlockObjectResponse, ColumnListBlockObjectResponse, ColumnBlockObjectResponse, LinkToPageBlockObjectResponse, TableBlockObjectResponse, TableRowBlockObjectResponse, EmbedBlockObjectResponse, BookmarkBlockObjectResponse, ImageBlockObjectResponse, VideoBlockObjectResponse, PdfBlockObjectResponse, FileBlockObjectResponse, AudioBlockObjectResponse, LinkPreviewBlockObjectResponse, UnsupportedBlockObjectResponse, GetPageResponse } from '@notionhq/client/build/src/api-endpoints.js';
|
|
3
3
|
import { ParsedUrlQueryInput } from 'node:querystring';
|
|
4
4
|
import { UrlObject } from 'node:url';
|
|
5
5
|
|
|
@@ -71,12 +71,7 @@ type BookmarkBlockObjectResponseEx = BookmarkBlockObjectResponse & {
|
|
|
71
71
|
bookmark: {
|
|
72
72
|
url: string;
|
|
73
73
|
caption: Array<RichTextItemResponse>;
|
|
74
|
-
site:
|
|
75
|
-
title: string;
|
|
76
|
-
desc: string;
|
|
77
|
-
image: string;
|
|
78
|
-
icon: string;
|
|
79
|
-
};
|
|
74
|
+
site: HtmlMetadata;
|
|
80
75
|
};
|
|
81
76
|
};
|
|
82
77
|
type CalloutBlockObjectResponseEx = CalloutBlockObjectResponse & {
|
|
@@ -111,6 +106,8 @@ type ImageBlockObjectResponseEx = ImageBlockObjectResponse & {
|
|
|
111
106
|
};
|
|
112
107
|
caption: Array<RichTextItemResponse>;
|
|
113
108
|
src: string;
|
|
109
|
+
width?: number;
|
|
110
|
+
height?: number;
|
|
114
111
|
} | {
|
|
115
112
|
type: 'file';
|
|
116
113
|
file: {
|
|
@@ -119,6 +116,8 @@ type ImageBlockObjectResponseEx = ImageBlockObjectResponse & {
|
|
|
119
116
|
};
|
|
120
117
|
caption: Array<RichTextItemResponse>;
|
|
121
118
|
src: string;
|
|
119
|
+
width?: number;
|
|
120
|
+
height?: number;
|
|
122
121
|
};
|
|
123
122
|
};
|
|
124
123
|
type VideoExternal = {
|
|
@@ -384,6 +383,12 @@ type QueryDatabaseResponseEx = QueryDatabaseResponse & {
|
|
|
384
383
|
results: Array<PageObjectResponseEx>;
|
|
385
384
|
meta: GetDatabaseResponseEx;
|
|
386
385
|
};
|
|
386
|
+
type HtmlMetadata = {
|
|
387
|
+
title: string;
|
|
388
|
+
desc: string;
|
|
389
|
+
image: string;
|
|
390
|
+
icon: string;
|
|
391
|
+
};
|
|
387
392
|
|
|
388
393
|
interface FetchDatabaseRes extends QueryDatabaseResponseEx {
|
|
389
394
|
}
|