fix ts issues
This commit is contained in:
parent
c1ddb42feb
commit
7a277f2c55
7 changed files with 15 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -22,3 +22,5 @@ logs
|
|||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
plans
|
||||
|
|
@ -7,7 +7,6 @@
|
|||
// "Edit" button/link don't get hijacked into a drag.
|
||||
|
||||
import { ENABLED_LANGUAGES } from '~~/config/languages'
|
||||
// @ts-expect-error — vuedraggable ships without type declarations.
|
||||
import draggable from 'vuedraggable'
|
||||
|
||||
definePageMeta({
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import type { Uupg, ValueLabel } from '~/types/uupg'
|
||||
|
||||
interface UupgDetail extends Uupg {
|
||||
interface UupgDetail extends Omit<Uupg, 'country_code' | 'rop1'> {
|
||||
country_code?: ValueLabel
|
||||
rop1?: ValueLabel
|
||||
error?: string
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/// <reference lib="dom" />
|
||||
|
||||
// Custom Tiptap node for the <general-resources> shortcode/placeholder.
|
||||
// Mirrors the UupgsListNode pattern: the editor treats it as an atom
|
||||
// block; generateHTML serializes to a neutral placeholder div; the
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/// <reference lib="dom" />
|
||||
|
||||
// Extends @tiptap/extension-image with an `align` attribute so authors
|
||||
// can left/center/right-align block images from the editor toolbar. The
|
||||
// align value renders as an inline style on the <img> element (instead
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/// <reference lib="dom" />
|
||||
|
||||
// Custom Tiptap node that preserves the <uupgs-list> Lit custom element
|
||||
// across the HTML→JSON→HTML round-trip. WP's [uupg_list] shortcode
|
||||
// renders this tag directly into page content; without a Tiptap node
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/// <reference lib="dom" />
|
||||
|
||||
// Verse block — styled container for a scripture quotation with an
|
||||
// editable reference ("e.g. John 3:16") shown at the top of the block
|
||||
// in the editor and rendered as a citation below the text on the
|
||||
|
|
@ -9,11 +11,11 @@
|
|||
// framework-agnostic and `generateHTML` on the server stays Vue-free.
|
||||
// The view never runs during `generateHTML`; only the editor mounts it.
|
||||
|
||||
import { Node, mergeAttributes } from '@tiptap/core'
|
||||
import { Node as TiptapNode, mergeAttributes } from '@tiptap/core'
|
||||
|
||||
export const VERSE_CLASS = 'doxa-verse'
|
||||
|
||||
export const Verse = Node.create({
|
||||
export const Verse = TiptapNode.create({
|
||||
name: 'verse',
|
||||
group: 'block',
|
||||
content: 'block+',
|
||||
|
|
@ -103,7 +105,7 @@ export const Verse = Node.create({
|
|||
}
|
||||
|
||||
refInput.addEventListener('blur', commitReference)
|
||||
refInput.addEventListener('keydown', (e) => {
|
||||
refInput.addEventListener('keydown', (e: KeyboardEvent) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault()
|
||||
refInput.blur()
|
||||
|
|
@ -117,7 +119,7 @@ export const Verse = Node.create({
|
|||
// the input keeps clipboard + key events local to the input.
|
||||
const LOCAL_EVENTS = ['paste', 'copy', 'cut', 'drop', 'dragstart', 'beforeinput', 'input', 'keydown', 'keypress', 'keyup', 'mousedown', 'click'] as const
|
||||
for (const ev of LOCAL_EVENTS) {
|
||||
refInput.addEventListener(ev, (e) => e.stopPropagation())
|
||||
refInput.addEventListener(ev, (e: Event) => e.stopPropagation())
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue