@texonom/nutils 1.1.0

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 (60) hide show
  1. package/build/.tsbuildinfo +1 -0
  2. package/build/index.d.ts +169 -0
  3. package/build/index.js +2 -0
  4. package/build/index.js.map +1 -0
  5. package/build/src/estimate-page-read-time.d.ts +35 -0
  6. package/build/src/estimate-page-read-time.d.ts.map +1 -0
  7. package/build/src/format-date.d.ts +4 -0
  8. package/build/src/format-date.d.ts.map +1 -0
  9. package/build/src/format-notion-date-time.d.ts +8 -0
  10. package/build/src/format-notion-date-time.d.ts.map +1 -0
  11. package/build/src/get-all-pages-in-space.d.ts +22 -0
  12. package/build/src/get-all-pages-in-space.d.ts.map +1 -0
  13. package/build/src/get-block-collection-id.d.ts +3 -0
  14. package/build/src/get-block-collection-id.d.ts.map +1 -0
  15. package/build/src/get-block-icon.d.ts +3 -0
  16. package/build/src/get-block-icon.d.ts.map +1 -0
  17. package/build/src/get-block-parent-page.d.ts +11 -0
  18. package/build/src/get-block-parent-page.d.ts.map +1 -0
  19. package/build/src/get-block-title.d.ts +3 -0
  20. package/build/src/get-block-title.d.ts.map +1 -0
  21. package/build/src/get-canonical-page-id.d.ts +8 -0
  22. package/build/src/get-canonical-page-id.d.ts.map +1 -0
  23. package/build/src/get-date-value.d.ts +6 -0
  24. package/build/src/get-date-value.d.ts.map +1 -0
  25. package/build/src/get-page-breadcrumbs.d.ts +3 -0
  26. package/build/src/get-page-breadcrumbs.d.ts.map +1 -0
  27. package/build/src/get-page-content-block-ids.d.ts +6 -0
  28. package/build/src/get-page-content-block-ids.d.ts.map +1 -0
  29. package/build/src/get-page-image-urls.d.ts +8 -0
  30. package/build/src/get-page-image-urls.d.ts.map +1 -0
  31. package/build/src/get-page-property.d.ts +16 -0
  32. package/build/src/get-page-property.d.ts.map +1 -0
  33. package/build/src/get-page-table-of-contents.d.ts +13 -0
  34. package/build/src/get-page-table-of-contents.d.ts.map +1 -0
  35. package/build/src/get-page-title.d.ts +3 -0
  36. package/build/src/get-page-title.d.ts.map +1 -0
  37. package/build/src/get-text-content.d.ts +9 -0
  38. package/build/src/get-text-content.d.ts.map +1 -0
  39. package/build/src/id-to-uuid.d.ts +2 -0
  40. package/build/src/id-to-uuid.d.ts.map +1 -0
  41. package/build/src/index.d.ts +25 -0
  42. package/build/src/index.d.ts.map +1 -0
  43. package/build/src/is-url.d.ts +3 -0
  44. package/build/src/is-url.d.ts.map +1 -0
  45. package/build/src/merge-record-maps.d.ts +3 -0
  46. package/build/src/merge-record-maps.d.ts.map +1 -0
  47. package/build/src/normalize-title.d.ts +2 -0
  48. package/build/src/normalize-title.d.ts.map +1 -0
  49. package/build/src/normalize-url.d.ts +2 -0
  50. package/build/src/normalize-url.d.ts.map +1 -0
  51. package/build/src/parse-page-id.d.ts +9 -0
  52. package/build/src/parse-page-id.d.ts.map +1 -0
  53. package/build/src/uuid-to-id.d.ts +2 -0
  54. package/build/src/uuid-to-id.d.ts.map +1 -0
  55. package/build/test/normalize-url.test.d.ts +2 -0
  56. package/build/test/normalize-url.test.d.ts.map +1 -0
  57. package/build/test/parse-page-id.test.d.ts +2 -0
  58. package/build/test/parse-page-id.test.d.ts.map +1 -0
  59. package/package.json +46 -0
  60. package/readme.md +42 -0
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../ntypes/build/core.d.ts","../../ntypes/build/block.d.ts","../../ntypes/build/formula.d.ts","../../ntypes/build/user.d.ts","../../ntypes/build/collection.d.ts","../../ntypes/build/collection-view.d.ts","../../ntypes/build/maps.d.ts","../../ntypes/build/api.d.ts","../../ntypes/build/index.d.ts","../src/get-block-collection-id.ts","../src/get-text-content.ts","../src/get-block-title.ts","../src/get-page-table-of-contents.ts","../src/estimate-page-read-time.ts","../src/format-date.ts","../src/format-notion-date-time.ts","../../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.d.ts","../../../node_modules/.pnpm/p-queue@7.3.4/node_modules/p-queue/dist/queue.d.ts","../../../node_modules/.pnpm/p-queue@7.3.4/node_modules/p-queue/dist/options.d.ts","../../../node_modules/.pnpm/p-queue@7.3.4/node_modules/p-queue/dist/priority-queue.d.ts","../../../node_modules/.pnpm/p-queue@7.3.4/node_modules/p-queue/dist/index.d.ts","../src/id-to-uuid.ts","../src/parse-page-id.ts","../src/get-all-pages-in-space.ts","../src/get-block-icon.ts","../src/get-block-parent-page.ts","../src/get-page-property.ts","../src/normalize-title.ts","../src/uuid-to-id.ts","../src/get-canonical-page-id.ts","../src/get-date-value.ts","../src/get-page-breadcrumbs.ts","../src/get-page-content-block-ids.ts","../../../node_modules/.pnpm/is-url-superb@6.1.0/node_modules/is-url-superb/index.d.ts","../src/is-url.ts","../src/get-page-image-urls.ts","../src/get-page-title.ts","../../../node_modules/.pnpm/mem@9.0.2/node_modules/mem/dist/index.d.ts","../../../node_modules/.pnpm/normalize-url@7.2.0/node_modules/normalize-url/index.d.ts","../src/normalize-url.ts","../src/merge-record-maps.ts","../src/index.ts","../../../node_modules/.pnpm/@vitest+utils@0.31.0/node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@0.31.0/node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/types.d.ts","../../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@0.31.0/node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.31.0/node_modules/@vitest/runner/dist/tasks-2a410173.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.31.0/node_modules/@vitest/runner/dist/runner-7aa38127.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.31.0/node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@0.31.0/node_modules/@vitest/snapshot/dist/environment-38cdead3.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@0.31.0/node_modules/@vitest/snapshot/dist/index-6461367c.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@0.31.0/node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/.pnpm/@types+chai@4.3.5/node_modules/@types/chai/index.d.ts","../../../node_modules/.pnpm/@vitest+expect@0.31.0/node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@18.16.7/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/esbuild@0.17.18/node_modules/esbuild/lib/main.d.ts","../../../node_modules/.pnpm/vite@4.3.5_@types+node@18.16.7/node_modules/vite/types/metadata.d.ts","../../../node_modules/.pnpm/vite@4.3.5_@types+node@18.16.7/node_modules/vite/types/hmrpayload.d.ts","../../../node_modules/.pnpm/vite@4.3.5_@types+node@18.16.7/node_modules/vite/types/customevent.d.ts","../../../node_modules/.pnpm/rollup@3.21.2/node_modules/rollup/dist/rollup.d.ts","../../../node_modules/.pnpm/vite@4.3.5_@types+node@18.16.7/node_modules/vite/types/importglob.d.ts","../../../node_modules/.pnpm/source-map-js@1.0.2/node_modules/source-map-js/source-map.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/comment.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/at-rule.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/rule.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/container.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/declaration.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/previous-map.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/input.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/css-syntax-error.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/warning.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/document.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/root.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/lazy-result.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/no-work-result.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/processor.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/result.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/node.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/list.d.ts","../../../node_modules/.pnpm/postcss@8.4.23/node_modules/postcss/lib/postcss.d.ts","../../../node_modules/.pnpm/vite@4.3.5_@types+node@18.16.7/node_modules/vite/dist/node/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.31.0/node_modules/@vitest/runner/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.31.0/node_modules/@vitest/runner/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@0.31.0/node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/.pnpm/@vitest+utils@0.31.0/node_modules/@vitest/utils/diff.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.31.0/node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.31.0/node_modules/@vitest/runner/utils.d.ts","../../../node_modules/.pnpm/tinybench@2.5.0/node_modules/tinybench/dist/index.d.ts","../../../node_modules/.pnpm/vite-node@0.31.0_@types+node@18.16.7/node_modules/vite-node/dist/types.d-1e7e3fdf.d.ts","../../../node_modules/.pnpm/vite@4.3.5_@types+node@18.16.7/node_modules/vite/types/hot.d.ts","../../../node_modules/.pnpm/vite-node@0.31.0_@types+node@18.16.7/node_modules/vite-node/dist/types-d9c0fafd.d.ts","../../../node_modules/.pnpm/vite-node@0.31.0_@types+node@18.16.7/node_modules/vite-node/dist/client.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@0.31.0/node_modules/@vitest/snapshot/dist/manager.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@0.31.0/node_modules/@vitest/snapshot/manager.d.ts","../../../node_modules/.pnpm/vite-node@0.31.0_@types+node@18.16.7/node_modules/vite-node/dist/server.d.ts","../../../node_modules/.pnpm/vite-node@0.31.0_@types+node@18.16.7/node_modules/vite-node/dist/index.d.ts","../../../node_modules/.pnpm/vitest@0.31.0/node_modules/vitest/dist/types-b7007192.d.ts","../../../node_modules/.pnpm/tinyspy@2.1.0/node_modules/tinyspy/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+spy@0.31.0/node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@0.31.0/node_modules/@vitest/snapshot/dist/environment.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@0.31.0/node_modules/@vitest/snapshot/environment.d.ts","../../../node_modules/.pnpm/vitest@0.31.0/node_modules/vitest/dist/config.d.ts","../../../node_modules/.pnpm/vitest@0.31.0/node_modules/vitest/dist/index.d.ts","../test/normalize-url.test.ts","../test/parse-page-id.test.ts","../../../node_modules/.pnpm/@types+eslint@8.37.0/node_modules/@types/eslint/helpers.d.ts","../../../node_modules/.pnpm/@types+estree@1.0.1/node_modules/@types/estree/index.d.ts","../../../node_modules/.pnpm/@types+json-schema@7.0.11/node_modules/@types/json-schema/index.d.ts","../../../node_modules/.pnpm/@types+eslint@8.37.0/node_modules/@types/eslint/index.d.ts","../../../node_modules/.pnpm/@types+eslint-scope@3.7.4/node_modules/@types/eslint-scope/index.d.ts","../../../node_modules/.pnpm/@types+node@18.16.5/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.16.6/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.16.5/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.16.5/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/vite@4.3.5_@types+node@18.16.5/node_modules/vite/dist/node/index.d.ts","../../../node_modules/.pnpm/vite-node@0.31.0_@types+node@18.16.5/node_modules/vite-node/dist/client.d.ts","../../../node_modules/.pnpm/vite-node@0.31.0_@types+node@18.16.5/node_modules/vite-node/dist/server.d.ts","../../../node_modules/.pnpm/vite-node@0.31.0_@types+node@18.16.5/node_modules/vite-node/dist/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"004d51ae5891a31c241dccdf1427737a473103e224b18686c22fa219c57db0b8","dec2d46905e234281ec8f7a76dd4f549b616fd724931774b66a07ff035798259","7b0750229dd0ce4bc6cb07d5ca7f12909b32407a447fe54822a31c0881602f7a","f55748ad2b323acd2b83ffc2986c127159a5259c9c41efeec5ed44671ce7dad9","811266277238e26ddd3c69a7dbf68c8bd4d5056c849f03d5d635ebf538530a41","4b9756d8fbe68d465bc917e25e064ce03bed8bbef00f1ea21b5426a161bf6260","4e6ffc0bc1687a29b758b2f9306d73630c85880c6a0e1c6cd8b1c4e48f5710dc","db86f55c53c1ef5bcb319e7d1beac829350045397de4924f5d2fc48e91761d0a","9774e4cba646bb2fcf479637414f9077a934c9c6f2cda511eff3d4d0660a0d18",{"version":"5e384524751bfca381ccc4b8d378fdf56ba284ae193eee745cc0057889d0304f","signature":"d1bf4a97716f1e333b59801b44e2d46ac9c6d510cadd59e0e23bc93707a2c20b"},{"version":"493515178506057b0f864ccc0164dc7af25007a4cceaa937f30e856cf3678539","signature":"147854fa51952ce9258526b057717fad56cbc0fb7bff031da0403500d1f896ed"},{"version":"039c2c4a359c3fe3ce7999930872d86605c3c7bd0dbc349f6453f78d07f3f9db","signature":"d2b2fcb17c6bc1941b3e477d69046aa9443bd80b373f66dac665c3d881301be6"},{"version":"eb2108d9bcf821fa5ca7a604cdb93dbb78a7fbb2fdd8d81ec998afdcdc0ea40f","signature":"41dbfe58d3d9360c6e1b0ab84a30afd3ee09fde90790469e067fe5b297159766"},{"version":"d4507bb82df8c3c507e9e3260321e52c7dd321f8a5b25b671a4dfdc9287840f6","signature":"9091006c672fd92366f0e80e4e50af08ee42bd98fb24e812ad4b37d56dee8205"},{"version":"31c633f267577c164025ba5e9544133c31dac20efc062cdfff71bddee0f8d4df","signature":"eb64a8de43c4c37a01d801412c03ac831b980268eccd0230bd70859ce7b1bed8"},{"version":"150548c5a00159daf1c5887f87a90bfb5993f06d33c229892f31fff0e0370f08","signature":"8d6961df4bc1f1e91009b0aee4af1daa2f35b80b8f03eff29131c4babcab7f84"},"b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968","a77fbecee25688f568e18b43f8f54195d6c278a2a9a687ada5ab3d2f726524eb","e29f2b3a93ca3392fe29fa8e7b93985e854b44fe28e2b5c113f08296095bd6b7","d27956c8b392088a06d882e1edb58aab4d5cf5ab1229b73f99329ab21f352147","90dab905b7ea5ab629b62ec5a4153b3f44469aff5b1f6132edb2802537e5d8a7",{"version":"a0f55c5c0d1ff68027ba67ee7265c9c5177d0241e3c3e53e37085775f6251bd7","signature":"46ee9b701e5785d04f023cf998d522bab45ae722c02356ca7bbdf4fbe6b4201f"},{"version":"3964ee88e5e8b0236b00311cd3419cf1ad3f2b6cd00a7a8e0de471a218e31347","signature":"f8ffa574e480faa1de59fbe23039a4b69d256ffb2f3849d51d04c8c4e21ab73e"},{"version":"4e21afff9ffc70c82f2aeed7577e8abe175a174a70ae8a1d85f8e7d0c17b6a1c","signature":"6b5f02c619aed8d5eb20467122a48373279e2531edcf60803ab3c1a1a048be27"},{"version":"d46fa202edcd5f48589e27b8f1f1e679b8c9d9a70cfab933e36401f6e032e57d","signature":"290f8fe7f49e0281ecdb52da493e46104f340844ccb8e0703cfd0837b5333f46"},{"version":"c91ad7ee2b45453a8aa56214242161bf33be23e037a27f452be6d37366374c0c","signature":"bb64c27258c38bbe33777f97409e51a391bc978d5e68ac96d0f8f894d7e6b3e5"},{"version":"aad56beecf24fc25b3f58e12466ac27f6661a986447c1b573a29751c04065d58","signature":"b83fada7a2493a61ed6ad7ed45fb16b6f30cba470d0032870b36f5e7fa12d450"},{"version":"617d99ddfa6823161323a3a71e6d9726f4c1047193e70aead84555ea8676f4ba","signature":"376ec4628865e4d333906668cf56b32117db94713f233f29a7abfaea7f544ccd"},{"version":"f7ec0a656fb2b10f1118196c134247def69d5489f08ba45063c85524cbc002aa","signature":"f7f7c57ee017e83bf6e72c638fd7107469187aa718841111ba7244cea28f8c99"},{"version":"29bd80847a3ae811579acaf903de95bb29e45edbe674585e2544b01dd101605d","signature":"ddaffe3be86f35ab00688a7d0df81c5ababb40933d5cb9ecf48d5352e4ac076f"},{"version":"c88fe45cc07d52740db30cfbbdeacc89c2f077cf08b1bc15ed5c4e24759f4ef4","signature":"903511e69bc978773afc3b2e8a4d05fcf1cd4a1c574763ddbfd291b7e0a63e59"},{"version":"9f28e43e07638d4810d8fc3b5d1e21dd3ede7588eb0b43a26ab51f1b9272fd42","signature":"9ae13da025280df9f79ba6d0609b5b2adad211f398b5b8c327dc1719851b2ef6"},{"version":"0027a45dc21de938ca3c436acc8e3b22fd7899184916348b0cab6a3f4e8fb91a","signature":"efb2416c77129e948ece45ca0f1f9458bafcde58053096543abc5603754d0a52"},"a87e5902fd92d16a80e0020ac03d6477bc2e7a6f5b0407a73aff6b7aa9e01d55",{"version":"dc7b885af6bd832c8d08622e645782a172a24bb97bf04c6d3db92b55baa20d0f","signature":"0f9daaf519ab252e4326cd79979aa6e6b6f521c0c6dc1ad646c8e59ed167baf8"},{"version":"00ceab3c2e7e01b0e72abb0fd476fdce7c37d01ac8b7ad0d2ab421e08589faf6","signature":"ad45e73951ce8937b0c02e7917fb2ccca0df1099502f6ddf64f6cccd635f6cd9"},{"version":"8e7c73350999eb7cef5cca22d81b279028d151b9426546923fe65718373eb4dc","signature":"1ae2b10ec94eab893d975825cd8406d798e0f8e8ff95551e3367b9b57ac4a61f"},"274b1fbd4d413479581ee864f2cb714e506f64725fca44afb1789707c509c953","15495440b3efe3f0c9d6d48b75b9c9a8cf2edf700816225d1b9b63b2487682bd",{"version":"b731511ef450ace6c32de6c14ac6585cdf75642aad5a3224ead8d4abc50585db","signature":"dbe5f6c4af49c421d2ecc3d7e9fe6d34bfaaaed0e322ed4b429997ad5ed22707"},{"version":"1429bca7de08240da18d233e03e894191274b6078330f4a26e437f1c0fb13067","signature":"3eaaf48b4e8b52560bedc87fb3eed0db021a81970727fe66f2b049f6ed73a8c1"},{"version":"e4001e46c5b6766d595473110be160bd83b06b0ef59f252304bf4a8018cc04a0","signature":"f5e09c563ba11c3024958b59be981b28391380f362f62612aa20e80f6253b288"},"19ce9ec982b542ef6d04d29ce678aad2fa52a67d8087e9c6cd95a4d6d98784c8","4af47b2f19621ce8f638167a32f141a3a2c0e71ce8ebf51384393ca1c2654e60","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","0beeeb5964025d8564c03cb0bf1a4b60dc40c01f065ad1a4e9030415f5bc7bc2","e10058609dd9751913eca9baefb8ae50bc9d2c72e1e6f6a26bdf9ecffa9e0195","93298d8e9e1817931c85d6887c81b9bb107835aa6d424843560ec7610b379439","2249bec3922f9a1ff1c8fd7f9b557e2396482b1c88ee9b21875b9d1d97fd4641","73b67d2e87ac7d7baaca64ca33fd1523c0b3c850cb7db5b9c014f1be7996bed1","5d5ae61fce1581fd6424269790a9071e3f8e69b029f5d0fcb46ce618c5dbc565","38a0ccc7106312a9f60e034e7cd8ac218774d8aa65f832cee3363a7e65f99325",{"version":"c3bc5d095c3c22fd20b5a6550b9c9a6d56c3ffbb87ef057ccce7764b6bed4428","affectsGlobalScope":true},{"version":"5067a3dba2527a6158fc803a233b66f8eeea2f9795d959670858c588cda85387","affectsGlobalScope":true},"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"f749812878fecfa53cfc13b36e5d35086fb6377983a9df44175da83ccc23af1f","affectsGlobalScope":true},"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3",{"version":"211e3f15fbced4ab4be19f49ffa990b9ff20d749d33b65ff753be691e7616239","affectsGlobalScope":true},"a61bee062e86568207a22cb56f146b398a2f1e1c2ab68d3498b7bca7e9d85d08","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","e596c9bb2f29a2699fdd4ae89139612652245192f67f45617c5a4b20832aaae9","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","216717f17c095cde1dc19375e1ab3af0a4a485355860c077a4f9d6ea59fab5b5","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"00dee7cdca8b8420c47ea4a31a34b8e8294013ebc4f463fd941e867e7bf05029","affectsGlobalScope":true},"3256f3cccd578f9e7fe3a28096c505634bebcee8afb738ffa99368e536ca3a0b","1c84b46267610a34028edfd0d035509341751262bac1062857f3c8df7aff7153","7f138842074d0a40681775af008c8452093b68c383c94de31759e853c6d06b5c","a3d541d303ee505053f5dcbf9fafb65cac3d5631037501cd616195863a6c5740","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","4f3fdeba4e28e21aa719c081b8dc8f91d47e12e773389b9d35679c08151c9d37","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","f69ff39996a61a0dd10f4bce73272b52e8024a4d58b13ab32bf4712909d0a2b7",{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"a73ae8c0e62103bb9e21bb6538700881bf135b9a8b125b857ec68edfa0da4ed3","affectsGlobalScope":true},{"version":"e1c1b2fbe236bf7ee3e342eeae7e20efb8988a0ac7da1cbbfa2c1f66b76c3423","affectsGlobalScope":true},"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a6dd3dba8e665ac43d279e0fdf5219edda0eed69b5e9a5061f46cd6a65c4f7a1","99d951629f7096dcd79adbaa83a85e3be57613005533bd23029b3aba4ce9383e","8f07f2b6514744ac96e51d7cb8518c0f4de319471237ea10cf688b8d0e9d0225","bcb6ea18f23dae2c48459d7b86d3adccd6898f824fcbf9da08b935f559896580","0aa7220845f5f3902fe043f646f9d9218bd7dd6c4046e8471580866ea6b03aa2","65570ad7e2ac88e024dd1f50844db3b9106e044871529e71d377967e3b590ed7","739c2c46edc112421fc023c24b4898b1f413f792bb6a02b40ba182c648e56c2f","858d0d831826c6eb563df02f7db71c90e26deadd0938652096bea3cc14899700","ae128dd11edfae24d9dfc6bc60390e488cec3792e4dd80115e422b5c2e1524cf","cef246ba183aff9bdb98831690ffcd1603655ea23ce38252e3db3ce3e06d262c","9d110b91e4c091ceee9d360ec425737580fd0d531bdb2d4f77e203c520d4da4c","96826ee13c04e92150ae68c6d89bf6ab7970abeca6e1a41cc59c5dcacefb4526","cb81640e895111bdf71201045f0f6664663cb0120e05a03f91e978b6a4ea2dd7","0d598aeda14bcdaa823b05a043eb7c18045c0a17fc3594d2387a11c09a5ff64b","be0db7e6060868cbabb02b3400fbaad4471d0815ce49d1b0f1e027296017b710","dbdec414a2de11b47a0bc8e2a0a93397235878ca7e6c02b62570e0a72faa878e","d9f79888a9ecee73c3cb33ae3eaaacb973dc96d0537599300d3dcb50ed1a1cf3","7ad14170a7f1f59dbe90ca3747699396f4a320921c7c560aa53f05022221df13","096c2a810f50f8a8b5bbb336ee32476d7882ffd93b2ee50ec5d4c1a9d5c209cf","6be9369a41da87241c164021631f20fe4706daf9f82a33c754974c6f4eade3cd","2eb26714666406e7c6c3ad3482da148781845b50a354a351d28bd5dba1a3f88a","022a6fbd269120763350030e66333f8c084a328ce7d6f6414d9cd49d834cbc77","4f85fea72dfeb24be05b650d680a21bda8324430bbfb437af9452630c9c740c1","179bfe3e835098360fdfa7f1c139c01b83c00410dccac214b3c71f16d949044b","18af117b1a77567a980c6ab6611be835e809300af6b511a2093208dc14ad2f7c","59345c3c2297677cb323f5f70df756776ae8eec2c97e6254e0739f711ab39131","745dc480fe54b1c4f0207d9919020656218dfdab72b99ac5ef3b94666f1b8696","96e5937f28bc113d422e7659bf3c3dc985e605b44138c146f34f1ba5534908a7","1c53e1884dc6550ce179c68e9e3086f54af258fff39eb70274ea9294eb7ce6df","2d57bdaafc7cd0ebc006f0e77c869d6fe6148809c08e8b5677aef4150cf4a7c7","05c7aef6a4e496b93c2e682cced8903c0dfe6340d04f3fe616176e2782193435","0cd37f8a6c65f58079c0f71e7b37cd43967b0bc7e553d5d8cbb4b3182ec00077","e666e31d323fef5642f87db0da48a83e58f0aaf9e3823e87eabd8ec7e0441a36","caeae351358d6c5b8da971c4ba7973987cbbbe4766081d07394e51c5544c8727","d12ab69ace581804d4f264eabc71094ca8dadfa70ae2bf5ccd54a8d6105ab84b","4d5fb5d6b35f731b2ae4d9d7c592d48e91d6de531dd130628edf4eba16add893","1c704b3dc2862b9339b905444ee068dabab81b7d5182d50dfdaa94df98a00f72","cb0f8bf022bb340289280e1636d86ec16413717e4c293f5084a8a334aceefcf4","e72396ce544667ab49df38ffb91cb3f80ff17d2ad3df903ec30b1d2ca8ea68de","b7e28e06011460436d5c2ec2996846ac0c451e135357fc5a7269e5665a32fbd7","328776011891b31306463a1a9770cc116e11f4a9012498611721e5600ce5e1da","78f3672e66ee22f151482bdc019118f338df727a2f2d8ffe354a9b1a0cb66cf0","53fb265a78958b859326dfe145270b175644871007110836be5bba3ed4013ac7","9a82b3cd322d6b46c2407c162bbfd0b13edc9d23dced719a751a481b985690a0","2d37a18dbc84466a72a4b00d0293ecfe3170fc664ca32126db0b7eace05824d5","f63e23230f3960b712450cf08f0f31e56acdae3ce65e0bf31bfdd6442b29d115","f2d1a59a658165341b0e2b7879aa2e19ea6a709146b2d3f70ee8a07159d3d08e","18e13310b5319738de2469661f9f86478e2e6bde65c2d493a5f8e3d872fb47ae","d42961d227c4d7dd39fe0783ee6fede42f9840493a340a0fef65dd89acf30646",{"version":"9d819274a019326005532fcc57b657c7d084a41582da675e81a5c370fca0d4b6","signature":"f761c91419d0a89422a0004ef1a92929dd4d2d5e5c16758654d8b0467d1998c6"},{"version":"f9640f69942f5943143ce7678d70a1b0f7fd6bb42c6908f40153d262bee5108a","signature":"f761c91419d0a89422a0004ef1a92929dd4d2d5e5c16758654d8b0467d1998c6"},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"bee89e1eb6425eb49894f3f25e4562dc2564e84e5aa7610b7e13d8ecddf8f5db","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","dea2650c477f53d503a27f78ed17b13d7184c2f922eb4d3367ccf52634765467","e050a0afcdbb269720a900c85076d18e0c1ab73e580202a2bf6964978181222a"],"options":{"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":99,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":false,"target":2,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[157],[157,216,218],[157,215,216,217],[111,157],[114,157],[115,120,148,157],[116,127,128,135,145,156,157],[116,117,127,135,157],[118,157],[119,120,128,136,157],[120,145,153,157],[121,123,127,135,157],[122,157],[123,124,157],[127,157],[125,127,157],[127,128,129,145,156,157],[127,128,129,142,145,148,157],[157,161],[123,127,130,135,145,156,157],[127,128,130,131,135,145,153,156,157],[130,132,145,153,156,157],[111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163],[127,133,157],[134,156,157],[123,127,135,145,157],[136,157],[137,157],[114,138,157],[139,155,157,161],[140,157],[141,157],[127,142,143,157],[142,144,157,159],[115,127,145,146,147,148,157],[115,145,147,157],[145,146,157],[148,157],[149,157],[127,151,152,157],[151,152,157],[120,135,145,153,157],[154,157],[135,155,157],[115,130,141,156,157],[120,157],[145,157,158],[157,159],[157,160],[115,120,127,129,138,145,156,157,159,161],[145,157,162],[102,109,157],[102,103,104,157],[103,157],[102,157],[102,103,157,194],[157,191],[157,195],[106,157],[101,106,157],[101,106,107,157],[157,209],[157,202],[157,207],[157,193],[98,157],[98,99,101,157],[72,73,74,75,157],[73,157],[73,74,157],[157,175],[157,175,187],[157,172,173,174,176,187],[157,178],[157,175,182,186,189],[157,177,189],[157,180,182,185,186,189],[157,180,182,183,185,186,189],[157,172,173,174,175,176,178,179,180,181,182,186,189],[157,171,172,173,174,175,176,178,179,180,181,182,183,185,186,187,188],[157,171,189],[157,182,183,184,186,189],[157,185,189],[157,175,181,186,189],[157,179,187],[100,157],[157,171],[157,198,199,200],[157,190,198,199,200,206],[157,198,199],[127,128,130,132,135,145,153,156,157,162,164,165,166,167,168,169,170,189],[157,167],[157,168],[157,169],[102,105,108,109,110,128,157,161,190,192,196,197,201,203,204,205,206],[102,105,108,109,110,128,157,161,190,192,196,197,201,203,204,205,206,208,210,211],[62,157],[56,157],[56,58,157],[56,57,58,59,60,61,62,63,157],[56,57,59,60,61,157],[64,67,68,157],[70,157],[64,76,78,157],[64,157],[64,65,157],[64,65,66,157],[64,67,82,83,84,157],[64,67,80,81,157],[64,80,90,157],[64,66,157],[64,67,157],[65,66,67,68,69,70,71,77,78,79,80,81,82,83,84,85,86,87,88,90,91,92,95,96,157],[89,157],[93,94,157],[77,157],[95,157,212],[78,157,212],[220],[216,218,221],[221],[215,216,217,221],[102,109,220],[102,103,104,220],[103,220],[102,220],[102,103,194,220],[191,220],[195,220],[106,220],[101,106,220],[101,106,107,220],[209,220],[202,220],[207,220],[193,220],[98,220],[98,99,101,220],[72,73,74,75,220],[73,220],[73,74,220],[175,220],[175,187,220],[172,173,174,176,187,220],[178,220],[175,182,186,189,220],[177,189,220],[180,182,185,186,189,220],[180,182,183,185,186,189,220],[172,173,174,175,176,178,179,180,181,182,186,189,220],[171,172,173,174,175,176,178,179,180,181,182,183,185,186,187,188,220],[171,189,220],[182,183,184,186,189,220],[185,189,220],[175,181,186,189,220],[179,187,220],[100,220],[171,220],[102,105,108,109,110,192,196,197,203,206,220,222,223,224,225,226,227],[102,105,108,109,110,192,196,197,203,206,208,210,211,220,222,223,224,225,226,227],[62,221],[56,221],[56,58,221],[56,57,58,59,60,61,62,63,221],[56,57,59,60,61,221],[64],[65,66,67,68,69,70,71,77,78,79,80,81,82,83,84,85,86,87,88,90,91,92,95,96],[89]],"referencedMap":[[109,1],[219,2],[215,1],[218,3],[216,1],[217,1],[111,4],[112,4],[114,5],[115,6],[116,7],[117,8],[118,9],[119,10],[120,11],[121,12],[122,13],[123,14],[124,14],[126,15],[125,16],[127,15],[128,17],[129,18],[113,19],[163,1],[130,20],[131,21],[132,22],[164,23],[133,24],[134,25],[135,26],[136,27],[137,28],[138,29],[139,30],[140,31],[141,32],[142,33],[143,33],[144,34],[145,35],[147,36],[146,37],[148,38],[149,39],[150,1],[151,40],[152,41],[153,42],[154,43],[155,44],[156,45],[157,46],[158,47],[159,48],[160,49],[161,50],[162,51],[110,52],[105,53],[104,54],[103,55],[191,53],[195,56],[192,57],[196,58],[106,1],[209,59],[107,60],[108,61],[202,61],[210,62],[203,63],[208,64],[194,65],[193,1],[99,66],[102,67],[98,1],[165,1],[72,1],[89,1],[93,1],[94,1],[76,68],[74,69],[75,70],[73,1],[173,71],[172,72],[175,73],[179,74],[176,72],[181,75],[178,76],[183,77],[188,1],[184,78],[187,79],[189,80],[177,81],[185,82],[186,83],[182,84],[174,71],[180,85],[101,86],[100,1],[169,1],[171,87],[197,1],[207,1],[11,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[53,1],[54,1],[1,1],[10,1],[55,1],[201,88],[205,88],[204,89],[200,90],[198,1],[190,91],[168,92],[167,1],[199,93],[170,1],[166,94],[211,95],[212,96],[206,95],[63,97],[57,98],[61,98],[60,99],[56,1],[58,98],[64,100],[62,101],[59,98],[69,102],[70,1],[71,103],[79,104],[65,105],[80,106],[81,105],[67,107],[85,108],[86,105],[87,109],[88,105],[91,110],[82,111],[68,111],[92,112],[66,105],[77,1],[97,113],[90,114],[96,105],[83,1],[95,115],[78,116],[84,1],[213,117],[214,118]],"exportedModulesMap":[[109,119],[219,120],[215,121],[218,122],[216,121],[217,121],[111,4],[112,4],[114,5],[115,6],[116,7],[117,8],[118,9],[119,10],[120,11],[121,12],[122,13],[123,14],[124,14],[126,15],[125,16],[127,15],[128,17],[129,18],[113,19],[163,1],[130,20],[131,21],[132,22],[164,23],[133,24],[134,25],[135,26],[136,27],[137,28],[138,29],[139,30],[140,31],[141,32],[142,33],[143,33],[144,34],[145,35],[147,36],[146,37],[148,38],[149,39],[150,1],[151,40],[152,41],[153,42],[154,43],[155,44],[156,45],[157,46],[158,47],[159,48],[160,49],[161,50],[162,51],[110,123],[105,124],[104,125],[103,126],[191,124],[195,127],[192,128],[196,129],[106,119],[209,130],[107,131],[108,132],[202,132],[210,133],[203,134],[208,135],[194,136],[193,119],[99,137],[102,138],[98,119],[165,119],[72,119],[89,119],[93,119],[94,119],[76,139],[74,140],[75,141],[73,119],[173,142],[172,143],[175,144],[179,145],[176,143],[181,146],[178,147],[183,148],[188,119],[184,149],[187,150],[189,151],[177,152],[185,153],[186,154],[182,155],[174,142],[180,156],[101,157],[100,119],[169,119],[171,158],[197,119],[207,119],[11,119],[13,119],[12,119],[2,119],[14,119],[15,119],[16,119],[17,119],[18,119],[19,119],[20,119],[21,119],[3,119],[4,119],[25,119],[22,119],[23,119],[24,119],[26,119],[27,119],[28,119],[5,119],[29,119],[30,119],[31,119],[32,119],[6,119],[36,119],[33,119],[34,119],[35,119],[37,119],[7,119],[38,119],[43,119],[44,119],[39,119],[40,119],[41,119],[42,119],[8,119],[48,119],[45,119],[46,119],[47,119],[49,119],[9,119],[50,119],[51,119],[52,119],[53,119],[54,119],[1,119],[10,119],[55,119],[201,88],[205,88],[204,89],[200,90],[198,1],[190,91],[168,92],[167,1],[199,93],[170,1],[166,94],[211,159],[212,160],[206,159],[63,161],[57,162],[61,162],[60,163],[56,121],[58,162],[64,164],[62,165],[59,162],[69,166],[79,166],[65,166],[80,166],[81,166],[67,166],[85,166],[86,166],[87,166],[88,166],[91,166],[82,166],[68,166],[92,166],[66,166],[97,167],[90,168],[96,166]],"semanticDiagnosticsPerFile":[109,219,215,218,216,217,111,112,114,115,116,117,118,119,120,121,122,123,124,126,125,127,128,129,113,163,130,131,132,164,133,134,135,136,137,138,139,140,141,142,143,144,145,147,146,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,110,105,104,103,191,195,192,196,106,209,107,108,202,210,203,208,194,193,99,102,98,165,72,89,93,94,76,74,75,73,173,172,175,179,176,181,178,183,188,184,187,189,177,185,186,182,174,180,101,100,169,171,197,207,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,201,205,204,200,198,190,168,167,199,170,166,211,212,206,63,57,61,60,56,58,64,62,59,69,70,71,79,65,80,81,67,85,86,87,88,91,82,68,92,66,77,97,90,96,83,95,78,84,213,214]},"version":"4.9.5"}
@@ -0,0 +1,169 @@
1
+ import * as types from '@texonom/ntypes';
2
+ import { Block, ExtendedRecordMap, PageMap } from '@texonom/ntypes';
3
+ export { default as isUrl } from 'is-url-superb';
4
+
5
+ /**
6
+ * Gets the raw, unformatted text content of a block's content value.
7
+ *
8
+ * This is useful, for instance, for extracting a block's `title` without any
9
+ * rich text formatting.
10
+ */
11
+ declare const getTextContent: (text?: types.Decoration[]) => string;
12
+
13
+ declare function getBlockTitle(block: Block, recordMap: ExtendedRecordMap): string;
14
+
15
+ declare function getBlockIcon(block: Block, recordMap: ExtendedRecordMap): string;
16
+
17
+ declare function getBlockCollectionId(block: Block, recordMap: ExtendedRecordMap): string | null;
18
+
19
+ declare function getPageTitle(recordMap: ExtendedRecordMap): string;
20
+
21
+ /**
22
+ * Gets the value of a collection property for a given page (collection item).
23
+ *
24
+ * @param propertyName property name
25
+ * @param block Page block, often be first block in blockMap
26
+ * @param recordMap
27
+ * @returns - The return value types will follow the following principles:
28
+ * 1. if property is date type, it will return `number` or `number[]`(depends on `End Date` switch)
29
+ * 2. property is text-like will return `string`
30
+ * 3. multi select property will return `string[]`
31
+ * 4. checkbox property return `boolean`
32
+ * @todo complete all no-text property type
33
+ */
34
+ declare function getPageProperty<T = string | number | boolean | string[] | number[]>(propertyName: string, block: Block, recordMap: ExtendedRecordMap): T;
35
+
36
+ /**
37
+ * Attempts to find a valid date from a given property.
38
+ */
39
+ declare const getDateValue: (prop: any[]) => types.FormattedDate | null;
40
+
41
+ /**
42
+ * Returns the parent page block containing a given page.
43
+ *
44
+ * Note that many times this will not be the direct parent block since
45
+ * some non-page content blocks can contain sub-blocks.
46
+ */
47
+ declare const getBlockParentPage: (block: types.Block, recordMap: types.ExtendedRecordMap, { inclusive }?: {
48
+ inclusive?: boolean;
49
+ }) => types.PageBlock | null;
50
+
51
+ interface TableOfContentsEntry {
52
+ id: types.ID;
53
+ type: types.BlockType;
54
+ text: string;
55
+ indentLevel: number;
56
+ }
57
+ /**
58
+ * Gets the metadata for a table of contents block by parsing the page's
59
+ * H1, H2, and H3 elements.
60
+ */
61
+ declare const getPageTableOfContents: (page: types.PageBlock, recordMap: types.ExtendedRecordMap) => Array<TableOfContentsEntry>;
62
+
63
+ /**
64
+ * Gets the IDs of all blocks contained on a page starting from a root block ID.
65
+ */
66
+ declare const getPageContentBlockIds: (recordMap: types.ExtendedRecordMap, blockId?: string) => string[];
67
+
68
+ /**
69
+ * Robustly extracts the notion page ID from a notion URL or pathname suffix.
70
+ *
71
+ * Defaults to returning a UUID (with dashes).
72
+ */
73
+ declare const parsePageId: (id?: string | null, { uuid }?: {
74
+ uuid?: boolean;
75
+ }) => string;
76
+
77
+ declare const idToUuid: (id?: string) => string;
78
+
79
+ declare const uuidToId: (uuid: string) => string;
80
+
81
+ /**
82
+ * Performs a traversal over a given Notion workspace starting from a seed page.
83
+ *
84
+ * Returns a map containing all of the pages that are reachable from the seed
85
+ * page in the space.
86
+ *
87
+ * If `rootSpaceId` is not defined, the space ID of the root page will be used
88
+ * to scope traversal.
89
+ *
90
+ *
91
+ * @param rootPageId - Page ID to start from.
92
+ * @param rootSpaceId - Space ID to scope traversal.
93
+ * @param getPage - Function used to fetch a single page.
94
+ * @param opts - Optional config
95
+ */
96
+ declare function getAllPagesInSpace(rootPageId: string, rootSpaceId: string | undefined, getPage: (pageId: string) => Promise<ExtendedRecordMap>, { concurrency, traverseCollections, targetPageId }?: {
97
+ concurrency?: number;
98
+ traverseCollections?: boolean;
99
+ targetPageId?: string;
100
+ }): Promise<PageMap>;
101
+
102
+ /**
103
+ * Gets the canonical, display-friendly version of a page's ID for use in URLs.
104
+ */
105
+ declare const getCanonicalPageId: (pageId: string, recordMap: ExtendedRecordMap, { uuid }?: {
106
+ uuid?: boolean;
107
+ }) => string | null;
108
+
109
+ declare const getPageBreadcrumbs: (recordMap: types.ExtendedRecordMap, activePageId: string) => Array<any> | null;
110
+
111
+ /**
112
+ * Gets URLs of all images contained on the given page.
113
+ */
114
+ declare const getPageImageUrls: (recordMap: types.ExtendedRecordMap, { mapImageUrl }: {
115
+ mapImageUrl: (url: string, block: types.Block) => string | null;
116
+ }) => string[];
117
+
118
+ declare const normalizeUrl: (url?: string) => string;
119
+
120
+ declare const normalizeTitle: (title?: string | null) => string;
121
+
122
+ declare function mergeRecordMaps(recordMapA: ExtendedRecordMap, recordMapB: ExtendedRecordMap): ExtendedRecordMap;
123
+
124
+ declare const formatDate: (input: string | number, { month }?: {
125
+ month?: 'long' | 'short';
126
+ }) => string;
127
+
128
+ interface NotionDateTime {
129
+ type: 'datetime';
130
+ start_date: string;
131
+ start_time?: string;
132
+ time_zone?: string;
133
+ }
134
+ declare const formatNotionDateTime: (datetime: NotionDateTime) => string;
135
+
136
+ type EstimatePageReadTimeOptions = {
137
+ wordsPerMinute?: number;
138
+ imageReadTimeInSeconds?: number;
139
+ };
140
+ type ContentStats = {
141
+ numWords: number;
142
+ numImages: number;
143
+ };
144
+ type PageReadTimeEstimate = ContentStats & {
145
+ totalWordsReadTimeInMinutes: number;
146
+ totalImageReadTimeInMinutes: number;
147
+ totalReadTimeInMinutes: number;
148
+ };
149
+ /**
150
+ * Returns an estimate for the time it would take for a person to read the content
151
+ * in the given Notion page.
152
+ *
153
+ * Uses Medium for inspiration.
154
+ *
155
+ * @see https://blog.medium.com/read-time-and-you-bc2048ab620c
156
+ * @see https://github.com/ngryman/reading-time
157
+ *
158
+ * TODO: handle non-english content.
159
+ */
160
+ declare function estimatePageReadTime(block: Block, recordMap: ExtendedRecordMap, { wordsPerMinute, imageReadTimeInSeconds }?: EstimatePageReadTimeOptions): PageReadTimeEstimate;
161
+ /**
162
+ * Same as `estimatePageReadTime`, except it returns the total time estimate as
163
+ * a human-readable string.
164
+ *
165
+ * For example, "9 minutes" or "less than a minute".
166
+ */
167
+ declare function estimatePageReadTimeAsHumanizedString(block: Block, recordMap: ExtendedRecordMap, opts: EstimatePageReadTimeOptions): string;
168
+
169
+ export { NotionDateTime, TableOfContentsEntry, estimatePageReadTime, estimatePageReadTimeAsHumanizedString, formatDate, formatNotionDateTime, getAllPagesInSpace, getBlockCollectionId, getBlockIcon, getBlockParentPage, getBlockTitle, getCanonicalPageId, getDateValue, getPageBreadcrumbs, getPageContentBlockIds, getPageImageUrls, getPageProperty, getPageTableOfContents, getPageTitle, getTextContent, idToUuid, mergeRecordMaps, normalizeTitle, normalizeUrl, parsePageId, uuidToId };
package/build/index.js ADDED
@@ -0,0 +1,2 @@
1
+ var q=Object.defineProperty,N=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var D=(e,t,o)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,g=(e,t)=>{for(var o in t||(t={}))H.call(t,o)&&D(e,o,t[o]);if($)for(var o of $(t))Q.call(t,o)&&D(e,o,t[o]);return e},U=(e,t)=>N(e,V(t));var R=(e,t,o)=>new Promise((n,s)=>{var r=c=>{try{m(o.next(c))}catch(l){s(l)}},a=c=>{try{m(o.throw(c))}catch(l){s(l)}},m=c=>c.done?n(c.value):Promise.resolve(c.value).then(r,a);m((o=o.apply(e,t)).next())});var h=e=>{var t;return e?Array.isArray(e)?(t=e==null?void 0:e.reduce((o,n)=>o+(n[0]!=="\u204D"&&n[0]!=="\u2023"?n[0]:""),""))!=null?t:"":e:""};function w(e,t){var s,r,a,m,c,l,i;let o=e.collection_id||((r=(s=e.format)==null?void 0:s.collection_pointer)==null?void 0:r.id);if(o)return o;let n=(a=e==null?void 0:e.view_ids)==null?void 0:a[0];if(n){let u=(c=(m=t.collection_view)==null?void 0:m[n])==null?void 0:c.value;if(u)return(i=(l=u.format)==null?void 0:l.collection_pointer)==null?void 0:i.id}return null}function v(e,t){var o,n;if((o=e.properties)!=null&&o.title)return h(e.properties.title);if(e.type==="collection_view_page"||e.type==="collection_view"){let s=w(e,t);if(s){let r=(n=t.collection[s])==null?void 0:n.value;if(r)return h(r.name)}}return""}function B(e,t){var o,n,s;if((o=e.format)!=null&&o.page_icon)return(n=e.format)==null?void 0:n.page_icon;if(e.type==="collection_view_page"||e.type==="collection_view"){let r=w(e,t);if(r){let a=(s=t.collection[r])==null?void 0:s.value;if(a)return a.icon}}return null}function pe(e){var o;let t=(o=e.block[Object.keys(e.block)[0]])==null?void 0:o.value;return t?v(t,e):null}function P(e,t,o){var n;try{if(!t.properties||!Object.keys(o.collection))return null;let s=(n=o.collection[t.parent_id])==null?void 0:n.value;if(s){let r=e.toLowerCase(),a=Object.keys(s.schema).find(l=>{var i,u;return((u=(i=s.schema[l])==null?void 0:i.name)==null?void 0:u.toLowerCase())===r});if(!a)return null;let{type:m}=s.schema[a],c=h(t.properties[a]);switch(m){case"created_time":return t.created_time;case"multi_select":return c.split(",");case"date":{let i=t.properties[a][0][1][0][1];if(i.type=="datetime")return new Date(`${i.start_date} ${i.start_time}`).getTime();if(i.type=="date")return new Date(i.start_date).getTime();if(i.type=="datetimerange"){let{start_date:u,start_time:y,end_date:f,end_time:T}=i,b=new Date(`${u} ${y}`).getTime(),d=new Date(`${f} ${T}`).getTime();return[b,d]}else{let u=new Date(i.start_date).getTime(),y=new Date(i.end_date).getTime();return[u,y]}}case"checkbox":return c=="Yes";case"last_edited_time":return t.last_edited_time;default:return c}}}catch(s){}return null}var Y=e=>{if(e&&Array.isArray(e)){if(e[0]==="d")return e[1];for(let t of e){let o=Y(t);if(o)return o}}return null};var O=(e,t,{inclusive:o=!1}={})=>{var s,r;let n=e;for(;n!=null;){if(o&&(n==null?void 0:n.type)==="page")return n;let a=n.parent_id,m=n.parent_table;if(!a)break;if(m==="collection")n=(s=t.collection[a])==null?void 0:s.value;else if(n=(r=t.block[a])==null?void 0:r.value,(n==null?void 0:n.type)==="page")return n}return null};var Z={header:0,sub_header:1,sub_sub_header:2},S=(e,t)=>{var s;let o=((s=e.content)!=null?s:[]).map(r=>{var m,c;let a=(m=t.block[r])==null?void 0:m.value;if(a){let{type:l}=a;if(l==="header"||l==="sub_header"||l==="sub_sub_header")return{id:r,type:l,text:h((c=a.properties)==null?void 0:c.title),indentLevel:Z[l]}}return null}).filter(Boolean),n=[{actual:-1,effective:-1}];for(let r of o){let{indentLevel:a}=r,m=a;do{let c=n[n.length-1],{actual:l,effective:i}=c;if(m>l)r.indentLevel=i+1,n.push({actual:m,effective:r.indentLevel});else if(m===l){r.indentLevel=i;break}else n.pop()}while(!0)}return o};var Te=(e,t)=>{let o=t||Object.keys(e.block)[0],n=new Set;function s(r){var u,y,f,T;if(n.has(r))return;n.add(r);let a=(u=e.block[r])==null?void 0:u.value;if(!a)return;let{content:m,type:c,properties:l,format:i}=a;if(l)for(let b of Object.keys(l)){let d=l[b];d.map(k=>{var _,I;let p=(I=(_=k==null?void 0:k[0])==null?void 0:_[1])==null?void 0:I[0];(p==null?void 0:p[0])==="p"&&p[1]&&s(p[1])});let x=(f=(y=d==null?void 0:d[0])==null?void 0:y[1])==null?void 0:f[0];(x==null?void 0:x[0])==="p"&&x[1]&&s(x[1])}if(i){let b=(T=i.transclusion_reference_pointer)==null?void 0:T.id;b&&s(b)}if(!(!m||!Array.isArray(m))&&!(r!==o&&(c==="page"||c==="collection_view_page")))for(let b of m)s(b)}return s(o),Array.from(n)};var L=(e="")=>`${e.substr(0,8)}-${e.substr(8,4)}-${e.substr(12,4)}-${e.substr(16,4)}-${e.substr(20)}`;var G=/\b([a-f0-9]{32})\b/,J=/\b([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})\b/,W=(e="",{uuid:t=!0}={})=>{if(!e)return null;e=e.split("?")[0];let o=e.match(G);if(o)return t?L(o[1]):o[1];let n=e.match(J);return n?t?n[1]:n[1].replace(/-/g,""):null};var M=e=>e.replace(/-/g,"");import K from"p-queue";function Ee(a,m,c){return R(this,arguments,function*(e,t,o,{concurrency:n=4,traverseCollections:s=!0,targetPageId:r=null}={}){let l={},i=new Set,u=new K({concurrency:n});function y(f){return R(this,null,function*(){r&&i.has(r)||(f=W(f),f&&!l[f]&&!i.has(f)&&(i.add(f),u.add(()=>R(this,null,function*(){var T,b;try{if(r&&i.has(r)&&f!==r)return;let d=yield o(f);if(!d)return;let x=(b=(T=d.block[f])==null?void 0:T.value)==null?void 0:b.space_id;if(x){if(!t)t=x;else if(t!==x)return}if(Object.keys(d.block).filter(k=>{var _;let p=(_=d.block[k])==null?void 0:_.value;return!(!p||p.type!=="page"&&p.type!=="collection_view_page"||t&&p.space_id&&p.space_id!==t)}).forEach(k=>y(k)),s)for(let k of Object.values(d.collection_query))for(let p of Object.values(k)){let{blockIds:_}=p;if(_)for(let I of _)y(I)}l[f]=d}catch(d){console.warn("page load error",{pageId:f,spaceId:t},d.statusCode,d.message),l[f]=null}i.delete(f)}))))})}return yield y(e),yield u.onIdle(),l})}var z=e=>(e||"").replace(/ /g,"-").replace(/[^a-zA-Z0-9-\u4e00-\u9FFF\u3041-\u3096\u30A1-\u30FC\u3000-\u303F]/g,"").replace(/--/g,"-").replace(/-$/,"").replace(/^-/,"").trim().toLowerCase();var We=(e,t,{uuid:o=!0}={})=>{var r;if(!e||!t)return null;let n=M(e),s=(r=t.block[e])==null?void 0:r.value;if(s){let a=P("slug",s,t)||P("Slug",s,t)||z(v(s,t));if(a)return o?`${a}-${n}`:a}return n};var je=(e,t)=>{var r;let o=e.block,n=[],s=t;do{let a=(r=o[s])==null?void 0:r.value;if(!a)break;let m=v(a,e),c=B(a,e);if(!(m||c))break;n.push({block:a,active:s===t,pageId:s,title:m,icon:c});let l=O(a,e),i=l==null?void 0:l.id;if(!i)break;s=i}while(!0);return n.reverse(),n};import A from"is-url-superb";var Ye=(e,{mapImageUrl:t})=>{let n=Object.keys(e.block).flatMap(s=>{var m,c,l,i,u,y,f,T,b,d,x;let r=(m=e.block[s])==null?void 0:m.value,a=[];if(r){if(r.type==="image"){let _=((c=e.signed_urls)==null?void 0:c[r.id])||((u=(i=(l=r.properties)==null?void 0:l.source)==null?void 0:i[0])==null?void 0:u[0]);_.includes("file.notion.so")&&(_=(T=(f=(y=r.properties)==null?void 0:y.source)==null?void 0:f[0])==null?void 0:T[0]),_&&a.push({block:r,url:_})}if((b=r.format)!=null&&b.page_cover){let p=r.format.page_cover;a.push({block:r,url:p})}if((d=r.format)!=null&&d.bookmark_cover){let p=r.format.bookmark_cover;a.push({block:r,url:p})}if((x=r.format)!=null&&x.bookmark_icon){let p=r.format.bookmark_icon;a.push({block:r,url:p})}let k=B(r,e);k&&A(k)&&a.push({block:r,url:k})}return a}).filter(Boolean).map(({block:s,url:r})=>t(r,s)).filter(Boolean);return Array.from(new Set(n))};import X from"mem";import ee from"normalize-url";var te=X(e=>{if(!e)return"";try{if(e.startsWith("https://www.notion.so/image/")){let t=new URL(e),o=decodeURIComponent(t.pathname.substr(7)),n=te(o);t.pathname=`/image/${encodeURIComponent(n)}`,e=t.toString()}return ee(e,{stripProtocol:!0,stripWWW:!0,stripHash:!0,stripTextFragment:!0,removeQueryParameters:!0})}catch(t){return""}});function Xe(e,t){return{block:g(g({},e.block),t.block),collection:g(g({},e.collection),t.collection),collection_view:g(g({},e.collection_view),t.collection_view),notion_user:g(g({},e.notion_user),t.notion_user),collection_query:g(g({},e.collection_query),t.collection_query),signed_urls:g(g({},e.signed_urls),t.signed_urls),preview_images:g(g({},e.preview_images),t.preview_images)}}var F=(e,{month:t="short"}={})=>{let o=new Date(e);return`${o.toLocaleString("en-US",{month:t})} ${o.getUTCDate()}, ${o.getUTCFullYear()}`};var rt=e=>{let t=`${e.start_time||""} ${e.start_date} ${e.time_zone||""}`;return F(t)};function oe(e,t,{wordsPerMinute:o=275,imageReadTimeInSeconds:n=12}={}){let s=C(e,t),r=s.numWords/o,m=(s.numImages>10?s.numImages/2*(n+3)+(s.numImages-10)*3:s.numImages/2*(2*n+(1-s.numImages)))/60,c=r+m;return U(g({},s),{totalWordsReadTimeInMinutes:r,totalImageReadTimeInMinutes:m,totalReadTimeInMinutes:c})}function ct(e,t,o){let n=oe(e,t,o);return ne(n.totalReadTimeInMinutes)}function C(e,t){var n,s,r,a;let o={numWords:0,numImages:0};if(!e)return o;for(let m of e.content||[]){let c=(n=t.block[m])==null?void 0:n.value,l=!1;if(c){switch(c.type){case"quote":case"alias":case"header":case"sub_header":case"sub_sub_header":{let i=v(c,t);o.numWords+=E(i);break}case"callout":case"toggle":case"to_do":case"bulleted_list":case"numbered_list":case"text":{let i=v(c,t);o.numWords+=E(i),l=!0;break}case"embed":case"tweet":case"maps":case"pdf":case"figma":case"typeform":case"codepen":case"excalidraw":case"gist":case"video":case"drive":case"audio":case"file":case"image":o.numImages+=1;break;case"bookmark":o.numImages+=.25;break;case"code":o.numImages+=2;break;case"table":case"collection_view":o.numImages+=2;break;case"column":case"column_list":case"transclusion_container":l=!0;break;case"table_of_contents":{let i=e;if(!i)continue;let u=S(i,t);for(let y of u)o.numWords+=E(y.text);break}case"transclusion_reference":{let i=(r=(s=c==null?void 0:c.format)==null?void 0:s.transclusion_reference_pointer)==null?void 0:r.id;if(!i)continue;let u=(a=t.block[i])==null?void 0:a.value;u&&j(o,C(u,t));break}default:break}l&&j(o,C(c,t))}}return o}function j(e,t){e.numWords+=t.numWords,e.numImages+=t.numImages}function E(e){return e?(e.match(/\w+/g)||[]).length:0}function ne(e){return e<.5?"less than a minute":e<1.5?"1 minute":`${Math.ceil(e)} minutes`}export{oe as estimatePageReadTime,ct as estimatePageReadTimeAsHumanizedString,F as formatDate,rt as formatNotionDateTime,Ee as getAllPagesInSpace,w as getBlockCollectionId,B as getBlockIcon,O as getBlockParentPage,v as getBlockTitle,We as getCanonicalPageId,Y as getDateValue,je as getPageBreadcrumbs,Te as getPageContentBlockIds,Ye as getPageImageUrls,P as getPageProperty,S as getPageTableOfContents,pe as getPageTitle,h as getTextContent,L as idToUuid,A as isUrl,Xe as mergeRecordMaps,z as normalizeTitle,te as normalizeUrl,W as parsePageId,M as uuidToId};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/get-text-content.ts","../src/get-block-collection-id.ts","../src/get-block-title.ts","../src/get-block-icon.ts","../src/get-page-title.ts","../src/get-page-property.ts","../src/get-date-value.ts","../src/get-block-parent-page.ts","../src/get-page-table-of-contents.ts","../src/get-page-content-block-ids.ts","../src/id-to-uuid.ts","../src/parse-page-id.ts","../src/uuid-to-id.ts","../src/get-all-pages-in-space.ts","../src/normalize-title.ts","../src/get-canonical-page-id.ts","../src/get-page-breadcrumbs.ts","../src/is-url.ts","../src/get-page-image-urls.ts","../src/normalize-url.ts","../src/merge-record-maps.ts","../src/format-date.ts","../src/format-notion-date-time.ts","../src/estimate-page-read-time.ts"],"sourcesContent":["import * as types from '@texonom/ntypes'\n\n/**\n * Gets the raw, unformatted text content of a block's content value.\n *\n * This is useful, for instance, for extracting a block's `title` without any\n * rich text formatting.\n */\nexport const getTextContent = (text?: types.Decoration[]): string => {\n if (!text) return ''\n else if (Array.isArray(text))\n return text?.reduce((prev, current) => prev + (current[0] !== '⁍' && current[0] !== '‣' ? current[0] : ''), '') ?? ''\n else return text\n}\n","import { Block, ExtendedRecordMap } from '@texonom/ntypes'\n\nexport function getBlockCollectionId(block: Block, recordMap: ExtendedRecordMap): string | null {\n const collectionId = (block as any).collection_id || (block as any).format?.collection_pointer?.id\n\n if (collectionId) return collectionId\n\n const collectionViewId = (block as any)?.view_ids?.[0]\n if (collectionViewId) {\n const collectionView = recordMap.collection_view?.[collectionViewId]?.value\n if (collectionView) {\n const collectionId = collectionView.format?.collection_pointer?.id\n return collectionId\n }\n }\n\n return null\n}\n","import { Block, ExtendedRecordMap } from '@texonom/ntypes'\n\nimport { getBlockCollectionId } from './get-block-collection-id'\nimport { getTextContent } from './get-text-content'\n\nexport function getBlockTitle(block: Block, recordMap: ExtendedRecordMap) {\n if (block.properties?.title) return getTextContent(block.properties.title)\n\n if (block.type === 'collection_view_page' || block.type === 'collection_view') {\n const collectionId = getBlockCollectionId(block, recordMap)\n\n if (collectionId) {\n const collection = recordMap.collection[collectionId]?.value\n\n if (collection) return getTextContent(collection.name)\n }\n }\n\n return ''\n}\n","import { Block, ExtendedRecordMap, PageBlock } from '@texonom/ntypes'\n\nimport { getBlockCollectionId } from './get-block-collection-id'\n\nexport function getBlockIcon(block: Block, recordMap: ExtendedRecordMap) {\n if ((block as PageBlock).format?.page_icon) return (block as PageBlock).format?.page_icon\n\n if (block.type === 'collection_view_page' || block.type === 'collection_view') {\n const collectionId = getBlockCollectionId(block, recordMap)\n if (collectionId) {\n const collection = recordMap.collection[collectionId]?.value\n\n if (collection) return collection.icon\n }\n }\n\n return null\n}\n","import { ExtendedRecordMap } from '@texonom/ntypes'\n\nimport { getBlockTitle } from './get-block-title'\n\nexport function getPageTitle(recordMap: ExtendedRecordMap) {\n const pageBlock = recordMap.block[Object.keys(recordMap.block)[0]]?.value\n\n if (pageBlock) return getBlockTitle(pageBlock, recordMap)\n\n return null\n}\n","import { Block, DateFormat, ExtendedRecordMap } from '@texonom/ntypes'\n\nimport { getTextContent } from './get-text-content'\n\n/**\n * Gets the value of a collection property for a given page (collection item).\n *\n * @param propertyName property name\n * @param block Page block, often be first block in blockMap\n * @param recordMap\n * @returns - The return value types will follow the following principles:\n * 1. if property is date type, it will return `number` or `number[]`(depends on `End Date` switch)\n * 2. property is text-like will return `string`\n * 3. multi select property will return `string[]`\n * 4. checkbox property return `boolean`\n * @todo complete all no-text property type\n */\nexport function getPageProperty<T = string | number | boolean | string[] | number[]>(\n propertyName: string,\n block: Block,\n recordMap: ExtendedRecordMap\n): T\nexport function getPageProperty(propertyName: string, block: Block, recordMap: ExtendedRecordMap) {\n try {\n if (!block.properties || !Object.keys(recordMap.collection))\n // console.warn(\n // `block ${block.id} has no properties or this recordMap has no collection record`\n // )\n return null\n\n const collection = recordMap.collection[block.parent_id]?.value\n\n if (collection) {\n const propertyNameL = propertyName.toLowerCase()\n const propertyId = Object.keys(collection.schema).find(\n key => collection.schema[key]?.name?.toLowerCase() === propertyNameL\n )\n\n if (!propertyId) return null\n\n const { type } = collection.schema[propertyId]\n const content = getTextContent(block.properties[propertyId])\n\n switch (type) {\n case 'created_time':\n return block.created_time\n\n case 'multi_select':\n return content.split(',')\n\n case 'date': {\n const property = block.properties[propertyId] as [['‣', [DateFormat]]]\n const formatDate = property[0][1][0][1]\n\n if (formatDate.type == 'datetime') {\n return new Date(`${formatDate.start_date} ${formatDate.start_time}`).getTime()\n } else if (formatDate.type == 'date') {\n return new Date(formatDate.start_date).getTime()\n } else if (formatDate.type == 'datetimerange') {\n const { start_date, start_time, end_date, end_time } = formatDate\n const startTime = new Date(`${start_date} ${start_time}`).getTime()\n const endTime = new Date(`${end_date} ${end_time}`).getTime()\n return [startTime, endTime]\n } else {\n const startTime = new Date(formatDate.start_date).getTime()\n const endTime = new Date(formatDate.end_date).getTime()\n return [startTime, endTime]\n }\n }\n\n case 'checkbox':\n return content == 'Yes'\n\n case 'last_edited_time':\n return block.last_edited_time\n\n default:\n return content\n }\n }\n } catch {\n // ensure that no matter what, we don't throw errors because of an unexpected\n // collection data format\n }\n\n return null\n}\n","import * as types from '@texonom/ntypes'\n\n/**\n * Attempts to find a valid date from a given property.\n */\nexport const getDateValue = (prop: any[]): types.FormattedDate | null => {\n if (prop && Array.isArray(prop))\n if (prop[0] === 'd') return prop[1]\n else\n for (const v of prop) {\n const value = getDateValue(v)\n if (value) return value\n }\n\n return null\n}\n","import * as types from '@texonom/ntypes'\n\n/**\n * Returns the parent page block containing a given page.\n *\n * Note that many times this will not be the direct parent block since\n * some non-page content blocks can contain sub-blocks.\n */\nexport const getBlockParentPage = (\n block: types.Block,\n recordMap: types.ExtendedRecordMap,\n {\n inclusive = false\n }: {\n inclusive?: boolean\n } = {}\n): types.PageBlock | null => {\n let currentRecord: types.Block | types.Collection = block\n\n while (currentRecord != null) {\n if (inclusive && (currentRecord as types.Block)?.type === 'page') return currentRecord as types.PageBlock\n\n const parentId: string = currentRecord.parent_id\n const parentTable = currentRecord.parent_table\n\n if (!parentId) break\n\n if (parentTable === 'collection') {\n currentRecord = recordMap.collection[parentId]?.value\n } else {\n currentRecord = recordMap.block[parentId]?.value\n\n if ((currentRecord as types.Block)?.type === 'page') return currentRecord as types.PageBlock\n }\n }\n\n return null\n}\n","import * as types from '@texonom/ntypes'\n\nimport { getTextContent } from './get-text-content'\n\nexport interface TableOfContentsEntry {\n id: types.ID\n type: types.BlockType\n text: string\n indentLevel: number\n}\n\nconst indentLevels = {\n header: 0,\n sub_header: 1,\n sub_sub_header: 2\n}\n\n/**\n * Gets the metadata for a table of contents block by parsing the page's\n * H1, H2, and H3 elements.\n */\nexport const getPageTableOfContents = (\n page: types.PageBlock,\n recordMap: types.ExtendedRecordMap\n): Array<TableOfContentsEntry> => {\n const toc = (page.content ?? [])\n .map((blockId: string) => {\n const block = recordMap.block[blockId]?.value\n\n if (block) {\n const { type } = block\n\n if (type === 'header' || type === 'sub_header' || type === 'sub_sub_header')\n return {\n id: blockId,\n type,\n text: getTextContent(block.properties?.title),\n indentLevel: indentLevels[type]\n }\n }\n\n return null\n })\n .filter(Boolean) as Array<TableOfContentsEntry>\n\n const indentLevelStack = [\n {\n actual: -1,\n effective: -1\n }\n ]\n\n // Adjust indent levels to always change smoothly.\n // This is a little tricky, but the key is that when increasing indent levels,\n // they should never jump more than one at a time.\n for (const tocItem of toc) {\n const { indentLevel } = tocItem\n const actual = indentLevel\n\n do {\n const prevIndent = indentLevelStack[indentLevelStack.length - 1]\n const { actual: prevActual, effective: prevEffective } = prevIndent\n\n if (actual > prevActual) {\n tocItem.indentLevel = prevEffective + 1\n indentLevelStack.push({\n actual,\n effective: tocItem.indentLevel\n })\n } else if (actual === prevActual) {\n tocItem.indentLevel = prevEffective\n break\n } else {\n indentLevelStack.pop()\n }\n\n // eslint-disable-next-line no-constant-condition\n } while (true)\n }\n\n return toc\n}\n","import * as types from '@texonom/ntypes'\n\n/**\n * Gets the IDs of all blocks contained on a page starting from a root block ID.\n */\nexport const getPageContentBlockIds = (recordMap: types.ExtendedRecordMap, blockId?: string): string[] => {\n const rootBlockId = blockId || Object.keys(recordMap.block)[0]\n const contentBlockIds = new Set<string>()\n\n function addContentBlocks(blockId: string) {\n if (contentBlockIds.has(blockId)) return\n contentBlockIds.add(blockId)\n\n const block = recordMap.block[blockId]?.value\n if (!block) return\n\n const { content, type, properties, format } = block\n if (properties)\n // TODO: this needs some love, especially for resolving relation properties\n // see this collection_view_page for an example: 8a586d253f984b85b48254da84465d23\n for (const key of Object.keys(properties)) {\n const p = properties[key]\n p.map((d: any) => {\n const value = d?.[0]?.[1]?.[0]\n if (value?.[0] === 'p' && value[1]) addContentBlocks(value[1])\n })\n\n // [[\"‣\", [[\"p\", \"841918aa-f2a3-4d4c-b5ad-64b0f57c47b8\"]]]]\n const value = p?.[0]?.[1]?.[0]\n\n if (value?.[0] === 'p' && value[1]) addContentBlocks(value[1])\n }\n\n if (format) {\n const referenceId = format.transclusion_reference_pointer?.id\n if (referenceId) addContentBlocks(referenceId)\n }\n\n if (!content || !Array.isArray(content))\n // no child content blocks to recurse on\n return\n\n if (blockId !== rootBlockId)\n if (type === 'page' || type === 'collection_view_page')\n // ignore the content of other pages and collections\n return\n\n for (const blockId of content) addContentBlocks(blockId)\n }\n\n addContentBlocks(rootBlockId)\n return Array.from(contentBlockIds)\n}\n","export const idToUuid = (id = '') =>\n `${id.substr(0, 8)}-${id.substr(8, 4)}-${id.substr(12, 4)}-${id.substr(16, 4)}-${id.substr(20)}`\n","import { idToUuid } from './id-to-uuid'\n\nconst pageIdRe = /\\b([a-f0-9]{32})\\b/\nconst pageId2Re = /\\b([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})\\b/\n\n/**\n * Robustly extracts the notion page ID from a notion URL or pathname suffix.\n *\n * Defaults to returning a UUID (with dashes).\n */\nexport const parsePageId = (id: string | null = '', { uuid = true }: { uuid?: boolean } = {}) => {\n if (!id) return null\n\n id = id.split('?')[0]\n const match = id.match(pageIdRe)\n\n if (match) return uuid ? idToUuid(match[1]) : match[1]\n\n const match2 = id.match(pageId2Re)\n if (match2) return uuid ? match2[1] : match2[1].replace(/-/g, '')\n\n return null\n}\n","export const uuidToId = (uuid: string) => uuid.replace(/-/g, '')\n","import { ExtendedRecordMap, PageMap } from '@texonom/ntypes'\nimport PQueue from 'p-queue'\n\nimport { parsePageId } from './parse-page-id'\n\n/**\n * Performs a traversal over a given Notion workspace starting from a seed page.\n *\n * Returns a map containing all of the pages that are reachable from the seed\n * page in the space.\n *\n * If `rootSpaceId` is not defined, the space ID of the root page will be used\n * to scope traversal.\n *\n *\n * @param rootPageId - Page ID to start from.\n * @param rootSpaceId - Space ID to scope traversal.\n * @param getPage - Function used to fetch a single page.\n * @param opts - Optional config\n */\nexport async function getAllPagesInSpace(\n rootPageId: string,\n rootSpaceId: string | undefined,\n getPage: (pageId: string) => Promise<ExtendedRecordMap>,\n {\n concurrency = 4,\n traverseCollections = true,\n targetPageId = null\n }: {\n concurrency?: number\n traverseCollections?: boolean\n targetPageId?: string\n } = {}\n): Promise<PageMap> {\n const pages: PageMap = {}\n const pendingPageIds = new Set<string>()\n const queue = new PQueue({ concurrency })\n\n async function processPage(pageId: string) {\n if (targetPageId && pendingPageIds.has(targetPageId)) return\n\n pageId = parsePageId(pageId) as string\n\n if (pageId && !pages[pageId] && !pendingPageIds.has(pageId)) {\n pendingPageIds.add(pageId)\n\n queue.add(async () => {\n try {\n if (targetPageId && pendingPageIds.has(targetPageId) && pageId !== targetPageId) return\n\n const page = await getPage(pageId)\n if (!page) return\n\n const spaceId = page.block[pageId]?.value?.space_id\n\n if (spaceId)\n if (!rootSpaceId) rootSpaceId = spaceId\n else if (rootSpaceId !== spaceId) return\n\n Object.keys(page.block)\n .filter(key => {\n const block = page.block[key]?.value\n if (!block) return false\n\n if (block.type !== 'page' && block.type !== 'collection_view_page') return false\n\n // the space id check is important to limit traversal because pages\n // can reference pages in other spaces\n if (rootSpaceId && block.space_id && block.space_id !== rootSpaceId) return false\n\n return true\n })\n .forEach(subPageId => processPage(subPageId))\n\n // traverse collection item pages as they may contain subpages as well\n if (traverseCollections)\n for (const collectionViews of Object.values(page.collection_query))\n for (const collectionData of Object.values(collectionViews)) {\n const { blockIds } = collectionData\n\n if (blockIds) for (const collectionItemId of blockIds) processPage(collectionItemId)\n }\n\n pages[pageId] = page\n } catch (err) {\n console.warn('page load error', { pageId, spaceId: rootSpaceId }, err.statusCode, err.message)\n pages[pageId] = null\n }\n\n pendingPageIds.delete(pageId)\n })\n }\n }\n\n await processPage(rootPageId)\n await queue.onIdle()\n\n return pages\n}\n","export const normalizeTitle = (title?: string | null): string => {\n return (title || '')\n .replace(/ /g, '-')\n .replace(/[^a-zA-Z0-9-\\u4e00-\\u9FFF\\u3041-\\u3096\\u30A1-\\u30FC\\u3000-\\u303F]/g, '')\n .replace(/--/g, '-')\n .replace(/-$/, '')\n .replace(/^-/, '')\n .trim()\n .toLowerCase()\n}\n","import { ExtendedRecordMap } from '@texonom/ntypes'\n\nimport { getBlockTitle } from './get-block-title'\nimport { getPageProperty } from './get-page-property'\nimport { normalizeTitle } from './normalize-title'\nimport { uuidToId } from './uuid-to-id'\n\n/**\n * Gets the canonical, display-friendly version of a page's ID for use in URLs.\n */\nexport const getCanonicalPageId = (\n pageId: string,\n recordMap: ExtendedRecordMap,\n { uuid = true }: { uuid?: boolean } = {}\n): string | null => {\n if (!pageId || !recordMap) return null\n\n const id = uuidToId(pageId)\n const block = recordMap.block[pageId]?.value\n\n if (block) {\n const slug =\n (getPageProperty('slug', block, recordMap) as string | null) ||\n (getPageProperty('Slug', block, recordMap) as string | null) ||\n normalizeTitle(getBlockTitle(block, recordMap))\n\n if (slug)\n if (uuid) return `${slug}-${id}`\n else return slug\n }\n\n return id\n}\n","import * as types from '@texonom/ntypes'\n\nimport { getBlockIcon } from './get-block-icon'\nimport { getBlockParentPage } from './get-block-parent-page'\nimport { getBlockTitle } from './get-block-title'\n\nexport const getPageBreadcrumbs = (recordMap: types.ExtendedRecordMap, activePageId: string): Array<any> | null => {\n const blockMap = recordMap.block\n const breadcrumbs = []\n\n let currentPageId = activePageId\n\n do {\n const block = blockMap[currentPageId]?.value\n if (!block) break\n\n const title = getBlockTitle(block, recordMap)\n const icon = getBlockIcon(block, recordMap)\n\n if (!(title || icon)) break\n\n breadcrumbs.push({\n block,\n active: currentPageId === activePageId,\n pageId: currentPageId,\n title,\n icon\n })\n\n const parentBlock = getBlockParentPage(block, recordMap)\n const parentId = parentBlock?.id\n\n if (!parentId) break\n\n currentPageId = parentId\n\n // eslint-disable-next-line no-constant-condition\n } while (true)\n\n breadcrumbs.reverse()\n\n return breadcrumbs\n}\n","import isUrl from 'is-url-superb'\n\nexport { isUrl }\n","import * as types from '@texonom/ntypes'\n\nimport { getBlockIcon } from './get-block-icon'\nimport { isUrl } from './is-url'\n\n/**\n * Gets URLs of all images contained on the given page.\n */\nexport const getPageImageUrls = (\n recordMap: types.ExtendedRecordMap,\n {\n mapImageUrl\n }: {\n mapImageUrl: (url: string, block: types.Block) => string | null\n }\n): string[] => {\n const blockIds = Object.keys(recordMap.block)\n const imageUrls: string[] = blockIds\n .flatMap(blockId => {\n const block = recordMap.block[blockId]?.value\n const images: Array<{ block: types.Block; url: string }> = []\n\n if (block) {\n if (block.type === 'image') {\n const signedUrl = recordMap.signed_urls?.[block.id]\n let source = signedUrl || block.properties?.source?.[0]?.[0]\n if (source.includes('file.notion.so')) source = block.properties?.source?.[0]?.[0]\n\n if (source)\n images.push({\n block,\n url: source\n })\n }\n\n if ((block.format as any)?.page_cover) {\n const source = (block.format as any).page_cover\n\n images.push({\n block,\n url: source\n })\n }\n\n if ((block.format as any)?.bookmark_cover) {\n const source = (block.format as any).bookmark_cover\n\n images.push({\n block,\n url: source\n })\n }\n\n if ((block.format as any)?.bookmark_icon) {\n const source = (block.format as any).bookmark_icon\n\n images.push({\n block,\n url: source\n })\n }\n\n const pageIcon = getBlockIcon(block, recordMap)\n if (pageIcon && isUrl(pageIcon))\n images.push({\n block,\n url: pageIcon\n })\n }\n\n return images\n })\n .filter(Boolean)\n .map(({ block, url }) => mapImageUrl(url, block))\n .filter(Boolean)\n\n return Array.from(new Set(imageUrls))\n}\n","import mem from 'mem'\nimport normalizeUrlImpl from 'normalize-url'\n\nexport const normalizeUrl = mem((url?: string) => {\n if (!url) return ''\n\n try {\n if (url.startsWith('https://www.notion.so/image/')) {\n const u = new URL(url)\n const subUrl = decodeURIComponent(u.pathname.substr('/image/'.length))\n const normalizedSubUrl = normalizeUrl(subUrl)\n u.pathname = `/image/${encodeURIComponent(normalizedSubUrl)}`\n url = u.toString()\n }\n\n return normalizeUrlImpl(url, {\n stripProtocol: true,\n stripWWW: true,\n stripHash: true,\n stripTextFragment: true,\n removeQueryParameters: true\n })\n } catch (err) {\n return ''\n }\n})\n","import { ExtendedRecordMap } from '@texonom/ntypes'\n\nexport function mergeRecordMaps(recordMapA: ExtendedRecordMap, recordMapB: ExtendedRecordMap): ExtendedRecordMap {\n const mergedRecordMap: ExtendedRecordMap = {\n block: {\n ...recordMapA.block,\n ...recordMapB.block\n },\n collection: {\n ...recordMapA.collection,\n ...recordMapB.collection\n },\n collection_view: {\n ...recordMapA.collection_view,\n ...recordMapB.collection_view\n },\n notion_user: {\n ...recordMapA.notion_user,\n ...recordMapB.notion_user\n },\n collection_query: {\n ...recordMapA.collection_query,\n ...recordMapB.collection_query\n },\n signed_urls: {\n ...recordMapA.signed_urls,\n ...recordMapB.signed_urls\n },\n preview_images: {\n ...recordMapA.preview_images,\n ...recordMapB.preview_images\n }\n }\n\n return mergedRecordMap\n}\n","export const formatDate = (input: string | number, { month = 'short' }: { month?: 'long' | 'short' } = {}) => {\n const date = new Date(input)\n const monthLocale = date.toLocaleString('en-US', { month })\n return `${monthLocale} ${date.getUTCDate()}, ${date.getUTCFullYear()}`\n}\n","import { formatDate } from './format-date'\n\nexport interface NotionDateTime {\n type: 'datetime'\n start_date: string\n start_time?: string\n time_zone?: string\n}\n\nexport const formatNotionDateTime = (datetime: NotionDateTime) => {\n const dateString = `${datetime.start_time || ''} ${datetime.start_date} ${datetime.time_zone || ''}`\n return formatDate(dateString)\n}\n","import { Block, ExtendedRecordMap, PageBlock } from '@texonom/ntypes'\n\nimport { getBlockTitle } from './get-block-title'\nimport { getPageTableOfContents } from './get-page-table-of-contents'\n\ntype EstimatePageReadTimeOptions = {\n wordsPerMinute?: number\n imageReadTimeInSeconds?: number\n}\n\ntype ContentStats = {\n numWords: number\n numImages: number\n}\n\ntype PageReadTimeEstimate = ContentStats & {\n totalWordsReadTimeInMinutes: number\n totalImageReadTimeInMinutes: number\n totalReadTimeInMinutes: number\n}\n\n/**\n * Returns an estimate for the time it would take for a person to read the content\n * in the given Notion page.\n *\n * Uses Medium for inspiration.\n *\n * @see https://blog.medium.com/read-time-and-you-bc2048ab620c\n * @see https://github.com/ngryman/reading-time\n *\n * TODO: handle non-english content.\n */\nexport function estimatePageReadTime(\n block: Block,\n recordMap: ExtendedRecordMap,\n { wordsPerMinute = 275, imageReadTimeInSeconds = 12 }: EstimatePageReadTimeOptions = {}\n): PageReadTimeEstimate {\n const stats = getBlockContentStats(block, recordMap)\n const totalWordsReadTimeInMinutes = stats.numWords / wordsPerMinute\n const totalImageReadTimeInSeconds =\n stats.numImages > 10\n ? (stats.numImages / 2) * (imageReadTimeInSeconds + 3) + (stats.numImages - 10) * 3 // n/2(a+b) + 3 sec/image\n : (stats.numImages / 2) * (2 * imageReadTimeInSeconds + (1 - stats.numImages)) // n/2[2a+(n-1)d]\n const totalImageReadTimeInMinutes = totalImageReadTimeInSeconds / 60\n\n const totalReadTimeInMinutes = totalWordsReadTimeInMinutes + totalImageReadTimeInMinutes\n\n return {\n ...stats,\n totalWordsReadTimeInMinutes,\n totalImageReadTimeInMinutes,\n totalReadTimeInMinutes\n }\n}\n\n/**\n * Same as `estimatePageReadTime`, except it returns the total time estimate as\n * a human-readable string.\n *\n * For example, \"9 minutes\" or \"less than a minute\".\n */\nexport function estimatePageReadTimeAsHumanizedString(\n block: Block,\n recordMap: ExtendedRecordMap,\n opts: EstimatePageReadTimeOptions\n) {\n const estimate = estimatePageReadTime(block, recordMap, opts)\n return humanizeReadTime(estimate.totalReadTimeInMinutes)\n}\n\nfunction getBlockContentStats(block: Block, recordMap: ExtendedRecordMap): ContentStats {\n const stats: ContentStats = {\n numWords: 0,\n numImages: 0\n }\n\n if (!block) return stats\n\n for (const childId of block.content || []) {\n const child = recordMap.block[childId]?.value\n let recurse = false\n if (!child) continue\n\n switch (child.type) {\n case 'quote':\n // fallthrough\n case 'alias':\n // fallthrough\n case 'header':\n // fallthrough\n case 'sub_header':\n // fallthrough\n case 'sub_sub_header': {\n const title = getBlockTitle(child, recordMap)\n stats.numWords += countWordsInText(title)\n break\n }\n\n case 'callout':\n // fallthrough\n case 'toggle':\n // fallthrough\n case 'to_do':\n // fallthrough\n case 'bulleted_list':\n // fallthrough\n case 'numbered_list':\n // fallthrough\n case 'text': {\n const title = getBlockTitle(child, recordMap)\n stats.numWords += countWordsInText(title)\n recurse = true\n break\n }\n\n case 'embed':\n // fallthrough\n case 'tweet':\n // fallthrough\n case 'maps':\n // fallthrough\n case 'pdf':\n // fallthrough\n case 'figma':\n // fallthrough\n case 'typeform':\n // fallthrough\n case 'codepen':\n // fallthrough\n case 'excalidraw':\n // fallthrough\n case 'gist':\n // fallthrough\n case 'video':\n // fallthrough\n case 'drive':\n // fallthrough\n case 'audio':\n // fallthrough\n case 'file':\n // fallthrough\n case 'image':\n // treat all embeds as images\n stats.numImages += 1\n break\n\n case 'bookmark':\n // treat bookmarks as quarter images since they aren't as content-ful as embedd images\n stats.numImages += 0.25\n break\n\n case 'code':\n // treat code blocks as double the complexity of images\n stats.numImages += 2\n break\n\n case 'table':\n // fallthrough\n case 'collection_view':\n // treat collection views as double the complexity of images\n stats.numImages += 2\n break\n\n case 'column':\n // fallthrough\n case 'column_list':\n // fallthrough\n case 'transclusion_container':\n recurse = true\n break\n\n case 'table_of_contents': {\n const page = block as PageBlock\n if (!page) continue\n\n const toc = getPageTableOfContents(page, recordMap)\n for (const tocItem of toc) stats.numWords += countWordsInText(tocItem.text)\n\n break\n }\n\n case 'transclusion_reference': {\n const referencePointerId = child?.format?.transclusion_reference_pointer?.id\n\n if (!referencePointerId) continue\n\n const referenceBlock = recordMap.block[referencePointerId]?.value\n if (referenceBlock) mergeContentStats(stats, getBlockContentStats(referenceBlock, recordMap))\n\n break\n }\n\n default:\n // ignore unrecognized blocks\n break\n }\n\n if (recurse) mergeContentStats(stats, getBlockContentStats(child, recordMap))\n }\n\n return stats\n}\n\nfunction mergeContentStats(statsA: ContentStats, statsB: ContentStats) {\n statsA.numWords += statsB.numWords\n statsA.numImages += statsB.numImages\n}\n\nfunction countWordsInText(text: string): number {\n if (!text) return 0\n\n return (text.match(/\\w+/g) || []).length\n}\n\nfunction humanizeReadTime(time: number): string {\n if (time < 0.5) return 'less than a minute'\n\n if (time < 1.5) return '1 minute'\n\n return `${Math.ceil(time)} minutes`\n}\n"],"mappings":"0nBAQO,IAAMA,EAAkBC,GAAsC,CARrE,IAAAC,EASE,OAAKD,EACI,MAAM,QAAQA,CAAI,GAClBC,EAAAD,GAAA,YAAAA,EAAM,OAAO,CAACE,EAAMC,IAAYD,GAAQC,EAAQ,CAAC,IAAM,UAAOA,EAAQ,CAAC,IAAM,SAAMA,EAAQ,CAAC,EAAI,IAAK,MAArG,KAAAF,EAA4G,GACzGD,EAHM,EAIpB,ECXO,SAASI,EAAqBC,EAAcC,E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a","prev","current","getBlockCollectionId","block","recordMap","_a","_b","_c","_d","_e","_f","_g","collectionId","collectionViewId","collectionView","getBlockTitle","block","recordMap","_a","_b","getTextContent","collectionId","getBlockCollectionId","collection","getBlockIcon","block","recordMap","_a","_b","_c","collectionId","getBlockCollectionId","collection","getPageTitle","recordMap","_a","pageBlock","getBlockTitle","getPageProperty","propertyName","block","recordMap","_a","collection","propertyNameL","propertyId","key","_b","type","content","getTextContent","formatDate","start_date","start_time","end_date","end_time","startTime","endTime","e","getDateValue","prop","v","value","getBlockParentPage","block","recordMap","inclusive","_a","_b","currentRecord","parentId","parentTable","indentLevels","getPageTableOfContents","page","recordMap","_a","toc","blockId","_b","block","type","getTextContent","indentLevelStack","tocItem","indentLevel","actual","prevIndent","prevActual","prevEffective","getPageContentBlockIds","recordMap","blockId","rootBlockId","contentBlockIds","addContentBlocks","_a","_b","_c","_d","block","content","type","properties","format","key","p","d","value","referenceId","idToUuid","id","pageIdRe","pageId2Re","parsePageId","id","uuid","match","idToUuid","match2","uuidToId","uuid","PQueue","getAllPagesInSpace","_0","_1","_2","__async","rootPageId","rootSpaceId","getPage","concurrency","traverseCollections","targetPageId","pages","pendingPageIds","queue","PQueue","processPage","pageId","parsePageId","_a","_b","page","spaceId","key","block","subPageId","collectionViews","collectionData","blockIds","collectionItemId","err","normalizeTitle","title","getCanonicalPageId","pageId","recordMap","uuid","_a","id","uuidToId","block","slug","getPageProperty","normalizeTitle","getBlockTitle","getPageBreadcrumbs","recordMap","activePageId","_a","blockMap","breadcrumbs","currentPageId","block","title","getBlockTitle","icon","getBlockIcon","parentBlock","getBlockParentPage","parentId","isUrl","getPageImageUrls","recordMap","mapImageUrl","imageUrls","blockId","_a","_b","_c","_d","_e","_f","_g","_h","_i","_j","_k","block","images","source","pageIcon","getBlockIcon","isUrl","url","mem","normalizeUrlImpl","normalizeUrl","url","u","subUrl","normalizedSubUrl","err","mergeRecordMaps","recordMapA","recordMapB","__spreadValues","formatDate","input","month","date","formatNotionDateTime","datetime","dateString","formatDate","estimatePageReadTime","block","recordMap","wordsPerMinute","imageReadTimeInSeconds","stats","getBlockContentStats","totalWordsReadTimeInMinutes","totalImageReadTimeInMinutes","totalReadTimeInMinutes","__spreadProps","__spreadValues","estimatePageReadTimeAsHumanizedString","opts","estimate","humanizeReadTime","_a","_b","_c","_d","childId","child","recurse","title","getBlockTitle","countWordsInText","page","toc","getPageTableOfContents","tocItem","referencePointerId","referenceBlock","mergeContentStats","statsA","statsB","text","time"]}
@@ -0,0 +1,35 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,4 @@
1
+ export declare const formatDate: (input: string | number, { month }?: {
2
+ month?: 'long' | 'short';
3
+ }) => string;
4
+ //# sourceMappingURL=format-date.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,22 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,16 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,13 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
1
+ import { ExtendedRecordMap } from '@texonom/ntypes';
2
+ export declare function getPageTitle(recordMap: ExtendedRecordMap): string;
3
+ //# sourceMappingURL=get-page-title.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export declare const idToUuid: (id?: string) => string;
2
+ //# sourceMappingURL=id-to-uuid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id-to-uuid.d.ts","sourceRoot":"","sources":["../../src/id-to-uuid.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,yBAC6E,CAAA"}
@@ -0,0 +1,25 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
1
+ import isUrl from 'is-url-superb';
2
+ export { isUrl };
3
+ //# sourceMappingURL=is-url.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
1
+ import { ExtendedRecordMap } from '@texonom/ntypes';
2
+ export declare function mergeRecordMaps(recordMapA: ExtendedRecordMap, recordMapB: ExtendedRecordMap): ExtendedRecordMap;
3
+ //# sourceMappingURL=merge-record-maps.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export declare const normalizeTitle: (title?: string | null) => string;
2
+ //# sourceMappingURL=normalize-title.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export declare const normalizeUrl: (url?: string) => string;
2
+ //# sourceMappingURL=normalize-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-url.d.ts","sourceRoot":"","sources":["../../src/normalize-url.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,SAAc,MAAM,WAsB3C,CAAA"}
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export declare const uuidToId: (uuid: string) => string;
2
+ //# sourceMappingURL=uuid-to-id.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=normalize-url.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-url.test.d.ts","sourceRoot":"","sources":["../../test/normalize-url.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parse-page-id.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-page-id.test.d.ts","sourceRoot":"","sources":["../../test/parse-page-id.test.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@texonom/nutils",
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "description": "Useful utilities for working with Notion data. Isomorphic.",
6
+ "repository": "texonom/notion",
7
+ "author": "Alan Jo <sungle3737@gmail.com>",
8
+ "license": "MIT",
9
+ "main": "./build/index.js",
10
+ "module": "./build/index.js",
11
+ "types": "./build/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./build/index.d.ts",
15
+ "default": "./build/index.js"
16
+ }
17
+ },
18
+ "sideEffects": false,
19
+ "files": [
20
+ "build"
21
+ ],
22
+ "engines": {
23
+ "node": ">=v12.22.12"
24
+ },
25
+ "dependencies": {
26
+ "is-url-superb": "^6.1.0",
27
+ "mem": "^9.0.2",
28
+ "normalize-url": "^7.2.0",
29
+ "p-queue": "^7.3.4",
30
+ "@texonom/ntypes": "^1.1.0"
31
+ },
32
+ "standard-version": {
33
+ "skip": {
34
+ "commit": true,
35
+ "tag": true
36
+ }
37
+ },
38
+ "scripts": {
39
+ "build": "tsc && tsup",
40
+ "watch": "tsup --watch --silent --onSuccess 'echo build successful'",
41
+ "test": "vitest --run",
42
+ "prerelease": "standard-version --skip.changelog --prerelease",
43
+ "release": "standard-version --release-as",
44
+ "pu": "pnpm publish"
45
+ }
46
+ }
package/readme.md ADDED
@@ -0,0 +1,42 @@
1
+ <p align="center">
2
+ <img alt="React Notion X" src="https://raw.githubusercontent.com/texonom/notion/master/media/notion-ts.png" width="689">
3
+ </p>
4
+
5
+ # nutils
6
+
7
+ > Useful utilities for working with Notion data. Isomorphic.
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)
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install nutils
15
+ ```
16
+
17
+ This package is compatible with both Node.js and client-side web usage.
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { parsePageId } from '@texonom/nutils'
23
+
24
+ parsePageId('https://www.notion.so/Notion-Tests-067dd719a912471ea9a3ac10710e7fdf')
25
+ // '067dd719-a912-471e-a9a3-ac10710e7fdf'
26
+
27
+ parsePageId('About-d9ae0c6e7cad49a78e21d240cf2e3d04')
28
+ // 'd9ae0c6e-7cad-49a7-8e21-d240cf2e3d04'
29
+
30
+ parsePageId('About-d9ae0c6e7cad49a78e21d240cf2e3d04', { uuid: false })
31
+ // 'd9ae0c6e7cad49a78e21d240cf2e3d04'
32
+ ```
33
+
34
+ ## Docs
35
+
36
+ See the [full docs](https://github.com/texonom/notion).
37
+
38
+ ## License
39
+
40
+ MIT © [Travis Fischer](https://transitivebullsh.it)
41
+
42
+ Support my OSS work by <a href="https://twitter.com/transitive_bs">following me on twitter <img src="https://storage.googleapis.com/saasify-assets/twitter-logo.svg" alt="twitter" height="24px" align="center"></a>