rotion 0.0.4 → 0.0.5

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 (39) hide show
  1. package/dist/exporter/blocks.js +4 -1
  2. package/dist/exporter/blocks.js.map +1 -1
  3. package/dist/exporter/breadcrumbs.d.ts +2 -7
  4. package/dist/exporter/breadcrumbs.js +91 -82
  5. package/dist/exporter/breadcrumbs.js.map +1 -1
  6. package/dist/exporter/types.d.ts +9 -1
  7. package/dist/ui/cjs/index.js +28 -12
  8. package/dist/ui/cjs/index.js.map +1 -1
  9. package/dist/ui/cjs/types/exporter/breadcrumbs.d.ts +2 -7
  10. package/dist/ui/cjs/types/exporter/types.d.ts +9 -1
  11. package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +1 -1
  12. package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +16 -2
  13. package/dist/ui/cjs/types/ui/components/Page/Page.d.ts +1 -1
  14. package/dist/ui/cjs/types/ui/components/Page/Page.types.d.ts +1 -0
  15. package/dist/ui/cjs/types/ui/components/Page/PageHandler.d.ts +1 -1
  16. package/dist/ui/cjs/types/ui/components/Page/PageHandler.types.d.ts +1 -0
  17. package/dist/ui/esm/index.js +28 -12
  18. package/dist/ui/esm/index.js.map +1 -1
  19. package/dist/ui/esm/types/exporter/breadcrumbs.d.ts +2 -7
  20. package/dist/ui/esm/types/exporter/types.d.ts +9 -1
  21. package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +1 -1
  22. package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +16 -2
  23. package/dist/ui/esm/types/ui/components/Page/Page.d.ts +1 -1
  24. package/dist/ui/esm/types/ui/components/Page/Page.types.d.ts +1 -0
  25. package/dist/ui/esm/types/ui/components/Page/PageHandler.d.ts +1 -1
  26. package/dist/ui/esm/types/ui/components/Page/PageHandler.types.d.ts +1 -0
  27. package/dist/ui/styles/page.css +26 -0
  28. package/dist/ui/types.d.ts +17 -5
  29. package/dist/ui/umd/index.js +28 -12
  30. package/dist/ui/umd/index.js.map +1 -1
  31. package/dist/ui/umd/types/exporter/breadcrumbs.d.ts +2 -7
  32. package/dist/ui/umd/types/exporter/types.d.ts +9 -1
  33. package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +1 -1
  34. package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +16 -2
  35. package/dist/ui/umd/types/ui/components/Page/Page.d.ts +1 -1
  36. package/dist/ui/umd/types/ui/components/Page/Page.types.d.ts +1 -0
  37. package/dist/ui/umd/types/ui/components/Page/PageHandler.d.ts +1 -1
  38. package/dist/ui/umd/types/ui/components/Page/PageHandler.types.d.ts +1 -0
  39. package/package.json +1 -1
@@ -1,12 +1,7 @@
1
- import type { MentionIcon } from './types.js';
1
+ import type { Breadcrumb } from './types.js';
2
2
  export interface FetchBreadcrumbsProps {
3
3
  type: 'page_id' | 'database_id' | 'block_id' | 'workspace';
4
4
  id: string;
5
5
  limit?: number;
6
6
  }
7
- export type BreadcrumbsIcon = MentionIcon;
8
- export interface Breadcrumbs {
9
- name: string;
10
- icon: BreadcrumbsIcon;
11
- }
12
- export declare const FetchBreadcrumbs: ({ type, id, limit }: FetchBreadcrumbsProps) => Promise<Breadcrumbs[]>;
7
+ export declare const FetchBreadcrumbs: ({ type, id, limit }: FetchBreadcrumbsProps) => Promise<Breadcrumb[]>;
@@ -208,7 +208,15 @@ export type ParagraphBlockObjectResponseEx = ParagraphBlockObjectResponse & {
208
208
  color: SelectColor;
209
209
  };
210
210
  };
211
- export type BlockObjectResponse = ParagraphBlockObjectResponseEx | Heading1BlockObjectResponse | Heading2BlockObjectResponse | Heading3BlockObjectResponse | BulletedListItemBlockObjectResponseEx | NumberedListItemBlockObjectResponseEx | QuoteBlockObjectResponse | ToDoBlockObjectResponse | ToggleBlockObjectResponseEx | TemplateBlockObjectResponse | SyncedBlockBlockObjectResponse | ChildPageBlockObjectResponseEx | ChildDatabaseBlockObjectResponseEx | EquationBlockObjectResponse | CodeBlockObjectResponse | CalloutBlockObjectResponseEx | DividerBlockObjectResponse | BreadcrumbBlockObjectResponse | TableOfContentsBlockObjectResponse | ColumnListBlockObjectResponseEx | ColumnBlockObjectResponse | LinkToPageBlockObjectResponse | TableBlockObjectResponseEx | TableRowBlockObjectResponse | EmbedBlockObjectResponseEx | BookmarkBlockObjectResponseEx | ImageBlockObjectResponseEx | VideoBlockObjectResponseEx | PdfBlockObjectResponse | FileBlockObjectResponse | AudioBlockObjectResponse | LinkPreviewBlockObjectResponse | UnsupportedBlockObjectResponse;
211
+ export type Breadcrumb = {
212
+ id: string;
213
+ name: string;
214
+ icon: MentionIcon;
215
+ };
216
+ export type BreadcrumbBlockObjectResponseEx = BreadcrumbBlockObjectResponse & {
217
+ list: Breadcrumb[];
218
+ };
219
+ export type BlockObjectResponse = ParagraphBlockObjectResponseEx | Heading1BlockObjectResponse | Heading2BlockObjectResponse | Heading3BlockObjectResponse | BulletedListItemBlockObjectResponseEx | NumberedListItemBlockObjectResponseEx | QuoteBlockObjectResponse | ToDoBlockObjectResponse | ToggleBlockObjectResponseEx | TemplateBlockObjectResponse | SyncedBlockBlockObjectResponse | ChildPageBlockObjectResponseEx | ChildDatabaseBlockObjectResponseEx | EquationBlockObjectResponse | CodeBlockObjectResponse | CalloutBlockObjectResponseEx | DividerBlockObjectResponse | BreadcrumbBlockObjectResponseEx | TableOfContentsBlockObjectResponse | ColumnListBlockObjectResponseEx | ColumnBlockObjectResponse | LinkToPageBlockObjectResponse | TableBlockObjectResponseEx | TableRowBlockObjectResponse | EmbedBlockObjectResponseEx | BookmarkBlockObjectResponseEx | ImageBlockObjectResponseEx | VideoBlockObjectResponseEx | PdfBlockObjectResponse | FileBlockObjectResponse | AudioBlockObjectResponse | LinkPreviewBlockObjectResponse | UnsupportedBlockObjectResponse;
212
220
  export type ListBlockChildrenResponseEx = ListBlockChildrenResponse & {
213
221
  results: Array<BlockObjectResponse>;
214
222
  children?: ListBlockChildrenResponse;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { BreadcrumbBlockProps } from './BreadcrumbBlock.types';
3
- declare const BreadcrumbBlock: ({ block }: BreadcrumbBlockProps) => React.JSX.Element;
3
+ declare const BreadcrumbBlock: ({ block, link, hrefs, query }: BreadcrumbBlockProps) => React.JSX.Element;
4
4
  export default BreadcrumbBlock;
@@ -1,4 +1,18 @@
1
- import type { BreadcrumbBlockObjectResponse } from '../../../../exporter';
1
+ /// <reference types="node" />
2
+ import type { ReactNode } from 'react';
3
+ import type { ParsedUrlQueryInput } from 'node:querystring';
4
+ import type { Link } from '../../types';
5
+ import type { Breadcrumb, BreadcrumbBlockObjectResponseEx } from '../../../../exporter';
6
+ export interface BreadcrumbLinkProps {
7
+ breadcrumb: Breadcrumb;
8
+ link?: Link;
9
+ href?: string;
10
+ query?: ParsedUrlQueryInput;
11
+ children?: ReactNode;
12
+ }
2
13
  export interface BreadcrumbBlockProps {
3
- block: BreadcrumbBlockObjectResponse;
14
+ block: BreadcrumbBlockObjectResponseEx;
15
+ link?: Link;
16
+ hrefs?: string[];
17
+ query?: ParsedUrlQueryInput;
4
18
  }
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { PageProps } from './Page.types';
3
- export declare const Page: ({ blocks, href, link, query, modules }: PageProps) => React.JSX.Element;
3
+ export declare const Page: ({ blocks, href, link, query, modules, breadcrumb_hrefs }: PageProps) => React.JSX.Element;
4
4
  export default Page;
@@ -8,6 +8,7 @@ export interface PageProps {
8
8
  link?: Link;
9
9
  query?: ParsedUrlQueryInput;
10
10
  modules?: ExternalModules;
11
+ breadcrumb_hrefs?: string[];
11
12
  }
12
13
  export interface ListType {
13
14
  [key: string]: string;
@@ -11,5 +11,5 @@ export declare const blockType: {
11
11
  code: string;
12
12
  quote: string;
13
13
  };
14
- export declare const PageHandler: ({ block, href, link, query, modules }: HandlerProps) => React.JSX.Element;
14
+ export declare const PageHandler: ({ block, href, link, query, modules, breadcrumb_hrefs }: HandlerProps) => React.JSX.Element;
15
15
  export default PageHandler;
@@ -8,4 +8,5 @@ export interface HandlerProps {
8
8
  link?: Link;
9
9
  query?: ParsedUrlQueryInput;
10
10
  modules?: ExternalModules;
11
+ breadcrumb_hrefs?: string[];
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rotion",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "license": "MIT",
5
5
  "repository": "linyows/rotion",
6
6
  "description": "This is react components that uses the notion API to display the notion's database and page.",