content-query 0.0.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +91 -2
  3. package/dist/build-DfKd2bpf.d.mts +25 -0
  4. package/dist/build-Dxz7P1ur.mjs +1439 -0
  5. package/dist/build.d.mts +2 -0
  6. package/dist/build.mjs +1 -0
  7. package/dist/cli.d.mts +1 -0
  8. package/dist/cli.mjs +97 -0
  9. package/dist/computed.d.mts +43 -0
  10. package/dist/computed.mjs +139 -0
  11. package/dist/content-G69dPPuo.d.mts +109 -0
  12. package/dist/content-N1gYshjg.mjs +1028 -0
  13. package/dist/descriptor-D9Th5hzk.d.mts +18 -0
  14. package/dist/diagnostics-Cu94mZhl.mjs +80 -0
  15. package/dist/dist-C7_FOzY_.mjs +5405 -0
  16. package/dist/errors-C2iuBM0G.mjs +72 -0
  17. package/dist/github-slugger-BMgR_Q0I.mjs +72 -0
  18. package/dist/glob-Bv0dpvCQ.mjs +159 -0
  19. package/dist/index.d.mts +78 -0
  20. package/dist/index.mjs +46 -0
  21. package/dist/internal/markdown.d.mts +5 -0
  22. package/dist/internal/markdown.mjs +1 -0
  23. package/dist/internal.d.mts +54 -0
  24. package/dist/internal.mjs +89 -0
  25. package/dist/loaders.d.mts +11 -0
  26. package/dist/loaders.mjs +86 -0
  27. package/dist/markdown-CHvBBJNa.mjs +54 -0
  28. package/dist/next.d.mts +20 -0
  29. package/dist/next.mjs +142 -0
  30. package/dist/operators-UqWUhKQJ.mjs +173 -0
  31. package/dist/query.d.mts +44 -0
  32. package/dist/query.mjs +1 -0
  33. package/dist/relational-types-DgK3rLuw.d.mts +278 -0
  34. package/dist/rolldown-runtime-Bg1v5YCA.mjs +34 -0
  35. package/dist/runtime.d.mts +3 -0
  36. package/dist/runtime.mjs +5 -0
  37. package/dist/schema-C5Str-E8.mjs +20 -0
  38. package/dist/schema.d.mts +11 -0
  39. package/dist/schema.mjs +1 -0
  40. package/dist/server-only-CIJUlyL-.mjs +7 -0
  41. package/dist/types-C-kdMblM.d.mts +69 -0
  42. package/dist/types-ChaNhj42.d.mts +143 -0
  43. package/dist/types-Dh-Sydyw.d.mts +20 -0
  44. package/dist/validation-D_XdE1pF.mjs +84 -0
  45. package/dist/values-BbTV4QT-.mjs +901 -0
  46. package/dist/vite.d.mts +6 -0
  47. package/dist/vite.mjs +296 -0
  48. package/package.json +92 -10
@@ -0,0 +1,2 @@
1
+ import { n as buildContent, r as ContentSession, t as BuildContentOptions } from "./build-DfKd2bpf.mjs";
2
+ export { type BuildContentOptions, type ContentSession, buildContent };
package/dist/build.mjs ADDED
@@ -0,0 +1 @@
1
+ export { n as buildContent } from "./build-Dxz7P1ur.mjs";
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export {}
package/dist/cli.mjs ADDED
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env node
2
+ import { t as ContentError } from "./errors-C2iuBM0G.mjs";
3
+ import { t as buildAtRoot } from "./build-Dxz7P1ur.mjs";
4
+ import { cac } from "cac";
5
+ //#region package.json
6
+ var version = "0.2.0";
7
+ //#endregion
8
+ //#region src/integrations/cli/arguments.ts
9
+ /** Validates one path option after CAC's automatic numeric conversion. */
10
+ function pathOption(value, flag) {
11
+ if (typeof value !== "string" && typeof value !== "number" || value === "") throw new Error(`Invalid value for ${flag}; expected a path.`);
12
+ return String(value);
13
+ }
14
+ /** Rejects repeated build options, including aliases that CAC otherwise collapses. */
15
+ function assertSingleOptions(command, arguments_) {
16
+ const used = /* @__PURE__ */ new Set();
17
+ for (const argument of arguments_) {
18
+ const name = argument.split("=", 1)[0];
19
+ const flags = name.startsWith("--") ? [name.slice(2).replace(/^no-/, "")] : name.startsWith("-") ? name.slice(1).split("") : [];
20
+ for (const flag of flags) {
21
+ const option = command.hasOption(flag);
22
+ if (option) {
23
+ if (used.has(option.name)) throw new Error(`Repeated option: --${option.name}`);
24
+ used.add(option.name);
25
+ }
26
+ }
27
+ }
28
+ }
29
+ /** Applies ContentQuery's scalar option and backend contracts to CAC's parsed values. */
30
+ function buildOptions(options) {
31
+ if (Array.isArray(options["--"]) && options["--"].length > 0) throw new Error("Unexpected arguments after --.");
32
+ const { config, backend, outDir, watch } = options;
33
+ if (backend !== void 0 && backend !== "generated" && backend !== "in-memory") throw new Error(`Invalid backend: ${JSON.stringify(backend)}`);
34
+ if (watch !== void 0 && typeof watch !== "boolean") throw new Error("Invalid value for --watch; expected a boolean.");
35
+ return {
36
+ ...config === void 0 ? {} : { config: pathOption(config, "--config") },
37
+ ...backend === void 0 ? {} : { backend },
38
+ ...outDir === void 0 ? {} : { outDir: pathOption(outDir, "--out-dir") },
39
+ ...watch === void 0 ? {} : { watch }
40
+ };
41
+ }
42
+ /** Parses build options with CAC, or prints help/version and returns no build request. */
43
+ function parseArguments(arguments_) {
44
+ const cli = cac("content-query");
45
+ let options;
46
+ const command = cli.command("build", "Build content collections for server-side queries");
47
+ command.option("-c, --config <file>", "Use an exact configuration file").option("--backend <name>", "Storage backend: generated (default) or in-memory").option("-o, --out-dir <directory>", "Output directory (default: .content-query)").option("-w, --watch", "Watch sources and rebuild after changes").action((parsed) => {
48
+ assertSingleOptions(command, arguments_);
49
+ options = buildOptions(parsed);
50
+ });
51
+ cli.help().version(version);
52
+ cli.parse([
53
+ process.execPath,
54
+ "content-query",
55
+ ...arguments_
56
+ ], { run: false });
57
+ if (cli.options.version && cli.matchedCommand) cli.outputVersion();
58
+ if (cli.options.help || cli.options.version) return;
59
+ if (!cli.matchedCommand) throw new Error("Usage: content-query build [options]. Run content-query --help for details.");
60
+ cli.runMatchedCommand();
61
+ return options;
62
+ }
63
+ //#endregion
64
+ //#region src/integrations/cli/report.ts
65
+ /** Prints structured contextual diagnostics without depending on a framework display. */
66
+ function report(cause) {
67
+ if (cause instanceof ContentError) for (const diagnostic of cause.diagnostics) console.error(`[content-query:${diagnostic.code}] ${[
68
+ diagnostic.collection,
69
+ diagnostic.id,
70
+ diagnostic.source
71
+ ].filter(Boolean).join(" ")}: ${diagnostic.message}`);
72
+ else console.error(cause instanceof Error ? cause.message : cause);
73
+ }
74
+ //#endregion
75
+ //#region src/cli.ts
76
+ try {
77
+ const options = parseArguments(process.argv.slice(2));
78
+ if (options) {
79
+ const session = await buildAtRoot(process.cwd(), options, options.watch ? (state) => {
80
+ if (state.error) report(state.error);
81
+ else console.log("[content-query] Content ready.");
82
+ } : void 0);
83
+ if (options.watch) {
84
+ process.once("SIGINT", () => {
85
+ session.dispose();
86
+ });
87
+ process.once("SIGTERM", () => {
88
+ session.dispose();
89
+ });
90
+ } else await session.dispose();
91
+ }
92
+ } catch (cause) {
93
+ report(cause);
94
+ process.exitCode = 1;
95
+ }
96
+ //#endregion
97
+ export {};
@@ -0,0 +1,43 @@
1
+ import { p as MaybePromise } from "./types-ChaNhj42.mjs";
2
+ import { a as ComputedContext } from "./types-C-kdMblM.mjs";
3
+ import { StandardSchemaV1 } from "@standard-schema/spec";
4
+ //#region src/computed/text.d.ts
5
+ /** The syntax removed before computing text-derived fields; literal text preserves all characters. */
6
+ type TextFormat = "markdown" | "text" | "html";
7
+ /** Selects text from validated entry data or loader metadata instead of the captured body. */
8
+ type TextOptions<Data = Record<string, unknown>, Source = unknown> = {
9
+ /** Defaults to readBody(); undefined text is treated as an empty string. Async selectors are supported. */
10
+ from?: (context: ComputedContext<Data, Source>) => MaybePromise<string | undefined>;
11
+ /** Input syntax, defaulting to markdown. */
12
+ format?: TextFormat;
13
+ };
14
+ /** Controls the reading-speed estimate in addition to selecting its input text. */
15
+ type ReadingTimeOptions<Data = Record<string, unknown>, Source = unknown> = TextOptions<Data, Source> & {
16
+ /** A finite positive reading speed, defaulting to 200 words per minute. */
17
+ wordsPerMinute?: number;
18
+ };
19
+ /** Controls the maximum excerpt size in addition to selecting its input text. */
20
+ type ExcerptOptions<Data = Record<string, unknown>, Source = unknown> = TextOptions<Data, Source> & {
21
+ /** A positive integer, defaulting to 160. Counts graphemes and includes the trailing ellipsis. */
22
+ maxLength?: number;
23
+ };
24
+ /** Creates a numeric computed field counting normalized text with reading-time's word boundaries. */
25
+ export declare function wordCount<Data = Record<string, unknown>, Source = unknown>(options?: TextOptions<Data, Source>): {
26
+ schema: StandardSchemaV1<unknown, number>;
27
+ /** Resolves selected text during preparation and honors cancellation around asynchronous input. */
28
+ resolve(context: ComputedContext<Data, Source>): Promise<number>;
29
+ };
30
+ /** Creates a numeric computed field estimating whole reading minutes, rounded up; empty text returns zero. */
31
+ export declare function readingTime<Data = Record<string, unknown>, Source = unknown>(options?: ReadingTimeOptions<Data, Source>): {
32
+ schema: StandardSchemaV1<unknown, number>;
33
+ /** Resolves selected text during preparation and honors cancellation around asynchronous input. */
34
+ resolve(context: ComputedContext<Data, Source>): Promise<number>;
35
+ };
36
+ /** Creates a string computed field containing a normalized plain-text excerpt with a bounded length. */
37
+ export declare function excerpt<Data = Record<string, unknown>, Source = unknown>(options?: ExcerptOptions<Data, Source>): {
38
+ schema: StandardSchemaV1<unknown, string>;
39
+ /** Resolves selected text during preparation and honors cancellation around asynchronous input. */
40
+ resolve(context: ComputedContext<Data, Source>): Promise<string>;
41
+ };
42
+ //#endregion
43
+ export type { ExcerptOptions, ReadingTimeOptions, TextFormat, TextOptions };
@@ -0,0 +1,139 @@
1
+ import { t as assertServerOnly } from "./server-only-CIJUlyL-.mjs";
2
+ import { n as number, r as string } from "./schema-C5Str-E8.mjs";
3
+ import { t as src_default } from "./dist-C7_FOzY_.mjs";
4
+ import getReadingTime from "reading-time";
5
+ import { Parser } from "htmlparser2";
6
+ //#region src/computed/plain-text.ts
7
+ const markdown = new src_default({ html: true });
8
+ const ignoredElements = /* @__PURE__ */ new Set([
9
+ "head",
10
+ "script",
11
+ "style",
12
+ "template",
13
+ "noscript"
14
+ ]);
15
+ const blockElements = /* @__PURE__ */ new Set([
16
+ "address",
17
+ "article",
18
+ "aside",
19
+ "blockquote",
20
+ "br",
21
+ "caption",
22
+ "dd",
23
+ "details",
24
+ "dialog",
25
+ "div",
26
+ "dl",
27
+ "dt",
28
+ "fieldset",
29
+ "figcaption",
30
+ "figure",
31
+ "footer",
32
+ "form",
33
+ "h1",
34
+ "h2",
35
+ "h3",
36
+ "h4",
37
+ "h5",
38
+ "h6",
39
+ "header",
40
+ "hr",
41
+ "li",
42
+ "main",
43
+ "nav",
44
+ "ol",
45
+ "p",
46
+ "pre",
47
+ "section",
48
+ "summary",
49
+ "table",
50
+ "tbody",
51
+ "td",
52
+ "tfoot",
53
+ "th",
54
+ "thead",
55
+ "tr",
56
+ "ul"
57
+ ]);
58
+ /** Extracts HTML text and image alternatives without executing markup or retaining hidden code. */
59
+ function htmlText(html) {
60
+ const parts = [];
61
+ let ignoredDepth = 0;
62
+ new Parser({
63
+ onopentag(name, attributes) {
64
+ if (ignoredDepth || ignoredElements.has(name) || Object.hasOwn(attributes, "hidden")) {
65
+ ignoredDepth++;
66
+ return;
67
+ }
68
+ if (blockElements.has(name)) parts.push(" ");
69
+ if (name === "img" && attributes.alt) parts.push(" ", attributes.alt, " ");
70
+ },
71
+ ontext(text) {
72
+ if (!ignoredDepth) parts.push(text);
73
+ },
74
+ onclosetag(name) {
75
+ if (ignoredDepth) ignoredDepth--;
76
+ else if (blockElements.has(name)) parts.push(" ");
77
+ }
78
+ }).end(html);
79
+ return parts.join("");
80
+ }
81
+ /** Normalizes captured Markdown, HTML, or literal text to whitespace-separated plain text. */
82
+ function plainText(input, format) {
83
+ return (format === "text" ? input : htmlText(format === "markdown" ? markdown.render(input) : input)).replace(/\s+/gu, " ").trim();
84
+ }
85
+ //#endregion
86
+ //#region src/computed/text.ts
87
+ assertServerOnly();
88
+ /** Binds a typed result schema and text operation to the existing computed-field resolver contract. */
89
+ function textField(schema, options, compute) {
90
+ const { from, format = "markdown" } = options;
91
+ if (![
92
+ "markdown",
93
+ "text",
94
+ "html"
95
+ ].includes(format)) throw new TypeError("Text format must be \"markdown\", \"text\", or \"html\".");
96
+ if (from !== void 0 && typeof from !== "function") throw new TypeError("Text from must be a function.");
97
+ return {
98
+ schema,
99
+ /** Resolves selected text during preparation and honors cancellation around asynchronous input. */
100
+ async resolve(context) {
101
+ context.signal.throwIfAborted();
102
+ const input = await (from ? from(context) : context.readBody());
103
+ context.signal.throwIfAborted();
104
+ if (input !== void 0 && typeof input !== "string") throw new TypeError("Computed text input must be a string or undefined.");
105
+ return compute(plainText(input ?? "", format));
106
+ }
107
+ };
108
+ }
109
+ /** Creates a numeric computed field counting normalized text with reading-time's word boundaries. */
110
+ function wordCount(options = {}) {
111
+ return textField(number().int().nonnegative(), options, (text) => getReadingTime(text).words);
112
+ }
113
+ /** Creates a numeric computed field estimating whole reading minutes, rounded up; empty text returns zero. */
114
+ function readingTime(options = {}) {
115
+ const { wordsPerMinute = 200 } = options;
116
+ if (!Number.isFinite(wordsPerMinute) || wordsPerMinute <= 0) throw new TypeError("wordsPerMinute must be a finite positive number.");
117
+ return textField(number().int().nonnegative(), options, (text) => Math.ceil(getReadingTime(text, { wordsPerMinute }).minutes));
118
+ }
119
+ const graphemes = new Intl.Segmenter("en", { granularity: "grapheme" });
120
+ /** Truncates at a word boundary where possible, preserving complete Unicode graphemes and the hard limit. */
121
+ function truncate(text, maxLength) {
122
+ const characters = [];
123
+ for (const { segment } of graphemes.segment(text)) {
124
+ characters.push(segment);
125
+ if (characters.length > maxLength) break;
126
+ }
127
+ if (characters.length <= maxLength) return text;
128
+ const prefix = characters.slice(0, maxLength - 1).join("").trimEnd();
129
+ const boundary = prefix.lastIndexOf(" ");
130
+ return `${characters[maxLength - 1] === " " || boundary < 0 ? prefix : prefix.slice(0, boundary)}…`;
131
+ }
132
+ /** Creates a string computed field containing a normalized plain-text excerpt with a bounded length. */
133
+ function excerpt(options = {}) {
134
+ const { maxLength = 160 } = options;
135
+ if (!Number.isSafeInteger(maxLength) || maxLength <= 0) throw new TypeError("maxLength must be a positive safe integer.");
136
+ return textField(string(), options, (text) => truncate(text, maxLength));
137
+ }
138
+ //#endregion
139
+ export { excerpt, readingTime, wordCount };
@@ -0,0 +1,109 @@
1
+ import { n as ContentRenderResult } from "./types-Dh-Sydyw.mjs";
2
+ import { c as Relationship, i as CollectionRegistry, l as RelationshipsOf, s as QueryData } from "./types-C-kdMblM.mjs";
3
+ import { _ as QueryPlan, n as RelationalQueries, t as RelationalCountOptions, u as Query, v as QueryRegistry } from "./relational-types-DgK3rLuw.mjs";
4
+ //#region src/collection/registry-types.d.ts
5
+ type Scalar = string | number | bigint | boolean | Date;
6
+ type Element<Value> = NonNullable<Value> extends readonly (infer Item)[] ? NonNullable<Item> : NonNullable<Value>;
7
+ type Compatible<Left, Right> = NonNullable<Left> extends readonly unknown[] ? NonNullable<Right> extends readonly unknown[] ? false : ScalarCompatible<Left, Right> : ScalarCompatible<Left, Right>;
8
+ type ScalarCompatible<Left, Right> = [Element<Left> | Element<Right>] extends [Scalar] ? [Element<Left>] extends [never] ? true : [Element<Right>] extends [never] ? true : [Extract<Element<Left>, Element<Right>> | Extract<Element<Right>, Element<Left>>] extends [never] ? false : true : false;
9
+ type CheckRelation<Registry extends CollectionRegistry, Name extends keyof Registry, Link extends Relationship> = Link["collection"] extends keyof Registry ? Link["from"] extends keyof QueryData<Registry[Name]> ? Link["to"] extends keyof QueryData<Registry[Link["collection"]]> ? Compatible<QueryData<Registry[Name]>[Link["from"]], QueryData<Registry[Link["collection"]]>[Link["to"]]> extends true ? never : "incompatible-relationship-fields" : "unknown-target-field" : "unknown-source-field" : "unknown-target-collection";
10
+ /** Registry-level relationship checks require the complete inferred collection map. */
11
+ type InvalidRelationships<Registry extends CollectionRegistry> = { [Name in keyof Registry]: { [Link in keyof RelationshipsOf<Registry[Name]>]: RelationshipsOf<Registry[Name]>[Link] extends Relationship ? CheckRelation<Registry, Name, RelationshipsOf<Registry[Name]>[Link]> : "invalid-relationship"; }[keyof RelationshipsOf<Registry[Name]>]; }[keyof Registry];
12
+ //#endregion
13
+ //#region src/query/select.d.ts
14
+ /** A selection whose collection and selected result are inferred when from() is supplied. */
15
+ type SelectFrom<Registry extends CollectionRegistry, Keys extends readonly string[]> = {
16
+ /** Binds the collection and rejects selected keys that are absent from its prepared data type. */
17
+ from<Name extends keyof Registry & string>(collection: Name & (Exclude<Keys[number], keyof QueryData<Registry[NoInfer<Name>]>> extends never ? unknown : never)): Query<Registry, Name, Keys extends readonly [] ? QueryData<Registry[Name]> : { [Key in Keys[number]]-?: Key extends keyof QueryData<Registry[Name]> ? QueryData<Registry[Name]>[Key] : never; }, true>;
18
+ };
19
+ //#endregion
20
+ //#region src/shared/errors.d.ts
21
+ type ContentErrorCode = "variant-not-found" | "not-renderable" | "source-error" | "validation-error" | "duplicate-id" | "invalid-reference" | "invalid-query" | "artifact-error" | "render-error";
22
+ type ContentDiagnostic = {
23
+ code: ContentErrorCode;
24
+ message: string;
25
+ operation?: string;
26
+ collection?: string;
27
+ id?: string;
28
+ source?: string;
29
+ path?: readonly PropertyKey[];
30
+ issues?: readonly unknown[];
31
+ cause?: unknown;
32
+ };
33
+ /** A contextual library failure; inspect code and diagnostics instead of message text. */
34
+ declare class ContentError extends Error {
35
+ /** Recognizes contextual errors across preparation and separately bundled loader modules. */
36
+ static [Symbol.hasInstance](value: unknown): boolean;
37
+ readonly code: ContentErrorCode;
38
+ readonly operation?: string;
39
+ readonly collection?: string;
40
+ readonly id?: string;
41
+ readonly source?: string;
42
+ readonly path?: readonly PropertyKey[];
43
+ readonly issues?: readonly unknown[];
44
+ readonly diagnostics: readonly ContentDiagnostic[];
45
+ /** Creates one failure or a grouped report preserving individual causes and issues. */
46
+ constructor(options: ContentDiagnostic & {
47
+ diagnostics?: readonly ContentDiagnostic[];
48
+ });
49
+ }
50
+ //#endregion
51
+ //#region src/runtime/revision.d.ts
52
+ type QueryRecord = Record<string, unknown> & {
53
+ id: string;
54
+ };
55
+ /** The built-in side payload shared by an entry's `_body` and `_rendered` payloads. */
56
+ type BuiltinPayload = {
57
+ body?: string;
58
+ rendered?: ContentRenderResult;
59
+ markdown?: string;
60
+ };
61
+ type PreparedCollection = {
62
+ records: readonly QueryRecord[];
63
+ relationships: Record<string, Relationship>;
64
+ /** Lazy built-in payloads, present only for entries with a body or rendered output. */
65
+ builtins: ReadonlyMap<string, () => Promise<BuiltinPayload>>;
66
+ sources?: ReadonlyMap<string, string | undefined>;
67
+ };
68
+ type PreparedRevision = {
69
+ registry: QueryRegistry;
70
+ collections: Record<string, PreparedCollection>;
71
+ relations: Map<string, Map<string, readonly QueryRecord[]>>;
72
+ active: number;
73
+ payloadCache: Map<string, Promise<BuiltinPayload>>;
74
+ renderCache: Map<string, Promise<ContentRenderResult>>;
75
+ renderMarkdown?: (body: string) => Promise<ContentRenderResult>;
76
+ execute?: (plan: QueryPlan, terminal: "all" | "first" | "count", requests: PayloadRequest[]) => Promise<unknown>;
77
+ };
78
+ /** A projected row awaiting the payloads its query scope requested. */
79
+ type PayloadRequest = {
80
+ target: Record<string, unknown>;
81
+ collection: string;
82
+ id: string;
83
+ payloads: NonNullable<QueryPlan["payloads"]>;
84
+ };
85
+ type ContentState = {
86
+ revision?: PreparedRevision;
87
+ registry?: QueryRegistry;
88
+ error?: ContentError;
89
+ };
90
+ //#endregion
91
+ //#region src/runtime/content.d.ts
92
+ type ContentMethods<Registry extends CollectionRegistry = {}> = {
93
+ /** Starts a SQL-ordered fluent query; field names are checked against the collection in from(). */
94
+ select<const Keys extends readonly string[]>(...fields: Keys): SelectFrom<Registry, Keys>;
95
+ /** Collection-scoped relational queries with typed columns, relationships, payloads, and filters. */
96
+ readonly query: RelationalQueries<Registry>;
97
+ /** Counts matching entries before pagination, like the fluent count terminal. */
98
+ count<Name extends keyof Registry & string>(collection: Name, options?: RelationalCountOptions<Registry, Name>): Promise<number>;
99
+ };
100
+ type Content<Registry extends CollectionRegistry = {}> = InvalidRelationships<Registry> extends never ? ContentMethods<Registry> : {
101
+ readonly invalidRelationships: InvalidRelationships<Registry>;
102
+ };
103
+ /** Keeps dev builders live across host-delivered revisions while pinning active operations. */
104
+ declare function createLiveRuntime(initial: ContentState): {
105
+ content: ContentMethods<CollectionRegistry>;
106
+ update(next: ContentState): void;
107
+ };
108
+ //#endregion
109
+ export { ContentError as a, ContentDiagnostic as i, createLiveRuntime as n, ContentErrorCode as o, PreparedRevision as r, InvalidRelationships as s, Content as t };