mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 15:14:20 +01:00
refactor: use main package exports instead of subpath imports
- Import Helpers from 'applesauce-core' instead of 'applesauce-core/helpers' - Import Blueprints from 'applesauce-factory' instead of 'applesauce-factory/blueprints' - Use namespace exports as documented in applesauce tutorial - Fixes Vercel build issue with internal module resolution - Follows recommended import patterns from applesauce docs
This commit is contained in:
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Boris - Nostr Bookmarks</title>
|
||||
<script type="module" crossorigin src="/assets/index-BkANXbk6.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CxLyugnJ.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Bqz-n1DY.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from 'react'
|
||||
import { useEventModel } from 'applesauce-react/hooks'
|
||||
import { Models } from 'applesauce-core'
|
||||
import { Models, Helpers } from 'applesauce-core'
|
||||
import { decode } from 'nostr-tools/nip19'
|
||||
import { getPubkeyFromDecodeResult } from 'applesauce-core/helpers'
|
||||
import { extractNprofilePubkeys } from '../utils/helpers'
|
||||
|
||||
const { getPubkeyFromDecodeResult } = Helpers
|
||||
|
||||
interface Props { content: string }
|
||||
|
||||
const ContentWithResolvedProfiles: React.FC<Props> = ({ content }) => {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React from 'react'
|
||||
import { useEventModel } from 'applesauce-react/hooks'
|
||||
import { Models } from 'applesauce-core'
|
||||
import { Models, Helpers } from 'applesauce-core'
|
||||
import { decode, npubEncode } from 'nostr-tools/nip19'
|
||||
import { getPubkeyFromDecodeResult } from 'applesauce-core/helpers'
|
||||
|
||||
const { getPubkeyFromDecodeResult } = Helpers
|
||||
|
||||
interface ResolvedMentionProps {
|
||||
encoded?: string
|
||||
|
||||
@@ -3,14 +3,11 @@ import { lastValueFrom, takeUntil, timer, toArray } from 'rxjs'
|
||||
import { nip19 } from 'nostr-tools'
|
||||
import { AddressPointer } from 'nostr-tools/nip19'
|
||||
import { NostrEvent } from 'nostr-tools'
|
||||
import {
|
||||
getArticleTitle,
|
||||
getArticleImage,
|
||||
getArticlePublished,
|
||||
getArticleSummary
|
||||
} from 'applesauce-core/helpers'
|
||||
import { Helpers } from 'applesauce-core'
|
||||
import { RELAYS } from '../config/relays'
|
||||
|
||||
const { getArticleTitle, getArticleImage, getArticlePublished, getArticleSummary } = Helpers
|
||||
|
||||
export interface ArticleContent {
|
||||
title: string
|
||||
markdown: string
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { getParsedContent } from 'applesauce-content/text'
|
||||
import { getArticleTitle } from 'applesauce-core/helpers'
|
||||
import { Helpers } from 'applesauce-core'
|
||||
import { ActiveAccount, IndividualBookmark, ParsedContent } from '../types/bookmarks'
|
||||
import type { NostrEvent } from './bookmarkEvents'
|
||||
|
||||
const { getArticleTitle } = Helpers
|
||||
|
||||
// Global symbol for caching hidden bookmark content on events
|
||||
export const BookmarkHiddenSymbol = Symbol.for('bookmark-hidden')
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { EventFactory } from 'applesauce-factory'
|
||||
import { HighlightBlueprint } from 'applesauce-factory/blueprints'
|
||||
import { EventFactory, Blueprints } from 'applesauce-factory'
|
||||
import { RelayPool } from 'applesauce-relay'
|
||||
import { IAccount } from 'applesauce-accounts'
|
||||
import { AddressPointer } from 'nostr-tools/nip19'
|
||||
import { NostrEvent } from 'nostr-tools'
|
||||
import { Helpers } from 'applesauce-core'
|
||||
import { RELAYS } from '../config/relays'
|
||||
import { Highlight } from '../types/highlights'
|
||||
import {
|
||||
|
||||
const {
|
||||
getHighlightText,
|
||||
getHighlightContext,
|
||||
getHighlightComment,
|
||||
@@ -14,7 +15,9 @@ import {
|
||||
getHighlightSourceAddressPointer,
|
||||
getHighlightSourceUrl,
|
||||
getHighlightAttributions
|
||||
} from 'applesauce-core/helpers'
|
||||
} = Helpers
|
||||
|
||||
const { HighlightBlueprint } = Blueprints
|
||||
|
||||
/**
|
||||
* Creates and publishes a highlight event (NIP-84)
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import { RelayPool, completeOnEose, onlyEvents } from 'applesauce-relay'
|
||||
import { lastValueFrom, takeUntil, timer, tap, toArray } from 'rxjs'
|
||||
import { NostrEvent } from 'nostr-tools'
|
||||
import {
|
||||
import { Helpers } from 'applesauce-core'
|
||||
import { Highlight } from '../types/highlights'
|
||||
import { RELAYS } from '../config/relays'
|
||||
|
||||
const {
|
||||
getHighlightText,
|
||||
getHighlightContext,
|
||||
getHighlightComment,
|
||||
@@ -9,9 +13,7 @@ import {
|
||||
getHighlightSourceAddressPointer,
|
||||
getHighlightSourceUrl,
|
||||
getHighlightAttributions
|
||||
} from 'applesauce-core/helpers'
|
||||
import { Highlight } from '../types/highlights'
|
||||
import { RELAYS } from '../config/relays'
|
||||
} = Helpers
|
||||
|
||||
/**
|
||||
* Deduplicate highlight events by ID
|
||||
|
||||
Reference in New Issue
Block a user