import rootSchema from "../generated/ricos_document.jtd.json.js";
import { validate as v } from "../json-typedef-js-fork/validate.js";
import { pluginsToFeatures } from "../plugin-to-feature.js";
function validateRicosDocument(content, options) {
  const errors = v(rootSchema, content, {
    features: options?.plugins ? pluginsToFeatures(options.plugins) : void 0
  });
  if (!errors.length) {
    return { type: "ok", content };
  }
  return { type: "error", errors: errors ?? [] };
}
export {
  validateRicosDocument
};
//# sourceMappingURL=validate-ricos-document.js.map
