From e05a3584a30ce63f653de487dd7f5fdc871cf029 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Thu, 19 Dec 2024 08:53:27 -0800 Subject: [PATCH] Export some types --- src/extensions/LinkExtension.ts | 4 +++- src/extensions/NSecRejectExtension.ts | 4 ++-- src/extensions/NostrExtension.ts | 6 +++--- src/index.ts | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/extensions/LinkExtension.ts b/src/extensions/LinkExtension.ts index c432a51..6312fa7 100644 --- a/src/extensions/LinkExtension.ts +++ b/src/extensions/LinkExtension.ts @@ -1,8 +1,10 @@ import type { PasteRuleMatch } from '@tiptap/core' -import { Link } from '@tiptap/extension-link' +import { Link, type LinkOptions } from '@tiptap/extension-link' import * as linkifyjs from 'linkifyjs' import { getLinkKind } from '../helpers/utils' +export {LinkOptions} + export type LinkAttributes = { href: string } diff --git a/src/extensions/NSecRejectExtension.ts b/src/extensions/NSecRejectExtension.ts index 1d03089..987524e 100644 --- a/src/extensions/NSecRejectExtension.ts +++ b/src/extensions/NSecRejectExtension.ts @@ -2,11 +2,11 @@ import { Extension } from '@tiptap/core' const NSEC_REGEX = /(nsec1[0-9a-z]+)/g -export type NSecRejectionOptions = { +export type NSecRejectOptions = { onError?: (props: unknown) => void } -export const NSecRejectExtension = Extension.create({ +export const NSecRejectExtension = Extension.create({ name: 'nsecReject', addOptions() { diff --git a/src/extensions/NostrExtension.ts b/src/extensions/NostrExtension.ts index 8bdf1d9..cf41be5 100644 --- a/src/extensions/NostrExtension.ts +++ b/src/extensions/NostrExtension.ts @@ -17,7 +17,7 @@ import type { NEventAttributes } from './NEventExtension' import { NEventExtension } from './NEventExtension' import type { NProfileAttributes } from './NProfileExtension' import { NProfileExtension } from './NProfileExtension' -import { NSecRejectExtension, type NSecRejectionOptions } from './NSecRejectExtension' +import { NSecRejectExtension, type NSecRejectOptions } from './NSecRejectExtension' import type { TagAttributes } from './TagExtension' import { TagExtension } from './TagExtension' import { TweetExtension } from './TweetExtension' @@ -44,7 +44,7 @@ export interface NostrOptions { video?: Partial tag?: Partial bolt11?: Partial - nsecReject?: Partial + nsecReject?: Partial fileUpload?: Partial } nprofile?: boolean @@ -57,7 +57,7 @@ export interface NostrOptions { image?: Partial | false video?: Partial | false youtube?: Partial | false - nsecReject?: Partial | false + nsecReject?: Partial | false fileUpload?: Partial | false } diff --git a/src/index.ts b/src/index.ts index 349ff3f..7976a46 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,12 @@ export { Bolt11Extension, type Bolt11Attributes } from './extensions/Bolt11Extension' export { FileUploadExtension, type FileUploadOptions, type FileUploadStorage } from './extensions/FileUploadExtension' export { ImageExtension, type ImageOptions, type ImageAttributes } from './extensions/ImageExtension' -export { LinkExtension, type LinkAttributes } from './extensions/LinkExtension' +export { LinkExtension, type LinkOptions, type LinkAttributes } from './extensions/LinkExtension' export { NAddrExtension, type NAddrAttributes } from './extensions/NAddrExtension' export { NEventExtension, type NEventAttributes } from './extensions/NEventExtension' export { NostrExtension, type NostrOptions, type NostrStorage } from './extensions/NostrExtension' export { NProfileExtension, type NProfileAttributes } from './extensions/NProfileExtension' -export { NSecRejectExtension, type NSecRejectionOptions } from './extensions/NSecRejectExtension' +export { NSecRejectExtension, type NSecRejectOptions } from './extensions/NSecRejectExtension' export { TagExtension, type TagAttributes } from './extensions/TagExtension' export { TweetExtension, type TweetAttributes } from './extensions/TweetExtension' export { VideoExtension, type VideoAttributes } from './extensions/VideoExtension'