{
	"schemaVersion": "1.0.0",
	"readme": "README.md",
	"modules": [
		{
			"kind": "javascript-module",
			"path": "form-repeatable.js",
			"declarations": [
				{
					"kind": "class",
					"description": "Manages repeatable groups in an open shadow root with native ElementInternals form participation. Adopts a cached snapshot of accessible page stylesheets; does not inject a color palette.",
					"name": "FormRepeatableElement",
					"members": [
						{
							"kind": "field",
							"name": "formAssociated",
							"static": true,
							"type": { "text": "boolean" },
							"default": "true"
						},
						{
							"kind": "field",
							"name": "addLabel",
							"attribute": "add-label",
							"type": { "text": "string" }
						},
						{
							"kind": "field",
							"name": "removeLabel",
							"attribute": "remove-label",
							"type": { "text": "string" }
						},
						{
							"kind": "field",
							"name": "removeAriaLabel",
							"attribute": "remove-aria-label",
							"type": { "text": "string" },
							"description": "Authored contextual Remove name, otherwise the last applied shared/default template. Nullish or empty assignments remove the instance override."
						},
						{
							"kind": "field",
							"name": "min",
							"attribute": "min",
							"type": { "text": "number" }
						},
						{
							"kind": "field",
							"name": "max",
							"attribute": "max",
							"type": { "text": "number | null" }
						},
						{
							"kind": "method",
							"name": "refreshLabels",
							"description": "Validates and applies current document defaults and instance label overrides in place. Returns false while disconnected or after a reported configuration error, retaining the last working wording.",
							"return": { "type": { "text": "boolean" } }
						},
						{
							"kind": "field",
							"name": "groupCount",
							"readonly": true,
							"type": { "text": "number" },
							"description": "Current number of groups; read-only state."
						},
						{
							"kind": "method",
							"name": "addGroup",
							"description": "Adds through the generated-button transition. Returns metadata captured before synchronous event listeners run, or null when disconnected, disabled, at max, or missing a template (reported as an error). Preserves existing focus where possible.",
							"return": {
								"type": { "text": "FormRepeatableGroup | null" }
							}
						},
						{
							"kind": "method",
							"name": "removeGroup",
							"description": "Removes the stable numeric ID through the generated-button transition. Returns false when disconnected, disabled, at min, or the ID is unknown. Throws TypeError for IDs that are not positive safe integers. Recovers focus when removing focused content.",
							"parameters": [
								{ "name": "id", "type": { "text": "number" } }
							],
							"return": { "type": { "text": "boolean" } }
						},
						{
							"kind": "method",
							"name": "resetGlobalStyles",
							"static": true,
							"description": "Clears the page-stylesheet cache for future instances; existing shadow roots are not refreshed.",
							"return": { "type": { "text": "void" } }
						},
						{
							"kind": "method",
							"name": "formResetCallback",
							"description": "Restores field defaults and synchronizes the form value.",
							"return": { "type": { "text": "void" } }
						},
						{
							"kind": "method",
							"name": "formDisabledCallback",
							"parameters": [
								{
									"name": "disabled",
									"type": { "text": "boolean" }
								}
							],
							"description": "Updates the disabled state of fields and generated buttons.",
							"return": { "type": { "text": "void" } }
						}
					],
					"events": [
						{
							"name": "form-repeatable:added",
							"type": {
								"text": "CustomEvent<FormRepeatableGroupEventDetail>"
							},
							"description": "Bubbling, composed, non-cancelable event after adding a group and updating DOM/form data. Detail contains a detached metadata snapshot { id, element, index } and groupCount; index is zero-based."
						},
						{
							"name": "form-repeatable:removed",
							"type": {
								"text": "CustomEvent<FormRepeatableGroupEventDetail>"
							},
							"description": "Bubbling, composed, non-cancelable event after removing a group and updating DOM/form data. Detail contains a detached metadata snapshot of the removed group, its zero-based index before removal, and the remaining groupCount."
						}
					],
					"attributes": [
						{
							"name": "add-label",
							"type": { "text": "string" },
							"default": "\"Add Another\"",
							"description": "Visible plain-text Add button label. Updates existing controls in place."
						},
						{
							"name": "remove-label",
							"type": { "text": "string" },
							"default": "\"Remove\"",
							"description": "Visible plain-text Remove label, also combined with the group's first label or legend to name its action. Updates existing controls in place."
						},
						{
							"name": "remove-aria-label",
							"type": { "text": "string" },
							"default": "\"{label} {group}\"",
							"description": "Complete plain-text contextual name. Requires {label} for the visible Remove wording; {group} inserts first label/legend text or an empty string. Unknown tokens are reported and working wording is retained."
						},
						{
							"name": "min",
							"type": { "text": "number" },
							"default": "1",
							"description": "Positive integer minimum. Remove buttons are hidden at or below it; initial groups are not padded to meet it. Invalid values warn and fall back to 1."
						},
						{
							"name": "max",
							"type": { "text": "number | null" },
							"default": "null",
							"description": "Optional parsed integer limit greater than min. Add is hidden at that limit; unparseable or too-small limits warn and are ignored."
						}
					],
					"cssParts": [
						{
							"name": "groups",
							"description": "Grid containing every group."
						},
						{
							"name": "group",
							"description": "Group wrapper using subgrid across both columns."
						},
						{
							"name": "content",
							"description": "Authored fields in the first column."
						},
						{
							"name": "group-controls",
							"description": "Per-group Remove controls in the second column."
						},
						{
							"name": "controls",
							"description": "Shared part on the main Add container and per-group control containers."
						},
						{
							"name": "button",
							"description": "Both native Add and Remove buttons."
						},
						{
							"name": "add-button",
							"description": "Native Add button."
						},
						{
							"name": "remove-button",
							"description": "Native Remove buttons with contextual accessible names."
						}
					],
					"superclass": {
						"name": "HTMLElement"
					},
					"tagName": "form-repeatable",
					"customElement": true
				}
			],
			"exports": [
				{
					"kind": "js",
					"name": "FormRepeatableElement",
					"declaration": {
						"name": "FormRepeatableElement",
						"module": "form-repeatable.js"
					}
				}
			]
		},
		{
			"kind": "javascript-module",
			"path": "define.js",
			"declarations": [
				{
					"kind": "function",
					"name": "defineFormRepeatable",
					"description": "Guarded registration helper. Importing this module also attempts automatic registration.",
					"parameters": [
						{
							"name": "tagName",
							"type": { "text": "string" },
							"default": "\"form-repeatable\""
						}
					],
					"return": {
						"type": { "text": "boolean" },
						"description": "False without a usable registry; true if defined or already registered."
					}
				}
			],
			"exports": [
				{
					"kind": "js",
					"name": "defineFormRepeatable",
					"declaration": {
						"name": "defineFormRepeatable",
						"module": "define.js"
					}
				}
			]
		}
	]
}
