{
    "$schema": "http://json.schemastore.org/web-types",
    "name": "@epa-wg/custom-element",
    "version": "0.0.39",
    "js-types-syntax": "typescript",
    "description-markup": "markdown",
    "contributions": {
        "html": {
            "attributes": [
                {
                    "name": "slice",
                    "description": "Defines the name of data slice in DCE where the data from `value` will be propagated on `change` or by `slice-event` event\n\nOn: any component with `value` and associated change event",
                    "doc-url": "https://unpkg.com/@epa-wg/custom-element/demo/dom-merge.html"
                },
                {
                    "name": "slice-event",
                    "description": "Defines the event name on which `value` would be synchronized with DCE slice\n\nOn: any component with `value` and associated change event",
                    "doc-url": "https://unpkg.com/@epa-wg/custom-element/demo/dom-merge.html"
                },
                {
                    "name": "custom-validity",
                    "description": "XPath expression to return either boolean or error string to be shown by browser native UI on form validation event. Unless value is true, prevents the form submission.",
                    "doc-url": "https://unpkg.com/@epa-wg/custom-element/demo/form.html"
                },
                {
                    "name": "slice-value",
                    "description": "XPath expression to populate into the slice",
                    "doc-url": "https://unpkg.com/@epa-wg/custom-element/demo/data-slices.html"
                }
            ],
            "elements": [
                {
                    "name": "custom-element",
                    "description": "Declarative Custom Element as W3C proposal PoC with native(XSLT) based templating",
                    "doc-url": "https://github.com/EPA-WG/custom-element?tab=readme-ov-file#custom-element",
                    "attributes": [
                        {
                            "name": "hidden",
                            "description": "hides DCE definition to prevent visual appearance of content. Wrap the payload into template tag to prevent applying the inline CSS in global scope.",
                            "required": false,
                            "doc-url": "https://developer.mozilla.org/en-US/docs/web/html/global_attributes/hidden",
                            "value": {
                                "type": "boolean"
                            }
                        },
                        {
                            "name": "tag",
                            "description": "HTML tag for Custom Element. Used for window.customElements.define(). If not set, would be generated and DCE instance rendered inline. ",
                            "default": "",
                            "required": false,
                            "doc-url": "https://github.com/EPA-WG/custom-element?tab=readme-ov-file#tag-attribute",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "src",
                            "description": "full, relative, or hash URL to DCE template.",
                            "default": "",
                            "required": false,
                            "doc-url": "https://github.com/EPA-WG/custom-element?tab=readme-ov-file#src-attribute",
                            "value": {
                                "type": "URL"
                            }
                        }
                    ],
                    "slots": [ ],
                    "js": {
                        "events": [
                            {
                                "name": "value:changed",
                                "description": "Emitted when data changes. Can be used for state serialization in hydration flow"
                            }
                        ],
                        "properties": [
                            {
                                "name": "value",
                                "type": "string",
                                "default": "",
                                "description": "DCE state. Can be used for state serialization in hydration flow. Format TBD, most likely encoded XML string"
                            }
                        ]
                    },
                    "css": {
                        "properties": [
                        ]
                    }
                },
                {
                    "name": "for-each",
                    "description": "The <xsl:for-each> element selects a set of nodes and processes each of them in the same way. It is often used to iterate through a set of nodes or to change the current node. If one or more <xsl:sort> elements appear as the children of this element, sorting occurs before processing. Otherwise, nodes are processed in document order.",
                    "doc-url": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/for-each",
                    "attributes": [
                        {
                            "name": "select",
                            "description": "Uses an XPath expression to select nodes to be processed.",
                            "required": true,
                            "doc-url": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/for-each#select",
                            "value": {
                                "type": "string"
                            }
                        }
                    ]
                },
                {
                    "name": "location-element",
                    "description": "get/set window URL parts or from SRC URL",
                    "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/location-element.html",
                    "attributes": [
                        {
                            "name": "href",
                            "description": "url to be parsed. When omitted window.location is used.",
                            "required": false,
                            "doc-url": "https://developer.mozilla.org/en-US/docs/Web/API/Location/href",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "live",
                            "description": "monitors history change, applicable only when href is omitted.",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/location-element.html",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "src",
                            "description": "sets the window URL",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/set-url.html",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "method",
                            "description": "when defined, changes URL by one of predefined methods.",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/set-url.html",
                            "value": {
                                "type": "string"
                            }
                        }
                    ]
                },
                {
                    "name": "module-url",
                    "description": "get module URL into slice from SRC according to web page importmap",
                    "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/module-url.html",
                    "attributes": [
                        {
                            "name": "src",
                            "description": "path to module resource, If omitted, it would match the window.location.href",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/module-url.html",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "slice",
                            "description": "slice name where resolved URL would be propagated",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/data-slices.html",
                            "value": {
                                "type": "string"
                            }
                        }
                    ]
                },
                {
                    "name": "slice",
                    "description": "Synthetic element for defining the slice-attributed when more then one slice/event/value associated with parent element",
                    "doc-url": "https://github.com/EPA-WG/custom-element/tree/develop?tab=readme-ov-file#interactivity-via-data-slice-triggered-by-events",
                    "attributes": [

                    ]
                },
                {
                    "name": "http-request",
                    "description": "Fetches data from a URL and exposes request, response, and parsed data via the value property. Supports JSON and XML response parsing.",
                    "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/http-request.html",
                    "attributes": [
                        {
                            "name": "url",
                            "description": "The URL to fetch data from. When changed, triggers a new fetch request.",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/http-request.html",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "method",
                            "description": "HTTP method for the request (GET, POST, etc.)",
                            "required": false,
                            "doc-url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "header-accept",
                            "description": "Sets the Accept header for the request. Use header-* pattern for other headers.",
                            "required": false,
                            "doc-url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "slice",
                            "description": "slice name where the fetched data would be propagated",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/data-slices.html",
                            "value": {
                                "type": "string"
                            }
                        }
                    ],
                    "js": {
                        "events": [
                            {
                                "name": "change",
                                "description": "Emitted when request, response, or data changes"
                            }
                        ],
                        "properties": [
                            {
                                "name": "value",
                                "type": "object",
                                "default": "{}",
                                "description": "Object containing request, response, and data properties"
                            }
                        ]
                    }
                },
                {
                    "name": "local-storage",
                    "description": "Provides access to localStorage with reactive updates. Reads and writes values to localStorage by key.",
                    "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/local-storage.html",
                    "attributes": [
                        {
                            "name": "key",
                            "description": "The localStorage key to read/write",
                            "required": true,
                            "doc-url": "https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "type",
                            "description": "Value type: text, json, or input types (number, date). Defaults to text.",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/local-storage.html",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "value",
                            "description": "Initial value to set in localStorage. If omitted, reads existing value.",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/local-storage.html",
                            "value": {
                                "type": "string"
                            }
                        },
                        {
                            "name": "live",
                            "description": "When present, monitors localStorage changes and updates reactively",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/local-storage.html",
                            "value": {
                                "type": "boolean"
                            }
                        },
                        {
                            "name": "slice",
                            "description": "slice name where the localStorage value would be propagated",
                            "required": false,
                            "doc-url": "https://unpkg.com/@epa-wg/custom-element@0/demo/data-slices.html",
                            "value": {
                                "type": "string"
                            }
                        }
                    ],
                    "js": {
                        "events": [
                            {
                                "name": "change",
                                "description": "Emitted when the localStorage value changes"
                            }
                        ],
                        "properties": [
                            {
                                "name": "value",
                                "type": "any",
                                "default": "",
                                "description": "The current value from localStorage, parsed according to type attribute"
                            }
                        ]
                    }
                }
            ]
        }
    }
}
