Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Oct 15, 2024
1 parent 0571f2e commit dc5e6c6
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 0 deletions.
32 changes: 32 additions & 0 deletions apps/www/public/r/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,38 @@
],
"type": "registry:ui"
},
{
"dependencies": [
"@udecode/plate-indent-list"
],
"files": [
{
"path": "plate-ui/indent-todo-toolbar-button.tsx",
"type": "registry:ui"
}
],
"name": "indent-todo-toolbar-button",
"registryDependencies": [
"toolbar"
],
"type": "registry:ui"
},
{
"dependencies": [
"@udecode/plate-indent-list"
],
"files": [
{
"path": "plate-ui/indent-todo-marker-component.tsx",
"type": "registry:ui"
}
],
"name": "indent-todo-marker-component",
"registryDependencies": [
"checkbox"
],
"type": "registry:ui"
},
{
"dependencies": [
"@ariakit/react",
Expand Down
18 changes: 18 additions & 0 deletions apps/www/public/r/styles/default/indent-todo-marker-component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"dependencies": [
"@udecode/plate-indent-list"
],
"files": [
{
"content": "import type { PlateRenderElementProps } from '@udecode/plate-common/react';\n\nimport { cn } from '@udecode/cn';\nimport {\n useIndentTodoListElement,\n useIndentTodoListElementState,\n} from '@udecode/plate-indent-list/react';\n\nimport { Checkbox } from './checkbox';\n\nexport const TodoMarker = ({\n element,\n}: Omit<PlateRenderElementProps, 'children'>) => {\n const state = useIndentTodoListElementState({ element });\n const { checkboxProps } = useIndentTodoListElement(state);\n\n return (\n <div contentEditable={false}>\n <Checkbox\n style={{ left: -24, position: 'absolute', top: 4 }}\n {...checkboxProps}\n />\n </div>\n );\n};\n\nexport const TodoLi = (props: PlateRenderElementProps) => {\n const { children, element } = props;\n\n return (\n <span\n className={cn(\n (element.checked as boolean) && 'text-muted-foreground line-through'\n )}\n >\n {children}\n </span>\n );\n};\n",
"path": "plate-ui/indent-todo-marker-component.tsx",
"target": "",
"type": "registry:ui"
}
],
"name": "indent-todo-marker-component",
"registryDependencies": [
"checkbox"
],
"type": "registry:ui"
}
18 changes: 18 additions & 0 deletions apps/www/public/r/styles/default/indent-todo-toolbar-button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"dependencies": [
"@udecode/plate-indent-list"
],
"files": [
{
"content": "import { withRef } from '@udecode/cn';\nimport {\n useIndentTodoToolBarButton,\n useIndentTodoToolBarButtonState,\n} from '@udecode/plate-indent-list/react';\n\nimport { Icons } from '@/components/icons';\n\nimport { ToolbarButton } from './toolbar';\n\nexport const IndentTodoToolbarButton = withRef<typeof ToolbarButton>(\n (rest, ref) => {\n const state = useIndentTodoToolBarButtonState({ nodeType: 'todo' });\n const { props } = useIndentTodoToolBarButton(state);\n\n return (\n <ToolbarButton ref={ref} tooltip=\"Todo\" {...props} {...rest}>\n <Icons.todo />\n </ToolbarButton>\n );\n }\n);\n",
"path": "plate-ui/indent-todo-toolbar-button.tsx",
"target": "",
"type": "registry:ui"
}
],
"name": "indent-todo-toolbar-button",
"registryDependencies": [
"toolbar"
],
"type": "registry:ui"
}
22 changes: 22 additions & 0 deletions apps/www/src/__registry__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,28 @@ export const Index: Record<string, any> = {
subcategory: "undefined",
chunks: []
},
"indent-todo-toolbar-button": {
name: "indent-todo-toolbar-button",
type: "registry:ui",
registryDependencies: ["toolbar"],
files: ["registry/default/plate-ui/indent-todo-toolbar-button.tsx"],
component: React.lazy(() => import("@/registry/default/plate-ui/indent-todo-toolbar-button.tsx")),
source: "",
category: "undefined",
subcategory: "undefined",
chunks: []
},
"indent-todo-marker-component": {
name: "indent-todo-marker-component",
type: "registry:ui",
registryDependencies: ["checkbox"],
files: ["registry/default/plate-ui/indent-todo-marker-component.tsx"],
component: React.lazy(() => import("@/registry/default/plate-ui/indent-todo-marker-component.tsx")),
source: "",
category: "undefined",
subcategory: "undefined",
chunks: []
},
"inline-combobox": {
name: "inline-combobox",
type: "registry:ui",
Expand Down
14 changes: 14 additions & 0 deletions apps/www/src/registry/registry-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,20 @@ export const ui: Registry = [
registryDependencies: ['toolbar'],
type: 'registry:ui',
},
{
dependencies: ['@udecode/plate-indent-list'],
files: ['plate-ui/indent-todo-toolbar-button.tsx'],
name: 'indent-todo-toolbar-button',
registryDependencies: ['toolbar'],
type: 'registry:ui',
},
{
dependencies: ['@udecode/plate-indent-list'],
files: ['plate-ui/indent-todo-marker-component.tsx'],
name: 'indent-todo-marker-component',
registryDependencies: ['checkbox'],
type: 'registry:ui',
},
{
dependencies: ['@ariakit/react', '@udecode/plate-combobox'],
files: ['plate-ui/inline-combobox.tsx'],
Expand Down

0 comments on commit dc5e6c6

Please sign in to comment.