"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsonSchema = exports.jsonArray = exports.jsonObject = exports.jsonRoot = void 0;
const index_js_1 = require("../../feature-libraries/index.js");
const leafDomain_js_1 = require("../leafDomain.js");
const builder = new index_js_1.SchemaBuilderInternal({
    scope: "com.fluidframework.json",
    libraries: [leafDomain_js_1.leaf.library],
});
const jsonPrimitives = [...leafDomain_js_1.leaf.primitives, leafDomain_js_1.leaf.null];
/**
 * Types allowed as roots of Json content.
 */
exports.jsonRoot = [() => exports.jsonObject, () => exports.jsonArray, ...jsonPrimitives];
{
}
exports.jsonObject = builder.mapRecursive("object", index_js_1.FlexFieldSchema.createUnsafe(index_js_1.FieldKinds.optional, exports.jsonRoot));
exports.jsonArray = builder.fieldNodeRecursive("array", index_js_1.FlexFieldSchema.createUnsafe(index_js_1.FieldKinds.sequence, exports.jsonRoot));
exports.jsonSchema = builder.intoLibrary();
//# sourceMappingURL=jsonDomainSchema.js.map