index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/NotionX
petrpan-code/NotionX/react-notion-x/tsconfig.json
{ "compilerOptions": { "composite": true }, "files": [], "include": [], "references": [ { "path": "./packages/notion-types/tsconfig.json" }, { "path": "./packages/notion-utils/tsconfig.json" }, { "path": "./packages/notion-client/tsconfig.json" }, { "pat...
1,100
0
petrpan-code/NotionX
petrpan-code/NotionX/react-notion-x/yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@ampproject/remapping@^2.1.0": version "2.1.2" resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz" integrity sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFX...
1,101
0
petrpan-code/NotionX/react-notion-x
petrpan-code/NotionX/react-notion-x/.husky/pre-commit
#!/bin/sh . "$(dirname "$0")/_/husky.sh" npm run pre-commit
1,102
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/cra/package.json
{ "name": "notion-x-example-cra", "version": "6.16.1", "private": true, "scripts": { "dev": "GENERATE_SOURCEMAP=false react-scripts start", "start": "GENERATE_SOURCEMAP=false react-scripts start", "build": "GENERATE_SOURCEMAP=false react-scripts build", "eject": "GENERATE_SOURCEMAP=false react-s...
1,103
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/cra/readme.md
# Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view...
1,104
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/cra/tsconfig.json
{ "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, ...
1,105
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/public/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <meta name="description" content="Web site created u...
1,106
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/public/manifest.json
{ "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { "src": "logo192.png", "type": "image/png", "sizes": "192x192" }, { "src": "logo512.png", ...
1,107
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/public/robots.txt
# https://www.robotstxt.org/robotstxt.html User-agent: * Disallow:
1,108
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/src/App.tsx
import { ExtendedRecordMap } from 'notion-types' import { NotionRenderer } from 'react-notion-x' import { Code } from 'react-notion-x/build/third-party/code' import { Collection } from 'react-notion-x/build/third-party/collection' import { Equation } from 'react-notion-x/build/third-party/equation' import { Modal } fro...
1,109
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/src/config.ts
// TODO: change these to your own values // NOTE: rootNotionSpaceId is optional; set it to undefined if you don't want to // use it. export const rootNotionPageId = '067dd719a912471ea9a3ac10710e7fdf' export const rootNotionSpaceId = 'fde5ac74-eea3-4527-8f00-4482710e1af3'
1,110
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/src/index.css
* { box-sizing: border-box; } body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
1,111
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/src/index.tsx
import * as React from 'react' import * as ReactDOM from 'react-dom' // core styles shared by all of react-notion-x (required) import 'react-notion-x/src/styles.css' import App from './App' // used for code syntax highlighting (optional) // import 'prismjs/themes/prism-tomorrow.css' // used for rendering equations (o...
1,112
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/src/react-app-env.d.ts
/// <reference types="react-scripts" />
1,113
0
petrpan-code/NotionX/react-notion-x/examples/cra
petrpan-code/NotionX/react-notion-x/examples/cra/src/record-map.json
{ "block": { "067dd719-a912-471e-a9a3-ac10710e7fdf": { "role": "reader", "value": { "id": "067dd719-a912-471e-a9a3-ac10710e7fdf", "version": 538, "type": "page", "properties": { "title": [["Notion Kit Test Suite"]] }, "content": [ "57...
1,114
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/full/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
1,115
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/full/next.config.js
// eslint-disable-next-line @typescript-eslint/no-var-requires const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true' }) module.exports = withBundleAnalyzer({ staticPageGenerationTimeout: 300, images: { domains: [ 'www.notion.so', 'notion.so', ...
1,116
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/full/package.json
{ "name": "notion-x-example-full", "version": "6.16.2", "private": true, "type": "commonjs", "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "analyze": "cross-env ANALYZE=true next build", "analyze:server": "cross-env BUNDLE_ANALYZE=server next build", "an...
1,117
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/full/readme.md
<p align="center"> <img alt="React Notion X" src="https://raw.githubusercontent.com/NotionX/react-notion-x/master/media/notion-ts.png" width="689"> </p> This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## ...
1,118
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/full/tsconfig.json
{ "compilerOptions": { "target": "es2016", "lib": ["dom", "esnext"], "allowJs": false, "skipLibCheck": true, "strict": false, "forceConsistentCasingInFileNames": true, "experimentalDecorators": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolu...
1,119
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/full/yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.2.0": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runt...
1,120
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/components/Loading.tsx
import * as React from 'react' import { LoadingIcon } from './LoadingIcon' import styles from './styles.module.css' export const Loading: React.FC = () => ( <div className={styles.container}> <LoadingIcon /> </div> )
1,121
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/components/LoadingIcon.tsx
import * as React from 'react' import cs from 'classnames' import styles from './styles.module.css' export const LoadingIcon = (props) => { const { className, ...rest } = props return ( <svg className={cs(styles.loadingIcon, className)} {...rest} viewBox='0 0 24 24' > <defs> ...
1,122
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/components/NotionPage.tsx
import * as React from 'react' import dynamic from 'next/dynamic' import Head from 'next/head' // import Image from 'next/image' import Link from 'next/link' import { useRouter } from 'next/router' import { ExtendedRecordMap } from 'notion-types' import { getPageTitle } from 'notion-utils' import { NotionRenderer } fr...
1,123
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/components/styles.module.css
@keyframes spinner { to { transform: rotate(360deg); } } .container { width: 100%; min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: calc(min(2vmin, 24px)); } .loadingIcon { animation: spinner 0.6s linear infinite; display: block; width: 24px; height:...
1,124
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/lib/config.ts
// TODO: change these to your own values // NOTE: rootNotionSpaceId is optional; set it to undefined if you don't want to // use it. export const rootNotionPageId = '067dd719a912471ea9a3ac10710e7fdf' export const rootNotionSpaceId = 'fde5ac74-eea3-4527-8f00-4482710e1af3' // NOTE: having this enabled can be pretty expe...
1,125
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/lib/notion.ts
import { Client } from '@notionhq/client' import { NotionAPI } from 'notion-client' import { NotionCompatAPI } from 'notion-compat' import { ExtendedRecordMap, SearchParams, SearchResults } from 'notion-types' import { previewImagesEnabled, useOfficialNotionAPI } from './config' import { getPreviewImageMap } from './p...
1,126
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/lib/preview-images.ts
import got from 'got' import lqip from 'lqip-modern' import { ExtendedRecordMap, PreviewImage, PreviewImageMap } from 'notion-types' import { getPageImageUrls } from 'notion-utils' import pMap from 'p-map' import pMemoize from 'p-memoize' import { defaultMapImageUrl } from 'react-notion-x' // NOTE: this is just an exa...
1,127
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/pages/[pageId].tsx
import * as React from 'react' import { ExtendedRecordMap } from 'notion-types' import { getAllPagesInSpace } from 'notion-utils' import { defaultMapPageUrl } from 'react-notion-x' import * as notion from '../lib/notion' import { NotionPage } from '../components/NotionPage' import { isDev, previewImagesEnabled, ...
1,128
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/pages/_app.tsx
import * as React from 'react' // used for rendering equations (optional) import 'katex/dist/katex.min.css' // used for code syntax highlighting (optional) import 'prismjs/themes/prism-tomorrow.css' // core styles shared by all of react-notion-x (required) import 'react-notion-x/src/styles.css' // force push import '...
1,129
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/pages/_document.tsx
import * as React from 'react' import Document, { Head, Html, Main, NextScript } from 'next/document' export default class MyDocument extends Document { render() { return ( <Html lang='en'> <Head /> <body> <Main /> <NextScript /> </body> </Html> ) } ...
1,130
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/pages/index.tsx
import * as React from 'react' import { ExtendedRecordMap } from 'notion-types' import * as notion from '../lib/notion' import { NotionPage } from '../components/NotionPage' import { previewImagesEnabled, rootDomain, rootNotionPageId } from '../lib/config' export const getStaticProps = async () => { const pa...
1,131
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/public/robots.txt
User-agent: * Allow: / Disallow: /api/*
1,132
0
petrpan-code/NotionX/react-notion-x/examples/full
petrpan-code/NotionX/react-notion-x/examples/full/styles/globals.css
* { box-sizing: border-box; } body { padding: 0; margin: 0; }
1,133
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/minimal/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
1,134
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/minimal/next.config.js
// eslint-disable-next-line @typescript-eslint/no-var-requires const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true' }) module.exports = withBundleAnalyzer({ staticPageGenerationTimeout: 300, images: { domains: [ 'www.notion.so', 'notion.so', ...
1,135
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/minimal/package.json
{ "name": "notion-x-example-minimal", "version": "6.16.1", "private": true, "type": "commonjs", "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "deploy": "vercel deploy" }, "dependencies": { "next": "^12.1.0", "notion-client": "^6.16.1", "notion-ut...
1,136
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/minimal/readme.md
<p align="center"> <img alt="React Notion X" src="https://raw.githubusercontent.com/NotionX/react-notion-x/master/media/notion-ts.png" width="689"> </p> This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## ...
1,137
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/minimal/tsconfig.json
{ "compilerOptions": { "target": "es2016", "lib": ["dom", "esnext"], "allowJs": false, "skipLibCheck": true, "strict": false, "forceConsistentCasingInFileNames": true, "experimentalDecorators": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolu...
1,138
0
petrpan-code/NotionX/react-notion-x/examples
petrpan-code/NotionX/react-notion-x/examples/minimal/yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.2.0": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runt...
1,139
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/components/NotionPage.tsx
import * as React from 'react' import Head from 'next/head' import { ExtendedRecordMap } from 'notion-types' import { getPageTitle } from 'notion-utils' import { NotionRenderer } from 'react-notion-x' export const NotionPage = ({ recordMap, rootPageId }: { recordMap: ExtendedRecordMap rootPageId?: string }) =...
1,140
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/lib/config.ts
// TODO: change this to the notion ID of the page you want to test export const rootNotionPageId = '067dd719a912471ea9a3ac10710e7fdf' export const isDev = process.env.NODE_ENV === 'development' || !process.env.NODE_ENV
1,141
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/lib/notion.ts
import { NotionAPI } from 'notion-client' const notion = new NotionAPI() export default notion
1,142
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/pages/[pageId].tsx
import * as React from 'react' import { ExtendedRecordMap } from 'notion-types' import { NotionPage } from '../components/NotionPage' import { rootNotionPageId } from '../lib/config' import notion from '../lib/notion' export const getStaticProps = async (context) => { const pageId = (context.params.pageId as strin...
1,143
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/pages/_app.tsx
import * as React from 'react' // core styles shared by all of react-notion-x (required) import 'react-notion-x/src/styles.css' import '../styles/globals.css' // used for code syntax highlighting (optional) // import 'prismjs/themes/prism-tomorrow.css' // used for rendering equations (optional) // import 'katex/dis...
1,144
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/pages/_document.tsx
import * as React from 'react' import Document, { Head, Html, Main, NextScript } from 'next/document' export default class MyDocument extends Document { render() { return ( <Html lang='en'> <Head /> <body> <Main /> <NextScript /> </body> </Html> ) } ...
1,145
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/pages/index.tsx
import * as React from 'react' import { ExtendedRecordMap } from 'notion-types' import { NotionPage } from '../components/NotionPage' import { rootNotionPageId } from '../lib/config' import notion from '../lib/notion' export const getStaticProps = async () => { const pageId = rootNotionPageId const recordMap = a...
1,146
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/public/robots.txt
User-agent: * Disallow: *
1,147
0
petrpan-code/NotionX/react-notion-x/examples/minimal
petrpan-code/NotionX/react-notion-x/examples/minimal/styles/globals.css
* { box-sizing: border-box; } body { padding: 0; margin: 0; }
1,148
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-client/package.json
{ "name": "notion-client", "version": "6.16.1", "type": "module", "description": "Robust TypeScript client for the unofficial Notion API.", "repository": "NotionX/react-notion-x", "author": "Travis Fischer <travis@transitivebullsh.it>", "license": "MIT", "main": "./build/index.js", "module": "./build/...
1,149
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-client/readme.md
<p align="center"> <img alt="React Notion X" src="https://raw.githubusercontent.com/NotionX/react-notion-x/master/media/notion-ts.png" width="689"> </p> # notion-client > Robust TypeScript client for the unofficial Notion API. [![NPM](https://img.shields.io/npm/v/notion-client.svg)](https://www.npmjs.com/package/n...
1,150
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-client/tsconfig.json
{ "extends": "../../tsconfig.base", "compilerOptions": { "composite": true, "rootDir": "src", "outDir": "build", "tsBuildInfoFile": "build/.tsbuildinfo", "emitDeclarationOnly": true }, "include": ["src"], "references": [{ "path": "../notion-types" }, { "path": "../notion-utils" }] }
1,151
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-client/tsup.config.ts
import { defineConfig } from 'tsup' export default defineConfig({ entry: ['src/index.ts'], outDir: 'build', target: 'node14', platform: 'node', format: ['esm'], splitting: false, sourcemap: true, minify: true, shims: false })
1,152
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/board-results.json
[ { "value": { "type": "select" }, "blockIds": ["c755e6c7-dcdd-433b-9c4c-ac9b3119ae92"], "total": 1, "aggregationResult": { "type": "number", "value": 1 } }, { "value": { "type": "select", "value": "foo" }, "blockIds": ["43fb2254-b7e3-412c-a461-566...
1,153
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/board.json
{ "result": { "type": "table", "blockIds": [ "3fce55d4-2528-4d05-8af5-6f2bbc4af418", "3b506960-ea91-4b59-8e7c-f3c51e40529a", "43fb2254-b7e3-412c-a461-566f7a83918e", "c755e6c7-dcdd-433b-9c4c-ac9b3119ae92" ], "aggregationResults": [ { "type": "number", "valu...
1,154
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/collection-row-page.json
{ "recordMap": { "block": { "139ac7d7-30d5-4b5e-9393-7a282d8ff635": { "role": "reader", "value": { "id": "139ac7d7-30d5-4b5e-9393-7a282d8ff635", "version": 4, "type": "page", "properties": { "\"G]_": [["2016: Rnd 1 Pick 30"]], "...
1,155
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/collection-view-page.json
{ "block": { "8a586d25-3f98-4b85-b482-54da84465d23": { "role": "reader", "value": { "id": "8a586d25-3f98-4b85-b482-54da84465d23", "version": 67, "type": "collection_view_page", "view_ids": [ "93a5d7a2-7664-478a-993f-4a5b948c0dba" ], "collection...
1,156
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/gallery.json
{ "result": { "type": "table", "blockIds": [ "3fce55d4-2528-4d05-8af5-6f2bbc4af418", "3b506960-ea91-4b59-8e7c-f3c51e40529a", "43fb2254-b7e3-412c-a461-566f7a83918e", "c755e6c7-dcdd-433b-9c4c-ac9b3119ae92" ], "aggregationResults": [ { "type": "number", "valu...
1,157
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/list.json
{ "result": { "type": "table", "blockIds": [ "3fce55d4-2528-4d05-8af5-6f2bbc4af418", "3b506960-ea91-4b59-8e7c-f3c51e40529a", "43fb2254-b7e3-412c-a461-566f7a83918e", "c755e6c7-dcdd-433b-9c4c-ac9b3119ae92" ], "aggregationResults": [ { "type": "number", "valu...
1,158
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/page.json
{ "cursor": { "stack": [] }, "recordMap": { "block": { "067dd719-a912-471e-a9a3-ac10710e7fdf": { "role": "reader", "value": { "alive": true, "content": [ "3478af43-8028-4002-be15-9ff1411ded2a", "17b2fb8a-83fd-4cf5-ac21-6d90977c378b", ...
1,159
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/search.json
{ "s0": { "type": "BlocksInSpace", "query": "test", "spaceId": "fde5ac74-eea3-4527-8f00-4482710e1af3", "limit": 20, "filters": { "isDeletedOnly": false, "excludeTemplates": false, "isNavigableOnly": false, "requireEditPermissions": false, "ancestors": [], "creat...
1,160
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/signed-urls.json
{ "signedUrls": [ "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/1288fa7f-5aca-4b01-9f83-be0db99f5a86/The-Growth-Handbook-by-Intercom.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20200816%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20200816T021959Z&X-Amz-Expires=86400&...
1,161
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/table.json
{ "result": { "type": "table", "blockIds": [ "43fb2254-b7e3-412c-a461-566f7a83918e", "3b506960-ea91-4b59-8e7c-f3c51e40529a", "3fce55d4-2528-4d05-8af5-6f2bbc4af418", "c755e6c7-dcdd-433b-9c4c-ac9b3119ae92" ], "aggregationResults": [ { "type": "number", "valu...
1,162
0
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/blocks/audio.json
{ "id": "4f2d754d-89a5-44da-a84c-e8753cceb8b2", "version": 7, "type": "audio", "properties": { "source": [ [ "https://s3-us-west-2.amazonaws.com/secure.notion-static.com/9c998f9f-4808-4e9f-ab35-55b25db0fd3f/example.mp3" ] ] }, "created_time": 1597765156711, "last_edited_time": ...
1,163
0
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/blocks/drive.json
{ "id": "8d6d9aa0-7baa-4fdb-9028-ffc5fdaa2224", "version": 5, "type": "drive", "format": { "drive_status": { "authed": true, "last_fetched": 1597765319949 }, "drive_properties": { "url": "https://drive.google.com/file/d/1QqtwutJ9KC5gGitlHymkgVwJvR-l4n9S/view?usp=drivesdk", "i...
1,164
0
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/blocks/equation.json
{ "id": "2ce1e02a-e603-457a-9ccc-f291562d890a", "version": 11, "type": "equation", "properties": { "title": [ [ "\\displaystyle {1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots }= \\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \\quad\\quad \\text{for }\\lvert q\\rvert<1.1...
1,165
0
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/blocks/file.json
{ "id": "d142a056-f104-477c-96d5-2b03fdd8c6e3", "version": 50, "type": "file", "properties": { "size": [["1605.6KB"]], "title": [["Aaron_Wang_Design_Resume.pdf"]], "source": [ [ "https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f428f70f-aadc-45e3-acdc-72f762c2fbc9/Aaron_Wang...
1,166
0
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures
petrpan-code/NotionX/react-notion-x/packages/notion-client/fixtures/blocks/pdf.json
{ "id": "c3536a31-d8fe-44c4-a430-b6870822f96d", "version": 3, "type": "pdf", "properties": { "source": [ [ "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/1288fa7f-5aca-4b01-9f83-be0db99f5a86/The-Growth-Handbook-by-Intercom.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASI...
1,167
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/src/index.ts
export * from './notion-api' export * from './types'
1,168
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/src/notion-api.test.ts
import test from 'ava' import { NotionAPI } from './notion-api' const pageIdFixturesSuccess = [ '067dd719-a912-471e-a9a3-ac10710e7fdf', '067dd719a912471ea9a3ac10710e7fdf', 'https://www.notion.so/saasifysh/Embeds-5d4e290ca4604d8fb809af806a6c1749', 'https://www.notion.so/saasifysh/File-Uploads-34d650c65da34f888...
1,169
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/src/notion-api.ts
// import { promises as fs } from 'fs' import * as notion from 'notion-types' import got, { OptionsOfJSONResponseBody } from 'got' import { getBlockCollectionId, getPageContentBlockIds, parsePageId, uuidToId } from 'notion-utils' import pMap from 'p-map' import * as types from './types' /** * Main Notion API...
1,170
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/src/temp
if (fetchParents) { let block = recordMap.block[pageId]?.value while (block && block.id !== rootBlockId) { console.log('finding parent of', block?.id) const parentBlockId = block.parent_id const parentBlock = recordMap.block[parentBlockId]?.value if (parentBlock) { ...
1,171
0
petrpan-code/NotionX/react-notion-x/packages/notion-client
petrpan-code/NotionX/react-notion-x/packages/notion-client/src/types.ts
import * as notion from 'notion-types' export interface SignedUrlRequest { permissionRecord: PermissionRecord url: string } export interface PermissionRecord { table: string id: notion.ID } export interface SignedUrlResponse { signedUrls: string[] }
1,172
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-compat/package.json
{ "name": "notion-compat", "version": "6.16.1", "type": "module", "description": "Compatibility layer between the official Notion API and unofficial private API.", "repository": "NotionX/react-notion-x", "author": "Travis Fischer <travis@transitivebullsh.it>", "license": "MIT", "main": "./build/index.js...
1,173
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-compat/readme.md
<p align="center"> <img alt="React Notion X" src="https://raw.githubusercontent.com/NotionX/react-notion-x/master/media/notion-ts.png" width="689"> </p> # notion-compat > A compatibility layer between the official Notion API and the unofficial Notion API ## Features - fully compatible with `react-notion-x` - back...
1,174
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-compat/tsconfig.json
{ "extends": "../../tsconfig.base", "compilerOptions": { "composite": true, "rootDir": "src", "outDir": "build", "tsBuildInfoFile": "build/.tsbuildinfo", "emitDeclarationOnly": true }, "include": ["src"], "references": [ { "path": "../notion-types" }, { "path": "../notion-utils" },...
1,175
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-compat/tsup.config.ts
import { defineConfig } from 'tsup' export default defineConfig({ entry: ['src/index.ts'], outDir: 'build', target: 'node14', platform: 'node', format: ['esm'], splitting: false, sourcemap: true, minify: false, shims: false })
1,176
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/convert-block.ts
import * as notion from 'notion-types' import * as types from './types' import { convertColor } from './convert-color' import { convertRichText } from './convert-rich-text' import { convertTime } from './convert-time' export function convertBlock({ block: partialBlock, children = [], pageMap, blockMap, pare...
1,177
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/convert-color.ts
import * as notion from 'notion-types' export function convertColor(color: string): notion.Color { switch (color) { case 'green': return 'teal' case 'green_background': return 'teal_background' default: return color as notion.Color } }
1,178
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/convert-page.ts
import * as notion from 'notion-types' import * as types from './types' import { convertBlock } from './convert-block' export function convertPage({ pageId, blockMap, blockChildrenMap, pageMap, parentMap }: { pageId: string blockMap: types.BlockMap blockChildrenMap: types.BlockChildrenMap pageMap: t...
1,179
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/convert-rich-text.ts
import * as notion from 'notion-types' import * as types from './types' import { convertColor } from './convert-color' export function convertRichText(richText: types.RichText): notion.Decoration[] { return richText.map(convertRichTextItem).filter(Boolean) } export function convertRichTextItem( richTextItem: typ...
1,180
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/convert-time.ts
export function convertTime(time?: string): number | undefined { if (time) { try { return new Date(time).getTime() } catch { // ignore invalid time strings } } return undefined }
1,181
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/index.ts
export * from './notion-compat-api' export * from './convert-page' export * from './convert-block' export * from './convert-time' export * from './convert-color' export * from './convert-rich-text'
1,182
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/notion-compat-api.test.ts
import test from 'ava' test('dummy', async (t) => { t.truthy(true) }) /* TODO: this test currently fails because of an [esbuild issue](https://github.com/evanw/esbuild/issues/1921): ``` Uncaught exception in src/notion-compat-api.test.ts Error: Dynamic require of "events" is not supported › file:///Users/...
1,183
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/notion-compat-api.ts
import * as notion from 'notion-types' import type { Client } from '@notionhq/client' import { parsePageId } from 'notion-utils' import PQueue from 'p-queue' import * as types from './types' import { convertPage } from './convert-page' export class NotionCompatAPI { client: Client constructor(client: Client) { ...
1,184
0
petrpan-code/NotionX/react-notion-x/packages/notion-compat
petrpan-code/NotionX/react-notion-x/packages/notion-compat/src/types.ts
import type { Client } from '@notionhq/client' type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never export type PartialPage = Awaited< ReturnType<InstanceType<typeof Client>['pages']['retrieve']> > export type Page = Extract< Awaited<R...
1,185
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-types/package.json
{ "name": "notion-types", "version": "6.16.1", "type": "module", "description": "TypeScript types for core Notion data structures.", "repository": "NotionX/react-notion-x", "author": "Travis Fischer <travis@transitivebullsh.it>", "license": "MIT", "types": "./build/index.d.ts", "sideEffects": false, ...
1,186
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-types/readme.md
<p align="center"> <img alt="React Notion X" src="https://raw.githubusercontent.com/NotionX/react-notion-x/master/media/notion-ts.png" width="689"> </p> # notion-types > TypeScript types for core Notion data structures. [![NPM](https://img.shields.io/npm/v/notion-types.svg)](https://www.npmjs.com/package/notion-ty...
1,187
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-types/tsconfig.json
{ "extends": "../../tsconfig.base", "compilerOptions": { "composite": true, "rootDir": "src", "outDir": "build", "tsBuildInfoFile": "build/.tsbuildinfo", "emitDeclarationOnly": true }, "include": ["src"] }
1,188
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/api.ts
import { RecordMap } from './maps' // API types // ---------------------------------------------------------------------------- export interface RecordValues<T> { results: T[] } export interface SearchParams { ancestorId: string query: string filters?: { isDeletedOnly: boolean excludeTemplates: boole...
1,189
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/block.ts
import { Color, Decoration, ID, Role } from './core' export type BlockType = | 'page' | 'text' | 'bookmark' | 'bulleted_list' | 'numbered_list' | 'header' | 'sub_header' | 'sub_sub_header' | 'quote' | 'equation' | 'to_do' | 'table_of_contents' | 'divider' | 'column_list' | 'column' | 'c...
1,190
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/collection-view.ts
import { ID, PropertyID, PropertyType } from './core' /** Types of collection views supported by Notion */ export type CollectionViewType = | 'table' | 'gallery' | 'list' | 'board' | 'calendar' export type CollectionCardCoverType = | 'page_cover' | 'page_content' | 'property' | 'none' | 'file' ex...
1,191
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/collection.ts
import { Color, Decoration, ID, NumberFormat, PropertyID, PropertyType } from './core' import { Formula } from './formula' export interface SelectOption { id: ID color: Color value: string } export interface CollectionPropertySchema { name: string type: PropertyType options?: SelectOption[] ...
1,192
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/core.ts
// Base Types // ---------------------------------------------------------------------------- /** UUID */ export type ID = string /** * Unique identifier for collection properties representing the columns in a * traditional relational database. * * Either a 4-character hash like `o;Os` or `title` as a special, re...
1,193
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/formula.ts
import { PropertyID } from './core' // @see https://www.notion.vip/formulas/ export type FormulaType = | 'constant' | 'property' | 'operator' | 'function' | 'symbol' export type FormulaConstantType = 'e' | 'false' | 'true' | 'pi' export type FormulaValueType = | 'string' | 'number' | 'boolean' | '...
1,194
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/index.ts
export * from './core' export * from './block' export * from './formula' export * from './user' export * from './collection' export * from './collection-view' export * from './maps' export * from './api'
1,195
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/maps.ts
import { Block } from './block' import { Collection } from './collection' import { CollectionView, CollectionViewType } from './collection-view' import { Decoration, ID, PropertyType, Role } from './core' import { User } from './user' // Aggregate map types // ----------------------------------------------------------...
1,196
0
petrpan-code/NotionX/react-notion-x/packages/notion-types
petrpan-code/NotionX/react-notion-x/packages/notion-types/src/user.ts
import { ID } from './core' export interface User { id: ID version: number email: string given_name: string family_name: string profile_photo: string onboarding_completed: boolean mobile_onboarding_completed: boolean }
1,197
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-utils/package.json
{ "name": "notion-utils", "version": "6.16.1", "type": "module", "description": "Useful utilities for working with Notion data. Isomorphic.", "repository": "NotionX/react-notion-x", "author": "Travis Fischer <travis@transitivebullsh.it>", "license": "MIT", "main": "./build/index.js", "module": "./buil...
1,198
0
petrpan-code/NotionX/react-notion-x/packages
petrpan-code/NotionX/react-notion-x/packages/notion-utils/readme.md
<p align="center"> <img alt="React Notion X" src="https://raw.githubusercontent.com/NotionX/react-notion-x/master/media/notion-ts.png" width="689"> </p> # notion-utils > Useful utilities for working with Notion data. Isomorphic. [![NPM](https://img.shields.io/npm/v/notion-utils.svg)](https://www.npmjs.com/package/...
1,199