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/udecode/plate/packages/yjs
petrpan-code/udecode/plate/packages/yjs/src/yjsStore.ts
import { createStore } from '@udecode/plate-common'; export const yjsStore = createStore('yjs')({ isConnected: false, isSynced: false, }); export const yjsActions = yjsStore.set; export const yjsSelectors = yjsStore.get; export const useYjsSelectors = yjsStore.use; export const useYjsStore = yjsStore.useStore;
900
0
petrpan-code/udecode/plate
petrpan-code/udecode/plate/patches/is-hotkey+0.2.0.patch
diff --git a/node_modules/is-hotkey/lib/index.js b/node_modules/is-hotkey/lib/index.js index 7f2a126..3cf32b1 100644 --- a/node_modules/is-hotkey/lib/index.js +++ b/node_modules/is-hotkey/lib/index.js @@ -8,7 +8,8 @@ Object.defineProperty(exports, "__esModule", { * Constants. */ -var IS_MAC = typeof window != 'un...
901
0
petrpan-code/udecode/plate
petrpan-code/udecode/plate/playwright/table.spec.ts
import { test, expect } from '@playwright/test'; const getCell = (page: Locator, row: number, column: number) => page.locator(`table > tbody > tr:nth-child(${row}) > :nth-child(${column})`); const getLeftEdge = (locator: Locator) => locator.boundingBox().then((box) => box.x); const getWidth = (locator: Locator) => loc...
902
0
petrpan-code/udecode/plate
petrpan-code/udecode/plate/scripts/jsdom+19.0.0.patch
diff --git a/node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js b/node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js index d9df3cd..8d34a3d 100644 --- a/node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js +++ b/node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js @@ -3,7 +3,21 @...
903
0
petrpan-code/udecode/plate
petrpan-code/udecode/plate/scripts/setupTests.ts
import '@testing-library/jest-dom/extend-expect'; import 'slate-test-utils/dist/cjs/mocks'; import { TextEncoder } from 'node:util'; global.TextEncoder = TextEncoder; jest.spyOn(global.console, 'warn').mockImplementation(() => jest.fn()); jest.spyOn(global.console, 'error').mockImplementation(() => jest.fn()); jest....
904
0
petrpan-code/udecode/plate
petrpan-code/udecode/plate/scripts/styleMock.cjs
module.exports = {};
905
0
petrpan-code/udecode/plate
petrpan-code/udecode/plate/scripts/sync-templates.sh
#!/bin/bash set -e # bail on errors GLOB=$1 OWNER=udecode IS_CI="${CI:-false}" BASE=$(pwd) COMMIT_MESSAGE=$(git log -1 --pretty=%B) for folder in $GLOB; do [ -d "$folder" ] || continue cd $BASE # if [ -n "$(git status --porcelain)" ]; then # git add . # git commit -m "♻️" # git push origin main # fi ...
906
0
petrpan-code/udecode/plate/scripts
petrpan-code/udecode/plate/scripts/plop/plop-config.cjs
const path = require('node:path'); module.exports = { inputPath: path.resolve(__dirname, '../../apps/www/src'), };
907
0
petrpan-code/udecode/plate/scripts
petrpan-code/udecode/plate/scripts/plop/plop-package.cjs
const packageJsonPlate = require('@udecode/plate/package.json'); const packageJsonPlateCore = require('@udecode/plate-core/package.json'); module.exports = (_plop) => { /** @type {import('plop').NodePlopAPI} */ const plop = _plop; plop.setGenerator('package', { description: 'New package', prompts: [ ...
908
0
petrpan-code/udecode/plate/scripts
petrpan-code/udecode/plate/scripts/plop/plopfile.cjs
module.exports = (plop) => { require('./plop-package.cjs')(plop); };
909
0
petrpan-code/udecode/plate/scripts/plop/templates
petrpan-code/udecode/plate/scripts/plop/templates/package/.npmignore.hbs
__tests__ __test-utils__ __mocks__
910
0
petrpan-code/udecode/plate/scripts/plop/templates
petrpan-code/udecode/plate/scripts/plop/templates/package/README.md.hbs
# {{description}} ## Documentation WIP ## License [MIT](../../LICENSE)
911
0
petrpan-code/udecode/plate/scripts/plop/templates
petrpan-code/udecode/plate/scripts/plop/templates/package/package.json.hbs
{ "name": "@udecode/plate-{{name}}", "version": "{{plateVersion}}", "description": "{{description}}", "license": "MIT", "homepage": "https://platejs.org", "repository": { "type": "git", "url": "https://github.com/udecode/plate.git", "directory": "packages/{{name}}" }, "bugs": { "url": "h...
912
0
petrpan-code/udecode/plate/scripts/plop/templates
petrpan-code/udecode/plate/scripts/plop/templates/package/tsconfig.json.hbs
{ "extends": "../../config/tsconfig.build.json", "compilerOptions": { "declarationDir": "./dist", "outDir": "./dist" }, "include": ["src"] }
913
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/.editorconfig
# editorconfig.org root = true [*] charset = utf-8 end_of_line = lf indent_size = 2 indent_style = space insert_final_newline = true trim_trailing_whitespace = true
914
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/.eslintignore
dist/* .cache public node_modules *.esm.js
915
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/.eslintrc.js
const prettierConfig = require('./prettier.config.js'); module.exports = { $schema: 'https://json.schemastore.org/eslintrc', root: true, extends: [ 'next/core-web-vitals', 'prettier', 'plugin:tailwindcss/recommended', ], plugins: ['tailwindcss', 'unused-imports', 'prettier'], rules: { '@nex...
916
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/.prettierignore
cache .cache package.json package-lock.json public CHANGELOG.md .yarn dist node_modules .next build .contentlayer
917
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/LICENSE
The MIT License (MIT) Copyright (c) Ziad Beyens, Dylan Schiemann, Joe Anderson, shadcn 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...
918
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/README.md
# Playground Template A comprehensive playground template for building rich-text editors with [Plate](https://platejs.org/) and Next.js 13. ## Usage ```bash pnpm create next-app -e https://github.com/udecode/plate-playground-template ``` ## Features - Next.js 13 App Directory - [Plate](https://platejs.org/) Editor...
919
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/components.json
{ "$schema": "https://platejs.org/schema.json", "style": "default", "rsc": true, "tailwind": { "config": "tailwind.config.js", "css": "src/styles/globals.css", "baseColor": "slate", "cssVariables": true }, "aliases": { "components": "@/components", "utils": "@/lib/utils" } }
920
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/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.
921
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/next.config.mjs
/** @type {import('next').NextConfig} */ const nextConfig = {}; export default nextConfig;
922
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/package.json
{ "name": "plate-playground-template", "version": "0.0.1", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", "lint:fix": "next lint --fix", "preview": "next build && next start", "typecheck": "tsc --noEmit" }, "dep...
923
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/pnpm-lock.yaml
lockfileVersion: '6.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false dependencies: '@radix-ui/react-avatar': specifier: ^1.0.3 version: 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-checkbox': specifier: ^1.0.4 version:...
924
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/postcss.config.js
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, }, }
925
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/prettier.config.js
/** @type {import('prettier').Config} */ module.exports = { endOfLine: 'lf', semi: true, singleQuote: true, tabWidth: 2, trailingComma: 'es5', importOrder: [ '^(react/(.*)$)|^(react$)', '^(next/(.*)$)|^(next$)', '<THIRD_PARTY_MODULES>', '', '^types$', '^@/types/(.*)$', '^@/config...
926
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/tailwind.config.js
const { fontFamily } = require('tailwindcss/defaultTheme'); /** @type {import('tailwindcss').Config} */ module.exports = { darkMode: ['class'], content: ['src/**/*.{ts,tsx}'], theme: { container: { center: true, padding: '2rem', screens: { '2xl': '1400px', }, }, extend...
927
0
petrpan-code/udecode/plate/templates
petrpan-code/udecode/plate/templates/plate-playground-template/tsconfig.json
{ "compilerOptions": { "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "incremental": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "r...
928
0
petrpan-code/udecode/plate/templates/plate-playground-template
petrpan-code/udecode/plate/templates/plate-playground-template/public/next.svg
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="...
929
0
petrpan-code/udecode/plate/templates/plate-playground-template
petrpan-code/udecode/plate/templates/plate-playground-template/public/thirteen.svg
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="31" fill="none"><g opacity=".9"><path fill="url(#a)" d="M13 .4v29.3H7V6.3h-.2L0 10.5V5L7.2.4H13Z"/><path fill="url(#b)" d="M28.8 30.1c-2.2 0-4-.3-5.7-1-1.7-.8-3-1.8-4-3.1a7.7 7.7 0 0 1-1.4-4.6h6.2c0 .8.3 1.4.7 2 .4.5 1 .9 1.7 1.2.7.3 1.6.4 2.5.4 1 0 1.7-.2 2.5-...
930
0
petrpan-code/udecode/plate/templates/plate-playground-template
petrpan-code/udecode/plate/templates/plate-playground-template/public/vercel.svg
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-1...
931
0
petrpan-code/udecode/plate/templates/plate-playground-template/src
petrpan-code/udecode/plate/templates/plate-playground-template/src/app/layout.tsx
import { siteConfig } from '@/config/site'; import { fontSans } from '@/lib/fonts'; import { cn } from '@/lib/utils'; import { TooltipProvider } from '@/components/plate-ui/tooltip'; import { SiteHeader } from '@/components/site/site-header'; import { TailwindIndicator } from '@/components/site/tailwind-indicator'; imp...
932
0
petrpan-code/udecode/plate/templates/plate-playground-template/src
petrpan-code/udecode/plate/templates/plate-playground-template/src/app/page.tsx
import Link from 'next/link'; import { siteConfig } from '@/config/site'; import PlateEditor from '@/components/plate-editor'; import { buttonVariants } from '@/components/plate-ui/button'; export default function IndexPage() { return ( <section className="container grid items-center gap-6 pb-8 pt-6 md:py-10"> ...
933
0
petrpan-code/udecode/plate/templates/plate-playground-template/src
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/icons.tsx
import React from 'react'; import { cva } from 'class-variance-authority'; import { AlignCenter, AlignJustify, AlignLeft, AlignRight, Baseline, Bold, Check, ChevronDown, ChevronRight, ChevronsUpDown, Code2, Edit2, ExternalLink, Eye, FileCode, GripVertical, Heading1, Heading2, Headi...
934
0
petrpan-code/udecode/plate/templates/plate-playground-template/src
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-editor.tsx
'use client'; import React, { useRef } from 'react'; import { CommentsProvider } from '@udecode/plate-comments'; import { Plate } from '@udecode/plate-common'; import { ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph'; import { DndProvider } from 'react-dnd'; import { HTML5Backend } from 'react-dnd-html5-backend'; ...
935
0
petrpan-code/udecode/plate/templates/plate-playground-template/src
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/tabbable-element.tsx
import React, { CSSProperties } from 'react'; import { PlateElementProps } from '@udecode/plate-common'; import { useFocused, useSelected } from 'slate-react'; const boxStyle: CSSProperties = { padding: '8px', marginBottom: '8px', }; const unselectedBoxStyle: CSSProperties = { ...boxStyle, border: '1px solid ...
936
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/align-dropdown-menu.tsx
'use client'; import React from 'react'; import { DropdownMenuProps } from '@radix-ui/react-dropdown-menu'; import { useAlignDropdownMenu, useAlignDropdownMenuState, } from '@udecode/plate-alignment'; import { Icons, iconVariants } from '@/components/icons'; import { DropdownMenu, DropdownMenuContent, Drop...
937
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/avatar.tsx
'use client'; import * as React from 'react'; import * as AvatarPrimitive from '@radix-ui/react-avatar'; import { cn } from '@/lib/utils'; const Avatar = React.forwardRef< React.ElementRef<typeof AvatarPrimitive.Root>, React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> >(({ className, ...props }, ref) =...
938
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/blockquote-element.tsx
'use client'; import React from 'react'; import { PlateElement, PlateElementProps } from '@udecode/plate-common'; import { cn } from '@/lib/utils'; const BlockquoteElement = React.forwardRef< React.ElementRef<typeof PlateElement>, PlateElementProps >(({ className, children, ...props }, ref) => { return ( <...
939
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/button.tsx
import * as React from 'react'; import { Slot } from '@radix-ui/react-slot'; import { cva, VariantProps } from 'class-variance-authority'; import { cn } from '@/lib/utils'; const buttonVariants = cva( 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background tr...
940
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/caption.tsx
import React, { ComponentProps } from 'react'; import { Caption as CaptionPrimitive, CaptionTextarea as CaptionTextareaPrimitive, } from '@udecode/plate-caption'; import { cva, VariantProps } from 'class-variance-authority'; import { cn } from '@/lib/utils'; const captionVariants = cva('max-w-full', { variants:...
941
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/checkbox.tsx
'use client'; import * as React from 'react'; import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; const Checkbox = React.forwardRef< React.ElementRef<typeof CheckboxPrimitive.Root>, React.ComponentPropsWithoutRef<typeof Chec...
942
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/code-block-combobox.tsx
'use client'; import React, { useState } from 'react'; import { CODE_BLOCK_LANGUAGES, CODE_BLOCK_LANGUAGES_POPULAR, useCodeBlockCombobox, useCodeBlockComboboxState, } from '@udecode/plate-code-block'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; import { Button } from './butt...
943
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/code-block-element.css
/** * One Light theme for prism.js * Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax */ /** * One Light colours (accurate as of commit eb064bf on 19 Feb 2021) * From colors.less * --mono-1: hsl(230, 8%, 24%); * --mono-2: hsl(230, 6%, 44%); * --mono-3: hsl(230...
944
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/code-block-element.tsx
'use client'; import './code-block-element.css'; import React, { forwardRef } from 'react'; import { TCodeBlockElement, useCodeBlockElementState, } from '@udecode/plate-code-block'; import { PlateElement, PlateElementProps, Value } from '@udecode/plate-common'; import { cn } from '@/lib/utils'; import { CodeBlo...
945
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/code-leaf.tsx
'use client'; import React from 'react'; import { PlateLeaf, PlateLeafProps } from '@udecode/plate-common'; import { cn } from '@/lib/utils'; export function CodeLeaf({ className, children, ...props }: PlateLeafProps) { return ( <PlateLeaf asChild className={cn( 'whitespace-pre-wrap', ...
946
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/code-line-element.tsx
'use client'; import React, { forwardRef } from 'react'; import { PlateElement, PlateElementProps } from '@udecode/plate-common'; const CodeLineElement = forwardRef<HTMLDivElement, PlateElementProps>( (props, ref) => <PlateElement ref={ref} {...props} /> ); CodeLineElement.displayName = 'CodeLineElement'; export {...
947
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/code-syntax-leaf.tsx
'use client'; import React from 'react'; import { useCodeSyntaxLeaf } from '@udecode/plate-code-block'; import { PlateLeaf, PlateLeafProps } from '@udecode/plate-common'; export function CodeSyntaxLeaf({ children, ...props }: PlateLeafProps) { const { leaf } = props; const { tokenProps } = useCodeSyntaxLeaf({ le...
948
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/color-constants.ts
export const DEFAULT_COLORS = [ { name: 'black', value: '#000000', isBrightColor: false, }, { name: 'dark grey 4', value: '#434343', isBrightColor: false, }, { name: 'dark grey 3', value: '#666666', isBrightColor: false, }, { name: 'dark grey 2', value: '#999999...
949
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/color-dropdown-menu-items.tsx
'use client'; import React from 'react'; import { DropdownMenuItemProps } from '@radix-ui/react-dropdown-menu'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; import { buttonVariants } from '@/components/plate-ui/button'; import { DropdownMenuItem } from '@/components/plate-ui/dropdown-...
950
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/color-dropdown-menu.tsx
'use client'; import React from 'react'; import { DropdownMenuProps } from '@radix-ui/react-dropdown-menu'; import { useColorDropdownMenu, useColorDropdownMenuState, } from '@udecode/plate-font'; import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, } from '@/components/plate-ui/dropdown-menu'; i...
951
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/color-input.tsx
'use client'; import React from 'react'; import { useColorInput } from '@udecode/plate-font'; import { cn } from '@/lib/utils'; export function ColorInput({ value = '#000000', onChange, children, className, ...props }: React.InputHTMLAttributes<HTMLInputElement>) { const { inputRef, childProps } = useCol...
952
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/color-picker.tsx
'use client'; import React from 'react'; import { cn } from '@/lib/utils'; import { buttonVariants } from '@/components/plate-ui/button'; import { DropdownMenuItem } from '@/components/plate-ui/dropdown-menu'; import { Separator } from '@/components/plate-ui/separator'; import { TColor } from './color-dropdown-menu'...
953
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/colors-custom.tsx
'use client'; import React from 'react'; import { useColorsCustom, useColorsCustomState } from '@udecode/plate-font'; import { buttonVariants } from '@/components/plate-ui/button'; import { DropdownMenuItem } from '@/components/plate-ui/dropdown-menu'; import { TColor } from './color-dropdown-menu'; import { ColorDr...
954
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/combobox.tsx
'use client'; import React, { useEffect } from 'react'; import * as Popover from '@radix-ui/react-popover'; import { comboboxActions, ComboboxContentItemProps, ComboboxContentProps, ComboboxProps, Data, NoData, TComboboxItem, useActiveComboboxStore, useComboboxContent, useComboboxContentState, us...
955
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/command.tsx
'use client'; import * as React from 'react'; import { DialogProps } from '@radix-ui/react-dialog'; import { Command as CommandPrimitive } from 'cmdk'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; import { Dialog, DialogContent } from './dialog'; const Command = React.forwardRef< ...
956
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-avatar.tsx
'use client'; import React from 'react'; import { useUserById } from '@udecode/plate-comments'; import { Avatar, AvatarFallback, AvatarImage, } from '@/components/plate-ui/avatar'; export function CommentAvatar({ userId }: { userId: string | null }) { const user = useUserById(userId); if (!user) return nul...
957
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-create-form.tsx
'use client'; import React from 'react'; import { CommentNewSubmitButton, CommentNewTextarea, useCommentsSelectors, } from '@udecode/plate-comments'; import { cn } from '@/lib/utils'; import { buttonVariants } from '@/components/plate-ui/button'; import { inputVariants } from '@/components/plate-ui/input'; imp...
958
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-item.tsx
'use client'; import React from 'react'; import { CommentProvider, useCommentById, useCommentItemContentState, } from '@udecode/plate-comments'; import { formatDistance } from 'date-fns'; import { CommentAvatar } from './comment-avatar'; import { CommentMoreDropdown } from './comment-more-dropdown'; import { Co...
959
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-leaf.tsx
'use client'; import React from 'react'; import { TCommentText, useCommentLeaf, useCommentLeafState, } from '@udecode/plate-comments'; import { PlateLeaf, PlateLeafProps, Value } from '@udecode/plate-common'; import { cn } from '@/lib/utils'; export function CommentLeaf({ className, ...props }: PlateLeafPr...
960
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-more-dropdown.tsx
'use client'; import React from 'react'; import { useCommentDeleteButton, useCommentDeleteButtonState, useCommentEditButton, useCommentEditButtonState, } from '@udecode/plate-comments'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; import { Button } from '@/components/plate-ui/...
961
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-reply-items.tsx
'use client'; import React from 'react'; import { SCOPE_ACTIVE_COMMENT, useCommentReplies, } from '@udecode/plate-comments'; import { CommentItem } from './comment-item'; export function CommentReplyItems() { const commentReplies = useCommentReplies(SCOPE_ACTIVE_COMMENT); return ( <> {Object.keys(...
962
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-resolve-button.tsx
'use client'; import React from 'react'; import { CommentResolveButton as CommentResolveButtonPrimitive, useComment, } from '@udecode/plate-comments'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; import { buttonVariants } from '@/components/plate-ui/button'; export function Comme...
963
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-toolbar-button.tsx
'use client'; import React from 'react'; import { useCommentAddButton } from '@udecode/plate-comments'; import { Icons } from '@/components/icons'; import { ToolbarButton } from './toolbar'; export function CommentToolbarButton() { const { hidden, props } = useCommentAddButton(); if (hidden) return null; re...
964
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comment-value.tsx
'use client'; import React from 'react'; import { CommentEditActions, CommentEditTextarea, useCommentValue, } from '@udecode/plate-comments'; import { cn } from '@/lib/utils'; import { buttonVariants } from '@/components/plate-ui/button'; import { inputVariants } from '@/components/plate-ui/input'; export func...
965
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/comments-popover.tsx
'use client'; import React from 'react'; import { CommentProvider, CommentsPositioner, SCOPE_ACTIVE_COMMENT, useFloatingCommentsContentState, useFloatingCommentsState, } from '@udecode/plate-comments'; import { PortalBody } from '@udecode/plate-common'; import { cn } from '@/lib/utils'; import { popoverVari...
966
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/cursor-overlay.tsx
import React from 'react'; import { createStore } from '@udecode/plate-common'; import { CursorData, CursorOverlay as CursorOverlayPrimitive, CursorOverlayProps, CursorProps, } from '@udecode/plate-cursor'; import { cn } from '@/lib/utils'; export const cursorStore = createStore('cursor')({ cursors: {}, });...
967
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/dialog.tsx
'use client'; import * as React from 'react'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; const Dialog = DialogPrimitive.Root; const DialogTrigger = DialogPrimitive.Trigger; const DialogPortal = ({ className, ...props ...
968
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/draggable.tsx
'use client'; import React, { forwardRef } from 'react'; import { ClassNames, PlateElementProps, TEditor } from '@udecode/plate-common'; import { DragItemNode, useDraggable, useDraggableState, } from '@udecode/plate-dnd'; import { DropTargetMonitor } from 'react-dnd'; import { cn } from '@/lib/utils'; import { ...
969
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/dropdown-menu.tsx
'use client'; import * as React from 'react'; import { useCallback, useState } from 'react'; import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import { cva, VariantProps } from 'class-variance-authority'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; const Dropdo...
970
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/editor.tsx
import React from 'react'; import { PlateContent } from '@udecode/plate-common'; import { cva } from 'class-variance-authority'; import { cn } from '@/lib/utils'; import type { PlateContentProps } from '@udecode/plate-common'; import type { VariantProps } from 'class-variance-authority'; const editorVariants = cva( ...
971
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-combobox.tsx
import React from 'react'; import { ComboboxItemProps } from '@udecode/plate-combobox'; import { EmojiItemData, KEY_EMOJI, TEmojiCombobox, useEmojiComboboxState, } from '@udecode/plate-emoji'; import { Combobox } from './combobox'; export function EmojiComboboxItem({ item }: ComboboxItemProps<EmojiItemData>) ...
972
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-dropdown-menu.tsx
import React from 'react'; import { EmojiDropdownMenuOptions, useEmojiDropdownMenuState, } from '@udecode/plate-emoji'; import { Icons } from '@/components/icons'; import { EmojiToolbarDropdown } from '@/components/plate-ui/emoji-toolbar-dropdown'; import { ToolbarButton, ToolbarButtonProps, } from '@/componen...
973
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-icons.tsx
import React from 'react'; import { EmojiCategoryList } from '@udecode/plate-emoji'; export const emojiCategoryIcons: Record< EmojiCategoryList, { outline: React.ReactElement; solid: React.ReactElement } > = { activity: { outline: ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <...
974
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-picker-content.tsx
import React, { memo, useCallback } from 'react'; import { Emoji, EmojiSettings, GridRow, UseEmojiPickerType, } from '@udecode/plate-emoji'; import { cn } from '@/lib/utils'; export type EmojiPickerContentProps = Pick< UseEmojiPickerType, | 'i18n' | 'onMouseOver' | 'onSelectEmoji' | 'emojiLibrary' ...
975
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-picker-navigation.tsx
import React from 'react'; import { EmojiCategoryList, IEmojiFloatingLibrary, UseEmojiPickerType, } from '@udecode/plate-emoji'; import { cn } from '@/lib/utils'; export type EmojiPickerNavigationProps = Pick< UseEmojiPickerType, 'i18n' | 'emojiLibrary' | 'icons' | 'focusedCategory' > & { onClick: (id: Em...
976
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-picker-preview.tsx
import React from 'react'; import { UseEmojiPickerType } from '@udecode/plate-emoji'; export type EmojiPickerPreviewProps = Pick< UseEmojiPickerType, 'emoji' | 'hasFound' | 'isSearching' | 'i18n' >; export type EmojiPreviewProps = Pick<UseEmojiPickerType, 'emoji'>; export type NoEmojiPreviewProps = Pick<UseEmoji...
977
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-picker-search-and-clear.tsx
import React from 'react'; import { UseEmojiPickerType } from '@udecode/plate-emoji'; import { cn } from '@/lib/utils'; import { Icons } from '@/components/icons'; export type EmojiPickerSearchAndClearProps = Pick< UseEmojiPickerType, 'i18n' | 'searchValue' | 'clearSearch' >; export function EmojiPickerSearchAnd...
978
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-picker-search-bar.tsx
import React, { ReactNode } from 'react'; import { UseEmojiPickerType } from '@udecode/plate-emoji'; export type EmojiPickerSearchBarProps = { children: ReactNode; } & Pick<UseEmojiPickerType, 'i18n' | 'searchValue' | 'setSearch'>; export function EmojiPickerSearchBar({ i18n, searchValue, setSearch, childre...
979
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-picker.tsx
import React from 'react'; import { EmojiSettings, UseEmojiPickerType } from '@udecode/plate-emoji'; import { cn } from '@/lib/utils'; import { EmojiPickerContent } from './emoji-picker-content'; import { EmojiPickerNavigation } from './emoji-picker-navigation'; import { EmojiPickerPreview } from './emoji-picker-prev...
980
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/emoji-toolbar-dropdown.tsx
import React, { ReactNode } from 'react'; import * as Popover from '@radix-ui/react-popover'; type EmojiToolbarDropdownProps = { control: ReactNode; isOpen: boolean; setIsOpen: (open: boolean) => void; children: ReactNode; }; export function EmojiToolbarDropdown({ control, isOpen, setIsOpen, children,...
981
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/excalidraw-element.tsx
import React from 'react'; import { PlateElement, PlateElementProps, Value } from '@udecode/plate-common'; import { TExcalidrawElement, useExcalidrawElement, } from '@udecode/plate-excalidraw'; export function ExcalidrawElement({ nodeProps, ...props }: PlateElementProps<Value, TExcalidrawElement>) { const { ...
982
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/fixed-toolbar-buttons.tsx
import React from 'react'; import { MARK_BOLD, MARK_CODE, MARK_ITALIC, MARK_STRIKETHROUGH, MARK_UNDERLINE, } from '@udecode/plate-basic-marks'; import { useEditorReadOnly } from '@udecode/plate-common'; import { MARK_BG_COLOR, MARK_COLOR } from '@udecode/plate-font'; import { ListStyleType } from '@udecode/pl...
983
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/fixed-toolbar.tsx
import React from 'react'; import { cn } from '@/lib/utils'; import { Toolbar, ToolbarProps } from './toolbar'; const FixedToolbar = React.forwardRef<HTMLDivElement, ToolbarProps>( ({ className, ...props }: ToolbarProps, ref) => { return ( <Toolbar ref={ref} className={cn( 'supp...
984
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/floating-toolbar-buttons.tsx
import React from 'react'; import { MARK_BOLD, MARK_CODE, MARK_ITALIC, MARK_STRIKETHROUGH, MARK_UNDERLINE, } from '@udecode/plate-basic-marks'; import { useEditorReadOnly } from '@udecode/plate-common'; import { Icons } from '@/components/icons'; import { CommentToolbarButton } from '@/components/plate-ui/co...
985
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/floating-toolbar.tsx
'use client'; import React from 'react'; import { PortalBody, useComposedRef } from '@udecode/plate-common'; import { flip, FloatingToolbarState, offset, useFloatingToolbar, useFloatingToolbarState, } from '@udecode/plate-floating'; import { cn } from '@/lib/utils'; import { Toolbar, ToolbarProps } from '....
986
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/heading-element.tsx
import React from 'react'; import { PlateElement, PlateElementProps } from '@udecode/plate-common'; import { cva, VariantProps } from 'class-variance-authority'; const headingVariants = cva('', { variants: { variant: { h1: 'mb-1 mt-[2em] font-heading text-4xl font-bold', h2: 'mb-px mt-[1.4em] font-he...
987
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/highlight-leaf.tsx
import React from 'react'; import { PlateLeaf, PlateLeafProps } from '@udecode/plate-common'; import { cn } from '@/lib/utils'; export function HighlightLeaf({ className, children, ...props }: PlateLeafProps) { return ( <PlateLeaf asChild className={cn('bg-primary/20 text-inherit dark:bg-prima...
988
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/hr-element.tsx
import React from 'react'; import { PlateElement, PlateElementProps } from '@udecode/plate-common'; import { useFocused, useSelected } from 'slate-react'; import { cn } from '@/lib/utils'; const HrElement = React.forwardRef< React.ElementRef<typeof PlateElement>, PlateElementProps >(({ className, nodeProps, ...pr...
989
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/image-element.tsx
import React from 'react'; import { PlateElement, PlateElementProps, Value } from '@udecode/plate-common'; import { ELEMENT_IMAGE, Image, TImageElement, useMediaState, } from '@udecode/plate-media'; import { useResizableStore } from '@udecode/plate-resizable'; import { cn } from '@/lib/utils'; import { Captio...
990
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/indent-list-toolbar-button.tsx
import React from 'react'; import { ListStyleType, useIndentListToolbarButton, useIndentListToolbarButtonState, } from '@udecode/plate-indent-list'; import { Icons } from '@/components/icons'; import { ToolbarButton, ToolbarButtonProps } from './toolbar'; export function IndentListToolbarButton({ nodeType = ...
991
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/indent-toolbar-button.tsx
import React from 'react'; import { useIndentButton } from '@udecode/plate-indent'; import { Icons } from '@/components/icons'; import { ToolbarButton } from './toolbar'; export function IndentToolbarButton() { const { props } = useIndentButton(); return ( <ToolbarButton tooltip="Indent" {...props}> <...
992
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/input.tsx
import * as React from 'react'; import { cva, VariantProps } from 'class-variance-authority'; import { cn } from '@/lib/utils'; export const inputVariants = cva( 'flex w-full rounded-md bg-transparent text-sm file:border-0 file:bg-background file:text-sm file:font-medium placeholder:text-muted-foreground focus-visi...
993
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/insert-dropdown-menu.tsx
'use client'; import React from 'react'; import { DropdownMenuProps } from '@radix-ui/react-dropdown-menu'; import { ELEMENT_BLOCKQUOTE } from '@udecode/plate-block-quote'; import { focusEditor, insertEmptyElement, useEditorState, } from '@udecode/plate-common'; import { ELEMENT_H1, ELEMENT_H2, ELEMENT_H3 } from...
994
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/kbd-leaf.tsx
import React from 'react'; import { PlateLeaf, PlateLeafProps } from '@udecode/plate-common'; import { cn } from '@/lib/utils'; export function KbdLeaf({ className, children, ...props }: PlateLeafProps) { return ( <PlateLeaf asChild className={cn( 'rounded border border-border bg-muted px-1....
995
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/line-height-dropdown-menu.tsx
import React from 'react'; import { DropdownMenuProps } from '@radix-ui/react-dropdown-menu'; import { useLineHeightDropdownMenu, useLineHeightDropdownMenuState, } from '@udecode/plate-line-height'; import { Icons } from '@/components/icons'; import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGrou...
996
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/link-element.tsx
import React from 'react'; import { PlateElement, PlateElementProps, Value } from '@udecode/plate-common'; import { TLinkElement, useLink } from '@udecode/plate-link'; import { cn } from '@/lib/utils'; const LinkElement = React.forwardRef< React.ElementRef<typeof PlateElement>, PlateElementProps<Value, TLinkEleme...
997
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/link-floating-toolbar.tsx
'use client'; import React from 'react'; import { flip, offset, UseVirtualFloatingOptions, } from '@udecode/plate-floating'; import { FloatingLinkUrlInput, LinkFloatingToolbarState, LinkOpenButton, useFloatingLinkEdit, useFloatingLinkEditState, useFloatingLinkInsert, useFloatingLinkInsertState, } f...
998
0
petrpan-code/udecode/plate/templates/plate-playground-template/src/components
petrpan-code/udecode/plate/templates/plate-playground-template/src/components/plate-ui/link-toolbar-button.tsx
import React from 'react'; import { useLinkToolbarButton, useLinkToolbarButtonState, } from '@udecode/plate-link'; import { Icons } from '@/components/icons'; import { ToolbarButton } from './toolbar'; export function LinkToolbarButton() { const state = useLinkToolbarButtonState(); const { props } = useLinkT...
999