text stringlengths 3 8.33k | repo stringclasses 52
values | path stringlengths 6 141 | language stringclasses 35
values | sha stringlengths 64 64 | chunk_index int32 0 273 | n_tokens int32 1 896 |
|---|---|---|---|---|---|---|
21.838 8.384 21.823 7.111 21.764C5.94 21.703 5.295 21.508 4.875 21.343C4.306 21.119 3.915 20.864 3.496 20.444C3.075 20.025 2.806 19.62 2.596 19.064C2.431 18.644 2.237 17.999 2.176 16.829C2.131 15.569 2.115 15.18 2.115 11.985C2.115 8.789 2.131 8.399 2.176 7.124C2.237 5.954 2.431 5.31 2.596 4.89C2.806 4.32 3.075 3.93 3.4... | interiorly-preview | components/icons.tsx | TypeScript | 4848c9942abc5f158960668018453c05511aa8d234619211df9563fbcda41422 | 2 | 834 |
import Link from "next/link";
export default function Logo() {
return (
<Link href="/" className="block" aria-label="Cruip">
<svg
className="w-8 h-8"
viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<radialGradient
cx="21.152%"
... | interiorly-preview | components/logo.tsx | TypeScript | a7863fd5d92560617e381a897bb56e61cf43ed5b5a8e331b5a840e9f9ce87e5e | 0 | 224 |
"use client";
import * as React from "react";
import Link, { LinkProps } from "next/link";
import { useRouter } from "next/navigation";
import { ViewVerticalIcon } from "@radix-ui/react-icons";
import { siteConfig } from "@/config/site";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button... | interiorly-preview | components/mobile-menu.tsx | TypeScript | 5482588432fbf7d2ab2b3f44b57384eddecba13769bbe9e817bd799e29242901 | 0 | 575 |
"use client";
import * as React from "react";
import { MoonIcon, SunIcon } from "@radix-ui/react-icons";
import { useTheme } from "next-themes";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-... | interiorly-preview | components/mode-toggle.tsx | TypeScript | 0d20887888eee3d0972071192112a1dfb79535c4808107f0d031052fe8dc2910 | 0 | 308 |
import { CircularProgress, Chip } from "@nextui-org/react";
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
progress: number;
message: string;
}
export function Progress({ progress, message, ...props }: ProgressProps) {
return (
<div {...props}>
<CircularProgress
classNa... | interiorly-preview | components/progress.tsx | TypeScript | 094a45ca196e8adbca125397d57f16c8e8120d4ad019f2e888152594cb601b53 | 0 | 210 |
"use client";
import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { ThemeProviderProps } from "next-themes/dist/types";
import { ImageGenerationProvider } from "@/lib/hooks/use-images";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient... | interiorly-preview | components/providers.tsx | TypeScript | d0fe54b8b0da6303620ddc9c8efa0ed3f42a59374045011610c1bbf47b386e9b | 0 | 161 |
"use client";
import Image from "next/image";
import { Progress } from "./progress";
import { Card } from "./ui/card";
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
type CarouselApi,
} from "./ui/carousel";
import { Icons } from "@/components/icons";
import { cn } from "... | interiorly-preview | components/result-carousel.tsx | TypeScript | 092cb2d0bd3c54deede97b9fc764e51d634386b8de9d8d15812e351dd1b52680 | 0 | 831 |
"use client";
import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { type ThemeProviderProps } from "next-themes/dist/types";
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesP... | interiorly-preview | components/theme-provider.tsx | TypeScript | 131818bc33a5eac2a0cbb00a66306555c35b0c8ebe07fd439567c429d276e659 | 0 | 78 |
import {
Body,
Button,
Container,
Head,
Heading,
Hr,
Html,
Img,
Link,
Preview,
Section,
Text,
// @ts-ignore
} from "@react-email/components"; // @ts-ignore
import { Tailwind } from "@react-email/tailwind";
import * as React from "react";
interface InteriorlyBetaSignupProps {
email: string;
... | interiorly-preview | components/mail/beta-join-email.tsx | TypeScript | accf07c05f842f3dfc534712eefdc6195577ce4253c62dfc2c8bd76eecdad8ba | 0 | 860 |
}
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[... | interiorly-preview | components/ui/dropdown-menu.tsx | TypeScript | a10cbe7676e434d69f82136045d73aee05e6a71433f105e82e9fa1bcd374031f | 1 | 864 |
import * as React from "react"
import { cn } from "@/lib/utils"
export interface InputProps
extends React.InputHTMLAttributes<HTMLInputElement> {}
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {
return (
<input
type={type}
classNam... | interiorly-preview | components/ui/input.tsx | TypeScript | 901116130e8db8d75f3fb0290c1789b37cc4a0d6dfdcfbf7a0211699dbaa7474 | 0 | 200 |
import { cn } from "@/lib/utils"
function Skeleton({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn("animate-pulse rounded-md bg-primary/10", className)}
{...props}
/>
)
}
export { Skeleton }
| interiorly-preview | components/ui/skeleton.tsx | TypeScript | 87608e7cc815ad3d88e0b9de6c402bb37b58ea1b38636cf69709da1baff6e334 | 0 | 72 |
import * as React from "react"
import { cn } from "@/lib/utils"
export interface TextareaProps
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => {
return (
<textarea
className={cn... | interiorly-preview | components/ui/textarea.tsx | TypeScript | 60c3f985e2a9959d244d8cbca383db3dd45ec96920f2a91872850fa6872f37c9 | 0 | 175 |
"use client"
import * as React from "react"
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
import { cn } from "@/lib/utils"
const TooltipProvider = TooltipPrimitive.Provider
const Tooltip = TooltipPrimitive.Root
const TooltipTrigger = TooltipPrimitive.Trigger
const TooltipContent = React.forwardRef<
... | interiorly-preview | components/ui/tooltip.tsx | TypeScript | 540d9399fa4bc5a146d2a42c20898c74d1b944d414a165536c93ceddb52f5f5b | 0 | 302 |
export const BASEURL = "wss://google-sdxl.hf.space/queue/join";
export const MAX_RETRIES = 10;
export const RETRY_TIMEOUT = 500;
export const PROCESS_COMPLETION_PROGRESS_TIMEOUT = 1000;
export const DEFAULT_MESSAGE = "Waiting for image generation to start...";
export const DEFAULT_PROMPTS = [
"A serene Scandinav... | interiorly-preview | config/generation.ts | TypeScript | fb72a668aaf593b844dc4f1d673683ef8dddf0504f1b8ae64cabba0ed89429ae | 0 | 896 |
with a built-in bench and a view of the sunrise.",
"An opulent marble foyer with a sweeping staircase and a crystal chandelier.",
"A compact urban balcony with vertical gardening and string lights.",
"A lavish Moroccan-themed lounge with plush floor cushions and vibrant mosaics.",
"An industrial chic coffee bar... | interiorly-preview | config/generation.ts | TypeScript | 795b0a48077f988bcafdb1740982f07805cc3ea5e5e08ef536cb3c04d13d05de | 1 | 140 |
export const siteConfig = {
name: "Interiorly",
url: "https://interiorly.dev",
description: "Redesign your home with ease.",
links: {
instagram: "https://instagram.com/interiorlyai",
github: "https://github.com/julian-at/interiorly-preview",
},
};
export type SiteConfig = typeof siteConfig;
| interiorly-preview | config/site.ts | TypeScript | 6ade36d4cedf842dc7e662bb5f3a7eb1de193a84d3d1721693d09ef001546314 | 0 | 82 |
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
import mongoose from "mongoose";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
const MONGO_URI = process.env.MONGO_URI;
const cached: {
connection?: typeof mongoose;
promise?: Promise<typeof m... | interiorly-preview | lib/utils.ts | TypeScript | 0c407c830a7b8b80d5582f2dc78a6730b81f155b61c7b16ddd708dbd2995ffac | 0 | 225 |
"use client";
import React, {
createContext,
useContext,
useCallback,
useState,
useRef,
useEffect,
} from "react";
import {
BASEURL,
DEFAULT_MESSAGE,
DEFAULT_PROMPT_EMBEDDING,
MAX_RETRIES,
PROCESS_COMPLETION_PROGRESS_TIMEOUT,
RETRY_TIMEOUT,
} from "@/config/generation";
import { ClientJS } from... | interiorly-preview | lib/hooks/use-images.tsx | TypeScript | b4314b4d2f2b48ddd7adad89601df13885b0632caa9c360305843d7e75eedfb8 | 0 | 896 |
.onclose = () => console.log("WebSocket closed.");
};
const handleServerMessage = (event: MessageEvent) => {
const data = JSON.parse(event.data) as SocketMessage;
switch (data.msg) {
case "send_hash":
const sessionHash = Math.random().toString(36).substring(2);
... | interiorly-preview | lib/hooks/use-images.tsx | TypeScript | 4b3445b23142911c442ee835fc51d8d29126c5a60a3ad33ad947a7caee14b1a2 | 1 | 843 |
import { model, models, Schema } from "mongoose";
const ImageBatchSchema = new Schema<ImageBatch>(
{
batch: [String],
prompt: String,
timestamp: Number,
fingerprint: Number,
},
{
timestamps: true,
toJSON: {
versionKey: false,
virtuals: true,
transform: (_, ret) => {
... | interiorly-preview | models/imageBatch.ts | TypeScript | f5198d090571386c6a476ead7115092330ebe4bef52f796a9d52c6a04228c93c | 0 | 102 |
import { z } from "zod";
export const BetaSignupSchema = z.object({
email: z.string().email({ message: "Please enter a valid email address." }),
firstName: z.string().min(2, { message: "Your first name is too short." }),
lastName: z.string().min(2, { message: "Your last name is too short." }),
});
| interiorly-preview | schemas/beta.ts | TypeScript | 070da707ce72124a4ccbda611b78c4a248416cbc7bf1c3d4e1defc4dd2425f6f | 0 | 100 |
type SocketMessage = {
msg: string;
rank?: number;
success?: boolean;
output?: {
error?: string;
data?: string[][];
};
avg_event_process_time?: number;
queue_size?: number;
};
interface ImageBatch {
fingerprint: number;
prompt: string;
timestamp: number;
batch: string[];
}
| interiorly-preview | types/index.d.ts | TypeScript | ca10937814cd6f1d37ec6e4c9a5d3fe6864595cf99d17f89167ec1e8ba4f60e0 | 0 | 72 |
# dependencies
/node_modules
# next.js
/.next
/out
# production
/build | interiorly-promo-fake | .eslintignore | ESLint Ignore | 884c147a6c7ef6c08a5fdf7cbc01df6da47f0e54ea3e3b4b13f00a801c606260 | 0 | 17 |
module.exports = {
env: {
browser: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"next",
],
parser: "@typescript-eslint/parser",
plugins: [... | interiorly-promo-fake | .eslintrc.cjs | JavaScript | 13ba4f2cd45b633e8b436a64d3bd90c6c70e243fd6badd34bf96055c4f130049 | 0 | 622 |
# dependencies
/node_modules
# next.js
/.next
/out
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
.idea
# typescript
*.tsbuildinfo
# Turborepo
.turbo
| interiorly-promo-fake | .gitignore | Git Ignore | ef29bfe29f380b5cb5d1bc33c84db0ce30897463089b299cb3fdcff05e4cb9d9 | 0 | 81 |
{
"semi": true,
"tabWidth": 2,
"useTabs": false,
"singleQuote": false,
"jsxSingleQuote": false,
"arrowParens": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"trailingComma": "es5",
"proseWrap": "always"
}
| interiorly-promo-fake | .prettierrc | Prettier | 565931040aaf4162a2c1c3b383e03eabeaebc93729a1d3d785396156f6e094a2 | 0 | 67 |
import type { NextAuthConfig } from "next-auth";
import CredentialsProvider from "next-auth/providers/credentials";
import { getUser } from "@/lib/database";
export const authConfig: NextAuthConfig = {
// Configure one or more authentication providers
// More info: https://next-auth.js.org/providers/
providers: ... | interiorly-promo-fake | auth.config.ts | TypeScript | 441e99a4ade37828e6ad048987dea21f07303343f0165658e12b655b485e2a00 | 0 | 356 |
import NextAuth from "next-auth";
import { authConfig } from "@/auth.config";
import { getUser } from "@/lib/database/getUser";
// Your NextAuth secret (generate a new one for production)
// More info: https://next-auth.js.org/configuration/options#secret
// `create-liveblocks-app` generates a value for you, but there... | interiorly-promo-fake | auth.ts | TypeScript | 6b3cbaf4ab1e18994e1996f80d630e485670859b591adc661d419aee75b383c8 | 0 | 318 |
import { DocumentType } from "./types";
export const MARKETING_URL = "/";
export const DASHBOARD_URL = "/dashboard";
export const DASHBOARD_DRAFTS_URL = `${DASHBOARD_URL}/drafts`;
export const DASHBOARD_GROUP_URL = (id: string) =>
`${DASHBOARD_URL}/group/${id}`;
export const DOCUMENT_URL = (type: DocumentType, id:... | interiorly-promo-fake | constants.ts | TypeScript | c2f8294e9d6c88a2c44494202b7b74e664d9b6ac9c0f4d139a42f5d3d022f86a | 0 | 94 |
import { Liveblocks } from "@liveblocks/node";
import { getProviders } from "@/auth";
// Your Liveblocks secret key
export const SECRET_API_KEY = process.env.LIVEBLOCKS_SECRET_KEY;
export const liveblocks = new Liveblocks({ secret: SECRET_API_KEY as string });
// =====================================================... | interiorly-promo-fake | liveblocks.server.config.ts | TypeScript | 32975e34565358bae404bc2beb0086bb5569a9fecb787113333cb3b91a927221 | 0 | 509 |
import { User } from "./types";
declare module "next-auth" {
/**
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
*/
interface Session {
user: {
// The type of extra info taken from your database and sent to front end from auth endpoint
//... | interiorly-promo-fake | next-auth.d.ts | TypeScript | ab40f011e8bf0d7e3a47ee38d9445cd4f17d780c056a095202159ef81506f79d | 0 | 97 |
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "liveblocks.io",
pathname: "/**",
},
],
},
};
| interiorly-promo-fake | next.config.js | JavaScript | 2a20ce71dcfae1f3bb3c5b5025a87b728df8bc406338a133caebf5994ecca3cb | 0 | 63 |
{
"description": "This repository contains a collaborative starter kit using Liveblocks and Next.js.",
"license": "Apache-2.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint --fix",
"typecheck": "tsc --project tsconfig.json ... | interiorly-promo-fake | package.json | JSON | d60f4a98d7565ceb1e41275869a3958528446b8e70d26cfdb2695f0063d9978c | 0 | 843 |
module.exports = {
plugins: [],
};
| interiorly-promo-fake | postcss.config.js | JavaScript | 4e2ab29fe34fb175b4198aea1ad7754701af30ba9b8a16d316efeab97061131d | 0 | 12 |
https://user-images.githubusercontent.com/33033422/216776250-04ef297b-f61a-42ec-a7b9-b08e46dddf8f.mp4
# [Next.js Starter Kit](https://liveblocks.io/starter-kit)
<p>
<a href="https://codesandbox.io/s/github/liveblocks/liveblocks/tree/main/starter-kits/nextjs-starter-kit">
<img src="https://img.shields.io/badge/o... | interiorly-promo-fake | README.md | Markdown | 2f97e1911024f12b85200007a01d898ad13a3af90555e328364091a7e0901456 | 0 | 343 |
{
"compilerOptions": {
"target": "esnext",
"lib": ["dom", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule"... | interiorly-promo-fake | tsconfig.json | JSON | ddc27cc3a7ee8660b3fbba652c8dc84f075cc723344cd0414803807edbaa5240 | 0 | 208 |
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { Providers } from "@/app/Providers";
import { auth } from "@/auth";
import "../styles/normalize.css";
import "@liveblocks/react-ui/styles.css";
import "@liveblocks/react-ui/styles/dark/media-query.css";
import "@liveblocks/react-tip... | interiorly-promo-fake | app/layout.tsx | TypeScript | eb2226895904be0df379576cf245ffaff470432cf32bb591da94702d8e08605c | 0 | 241 |
.section {
margin-top: var(--space-20);
margin-bottom: var(--space-20);
}
.sectionTitle {
margin-bottom: var(--space-10);
font-size: var(--size-2xl);
font-weight: 700;
}
.heroTitle {
max-width: 400px;
margin-bottom: var(--space-9);
font-size: var(--size-4xl);
font-weight: 800;
line-height: 1.25;
}... | interiorly-promo-fake | app/page.module.css | CSS | 8233f95d5e29004cc80b9b37e06386ca4fda61bfa0c45e3019683ea8c67fd53b | 0 | 311 |
import clsx from "clsx";
import { redirect } from "next/navigation";
import { ComponentProps, ReactNode } from "react";
import { auth, signIn } from "@/auth";
import { DASHBOARD_URL } from "@/constants";
import { SignInIcon } from "@/icons";
import { MarketingLayout } from "@/layouts/Marketing";
import { Button, LinkBu... | interiorly-promo-fake | app/page.tsx | TypeScript | 0446fa377d5f7c52ad57eab2d6ed40f6951b1392d4372a0f96e7a2e69dcf520d | 0 | 718 |
"use client";
import { LiveblocksProvider } from "@liveblocks/react/suspense";
import { TooltipProvider } from "@radix-ui/react-tooltip";
import Router from "next/router";
import { Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { ReactNode } from "react";
import { DOCUMENT_URL } ... | interiorly-promo-fake | app/Providers.tsx | TypeScript | ad32d40ac796636a5912c3f8140a0a72ad118f0e966912ed52dcc34e7550f2d5 | 0 | 553 |
export { GET, POST } from "@/auth";
export const runtime = "edge"; // optional
| interiorly-promo-fake | app/api/auth/[...nextauth]/route.ts | TypeScript | 2b9629dc68ec4ab167b3affc567adbb052941623b3e8918740ac577549fc5c1e | 0 | 24 |
import { CustomNotificationEvent, Liveblocks } from "@liveblocks/node";
import { DOCUMENT_URL } from "@/constants";
import { getDocument } from "@/lib/actions";
import { getUser } from "@/lib/database";
export async function addedToDocumentEmail(
liveblocks: Liveblocks,
event: CustomNotificationEvent
) {
// The ... | interiorly-promo-fake | app/api/notifications/email/addedToDocumentEmail.tsx | TypeScript | 999b3696670c461c72c67d6420394059061716ff0485f38e0c0fb7cbfa492028 | 0 | 476 |
import {
Liveblocks,
WebhookHandler,
isCustomNotificationEvent,
isTextMentionNotificationEvent,
isThreadNotificationEvent,
} from "@liveblocks/node";
import { addedToDocumentEmail } from "./addedToDocumentEmail";
import { textMentionEmail } from "./textMentionEmail";
import { threadEmail } from "./threadEmail... | interiorly-promo-fake | app/api/notifications/email/route.ts | TypeScript | 82bcdf25698ef6a141eca8040bcf192711a7fb3eee36d64d6475777cd394917d | 0 | 376 |
import { prepareTextMentionNotificationEmailAsReact } from "@liveblocks/emails";
import type {
Liveblocks,
TextMentionNotificationEvent,
} from "@liveblocks/node";
import { DOCUMENT_URL } from "@/constants";
import { getDocument } from "@/lib/actions";
import { getUser, getUsers } from "@/lib/database";
export asy... | interiorly-promo-fake | app/api/notifications/email/textMentionEmail.tsx | TypeScript | c0ed5359743de478b242cf4b2b2012971f15bfe5f92f21c4d9b47a1a166024bb | 0 | 671 |
import { prepareThreadNotificationEmailAsReact } from "@liveblocks/emails";
import type { Liveblocks, ThreadNotificationEvent } from "@liveblocks/node";
import { DOCUMENT_URL } from "@/constants";
import { getDocument } from "@/lib/actions";
import { getUser, getUsers } from "@/lib/database";
export async function thr... | interiorly-promo-fake | app/api/notifications/email/threadEmail.tsx | TypeScript | 7c94f03529e57b6071b81faf793edd56d0da8ea7017eaa15d0670641b1969d77 | 0 | 892 |
"use client";
import { useParams } from "next/navigation";
import { useEffect, useState } from "react";
import { Canvas } from "@/components/Canvas";
import { DocumentHeader, DocumentHeaderSkeleton } from "@/components/Document";
import { DocumentLayout, DocumentProviders } from "@/layouts/Document";
import { ErrorLay... | interiorly-promo-fake | app/canvas/[id]/CanvasDocumentView.tsx | TypeScript | 24c113e39815393bd1a6c639e88c86bf8c025ab7544975ebe762d9d2fdcdc060 | 0 | 299 |
import { getDocument } from "@/lib/actions";
import { CanvasDocumentView } from "./CanvasDocumentView";
export default async function Canvas({
params: { id },
}: {
params: { id: string };
}) {
const { data = null, error = null } = await getDocument({ documentId: id });
return <CanvasDocumentView initialDocume... | interiorly-promo-fake | app/canvas/[id]/page.tsx | TypeScript | f4dd9707f02045c8b1cf1b9799808bd2a294b06b43c096b1e59c0d3b6f791c6d | 0 | 89 |
import { redirect } from "next/navigation";
import { ReactNode } from "react";
import { auth } from "@/auth";
import { DashboardLayout } from "@/layouts/Dashboard";
import { getGroups } from "@/lib/database";
export default async function Dashboard({ children }: { children: ReactNode }) {
const session = await auth(... | interiorly-promo-fake | app/dashboard/layout.tsx | TypeScript | 5f992cf3699bf90b9dc785ad172ecc96074d1823fa190f6534feafec3c41ff44 | 0 | 145 |
import { DocumentsLayout } from "@/layouts/Documents";
export default async function DashboardPage() {
return <DocumentsLayout filter="all" />;
}
| interiorly-promo-fake | app/dashboard/page.tsx | TypeScript | 2c8310c376e6edb12c074e85353acdaac02044dec90d0742ec0f0ce9d3c07f7b | 0 | 33 |
import { DocumentsLayout } from "@/layouts/Documents";
export default async function DashboardDraftsPage() {
return <DocumentsLayout filter="drafts" />;
}
| interiorly-promo-fake | app/dashboard/drafts/page.tsx | TypeScript | a40f70f596e542229bae6e023351e334bcb13047172bd0690b7a5ef413604bbe | 0 | 33 |
import { DocumentsLayout } from "@/layouts/Documents";
type Props = {
params: { groupId: string };
};
export default async function DashboardGroupPage({ params }: Props) {
return <DocumentsLayout filter="group" groupId={params.groupId} />;
}
| interiorly-promo-fake | app/dashboard/group/[groupId]/page.tsx | TypeScript | c2bc957f2bd613d5a898caef8968040b263fc829677b17522a53c1386e0f4ea4 | 0 | 59 |
"use client";
import { signIn } from "next-auth/react";
import { users } from "@/data/users";
import { Select } from "@/primitives/Select";
import styles from "./signin.module.css";
// Used only for demo authentication, displays a dropdown of users
export function DemoLogin() {
return (
<div className={styles.a... | interiorly-promo-fake | app/signin/DemoLogin.tsx | TypeScript | 7a2353d7950744eb6905f6d1a2aa4dd23f847fd38e9edd1aa5b6a0dedd29fc8f | 0 | 158 |
"use client";
import { signIn } from "next-auth/react";
import { ComponentProps } from "react";
import { Button } from "@/primitives/Button";
import styles from "./signin.module.css";
interface Props extends ComponentProps<"div"> {
providers?: Record<string, string>;
}
export function NextAuthLogin({ providers }: ... | interiorly-promo-fake | app/signin/NextAuthLogin.tsx | TypeScript | 1bca42695242587e2a0e67d9cb9e6733c13b57981e8bfd6e7fd0f28badb54b81 | 0 | 184 |
import { redirect } from "next/navigation";
import { auth, getProviders } from "@/auth";
import { DASHBOARD_URL } from "@/constants";
import { DemoLogin } from "./DemoLogin";
import { NextAuthLogin } from "./NextAuthLogin";
import styles from "./signin.module.css";
export default async function SignInPage() {
const ... | interiorly-promo-fake | app/signin/page.tsx | TypeScript | 58baedcce868d195a41f4f137f11e9f8a71ff075a651cbb2b60564c795be2451 | 0 | 204 |
.container {
display: flex;
width: 100%;
min-height: 100vh;
}
.main,
.aside {
flex: 1 0 50%;
}
.main {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.aside {
display: none;
background: var(--color-surface);
}
.title {
margin-bottom: var(--space-9);
fo... | interiorly-promo-fake | app/signin/signin.module.css | CSS | d05e91fa4ef9c15f6f28a238d7a5afd12c47cd9817ee223979dfc66d64d62f45 | 0 | 155 |
import { getDocument } from "@/lib/actions";
import { TextDocumentView } from "./TextDocumentView";
export default async function Whiteboard({
params: { id },
}: {
params: { id: string };
}) {
const { data = null, error = null } = await getDocument({ documentId: id });
return <TextDocumentView initialDocument... | interiorly-promo-fake | app/text/[id]/page.tsx | TypeScript | 193c29e8a87727512842d2bd14fce2598ee00b0741f3fafa9ab235952353249b | 0 | 89 |
import { getDocument } from "@/lib/actions";
import { WhiteboardDocumentView } from "./WhiteboardDocumentView";
export default async function Whiteboard({
params: { id },
}: {
params: { id: string };
}) {
const { data = null, error = null } = await getDocument({ documentId: id });
return <WhiteboardDocumentVi... | interiorly-promo-fake | app/whiteboard/[id]/page.tsx | TypeScript | 5fb11eba6b76df070d26316cd4de216004e5f264abd3e5ddef8cb64dfa683ffe | 0 | 89 |
.badge {
position: fixed;
z-index: var(--z-badge);
right: var(--space-6);
bottom: var(--space-6);
transition: opacity var(--transition);
outline: none;
}
.badge:hover,
.badge:focus-visible {
opacity: var(--opacity-hover);
}
.image {
max-width: 100%;
min-width: 100%;
}
| interiorly-promo-fake | components/Badge/Badge.module.css | CSS | e2dac0b9530358ad98a1bd0e47e4fe6482a04ba10308970a7490c835d37651f7 | 0 | 99 |
import clsx from "clsx";
import { ComponentProps } from "react";
import styles from "./Badge.module.css";
export function Badge({
className,
...props
}: Omit<ComponentProps<"a">, "href">) {
return (
<a
className={clsx(className, styles.badge)}
href="https://liveblocks.io"
rel="noreferrer"
... | interiorly-promo-fake | components/Badge/Badge.tsx | TypeScript | a84fec0b5cae73a0a4a10157864da2d7cfd49a423ddc707e5899f9f5d52b187e | 0 | 184 |
export * from "./Badge";
| interiorly-promo-fake | components/Badge/index.ts | TypeScript | 7bfef24e279d9fdf87e73cc14b1a41fdd9a64b30c0ccd19874ccd91417b14e95 | 0 | 9 |
"use client";
import "tldraw/tldraw.css";
import { ClientSideSuspense } from "@liveblocks/react";
import { useSelf } from "@liveblocks/react/suspense";
import { Tldraw } from "tldraw";
import { DocumentSpinner } from "@/primitives/Spinner";
import { useStorageStore } from "./useStorageStore";
export function Canvas()... | interiorly-promo-fake | components/Canvas/Canvas.tsx | TypeScript | 07b82ff308b3d29e7e00088fa3738ec2114efe5fee7980af66eb00b38b232298 | 0 | 274 |
export * from "./Canvas";
| interiorly-promo-fake | components/Canvas/index.ts | TypeScript | e81baf965fddb4068676a407c222e8c2db51ce9dc5812d7995c2986c87097e5a | 0 | 9 |
import { useRoom } from "@liveblocks/react/suspense";
import { useEffect, useState } from "react";
import {
DocumentRecordType,
IndexKey,
InstancePresenceRecordType,
PageRecordType,
TLAnyShapeUtilConstructor,
TLDocument,
TLInstancePresence,
TLPageId,
TLRecord,
TLStoreEventInfo,
TLStoreWithStatus,
... | interiorly-promo-fake | components/Canvas/useStorageStore.ts | TypeScript | 95fd6bc62df5072b7d38e8977262f7bcdc3b7c5317dc7041098b29fa570b5e04 | 0 | 896 |
(type) {
// Object deleted from Liveblocks, remove from tldraw
case "delete": {
toRemove.push(id as TLRecord["id"]);
break;
}
// Object updated on Liveblocks, update tldraw
case "update": {... | interiorly-promo-fake | components/Canvas/useStorageStore.ts | TypeScript | 5d7d51abd83064e26c58cfac6fcb8942253b73ff7fc922dd41801c4f5f92da83 | 1 | 701 |
.cursor {
position: absolute;
z-index: var(--z-above);
top: 0;
left: 0;
pointer-events: none;
transition: transform var(--transition-linear);
user-select: none;
}
.pointer {
position: absolute;
top: 0;
left: 0;
}
.name {
position: absolute;
top: var(--space-8);
left: var(--space-8);
overfl... | interiorly-promo-fake | components/Cursors/Cursor.module.css | CSS | 86b581871bf9b260b183c98ff983c74009d3dd39f22f4f3c6dd393f7ba3cf1ca | 0 | 148 |
import clsx from "clsx";
import { ComponentProps, useMemo } from "react";
import { getContrastingColor } from "@/utils";
import styles from "./Cursor.module.css";
interface Props extends Omit<ComponentProps<"div">, "color"> {
color: string;
name: string;
x: number;
y: number;
}
export function Cursor({
x,
... | interiorly-promo-fake | components/Cursors/Cursor.tsx | TypeScript | 3b4786d088d79c796cbe3317eff12fdd73958cd6fd782fead88369161dbfd2eb | 0 | 319 |
import { useOthers, useUpdateMyPresence } from "@liveblocks/react/suspense";
import { MutableRefObject, useEffect } from "react";
import { Cursor } from "./Cursor";
interface Props {
// The element that's used for pointer events and scroll position
element: MutableRefObject<HTMLElement | null>;
}
/**
* This file... | interiorly-promo-fake | components/Cursors/Cursors.tsx | TypeScript | 04438be5000d08050ab438e9f7595c4959826b49a001adba68d2f5c05bc586de | 0 | 629 |
export * from "./Cursors";
| interiorly-promo-fake | components/Cursors/index.ts | TypeScript | c1a468109f0dc339a2793cb42e05157ff80ecd225132204df78083dde98f3a58 | 0 | 9 |
.header {
display: grid;
width: 100%;
height: 100%;
padding: 0 var(--space-8);
grid-template-columns: 1fr 2fr 1fr;
}
.menu,
.logo,
.profile {
display: flex;
place-items: center;
}
.menu {
place-content: flex-start;
}
.menuToggle {
display: flex;
width: 32px;
height: 32px;
background: var(--co... | interiorly-promo-fake | components/Dashboard/DashboardHeader.module.css | CSS | 0787ee90ea0db825fb286202db5d720cb142547462a46b976a7f83085a5b0816 | 0 | 464 |
import clsx from "clsx";
import Link from "next/link";
import { signOut, useSession } from "next-auth/react";
import { ComponentProps, MouseEventHandler } from "react";
import { CrossIcon, MenuIcon, SignOutIcon } from "@/icons";
import { Avatar } from "@/primitives/Avatar";
import { Button } from "@/primitives/Button";... | interiorly-promo-fake | components/Dashboard/DashboardHeader.tsx | TypeScript | 37654de070712825a6326dfc2f204b484b7138fe5cea2a87c341aeb7634ca077 | 0 | 555 |
.sidebar {
display: flex;
height: 100%;
flex-direction: column;
padding: var(--space-4);
}
.navigation {
overflow: auto;
flex: 1 1 auto;
}
.category:not(:last-of-type) {
margin-bottom: var(--space-4);
}
.categoryTitle {
display: block;
padding: 0 var(--space-5);
margin-bottom: var(--space-2);
f... | interiorly-promo-fake | components/Dashboard/DashboardSidebar.module.css | CSS | 0ae05c5e34b4e9867e2d457d4d8c4e300b90c37614795306fe25264d7d00b2d6 | 0 | 124 |
import clsx from "clsx";
import { usePathname } from "next/navigation";
import { ComponentProps, useMemo } from "react";
import {
DASHBOARD_DRAFTS_URL,
DASHBOARD_GROUP_URL,
DASHBOARD_URL,
} from "@/constants";
import { FileIcon, FolderIcon } from "@/icons";
import { LinkButton } from "@/primitives/Button";
import... | interiorly-promo-fake | components/Dashboard/DashboardSidebar.tsx | TypeScript | 1d9fe3089a0d443704e456e7b44910a7e459e77530792b8a712dfaf285722d75 | 0 | 502 |
export * from "./DashboardSidebar";
export * from "./DashboardHeader";
| interiorly-promo-fake | components/Dashboard/index.ts | TypeScript | 4d01107fb685ed3daa035225b9b06374f8c517fb387bde4ae801316acc888de4 | 0 | 18 |
.header {
display: grid;
width: 100%;
height: 100%;
padding: 0 var(--space-8);
gap: var(--space-6);
grid-template-columns: repeat(3, 1fr);
}
.logo,
.document,
.collaboration {
display: flex;
place-items: center;
}
.logo {
place-content: flex-start;
}
.logoLink {
transition: opacity var(--transiti... | interiorly-promo-fake | components/Document/DocumentHeader.module.css | CSS | 590ce5185a26c26f848a467eba861e87977d8de11bc431654647117a38d428df | 0 | 208 |
import { ClientSideSuspense } from "@liveblocks/react";
import clsx from "clsx";
import Link from "next/link";
import { ComponentProps } from "react";
import { InboxPopover } from "@/components/Inbox";
import { ShareIcon } from "@/icons";
import { renameDocument } from "@/lib/actions";
import { useInitialDocument } fro... | interiorly-promo-fake | components/Document/DocumentHeader.tsx | TypeScript | daa584d7898b4f004c1cb13c56665f1579af593253d5925ca476c872bba1846e | 0 | 581 |
import { useOthers, useSelf } from "@liveblocks/react/suspense";
import { useMemo } from "react";
import { AvatarStack } from "@/primitives/AvatarStack";
export function DocumentHeaderAvatars() {
const self = useSelf();
const others = useOthers();
const users = useMemo(
() => (self ? [self, ...others] : othe... | interiorly-promo-fake | components/Document/DocumentHeaderAvatars.tsx | TypeScript | e167c0e172d63b81d4fab4d39b6450498ed5f4cd2d3706d38e01be5a862428a1 | 0 | 160 |
.container {
display: flex;
width: 100%;
place-content: center;
place-items: center;
}
.name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.nameInput {
width: 100%;
background: transparent;
outline: none;
text-align: center;
}
.renameButton,
.badge {
flex: none;
margin... | interiorly-promo-fake | components/Document/DocumentHeaderName.module.css | CSS | 51c5aa5bd4206b7858938e1508054f8cb1b6a43e5c21d1eefe9961f5125cfc82 | 0 | 213 |
import {
useBroadcastEvent,
useEventListener,
useSelf,
} from "@liveblocks/react/suspense";
import clsx from "clsx";
import {
ChangeEvent,
ComponentProps,
KeyboardEvent,
useCallback,
useState,
} from "react";
import { EditIcon } from "@/icons";
import { getDocument } from "@/lib/actions";
import { useIn... | interiorly-promo-fake | components/Document/DocumentHeaderName.tsx | TypeScript | 6505fb7fd8f1bb6f596a4f7e8b88200807dda96481acfe89c7a0a50e26d99a78 | 0 | 671 |
export * from "./DocumentHeader";
| interiorly-promo-fake | components/Document/index.ts | TypeScript | d5582bbb84e5e6d7cdde29f2640e4421433b6dac64a184ef3b5d0973efce94a3 | 0 | 9 |
.popover {
display: flex;
min-width: 160px;
max-width: 320px;
flex-direction: column;
padding: var(--space-3);
}
| interiorly-promo-fake | components/Documents/DocumentCreatePopover.module.css | CSS | 67e4d6acd0c48af147736470e6c0215af017d222016e07a85c4068938597b7f8 | 0 | 39 |
import { ComponentProps, useState } from "react";
import { PlusIcon } from "@/icons";
import { createDocument } from "@/lib/actions";
import { Button } from "@/primitives/Button";
import { Popover } from "@/primitives/Popover";
import { Document, DocumentGroup, DocumentType, DocumentUser } from "@/types";
import styles... | interiorly-promo-fake | components/Documents/DocumentCreatePopover.tsx | TypeScript | 0482cbd56e0295aa045770311430af9c50b26d9b44049aad2cc0174f1cdc4512 | 0 | 467 |
.dialog {
width: 420px;
max-width: 100%;
padding: var(--space-8);
}
.description {
margin-bottom: var(--space-12);
color: var(--color-text-light);
}
.buttons {
display: flex;
justify-content: flex-end;
margin-top: var(--space-8);
gap: var(--space-8);
}
| interiorly-promo-fake | components/Documents/DocumentDeleteDialog.module.css | CSS | eff936bd88c47f969b25a374d9fc27c4133a5767ab0b155a93d88e1cd0830faf | 0 | 97 |
import { ComponentProps } from "react";
import { deleteDocument } from "@/lib/actions";
import { Button } from "@/primitives/Button";
import { Dialog } from "@/primitives/Dialog";
import styles from "./DocumentDeleteDialog.module.css";
interface Props
extends Omit<ComponentProps<typeof Dialog>, "content" | "title"> ... | interiorly-promo-fake | components/Documents/DocumentDeleteDialog.tsx | TypeScript | 04ffb236797e2d5bc5afee0856c0b78fcf2c814f53a4848069864abe172260e9 | 0 | 305 |
import { ComponentProps } from "react";
import { DocumentType } from "@/types";
interface Props extends Omit<ComponentProps<"svg">, "type"> {
type?: DocumentType;
}
function CanvasDocumentIcon(props: ComponentProps<"svg">) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={19}
height=... | interiorly-promo-fake | components/Documents/DocumentIcon.tsx | TypeScript | 1cad2d2f8edd42045421a190976a87b9740d2484b8f229b67c5397a7e9ad495e | 0 | 569 |
.row {
display: flex;
place-items: center;
position: relative;
}
.container {
display: grid;
flex: 1 0 auto;
width: 100%;
padding: var(--space-8) var(--space-19) var(--space-8) var(--space-8);
gap: var(--space-8);
grid-template-columns: auto 1fr auto;
outline: none;
}
.icon,
.info {
transition: ... | interiorly-promo-fake | components/Documents/DocumentRow.module.css | CSS | 64ed951b29149d3462611739a7c555f2019a2b88ccf781b40d3bbed5ac209159 | 0 | 500 |
import { RoomUser } from "@liveblocks/node";
import clsx from "clsx";
import { formatDistanceToNow } from "date-fns/formatDistanceToNow";
import Link from "next/link";
import { useSession } from "next-auth/react";
import {
ComponentProps,
useCallback,
useEffect,
useMemo,
useState,
} from "react";
import { DOC... | interiorly-promo-fake | components/Documents/DocumentRow.tsx | TypeScript | b86e87bd06158ee276b0bde46c9c9b7e75de0bfcb635afe20a0b59e3f07f29f4 | 0 | 896 |
>
</DocumentDeleteDialog>
</div>
}
modal
onOpenChange={setMoreOpen}
open={isMoreOpen}
side="bottom"
sideOffset={10}
{...props}
>
<Button
className={styles.moreButton}
... | interiorly-promo-fake | components/Documents/DocumentRow.tsx | TypeScript | 51eb2ec59ecb7554e180dbb647a646502dba2b7a5454a8418f92e13a07bd6aa0 | 1 | 252 |
import { memo } from "react";
import { getLiveUsers } from "@/lib/actions";
import { useDocumentsFunctionSWR } from "@/lib/hooks";
import { Document } from "@/types";
import { DocumentRow } from "./DocumentRow";
import styles from "@/layouts/Documents/DocumentsList.module.css";
type Props = {
documents: Document[];
... | interiorly-promo-fake | components/Documents/DocumentRowGroup.tsx | TypeScript | 860f07eca49693b8dad3ec7c77c051557b6fb02281511f12de9940a98790fbc9 | 0 | 271 |
export * from "./DocumentRow";
export * from "./DocumentIcon";
export * from "./DocumentCreatePopover";
export * from "./DocumentDeleteDialog";
| interiorly-promo-fake | components/Documents/index.ts | TypeScript | 40c46f3ae0b38977360f6b8d1b2d4af3674123214d96df35ce7f6f844a201e5f | 0 | 36 |
import {
InboxNotification,
InboxNotificationCustomKindProps,
} from "@liveblocks/react-ui";
import { DocumentIcon } from "@/components/Documents";
import { DOCUMENT_URL } from "@/constants";
import { getDocument } from "@/lib/actions";
import { useDocumentsFunctionSWR } from "@/lib/hooks";
import { LinkButton } fr... | interiorly-promo-fake | components/Inbox/CustomNotifications.tsx | TypeScript | d3be56de5f6bdee38216893d3889a2de527eeec64edd9de143c1ea10d2f7eb2a | 0 | 299 |
.inboxHeader {
display: flex;
place-items: center;
place-content: space-between;
position: sticky;
top: 0;
z-index: var(--z-above);
border-bottom: 1px solid var(--color-border);
background: var(--color-surface-elevated);
padding: var(--space-3) var(--space-3) var(--space-3) var(--space-8);
}
.inboxHe... | interiorly-promo-fake | components/Inbox/Inbox.module.css | CSS | 4db9477ab4276d780fc7cf292eac072606cb2067223cbd77262416370c600a8a | 0 | 285 |
import { ClientSideSuspense } from "@liveblocks/react";
import {
useInboxNotifications,
useMarkAllInboxNotificationsAsRead,
useUnreadInboxNotificationsCount,
} from "@liveblocks/react/suspense";
import { InboxNotification, InboxNotificationList } from "@liveblocks/react-ui";
import clsx from "clsx";
import { Comp... | interiorly-promo-fake | components/Inbox/Inbox.tsx | TypeScript | 670991c629c692b45a4a772dc9148e7a22baca6a0f69b1e6ee8c48e29b324dd7 | 0 | 528 |
.inboxPopover {
display: flex;
width: 460px;
max-height: calc(100vh - var(--header-height) - var(--space-8));
flex-direction: column;
overflow-y: auto;
}
@media (max-width: 480px) {
.inboxPopover {
width: 94vw;
height: 100%;
}
}
.inboxPopoverUnreadCount {
position: absolute;
top: 0;
right:... | interiorly-promo-fake | components/Inbox/InboxPopover.module.css | CSS | 1488ff0c1d3663732e0cd25caaa6ae6b4940b424a3589b2d58b2c586f5d19aa4 | 0 | 191 |
import { ClientSideSuspense } from "@liveblocks/react";
import { useUnreadInboxNotificationsCount } from "@liveblocks/react/suspense";
import { usePathname } from "next/navigation";
import { ComponentProps, useEffect, useState } from "react";
import { InboxIcon } from "@/icons";
import { Button } from "@/primitives/But... | interiorly-promo-fake | components/Inbox/InboxPopover.tsx | TypeScript | 000485e0c2fb65c017327e15674467f1483489022515be9e2a6772e492abe1c3 | 0 | 305 |
.dialog {
width: 420px;
max-width: 100%;
padding: var(--space-8) 0;
}
.description {
margin-bottom: var(--space-10);
color: var(--color-text-light);
}
.switches {
display: flex;
flex-direction: column;
gap: var(--space-6);
}
.switches h3 {
font-weight: 500;
font-size: var(--size-sm);
padding: 0... | interiorly-promo-fake | components/Inbox/InboxSettingsDialog.module.css | CSS | 4b270a73aa3a40eefe897324d1a9d56ef8135d1076682c2f012950c96c20eab9 | 0 | 321 |
import {
useIsInsideRoom,
useNotificationSettings,
useRoomNotificationSettings,
} from "@liveblocks/react/suspense";
import clsx from "clsx";
import { ReactNode, Suspense } from "react";
import { Dialog } from "@/primitives/Dialog";
import { Select } from "@/primitives/Select";
import { Spinner } from "@/primitiv... | interiorly-promo-fake | components/Inbox/InboxSettingsDialog.tsx | TypeScript | bb6dd27082251c6f9ecdca1758335601c3a81701d2aec41be5ab1e0bf0c479fe | 0 | 796 |
export * from "./Inbox";
export * from "./InboxPopover";
| interiorly-promo-fake | components/Inbox/index.ts | TypeScript | 4d6e0fd5f6d675afac71e73105759eb9cf7c631cd44ee17eaede4fbc83117be6 | 0 | 18 |
export * from "./Logo";
| interiorly-promo-fake | components/Logo/index.ts | TypeScript | 6359f824c77e9f0a04d8e0be42727c044877420d5abab78efb88e086915cd716 | 0 | 9 |
.logo {
display: flex;
font-size: var(--size-lg);
font-weight: 700;
place-content: center;
place-items: center;
}
.mark {
width: 1.35em;
height: 1.35em;
margin-right: 0.35em;
}
.wordmark {
white-space: nowrap;
}
| interiorly-promo-fake | components/Logo/Logo.module.css | CSS | 5bf6bc595a63e42eafb56a088bd89ee839f9f454be6f9248c82ba4457676a09b | 0 | 70 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.