UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

31 lines (29 loc) 701 B
import "../chunks/chunk-U5RRZUYZ.js"; // src/core/Page.ts import { Cursor } from "./pages/Cursor.js"; var PageSeed; ((PageSeed2) => { PageSeed2.Data = Symbol.for("@alinea/Page.Data"); function data(page2) { return page2[PageSeed2.Data]; } PageSeed2.data = data; function isPageSeed(page2) { return Boolean(page2 && page2[PageSeed2.Data]); } PageSeed2.isPageSeed = isPageSeed; })(PageSeed || (PageSeed = {})); function page(type, children) { children = children ?? {}; return { ...children, [PageSeed.Data]: { type: type instanceof Cursor ? type.type : type, partial: type instanceof Cursor ? type.partial : {} } }; } export { PageSeed, page };