initial commit. gotta go

This commit is contained in:
2025-09-26 14:30:57 -05:00
parent b342335502
commit eb0b35bb7f
299 changed files with 6902 additions and 6741 deletions

View File

@@ -1,11 +1,11 @@
import { mergeAttributes, Node } from "@tiptap/core";
import { ReactNodeViewRenderer } from "@tiptap/react";
import { AllowedAlignments } from "../types";
import { mergeAttributes, Node } from '@tiptap/core';
import { ReactNodeViewRenderer } from '@tiptap/react';
import { AllowedAlignments } from '../types';
import { ButtonComponent } from "../nodes/button";
import { ButtonComponent } from '../nodes/button';
// import { AllowedLogoAlignment } from '../nodes/logo';
declare module "@tiptap/core" {
declare module '@tiptap/core' {
interface Commands<ReturnType> {
button: {
setButton: () => ReturnType;
@@ -14,39 +14,39 @@ declare module "@tiptap/core" {
}
export const ButtonExtension = Node.create({
name: "button",
group: "block",
name: 'button',
group: 'block',
atom: true,
draggable: true,
addAttributes() {
return {
component: {
default: "button",
default: 'button',
},
text: {
default: "Button",
default: 'Button',
},
url: {
default: "",
default: '',
},
alignment: {
default: "left",
default: 'left',
},
borderRadius: {
default: "4",
default: '4',
},
borderWidth: {
default: "1",
default: '1',
},
buttonColor: {
default: "rgb(0, 0, 0)",
default: 'rgb(0, 0, 0)',
},
borderColor: {
default: "rgb(0, 0, 0)",
default: 'rgb(0, 0, 0)',
},
textColor: {
default: "rgb(255, 255, 255)",
default: 'rgb(255, 255, 255)',
},
};
},
@@ -61,12 +61,12 @@ export const ButtonExtension = Node.create({
renderHTML({ HTMLAttributes }) {
return [
"a",
'a',
mergeAttributes(
{
"data-unsend-component": this.name,
'data-unsend-component': this.name,
},
HTMLAttributes
HTMLAttributes,
),
];
},