Skip to content

Commit

Permalink
Export some types
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Staab committed Dec 19, 2024
1 parent 9d8a0d1 commit e05a358
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/extensions/LinkExtension.ts
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/NSecRejectExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<NSecRejectionOptions>({
export const NSecRejectExtension = Extension.create<NSecRejectOptions>({
name: 'nsecReject',

addOptions() {
Expand Down
6 changes: 3 additions & 3 deletions src/extensions/NostrExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -44,7 +44,7 @@ export interface NostrOptions {
video?: Partial<NodeConfig>
tag?: Partial<MarkConfig>
bolt11?: Partial<NodeConfig>
nsecReject?: Partial<NSecRejectionOptions>
nsecReject?: Partial<NSecRejectOptions>
fileUpload?: Partial<FileUploadOptions>
}
nprofile?: boolean
Expand All @@ -57,7 +57,7 @@ export interface NostrOptions {
image?: Partial<ImageOptions> | false
video?: Partial<NodeConfig> | false
youtube?: Partial<YoutubeOptions> | false
nsecReject?: Partial<NSecRejectionOptions> | false
nsecReject?: Partial<NSecRejectOptions> | false
fileUpload?: Partial<FileUploadOptions> | false
}

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit e05a358

Please sign in to comment.