Skip to content

Commit cacba45

Browse files
chore: sync templates after release [skip release]
1 parent 92381c6 commit cacba45

File tree

14 files changed

+139
-154
lines changed

14 files changed

+139
-154
lines changed

templates/plate-playground-template/bun.lock

Lines changed: 40 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/plate-playground-template/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@platejs/layout": "^52.0.11",
4242
"@platejs/link": "^52.0.11",
4343
"@platejs/list": "^52.0.11",
44-
"@platejs/markdown": "^52.3.1",
44+
"@platejs/markdown": "^52.3.5",
4545
"@platejs/math": "^52.0.11",
4646
"@platejs/media": "^52.0.11",
4747
"@platejs/mention": "^52.0.15",
@@ -75,7 +75,7 @@
7575
"lodash": "^4.17.23",
7676
"lowlight": "^3.3.0",
7777
"lucide-react": "^0.577.0",
78-
"next": "16.1.6",
78+
"next": "16.1.7",
7979
"pdf-lib": "^1.17.1",
8080
"platejs": "^52.3.4",
8181
"radix-ui": "^1.4.3",
@@ -99,20 +99,20 @@
9999
"zod": "^4.3.6"
100100
},
101101
"devDependencies": {
102-
"@biomejs/biome": "2.4.6",
102+
"@biomejs/biome": "2.4.7",
103103
"@tailwindcss/postcss": "4.2.1",
104104
"@types/node": "^25.5.0",
105105
"@types/react": "19.2.14",
106106
"@types/react-dom": "19.2.3",
107-
"@typescript-eslint/parser": "^8.57.0",
107+
"@typescript-eslint/parser": "^8.57.1",
108108
"babel-plugin-react-compiler": "^1.0.0",
109109
"eslint": "^10.0.3",
110110
"eslint-plugin-react-hooks": "7.0.1",
111111
"lefthook": "^2.1.4",
112112
"postcss": "^8.5.8",
113113
"tailwindcss": "4.2.1",
114114
"typescript": "5.9.3",
115-
"ultracite": "7.3.0"
115+
"ultracite": "7.3.1"
116116
},
117117
"packageManager": "bun@1.3.3"
118118
}

templates/plate-playground-template/src/components/ui/avatar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ function AvatarGroupCount({
101101

102102
export {
103103
Avatar,
104-
AvatarImage,
105-
AvatarFallback,
106104
AvatarBadge,
105+
AvatarFallback,
107106
AvatarGroup,
108107
AvatarGroupCount,
108+
AvatarImage,
109109
};

templates/plate-playground-template/src/components/ui/command.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ function CommandShortcut({
173173
export {
174174
Command,
175175
CommandDialog,
176-
CommandInput,
177-
CommandList,
178176
CommandEmpty,
179177
CommandGroup,
178+
CommandInput,
180179
CommandItem,
181-
CommandShortcut,
180+
CommandList,
182181
CommandSeparator,
182+
CommandShortcut,
183183
};

templates/plate-playground-template/src/components/ui/context-menu.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,18 +235,18 @@ function ContextMenuShortcut({
235235

236236
export {
237237
ContextMenu,
238-
ContextMenuTrigger,
238+
ContextMenuCheckboxItem,
239239
ContextMenuContent,
240+
ContextMenuGroup,
240241
ContextMenuItem,
241-
ContextMenuCheckboxItem,
242-
ContextMenuRadioItem,
243242
ContextMenuLabel,
243+
ContextMenuPortal,
244+
ContextMenuRadioGroup,
245+
ContextMenuRadioItem,
244246
ContextMenuSeparator,
245247
ContextMenuShortcut,
246-
ContextMenuGroup,
247-
ContextMenuPortal,
248248
ContextMenuSub,
249249
ContextMenuSubContent,
250250
ContextMenuSubTrigger,
251-
ContextMenuRadioGroup,
251+
ContextMenuTrigger,
252252
};

templates/plate-playground-template/src/components/ui/dropdown-menu.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,18 +240,18 @@ function DropdownMenuSubContent({
240240

241241
export {
242242
DropdownMenu,
243-
DropdownMenuPortal,
244-
DropdownMenuTrigger,
243+
DropdownMenuCheckboxItem,
245244
DropdownMenuContent,
246245
DropdownMenuGroup,
247-
DropdownMenuLabel,
248246
DropdownMenuItem,
249-
DropdownMenuCheckboxItem,
247+
DropdownMenuLabel,
248+
DropdownMenuPortal,
250249
DropdownMenuRadioGroup,
251250
DropdownMenuRadioItem,
252251
DropdownMenuSeparator,
253252
DropdownMenuShortcut,
254253
DropdownMenuSub,
255-
DropdownMenuSubTrigger,
256254
DropdownMenuSubContent,
255+
DropdownMenuSubTrigger,
256+
DropdownMenuTrigger,
257257
};

templates/plate-playground-template/src/components/ui/font-color-toolbar-button.tsx

Lines changed: 30 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import type {
99
import { useComposedRef } from '@udecode/cn';
1010
import debounce from 'lodash/debounce.js';
1111
import { CheckIcon, EraserIcon, PlusIcon } from 'lucide-react';
12-
import { type PlateEditor, useEditorRef, useEditorSelector } from 'platejs/react';
12+
import {
13+
type PlateEditor,
14+
useEditorRef,
15+
useEditorSelector,
16+
} from 'platejs/react';
1317
import React from 'react';
1418

1519
import { buttonVariants } from '@/components/ui/button';
@@ -50,10 +54,7 @@ function computeIsBrightColor(hex: string): boolean {
5054
return (r * 299 + g * 587 + b * 114) / 1000 > 130;
5155
}
5256

53-
function getEditorColorMarks(
54-
editor: PlateEditor,
55-
nodeType: string
56-
): string[] {
57+
function getEditorColorMarks(editor: PlateEditor, nodeType: string): string[] {
5758
const usedColors = new Set<string>();
5859

5960
for (const [node] of editor.api.nodes({
@@ -95,41 +96,30 @@ export function FontColorToolbarButton({
9596
const [open, setOpen] = React.useState(false);
9697
const [colorsQueue, setColorsQueue] = React.useState<string[]>([]);
9798

98-
const recordColorUsage = React.useCallback(
99-
(color: string) => {
100-
const normalized = normalizeColor(color);
99+
const recordColorUsage = React.useCallback((color: string) => {
100+
const normalized = normalizeColor(color);
101101

102-
if (!isValidHexColor(normalized)) return;
102+
if (!isValidHexColor(normalized)) return;
103103

104-
setColorsQueue((prev) => {
105-
const filtered = prev
106-
.filter((c) => c !== normalized)
107-
.filter(
108-
(c) =>
109-
!DEFAULT_COLORS.some(
110-
(dc) => normalizeColor(dc.value) === c
111-
)
112-
);
104+
setColorsQueue((prev) => {
105+
const filtered = prev
106+
.filter((c) => c !== normalized)
107+
.filter(
108+
(c) => !DEFAULT_COLORS.some((dc) => normalizeColor(dc.value) === c)
109+
);
113110

114-
return [normalized, ...filtered].slice(0, 30);
115-
});
116-
},
117-
[]
118-
);
111+
return [normalized, ...filtered].slice(0, 30);
112+
});
113+
}, []);
119114

120115
const appendColors = React.useCallback((colors: string[]) => {
121116
setColorsQueue((prev) => {
122-
const normalized = colors
123-
.map(normalizeColor)
124-
.filter(isValidHexColor);
117+
const normalized = colors.map(normalizeColor).filter(isValidHexColor);
125118
const existingSet = new Set(prev);
126119
const newColors = normalized
127120
.filter((c) => !existingSet.has(c))
128121
.filter(
129-
(c) =>
130-
!DEFAULT_COLORS.some(
131-
(dc) => normalizeColor(dc.value) === c
132-
)
122+
(c) => !DEFAULT_COLORS.some((dc) => normalizeColor(dc.value) === c)
133123
);
134124

135125
return [...newColors, ...prev].slice(0, 30);
@@ -197,11 +187,7 @@ export function FontColorToolbarButton({
197187
}, [color, selectionDefined]);
198188

199189
return (
200-
<DropdownMenu
201-
modal
202-
onOpenChange={onToggle}
203-
open={open}
204-
>
190+
<DropdownMenu modal onOpenChange={onToggle} open={open}>
205191
<DropdownMenuTrigger asChild>
206192
<ToolbarButton pressed={open} tooltip={tooltip}>
207193
{children}
@@ -319,9 +305,7 @@ function ColorCustom({
319305
const fullCustomColors = React.useMemo(
320306
() =>
321307
colorsQueue
322-
.filter(
323-
(c) => normalizeColor(c) !== normalizeColor(updatedColor || '')
324-
)
308+
.filter((c) => normalizeColor(c) !== normalizeColor(updatedColor || ''))
325309
.filter(
326310
(c) =>
327311
!DEFAULT_COLORS.some(
@@ -341,33 +325,26 @@ function ColorCustom({
341325
}))
342326
.slice(
343327
0,
344-
MAX_CUSTOM_COLORS -
345-
customColors.length -
346-
(updatedColor ? 1 : 0)
328+
MAX_CUSTOM_COLORS - customColors.length - (updatedColor ? 1 : 0)
347329
),
348330
[colorsQueue, customColors, updatedColor]
349331
);
350332

351333
const isColorInCollections = React.useCallback(
352334
(targetColor: string) =>
353335
colors.some(
354-
(c) =>
355-
normalizeColor(c.value) === normalizeColor(targetColor)
336+
(c) => normalizeColor(c.value) === normalizeColor(targetColor)
356337
) ||
357338
customColors.some(
358-
(c) =>
359-
normalizeColor(c.value) === normalizeColor(targetColor)
339+
(c) => normalizeColor(c.value) === normalizeColor(targetColor)
360340
) ||
361341
fullCustomColors.some(
362-
(c) =>
363-
normalizeColor(c.value) === normalizeColor(targetColor)
342+
(c) => normalizeColor(c.value) === normalizeColor(targetColor)
364343
),
365344
[colors, customColors, fullCustomColors]
366345
);
367346

368-
const [customColor, setCustomColor] = React.useState<string | null>(
369-
null
370-
);
347+
const [customColor, setCustomColor] = React.useState<string | null>(null);
371348

372349
React.useEffect(() => {
373350
if (!updatedColor || isColorInCollections(updatedColor)) {
@@ -549,7 +526,9 @@ export function ColorDropdownMenuItems({
549526
{colors.map(({ isBrightColor, name, value }) => (
550527
<ColorDropdownMenuItem
551528
isBrightColor={isBrightColor}
552-
isSelected={!!color && normalizeColor(color) === normalizeColor(value)}
529+
isSelected={
530+
!!color && normalizeColor(color) === normalizeColor(value)
531+
}
553532
key={name ?? value}
554533
name={name}
555534
updateColor={updateColor}

templates/plate-playground-template/src/components/ui/popover.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ function PopoverDescription({
8080

8181
export {
8282
Popover,
83-
PopoverTrigger,
84-
PopoverContent,
8583
PopoverAnchor,
84+
PopoverContent,
85+
PopoverDescription,
8686
PopoverHeader,
8787
PopoverTitle,
88-
PopoverDescription,
88+
PopoverTrigger,
8989
};

templates/plate-playground-template/src/components/ui/sheet.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ function SheetDescription({
133133

134134
export {
135135
Sheet,
136-
SheetTrigger,
137136
SheetClose,
138137
SheetContent,
139-
SheetHeader,
138+
SheetDescription,
140139
SheetFooter,
140+
SheetHeader,
141141
SheetTitle,
142-
SheetDescription,
142+
SheetTrigger,
143143
};

templates/plate-playground-template/src/components/ui/tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ function TooltipContent({
5454
);
5555
}
5656

57-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
57+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };

0 commit comments

Comments
 (0)