astro.ts
621 Bytes
import Children from './children.astro'
import Custom from './custom.astro'
import Match from './match.astro'
import Node from './node.astro'
import Replace from './replace.astro'
export { Children, Custom, Match, Node, Replace }
import type { NodeType } from 'ultrahtml'
type SlotHandler = (string, NodeType) => Promise<Any>
type Replacements = Record<string, string>
export const createForceSetAttributes = (overrideAttributes) => (node) => {
if (!overrideAttributes) return node
const { attributes } = node
if (!attributes) return node
return {...node, attributes: {...attributes, ...overrideAttributes}}
}