rotion 0.0.6 → 0.0.8
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/api.js +7 -4
- package/dist/exporter/api.js.map +1 -1
- package/dist/exporter/blocks.js +19 -8
- package/dist/exporter/blocks.js.map +1 -1
- package/dist/exporter/files.js +31 -11
- package/dist/exporter/files.js.map +1 -1
- package/dist/exporter/page.js +7 -3
- package/dist/exporter/page.js.map +1 -1
- package/dist/exporter/variables.d.ts +1 -0
- package/dist/exporter/variables.js +1 -0
- package/dist/exporter/variables.js.map +1 -1
- package/dist/ui/cjs/index.js +10 -6
- package/dist/ui/cjs/index.js.map +1 -1
- package/dist/ui/cjs/types/exporter/variables.d.ts +1 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +2 -1
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/index.d.ts +2 -2
- package/dist/ui/esm/index.js +10 -7
- package/dist/ui/esm/index.js.map +1 -1
- package/dist/ui/esm/types/exporter/variables.d.ts +1 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +2 -1
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/index.d.ts +2 -2
- package/dist/ui/styles/notionate-dark.css +7 -0
- package/dist/ui/styles/page.css +1 -5
- package/dist/ui/types.d.ts +8 -1
- package/dist/ui/umd/index.js +10 -6
- package/dist/ui/umd/index.js.map +1 -1
- package/dist/ui/umd/types/exporter/variables.d.ts +1 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +2 -1
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export declare const docRoot: string;
|
|
|
7
7
|
export declare const imageDir: string;
|
|
8
8
|
export declare const timeout: number;
|
|
9
9
|
export declare const webpQuality: number;
|
|
10
|
+
export declare const debug: boolean;
|
|
10
11
|
export declare const httpOptions: {
|
|
11
12
|
timeout: number;
|
|
12
13
|
headers: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { BreadcrumbBlockProps } from './BreadcrumbBlock.types';
|
|
2
|
+
import type { BreadcrumbBlockProps, BreadcrumbsProps } from './BreadcrumbBlock.types';
|
|
3
|
+
export declare const Breadcrumbs: ({ list, link, hrefs, query }: BreadcrumbsProps) => React.JSX.Element;
|
|
3
4
|
declare const BreadcrumbBlock: ({ block, link, hrefs, query }: BreadcrumbBlockProps) => React.JSX.Element;
|
|
4
5
|
export default BreadcrumbBlock;
|
|
@@ -10,6 +10,12 @@ export interface BreadcrumbLinkProps {
|
|
|
10
10
|
query?: ParsedUrlQueryInput;
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
}
|
|
13
|
+
export interface BreadcrumbsProps {
|
|
14
|
+
list: Breadcrumb[];
|
|
15
|
+
link?: Link;
|
|
16
|
+
hrefs?: string[];
|
|
17
|
+
query?: ParsedUrlQueryInput;
|
|
18
|
+
}
|
|
13
19
|
export interface BreadcrumbBlockProps {
|
|
14
20
|
block: BreadcrumbBlockObjectResponseEx;
|
|
15
21
|
link?: Link;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import BreadcrumbBlock from './BreadcrumbBlock';
|
|
2
|
-
export { BreadcrumbBlock };
|
|
1
|
+
import BreadcrumbBlock, { Breadcrumbs } from './BreadcrumbBlock';
|
|
2
|
+
export { BreadcrumbBlock, Breadcrumbs };
|
package/dist/ui/esm/index.js
CHANGED
|
@@ -19340,16 +19340,20 @@ var BreadcrumbLink = function (_a) {
|
|
|
19340
19340
|
}
|
|
19341
19341
|
return (React.createElement("span", { className: "notionate-blocks-breadcrumb-a" }, children));
|
|
19342
19342
|
};
|
|
19343
|
-
var
|
|
19344
|
-
var
|
|
19345
|
-
var max =
|
|
19346
|
-
return (React.createElement("div", { className: "notionate-blocks-breadcrumb" },
|
|
19347
|
-
React.createElement(BreadcrumbLink, {
|
|
19343
|
+
var Breadcrumbs = function (_a) {
|
|
19344
|
+
var list = _a.list, link = _a.link, hrefs = _a.hrefs, query = _a.query;
|
|
19345
|
+
var max = list.length;
|
|
19346
|
+
return (React.createElement("div", { className: "notionate-blocks-breadcrumb" }, list.map(function (v, i) { return (React.createElement("span", { key: "crumb-".concat(i) },
|
|
19347
|
+
React.createElement(BreadcrumbLink, { breadcrumb: v, href: hrefs === undefined ? undefined : hrefs[i], link: link, query: query },
|
|
19348
19348
|
v.icon.type === 'emoji' && React.createElement("span", { className: "notionate-blocks-breadcrumb-emoji" }, v.icon.emoji),
|
|
19349
19349
|
v.icon.type !== 'emoji' && React.createElement("img", { className: "notionate-blocks-breadcrumb-icon", src: v.icon.src, width: 20, height: 20, alt: v.name }),
|
|
19350
19350
|
React.createElement("span", { className: "notionate-blocks-breadcrumb-title" }, v.name)),
|
|
19351
19351
|
i + 1 < max && React.createElement("span", { className: "notionate-blocks-breadcrumb-slash" }, "/"))); })));
|
|
19352
19352
|
};
|
|
19353
|
+
var BreadcrumbBlock = function (_a) {
|
|
19354
|
+
var block = _a.block, link = _a.link, hrefs = _a.hrefs, query = _a.query;
|
|
19355
|
+
return React.createElement(Breadcrumbs, { list: block.list, link: link, hrefs: hrefs, query: query });
|
|
19356
|
+
};
|
|
19353
19357
|
|
|
19354
19358
|
var BulletedListBlocks = function (_a) {
|
|
19355
19359
|
var _b;
|
|
@@ -19868,7 +19872,6 @@ var PageHandler = function (_a) {
|
|
|
19868
19872
|
case 'callout':
|
|
19869
19873
|
return React.createElement(CalloutBlock, { block: block, key: block.id });
|
|
19870
19874
|
case 'child_database':
|
|
19871
|
-
console.log("debug: ".concat(block.type), block);
|
|
19872
19875
|
return React.createElement(ChildDatabaseBlock, { block: block, href: href, link: link, query: query, key: block.id });
|
|
19873
19876
|
case 'child_page':
|
|
19874
19877
|
return React.createElement(ChildPageBlock, { block: block, href: href, link: link, key: block.id });
|
|
@@ -19979,5 +19982,5 @@ var Page = function (_a) {
|
|
|
19979
19982
|
return (React.createElement("div", { className: "notionate-blocks" }, children));
|
|
19980
19983
|
};
|
|
19981
19984
|
|
|
19982
|
-
export { BookmarkBlock, BreadcrumbBlock, BuildPlainTextByPage, BulletedListBlocks, CalloutBlock, ChildDatabaseBlock, ChildPageBlock, CodeBlock, ColumnListBlock, EmbedBlock, EquationBlock, FileBlock, Gallery, GalleryCard, GalleryCheckboxField, GalleryDateField, GalleryMultiSelectField, GalleryNumberField, GalleryRichTextField, GalleryTitleField, GalleryUrlField, ImageBlock, LinkPreviewBlock, List, ListBlock, ListCheckboxField, ListDateField, ListMultiSelectField, ListNumberField, ListRichTextField, ListTitleField, ListUrlField, NumberedListBlocks, Page, PageIcon, PdfBlock, RichText, SyncedBlock, Table, TableBlock, TableCheckboxField, TableDateField, TableIcon, TableMultiSelectField, TableNumberField, TableOfContentsBlock, TableRichTextField, TableSelectField, TableTitleField, TableUrlField, TemplateBlock, TextBlock, ToDoBlock, ToggleBlock, UsePagination, VideoBlock, getLinkPathAndLinkKey, pathBasename, queryToString };
|
|
19985
|
+
export { BookmarkBlock, BreadcrumbBlock, Breadcrumbs, BuildPlainTextByPage, BulletedListBlocks, CalloutBlock, ChildDatabaseBlock, ChildPageBlock, CodeBlock, ColumnListBlock, EmbedBlock, EquationBlock, FileBlock, Gallery, GalleryCard, GalleryCheckboxField, GalleryDateField, GalleryMultiSelectField, GalleryNumberField, GalleryRichTextField, GalleryTitleField, GalleryUrlField, ImageBlock, LinkPreviewBlock, List, ListBlock, ListCheckboxField, ListDateField, ListMultiSelectField, ListNumberField, ListRichTextField, ListTitleField, ListUrlField, NumberedListBlocks, Page, PageIcon, PdfBlock, RichText, SyncedBlock, Table, TableBlock, TableCheckboxField, TableDateField, TableIcon, TableMultiSelectField, TableNumberField, TableOfContentsBlock, TableRichTextField, TableSelectField, TableTitleField, TableUrlField, TemplateBlock, TextBlock, ToDoBlock, ToggleBlock, UsePagination, VideoBlock, getLinkPathAndLinkKey, pathBasename, queryToString };
|
|
19983
19986
|
//# sourceMappingURL=index.js.map
|