rotion 0.0.7 → 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/ui/cjs/index.js +9 -4
- package/dist/ui/cjs/index.js.map +1 -1
- 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 +9 -5
- package/dist/ui/esm/index.js.map +1 -1
- 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/types.d.ts +8 -1
- package/dist/ui/umd/index.js +9 -4
- package/dist/ui/umd/index.js.map +1 -1
- 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
|
@@ -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/types.d.ts
CHANGED
|
@@ -530,6 +530,12 @@ interface BookmarkBlockProps {
|
|
|
530
530
|
|
|
531
531
|
declare const BookmarkBlock: ({ block }: BookmarkBlockProps) => React.JSX.Element;
|
|
532
532
|
|
|
533
|
+
interface BreadcrumbsProps {
|
|
534
|
+
list: Breadcrumb[];
|
|
535
|
+
link?: Link;
|
|
536
|
+
hrefs?: string[];
|
|
537
|
+
query?: ParsedUrlQueryInput;
|
|
538
|
+
}
|
|
533
539
|
interface BreadcrumbBlockProps {
|
|
534
540
|
block: BreadcrumbBlockObjectResponseEx;
|
|
535
541
|
link?: Link;
|
|
@@ -537,6 +543,7 @@ interface BreadcrumbBlockProps {
|
|
|
537
543
|
query?: ParsedUrlQueryInput;
|
|
538
544
|
}
|
|
539
545
|
|
|
546
|
+
declare const Breadcrumbs: ({ list, link, hrefs, query }: BreadcrumbsProps) => React.JSX.Element;
|
|
540
547
|
declare const BreadcrumbBlock: ({ block, link, hrefs, query }: BreadcrumbBlockProps) => React.JSX.Element;
|
|
541
548
|
|
|
542
549
|
interface BulletedListBlocksProps {
|
|
@@ -716,4 +723,4 @@ declare function UsePagination<T>(pages: T[], perPage: number): {
|
|
|
716
723
|
declare function BuildPlainTextByPage(blocks: ListBlockChildrenResponseEx): string;
|
|
717
724
|
declare function pathBasename(str: string): string;
|
|
718
725
|
|
|
719
|
-
export { BookmarkBlock, BreadcrumbBlock, BuildPlainTextByPage, BulletedListBlocks, CalloutBlock, ChildDatabaseBlock, ChildPageBlock, CodeBlock, ColumnListBlock, EmbedBlock, EquationBlock, type ExternalModules, FileBlock, Gallery, GalleryCard, GalleryCheckboxField, GalleryDateField, GalleryMultiSelectField, GalleryNumberField, GalleryRichTextField, GalleryTitleField, GalleryUrlField, ImageBlock, type Link, 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 };
|
|
726
|
+
export { BookmarkBlock, BreadcrumbBlock, Breadcrumbs, BuildPlainTextByPage, BulletedListBlocks, CalloutBlock, ChildDatabaseBlock, ChildPageBlock, CodeBlock, ColumnListBlock, EmbedBlock, EquationBlock, type ExternalModules, FileBlock, Gallery, GalleryCard, GalleryCheckboxField, GalleryDateField, GalleryMultiSelectField, GalleryNumberField, GalleryRichTextField, GalleryTitleField, GalleryUrlField, ImageBlock, type Link, 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 };
|
package/dist/ui/umd/index.js
CHANGED
|
@@ -19344,16 +19344,20 @@
|
|
|
19344
19344
|
}
|
|
19345
19345
|
return (React.createElement("span", { className: "notionate-blocks-breadcrumb-a" }, children));
|
|
19346
19346
|
};
|
|
19347
|
-
var
|
|
19348
|
-
var
|
|
19349
|
-
var max =
|
|
19350
|
-
return (React.createElement("div", { className: "notionate-blocks-breadcrumb" },
|
|
19347
|
+
var Breadcrumbs = function (_a) {
|
|
19348
|
+
var list = _a.list, link = _a.link, hrefs = _a.hrefs, query = _a.query;
|
|
19349
|
+
var max = list.length;
|
|
19350
|
+
return (React.createElement("div", { className: "notionate-blocks-breadcrumb" }, list.map(function (v, i) { return (React.createElement("span", { key: "crumb-".concat(i) },
|
|
19351
19351
|
React.createElement(BreadcrumbLink, { breadcrumb: v, href: hrefs === undefined ? undefined : hrefs[i], link: link, query: query },
|
|
19352
19352
|
v.icon.type === 'emoji' && React.createElement("span", { className: "notionate-blocks-breadcrumb-emoji" }, v.icon.emoji),
|
|
19353
19353
|
v.icon.type !== 'emoji' && React.createElement("img", { className: "notionate-blocks-breadcrumb-icon", src: v.icon.src, width: 20, height: 20, alt: v.name }),
|
|
19354
19354
|
React.createElement("span", { className: "notionate-blocks-breadcrumb-title" }, v.name)),
|
|
19355
19355
|
i + 1 < max && React.createElement("span", { className: "notionate-blocks-breadcrumb-slash" }, "/"))); })));
|
|
19356
19356
|
};
|
|
19357
|
+
var BreadcrumbBlock = function (_a) {
|
|
19358
|
+
var block = _a.block, link = _a.link, hrefs = _a.hrefs, query = _a.query;
|
|
19359
|
+
return React.createElement(Breadcrumbs, { list: block.list, link: link, hrefs: hrefs, query: query });
|
|
19360
|
+
};
|
|
19357
19361
|
|
|
19358
19362
|
var BulletedListBlocks = function (_a) {
|
|
19359
19363
|
var _b;
|
|
@@ -19984,6 +19988,7 @@
|
|
|
19984
19988
|
|
|
19985
19989
|
exports.BookmarkBlock = BookmarkBlock;
|
|
19986
19990
|
exports.BreadcrumbBlock = BreadcrumbBlock;
|
|
19991
|
+
exports.Breadcrumbs = Breadcrumbs;
|
|
19987
19992
|
exports.BuildPlainTextByPage = BuildPlainTextByPage;
|
|
19988
19993
|
exports.BulletedListBlocks = BulletedListBlocks;
|
|
19989
19994
|
exports.CalloutBlock = CalloutBlock;
|