Skip to content

Commit 0e95df1

Browse files
authored
Merge pull request #3981 from udecode/registry
Update Registry
2 parents 95282c0 + 3c846c4 commit 0e95df1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/www/public/r/styles/default/emoji-input-element.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"files": [
2121
{
22-
"content": "'use client';\n\nimport React, { useMemo, useState } from 'react';\n\nimport { withRef } from '@udecode/cn';\nimport { useEditorPlugin } from '@udecode/plate-core/react';\nimport { EmojiInlineIndexSearch, insertEmoji } from '@udecode/plate-emoji';\nimport { EmojiPlugin } from '@udecode/plate-emoji/react';\n\nimport { useDebounce } from '@/hooks/use-debounce';\n\nimport {\n InlineCombobox,\n InlineComboboxContent,\n InlineComboboxEmpty,\n InlineComboboxGroup,\n InlineComboboxInput,\n InlineComboboxItem,\n} from './inline-combobox';\nimport { PlateElement } from './plate-element';\n\nexport const EmojiInputElement = withRef<typeof PlateElement>(\n ({ className, ...props }, ref) => {\n const { children, editor, element } = props;\n const { useOption } = useEditorPlugin(EmojiPlugin);\n const data = useOption('data')!;\n const [value, setValue] = useState('');\n const debouncedValue = useDebounce(value, 100);\n const isPending = value !== debouncedValue;\n\n const filteredEmojis = useMemo(() => {\n if (debouncedValue.trim().length === 0) return [];\n\n return EmojiInlineIndexSearch.getInstance(data)\n .search(debouncedValue.replace(/:$/, ''))\n .get();\n }, [data, debouncedValue]);\n\n return (\n <PlateElement\n ref={ref}\n as=\"span\"\n className={className}\n data-slate-value={element.value}\n {...props}\n >\n <InlineCombobox\n value={value}\n element={element}\n filter={false}\n setValue={setValue}\n trigger=\":\"\n hideWhenNoValue\n >\n <InlineComboboxInput />\n\n <InlineComboboxContent>\n {!isPending && (\n <InlineComboboxEmpty>No results</InlineComboboxEmpty>\n )}\n\n <InlineComboboxGroup>\n {filteredEmojis.map((emoji) => (\n <InlineComboboxItem\n key={emoji.id}\n value={emoji.name}\n onClick={() => insertEmoji(editor, emoji)}\n >\n {emoji.skins[0].native} {emoji.name}\n </InlineComboboxItem>\n ))}\n </InlineComboboxGroup>\n </InlineComboboxContent>\n </InlineCombobox>\n\n {children}\n </PlateElement>\n );\n }\n);\n",
22+
"content": "'use client';\n\nimport React, { useMemo, useState } from 'react';\n\nimport { withRef } from '@udecode/cn';\nimport { useEditorPlugin } from '@udecode/plate/react';\nimport { EmojiInlineIndexSearch, insertEmoji } from '@udecode/plate-emoji';\nimport { EmojiPlugin } from '@udecode/plate-emoji/react';\n\nimport { useDebounce } from '@/hooks/use-debounce';\n\nimport {\n InlineCombobox,\n InlineComboboxContent,\n InlineComboboxEmpty,\n InlineComboboxGroup,\n InlineComboboxInput,\n InlineComboboxItem,\n} from './inline-combobox';\nimport { PlateElement } from './plate-element';\n\nexport const EmojiInputElement = withRef<typeof PlateElement>(\n ({ className, ...props }, ref) => {\n const { children, editor, element } = props;\n const { useOption } = useEditorPlugin(EmojiPlugin);\n const data = useOption('data')!;\n const [value, setValue] = useState('');\n const debouncedValue = useDebounce(value, 100);\n const isPending = value !== debouncedValue;\n\n const filteredEmojis = useMemo(() => {\n if (debouncedValue.trim().length === 0) return [];\n\n return EmojiInlineIndexSearch.getInstance(data)\n .search(debouncedValue.replace(/:$/, ''))\n .get();\n }, [data, debouncedValue]);\n\n return (\n <PlateElement\n ref={ref}\n as=\"span\"\n className={className}\n data-slate-value={element.value}\n {...props}\n >\n <InlineCombobox\n value={value}\n element={element}\n filter={false}\n setValue={setValue}\n trigger=\":\"\n hideWhenNoValue\n >\n <InlineComboboxInput />\n\n <InlineComboboxContent>\n {!isPending && (\n <InlineComboboxEmpty>No results</InlineComboboxEmpty>\n )}\n\n <InlineComboboxGroup>\n {filteredEmojis.map((emoji) => (\n <InlineComboboxItem\n key={emoji.id}\n value={emoji.name}\n onClick={() => insertEmoji(editor, emoji)}\n >\n {emoji.skins[0].native} {emoji.name}\n </InlineComboboxItem>\n ))}\n </InlineComboboxGroup>\n </InlineComboboxContent>\n </InlineCombobox>\n\n {children}\n </PlateElement>\n );\n }\n);\n",
2323
"path": "plate-ui/emoji-input-element.tsx",
2424
"target": "components/plate-ui/emoji-input-element.tsx",
2525
"type": "registry:ui"

apps/www/public/tailwind.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)