export declare const fragmentName = "Fragment"; export declare const dynamicHtmlTagName = "DynamicHtmlTag"; export declare const dynamicSvgTagName = "DynamicSvgTag"; /** * Using symbols rather than strings for these so that the type system forces us * to handle the dynamic tag name case. */ export declare const dynamicHtmlSymbol: unique symbol; export declare const dynamicSvgSymbol: unique symbol; /** * When Stencil encounters a JSX prop like "onArcgisClick", it converts the * first letter of the event name ("ArcgisClick") to lower case, and takes the * rest as is ("arcgisClick"). * * But, Preact, React 19 and Lit (Lit JSX in turn) don't do any case * conversion so you have to use "onarcgisClick" instead. * * This means, if you are consuming web component authored in Stencil, it's * JSX typings may wrongly include properties like "onArcgisClick" rather * than "onarcgisClick". * * When consuming Stencil typings in a Lit project, we are creating a mapped * type that fixes the casing difference. But just in case any place slips * through, this flag is used to normalize the casing. */ export declare const shouldNormalizeCustomElementEventCasing = true; /** * Always set these properties as attributes on all elements */ export declare const alwaysAttributes: Set; /** * Always set these properties as attributes on non-custom-elements */ export declare const nativeAlwaysAttributes: Set; /** * These don't exist as a property, only as an attribute. * Or, the property is read-only, but the attribute is not. */ export declare const htmlAlwaysAttributes: Record | undefined>; /** * The mappings between native DOM property and the equivalent attribute it * reflects to. * * This list was generated using the ./extractPropertyToAttributeMappings.js * script. * */ type PropertyToAttributeMappings = { /** * Mappings that are common to all HTML elements */ readonly common: Required; /** * Mappings that are specific to a given HTML element */ readonly perElement: Record; }; export type ElementPropertyToAttributeMappings = { /** * This list is only used to apply an optional performance optimization. * If it gets out of date or is missing some properties, it's not a big deal. * * This list is used to convert JSX properties with static values to * an inlined HTML string that uses the equivalent attribute. * * Thus instead of `.property=${"1"}` final lit-html looks like `attribute=1`. * * Since static attributes are just part of the HTML string and not a special * binding, lit-html doesn't have to waste time diffing them on re-render. */ reflected?: Readonly>; /** * Unfortunately, for many DOM **properties**, when set to undefined * (`el.autocapitalize = undefined`), rather than removing the attribute, they * set the attribute to an `"undefined"` string (this is never a desirable * outcome) or some other non-default value. This is the web platform * behavior. * * lit-html also has an anti-feature of rendering `undefined` **attribute** * values as `"undefined"` strings (they wanted to mirror the `.setAttribute()` * behavior). * * Thus, the only way to unset such attributes in lit-html is to use attribute * rather than property, and then add `?? nothing` to the attribute value. * `nothing` is a special magic value Lit had to invent to mean * "removeAttribute()" * * @see https://github.com/lit/lit/issues/4760 * @see https://x.com/maxpatiiuk/status/1840567140354798003 */ stringifiedReflected?: Readonly>; /** * Properties that when set to `undefined` value are actually set to * `"undefined"` string. * * We cannot use `?? nothing` as `nothing` in property bindings acts the same * as `undefined`. * * At the moment, all of these happen to be reset to default value when set * to empty string, thus we add `?? ''` on these if potentially nullish value * was provided. */ stringifiedNonReflected?: Readonly>; }; export declare const propertyToAttributeMappings: PropertyToAttributeMappings; export declare const htmlAlwaysBooleanAttributes: Set; /** * List of all DOM events settable in JSX. These event names are converted to * lowercase. All others are left as authored as we can't make assumptions about * what was the intended casing. */ export declare const nativeEvents: Set; /** * HTML elements that do not have children and closing tags * * Based on https://developer.mozilla.org/en-US/docs/Glossary/Void_element */ export declare const voidElements: Set; /** * Elements for which the `svg` function needs to be used rather than `html`. * * @example * ```tsx * * * * ``` * * Is converted into: * ```ts * html`${svg``}` * ``` * * (foreign elements in HTML can be self-closing) */ export declare const svgElements: Set; /** * As per the spec, some HTML elements are valid inside of ``, without * being escaped in ``. * * For such, it can be ambigous whether `html` or `svg` tag should be used. * If ambiguous element has non-ambiguous siblings, * jsxChildToTemplateParts will get the tag from them. Otherwise, * templatePartsToLitExpression will default to htmlTag, which will * probably work fine in all cases. * * @see https://svgwg.org/svg2-draft/struct.html#SVGElement * @see https://github.com/w3c/svgwg/blob/6d756e8e7159822e3e3b723756de6a025190bc68/master/definitions.xml#L281-L282 * @see https://discord.com/channels/1012791295170859069/1286427223712071692 * */ export declare const ambiguousHtmlSvgElements: Set; /** * Elements for which the `math` function needs to be used rather than `html` * * @example * ```tsx * * 6 * * ``` * * Is converted into: * ```ts * html`${mathml`6`}` * ``` * * (foreign elements in HTML can be self-closing) */ export declare const mathMlElements: Set; /** * Although most native elements do not contain dashes inside, there are a * few exceptions. Explicitly declaring a custom element by this name is * forbidden * * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names */ export declare const blockListedCustomElementNames: Set; export {};