🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@json-render/core

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@json-render/core - npm Package Compare versions

Comparing version
0.12.1
to
0.13.0
+23
-2
dist/index.d.mts

@@ -446,3 +446,3 @@ import { S as StateModel, V as VisibilityCondition, a as StateCondition, A as AndCondition, O as OrCondition, D as DynamicValue, b as Spec } from './store-utils-D98Czbil.mjs';

/** Export as JSON Schema for structured outputs */
jsonSchema(): object;
jsonSchema(options?: JsonSchemaOptions): object;
/** Validate a spec against this catalog */

@@ -456,2 +456,23 @@ validate(spec: unknown): SpecValidationResult<InferSpec<TDef, TCatalog>>;

/**
* Options for JSON Schema export
*/
interface JsonSchemaOptions {
/**
* When true, produces a strict JSON Schema subset compatible with
* LLM structured output APIs (OpenAI, Google Gemini, Anthropic, etc.).
* This ensures:
* - `additionalProperties: false` on every object
* - All object properties listed in `required` (optionals use nullable types)
* - Record/map types converted to fixed-key objects
*
* **Limitation:** Record types (dynamic-key maps) cannot be represented in
* strict JSON Schema because `additionalProperties` must be `false`. They
* are emitted as `{ type: "object", properties: {}, additionalProperties: false }`.
* The LLM prompt (via `catalog.prompt()`) still describes the full structure,
* so the model can produce valid output even though the JSON Schema for
* record entries is opaque.
*/
strict?: boolean;
}
/**
* Prompt generation options

@@ -634,2 +655,2 @@ */

export { AndCondition, type BuiltInAction, type Catalog, type ComputedFunction, DynamicValue, type InferActionParams, type InferCatalogActions, type InferCatalogComponents, type InferCatalogInput, type InferComponentProps, type InferSpec, OrCondition, type PromptContext, type PromptOptions, type PromptTemplate, type PropExpression, type PropResolutionContext, type Schema, type SchemaBuilder, type SchemaDefinition, type SchemaOptions, type SchemaType, Spec, type SpecIssue, type SpecIssueSeverity, type SpecValidationIssues, type SpecValidationResult, StateCondition, StateModel, type UserPromptOptions, type ValidateSpecOptions, type ValidationCheck, type ValidationCheckResult, ValidationCheckSchema, type ValidationConfig, ValidationConfigSchema, type ValidationContext, type ValidationFunction, type ValidationFunctionDefinition, type ValidationResult, VisibilityCondition, VisibilityConditionSchema, type VisibilityContext, autoFixSpec, buildUserPrompt, builtInValidationFunctions, check, defineCatalog, defineSchema, evaluateVisibility, formatSpecIssues, resolveActionParam, resolveBindings, resolveElementProps, resolvePropValue, runValidation, runValidationCheck, validateSpec, visibility };
export { AndCondition, type BuiltInAction, type Catalog, type ComputedFunction, DynamicValue, type InferActionParams, type InferCatalogActions, type InferCatalogComponents, type InferCatalogInput, type InferComponentProps, type InferSpec, type JsonSchemaOptions, OrCondition, type PromptContext, type PromptOptions, type PromptTemplate, type PropExpression, type PropResolutionContext, type Schema, type SchemaBuilder, type SchemaDefinition, type SchemaOptions, type SchemaType, Spec, type SpecIssue, type SpecIssueSeverity, type SpecValidationIssues, type SpecValidationResult, StateCondition, StateModel, type UserPromptOptions, type ValidateSpecOptions, type ValidationCheck, type ValidationCheckResult, ValidationCheckSchema, type ValidationConfig, ValidationConfigSchema, type ValidationContext, type ValidationFunction, type ValidationFunctionDefinition, type ValidationResult, VisibilityCondition, VisibilityConditionSchema, type VisibilityContext, autoFixSpec, buildUserPrompt, builtInValidationFunctions, check, defineCatalog, defineSchema, evaluateVisibility, formatSpecIssues, resolveActionParam, resolveBindings, resolveElementProps, resolvePropValue, runValidation, runValidationCheck, validateSpec, visibility };

@@ -446,3 +446,3 @@ import { S as StateModel, V as VisibilityCondition, a as StateCondition, A as AndCondition, O as OrCondition, D as DynamicValue, b as Spec } from './store-utils-D98Czbil.js';

/** Export as JSON Schema for structured outputs */
jsonSchema(): object;
jsonSchema(options?: JsonSchemaOptions): object;
/** Validate a spec against this catalog */

@@ -456,2 +456,23 @@ validate(spec: unknown): SpecValidationResult<InferSpec<TDef, TCatalog>>;

/**
* Options for JSON Schema export
*/
interface JsonSchemaOptions {
/**
* When true, produces a strict JSON Schema subset compatible with
* LLM structured output APIs (OpenAI, Google Gemini, Anthropic, etc.).
* This ensures:
* - `additionalProperties: false` on every object
* - All object properties listed in `required` (optionals use nullable types)
* - Record/map types converted to fixed-key objects
*
* **Limitation:** Record types (dynamic-key maps) cannot be represented in
* strict JSON Schema because `additionalProperties` must be `false`. They
* are emitted as `{ type: "object", properties: {}, additionalProperties: false }`.
* The LLM prompt (via `catalog.prompt()`) still describes the full structure,
* so the model can produce valid output even though the JSON Schema for
* record entries is opaque.
*/
strict?: boolean;
}
/**
* Prompt generation options

@@ -634,2 +655,2 @@ */

export { AndCondition, type BuiltInAction, type Catalog, type ComputedFunction, DynamicValue, type InferActionParams, type InferCatalogActions, type InferCatalogComponents, type InferCatalogInput, type InferComponentProps, type InferSpec, OrCondition, type PromptContext, type PromptOptions, type PromptTemplate, type PropExpression, type PropResolutionContext, type Schema, type SchemaBuilder, type SchemaDefinition, type SchemaOptions, type SchemaType, Spec, type SpecIssue, type SpecIssueSeverity, type SpecValidationIssues, type SpecValidationResult, StateCondition, StateModel, type UserPromptOptions, type ValidateSpecOptions, type ValidationCheck, type ValidationCheckResult, ValidationCheckSchema, type ValidationConfig, ValidationConfigSchema, type ValidationContext, type ValidationFunction, type ValidationFunctionDefinition, type ValidationResult, VisibilityCondition, VisibilityConditionSchema, type VisibilityContext, autoFixSpec, buildUserPrompt, builtInValidationFunctions, check, defineCatalog, defineSchema, evaluateVisibility, formatSpecIssues, resolveActionParam, resolveBindings, resolveElementProps, resolvePropValue, runValidation, runValidationCheck, validateSpec, visibility };
export { AndCondition, type BuiltInAction, type Catalog, type ComputedFunction, DynamicValue, type InferActionParams, type InferCatalogActions, type InferCatalogComponents, type InferCatalogInput, type InferComponentProps, type InferSpec, type JsonSchemaOptions, OrCondition, type PromptContext, type PromptOptions, type PromptTemplate, type PropExpression, type PropResolutionContext, type Schema, type SchemaBuilder, type SchemaDefinition, type SchemaOptions, type SchemaType, Spec, type SpecIssue, type SpecIssueSeverity, type SpecValidationIssues, type SpecValidationResult, StateCondition, StateModel, type UserPromptOptions, type ValidateSpecOptions, type ValidationCheck, type ValidationCheckResult, ValidationCheckSchema, type ValidationConfig, ValidationConfigSchema, type ValidationContext, type ValidationFunction, type ValidationFunctionDefinition, type ValidationResult, VisibilityCondition, VisibilityConditionSchema, type VisibilityContext, autoFixSpec, buildUserPrompt, builtInValidationFunctions, check, defineCatalog, defineSchema, evaluateVisibility, formatSpecIssues, resolveActionParam, resolveBindings, resolveElementProps, resolvePropValue, runValidation, runValidationCheck, validateSpec, visibility };
+1
-1
{
"name": "@json-render/core",
"version": "0.12.1",
"version": "0.13.0",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "description": "JSON becomes real things. Define your catalog, register your components, let AI generate.",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display