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/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/dd-draggable.ts | /**
* dd-draggable.ts 10.0.0-dev
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
*/
import { DDManager } from './dd-manager';
import { Utils } from './utils';
import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';
import { GridItemHTMLElement, DDUIData } from './types';
import ... | 3,900 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/dd-droppable.ts | /**
* dd-droppable.ts 10.0.0-dev
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
*/
import { DDDraggable } from './dd-draggable';
import { DDManager } from './dd-manager';
import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';
import { Utils } from './utils';
import { DDElement... | 3,901 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/dd-element.ts | /**
* dd-elements.ts 10.0.0-dev
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
import { DDResizable, DDResizableOpt } from './dd-resizable';
import { GridItemHTMLElement } from './types';
import { DDDraggable, DDDraggableOpt } from './dd-draggable';
import { DDDroppable, DDDroppableOpt } from '.... | 3,902 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/dd-gridstack.ts | /**
* dd-gridstack.ts 10.0.0-dev
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
/* eslint-disable @typescript-eslint/no-unused-vars */
import { GridItemHTMLElement, GridStackElement, DDDragInOpt } from './types';
import { Utils } from './utils';
import { DDManager } from './dd-manager';
import {... | 3,903 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/dd-manager.ts | /**
* dd-manager.ts 10.0.0-dev
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
import { DDDraggable } from './dd-draggable';
import { DDDroppable } from './dd-droppable';
import { DDResizable } from './dd-resizable';
/**
* globals that are shared across Drag & Drop instances
*/
export class DD... | 3,904 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/dd-resizable-handle.ts | /**
* dd-resizable-handle.ts 10.0.0-dev
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
*/
import { isTouch, pointerdown, touchend, touchmove, touchstart } from './dd-touch';
export interface DDResizableHandleOpt {
start?: (event) => void;
move?: (event) => void;
stop?: (event) => void;
... | 3,905 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/dd-resizable.ts | /**
* dd-resizable.ts 10.0.0-dev
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
*/
import { DDResizableHandle } from './dd-resizable-handle';
import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';
import { Utils } from './utils';
import { DDUIData, Rect, Size } from './types';... | 3,906 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/dd-touch.ts | /**
* touch.ts 10.0.0-dev
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
import { DDManager } from './dd-manager';
/**
* Detect touch support - Windows Surface devices and other touch devices
* should we use this instead ? (what we had for always showing resize handles)
* /Android|webOS|iPho... | 3,907 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/gridstack-engine.ts | /**
* gridstack-engine.ts 10.0.0-dev
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
*/
import { Utils } from './utils';
import { GridStackNode, ColumnOptions, GridStackPosition, GridStackMoveOpts, SaveFcn, CompactOptions } from './types';
/** callback to update the DOM attributes since this c... | 3,908 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/gridstack-extra.scss | /**
* default to generate [2-11] columns as 1 (oneColumnMode) and 12 (default) are in the main css
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
$start: 2 !default;
$end: 11 !default;
@function fixed($float) {
@return calc(round($float * 1000) / 1000); // total 4-5 digits being %
}
@mixin gr... | 3,909 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/gridstack-poly.js | /**
* gridstack-poly.ts 10.0.0-dev used for IE and older browser support (not supported in v2-v4.3.1, but again in v4.4)
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
/* eslint-disable prefer-rest-params */
/* eslint-disable no-var */
// https://developer.mozilla.org/en-US/docs/Web/API/CustomE... | 3,910 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/gridstack.scss | /**
* gridstack SASS styles 10.0.0-dev
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
$columns: 12 !default;
$animation_speed: .3s !default;
@function fixed($float) {
@return calc(round($float * 1000) / 1000); // total 4-5 digits being %
}
@mixin vendor($property, $value...){
// -webkit-#{... | 3,911 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/gridstack.ts | /*!
* GridStack 10.0.0-dev
* https://gridstackjs.com/
*
* Copyright (c) 2021-2022 Alain Dumesny
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
*/
import { GridStackEngine } from './gridstack-engine';
import { Utils, HeightData, obsolete } from './utils';
import { gridDefaults, Co... | 3,912 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/types.ts | /**
* types.ts 10.0.0-dev
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
import { GridStack } from './gridstack';
import { GridStackEngine } from './gridstack-engine';
// default values for grid options - used during init and when saving out
export const gridDefaults: GridStackOptions = {
alw... | 3,913 |
0 | petrpan-code/gridstack/gridstack.js | petrpan-code/gridstack/gridstack.js/src/utils.ts | /**
* utils.ts 10.0.0-dev
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
*/
import { GridStackElement, GridStackNode, GridStackOptions, numberOrString, GridStackPosition, GridStackWidget } from './types';
export interface HeightData {
h: number;
unit: string;
}
/** checks for obsolete method ... | 3,914 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/.editorconfig | [*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
| 3,915 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/.env.example | # ------------------------------------------------------------------------------
# This is an example .env file.
#
# All of these environment vars must be defined either in your environment or in
# a local .env file in order to run this app.
#
# @see https://github.com/rolodato/dotenv-safe for more details.
# ---------... | 3,916 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/.eslintrc.json | {
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "react", "react-hooks"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"settings": {
"rea... | 3,917 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/.prettierignore | .snapshots/
build/
dist/
node_modules/
.next/
.vercel/
.demo/
.renderer/
| 3,918 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/.prettierrc | {
"singleQuote": true,
"jsxSingleQuote": true,
"semi": false,
"useTabs": false,
"tabWidth": 2,
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"trailingComma": "none",
"importOrder": [
"^(react/(.*)$)|^(react$)|^(next/(.*)$)|^(next$)",
"<THIRD_PARTY_MODULES>",
... | 3,919 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/contributing.md | # Contributing
Suggestions and pull requests are highly encouraged. Have a look at the [open issues](https://github.com/NotionX/react-notion-x/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+sort%3Areactions-%2B1-desc), especially [the easy ones](https://github.com/NotionX/react-notion-x/issues?q=is%3Aissue+is... | 3,920 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/license | MIT License
Copyright (c) 2023 Travis Fischer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, di... | 3,921 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/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.
| 3,922 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/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',
... | 3,923 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/package.json | {
"name": "nextjs-notion-starter-kit",
"version": "2.0.0",
"private": true,
"description": "The perfect starter kit for building beautiful websites with Next.js and Notion.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"repository": "transitive-bullshit/nextjs-notion-starter-kit",
"license": ... | 3,924 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/readme.md | <p align="center">
<a href="https://transitivebullsh.it/nextjs-notion-starter-kit">
<img alt="Example article page" src="https://user-images.githubusercontent.com/552829/160132094-12875e09-41ec-450a-80fc-ae8cd488129d.jpg" width="689">
</a>
</p>
# Next.js Notion Starter Kit
> The perfect starter kit for buildi... | 3,925 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/site.config.ts | import { siteConfig } from './lib/site-config'
export default siteConfig({
// the site's root Notion page (required)
rootNotionPageId: '7875426197cf461698809def95960ebf',
// if you want to restrict pages to a single notion workspace (optional)
// (this should be a Notion ID; see the docs for how to extract th... | 3,926 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/tsconfig.json | {
"compilerOptions": {
"target": "es2016",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"experimentalDecorators": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
... | 3,927 |
0 | petrpan-code/transitive-bullshit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/yarn.lock | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@ampproject/remapping@^2.1.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"
integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAas... | 3,928 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/.vscode/launch.json | {
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "next dev",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/next",
"runtimeArgs": ["dev"],
"cwd": "${workspaceFolder}",
"port": 9229,
"smartStep": true,
"cons... | 3,929 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/.vscode/settings.json | {
"typescript.tsdk": "./node_modules/typescript/lib",
"files.exclude": {
"**/logs": true,
"**/*.log": true,
"**/npm-debug.log*": true,
"**/yarn-debug.log*": true,
"**/yarn-error.log*": true,
"**/pids": true,
"**/*.pid": true,
"**/*.seed": true,
"**/*.pid.lock": true,
"**/.dum... | 3,930 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/ErrorPage.tsx | import * as React from 'react'
import { PageHead } from './PageHead'
import styles from './styles.module.css'
export const ErrorPage: React.FC<{ statusCode: number }> = ({ statusCode }) => {
const title = 'Error'
return (
<>
<PageHead title={title} />
<div className={styles.container}>
<... | 3,931 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/Footer.tsx | import * as React from 'react'
import { FaEnvelopeOpenText } from '@react-icons/all-files/fa/FaEnvelopeOpenText'
import { FaGithub } from '@react-icons/all-files/fa/FaGithub'
import { FaLinkedin } from '@react-icons/all-files/fa/FaLinkedin'
import { FaMastodon } from '@react-icons/all-files/fa/FaMastodon'
import { FaT... | 3,932 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/GitHubShareButton.tsx | import * as React from 'react'
import styles from './styles.module.css'
export const GitHubShareButton: React.FC = () => {
return (
<a
href='https://github.com/transitive-bullshit/nextjs-notion-starter-kit'
target='_blank'
rel='noopener noreferrer'
className={styles.githubCorner}
a... | 3,933 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/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>
)
| 3,934 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/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>
... | 3,935 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/NotionPage.tsx | import * as React from 'react'
import dynamic from 'next/dynamic'
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import cs from 'classnames'
import { PageBlock } from 'notion-types'
import { formatDate, getBlockTitle, getPageProperty } from 'notion-utils'
import Bod... | 3,936 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/NotionPageHeader.tsx | import * as React from 'react'
import * as types from 'notion-types'
import { IoMoonSharp } from '@react-icons/all-files/io5/IoMoonSharp'
import { IoSunnyOutline } from '@react-icons/all-files/io5/IoSunnyOutline'
import cs from 'classnames'
import { Breadcrumbs, Header, Search, useNotionContext } from 'react-notion-x'... | 3,937 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/Page404.tsx | import * as React from 'react'
import * as types from '@/lib/types'
import { PageHead } from './PageHead'
import styles from './styles.module.css'
export const Page404: React.FC<types.PageProps> = ({ site, pageId, error }) => {
const title = site?.name || 'Notion Page Not Found'
return (
<>
<PageHead ... | 3,938 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/PageActions.tsx | import * as React from 'react'
import { AiOutlineRetweet } from '@react-icons/all-files/ai/AiOutlineRetweet'
import { IoHeartOutline } from '@react-icons/all-files/io5/IoHeartOutline'
import styles from './styles.module.css'
/**
* @see https://developer.twitter.com/en/docs/twitter-for-websites/web-intents/overview
... | 3,939 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/PageAside.tsx | import * as React from 'react'
import { Block, ExtendedRecordMap } from 'notion-types'
import { getPageTweet } from '@/lib/get-page-tweet'
import { PageActions } from './PageActions'
import { PageSocial } from './PageSocial'
export const PageAside: React.FC<{
block: Block
recordMap: ExtendedRecordMap
isBlogPo... | 3,940 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/PageHead.tsx | import * as React from 'react'
import Head from 'next/head'
import * as config from '@/lib/config'
import * as types from '@/lib/types'
import { getSocialImageUrl } from '@/lib/get-social-image-url'
export const PageHead: React.FC<
types.PageProps & {
title?: string
description?: string
image?: string
... | 3,941 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/PageSocial.module.css | .pageSocial {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
color: var(--fg-color);
}
.action {
position: relative;
border-radius: 50%;
border: 2px solid var(--fg-color-6);
transition: all 300ms ease-out;
width: 3.5em;
height: 3.5em;
margin: 0 0 1em;
display:... | 3,942 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/PageSocial.tsx | import * as React from 'react'
import cs from 'classnames'
import * as config from '@/lib/config'
import styles from './PageSocial.module.css'
interface SocialLink {
name: string
title: string
icon: React.ReactNode
href?: string
}
const socialLinks: SocialLink[] = [
config.twitter && {
name: 'twitter... | 3,943 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/components/styles.module.css | @keyframes spinner {
to {
transform: rotate(360deg);
}
}
.container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
padding: 2vmin;
font-size: 16px;
line-height: 1.5;
color: rgb(55, 53, 47);
caret-color: rgb(55,... | 3,944 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/acl.ts | import { PageProps } from './types'
export async function pageAcl({
site,
recordMap,
pageId
}: PageProps): Promise<PageProps> {
if (!site) {
return {
error: {
statusCode: 404,
message: 'Unable to resolve notion site'
}
}
}
if (!recordMap) {
return {
error: {
... | 3,945 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/bootstrap-client.ts | export function bootstrap() {
console.log(`
████████╗██████╗ █████╗ ███╗ ██╗███████╗██╗████████╗██╗██╗ ██╗███████╗ ██████╗ ███████╗
╚══██╔══╝██╔══██╗██╔══██╗████╗ ██║██╔════╝██║╚══██╔══╝██║██║ ██║██╔════╝ ██╔══██╗██╔════╝
██║ ██████╔╝███████║██╔██╗ ██║███████╗██║ ██║ ██║██║ ██║█████╗ ██... | 3,946 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/config.ts | /**
* Site-wide app configuration.
*
* This file pulls from the root "site.config.ts" as well as environment variables
* for optional depenencies.
*/
import { parsePageId } from 'notion-utils'
import { PostHogConfig } from 'posthog-js'
import { getEnv, getSiteConfig } from './get-config-value'
import { Navigation... | 3,947 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/db.ts | import Keyv from '@keyvhq/core'
import KeyvRedis from '@keyvhq/redis'
import { isRedisEnabled, redisNamespace, redisUrl } from './config'
let db: Keyv
if (isRedisEnabled) {
const keyvRedis = new KeyvRedis(redisUrl)
db = new Keyv({ store: keyvRedis, namespace: redisNamespace || undefined })
} else {
db = new Key... | 3,948 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/get-canonical-page-id.ts | import { ExtendedRecordMap } from 'notion-types'
import {
getCanonicalPageId as getCanonicalPageIdImpl,
parsePageId
} from 'notion-utils'
import { inversePageUrlOverrides } from './config'
export function getCanonicalPageId(
pageId: string,
recordMap: ExtendedRecordMap,
{ uuid = true }: { uuid?: boolean } =... | 3,949 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/get-config-value.ts | import rawSiteConfig from '../site.config'
import { SiteConfig } from './site-config'
if (!rawSiteConfig) {
throw new Error(`Config error: invalid site.config.ts`)
}
// allow environment variables to override site.config.ts
let siteConfigOverrides: SiteConfig
try {
if (process.env.NEXT_PUBLIC_SITE_CONFIG) {
... | 3,950 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/get-page-tweet.ts | import { getPageProperty } from 'notion-utils'
import * as types from './types'
export function getPageTweet(
block: types.Block,
recordMap: types.ExtendedRecordMap
): string | null {
return getPageProperty('Tweet', block, recordMap)
}
| 3,951 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/get-site-map.ts | import { getAllPagesInSpace, uuidToId } from 'notion-utils'
import pMemoize from 'p-memoize'
import * as config from './config'
import * as types from './types'
import { includeNotionIdInUrls } from './config'
import { getCanonicalPageId } from './get-canonical-page-id'
import { notion } from './notion-api'
const uui... | 3,952 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/get-social-image-url.ts | import { api, host } from './config'
export function getSocialImageUrl(pageId: string) {
try {
const url = new URL(api.getSocialImage, host)
if (pageId) {
url.searchParams.set('id', pageId)
return url.toString()
}
} catch (err) {
console.warn('error invalid social image url', pageId, e... | 3,953 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/map-image-url.ts | import { Block } from 'notion-types'
import { defaultMapImageUrl } from 'react-notion-x'
import { defaultPageCover, defaultPageIcon } from './config'
export const mapImageUrl = (url: string, block: Block) => {
if (url === defaultPageCover || url === defaultPageIcon) {
return url
}
return defaultMapImageUrl... | 3,954 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/map-page-url.ts | import { ExtendedRecordMap } from 'notion-types'
import { parsePageId, uuidToId } from 'notion-utils'
import { includeNotionIdInUrls } from './config'
import { getCanonicalPageId } from './get-canonical-page-id'
import { Site } from './types'
// include UUIDs in page URLs during local development but not in productio... | 3,955 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/notion-api.ts | import { NotionAPI } from 'notion-client'
export const notion = new NotionAPI({
apiBaseUrl: process.env.NOTION_API_BASE_URL
})
| 3,956 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/notion.ts | import { ExtendedRecordMap, SearchParams, SearchResults } from 'notion-types'
import { mergeRecordMaps } from 'notion-utils'
import pMap from 'p-map'
import pMemoize from 'p-memoize'
import {
isPreviewImageSupportEnabled,
navigationLinks,
navigationStyle
} from './config'
import { notion } from './notion-api'
im... | 3,957 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/oembed.ts | import { getPageTitle, parsePageId } from 'notion-utils'
import * as config from './config'
import { getPage } from './notion'
export const oembed = async ({
url,
maxWidth,
maxHeight,
dark = false
}: {
url: string
maxWidth?: number
maxHeight?: number
dark?: boolean
}) => {
// TODO: handle pages with... | 3,958 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/preview-images.ts | import got from 'got'
import lqip from 'lqip-modern'
import { ExtendedRecordMap, PreviewImage, PreviewImageMap } from 'notion-types'
import { getPageImageUrls, normalizeUrl } from 'notion-utils'
import pMap from 'p-map'
import pMemoize from 'p-memoize'
import { defaultPageCover, defaultPageIcon } from './config'
impor... | 3,959 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/resolve-notion-page.ts | import { ExtendedRecordMap } from 'notion-types'
import { parsePageId } from 'notion-utils'
import * as acl from './acl'
import { environment, pageUrlAdditions, pageUrlOverrides, site } from './config'
import { db } from './db'
import { getSiteMap } from './get-site-map'
import { getPage } from './notion'
export asyn... | 3,960 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/search-notion.ts | // import ky from 'ky'
import ExpiryMap from 'expiry-map'
import fetch from 'isomorphic-unfetch'
import pMemoize from 'p-memoize'
import * as types from './types'
import { api } from './config'
export const searchNotion = pMemoize(searchNotionImpl, {
cacheKey: (args) => args[0]?.query,
cache: new ExpiryMap(10000)... | 3,961 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/site-config.ts | import * as types from './types'
export interface SiteConfig {
rootNotionPageId: string
rootNotionSpaceId?: string
name: string
domain: string
author: string
description?: string
language?: string
twitter?: string
github?: string
linkedin?: string
newsletter?: string
youtube?: string
zhihu?... | 3,962 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/types.ts | import { ExtendedRecordMap, PageMap } from 'notion-types'
import { ParsedUrlQuery } from 'querystring'
export * from 'notion-types'
export type NavigationStyle = 'default' | 'custom'
export interface PageError {
message?: string
statusCode: number
}
export interface PageProps {
site?: Site
recordMap?: Exten... | 3,963 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/lib/use-dark-mode.ts | import useDarkModeImpl from '@fisch0920/use-dark-mode'
export function useDarkMode() {
const darkMode = useDarkModeImpl(false, { classNameDark: 'dark-mode' })
return {
isDarkMode: darkMode.value,
toggleDarkMode: darkMode.toggle
}
}
| 3,964 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/404.tsx | import { Page404 } from '@/components/Page404'
export default Page404
| 3,965 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/[pageId].tsx | import * as React from 'react'
import { GetStaticProps } from 'next'
import { NotionPage } from '@/components/NotionPage'
import { domain, isDev } from '@/lib/config'
import { getSiteMap } from '@/lib/get-site-map'
import { resolveNotionPage } from '@/lib/resolve-notion-page'
import { PageProps, Params } from '@/lib/t... | 3,966 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/_app.tsx | // global styles shared across the entire site
import * as React from 'react'
import type { AppProps } from 'next/app'
import { useRouter } from 'next/router'
import * as Fathom from 'fathom-client'
// used for rendering equations (optional)
import 'katex/dist/katex.min.css'
import posthog from 'posthog-js'
// used fo... | 3,967 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/_document.tsx | import * as React from 'react'
import Document, { Head, Html, Main, NextScript } from 'next/document'
import { IconContext } from '@react-icons/all-files'
export default class MyDocument extends Document {
render() {
return (
<IconContext.Provider value={{ style: { verticalAlign: 'middle' } }}>
<H... | 3,968 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/_error.tsx | import { ErrorPage } from '@/components/ErrorPage'
export default ErrorPage
| 3,969 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/feed.tsx | import type { GetServerSideProps } from 'next'
import { ExtendedRecordMap } from 'notion-types'
import {
getBlockParentPage,
getBlockTitle,
getPageProperty,
idToUuid
} from 'notion-utils'
import RSS from 'rss'
import * as config from '@/lib/config'
import { getSiteMap } from '@/lib/get-site-map'
import { getS... | 3,970 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/index.tsx | import * as React from 'react'
import { NotionPage } from '@/components/NotionPage'
import { domain } from '@/lib/config'
import { resolveNotionPage } from '@/lib/resolve-notion-page'
export const getStaticProps = async () => {
try {
const props = await resolveNotionPage(domain)
return { props, revalidate:... | 3,971 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/robots.txt.tsx | import type { GetServerSideProps } from 'next'
import { host } from '@/lib/config'
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
if (req.method !== 'GET') {
res.statusCode = 405
res.setHeader('Content-Type', 'application/json')
res.write(JSON.stringify({ error: 'method ... | 3,972 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/sitemap.xml.tsx | import type { GetServerSideProps } from 'next'
import { host } from '@/lib/config'
import { getSiteMap } from '@/lib/get-site-map'
import type { SiteMap } from '@/lib/types'
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
if (req.method !== 'GET') {
res.statusCode = 405
res.s... | 3,973 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/api/notion-page-info.tsx | import { NextApiRequest, NextApiResponse } from 'next'
import got from 'got'
import { PageBlock } from 'notion-types'
import {
getBlockIcon,
getBlockTitle,
getPageProperty,
isUrl,
parsePageId
} from 'notion-utils'
import * as libConfig from '@/lib/config'
import { mapImageUrl } from '@/lib/map-image-url'
im... | 3,974 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/api/search-notion.ts | import { NextApiRequest, NextApiResponse } from 'next'
import * as types from '../../lib/types'
import { search } from '../../lib/notion'
export default async (req: NextApiRequest, res: NextApiResponse) => {
if (req.method !== 'POST') {
return res.status(405).send({ error: 'method not allowed' })
}
const s... | 3,975 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/pages/api/social-image.tsx | import * as React from 'react'
import { NextRequest } from 'next/server'
import { ImageResponse } from '@vercel/og'
import { api, apiHost, rootNotionPageId } from '@/lib/config'
import { NotionPageInfo } from '@/lib/types'
const interRegularFontP = fetch(
new URL('../../public/fonts/Inter-Regular.ttf', import.meta... | 3,976 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/public/manifest.json | {
"name": "Next.js Notion Starter Kit",
"short_name": "Starter Kit",
"icons": [
{
"src": "/favicon.png",
"type": "image/png",
"sizes": "32x32"
},
{
"src": "/favicon-128x128.png",
"type": "image/png",
"sizes": "128x128"
},
{
"src": "/favicon-192x192.png... | 3,977 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/styles/global.css | * {
box-sizing: border-box;
}
a {
color: inherit;
text-decoration: none;
}
body,
html {
padding: 0;
margin: 0;
}
body {
--notion-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
'Droid Sans', 'Helvetica Neue', '... | 3,978 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/styles/notion.css | /**
* This file contains site-specifc style overrides for Notion elements from
* react-notion-x.
*
* react-notion-x's goal is to match styling as close as possible to Notion,
* whereas our goal with this site is to adjust Notion's styling in a few key
* places to add some flare.
*/
.notion {
--notion-max-widt... | 3,979 |
0 | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit | petrpan-code/transitive-bullshit/nextjs-notion-starter-kit/styles/prism-theme.css | /* prism theme adjustments */
.notion-code {
background-color: rgba(249, 250, 251, 1);
border: 1px solid rgba(229, 231, 235, 1);
border-radius: 0.375rem;
padding: 1.5em !important;
}
.dark-mode .notion-code {
background-color: rgba(17, 24, 39, 1);
border-color: rgba(55, 65, 81, 1);
}
.notion code {
colo... | 3,980 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/.env.example | VITE_APP_FIREBASE_PROJECT_ID=
VITE_APP_FIREBASE_PROJECT_WEB_API_KEY= | 3,981 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/.eslintignore | typedoc/*
| 3,982 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/.prettierignore | node_modules/
.yarn
emulators/
typedoc/
| 3,983 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/.prettierrc | {
"proseWrap": "always"
}
| 3,984 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/.yarnrc | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
yarn-path ".yarn/releases/yarn-1.22.5.cjs"
| 3,985 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/.yarnrc.yml | yarnPath: .yarn/releases/yarn-1.22.19.cjs
| 3,986 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/CODE_OF_CONDUCT.md |
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level o... | 3,987 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/CONTRIBUTING.md | # Contributing
We welcome any feedback and contributions from the community. Please read the
following guidelines to contribute to Rowy.
## Code of conduct
We want to have a welcoming and inclusive environment, towards this please read
and follow our
[our code of conduct](https://github.com/rowyio/rowy/blob/main/COD... | 3,988 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/LICENSE | Copyright 2022 Rowy Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... | 3,989 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/README.md | <a href="https://www.rowy.io/" target="_blank">
<img width="100%" src="https://user-images.githubusercontent.com/307298/218350866-cfd7c011-2247-4074-8b1d-06c26a4d0b96.png" />
</a>
<h4 align="center">
✨ Airtable-like UI for managing database ✨ Build any automation, with or without code ✨
</h4>
<p align="center" >
Conne... | 3,990 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/cloudbuild.yaml | steps:
- name: node:10.17.0
entrypoint: yarn
args: ["install"]
- name: node:10.17.0
entrypoint: yarn
args:
- env
- "${_PROJECT_ID}"
- "${_FIREBASE_WEB_API_KEY}"
- "${_ALGOLIA_APP_ID}"
- "${_ALGOLIA_APP_KEY}"
- name: node:10.17.0
entrypoint: yarn
args: ["build"... | 3,991 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/craco.config.js | const { whenDev } = require("@craco/craco");
const CracoAlias = require("craco-alias");
const CracoSwcPlugin = require("craco-swc");
module.exports = {
plugins: [
{
plugin: CracoAlias,
options: {
source: "tsconfig",
baseUrl: "./src",
tsConfigPath: "./tsconfig.extend.json",
... | 3,992 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/createDotEnv.js | const fs = require("fs");
const main = (
projectID = "",
firebaseWebApiKey = "",
algoliaAppId = "",
algoliaSearhApiKey = ""
) => {
return fs.writeFileSync(
".env",
`VITE_APP_FIREBASE_PROJECT_ID = ${projectID}
VITE_APP_FIREBASE_PROJECT_WEB_API_KEY = ${firebaseWebApiKey}
VITE_APP_ALGOLIA_APP_ID = ${alg... | 3,993 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/eslint-local-rules.js | const JOTAI_USE_ATOM_HOOKS = [
"useAtom",
"useSetAtom",
"useAtomValue",
"useUpdateAtom",
"useAtomValue",
"useResetAtom",
"useReducerAtom",
"useAtomCallback",
"useHydrateAtoms",
];
module.exports = {
"no-jotai-use-atom-without-scope": {
meta: {
hasSuggestions: true,
},
create: func... | 3,994 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/firebase.json | {
"hosting": {
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"storage": {
... | 3,995 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/firestore.indexes.json | {
"indexes": [],
"fieldOverrides": []
}
| 3,996 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/firestore.rules | rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Allow admins to read and write all documents
match /{document=**} {
allow read, write: if hasAnyRole(["ADMIN", "OWNER"]);
}
// Rowy: Allow signed in users to read Rowy configuration and admins to write
... | 3,997 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/index.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover"
/>
<meta name="color-scheme" content="default" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-... | 3,998 |
0 | petrpan-code/rowyio | petrpan-code/rowyio/rowy/package.json | {
"name": "rowy",
"version": "3.0.0",
"homepage": "https://rowy.io",
"repository": {
"type": "git",
"url": "https://github.com/rowyio/rowy.git"
},
"private": true,
"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@esbuild-plugins/node-modules-polyfill": "... | 3,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.