@golemui/gui-mcp 1.0.1 → 1.0.3

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## 1.0.2 (2026-06-26)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **schemas:** add custom widget fallback to the JSON form schema ([#208](https://github.com/golemui/golemui/pull/208))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Mud Scientist @mudscientist
10
+
11
+ ## 1.0.1 (2026-06-15)
12
+
13
+ ### 🩹 Fixes
14
+
15
+ - **mcp:** resolve the @golemui type graph in a published install ([#206](https://github.com/golemui/golemui/pull/206))
16
+
17
+ ### ❤️ Thank You
18
+
19
+ - alberto-golem-ui
20
+
1
21
  # 1.0.0 (2026-06-14)
2
22
 
3
23
  ### 🚀 Features
package/cli.js CHANGED
@@ -5,8 +5,8 @@ import { fileURLToPath } from "node:url";
5
5
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
6
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
7
7
  import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprotocol/sdk/types.js";
8
- import { r as resolveDxFramework, f as listDxFactoriesCatalog, b as DX_LIST_FACTORIES_TOOL, g as getDxSpec, a as DX_GET_SPEC_TOOL, d as checkDxCode, D as DX_CHECK_CODE_TOOL } from "./list-dx-factories-DZoAUKZK.js";
9
- import { v as validateFormDefinition, c as JSON_VALIDATE_FORM_DEFINITION_TOOL, g as generateFromJsonSchema, a as JSON_GENERATE_FROM_SCHEMA_TOOL, d as generateFromOpenapi, J as JSON_GENERATE_FROM_OPENAPI_TOOL, f as getWidgetSpec, b as JSON_GET_WIDGET_SPEC_TOOL, e as getConcept, G as GET_CONCEPT_TOOL } from "./get-concept-Cy3zD1BS.js";
8
+ import { r as resolveDxFramework, f as listDxFactoriesCatalog, b as DX_LIST_FACTORIES_TOOL, g as getDxSpec, a as DX_GET_SPEC_TOOL, d as checkDxCode, D as DX_CHECK_CODE_TOOL } from "./list-dx-factories-C-Z5Sc5E.js";
9
+ import { v as validateFormDefinition, c as JSON_VALIDATE_FORM_DEFINITION_TOOL, g as generateFromJsonSchema, a as JSON_GENERATE_FROM_SCHEMA_TOOL, d as generateFromOpenapi, J as JSON_GENERATE_FROM_OPENAPI_TOOL, f as getWidgetSpec, b as JSON_GET_WIDGET_SPEC_TOOL, e as getConcept, G as GET_CONCEPT_TOOL } from "./get-concept-Py3iLVmb.js";
10
10
  const DX_INSTRUCTIONS = "Writing GolemUI as DX code (the `gui.*` fluent builder in TypeScript) instead of a JSON definition? GolemUI is not in any model training data, so `gui.*` code is easy to fabricate — do NOT guess the API. FIRST call `dx_list_factories` once: it is the COMPLETE reference — every factory with its signature, a compile-verified example, and its gotchas, plus the cross-cutting patterns and common rules. Its imports + render snippet are tailored to your target framework (" + resolveDxFramework() + ") — use them verbatim; import `gui` ONLY from `@golemui/gui-shared`, never hand-write raw `{ kind, type, path }` widget JSON or cast to `any`. Keep it in context and write your whole form from it; it is self-sufficient for most forms. `dx_get_spec` is only a rare single-factory deep-dive — you usually will not need it, and you do NOT need `json_get_widget_spec` here (that is the JSON surface). Then ALWAYS finish by calling `dx_check_code` with the snippet — it type-checks against the real `@golemui` declarations and returns `{ ok, diagnostics }` (each with a fix `hint` for recognized mistakes). Treat `ok: false` as blocking: apply the fixes and re-check until `ok` is true. Use `dx_check_code` for `gui.*` *code* and `json_validate_form_definition` for a JSON *definition object* — they are not interchangeable.\n\n";
11
11
  function defineTool(tool, handler) {
12
12
  return { tool, run: (args) => handler(args) };
@@ -1,180 +1,200 @@
1
1
  import Ajv2020 from "ajv/dist/2020.js";
2
2
  import addFormats from "ajv-formats";
3
- const $schema$u = "https://json-schema.org/draft/2020-12/schema";
4
- const $id$u = "https://golemui.com/schemas/common.schema.json";
5
- const title$u = "Golem Common Definitions";
6
- const $defs$t = { "reactiveExpression": { "type": "string", "description": "A reactive expression string. Use `$form` to access form data e.g. `$form.termsAccepted === true`" }, "dotPath": { "type": "string", "description": "A dot-separated path to a property in the form data" }, "dateRange": { "type": "object", "description": "A single date range used by calendar/date-picker widgets to mark days as disabled.", "properties": { "start": { "type": "string", "description": "ISO-8601 date string for the start of the disabled range (inclusive)" }, "end": { "type": "string", "description": "ISO-8601 date string for the end of the disabled range (inclusive). Omit to disable a single day." } }, "required": ["start"], "additionalProperties": false }, "uid": { "type": "string", "description": "Unique identifier for the widget" }, "localizable": { "description": "A value that can be a plain string or an i18n key object. Use a plain string for static text, or `{key, default, params}` to reference a translation key.", "oneOf": [{ "type": "string" }, { "type": "object", "properties": { "key": { "type": "string", "description": "The i18n translation key" }, "default": { "type": "string", "description": "Fallback text shown when the translation key is not found" }, "params": { "type": "object", "description": "Interpolation parameters passed to the translation function" } }, "required": ["key"], "additionalProperties": false }] }, "include": { "description": "Show this widget only in certain form states (`{in: [stateNames]}`) or when a reactive expression is true (`{when: expr}`). If omitted the widget is always shown.", "oneOf": [{ "type": "object", "properties": { "in": { "type": "array", "items": { "type": "string" }, "description": "List of state names (defined in the form `states` map) in which this widget should be visible" } }, "required": ["in"], "additionalProperties": false }, { "type": "object", "properties": { "when": { "$ref": "#/$defs/reactiveExpression" } }, "required": ["when"], "additionalProperties": false }] }, "exclude": { "description": "Hide this widget in certain form states (`{from: [stateNames]}`) or when a reactive expression is true (`{when: expr}`). If omitted the widget is never hidden.", "oneOf": [{ "type": "object", "properties": { "from": { "type": "array", "items": { "type": "string" }, "description": "List of state names (defined in the form `states` map) in which this widget should be hidden" } }, "required": ["from"], "additionalProperties": false }, { "type": "object", "properties": { "when": { "$ref": "#/$defs/reactiveExpression" } }, "required": ["when"], "additionalProperties": false }] }, "boolOrWhen": { "description": "A static boolean or a conditional `{when: reactiveExpression}` object evaluated at runtime. Use `{when: '$form.someField === true'}` for dynamic behavior.", "oneOf": [{ "type": "boolean" }, { "type": "object", "properties": { "when": { "$ref": "#/$defs/reactiveExpression" } }, "required": ["when"], "additionalProperties": false }] }, "on": { "type": "object", "description": 'Event handlers for this widget. Values are action names dispatched to the form\'s event bus. Each key also accepts a state-suffixed variant (`"click.<stateName>"`) that overrides the base handler when the named state is active.', "properties": { "load": { "type": "string", "description": "Action dispatched when the widget is first mounted" }, "click": { "type": "string", "description": "Action dispatched when the user clicks the widget" }, "change": { "type": "string", "description": "Action dispatched when the widget value changes" }, "filter": { "type": "string", "description": "Action dispatched on search/filter input, typically used with async data sources" }, "blur": { "type": "string", "description": "Action dispatched when the widget loses focus" } }, "patternProperties": { "^load\\.[^.]+$": { "type": "string", "description": 'State-suffixed load handler: used instead of `load` when the named state is active (e.g. `"load.myState"`)' }, "^click\\.[^.]+$": { "type": "string", "description": 'State-suffixed click handler: used instead of `click` when the named state is active (e.g. `"click.myState"`)' }, "^change\\.[^.]+$": { "type": "string", "description": 'State-suffixed change handler: used instead of `change` when the named state is active (e.g. `"change.myState"`)' }, "^filter\\.[^.]+$": { "type": "string", "description": 'State-suffixed filter handler: used instead of `filter` when the named state is active (e.g. `"filter.myState"`)' }, "^blur\\.[^.]+$": { "type": "string", "description": 'State-suffixed blur handler: used instead of `blur` when the named state is active (e.g. `"blur.myState"`)' } }, "additionalProperties": false }, "baseWidget": { "type": "object", "description": 'Base properties shared by all widgets. Root-level props that support state-suffixing (e.g. `"label.myState"`) are: `label`, `disabled`, `readonly`, `validator`, `size`. Any key inside `props` can also be suffixed. State names must be declared in the form `states` map.', "properties": { "$schema": { "type": "string" }, "uid": { "$ref": "#/$defs/uid" }, "type": { "type": "string" }, "size": { "type": "number", "description": "Column span in the form grid (1–12). Defaults to full width when omitted.", "minimum": 1, "maximum": 12 }, "include": { "$ref": "#/$defs/include" }, "exclude": { "$ref": "#/$defs/exclude" } }, "required": ["type"] } };
3
+ const $schema$v = "https://json-schema.org/draft/2020-12/schema";
4
+ const $id$v = "https://golemui.com/schemas/common.schema.json";
5
+ const title$v = "Golem Common Definitions";
6
+ const $defs$u = { "reactiveExpression": { "type": "string", "description": "A reactive expression string. Use `$form` to access form data e.g. `$form.termsAccepted === true`" }, "dotPath": { "type": "string", "description": "A dot-separated path to a property in the form data" }, "dateRange": { "type": "object", "description": "A single date range used by calendar/date-picker widgets to mark days as disabled.", "properties": { "start": { "type": "string", "description": "ISO-8601 date string for the start of the disabled range (inclusive)" }, "end": { "type": "string", "description": "ISO-8601 date string for the end of the disabled range (inclusive). Omit to disable a single day." } }, "required": ["start"], "additionalProperties": false }, "uid": { "type": "string", "description": "Unique identifier for the widget" }, "knownWidgetTypes": { "description": "Built-in widget `type` identifiers. Used to exclude built-ins from the custom-widget fallback so every widget matches exactly one schema.", "enum": ["accordion", "alert", "button", "calendar", "checkbox", "currency", "dateInput", "datePicker", "dropdown", "flex", "grid", "list", "markdown", "markdownText", "number", "password", "radiogroup", "rangeCalendar", "rangeDateInput", "rangeDatePicker", "repeater", "select", "tabs", "tags", "textarea", "textinput", "toggle"] }, "localizable": { "description": "A value that can be a plain string or an i18n key object. Use a plain string for static text, or `{key, default, params}` to reference a translation key.", "oneOf": [{ "type": "string" }, { "type": "object", "properties": { "key": { "type": "string", "description": "The i18n translation key" }, "default": { "type": "string", "description": "Fallback text shown when the translation key is not found" }, "params": { "type": "object", "description": "Interpolation parameters passed to the translation function" } }, "required": ["key"], "additionalProperties": false }] }, "include": { "description": "Show this widget only in certain form states (`{in: [stateNames]}`) or when a reactive expression is true (`{when: expr}`). If omitted the widget is always shown.", "oneOf": [{ "type": "object", "properties": { "in": { "type": "array", "items": { "type": "string" }, "description": "List of state names (defined in the form `states` map) in which this widget should be visible" } }, "required": ["in"], "additionalProperties": false }, { "type": "object", "properties": { "when": { "$ref": "#/$defs/reactiveExpression" } }, "required": ["when"], "additionalProperties": false }] }, "exclude": { "description": "Hide this widget in certain form states (`{from: [stateNames]}`) or when a reactive expression is true (`{when: expr}`). If omitted the widget is never hidden.", "oneOf": [{ "type": "object", "properties": { "from": { "type": "array", "items": { "type": "string" }, "description": "List of state names (defined in the form `states` map) in which this widget should be hidden" } }, "required": ["from"], "additionalProperties": false }, { "type": "object", "properties": { "when": { "$ref": "#/$defs/reactiveExpression" } }, "required": ["when"], "additionalProperties": false }] }, "boolOrWhen": { "description": "A static boolean or a conditional `{when: reactiveExpression}` object evaluated at runtime. Use `{when: '$form.someField === true'}` for dynamic behavior.", "oneOf": [{ "type": "boolean" }, { "type": "object", "properties": { "when": { "$ref": "#/$defs/reactiveExpression" } }, "required": ["when"], "additionalProperties": false }] }, "on": { "type": "object", "description": 'Event handlers for this widget. Values are action names dispatched to the form\'s event bus. Each key also accepts a state-suffixed variant (`"click.<stateName>"`) that overrides the base handler when the named state is active.', "properties": { "load": { "type": "string", "description": "Action dispatched when the widget is first mounted" }, "click": { "type": "string", "description": "Action dispatched when the user clicks the widget" }, "change": { "type": "string", "description": "Action dispatched when the widget value changes" }, "filter": { "type": "string", "description": "Action dispatched on search/filter input, typically used with async data sources" }, "blur": { "type": "string", "description": "Action dispatched when the widget loses focus" } }, "patternProperties": { "^load\\.[^.]+$": { "type": "string", "description": 'State-suffixed load handler: used instead of `load` when the named state is active (e.g. `"load.myState"`)' }, "^click\\.[^.]+$": { "type": "string", "description": 'State-suffixed click handler: used instead of `click` when the named state is active (e.g. `"click.myState"`)' }, "^change\\.[^.]+$": { "type": "string", "description": 'State-suffixed change handler: used instead of `change` when the named state is active (e.g. `"change.myState"`)' }, "^filter\\.[^.]+$": { "type": "string", "description": 'State-suffixed filter handler: used instead of `filter` when the named state is active (e.g. `"filter.myState"`)' }, "^blur\\.[^.]+$": { "type": "string", "description": 'State-suffixed blur handler: used instead of `blur` when the named state is active (e.g. `"blur.myState"`)' } }, "additionalProperties": false }, "baseWidget": { "type": "object", "description": 'Base properties shared by all widgets. Root-level props that support state-suffixing (e.g. `"label.myState"`) are: `label`, `disabled`, `readonly`, `validator`, `size`. Any key inside `props` can also be suffixed. State names must be declared in the form `states` map.', "properties": { "$schema": { "type": "string" }, "uid": { "$ref": "#/$defs/uid" }, "type": { "type": "string" }, "size": { "type": "number", "description": "Column span in the form grid (1–12). Defaults to full width when omitted.", "minimum": 1, "maximum": 12 }, "include": { "$ref": "#/$defs/include" }, "exclude": { "$ref": "#/$defs/exclude" } }, "required": ["type"] } };
7
7
  const commonSchema = {
8
+ $schema: $schema$v,
9
+ $id: $id$v,
10
+ title: title$v,
11
+ $defs: $defs$u
12
+ };
13
+ const $schema$u = "https://json-schema.org/draft/2020-12/schema";
14
+ const $id$u = "https://golemui.com/schemas/form.schema.json";
15
+ const title$u = "Golem Form DSL";
16
+ const type$s = "object";
17
+ const properties$r = { "$schema": { "type": "string" }, "states": { "type": "object", "description": 'Named boolean conditions keyed by state name, each mapping to a reactive expression. States serve two purposes: (1) gating widget visibility via `include.in` / `exclude.from`; (2) overriding individual widget properties when a state is active by appending `".<stateName>"` to any property key — e.g. `"label.myState": "Active label"` or `"props.hint.myState": "Active hint"`. Root-level suffixable props: `label`, `disabled`, `readonly`, `validator`, `size`. Any key inside `props` can also be suffixed.', "additionalProperties": { "$ref": "common.schema.json#/$defs/reactiveExpression" } }, "form": { "type": "array", "description": "The ordered list of widgets that make up the form body", "items": { "$ref": "#/$defs/formWidget" } }, "autocomplete": { "type": "string", "description": "HTML `autocomplete` attribute applied to the `<form>` element (e.g. `on`, `off`)" } };
18
+ const required$r = ["form"];
19
+ const additionalProperties = false;
20
+ const $defs$t = { "chunkRef": { "type": "object", "description": "A reference to an external chunk file whose widget array will be inlined at this position in the form", "properties": { "$ref": { "type": "string", "description": "Relative path to a JSON chunk file" } }, "required": ["$ref"], "additionalProperties": false }, "formWidget": { "oneOf": [{ "$ref": "./components/accordion.schema.json" }, { "$ref": "./components/alert.schema.json" }, { "$ref": "./components/button.schema.json" }, { "$ref": "./components/calendar.schema.json" }, { "$ref": "./components/checkbox.schema.json" }, { "$ref": "./components/currency.schema.json" }, { "$ref": "./components/dateinput.schema.json" }, { "$ref": "./components/datepicker.schema.json" }, { "$ref": "./components/dropdown.schema.json" }, { "$ref": "./components/list.schema.json" }, { "$ref": "./components/markdown.schema.json" }, { "$ref": "./components/markdowntext.schema.json" }, { "$ref": "./components/number.schema.json" }, { "$ref": "./components/password.schema.json" }, { "$ref": "./components/radiogroup.schema.json" }, { "$ref": "./components/rangecalendar.schema.json" }, { "$ref": "./components/rangedateinput.schema.json" }, { "$ref": "./components/rangedatepicker.schema.json" }, { "$ref": "./components/repeater.schema.json" }, { "$ref": "./components/select.schema.json" }, { "$ref": "./components/flex.schema.json" }, { "$ref": "./components/grid.schema.json" }, { "$ref": "./components/tabs.schema.json" }, { "$ref": "./components/tags.schema.json" }, { "$ref": "./components/textarea.schema.json" }, { "$ref": "./components/textinput.schema.json" }, { "$ref": "./components/toggle.schema.json" }, { "$ref": "./components/custom.schema.json" }, { "$ref": "#/$defs/chunkRef" }] } };
21
+ const formSchema = {
8
22
  $schema: $schema$u,
9
23
  $id: $id$u,
10
24
  title: title$u,
25
+ type: type$s,
26
+ properties: properties$r,
27
+ required: required$r,
28
+ additionalProperties,
11
29
  $defs: $defs$t
12
30
  };
13
31
  const $schema$t = "https://json-schema.org/draft/2020-12/schema";
14
- const $id$t = "https://golemui.com/schemas/form.schema.json";
15
- const title$t = "Golem Form DSL";
16
- const type$r = "object";
17
- const properties$r = { "$schema": { "type": "string" }, "states": { "type": "object", "description": 'Named boolean conditions keyed by state name, each mapping to a reactive expression. States serve two purposes: (1) gating widget visibility via `include.in` / `exclude.from`; (2) overriding individual widget properties when a state is active by appending `".<stateName>"` to any property key — e.g. `"label.myState": "Active label"` or `"props.hint.myState": "Active hint"`. Root-level suffixable props: `label`, `disabled`, `readonly`, `validator`, `size`. Any key inside `props` can also be suffixed.', "additionalProperties": { "$ref": "common.schema.json#/$defs/reactiveExpression" } }, "form": { "type": "array", "description": "The ordered list of widgets that make up the form body", "items": { "$ref": "#/$defs/formWidget" } }, "autocomplete": { "type": "string", "description": "HTML `autocomplete` attribute applied to the `<form>` element (e.g. `on`, `off`)" } };
18
- const required$r = ["form"];
19
- const additionalProperties = false;
20
- const $defs$s = { "chunkRef": { "type": "object", "description": "A reference to an external chunk file whose widget array will be inlined at this position in the form", "properties": { "$ref": { "type": "string", "description": "Relative path to a JSON chunk file" } }, "required": ["$ref"], "additionalProperties": false }, "formWidget": { "oneOf": [{ "$ref": "./components/accordion.schema.json" }, { "$ref": "./components/alert.schema.json" }, { "$ref": "./components/button.schema.json" }, { "$ref": "./components/calendar.schema.json" }, { "$ref": "./components/checkbox.schema.json" }, { "$ref": "./components/currency.schema.json" }, { "$ref": "./components/dateinput.schema.json" }, { "$ref": "./components/datepicker.schema.json" }, { "$ref": "./components/dropdown.schema.json" }, { "$ref": "./components/list.schema.json" }, { "$ref": "./components/markdown.schema.json" }, { "$ref": "./components/markdowntext.schema.json" }, { "$ref": "./components/number.schema.json" }, { "$ref": "./components/password.schema.json" }, { "$ref": "./components/radiogroup.schema.json" }, { "$ref": "./components/rangecalendar.schema.json" }, { "$ref": "./components/rangedateinput.schema.json" }, { "$ref": "./components/rangedatepicker.schema.json" }, { "$ref": "./components/repeater.schema.json" }, { "$ref": "./components/select.schema.json" }, { "$ref": "./components/flex.schema.json" }, { "$ref": "./components/grid.schema.json" }, { "$ref": "./components/tabs.schema.json" }, { "$ref": "./components/tags.schema.json" }, { "$ref": "./components/textarea.schema.json" }, { "$ref": "./components/textinput.schema.json" }, { "$ref": "./components/toggle.schema.json" }, { "$ref": "#/$defs/chunkRef" }] } };
21
- const formSchema = {
32
+ const $id$t = "https://golemui.com/schemas/layout-widget.schema.json";
33
+ const title$t = "Golem Layout Widget";
34
+ const oneOf$1 = [{ "$ref": "./components/accordion.schema.json" }, { "$ref": "./components/flex.schema.json" }, { "$ref": "./components/grid.schema.json" }, { "$ref": "./components/tabs.schema.json" }];
35
+ const layoutWidgetSchema = {
22
36
  $schema: $schema$t,
23
37
  $id: $id$t,
24
38
  title: title$t,
25
- type: type$r,
26
- properties: properties$r,
27
- required: required$r,
28
- additionalProperties,
29
- $defs: $defs$s
39
+ oneOf: oneOf$1
30
40
  };
31
41
  const $schema$s = "https://json-schema.org/draft/2020-12/schema";
32
- const $id$s = "https://golemui.com/schemas/layout-widget.schema.json";
33
- const title$s = "Golem Layout Widget";
34
- const oneOf = [{ "$ref": "./components/accordion.schema.json" }, { "$ref": "./components/flex.schema.json" }, { "$ref": "./components/grid.schema.json" }, { "$ref": "./components/tabs.schema.json" }];
35
- const layoutWidgetSchema = {
42
+ const $id$s = "https://golemui.com/schemas/validators.schema.json";
43
+ const title$s = "GolemUI Validator Definitions";
44
+ const $defs$s = { "localizable": { "$ref": "./common.schema.json#/$defs/localizable" }, "stringValidator": { "type": "object", "properties": { "type": { "const": "string" }, "required": { "type": "boolean", "description": "Makes the field mandatory — validation fails if the value is empty or absent" }, "minLength": { "type": "number", "description": "Minimum number of characters the string must contain" }, "maxLength": { "type": "number", "description": "Maximum number of characters the string may contain" }, "pattern": { "type": "string", "description": "A regular expression pattern the value must match" }, "format": { "type": "string", "description": "A named format the string must conform to (e.g. `email`, `url`, `date`, `uuid`)", "enum": ["email", "hostname", "ipv4", "ipv6", "url", "uuid", "date", "time", "date-time", "duration"] }, "const": { "description": "The string must equal exactly this value" }, "enum": { "type": "array", "description": "The string must be one of these allowed values" }, "messages": { "type": "object", "description": "Custom error messages that override the default text for each constraint violation", "properties": { "invalid": { "$ref": "#/$defs/localizable", "description": "Shown when the value fails general type validation" }, "required": { "$ref": "#/$defs/localizable", "description": "Shown when a required field is empty" }, "minLength": { "$ref": "#/$defs/localizable", "description": "Shown when the value is shorter than `minLength`" }, "maxLength": { "$ref": "#/$defs/localizable", "description": "Shown when the value is longer than `maxLength`" }, "pattern": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not match the `pattern` regex" }, "format": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not conform to the specified `format`" }, "enum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not in the `enum` list" }, "const": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not equal `const`" } }, "additionalProperties": false } }, "required": ["type"], "additionalProperties": false }, "numberValidator": { "type": "object", "properties": { "type": { "type": "string", "enum": ["number", "integer"] }, "required": { "type": "boolean", "description": "Makes the field mandatory — validation fails if the value is absent" }, "minimum": { "type": "number", "description": "The value must be greater than or equal to this number (inclusive)" }, "maximum": { "type": "number", "description": "The value must be less than or equal to this number (inclusive)" }, "exclusiveMinimum": { "type": "number", "description": "The value must be strictly greater than this number (exclusive)" }, "exclusiveMaximum": { "type": "number", "description": "The value must be strictly less than this number (exclusive)" }, "multipleOf": { "type": "number", "description": "The value must be a multiple of this number" }, "const": { "description": "The value must equal exactly this number" }, "enum": { "type": "array", "description": "The value must be one of these allowed numbers" }, "messages": { "type": "object", "description": "Custom error messages that override the default text for each constraint violation", "properties": { "invalid": { "$ref": "#/$defs/localizable", "description": "Shown when the value fails general type validation" }, "minimum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is below `minimum`" }, "maximum": { "$ref": "#/$defs/localizable", "description": "Shown when the value exceeds `maximum`" }, "exclusiveMinimum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not strictly above `exclusiveMinimum`" }, "exclusiveMaximum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not strictly below `exclusiveMaximum`" }, "multipleOf": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not a multiple of `multipleOf`" }, "enum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not in the `enum` list" }, "const": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not equal `const`" } }, "additionalProperties": false } }, "required": ["type"], "additionalProperties": false }, "booleanValidator": { "type": "object", "properties": { "type": { "const": "boolean" }, "required": { "type": "boolean", "description": "Makes the field mandatory — validation fails if the value is absent or false (e.g. an unchecked required checkbox)" }, "const": { "description": "The value must equal exactly this boolean (e.g. `true` to require acceptance)" }, "messages": { "type": "object", "description": "Custom error messages that override the default text for each constraint violation", "properties": { "invalid": { "$ref": "#/$defs/localizable", "description": "Shown when the value fails general type validation" }, "const": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not equal `const`" } }, "additionalProperties": false } }, "required": ["type"], "additionalProperties": false }, "arrayValidator": { "type": "object", "properties": { "type": { "const": "array" }, "required": { "type": "boolean", "description": "Makes the field mandatory — validation fails if the array is empty or absent" }, "minItems": { "type": "number", "description": "The array must contain at least this many items" }, "maxItems": { "type": "number", "description": "The array must contain no more than this many items" }, "uniqueItems": { "type": "boolean", "description": "When true, all items in the array must be distinct values" }, "messages": { "type": "object", "description": "Custom error messages that override the default text for each constraint violation", "properties": { "invalid": { "$ref": "#/$defs/localizable", "description": "Shown when the value fails general type validation" }, "required": { "$ref": "#/$defs/localizable", "description": "Shown when a required array is empty or absent" }, "minItems": { "$ref": "#/$defs/localizable", "description": "Shown when the array has fewer items than `minItems`" }, "maxItems": { "$ref": "#/$defs/localizable", "description": "Shown when the array has more items than `maxItems`" } }, "additionalProperties": false } }, "required": ["type"], "additionalProperties": false }, "customValidator": { "type": "object", "description": "A custom validator that delegates validation to application code. The registered validator function receives these constraint keys and must return a Standard Schema V1-compliant schema object (https://standardschema.dev). Add arbitrary constraint keys alongside `type` — they are passed as-is to the registered validator function.", "properties": { "type": { "const": "custom" }, "required": { "type": "boolean", "description": "Makes the field mandatory — evaluation is still delegated to the custom validator" } }, "required": ["type"], "additionalProperties": true }, "validator": { "description": "Validation rules for this field. The `type` discriminant selects the validator: `string`, `number`, `integer`, `boolean`, `array`, or `custom`.", "oneOf": [{ "$ref": "#/$defs/stringValidator" }, { "$ref": "#/$defs/numberValidator" }, { "$ref": "#/$defs/booleanValidator" }, { "$ref": "#/$defs/arrayValidator" }, { "$ref": "#/$defs/customValidator" }] } };
45
+ const validatorsSchema = {
36
46
  $schema: $schema$s,
37
47
  $id: $id$s,
38
48
  title: title$s,
39
- oneOf
49
+ $defs: $defs$s
40
50
  };
41
51
  const $schema$r = "https://json-schema.org/draft/2020-12/schema";
42
- const $id$r = "https://golemui.com/schemas/validators.schema.json";
43
- const title$r = "GolemUI Validator Definitions";
44
- const $defs$r = { "localizable": { "$ref": "./common.schema.json#/$defs/localizable" }, "stringValidator": { "type": "object", "properties": { "type": { "const": "string" }, "required": { "type": "boolean", "description": "Makes the field mandatory — validation fails if the value is empty or absent" }, "minLength": { "type": "number", "description": "Minimum number of characters the string must contain" }, "maxLength": { "type": "number", "description": "Maximum number of characters the string may contain" }, "pattern": { "type": "string", "description": "A regular expression pattern the value must match" }, "format": { "type": "string", "description": "A named format the string must conform to (e.g. `email`, `url`, `date`, `uuid`)", "enum": ["email", "hostname", "ipv4", "ipv6", "url", "uuid", "date", "time", "date-time", "duration"] }, "const": { "description": "The string must equal exactly this value" }, "enum": { "type": "array", "description": "The string must be one of these allowed values" }, "messages": { "type": "object", "description": "Custom error messages that override the default text for each constraint violation", "properties": { "invalid": { "$ref": "#/$defs/localizable", "description": "Shown when the value fails general type validation" }, "required": { "$ref": "#/$defs/localizable", "description": "Shown when a required field is empty" }, "minLength": { "$ref": "#/$defs/localizable", "description": "Shown when the value is shorter than `minLength`" }, "maxLength": { "$ref": "#/$defs/localizable", "description": "Shown when the value is longer than `maxLength`" }, "pattern": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not match the `pattern` regex" }, "format": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not conform to the specified `format`" }, "enum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not in the `enum` list" }, "const": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not equal `const`" } }, "additionalProperties": false } }, "required": ["type"], "additionalProperties": false }, "numberValidator": { "type": "object", "properties": { "type": { "type": "string", "enum": ["number", "integer"] }, "required": { "type": "boolean", "description": "Makes the field mandatory — validation fails if the value is absent" }, "minimum": { "type": "number", "description": "The value must be greater than or equal to this number (inclusive)" }, "maximum": { "type": "number", "description": "The value must be less than or equal to this number (inclusive)" }, "exclusiveMinimum": { "type": "number", "description": "The value must be strictly greater than this number (exclusive)" }, "exclusiveMaximum": { "type": "number", "description": "The value must be strictly less than this number (exclusive)" }, "multipleOf": { "type": "number", "description": "The value must be a multiple of this number" }, "const": { "description": "The value must equal exactly this number" }, "enum": { "type": "array", "description": "The value must be one of these allowed numbers" }, "messages": { "type": "object", "description": "Custom error messages that override the default text for each constraint violation", "properties": { "invalid": { "$ref": "#/$defs/localizable", "description": "Shown when the value fails general type validation" }, "minimum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is below `minimum`" }, "maximum": { "$ref": "#/$defs/localizable", "description": "Shown when the value exceeds `maximum`" }, "exclusiveMinimum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not strictly above `exclusiveMinimum`" }, "exclusiveMaximum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not strictly below `exclusiveMaximum`" }, "multipleOf": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not a multiple of `multipleOf`" }, "enum": { "$ref": "#/$defs/localizable", "description": "Shown when the value is not in the `enum` list" }, "const": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not equal `const`" } }, "additionalProperties": false } }, "required": ["type"], "additionalProperties": false }, "booleanValidator": { "type": "object", "properties": { "type": { "const": "boolean" }, "required": { "type": "boolean", "description": "Makes the field mandatory — validation fails if the value is absent or false (e.g. an unchecked required checkbox)" }, "const": { "description": "The value must equal exactly this boolean (e.g. `true` to require acceptance)" }, "messages": { "type": "object", "description": "Custom error messages that override the default text for each constraint violation", "properties": { "invalid": { "$ref": "#/$defs/localizable", "description": "Shown when the value fails general type validation" }, "const": { "$ref": "#/$defs/localizable", "description": "Shown when the value does not equal `const`" } }, "additionalProperties": false } }, "required": ["type"], "additionalProperties": false }, "arrayValidator": { "type": "object", "properties": { "type": { "const": "array" }, "required": { "type": "boolean", "description": "Makes the field mandatory — validation fails if the array is empty or absent" }, "minItems": { "type": "number", "description": "The array must contain at least this many items" }, "maxItems": { "type": "number", "description": "The array must contain no more than this many items" }, "uniqueItems": { "type": "boolean", "description": "When true, all items in the array must be distinct values" }, "messages": { "type": "object", "description": "Custom error messages that override the default text for each constraint violation", "properties": { "invalid": { "$ref": "#/$defs/localizable", "description": "Shown when the value fails general type validation" }, "required": { "$ref": "#/$defs/localizable", "description": "Shown when a required array is empty or absent" }, "minItems": { "$ref": "#/$defs/localizable", "description": "Shown when the array has fewer items than `minItems`" }, "maxItems": { "$ref": "#/$defs/localizable", "description": "Shown when the array has more items than `maxItems`" } }, "additionalProperties": false } }, "required": ["type"], "additionalProperties": false }, "customValidator": { "type": "object", "description": "A custom validator that delegates validation to application code. The registered validator function receives these constraint keys and must return a Standard Schema V1-compliant schema object (https://standardschema.dev). Add arbitrary constraint keys alongside `type` — they are passed as-is to the registered validator function.", "properties": { "type": { "const": "custom" }, "required": { "type": "boolean", "description": "Makes the field mandatory — evaluation is still delegated to the custom validator" } }, "required": ["type"], "additionalProperties": true }, "validator": { "description": "Validation rules for this field. The `type` discriminant selects the validator: `string`, `number`, `integer`, `boolean`, `array`, or `custom`.", "oneOf": [{ "$ref": "#/$defs/stringValidator" }, { "$ref": "#/$defs/numberValidator" }, { "$ref": "#/$defs/booleanValidator" }, { "$ref": "#/$defs/arrayValidator" }, { "$ref": "#/$defs/customValidator" }] } };
45
- const validatorsSchema = {
52
+ const $id$r = "https://golemui.com/schemas/components/accordion.schema.json";
53
+ const title$r = "Accordion Widget";
54
+ const type$r = "object";
55
+ const $defs$r = { "singleOpenProp": { "type": "boolean", "description": "When true, opening one section automatically closes all others. Defaults to false." }, "defaultOpenProp": { "type": "object", "description": "Map of section UIDs to booleans indicating which sections are open on initial render", "additionalProperties": { "type": "boolean" }, "minProperties": 1 }, "renderModeProp": { "description": "Controls when section content is rendered: `all` keeps all sections in the DOM, `activeOnly` unmounts inactive ones", "enum": ["all", "activeOnly"] }, "sectionsProp": { "type": "array", "description": "Ordered list of section definitions. Each section's `uid` must match the widget UIDs used in `children`.", "minItems": 1, "items": { "type": "object", "properties": { "label": { "$ref": "../common.schema.json#/$defs/localizable" }, "uid": { "type": "string", "description": "Unique identifier linking this section definition to its widgets in `children`" } }, "required": ["label", "uid"], "additionalProperties": false } } };
56
+ const allOf$r = [{ "$ref": "../common.schema.json#/$defs/baseWidget" }];
57
+ const properties$q = { "kind": { "const": "layout" }, "type": { "const": "accordion" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "children": { "type": "array", "description": "Flat list of widgets belonging to all sections. Each widget must have a `uid` matching one of the section UIDs in `props.sections`.", "minItems": 1, "items": { "$ref": "../form.schema.json#/$defs/formWidget" } }, "props": { "type": "object", "properties": { "singleOpen": { "$ref": "#/$defs/singleOpenProp" }, "defaultOpen": { "$ref": "#/$defs/defaultOpenProp" }, "renderMode": { "$ref": "#/$defs/renderModeProp" }, "sections": { "$ref": "#/$defs/sectionsProp" } }, "required": ["sections"], "patternProperties": { "^singleOpen\\.[^.]+$": { "$ref": "#/$defs/singleOpenProp" }, "^defaultOpen\\.[^.]+$": { "$ref": "#/$defs/defaultOpenProp" }, "^renderMode\\.[^.]+$": { "$ref": "#/$defs/renderModeProp" }, "^sections\\.[^.]+$": { "$ref": "#/$defs/sectionsProp" } }, "additionalProperties": false } };
58
+ const required$q = ["kind", "type", "children", "props"];
59
+ const unevaluatedProperties$r = false;
60
+ const accordion = {
46
61
  $schema: $schema$r,
47
62
  $id: $id$r,
48
63
  title: title$r,
49
- $defs: $defs$r
64
+ type: type$r,
65
+ $defs: $defs$r,
66
+ allOf: allOf$r,
67
+ properties: properties$q,
68
+ required: required$q,
69
+ unevaluatedProperties: unevaluatedProperties$r
50
70
  };
51
71
  const $schema$q = "https://json-schema.org/draft/2020-12/schema";
52
- const $id$q = "https://golemui.com/schemas/components/accordion.schema.json";
53
- const title$q = "Accordion Widget";
72
+ const $id$q = "https://golemui.com/schemas/components/alert.schema.json";
73
+ const title$q = "Alert Widget";
54
74
  const type$q = "object";
55
- const $defs$q = { "singleOpenProp": { "type": "boolean", "description": "When true, opening one section automatically closes all others. Defaults to false." }, "defaultOpenProp": { "type": "object", "description": "Map of section UIDs to booleans indicating which sections are open on initial render", "additionalProperties": { "type": "boolean" }, "minProperties": 1 }, "renderModeProp": { "description": "Controls when section content is rendered: `all` keeps all sections in the DOM, `activeOnly` unmounts inactive ones", "enum": ["all", "activeOnly"] }, "sectionsProp": { "type": "array", "description": "Ordered list of section definitions. Each section's `uid` must match the widget UIDs used in `children`.", "minItems": 1, "items": { "type": "object", "properties": { "label": { "$ref": "../common.schema.json#/$defs/localizable" }, "uid": { "type": "string", "description": "Unique identifier linking this section definition to its widgets in `children`" } }, "required": ["label", "uid"], "additionalProperties": false } } };
75
+ const $defs$q = { "textProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "levelProp": { "enum": ["default", "info", "success", "warning", "error"] } };
56
76
  const allOf$q = [{ "$ref": "../common.schema.json#/$defs/baseWidget" }];
57
- const properties$q = { "kind": { "const": "layout" }, "type": { "const": "accordion" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "children": { "type": "array", "description": "Flat list of widgets belonging to all sections. Each widget must have a `uid` matching one of the section UIDs in `props.sections`.", "minItems": 1, "items": { "$ref": "../form.schema.json#/$defs/formWidget" } }, "props": { "type": "object", "properties": { "singleOpen": { "$ref": "#/$defs/singleOpenProp" }, "defaultOpen": { "$ref": "#/$defs/defaultOpenProp" }, "renderMode": { "$ref": "#/$defs/renderModeProp" }, "sections": { "$ref": "#/$defs/sectionsProp" } }, "required": ["sections"], "patternProperties": { "^singleOpen\\.[^.]+$": { "$ref": "#/$defs/singleOpenProp" }, "^defaultOpen\\.[^.]+$": { "$ref": "#/$defs/defaultOpenProp" }, "^renderMode\\.[^.]+$": { "$ref": "#/$defs/renderModeProp" }, "^sections\\.[^.]+$": { "$ref": "#/$defs/sectionsProp" } }, "additionalProperties": false } };
58
- const required$q = ["kind", "type", "children", "props"];
77
+ const properties$p = { "kind": { "const": "display" }, "type": { "const": "alert" }, "props": { "type": "object", "properties": { "text": { "$ref": "#/$defs/textProp" }, "level": { "$ref": "#/$defs/levelProp" } }, "patternProperties": { "^text\\.[^.]+$": { "$ref": "#/$defs/textProp" }, "^level\\.[^.]+$": { "$ref": "#/$defs/levelProp" } }, "required": ["text"], "additionalProperties": false } };
78
+ const required$p = ["kind", "type", "props"];
59
79
  const unevaluatedProperties$q = false;
60
- const accordion = {
80
+ const alert = {
61
81
  $schema: $schema$q,
62
82
  $id: $id$q,
63
83
  title: title$q,
64
84
  type: type$q,
65
85
  $defs: $defs$q,
66
86
  allOf: allOf$q,
67
- properties: properties$q,
68
- required: required$q,
87
+ properties: properties$p,
88
+ required: required$p,
69
89
  unevaluatedProperties: unevaluatedProperties$q
70
90
  };
71
91
  const $schema$p = "https://json-schema.org/draft/2020-12/schema";
72
- const $id$p = "https://golemui.com/schemas/components/alert.schema.json";
73
- const title$p = "Alert Widget";
92
+ const $id$p = "https://golemui.com/schemas/components/button.schema.json";
93
+ const title$p = "Button Widget";
74
94
  const type$p = "object";
75
- const $defs$p = { "textProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "levelProp": { "enum": ["default", "info", "success", "warning", "error"] } };
95
+ const $defs$p = { "labelDef": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabledDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "variantProp": { "enum": ["filled", "outlined", "link"] } };
76
96
  const allOf$p = [{ "$ref": "../common.schema.json#/$defs/baseWidget" }];
77
- const properties$p = { "kind": { "const": "display" }, "type": { "const": "alert" }, "props": { "type": "object", "properties": { "text": { "$ref": "#/$defs/textProp" }, "level": { "$ref": "#/$defs/levelProp" } }, "patternProperties": { "^text\\.[^.]+$": { "$ref": "#/$defs/textProp" }, "^level\\.[^.]+$": { "$ref": "#/$defs/levelProp" } }, "required": ["text"], "additionalProperties": false } };
78
- const required$p = ["kind", "type", "props"];
97
+ const properties$o = { "kind": { "const": "action" }, "type": { "const": "button" }, "actionType": { "enum": ["button", "submit"] }, "label": { "$ref": "#/$defs/labelDef" }, "disabled": { "$ref": "#/$defs/disabledDef" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "props": { "type": "object", "properties": { "variant": { "$ref": "#/$defs/variantProp" }, "icon": { "type": "string" }, "iconPosition": { "enum": ["left", "right"] } }, "patternProperties": { "^variant\\.[^.]+$": { "$ref": "#/$defs/variantProp" } }, "additionalProperties": false } };
98
+ const patternProperties$k = { "^disabled\\.[^.]+$": { "$ref": "#/$defs/disabledDef" }, "^label\\.[^.]+$": { "$ref": "#/$defs/labelDef" } };
99
+ const required$o = ["kind", "type"];
79
100
  const unevaluatedProperties$p = false;
80
- const alert = {
101
+ const button = {
81
102
  $schema: $schema$p,
82
103
  $id: $id$p,
83
104
  title: title$p,
84
105
  type: type$p,
85
106
  $defs: $defs$p,
86
107
  allOf: allOf$p,
87
- properties: properties$p,
88
- required: required$p,
108
+ properties: properties$o,
109
+ patternProperties: patternProperties$k,
110
+ required: required$o,
89
111
  unevaluatedProperties: unevaluatedProperties$p
90
112
  };
91
113
  const $schema$o = "https://json-schema.org/draft/2020-12/schema";
92
- const $id$o = "https://golemui.com/schemas/components/button.schema.json";
93
- const title$o = "Button Widget";
114
+ const $id$o = "https://golemui.com/schemas/components/calendar.schema.json";
115
+ const title$o = "Calendar Widget";
94
116
  const type$o = "object";
95
- const $defs$o = { "labelDef": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabledDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "variantProp": { "enum": ["filled", "outlined", "link"] } };
117
+ const $defs$o = { "labelDef": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabledDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "readonlyDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "hintProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "prevMonthIconProp": { "type": "string" }, "nextMonthIconProp": { "type": "string" }, "prevMonthAriaLabelProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "nextMonthAriaLabelProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "dayFormatProp": { "description": "Formatting of day numbers in the calendar grid (`numeric` = 1–31, `2-digit` = 01–31)", "enum": ["numeric", "2-digit"] }, "weekdayFormatProp": { "description": "Formatting of weekday column headers (`short` = Mon, `long` = Monday, `narrow` = M)", "enum": ["short", "long", "narrow"] }, "monthFormatProp": { "description": "Formatting of the month heading (`long` = January, `short` = Jan, `narrow` = J, `numeric` = 1, `2-digit` = 01)", "enum": ["numeric", "2-digit", "long", "short", "narrow"] }, "minDateProp": { "type": "string", "description": "ISO-8601 date string for the earliest selectable date (inclusive)" }, "maxDateProp": { "type": "string", "description": "ISO-8601 date string for the latest selectable date (inclusive)" }, "numberOfMonthsProp": { "type": "number", "description": "Number of month panels to display side by side. Defaults to 1." }, "disabledRangesProp": { "type": "array", "description": "Date ranges that are shown but cannot be selected", "items": { "$ref": "../common.schema.json#/$defs/dateRange" } } };
96
118
  const allOf$o = [{ "$ref": "../common.schema.json#/$defs/baseWidget" }];
97
- const properties$o = { "kind": { "const": "action" }, "type": { "const": "button" }, "actionType": { "enum": ["button", "submit"] }, "label": { "$ref": "#/$defs/labelDef" }, "disabled": { "$ref": "#/$defs/disabledDef" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "props": { "type": "object", "properties": { "variant": { "$ref": "#/$defs/variantProp" }, "icon": { "type": "string" }, "iconPosition": { "enum": ["left", "right"] } }, "patternProperties": { "^variant\\.[^.]+$": { "$ref": "#/$defs/variantProp" } }, "additionalProperties": false } };
98
- const patternProperties$k = { "^disabled\\.[^.]+$": { "$ref": "#/$defs/disabledDef" }, "^label\\.[^.]+$": { "$ref": "#/$defs/labelDef" } };
99
- const required$o = ["kind", "type"];
119
+ const properties$n = { "kind": { "const": "input" }, "type": { "const": "calendar" }, "path": { "$ref": "../common.schema.json#/$defs/dotPath" }, "label": { "$ref": "#/$defs/labelDef" }, "disabled": { "$ref": "#/$defs/disabledDef" }, "readonly": { "$ref": "#/$defs/readonlyDef" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "validator": { "$ref": "../validators.schema.json#/$defs/validator" }, "props": { "type": "object", "properties": { "hint": { "$ref": "#/$defs/hintProp" }, "prevMonthIcon": { "$ref": "#/$defs/prevMonthIconProp" }, "nextMonthIcon": { "$ref": "#/$defs/nextMonthIconProp" }, "prevMonthAriaLabel": { "$ref": "#/$defs/prevMonthAriaLabelProp" }, "nextMonthAriaLabel": { "$ref": "#/$defs/nextMonthAriaLabelProp" }, "dayFormat": { "$ref": "#/$defs/dayFormatProp" }, "weekdayFormat": { "$ref": "#/$defs/weekdayFormatProp" }, "monthFormat": { "$ref": "#/$defs/monthFormatProp" }, "minDate": { "$ref": "#/$defs/minDateProp" }, "maxDate": { "$ref": "#/$defs/maxDateProp" }, "numberOfMonths": { "$ref": "#/$defs/numberOfMonthsProp" }, "disabledRanges": { "$ref": "#/$defs/disabledRangesProp" } }, "patternProperties": { "^hint\\.[^.]+$": { "$ref": "#/$defs/hintProp" }, "^prevMonthIcon\\.[^.]+$": { "$ref": "#/$defs/prevMonthIconProp" }, "^nextMonthIcon\\.[^.]+$": { "$ref": "#/$defs/nextMonthIconProp" }, "^prevMonthAriaLabel\\.[^.]+$": { "$ref": "#/$defs/prevMonthAriaLabelProp" }, "^nextMonthAriaLabel\\.[^.]+$": { "$ref": "#/$defs/nextMonthAriaLabelProp" }, "^dayFormat\\.[^.]+$": { "$ref": "#/$defs/dayFormatProp" }, "^weekdayFormat\\.[^.]+$": { "$ref": "#/$defs/weekdayFormatProp" }, "^monthFormat\\.[^.]+$": { "$ref": "#/$defs/monthFormatProp" }, "^minDate\\.[^.]+$": { "$ref": "#/$defs/minDateProp" }, "^maxDate\\.[^.]+$": { "$ref": "#/$defs/maxDateProp" }, "^numberOfMonths\\.[^.]+$": { "$ref": "#/$defs/numberOfMonthsProp" }, "^disabledRanges\\.[^.]+$": { "$ref": "#/$defs/disabledRangesProp" } }, "additionalProperties": false } };
120
+ const patternProperties$j = { "^label\\.[^.]+$": { "$ref": "#/$defs/labelDef" }, "^disabled\\.[^.]+$": { "$ref": "#/$defs/disabledDef" }, "^readonly\\.[^.]+$": { "$ref": "#/$defs/readonlyDef" }, "^validator\\.[^.]+$": { "$ref": "../validators.schema.json#/$defs/validator" } };
121
+ const required$n = ["kind", "type", "path"];
100
122
  const unevaluatedProperties$o = false;
101
- const button = {
123
+ const calendar = {
102
124
  $schema: $schema$o,
103
125
  $id: $id$o,
104
126
  title: title$o,
105
127
  type: type$o,
106
128
  $defs: $defs$o,
107
129
  allOf: allOf$o,
108
- properties: properties$o,
109
- patternProperties: patternProperties$k,
110
- required: required$o,
130
+ properties: properties$n,
131
+ patternProperties: patternProperties$j,
132
+ required: required$n,
111
133
  unevaluatedProperties: unevaluatedProperties$o
112
134
  };
113
135
  const $schema$n = "https://json-schema.org/draft/2020-12/schema";
114
- const $id$n = "https://golemui.com/schemas/components/calendar.schema.json";
115
- const title$n = "Calendar Widget";
136
+ const $id$n = "https://golemui.com/schemas/components/checkbox.schema.json";
137
+ const title$n = "Checkbox Widget";
116
138
  const type$n = "object";
117
- const $defs$n = { "labelDef": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabledDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "readonlyDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "hintProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "prevMonthIconProp": { "type": "string" }, "nextMonthIconProp": { "type": "string" }, "prevMonthAriaLabelProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "nextMonthAriaLabelProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "dayFormatProp": { "description": "Formatting of day numbers in the calendar grid (`numeric` = 1–31, `2-digit` = 01–31)", "enum": ["numeric", "2-digit"] }, "weekdayFormatProp": { "description": "Formatting of weekday column headers (`short` = Mon, `long` = Monday, `narrow` = M)", "enum": ["short", "long", "narrow"] }, "monthFormatProp": { "description": "Formatting of the month heading (`long` = January, `short` = Jan, `narrow` = J, `numeric` = 1, `2-digit` = 01)", "enum": ["numeric", "2-digit", "long", "short", "narrow"] }, "minDateProp": { "type": "string", "description": "ISO-8601 date string for the earliest selectable date (inclusive)" }, "maxDateProp": { "type": "string", "description": "ISO-8601 date string for the latest selectable date (inclusive)" }, "numberOfMonthsProp": { "type": "number", "description": "Number of month panels to display side by side. Defaults to 1." }, "disabledRangesProp": { "type": "array", "description": "Date ranges that are shown but cannot be selected", "items": { "$ref": "../common.schema.json#/$defs/dateRange" } } };
139
+ const $defs$n = { "labelDef": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabledDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "readonlyDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "checkboxPositionProp": { "enum": ["left", "right"], "default": "left" }, "hintProp": { "$ref": "../common.schema.json#/$defs/localizable" } };
118
140
  const allOf$n = [{ "$ref": "../common.schema.json#/$defs/baseWidget" }];
119
- const properties$n = { "kind": { "const": "input" }, "type": { "const": "calendar" }, "path": { "$ref": "../common.schema.json#/$defs/dotPath" }, "label": { "$ref": "#/$defs/labelDef" }, "disabled": { "$ref": "#/$defs/disabledDef" }, "readonly": { "$ref": "#/$defs/readonlyDef" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "validator": { "$ref": "../validators.schema.json#/$defs/validator" }, "props": { "type": "object", "properties": { "hint": { "$ref": "#/$defs/hintProp" }, "prevMonthIcon": { "$ref": "#/$defs/prevMonthIconProp" }, "nextMonthIcon": { "$ref": "#/$defs/nextMonthIconProp" }, "prevMonthAriaLabel": { "$ref": "#/$defs/prevMonthAriaLabelProp" }, "nextMonthAriaLabel": { "$ref": "#/$defs/nextMonthAriaLabelProp" }, "dayFormat": { "$ref": "#/$defs/dayFormatProp" }, "weekdayFormat": { "$ref": "#/$defs/weekdayFormatProp" }, "monthFormat": { "$ref": "#/$defs/monthFormatProp" }, "minDate": { "$ref": "#/$defs/minDateProp" }, "maxDate": { "$ref": "#/$defs/maxDateProp" }, "numberOfMonths": { "$ref": "#/$defs/numberOfMonthsProp" }, "disabledRanges": { "$ref": "#/$defs/disabledRangesProp" } }, "patternProperties": { "^hint\\.[^.]+$": { "$ref": "#/$defs/hintProp" }, "^prevMonthIcon\\.[^.]+$": { "$ref": "#/$defs/prevMonthIconProp" }, "^nextMonthIcon\\.[^.]+$": { "$ref": "#/$defs/nextMonthIconProp" }, "^prevMonthAriaLabel\\.[^.]+$": { "$ref": "#/$defs/prevMonthAriaLabelProp" }, "^nextMonthAriaLabel\\.[^.]+$": { "$ref": "#/$defs/nextMonthAriaLabelProp" }, "^dayFormat\\.[^.]+$": { "$ref": "#/$defs/dayFormatProp" }, "^weekdayFormat\\.[^.]+$": { "$ref": "#/$defs/weekdayFormatProp" }, "^monthFormat\\.[^.]+$": { "$ref": "#/$defs/monthFormatProp" }, "^minDate\\.[^.]+$": { "$ref": "#/$defs/minDateProp" }, "^maxDate\\.[^.]+$": { "$ref": "#/$defs/maxDateProp" }, "^numberOfMonths\\.[^.]+$": { "$ref": "#/$defs/numberOfMonthsProp" }, "^disabledRanges\\.[^.]+$": { "$ref": "#/$defs/disabledRangesProp" } }, "additionalProperties": false } };
120
- const patternProperties$j = { "^label\\.[^.]+$": { "$ref": "#/$defs/labelDef" }, "^disabled\\.[^.]+$": { "$ref": "#/$defs/disabledDef" }, "^readonly\\.[^.]+$": { "$ref": "#/$defs/readonlyDef" }, "^validator\\.[^.]+$": { "$ref": "../validators.schema.json#/$defs/validator" } };
121
- const required$n = ["kind", "type", "path"];
141
+ const properties$m = { "kind": { "const": "input" }, "type": { "const": "checkbox" }, "path": { "$ref": "../common.schema.json#/$defs/dotPath" }, "label": { "$ref": "#/$defs/labelDef" }, "disabled": { "$ref": "#/$defs/disabledDef" }, "readonly": { "$ref": "#/$defs/readonlyDef" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "validator": { "$ref": "../validators.schema.json#/$defs/validator" }, "defaultValue": { "type": "boolean" }, "props": { "type": "object", "properties": { "checkboxPosition": { "$ref": "#/$defs/checkboxPositionProp" }, "hint": { "$ref": "#/$defs/hintProp" } }, "patternProperties": { "^checkboxPosition\\.[^.]+$": { "$ref": "#/$defs/checkboxPositionProp" }, "^hint\\.[^.]+$": { "$ref": "#/$defs/hintProp" } }, "additionalProperties": false } };
142
+ const patternProperties$i = { "^label\\.[^.]+$": { "$ref": "#/$defs/labelDef" }, "^disabled\\.[^.]+$": { "$ref": "#/$defs/disabledDef" }, "^readonly\\.[^.]+$": { "$ref": "#/$defs/readonlyDef" }, "^validator\\.[^.]+$": { "$ref": "../validators.schema.json#/$defs/validator" } };
143
+ const required$m = ["kind", "type", "path"];
122
144
  const unevaluatedProperties$n = false;
123
- const calendar = {
145
+ const checkbox = {
124
146
  $schema: $schema$n,
125
147
  $id: $id$n,
126
148
  title: title$n,
127
149
  type: type$n,
128
150
  $defs: $defs$n,
129
151
  allOf: allOf$n,
130
- properties: properties$n,
131
- patternProperties: patternProperties$j,
132
- required: required$n,
152
+ properties: properties$m,
153
+ patternProperties: patternProperties$i,
154
+ required: required$m,
133
155
  unevaluatedProperties: unevaluatedProperties$n
134
156
  };
135
157
  const $schema$m = "https://json-schema.org/draft/2020-12/schema";
136
- const $id$m = "https://golemui.com/schemas/components/checkbox.schema.json";
137
- const title$m = "Checkbox Widget";
158
+ const $id$m = "https://golemui.com/schemas/components/currency.schema.json";
159
+ const title$m = "Currency Widget";
138
160
  const type$m = "object";
139
- const $defs$m = { "labelDef": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabledDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "readonlyDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "checkboxPositionProp": { "enum": ["left", "right"], "default": "left" }, "hintProp": { "$ref": "../common.schema.json#/$defs/localizable" } };
161
+ const $defs$m = { "labelDef": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabledDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "readonlyDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "currencyProp": { "type": "string" }, "stepProp": { "type": "number" }, "maximumFractionDigitsProp": { "type": "number" }, "minimumFractionDigitsProp": { "type": "number" }, "hintProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "placeholderProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "iconProp": { "type": "string" }, "autocompleteProp": { "type": "string" } };
140
162
  const allOf$m = [{ "$ref": "../common.schema.json#/$defs/baseWidget" }];
141
- const properties$m = { "kind": { "const": "input" }, "type": { "const": "checkbox" }, "path": { "$ref": "../common.schema.json#/$defs/dotPath" }, "label": { "$ref": "#/$defs/labelDef" }, "disabled": { "$ref": "#/$defs/disabledDef" }, "readonly": { "$ref": "#/$defs/readonlyDef" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "validator": { "$ref": "../validators.schema.json#/$defs/validator" }, "defaultValue": { "type": "boolean" }, "props": { "type": "object", "properties": { "checkboxPosition": { "$ref": "#/$defs/checkboxPositionProp" }, "hint": { "$ref": "#/$defs/hintProp" } }, "patternProperties": { "^checkboxPosition\\.[^.]+$": { "$ref": "#/$defs/checkboxPositionProp" }, "^hint\\.[^.]+$": { "$ref": "#/$defs/hintProp" } }, "additionalProperties": false } };
142
- const patternProperties$i = { "^label\\.[^.]+$": { "$ref": "#/$defs/labelDef" }, "^disabled\\.[^.]+$": { "$ref": "#/$defs/disabledDef" }, "^readonly\\.[^.]+$": { "$ref": "#/$defs/readonlyDef" }, "^validator\\.[^.]+$": { "$ref": "../validators.schema.json#/$defs/validator" } };
143
- const required$m = ["kind", "type", "path"];
163
+ const properties$l = { "kind": { "const": "input" }, "type": { "const": "currency" }, "path": { "$ref": "../common.schema.json#/$defs/dotPath" }, "label": { "$ref": "#/$defs/labelDef" }, "disabled": { "$ref": "#/$defs/disabledDef" }, "readonly": { "$ref": "#/$defs/readonlyDef" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "validator": { "$ref": "../validators.schema.json#/$defs/validator" }, "defaultValue": { "type": "number" }, "props": { "type": "object", "properties": { "currency": { "$ref": "#/$defs/currencyProp" }, "step": { "$ref": "#/$defs/stepProp" }, "maximumFractionDigits": { "$ref": "#/$defs/maximumFractionDigitsProp" }, "minimumFractionDigits": { "$ref": "#/$defs/minimumFractionDigitsProp" }, "hint": { "$ref": "#/$defs/hintProp" }, "placeholder": { "$ref": "#/$defs/placeholderProp" }, "icon": { "$ref": "#/$defs/iconProp" }, "autocomplete": { "$ref": "#/$defs/autocompleteProp" } }, "patternProperties": { "^currency\\.[^.]+$": { "$ref": "#/$defs/currencyProp" }, "^step\\.[^.]+$": { "$ref": "#/$defs/stepProp" }, "^maximumFractionDigits\\.[^.]+$": { "$ref": "#/$defs/maximumFractionDigitsProp" }, "^minimumFractionDigits\\.[^.]+$": { "$ref": "#/$defs/minimumFractionDigitsProp" }, "^hint\\.[^.]+$": { "$ref": "#/$defs/hintProp" }, "^placeholder\\.[^.]+$": { "$ref": "#/$defs/placeholderProp" }, "^icon\\.[^.]+$": { "$ref": "#/$defs/iconProp" }, "^autocomplete\\.[^.]+$": { "$ref": "#/$defs/autocompleteProp" } }, "additionalProperties": false } };
164
+ const patternProperties$h = { "^label\\.[^.]+$": { "$ref": "#/$defs/labelDef" }, "^disabled\\.[^.]+$": { "$ref": "#/$defs/disabledDef" }, "^readonly\\.[^.]+$": { "$ref": "#/$defs/readonlyDef" }, "^validator\\.[^.]+$": { "$ref": "../validators.schema.json#/$defs/validator" } };
165
+ const required$l = ["kind", "type", "path"];
144
166
  const unevaluatedProperties$m = false;
145
- const checkbox = {
167
+ const currency = {
146
168
  $schema: $schema$m,
147
169
  $id: $id$m,
148
170
  title: title$m,
149
171
  type: type$m,
150
172
  $defs: $defs$m,
151
173
  allOf: allOf$m,
152
- properties: properties$m,
153
- patternProperties: patternProperties$i,
154
- required: required$m,
174
+ properties: properties$l,
175
+ patternProperties: patternProperties$h,
176
+ required: required$l,
155
177
  unevaluatedProperties: unevaluatedProperties$m
156
178
  };
157
179
  const $schema$l = "https://json-schema.org/draft/2020-12/schema";
158
- const $id$l = "https://golemui.com/schemas/components/currency.schema.json";
159
- const title$l = "Currency Widget";
180
+ const $id$l = "https://golemui.com/schemas/components/custom.schema.json";
181
+ const title$l = "Custom Widget";
182
+ const description = "Fallback for user-registered custom components. Matches any widget whose `type` is NOT a built-in. Structural fields required by the widget's `kind` are validated (input -> path, layout -> children); `props` is an open object validated at runtime by the custom component itself.";
160
183
  const type$l = "object";
161
- const $defs$l = { "labelDef": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabledDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "readonlyDef": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "currencyProp": { "type": "string" }, "stepProp": { "type": "number" }, "maximumFractionDigitsProp": { "type": "number" }, "minimumFractionDigitsProp": { "type": "number" }, "hintProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "placeholderProp": { "$ref": "../common.schema.json#/$defs/localizable" }, "iconProp": { "type": "string" }, "autocompleteProp": { "type": "string" } };
162
- const allOf$l = [{ "$ref": "../common.schema.json#/$defs/baseWidget" }];
163
- const properties$l = { "kind": { "const": "input" }, "type": { "const": "currency" }, "path": { "$ref": "../common.schema.json#/$defs/dotPath" }, "label": { "$ref": "#/$defs/labelDef" }, "disabled": { "$ref": "#/$defs/disabledDef" }, "readonly": { "$ref": "#/$defs/readonlyDef" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "validator": { "$ref": "../validators.schema.json#/$defs/validator" }, "defaultValue": { "type": "number" }, "props": { "type": "object", "properties": { "currency": { "$ref": "#/$defs/currencyProp" }, "step": { "$ref": "#/$defs/stepProp" }, "maximumFractionDigits": { "$ref": "#/$defs/maximumFractionDigitsProp" }, "minimumFractionDigits": { "$ref": "#/$defs/minimumFractionDigitsProp" }, "hint": { "$ref": "#/$defs/hintProp" }, "placeholder": { "$ref": "#/$defs/placeholderProp" }, "icon": { "$ref": "#/$defs/iconProp" }, "autocomplete": { "$ref": "#/$defs/autocompleteProp" } }, "patternProperties": { "^currency\\.[^.]+$": { "$ref": "#/$defs/currencyProp" }, "^step\\.[^.]+$": { "$ref": "#/$defs/stepProp" }, "^maximumFractionDigits\\.[^.]+$": { "$ref": "#/$defs/maximumFractionDigitsProp" }, "^minimumFractionDigits\\.[^.]+$": { "$ref": "#/$defs/minimumFractionDigitsProp" }, "^hint\\.[^.]+$": { "$ref": "#/$defs/hintProp" }, "^placeholder\\.[^.]+$": { "$ref": "#/$defs/placeholderProp" }, "^icon\\.[^.]+$": { "$ref": "#/$defs/iconProp" }, "^autocomplete\\.[^.]+$": { "$ref": "#/$defs/autocompleteProp" } }, "additionalProperties": false } };
164
- const patternProperties$h = { "^label\\.[^.]+$": { "$ref": "#/$defs/labelDef" }, "^disabled\\.[^.]+$": { "$ref": "#/$defs/disabledDef" }, "^readonly\\.[^.]+$": { "$ref": "#/$defs/readonlyDef" }, "^validator\\.[^.]+$": { "$ref": "../validators.schema.json#/$defs/validator" } };
165
- const required$l = ["kind", "type", "path"];
184
+ const allOf$l = [{ "$ref": "../common.schema.json#/$defs/baseWidget" }, { "properties": { "type": { "not": { "$ref": "../common.schema.json#/$defs/knownWidgetTypes" } } } }];
185
+ const oneOf = [{ "$ref": "#/$defs/customInput" }, { "$ref": "#/$defs/customDisplay" }, { "$ref": "#/$defs/customAction" }, { "$ref": "#/$defs/customLayout" }];
166
186
  const unevaluatedProperties$l = false;
167
- const currency = {
187
+ const $defs$l = { "customInput": { "type": "object", "description": "Custom input widget. Binds to form data via `path`; `props` is open.", "properties": { "kind": { "const": "input" }, "type": { "type": "string" }, "path": { "$ref": "../common.schema.json#/$defs/dotPath" }, "label": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabled": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "readonly": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "validator": { "$ref": "../validators.schema.json#/$defs/validator" }, "defaultValue": true, "props": { "type": "object" } }, "patternProperties": { "^label\\.[^.]+$": { "$ref": "../common.schema.json#/$defs/localizable" }, "^disabled\\.[^.]+$": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "^readonly\\.[^.]+$": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "^validator\\.[^.]+$": { "$ref": "../validators.schema.json#/$defs/validator" } }, "required": ["kind", "type", "path"] }, "customDisplay": { "type": "object", "description": "Custom display widget. No data binding; `props` is open.", "properties": { "kind": { "const": "display" }, "type": { "type": "string" }, "props": { "type": "object" } }, "required": ["kind", "type"] }, "customAction": { "type": "object", "description": "Custom action widget; `props` is open.", "properties": { "kind": { "const": "action" }, "type": { "type": "string" }, "label": { "$ref": "../common.schema.json#/$defs/localizable" }, "disabled": { "$ref": "../common.schema.json#/$defs/boolOrWhen" }, "on": { "$ref": "../common.schema.json#/$defs/on" }, "props": { "type": "object" } }, "patternProperties": { "^label\\.[^.]+$": { "$ref": "../common.schema.json#/$defs/localizable" }, "^disabled\\.[^.]+$": { "$ref": "../common.schema.json#/$defs/boolOrWhen" } }, "required": ["kind", "type"] }, "customLayout": { "type": "object", "description": "Custom layout widget. Contains `children`; `props` is open.", "properties": { "kind": { "const": "layout" }, "type": { "type": "string" }, "children": { "type": "array", "minItems": 1, "items": { "$ref": "../form.schema.json#/$defs/formWidget" } }, "props": { "type": "object" } }, "required": ["kind", "type", "children"] } };
188
+ const custom = {
168
189
  $schema: $schema$l,
169
190
  $id: $id$l,
170
191
  title: title$l,
192
+ description,
171
193
  type: type$l,
172
- $defs: $defs$l,
173
194
  allOf: allOf$l,
174
- properties: properties$l,
175
- patternProperties: patternProperties$h,
176
- required: required$l,
177
- unevaluatedProperties: unevaluatedProperties$l
195
+ oneOf,
196
+ unevaluatedProperties: unevaluatedProperties$l,
197
+ $defs: $defs$l
178
198
  };
179
199
  const $schema$k = "https://json-schema.org/draft/2020-12/schema";
180
200
  const $id$k = "https://golemui.com/schemas/components/dateinput.schema.json";
@@ -634,6 +654,7 @@ const COMMON_SCHEMA = commonSchema;
634
654
  const FORM_SCHEMA = formSchema;
635
655
  const LAYOUT_WIDGET_SCHEMA = layoutWidgetSchema;
636
656
  const VALIDATORS_SCHEMA = validatorsSchema;
657
+ const CUSTOM_SCHEMA = custom;
637
658
  const COMPONENT_SCHEMAS = {
638
659
  accordion,
639
660
  alert,
@@ -668,6 +689,7 @@ const ALL_SCHEMAS = [
668
689
  VALIDATORS_SCHEMA,
669
690
  LAYOUT_WIDGET_SCHEMA,
670
691
  ...Object.values(COMPONENT_SCHEMAS),
692
+ CUSTOM_SCHEMA,
671
693
  FORM_SCHEMA
672
694
  ];
673
695
  let cachedAjv = null;
@@ -882,8 +904,8 @@ function describe(value) {
882
904
  return JSON.stringify(value);
883
905
  }
884
906
  function formatAjvErrors(errors, dataRoot) {
885
- if (!errors?.length) return { errors: [], warnings: [] };
886
- const collapsed = dataRoot !== void 0 ? collapseOneOfErrors(errors, dataRoot) : { errors, warnings: [] };
907
+ if (!errors?.length && dataRoot === void 0) return { errors: [], warnings: [] };
908
+ const collapsed = dataRoot !== void 0 ? collapseOneOfErrors(errors ?? [], dataRoot) : { errors, warnings: [] };
887
909
  const filtered = collapsed.errors;
888
910
  const out = [];
889
911
  for (const err of filtered) {
@@ -8,6 +8,12 @@ export declare const COMMON_SCHEMA: WidgetSchema;
8
8
  export declare const FORM_SCHEMA: WidgetSchema;
9
9
  export declare const LAYOUT_WIDGET_SCHEMA: WidgetSchema;
10
10
  export declare const VALIDATORS_SCHEMA: WidgetSchema;
11
+ /**
12
+ * Fallback schema for user-registered custom components (any `type` not in COMPONENT_SCHEMAS).
13
+ * Referenced by `form.schema.json`'s `formWidget` oneOf, so it must be registered for the form
14
+ * validator to compile. Kept out of COMPONENT_SCHEMAS because it has no single `type` const.
15
+ */
16
+ export declare const CUSTOM_SCHEMA: WidgetSchema;
11
17
  /**
12
18
  * Component schemas, keyed by their widget `type` constant (the value of `properties.type.const`
13
19
  * in each schema). These keys match the literal string a user puts in `type: '...'`.
package/json.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-Cy3zD1BS.js";
1
+ import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-Py3iLVmb.js";
2
2
  export {
3
3
  G as GET_CONCEPT_TOOL,
4
4
  J as JSON_GENERATE_FROM_OPENAPI_TOOL,
package/lib.js CHANGED
@@ -1,5 +1,5 @@
1
- import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-Cy3zD1BS.js";
2
- import { D, a as a2, b as b2, c as c2, d as d2, e as e2, g as g2, l, f as f2, t } from "./list-dx-factories-DZoAUKZK.js";
1
+ import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-Py3iLVmb.js";
2
+ import { D, a as a2, b as b2, c as c2, d as d2, e as e2, g as g2, l, f as f2, t } from "./list-dx-factories-C-Z5Sc5E.js";
3
3
  export {
4
4
  D as DX_CHECK_CODE_TOOL,
5
5
  a2 as DX_GET_SPEC_TOOL,
@@ -1,4 +1,4 @@
1
- import { h as checkReactiveExpression } from "./get-concept-Cy3zD1BS.js";
1
+ import { h as checkReactiveExpression } from "./get-concept-Py3iLVmb.js";
2
2
  import { existsSync } from "node:fs";
3
3
  import { createRequire } from "node:module";
4
4
  import { resolve, join, dirname } from "node:path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemui/gui-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "license": "MIT",
5
5
  "description": "Model Context Protocol server for GolemUI — gives AI coding assistants deterministic schema validation and form generation for GolemUI form definitions.",
6
6
  "type": "module",
@@ -40,10 +40,10 @@
40
40
  "ajv": "^8.17.1",
41
41
  "ajv-formats": "^3.0.1",
42
42
  "typescript": "^5.9.2",
43
- "@golemui/gui-schemas": "1.0.1",
44
- "@golemui/gui-shared": "1.0.1",
45
- "@golemui/gui-validators": "1.0.1",
46
- "@golemui/core": "1.0.1",
43
+ "@golemui/gui-schemas": "1.0.3",
44
+ "@golemui/gui-shared": "1.0.3",
45
+ "@golemui/gui-validators": "1.0.3",
46
+ "@golemui/core": "1.0.3",
47
47
  "zod": "^4.0.0",
48
48
  "@standard-schema/spec": "^1.0.0"
49
49
  },