@texonom/nutils 1.1.2 → 1.1.3

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 (56) hide show
  1. package/package.json +3 -3
  2. package/readme.md +3 -3
  3. package/build/src/estimate-page-read-time.d.ts +0 -35
  4. package/build/src/estimate-page-read-time.d.ts.map +0 -1
  5. package/build/src/format-date.d.ts +0 -4
  6. package/build/src/format-date.d.ts.map +0 -1
  7. package/build/src/format-notion-date-time.d.ts +0 -8
  8. package/build/src/format-notion-date-time.d.ts.map +0 -1
  9. package/build/src/get-all-pages-in-space.d.ts +0 -22
  10. package/build/src/get-all-pages-in-space.d.ts.map +0 -1
  11. package/build/src/get-block-collection-id.d.ts +0 -3
  12. package/build/src/get-block-collection-id.d.ts.map +0 -1
  13. package/build/src/get-block-icon.d.ts +0 -3
  14. package/build/src/get-block-icon.d.ts.map +0 -1
  15. package/build/src/get-block-parent-page.d.ts +0 -11
  16. package/build/src/get-block-parent-page.d.ts.map +0 -1
  17. package/build/src/get-block-title.d.ts +0 -3
  18. package/build/src/get-block-title.d.ts.map +0 -1
  19. package/build/src/get-canonical-page-id.d.ts +0 -8
  20. package/build/src/get-canonical-page-id.d.ts.map +0 -1
  21. package/build/src/get-date-value.d.ts +0 -6
  22. package/build/src/get-date-value.d.ts.map +0 -1
  23. package/build/src/get-page-breadcrumbs.d.ts +0 -3
  24. package/build/src/get-page-breadcrumbs.d.ts.map +0 -1
  25. package/build/src/get-page-content-block-ids.d.ts +0 -6
  26. package/build/src/get-page-content-block-ids.d.ts.map +0 -1
  27. package/build/src/get-page-image-urls.d.ts +0 -8
  28. package/build/src/get-page-image-urls.d.ts.map +0 -1
  29. package/build/src/get-page-property.d.ts +0 -16
  30. package/build/src/get-page-property.d.ts.map +0 -1
  31. package/build/src/get-page-table-of-contents.d.ts +0 -13
  32. package/build/src/get-page-table-of-contents.d.ts.map +0 -1
  33. package/build/src/get-page-title.d.ts +0 -3
  34. package/build/src/get-page-title.d.ts.map +0 -1
  35. package/build/src/get-text-content.d.ts +0 -9
  36. package/build/src/get-text-content.d.ts.map +0 -1
  37. package/build/src/id-to-uuid.d.ts +0 -2
  38. package/build/src/id-to-uuid.d.ts.map +0 -1
  39. package/build/src/index.d.ts +0 -25
  40. package/build/src/index.d.ts.map +0 -1
  41. package/build/src/is-url.d.ts +0 -3
  42. package/build/src/is-url.d.ts.map +0 -1
  43. package/build/src/merge-record-maps.d.ts +0 -3
  44. package/build/src/merge-record-maps.d.ts.map +0 -1
  45. package/build/src/normalize-title.d.ts +0 -2
  46. package/build/src/normalize-title.d.ts.map +0 -1
  47. package/build/src/normalize-url.d.ts +0 -2
  48. package/build/src/normalize-url.d.ts.map +0 -1
  49. package/build/src/parse-page-id.d.ts +0 -9
  50. package/build/src/parse-page-id.d.ts.map +0 -1
  51. package/build/src/uuid-to-id.d.ts +0 -2
  52. package/build/src/uuid-to-id.d.ts.map +0 -1
  53. package/build/test/normalize-url.test.d.ts +0 -2
  54. package/build/test/normalize-url.test.d.ts.map +0 -1
  55. package/build/test/parse-page-id.test.d.ts +0 -2
  56. package/build/test/parse-page-id.test.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@texonom/nutils",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "description": "Useful utilities for working with Notion data. Isomorphic.",
6
- "repository": "texonom/notion",
6
+ "repository": "texonom/notion-node",
7
7
  "author": "Alan Jo <sungle3737@gmail.com>",
8
8
  "license": "MIT",
9
9
  "main": "./build/index.js",
@@ -27,7 +27,7 @@
27
27
  "mem": "^9.0.2",
28
28
  "normalize-url": "^8.0.0",
29
29
  "p-queue": "^7.3.4",
30
- "@texonom/ntypes": "^1.1.2"
30
+ "@texonom/ntypes": "^1.1.3"
31
31
  },
32
32
  "standard-version": {
33
33
  "skip": {
package/readme.md CHANGED
@@ -1,12 +1,12 @@
1
1
  <p align="center">
2
- <img alt="React Notion X" src="https://raw.githubusercontent.com/texonom/notion/master/media/notion-ts.png" width="689">
2
+ <img alt="React Notion X" src="https://raw.githubusercontent.com/texonom/notion-node/master/media/notion-ts.png" width="689">
3
3
  </p>
4
4
 
5
5
  # nutils
6
6
 
7
7
  > Useful utilities for working with Notion data. Isomorphic.
8
8
 
9
- [![NPM](https://img.shields.io/npm/v/nutils.svg)](https://www.npmjs.com/package/nutils) [![Build Status](https://github.com/texonom/notion/actions/workflows/test.yml/badge.svg)](https://github.com/texonom/notion/actions/workflows/test.yml) [![Prettier Code Formatting](https://img.shields.io/badge/code_style-prettier-brightgreen.svg)](https://prettier.io)
9
+ [![NPM](https://img.shields.io/npm/v/nutils.svg)](https://www.npmjs.com/package/nutils) [![Build Status](https://github.com/texonom/notion-node/actions/workflows/test.yml/badge.svg)](https://github.com/texonom/notion-node/actions/workflows/test.yml) [![Prettier Code Formatting](https://img.shields.io/badge/code_style-prettier-brightgreen.svg)](https://prettier.io)
10
10
 
11
11
  ## Install
12
12
 
@@ -33,7 +33,7 @@ parsePageId('About-d9ae0c6e7cad49a78e21d240cf2e3d04', { uuid: false })
33
33
 
34
34
  ## Docs
35
35
 
36
- See the [full docs](https://github.com/texonom/notion).
36
+ See the [full docs](https://github.com/texonom/notion-node).
37
37
 
38
38
  ## License
39
39
 
@@ -1,35 +0,0 @@
1
- import { Block, ExtendedRecordMap } from '@texonom/ntypes';
2
- type EstimatePageReadTimeOptions = {
3
- wordsPerMinute?: number;
4
- imageReadTimeInSeconds?: number;
5
- };
6
- type ContentStats = {
7
- numWords: number;
8
- numImages: number;
9
- };
10
- type PageReadTimeEstimate = ContentStats & {
11
- totalWordsReadTimeInMinutes: number;
12
- totalImageReadTimeInMinutes: number;
13
- totalReadTimeInMinutes: number;
14
- };
15
- /**
16
- * Returns an estimate for the time it would take for a person to read the content
17
- * in the given Notion page.
18
- *
19
- * Uses Medium for inspiration.
20
- *
21
- * @see https://blog.medium.com/read-time-and-you-bc2048ab620c
22
- * @see https://github.com/ngryman/reading-time
23
- *
24
- * TODO: handle non-english content.
25
- */
26
- export declare function estimatePageReadTime(block: Block, recordMap: ExtendedRecordMap, { wordsPerMinute, imageReadTimeInSeconds }?: EstimatePageReadTimeOptions): PageReadTimeEstimate;
27
- /**
28
- * Same as `estimatePageReadTime`, except it returns the total time estimate as
29
- * a human-readable string.
30
- *
31
- * For example, "9 minutes" or "less than a minute".
32
- */
33
- export declare function estimatePageReadTimeAsHumanizedString(block: Block, recordMap: ExtendedRecordMap, opts: EstimatePageReadTimeOptions): string;
34
- export {};
35
- //# sourceMappingURL=estimate-page-read-time.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"estimate-page-read-time.d.ts","sourceRoot":"","sources":["../../src/estimate-page-read-time.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAa,MAAM,iBAAiB,CAAA;AAKrE,KAAK,2BAA2B,GAAG;IACjC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,KAAK,oBAAoB,GAAG,YAAY,GAAG;IACzC,2BAA2B,EAAE,MAAM,CAAA;IACnC,2BAA2B,EAAE,MAAM,CAAA;IACnC,sBAAsB,EAAE,MAAM,CAAA;CAC/B,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,iBAAiB,EAC5B,EAAE,cAAoB,EAAE,sBAA2B,EAAE,GAAE,2BAAgC,GACtF,oBAAoB,CAiBtB;AAED;;;;;GAKG;AACH,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,iBAAiB,EAC5B,IAAI,EAAE,2BAA2B,UAIlC"}
@@ -1,4 +0,0 @@
1
- export declare const formatDate: (input: string | number, { month }?: {
2
- month?: 'long' | 'short';
3
- }) => string;
4
- //# sourceMappingURL=format-date.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-date.d.ts","sourceRoot":"","sources":["../../src/format-date.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,MAAM;YAAiC,MAAM,GAAG,OAAO;YAIjG,CAAA"}
@@ -1,8 +0,0 @@
1
- export interface NotionDateTime {
2
- type: 'datetime';
3
- start_date: string;
4
- start_time?: string;
5
- time_zone?: string;
6
- }
7
- export declare const formatNotionDateTime: (datetime: NotionDateTime) => string;
8
- //# sourceMappingURL=format-notion-date-time.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-notion-date-time.d.ts","sourceRoot":"","sources":["../../src/format-notion-date-time.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,oBAAoB,aAAc,cAAc,WAG5D,CAAA"}
@@ -1,22 +0,0 @@
1
- import { ExtendedRecordMap, PageMap } from '@texonom/ntypes';
2
- /**
3
- * Performs a traversal over a given Notion workspace starting from a seed page.
4
- *
5
- * Returns a map containing all of the pages that are reachable from the seed
6
- * page in the space.
7
- *
8
- * If `rootSpaceId` is not defined, the space ID of the root page will be used
9
- * to scope traversal.
10
- *
11
- *
12
- * @param rootPageId - Page ID to start from.
13
- * @param rootSpaceId - Space ID to scope traversal.
14
- * @param getPage - Function used to fetch a single page.
15
- * @param opts - Optional config
16
- */
17
- export declare function getAllPagesInSpace(rootPageId: string, rootSpaceId: string | undefined, getPage: (pageId: string) => Promise<ExtendedRecordMap>, { concurrency, traverseCollections, targetPageId }?: {
18
- concurrency?: number;
19
- traverseCollections?: boolean;
20
- targetPageId?: string;
21
- }): Promise<PageMap>;
22
- //# sourceMappingURL=get-all-pages-in-space.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-all-pages-in-space.d.ts","sourceRoot":"","sources":["../../src/get-all-pages-in-space.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAK5D;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,EACvD,EACE,WAAe,EACf,mBAA0B,EAC1B,YAAmB,EACpB,GAAE;IACD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAA;CACjB,GACL,OAAO,CAAC,OAAO,CAAC,CAiElB"}
@@ -1,3 +0,0 @@
1
- import { Block, ExtendedRecordMap } from '@texonom/ntypes';
2
- export declare function getBlockCollectionId(block: Block, recordMap: ExtendedRecordMap): string | null;
3
- //# sourceMappingURL=get-block-collection-id.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-block-collection-id.d.ts","sourceRoot":"","sources":["../../src/get-block-collection-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAe9F"}
@@ -1,3 +0,0 @@
1
- import { Block, ExtendedRecordMap } from '@texonom/ntypes';
2
- export declare function getBlockIcon(block: Block, recordMap: ExtendedRecordMap): string;
3
- //# sourceMappingURL=get-block-icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-block-icon.d.ts","sourceRoot":"","sources":["../../src/get-block-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAa,MAAM,iBAAiB,CAAA;AAIrE,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,UAatE"}
@@ -1,11 +0,0 @@
1
- import * as types from '@texonom/ntypes';
2
- /**
3
- * Returns the parent page block containing a given page.
4
- *
5
- * Note that many times this will not be the direct parent block since
6
- * some non-page content blocks can contain sub-blocks.
7
- */
8
- export declare const getBlockParentPage: (block: types.Block, recordMap: types.ExtendedRecordMap, { inclusive }?: {
9
- inclusive?: boolean;
10
- }) => types.PageBlock | null;
11
- //# sourceMappingURL=get-block-parent-page.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-block-parent-page.d.ts","sourceRoot":"","sources":["../../src/get-block-parent-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA;AAExC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,UACtB,MAAM,KAAK,aACP,MAAM,iBAAiB;gBAIpB,OAAO;MAEpB,MAAM,SAAS,GAAG,IAqBpB,CAAA"}
@@ -1,3 +0,0 @@
1
- import { Block, ExtendedRecordMap } from '@texonom/ntypes';
2
- export declare function getBlockTitle(block: Block, recordMap: ExtendedRecordMap): string;
3
- //# sourceMappingURL=get-block-title.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-block-title.d.ts","sourceRoot":"","sources":["../../src/get-block-title.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAK1D,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,UAcvE"}
@@ -1,8 +0,0 @@
1
- import { ExtendedRecordMap } from '@texonom/ntypes';
2
- /**
3
- * Gets the canonical, display-friendly version of a page's ID for use in URLs.
4
- */
5
- export declare const getCanonicalPageId: (pageId: string, recordMap: ExtendedRecordMap, { uuid }?: {
6
- uuid?: boolean;
7
- }) => string | null;
8
- //# sourceMappingURL=get-canonical-page-id.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-canonical-page-id.d.ts","sourceRoot":"","sources":["../../src/get-canonical-page-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAOnD;;GAEG;AACH,eAAO,MAAM,kBAAkB,WACrB,MAAM,aACH,iBAAiB;WACF,OAAO;MAChC,MAAM,GAAG,IAkBX,CAAA"}
@@ -1,6 +0,0 @@
1
- import * as types from '@texonom/ntypes';
2
- /**
3
- * Attempts to find a valid date from a given property.
4
- */
5
- export declare const getDateValue: (prop: any[]) => types.FormattedDate | null;
6
- //# sourceMappingURL=get-date-value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-date-value.d.ts","sourceRoot":"","sources":["../../src/get-date-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,GAAG,EAAE,KAAG,MAAM,aAAa,GAAG,IAUhE,CAAA"}
@@ -1,3 +0,0 @@
1
- import * as types from '@texonom/ntypes';
2
- export declare const getPageBreadcrumbs: (recordMap: types.ExtendedRecordMap, activePageId: string) => Array<any> | null;
3
- //# sourceMappingURL=get-page-breadcrumbs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-page-breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/get-page-breadcrumbs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA;AAMxC,eAAO,MAAM,kBAAkB,cAAe,MAAM,iBAAiB,gBAAgB,MAAM,KAAG,MAAM,GAAG,CAAC,GAAG,IAoC1G,CAAA"}
@@ -1,6 +0,0 @@
1
- import * as types from '@texonom/ntypes';
2
- /**
3
- * Gets the IDs of all blocks contained on a page starting from a root block ID.
4
- */
5
- export declare const getPageContentBlockIds: (recordMap: types.ExtendedRecordMap, blockId?: string) => string[];
6
- //# sourceMappingURL=get-page-content-block-ids.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-page-content-block-ids.d.ts","sourceRoot":"","sources":["../../src/get-page-content-block-ids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,sBAAsB,cAAe,MAAM,iBAAiB,YAAY,MAAM,KAAG,MAAM,EA+CnG,CAAA"}
@@ -1,8 +0,0 @@
1
- import * as types from '@texonom/ntypes';
2
- /**
3
- * Gets URLs of all images contained on the given page.
4
- */
5
- export declare const getPageImageUrls: (recordMap: types.ExtendedRecordMap, { mapImageUrl }: {
6
- mapImageUrl: (url: string, block: types.Block) => string | null;
7
- }) => string[];
8
- //# sourceMappingURL=get-page-image-urls.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-page-image-urls.d.ts","sourceRoot":"","sources":["../../src/get-page-image-urls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA;AAKxC;;GAEG;AACH,eAAO,MAAM,gBAAgB,cAChB,MAAM,iBAAiB;uBAIb,MAAM,SAAS,MAAM,KAAK,KAAK,MAAM,GAAG,IAAI;MAEhE,MAAM,EA8DR,CAAA"}
@@ -1,16 +0,0 @@
1
- import { Block, ExtendedRecordMap } from '@texonom/ntypes';
2
- /**
3
- * Gets the value of a collection property for a given page (collection item).
4
- *
5
- * @param propertyName property name
6
- * @param block Page block, often be first block in blockMap
7
- * @param recordMap
8
- * @returns - The return value types will follow the following principles:
9
- * 1. if property is date type, it will return `number` or `number[]`(depends on `End Date` switch)
10
- * 2. property is text-like will return `string`
11
- * 3. multi select property will return `string[]`
12
- * 4. checkbox property return `boolean`
13
- * @todo complete all no-text property type
14
- */
15
- export declare function getPageProperty<T = string | number | boolean | string[] | number[]>(propertyName: string, block: Block, recordMap: ExtendedRecordMap): T;
16
- //# sourceMappingURL=get-page-property.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-page-property.d.ts","sourceRoot":"","sources":["../../src/get-page-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAItE;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,EACjF,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,iBAAiB,GAC3B,CAAC,CAAA"}
@@ -1,13 +0,0 @@
1
- import * as types from '@texonom/ntypes';
2
- export interface TableOfContentsEntry {
3
- id: types.ID;
4
- type: types.BlockType;
5
- text: string;
6
- indentLevel: number;
7
- }
8
- /**
9
- * Gets the metadata for a table of contents block by parsing the page's
10
- * H1, H2, and H3 elements.
11
- */
12
- export declare const getPageTableOfContents: (page: types.PageBlock, recordMap: types.ExtendedRecordMap) => Array<TableOfContentsEntry>;
13
- //# sourceMappingURL=get-page-table-of-contents.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-page-table-of-contents.d.ts","sourceRoot":"","sources":["../../src/get-page-table-of-contents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA;AAIxC,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAQD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,SAC3B,MAAM,SAAS,aACV,MAAM,iBAAiB,KACjC,MAAM,oBAAoB,CAyD5B,CAAA"}
@@ -1,3 +0,0 @@
1
- import { ExtendedRecordMap } from '@texonom/ntypes';
2
- export declare function getPageTitle(recordMap: ExtendedRecordMap): string;
3
- //# sourceMappingURL=get-page-title.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-page-title.d.ts","sourceRoot":"","sources":["../../src/get-page-title.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAInD,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB,UAMxD"}
@@ -1,9 +0,0 @@
1
- import * as types from '@texonom/ntypes';
2
- /**
3
- * Gets the raw, unformatted text content of a block's content value.
4
- *
5
- * This is useful, for instance, for extracting a block's `title` without any
6
- * rich text formatting.
7
- */
8
- export declare const getTextContent: (text?: types.Decoration[]) => string;
9
- //# sourceMappingURL=get-text-content.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-text-content.d.ts","sourceRoot":"","sources":["../../src/get-text-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA;AAExC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,UAAW,MAAM,UAAU,EAAE,KAAG,MAK1D,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const idToUuid: (id?: string) => string;
2
- //# sourceMappingURL=id-to-uuid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"id-to-uuid.d.ts","sourceRoot":"","sources":["../../src/id-to-uuid.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,yBAC6E,CAAA"}
@@ -1,25 +0,0 @@
1
- export * from './get-text-content';
2
- export * from './get-block-title';
3
- export * from './get-block-icon';
4
- export * from './get-block-collection-id';
5
- export * from './get-page-title';
6
- export * from './get-page-property';
7
- export * from './get-date-value';
8
- export * from './get-block-parent-page';
9
- export * from './get-page-table-of-contents';
10
- export * from './get-page-content-block-ids';
11
- export * from './parse-page-id';
12
- export * from './id-to-uuid';
13
- export * from './uuid-to-id';
14
- export * from './get-all-pages-in-space';
15
- export * from './get-canonical-page-id';
16
- export * from './get-page-breadcrumbs';
17
- export * from './get-page-image-urls';
18
- export * from './is-url';
19
- export * from './normalize-url';
20
- export * from './normalize-title';
21
- export * from './merge-record-maps';
22
- export * from './format-date';
23
- export * from './format-notion-date-time';
24
- export * from './estimate-page-read-time';
25
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA;AACzC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA"}
@@ -1,3 +0,0 @@
1
- import isUrl from 'is-url-superb';
2
- export { isUrl };
3
- //# sourceMappingURL=is-url.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-url.d.ts","sourceRoot":"","sources":["../../src/is-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,eAAe,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -1,3 +0,0 @@
1
- import { ExtendedRecordMap } from '@texonom/ntypes';
2
- export declare function mergeRecordMaps(recordMapA: ExtendedRecordMap, recordMapB: ExtendedRecordMap): ExtendedRecordMap;
3
- //# sourceMappingURL=merge-record-maps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"merge-record-maps.d.ts","sourceRoot":"","sources":["../../src/merge-record-maps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,wBAAgB,eAAe,CAAC,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,iBAAiB,CAiC/G"}
@@ -1,2 +0,0 @@
1
- export declare const normalizeTitle: (title?: string | null) => string;
2
- //# sourceMappingURL=normalize-title.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize-title.d.ts","sourceRoot":"","sources":["../../src/normalize-title.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,WAAY,MAAM,GAAG,IAAI,KAAG,MAStD,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const normalizeUrl: (url?: string) => string;
2
- //# sourceMappingURL=normalize-url.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize-url.d.ts","sourceRoot":"","sources":["../../src/normalize-url.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,SAAc,MAAM,WAsB3C,CAAA"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Robustly extracts the notion page ID from a notion URL or pathname suffix.
3
- *
4
- * Defaults to returning a UUID (with dashes).
5
- */
6
- export declare const parsePageId: (id?: string | null, { uuid }?: {
7
- uuid?: boolean;
8
- }) => string;
9
- //# sourceMappingURL=parse-page-id.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-page-id.d.ts","sourceRoot":"","sources":["../../src/parse-page-id.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAQ,MAAM,GAAG,IAAI;WAAiC,OAAO;YAYpF,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const uuidToId: (uuid: string) => string;
2
- //# sourceMappingURL=uuid-to-id.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uuid-to-id.d.ts","sourceRoot":"","sources":["../../src/uuid-to-id.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,SAAU,MAAM,WAA2B,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=normalize-url.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize-url.test.d.ts","sourceRoot":"","sources":["../../test/normalize-url.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=parse-page-id.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-page-id.test.d.ts","sourceRoot":"","sources":["../../test/parse-page-id.test.ts"],"names":[],"mappings":""}