alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
31 lines (29 loc) • 701 B
JavaScript
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
};