diff --git a/demo/app/Sharp/Posts/PostForm.php b/demo/app/Sharp/Posts/PostForm.php index 98491435a..a543ff5a4 100644 --- a/demo/app/Sharp/Posts/PostForm.php +++ b/demo/app/Sharp/Posts/PostForm.php @@ -59,6 +59,7 @@ public function buildFormFields(FieldsContainer $formFields): void SharpFormEditorField::IFRAME, SharpFormEditorField::UPLOAD, SharpFormEditorField::CODE_BLOCK, + SharpFormEditorField::FOOTNOTE, AuthorEmbed::class, ]) ->allowEmbeds([ @@ -79,7 +80,7 @@ public function buildFormFields(FieldsContainer $formFields): void ]) ->allowFullscreen() ->setMaxLength(2000) - ->setHeight(300, 0) + ->setHeight(400) ) ->addField( SharpFormTagsField::make('categories', Category::pluck('name', 'id')->toArray()) diff --git a/package-lock.json b/package-lock.json index 5fd8c5597..5ac878ab5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,12 +50,13 @@ "flexsearch": "^0.8.205", "leaflet": "^1.9.4", "lodash": "^4.17.21", - "lucide-vue-next": "^0.542.0", + "lucide-vue-next": "^1.0.0", "qs": "^6.6.0", "reka-ui": "^2.6.1", "sortablejs": "^1.15.2", "tailwind-merge": "^3.3.0", "text-clipper": "^1.3.0", + "tiptap-footnotes": "^3.0.1", "tiptap-markdown": "^0.9.0", "vue": "^3.5.12", "vue-sonner": "^1.1.2", @@ -11450,9 +11451,10 @@ } }, "node_modules/lucide-vue-next": { - "version": "0.542.0", - "resolved": "https://registry.npmjs.org/lucide-vue-next/-/lucide-vue-next-0.542.0.tgz", - "integrity": "sha512-cJfyhFoneDgYTouHwUJEutXaCW5EQuRrBsvfELudWnMiwfqvcEtpZTFZLdZ5Nrqow+znzn+Iyhu3KeYIfa3mEg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lucide-vue-next/-/lucide-vue-next-1.0.0.tgz", + "integrity": "sha512-V6SPvx1IHTj/UY+FrIYWV5faISsPSb8BnWSFDxAtezWKvWc9ZZ40PDrdu1/Qb5vg4lHWr1hs1BAMGVGm6V1Xdg==", + "deprecated": "Package deprecated. Please use @lucide/vue instead.", "license": "ISC", "peerDependencies": { "vue": ">=3.0.1" @@ -15294,6 +15296,18 @@ "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==", "license": "ISC" }, + "node_modules/tiptap-footnotes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tiptap-footnotes/-/tiptap-footnotes-3.0.1.tgz", + "integrity": "sha512-JeQav5spy5/gEDHnwbkJrzPB46Lvn9SxefhKCcQKsUopzzqYtjaA2oTO+QxVixRJ88wLAa5KexaCIzvY6hMiSQ==", + "license": "MIT", + "peerDependencies": { + "@tiptap/core": "^3.0.0", + "@tiptap/extension-list-item": "^3.0.0", + "@tiptap/extension-ordered-list": "^3.0.0", + "@tiptap/pm": "^3.0.0" + } + }, "node_modules/tiptap-markdown": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/tiptap-markdown/-/tiptap-markdown-0.9.0.tgz", @@ -29031,9 +29045,9 @@ } }, "lucide-vue-next": { - "version": "0.542.0", - "resolved": "https://registry.npmjs.org/lucide-vue-next/-/lucide-vue-next-0.542.0.tgz", - "integrity": "sha512-cJfyhFoneDgYTouHwUJEutXaCW5EQuRrBsvfELudWnMiwfqvcEtpZTFZLdZ5Nrqow+znzn+Iyhu3KeYIfa3mEg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lucide-vue-next/-/lucide-vue-next-1.0.0.tgz", + "integrity": "sha512-V6SPvx1IHTj/UY+FrIYWV5faISsPSb8BnWSFDxAtezWKvWc9ZZ40PDrdu1/Qb5vg4lHWr1hs1BAMGVGm6V1Xdg==", "requires": {} }, "magic-string": { @@ -34828,6 +34842,12 @@ "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==" }, + "tiptap-footnotes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tiptap-footnotes/-/tiptap-footnotes-3.0.1.tgz", + "integrity": "sha512-JeQav5spy5/gEDHnwbkJrzPB46Lvn9SxefhKCcQKsUopzzqYtjaA2oTO+QxVixRJ88wLAa5KexaCIzvY6hMiSQ==", + "requires": {} + }, "tiptap-markdown": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/tiptap-markdown/-/tiptap-markdown-0.9.0.tgz", diff --git a/package.json b/package.json index d096c1ba4..bea7f129b 100644 --- a/package.json +++ b/package.json @@ -78,12 +78,13 @@ "flexsearch": "^0.8.205", "leaflet": "^1.9.4", "lodash": "^4.17.21", - "lucide-vue-next": "^0.542.0", + "lucide-vue-next": "^1.0.0", "qs": "^6.6.0", "reka-ui": "^2.6.1", "sortablejs": "^1.15.2", "tailwind-merge": "^3.3.0", "text-clipper": "^1.3.0", + "tiptap-footnotes": "^3.0.1", "tiptap-markdown": "^0.9.0", "vue": "^3.5.12", "vue-sonner": "^1.1.2", diff --git a/resources/css/app.css b/resources/css/app.css index ea810987f..b60d32b97 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -9,6 +9,7 @@ @source '../views/**/*.blade.php'; @source '../js/**/*.vue'; @source '../js/components/ui/**/*.ts'; +@source '../js/form/components/fields/editor/extensions/Footnotes.ts'; @custom-variant dark (&:is(.dark *)); diff --git a/resources/js/form/components/fields/editor/Editor.vue b/resources/js/form/components/fields/editor/Editor.vue index 8598db340..c7565b4c1 100644 --- a/resources/js/form/components/fields/editor/Editor.vue +++ b/resources/js/form/components/fields/editor/Editor.vue @@ -62,6 +62,7 @@ getTextInputReplacementsExtension } from "@/form/components/fields/editor/extensions/TextInputReplacements"; import CodeBlockDropdown from "@/form/components/fields/editor/toolbar/CodeBlockDropdown.vue"; + import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; const emit = defineEmits>(); const props = defineProps>(); @@ -189,11 +190,6 @@ } ); - declare module '@tiptap/core' { - interface Storage { - scrollYPercentage: number; - } - } const isFullscreen = ref(false); const fullscreenPlaceholderHeight = ref(0); @@ -303,17 +299,29 @@
diff --git a/resources/js/form/components/fields/editor/EditorAttributes.vue b/resources/js/form/components/fields/editor/EditorAttributes.vue index 677acfe60..979f9001b 100644 --- a/resources/js/form/components/fields/editor/EditorAttributes.vue +++ b/resources/js/form/components/fields/editor/EditorAttributes.vue @@ -1,7 +1,7 @@