feat: add notebook widget (#294)

* feat: add nestjs replacement, remove nestjs

* feat: add notebook widget

* fix: format issue

* fix: add missing tiptap packages

* refactor: improve structure of table options

* fix: downgrade to tiptap 2.2.5 as not yet supported by mantine/tiptap

* fix: format issue

* fix: deepsource issues

* fix: typecheck issues

* refactor: move default notebook content to seperate file

* fix: format issue
This commit is contained in:
Meier Lukas
2024-04-13 12:32:55 +02:00
committed by GitHub
parent 8f4897186c
commit 6b1879cbb1
15 changed files with 1587 additions and 148 deletions

View File

@@ -0,0 +1,30 @@
import { IconNotes } from "@homarr/ui";
import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";
import { defaultContent } from "./default-content";
export const { definition, componentLoader } = createWidgetDefinition(
"notebook",
{
icon: IconNotes,
options: optionsBuilder.from(
(factory) => ({
showToolbar: factory.switch({
defaultValue: true,
}),
allowReadOnlyCheck: factory.switch({
defaultValue: true,
}),
content: factory.text({
defaultValue: defaultContent,
}),
}),
{
content: {
shouldHide: () => true, // Hide the content option as it can be modified in the editor
},
},
),
},
).withDynamicImport(() => import("./component"));