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.
Files changed (33) hide show
  1. package/dist/exporter/api.js +7 -4
  2. package/dist/exporter/api.js.map +1 -1
  3. package/dist/exporter/blocks.js +19 -8
  4. package/dist/exporter/blocks.js.map +1 -1
  5. package/dist/exporter/files.js +31 -11
  6. package/dist/exporter/files.js.map +1 -1
  7. package/dist/exporter/page.js +7 -3
  8. package/dist/exporter/page.js.map +1 -1
  9. package/dist/exporter/variables.d.ts +1 -0
  10. package/dist/exporter/variables.js +1 -0
  11. package/dist/exporter/variables.js.map +1 -1
  12. package/dist/ui/cjs/index.js +10 -6
  13. package/dist/ui/cjs/index.js.map +1 -1
  14. package/dist/ui/cjs/types/exporter/variables.d.ts +1 -0
  15. package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +2 -1
  16. package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +6 -0
  17. package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/index.d.ts +2 -2
  18. package/dist/ui/esm/index.js +10 -7
  19. package/dist/ui/esm/index.js.map +1 -1
  20. package/dist/ui/esm/types/exporter/variables.d.ts +1 -0
  21. package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +2 -1
  22. package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +6 -0
  23. package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/index.d.ts +2 -2
  24. package/dist/ui/styles/notionate-dark.css +7 -0
  25. package/dist/ui/styles/page.css +1 -5
  26. package/dist/ui/types.d.ts +8 -1
  27. package/dist/ui/umd/index.js +10 -6
  28. package/dist/ui/umd/index.js.map +1 -1
  29. package/dist/ui/umd/types/exporter/variables.d.ts +1 -0
  30. package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +2 -1
  31. package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +6 -0
  32. package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/index.d.ts +2 -2
  33. 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 };
@@ -90,6 +90,13 @@
90
90
  background-color: rgba(255, 255, 255, 0.055);
91
91
  }
92
92
 
93
+ .notionate-blocks-breadcrumb-a {
94
+ color: #ddd;
95
+ }
96
+ .notionate-blocks-breadcrumb-a:hover {
97
+ background-color: rgb(37, 37, 37);
98
+ }
99
+
93
100
  .notionate-blocks-callout {
94
101
  background-color: rgb(37, 37, 37);
95
102
  }
@@ -90,9 +90,6 @@
90
90
  }
91
91
 
92
92
  /* breadcrumb */
93
- .notionate-blocks-breadcrumb {
94
- padding-left: .5rem;
95
- }
96
93
  .notionate-blocks-breadcrumb-a {
97
94
  text-decoration: none;
98
95
  color: #333;
@@ -101,8 +98,7 @@
101
98
  border-radius: 4px;
102
99
  }
103
100
  .notionate-blocks-breadcrumb-a:hover {
104
- color: #666;
105
- background-color: #fff;
101
+ background-color: rgba(55, 53, 47, 0.08);
106
102
  cursor: pointer;
107
103
  }
108
104
  .notionate-blocks-breadcrumb-icon {
@@ -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 };
@@ -19344,16 +19344,20 @@
19344
19344
  }
19345
19345
  return (React.createElement("span", { className: "notionate-blocks-breadcrumb-a" }, children));
19346
19346
  };
19347
- var BreadcrumbBlock = function (_a) {
19348
- var block = _a.block, link = _a.link, hrefs = _a.hrefs, query = _a.query;
19349
- var max = block.list.length;
19350
- return (React.createElement("div", { className: "notionate-blocks-breadcrumb" }, block.list.map(function (v, i) { return (React.createElement(React.Fragment, null,
19351
- React.createElement(BreadcrumbLink, { key: "crumb-".concat(i), breadcrumb: v, href: hrefs === undefined ? undefined : hrefs[i], link: link, query: query },
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
+ 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;
@@ -19872,7 +19876,6 @@
19872
19876
  case 'callout':
19873
19877
  return React.createElement(CalloutBlock, { block: block, key: block.id });
19874
19878
  case 'child_database':
19875
- console.log("debug: ".concat(block.type), block);
19876
19879
  return React.createElement(ChildDatabaseBlock, { block: block, href: href, link: link, query: query, key: block.id });
19877
19880
  case 'child_page':
19878
19881
  return React.createElement(ChildPageBlock, { block: block, href: href, link: link, key: block.id });
@@ -19985,6 +19988,7 @@
19985
19988
 
19986
19989
  exports.BookmarkBlock = BookmarkBlock;
19987
19990
  exports.BreadcrumbBlock = BreadcrumbBlock;
19991
+ exports.Breadcrumbs = Breadcrumbs;
19988
19992
  exports.BuildPlainTextByPage = BuildPlainTextByPage;
19989
19993
  exports.BulletedListBlocks = BulletedListBlocks;
19990
19994
  exports.CalloutBlock = CalloutBlock;