fix: restore inspector build types
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
InstancesPanel,
|
||||
NoteInfoPanel,
|
||||
} from './InspectorPanels'
|
||||
import type { ReferencedByItem } from './InspectorPanels'
|
||||
import { EmptyInspector, InitializePropertiesPrompt, InspectorHeader, InvalidFrontmatterNotice } from './inspector/InspectorChrome'
|
||||
import { useBacklinks, useReferencedBy } from './inspector/useInspectorData'
|
||||
import { useInspectorPropertyActions } from './inspector/useInspectorPropertyActions'
|
||||
@@ -64,7 +65,7 @@ function ValidFrontmatterPanels({
|
||||
frontmatter: ReturnType<typeof parseFrontmatter>
|
||||
typeEntryMap: Record<string, VaultEntry>
|
||||
vaultPath?: string
|
||||
referencedBy: VaultEntry[]
|
||||
referencedBy: ReferencedByItem[]
|
||||
onNavigate: (target: string) => void
|
||||
onCreateAndOpenNote?: (title: string) => Promise<boolean>
|
||||
onUpdateProperty?: (key: string, value: FrontmatterValue) => void
|
||||
@@ -125,7 +126,7 @@ function PrimaryInspectorPanel({
|
||||
entries: VaultEntry[]
|
||||
typeEntryMap: Record<string, VaultEntry>
|
||||
vaultPath?: string
|
||||
referencedBy: VaultEntry[]
|
||||
referencedBy: ReferencedByItem[]
|
||||
onNavigate: (target: string) => void
|
||||
onToggleRawEditor?: () => void
|
||||
onInitializeProperties?: (path: string) => void
|
||||
|
||||
@@ -23,8 +23,9 @@ function bindMissingTypeAction(
|
||||
entry: VaultEntry | null,
|
||||
action: ((path: string, missingType: string, nextTypeName: string) => Promise<void>) | undefined,
|
||||
) {
|
||||
if (!entry?.isA || !action) return undefined
|
||||
return (nextTypeName: string) => action(entry.path, entry.isA, nextTypeName)
|
||||
const missingType = entry?.isA
|
||||
if (!entry || !missingType || !action) return undefined
|
||||
return (nextTypeName: string) => action(entry.path, missingType, nextTypeName)
|
||||
}
|
||||
|
||||
export function useInspectorPropertyActions({
|
||||
|
||||
Reference in New Issue
Block a user