@snupo/jmc 1.4.2 → 1.6.0
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/components.md +251 -0
- package/dist/comps/checkbox.css +45 -0
- package/dist/comps/checkbox.d.ts +16 -0
- package/dist/comps/checkbox.d.ts.map +1 -0
- package/dist/comps/checkbox.js +20 -0
- package/dist/comps/checkbox.js.map +1 -0
- package/dist/comps/combobox.css +63 -0
- package/dist/comps/combobox.d.ts +30 -0
- package/dist/comps/combobox.d.ts.map +1 -0
- package/dist/comps/combobox.js +87 -0
- package/dist/comps/combobox.js.map +1 -0
- package/dist/comps/datalistinput.css +22 -0
- package/dist/comps/datalistinput.d.ts +20 -0
- package/dist/comps/datalistinput.d.ts.map +1 -0
- package/dist/comps/datalistinput.js +23 -0
- package/dist/comps/datalistinput.js.map +1 -0
- package/dist/comps/icon.css +6 -0
- package/dist/comps/icon.d.ts +11 -0
- package/dist/comps/icon.d.ts.map +1 -0
- package/dist/comps/icon.js +6 -0
- package/dist/comps/icon.js.map +1 -0
- package/dist/comps/index.d.ts +12 -0
- package/dist/comps/index.d.ts.map +1 -0
- package/dist/comps/index.js +12 -0
- package/dist/comps/index.js.map +1 -0
- package/dist/comps/numberstepper.css +44 -0
- package/dist/comps/numberstepper.d.ts +26 -0
- package/dist/comps/numberstepper.d.ts.map +1 -0
- package/dist/comps/numberstepper.js +72 -0
- package/dist/comps/numberstepper.js.map +1 -0
- package/dist/comps/radiogroup.css +20 -0
- package/dist/comps/radiogroup.d.ts +19 -0
- package/dist/comps/radiogroup.d.ts.map +1 -0
- package/dist/comps/radiogroup.js +21 -0
- package/dist/comps/radiogroup.js.map +1 -0
- package/dist/comps/rangeslider.css +46 -0
- package/dist/comps/rangeslider.d.ts +18 -0
- package/dist/comps/rangeslider.d.ts.map +1 -0
- package/dist/comps/rangeslider.js +15 -0
- package/dist/comps/rangeslider.js.map +1 -0
- package/dist/comps/select.css +16 -0
- package/dist/comps/select.d.ts +19 -0
- package/dist/comps/select.d.ts.map +1 -0
- package/dist/comps/select.js +21 -0
- package/dist/comps/select.js.map +1 -0
- package/dist/comps/tabs.css +22 -0
- package/dist/comps/tabs.d.ts +15 -0
- package/dist/comps/tabs.d.ts.map +1 -0
- package/dist/comps/tabs.js +11 -0
- package/dist/comps/tabs.js.map +1 -0
- package/dist/comps/textarea.css +19 -0
- package/dist/comps/textarea.d.ts +17 -0
- package/dist/comps/textarea.d.ts.map +1 -0
- package/dist/comps/textarea.js +32 -0
- package/dist/comps/textarea.js.map +1 -0
- package/dist/comps/togglegroup.css +29 -0
- package/dist/comps/togglegroup.d.ts +16 -0
- package/dist/comps/togglegroup.d.ts.map +1 -0
- package/dist/comps/togglegroup.js +11 -0
- package/dist/comps/togglegroup.js.map +1 -0
- package/dist/h.d.ts +2 -1
- package/dist/h.d.ts.map +1 -1
- package/dist/h.js.map +1 -1
- package/dist/jmc.d.ts.map +1 -1
- package/dist/jmc.js +1 -2
- package/dist/jmc.js.map +1 -1
- package/dist/jsx.d.ts +1 -0
- package/dist/jsx.d.ts.map +1 -1
- package/dist/jsx.js.map +1 -1
- package/dist/lib.d.ts +4 -3
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/package.json +89 -76
- package/readme.md +4 -0
- package/src/comps/checkbox.css +45 -0
- package/src/comps/checkbox.tsx +31 -0
- package/src/comps/combobox.css +63 -0
- package/src/comps/combobox.tsx +100 -0
- package/src/comps/css.d.ts +1 -0
- package/src/comps/datalistinput.css +22 -0
- package/src/comps/datalistinput.tsx +35 -0
- package/src/comps/icon.css +6 -0
- package/src/comps/icon.tsx +13 -0
- package/src/comps/index.ts +11 -0
- package/src/comps/numberstepper.css +44 -0
- package/src/comps/numberstepper.tsx +73 -0
- package/src/comps/radiogroup.css +20 -0
- package/src/comps/radiogroup.tsx +40 -0
- package/src/comps/rangeslider.css +46 -0
- package/src/comps/rangeslider.tsx +27 -0
- package/src/comps/select.css +16 -0
- package/src/comps/select.tsx +36 -0
- package/src/comps/tabs.css +22 -0
- package/src/comps/tabs.tsx +22 -0
- package/src/comps/textarea.css +19 -0
- package/src/comps/textarea.tsx +41 -0
- package/src/comps/togglegroup.css +29 -0
- package/src/comps/togglegroup.tsx +23 -0
- package/src/h.ts +2 -3
- package/src/jmc.ts +1 -2
- package/src/jsx.ts +1 -0
- package/src/lib.ts +2 -2
package/dist/jsx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.js","sourceRoot":"","sources":["../src/jsx.ts"],"names":[],"mappings":"","sourcesContent":["import type { Thunk } from './base.js'\n/* eslint-disable @typescript-eslint/no-empty-interface */\n/* eslint-disable @typescript-eslint/ban-types */\n// This code is based on react definition in DefinitelyTyped published under the MIT license.\n// Repository: https://github.com/DefinitelyTyped/DefinitelyTyped\n// Path in the repository: types/react/v15/index.d.ts\n//\n// Copyrights of original definition are:\n// Asana <https://asana.com>\n// AssureSign <http://www.assuresign.com>\n// Microsoft <https://microsoft.com>\n// John Reilly <https://github.com/johnnyreilly/>\n// Benoit Benezech <https://github.com/bbenezech>\n// Patricio Zavolinsky <https://github.com/pzavolinsky>\n// Digiguru <https://github.com/digiguru>\n// Eric Anderson <https://github.com/ericanderson>\n// Albert Kurniawan <https://github.com/morcerf>\n// Tanguy Krotoff <https://github.com/tkrotoff>\n// Dovydas Navickas <https://github.com/DovydasNavickas>\n// Stéphane Goetz <https://github.com/onigoetz>\n\ninterface EventHandler<E extends Event> {\n (event: E): void\n}\n\nexport interface AdditionalElementAttributes {\n mounted?: (n: Node) => void\n update?: (n: Node, uc: any) => void\n const?: boolean\n model?: any\n}\n\n/**\n * Used to represent DOM API's where users can either pass\n * true or false as a boolean or as its equivalent strings.\n */\ntype Booleanish = boolean | \"true\" | \"false\";\n\n/**\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin MDN}\n */\ntype CrossOrigin = \"anonymous\" | \"use-credentials\" | \"\" | undefined;\n\n// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/\ninterface AriaAttributes {\n /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */\n \"aria-activedescendant\"?: string | undefined;\n /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */\n \"aria-atomic\"?: Booleanish | undefined;\n /**\n * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\n * presented if they are made.\n */\n \"aria-autocomplete\"?: \"none\" | \"inline\" | \"list\" | \"both\" | undefined;\n /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */\n /**\n * Defines a string value that labels the current element, which is intended to be converted into Braille.\n * @see aria-label.\n */\n \"aria-braillelabel\"?: string | undefined;\n /**\n * Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n * @see aria-roledescription.\n */\n \"aria-brailleroledescription\"?: string | undefined;\n \"aria-busy\"?: Booleanish | undefined;\n /**\n * Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n * @see aria-pressed @see aria-selected.\n */\n \"aria-checked\"?: boolean | \"false\" | \"mixed\" | \"true\" | undefined;\n /**\n * Defines the total number of columns in a table, grid, or treegrid.\n * @see aria-colindex.\n */\n \"aria-colcount\"?: number | undefined;\n /**\n * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n * @see aria-colcount @see aria-colspan.\n */\n \"aria-colindex\"?: number | undefined;\n /**\n * Defines a human readable text alternative of aria-colindex.\n * @see aria-rowindextext.\n */\n \"aria-colindextext\"?: string | undefined;\n /**\n * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n * @see aria-colindex @see aria-rowspan.\n */\n \"aria-colspan\"?: number | undefined;\n /**\n * Identifies the element (or elements) whose contents or presence are controlled by the current element.\n * @see aria-owns.\n */\n \"aria-controls\"?: string | undefined;\n /** Indicates the element that represents the current item within a container or set of related elements. */\n \"aria-current\"?: boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\" | undefined;\n /**\n * Identifies the element (or elements) that describes the object.\n * @see aria-labelledby\n */\n \"aria-describedby\"?: string | undefined;\n /**\n * Defines a string value that describes or annotates the current element.\n * @see related aria-describedby.\n */\n \"aria-description\"?: string | undefined;\n /**\n * Identifies the element that provides a detailed, extended description for the object.\n * @see aria-describedby.\n */\n \"aria-details\"?: string | undefined;\n /**\n * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n * @see aria-hidden @see aria-readonly.\n */\n \"aria-disabled\"?: Booleanish | undefined;\n /**\n * Indicates what functions can be performed when a dragged object is released on the drop target.\n * @deprecated in ARIA 1.1\n */\n \"aria-dropeffect\"?: \"none\" | \"copy\" | \"execute\" | \"link\" | \"move\" | \"popup\" | undefined;\n /**\n * Identifies the element that provides an error message for the object.\n * @see aria-invalid @see aria-describedby.\n */\n \"aria-errormessage\"?: string | undefined;\n /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */\n \"aria-expanded\"?: Booleanish | undefined;\n /**\n * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\n * allows assistive technology to override the general default of reading in document source order.\n */\n \"aria-flowto\"?: string | undefined;\n /**\n * Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n * @deprecated in ARIA 1.1\n */\n \"aria-grabbed\"?: Booleanish | undefined;\n /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */\n \"aria-haspopup\"?: boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\" | undefined;\n /**\n * Indicates whether the element is exposed to an accessibility API.\n * @see aria-disabled.\n */\n \"aria-hidden\"?: Booleanish | undefined;\n /**\n * Indicates the entered value does not conform to the format expected by the application.\n * @see aria-errormessage.\n */\n \"aria-invalid\"?: boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\" | undefined;\n /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */\n \"aria-keyshortcuts\"?: string | undefined;\n /**\n * Defines a string value that labels the current element.\n * @see aria-labelledby.\n */\n \"aria-label\"?: string | undefined;\n /**\n * Identifies the element (or elements) that labels the current element.\n * @see aria-describedby.\n */\n \"aria-labelledby\"?: string | undefined;\n /** Defines the hierarchical level of an element within a structure. */\n \"aria-level\"?: number | undefined;\n /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */\n \"aria-live\"?: \"off\" | \"assertive\" | \"polite\" | undefined;\n /** Indicates whether an element is modal when displayed. */\n \"aria-modal\"?: Booleanish | undefined;\n /** Indicates whether a text box accepts multiple lines of input or only a single line. */\n \"aria-multiline\"?: Booleanish | undefined;\n /** Indicates that the user may select more than one item from the current selectable descendants. */\n \"aria-multiselectable\"?: Booleanish | undefined;\n /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */\n \"aria-orientation\"?: \"horizontal\" | \"vertical\" | undefined;\n /**\n * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\n * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n * @see aria-controls.\n */\n \"aria-owns\"?: string | undefined;\n /**\n * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\n * A hint could be a sample value or a brief description of the expected format.\n */\n \"aria-placeholder\"?: string | undefined;\n /**\n * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n * @see aria-setsize.\n */\n \"aria-posinset\"?: number | undefined;\n /**\n * Indicates the current \"pressed\" state of toggle buttons.\n * @see aria-checked @see aria-selected.\n */\n \"aria-pressed\"?: boolean | \"false\" | \"mixed\" | \"true\" | undefined;\n /**\n * Indicates that the element is not editable, but is otherwise operable.\n * @see aria-disabled.\n */\n \"aria-readonly\"?: Booleanish | undefined;\n /**\n * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n * @see aria-atomic.\n */\n \"aria-relevant\"?:\n | \"additions\"\n | \"additions removals\"\n | \"additions text\"\n | \"all\"\n | \"removals\"\n | \"removals additions\"\n | \"removals text\"\n | \"text\"\n | \"text additions\"\n | \"text removals\"\n | undefined;\n /** Indicates that user input is required on the element before a form may be submitted. */\n \"aria-required\"?: Booleanish | undefined;\n /** Defines a human-readable, author-localized description for the role of an element. */\n \"aria-roledescription\"?: string | undefined;\n /**\n * Defines the total number of rows in a table, grid, or treegrid.\n * @see aria-rowindex.\n */\n \"aria-rowcount\"?: number | undefined;\n /**\n * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n * @see aria-rowcount @see aria-rowspan.\n */\n \"aria-rowindex\"?: number | undefined;\n /**\n * Defines a human readable text alternative of aria-rowindex.\n * @see aria-colindextext.\n */\n \"aria-rowindextext\"?: string | undefined;\n /**\n * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n * @see aria-rowindex @see aria-colspan.\n */\n \"aria-rowspan\"?: number | undefined;\n /**\n * Indicates the current \"selected\" state of various widgets.\n * @see aria-checked @see aria-pressed.\n */\n \"aria-selected\"?: Booleanish | undefined;\n /**\n * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n * @see aria-posinset.\n */\n \"aria-setsize\"?: number | undefined;\n /** Indicates if items in a table or grid are sorted in ascending or descending order. */\n \"aria-sort\"?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined;\n /** Defines the maximum allowed value for a range widget. */\n \"aria-valuemax\"?: number | undefined;\n /** Defines the minimum allowed value for a range widget. */\n \"aria-valuemin\"?: number | undefined;\n /**\n * Defines the current value for a range widget.\n * @see aria-valuetext.\n */\n \"aria-valuenow\"?: number | undefined;\n /** Defines the human readable text alternative of aria-valuenow for a range widget. */\n \"aria-valuetext\"?: string | undefined;\n}\n\n// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions\ntype AriaRole =\n | \"alert\"\n | \"alertdialog\"\n | \"application\"\n | \"article\"\n | \"banner\"\n | \"button\"\n | \"cell\"\n | \"checkbox\"\n | \"columnheader\"\n | \"combobox\"\n | \"complementary\"\n | \"contentinfo\"\n | \"definition\"\n | \"dialog\"\n | \"directory\"\n | \"document\"\n | \"feed\"\n | \"figure\"\n | \"form\"\n | \"grid\"\n | \"gridcell\"\n | \"group\"\n | \"heading\"\n | \"img\"\n | \"link\"\n | \"list\"\n | \"listbox\"\n | \"listitem\"\n | \"log\"\n | \"main\"\n | \"marquee\"\n | \"math\"\n | \"menu\"\n | \"menubar\"\n | \"menuitem\"\n | \"menuitemcheckbox\"\n | \"menuitemradio\"\n | \"navigation\"\n | \"none\"\n | \"note\"\n | \"option\"\n | \"presentation\"\n | \"progressbar\"\n | \"radio\"\n | \"radiogroup\"\n | \"region\"\n | \"row\"\n | \"rowgroup\"\n | \"rowheader\"\n | \"scrollbar\"\n | \"search\"\n | \"searchbox\"\n | \"separator\"\n | \"slider\"\n | \"spinbutton\"\n | \"status\"\n | \"switch\"\n | \"tab\"\n | \"table\"\n | \"tablist\"\n | \"tabpanel\"\n | \"term\"\n | \"textbox\"\n | \"timer\"\n | \"toolbar\"\n | \"tooltip\"\n | \"tree\"\n | \"treegrid\"\n | \"treeitem\"\n | (string & {});\n\n// this list is \"complete\" in that it contains every SVG attribute\n// that React supports, but the types can be improved.\n// Full list here: https://facebook.github.io/react/docs/dom-elements.html\n//\n// The three broad type categories are (in order of restrictiveness):\n// - \"number | string\"\n// - \"string\"\n// - union of string literals\ninterface SVGAttributesBase<T> extends AriaAttributes, HTMLAttributesBase {\n // React-specific Attributes\n suppressHydrationWarning?: boolean | undefined;\n\n // Attributes which also defined in HTMLAttributes\n // See comment in SVGDOMPropertyConfig.js\n className?: string | undefined;\n color?: string | undefined;\n height?: number | string | undefined;\n id?: string | undefined;\n lang?: string | undefined;\n max?: number | string | undefined;\n media?: string | undefined;\n method?: string | undefined;\n min?: number | string | undefined;\n name?: string | undefined;\n nonce?: string | undefined;\n part?: string | undefined;\n slot?: string | undefined;\n style?: any | undefined; // react @types has CSSProperties here \n target?: string | undefined;\n type?: string | undefined;\n width?: number | string | undefined;\n\n // Other HTML properties supported by SVG elements in browsers\n role?: AriaRole | undefined;\n tabIndex?: number | undefined;\n crossOrigin?: CrossOrigin;\n\n // SVG Specific attributes\n accentHeight?: number | string | undefined;\n accumulate?: \"none\" | \"sum\" | undefined;\n additive?: \"replace\" | \"sum\" | undefined;\n alignmentBaseline?:\n | \"auto\"\n | \"baseline\"\n | \"before-edge\"\n | \"text-before-edge\"\n | \"middle\"\n | \"central\"\n | \"after-edge\"\n | \"text-after-edge\"\n | \"ideographic\"\n | \"alphabetic\"\n | \"hanging\"\n | \"mathematical\"\n | \"inherit\"\n | undefined;\n allowReorder?: \"no\" | \"yes\" | undefined;\n alphabetic?: number | string | undefined;\n amplitude?: number | string | undefined;\n arabicForm?: \"initial\" | \"medial\" | \"terminal\" | \"isolated\" | undefined;\n ascent?: number | string | undefined;\n attributeName?: string | undefined;\n attributeType?: string | undefined;\n autoReverse?: Booleanish | undefined;\n azimuth?: number | string | undefined;\n baseFrequency?: number | string | undefined;\n baselineShift?: number | string | undefined;\n baseProfile?: number | string | undefined;\n bbox?: number | string | undefined;\n begin?: number | string | undefined;\n bias?: number | string | undefined;\n by?: number | string | undefined;\n calcMode?: number | string | undefined;\n capHeight?: number | string | undefined;\n clip?: number | string | undefined;\n clipPath?: string | undefined;\n clipPathUnits?: number | string | undefined;\n clipRule?: number | string | undefined;\n colorInterpolation?: number | string | undefined;\n colorInterpolationFilters?: \"auto\" | \"sRGB\" | \"linearRGB\" | \"inherit\" | undefined;\n colorProfile?: number | string | undefined;\n colorRendering?: number | string | undefined;\n contentScriptType?: number | string | undefined;\n contentStyleType?: number | string | undefined;\n cursor?: number | string | undefined;\n cx?: number | string | undefined;\n cy?: number | string | undefined;\n d?: string | undefined;\n decelerate?: number | string | undefined;\n descent?: number | string | undefined;\n diffuseConstant?: number | string | undefined;\n direction?: number | string | undefined;\n display?: number | string | undefined;\n divisor?: number | string | undefined;\n dominantBaseline?:\n | \"auto\"\n | \"use-script\"\n | \"no-change\"\n | \"reset-size\"\n | \"ideographic\"\n | \"alphabetic\"\n | \"hanging\"\n | \"mathematical\"\n | \"central\"\n | \"middle\"\n | \"text-after-edge\"\n | \"text-before-edge\"\n | \"inherit\"\n | undefined;\n dur?: number | string | undefined;\n dx?: number | string | undefined;\n dy?: number | string | undefined;\n edgeMode?: number | string | undefined;\n elevation?: number | string | undefined;\n enableBackground?: number | string | undefined;\n end?: number | string | undefined;\n exponent?: number | string | undefined;\n externalResourcesRequired?: Booleanish | undefined;\n fill?: string | undefined;\n fillOpacity?: number | string | undefined;\n fillRule?: \"nonzero\" | \"evenodd\" | \"inherit\" | undefined;\n filter?: string | undefined;\n filterRes?: number | string | undefined;\n filterUnits?: number | string | undefined;\n floodColor?: number | string | undefined;\n floodOpacity?: number | string | undefined;\n focusable?: Booleanish | \"auto\" | undefined;\n fontFamily?: string | undefined;\n fontSize?: number | string | undefined;\n fontSizeAdjust?: number | string | undefined;\n fontStretch?: number | string | undefined;\n fontStyle?: number | string | undefined;\n fontVariant?: number | string | undefined;\n fontWeight?: number | string | undefined;\n format?: number | string | undefined;\n fr?: number | string | undefined;\n from?: number | string | undefined;\n fx?: number | string | undefined;\n fy?: number | string | undefined;\n g1?: number | string | undefined;\n g2?: number | string | undefined;\n glyphName?: number | string | undefined;\n glyphOrientationHorizontal?: number | string | undefined;\n glyphOrientationVertical?: number | string | undefined;\n glyphRef?: number | string | undefined;\n gradientTransform?: string | undefined;\n gradientUnits?: string | undefined;\n hanging?: number | string | undefined;\n horizAdvX?: number | string | undefined;\n horizOriginX?: number | string | undefined;\n href?: string | undefined;\n ideographic?: number | string | undefined;\n imageRendering?: number | string | undefined;\n in2?: number | string | undefined;\n in?: string | undefined;\n intercept?: number | string | undefined;\n k1?: number | string | undefined;\n k2?: number | string | undefined;\n k3?: number | string | undefined;\n k4?: number | string | undefined;\n k?: number | string | undefined;\n kernelMatrix?: number | string | undefined;\n kernelUnitLength?: number | string | undefined;\n kerning?: number | string | undefined;\n keyPoints?: number | string | undefined;\n keySplines?: number | string | undefined;\n keyTimes?: number | string | undefined;\n lengthAdjust?: number | string | undefined;\n letterSpacing?: number | string | undefined;\n lightingColor?: number | string | undefined;\n limitingConeAngle?: number | string | undefined;\n local?: number | string | undefined;\n markerEnd?: string | undefined;\n markerHeight?: number | string | undefined;\n markerMid?: string | undefined;\n markerStart?: string | undefined;\n markerUnits?: number | string | undefined;\n markerWidth?: number | string | undefined;\n mask?: string | undefined;\n maskContentUnits?: number | string | undefined;\n maskUnits?: number | string | undefined;\n mathematical?: number | string | undefined;\n mode?: number | string | undefined;\n numOctaves?: number | string | undefined;\n offset?: number | string | undefined;\n opacity?: number | string | undefined;\n operator?: number | string | undefined;\n order?: number | string | undefined;\n orient?: number | string | undefined;\n orientation?: number | string | undefined;\n origin?: number | string | undefined;\n overflow?: number | string | undefined;\n overlinePosition?: number | string | undefined;\n overlineThickness?: number | string | undefined;\n paintOrder?: number | string | undefined;\n panose1?: number | string | undefined;\n path?: string | undefined;\n pathLength?: number | string | undefined;\n patternContentUnits?: string | undefined;\n patternTransform?: number | string | undefined;\n patternUnits?: string | undefined;\n pointerEvents?: number | string | undefined;\n points?: string | undefined;\n pointsAtX?: number | string | undefined;\n pointsAtY?: number | string | undefined;\n pointsAtZ?: number | string | undefined;\n preserveAlpha?: Booleanish | undefined;\n preserveAspectRatio?: string | undefined;\n primitiveUnits?: number | string | undefined;\n r?: number | string | undefined;\n radius?: number | string | undefined;\n refX?: number | string | undefined;\n refY?: number | string | undefined;\n renderingIntent?: number | string | undefined;\n repeatCount?: number | string | undefined;\n repeatDur?: number | string | undefined;\n requiredExtensions?: number | string | undefined;\n requiredFeatures?: number | string | undefined;\n restart?: number | string | undefined;\n result?: string | undefined;\n rotate?: number | string | undefined;\n rx?: number | string | undefined;\n ry?: number | string | undefined;\n scale?: number | string | undefined;\n seed?: number | string | undefined;\n shapeRendering?: number | string | undefined;\n slope?: number | string | undefined;\n spacing?: number | string | undefined;\n specularConstant?: number | string | undefined;\n specularExponent?: number | string | undefined;\n speed?: number | string | undefined;\n spreadMethod?: string | undefined;\n startOffset?: number | string | undefined;\n stdDeviation?: number | string | undefined;\n stemh?: number | string | undefined;\n stemv?: number | string | undefined;\n stitchTiles?: number | string | undefined;\n stopColor?: string | undefined;\n stopOpacity?: number | string | undefined;\n strikethroughPosition?: number | string | undefined;\n strikethroughThickness?: number | string | undefined;\n string?: number | string | undefined;\n stroke?: string | undefined;\n strokeDasharray?: string | number | undefined;\n strokeDashoffset?: string | number | undefined;\n strokeLinecap?: \"butt\" | \"round\" | \"square\" | \"inherit\" | undefined;\n strokeLinejoin?: \"miter\" | \"round\" | \"bevel\" | \"inherit\" | undefined;\n strokeMiterlimit?: number | string | undefined;\n strokeOpacity?: number | string | undefined;\n strokeWidth?: number | string | undefined;\n surfaceScale?: number | string | undefined;\n systemLanguage?: number | string | undefined;\n tableValues?: number | string | undefined;\n targetX?: number | string | undefined;\n targetY?: number | string | undefined;\n textAnchor?: \"start\" | \"middle\" | \"end\" | \"inherit\" | undefined;\n textDecoration?: number | string | undefined;\n textLength?: number | string | undefined;\n textRendering?: number | string | undefined;\n to?: number | string | undefined;\n transform?: string | undefined;\n u1?: number | string | undefined;\n u2?: number | string | undefined;\n underlinePosition?: number | string | undefined;\n underlineThickness?: number | string | undefined;\n unicode?: number | string | undefined;\n unicodeBidi?: number | string | undefined;\n unicodeRange?: number | string | undefined;\n unitsPerEm?: number | string | undefined;\n vAlphabetic?: number | string | undefined;\n values?: string | undefined;\n vectorEffect?: number | string | undefined;\n version?: string | undefined;\n vertAdvY?: number | string | undefined;\n vertOriginX?: number | string | undefined;\n vertOriginY?: number | string | undefined;\n vHanging?: number | string | undefined;\n vIdeographic?: number | string | undefined;\n viewBox?: string | undefined;\n viewTarget?: number | string | undefined;\n visibility?: number | string | undefined;\n vMathematical?: number | string | undefined;\n widths?: number | string | undefined;\n wordSpacing?: number | string | undefined;\n writingMode?: number | string | undefined;\n x1?: number | string | undefined;\n x2?: number | string | undefined;\n x?: number | string | undefined;\n xChannelSelector?: string | undefined;\n xHeight?: number | string | undefined;\n xlinkActuate?: string | undefined;\n xlinkArcrole?: string | undefined;\n xlinkHref?: string | undefined;\n xlinkRole?: string | undefined;\n xlinkShow?: string | undefined;\n xlinkTitle?: string | undefined;\n xlinkType?: string | undefined;\n xmlBase?: string | undefined;\n xmlLang?: string | undefined;\n xmlns?: string | undefined;\n xmlnsXlink?: string | undefined;\n xmlSpace?: string | undefined;\n y1?: number | string | undefined;\n y2?: number | string | undefined;\n y?: number | string | undefined;\n yChannelSelector?: string | undefined;\n z?: number | string | undefined;\n zoomAndPan?: string | undefined;\n}\n\n\ntype SVGProps<T extends SVGElement> = Thunked<SVGAttributesBase<T>>\n\n/** the elements jmc knows. JSX reads them through jsx.JSX.IntrinsicElements, see h.ts */\nexport interface JmcIntrinsicElements extends IntrinsicElementAttributes {\n label: LabelHTMLAttributes & {\n for?: string\n }\n\n svg: SVGProps<SVGSVGElement> & { xmlns: \"http://www.w3.org/2000/svg\" }\n path: SVGProps<SVGPathElement>\n textPath: SVGProps<SVGTextPathElement>\n tspan: SVGProps<SVGTSpanElement>\n circle: SVGProps<SVGCircleElement>\n rect: SVGProps<SVGRectElement>\n line: SVGProps<SVGLineElement>\n text: SVGProps<SVGTextElement>\n g: SVGProps<SVGGElement>\n foreignObject: SVGProps<SVGForeignObjectElement>\n}\n\n/** each prop accepts its value or live(() => value) */\ntype Thunked<T> = { [K in keyof T]?: T[K] | Thunk<T[K]> }\n\nexport type HTMLAttributes = Thunked<HTMLAttributesBase>\n\nexport interface HTMLAttributesBase extends AdditionalElementAttributes {\n class?: string\n style?: string\n accesskey?: string\n contenteditable?: boolean\n contextmenu?: string\n dir?: string\n disabled?: boolean\n draggable?: boolean\n hidden?: boolean\n id?: string\n lang?: string\n spellcheck?: boolean\n tabindex?: number\n title?: string\n role?: string\n\n // clipboard events\n oncopy?: EventHandler<ClipboardEvent>\n oncut?: EventHandler<ClipboardEvent>\n onpaste?: EventHandler<ClipboardEvent>\n\n // composition events\n oncompositionend?: EventHandler<CompositionEvent>\n oncompositionstart?: EventHandler<CompositionEvent>\n oncompositionupdate?: EventHandler<CompositionEvent>\n\n // drag drop events\n ondrag?: EventHandler<DragEvent>\n ondragend?: EventHandler<DragEvent>\n ondragenter?: EventHandler<DragEvent>\n ondragexit?: EventHandler<DragEvent>\n ondragleave?: EventHandler<DragEvent>\n ondragover?: EventHandler<DragEvent>\n ondragstart?: EventHandler<DragEvent>\n ondrop?: EventHandler<DragEvent>\n\n // focus events\n onfocus?: (ev: FocusEvent) => void\n onfocusout?: (ev: FocusEvent) => void\n onblur?: (ev: FocusEvent) => void\n\n // form events\n onchange?: EventHandler<Event>\n oninput?: EventHandler<Event>\n onreset?: EventHandler<Event>\n onsubmit?: EventHandler<Event>\n oninvalid?: EventHandler<Event>\n\n // image events\n onload?: EventHandler<Event>\n onerror?: EventHandler<Event>\n\n // keyboard events\n onkeydown?: EventHandler<KeyboardEvent>\n onkeypress?: EventHandler<KeyboardEvent>\n onkeyup?: EventHandler<KeyboardEvent>\n\n // mouse events\n onclick?: EventHandler<MouseEvent>\n oncontextmenu?: EventHandler<MouseEvent>\n ondblclick?: EventHandler<MouseEvent>\n onmousedown?: EventHandler<MouseEvent>\n onmouseenter?: EventHandler<MouseEvent>\n onmouseleave?: EventHandler<MouseEvent>\n onmousemove?: EventHandler<MouseEvent>\n onmouseout?: EventHandler<MouseEvent>\n onmouseover?: EventHandler<MouseEvent>\n onmouseup?: EventHandler<MouseEvent>\n\n // media events\n onabort?: EventHandler<Event>\n oncanplay?: EventHandler<Event>\n oncanplaythrough?: EventHandler<Event>\n ondurationchange?: EventHandler<Event>\n onemptied?: EventHandler<Event>\n onencrypted?: EventHandler<Event>\n onended?: EventHandler<Event>\n onloadeddata?: EventHandler<Event>\n onloadedmetadata?: EventHandler<Event>\n onloadstart?: EventHandler<Event>\n onpause?: EventHandler<Event>\n onplay?: EventHandler<Event>\n onplaying?: EventHandler<Event>\n onprogress?: EventHandler<Event>\n onratechange?: EventHandler<Event>\n onseeked?: EventHandler<Event>\n onseeking?: EventHandler<Event>\n onstalled?: EventHandler<Event>\n onsuspend?: EventHandler<Event>\n ontimeupdate?: EventHandler<Event>\n onvolumechange?: EventHandler<Event>\n onwaiting?: EventHandler<Event>\n\n // selection events\n onselect?: EventHandler<Event>\n\n // UI events\n onscroll?: EventHandler<UIEvent>\n\n // touch events\n ontouchcancel?: EventHandler<TouchEvent>\n ontouchend?: EventHandler<TouchEvent>\n ontouchmove?: EventHandler<TouchEvent>\n ontouchstart?: EventHandler<TouchEvent>\n\n // wheel events\n onwheel?: EventHandler<WheelEvent>\n\n // animation events\n onanimationstart?: EventHandler<AnimationEvent>\n onanimationend?: EventHandler<AnimationEvent>\n onanimationiteration?: EventHandler<AnimationEvent>\n\n // transition events\n ontransitionend?: EventHandler<TransitionEvent>\n ontransitionstart?: EventHandler<TransitionEvent>\n}\n\nexport interface AnchorHTMLAttributes extends HTMLAttributes {\n download?: any\n href?: string\n hreflang?: string\n media?: string\n rel?: string\n target?: string\n}\n\nexport interface AreaHTMLAttributes extends HTMLAttributes {\n alt?: string\n coord?: string\n download?: any\n href?: string\n hreflang?: string\n media?: string\n rel?: string\n shape?: string\n target?: string\n}\n\nexport interface AudioHTMLAttributes extends MediaHTMLAttributes { }\n\nexport interface BaseHTMLAttributes extends HTMLAttributes {\n href?: string\n target?: string\n}\n\nexport interface BlockquoteHTMLAttributes extends HTMLAttributes {\n cite?: string\n}\n\nexport interface ButtonHTMLAttributes extends HTMLAttributes {\n autofocus?: boolean\n disabled?: boolean\n form?: string\n formaction?: string\n formenctype?: string\n formmethod?: string\n formnovalidate?: boolean\n formtarget?: string\n name?: string\n type?: string\n value?: string | string[] | number\n}\n\nexport interface CanvasHTMLAttributes extends HTMLAttributes {\n height?: number | string\n width?: number | string\n}\n\nexport interface ColHTMLAttributes extends HTMLAttributes {\n span?: number\n}\n\nexport interface ColgroupHTMLAttributes extends ColHTMLAttributes { }\n\nexport interface DetailsHTMLAttributes extends HTMLAttributes {\n open?: boolean\n}\n\nexport interface DelHTMLAttributes extends HTMLAttributes {\n cite?: string\n datetime?: string\n}\n\nexport interface EmbedHTMLAttributes extends HTMLAttributes {\n height?: number | string\n src?: string\n type?: string\n width?: number | string\n}\n\nexport interface FieldsetHTMLAttributes extends HTMLAttributes {\n disabled?: boolean\n form?: string\n name?: string\n}\n\nexport interface FormHTMLAttributes extends HTMLAttributes {\n acceptcharset?: string\n action?: string\n autocomplete?: string\n enctype?: string\n method?: string\n name?: string\n novalidate?: boolean\n target?: string\n}\n\nexport interface HtmlHTMLAttributes extends HTMLAttributes {\n manifest?: string\n}\n\nexport interface IframeHTMLAttributes extends HTMLAttributes {\n allowfullscreen?: boolean\n allowtransparency?: boolean\n frameborder?: number | string\n height?: number | string\n marginheight?: number\n marginwidth?: number\n name?: string\n sandbox?: string\n scrolling?: string\n seamless?: boolean\n src?: string\n srcdoc?: string\n width?: number | string\n}\n\nexport interface ImgHTMLAttributes extends HTMLAttributes {\n alt?: string\n height?: number | string\n sizes?: string\n src?: string\n srcset?: string\n usemap?: string\n width?: number | string\n}\n\nexport interface InsHTMLAttributes extends HTMLAttributes {\n cite?: string\n datetime?: string\n}\n\nexport interface InputHTMLAttributes extends HTMLAttributes {\n accept?: string\n alt?: string\n autocomplete?: string\n autofocus?: boolean\n capture?: boolean // https://www.w3.org/tr/html-media-capture/#the-capture-attribute\n checked?: boolean\n crossorigin?: string\n disabled?: boolean\n form?: string\n formaction?: string\n formenctype?: string\n formmethod?: string\n formnovalidate?: boolean\n formtarget?: string\n height?: number | string\n list?: string\n max?: number | string\n maxlength?: number\n min?: number | string\n minlength?: number\n multiple?: boolean\n name?: string\n pattern?: string\n placeholder?: string\n readonly?: boolean\n required?: boolean\n size?: number\n src?: string\n step?: number | string\n type?: string\n value?: string | string[] | number\n width?: number | string\n}\n\nexport interface KeygenHTMLAttributes extends HTMLAttributes {\n autofocus?: boolean\n challenge?: string\n disabled?: boolean\n form?: string\n keytype?: string\n keyparams?: string\n name?: string\n}\n\nexport interface LabelHTMLAttributes extends HTMLAttributes {\n form?: string\n for?: string\n}\n\nexport interface LiHTMLAttributes extends HTMLAttributes {\n value?: string | string[] | number\n}\n\nexport interface LinkHTMLAttributes extends HTMLAttributes {\n href?: string\n hreflang?: string\n integrity?: string\n media?: string\n rel?: string\n sizes?: string\n type?: string\n}\n\nexport interface MapHTMLAttributes extends HTMLAttributes {\n name?: string\n}\n\nexport interface MenuHTMLAttributes extends HTMLAttributes {\n type?: string\n}\n\nexport interface MediaHTMLAttributes extends HTMLAttributes {\n autoplay?: boolean\n controls?: boolean\n crossorigin?: string\n loop?: boolean\n mediagroup?: string\n muted?: boolean\n preload?: string\n src?: string\n}\n\nexport interface MetaHTMLAttributes extends HTMLAttributes {\n charset?: string\n content?: string\n httpequiv?: string\n name?: string\n}\n\nexport interface MeterHTMLAttributes extends HTMLAttributes {\n form?: string\n high?: number\n low?: number\n max?: number | string\n min?: number | string\n optimum?: number\n value?: string | string[] | number\n}\n\nexport interface QuoteHTMLAttributes extends HTMLAttributes {\n cite?: string\n}\n\nexport interface ObjectHTMLAttributes extends HTMLAttributes {\n classid?: string\n data?: string\n form?: string\n height?: number | string\n name?: string\n type?: string\n usemap?: string\n width?: number | string\n wmode?: string\n}\n\nexport interface OlHTMLAttributes extends HTMLAttributes {\n reversed?: boolean\n start?: number\n}\n\nexport interface OptgroupHTMLAttributes extends HTMLAttributes {\n disabled?: boolean\n label?: string\n}\n\nexport interface OptionHTMLAttributes extends HTMLAttributes {\n disabled?: boolean\n label?: string\n selected?: boolean\n value?: string | string[] | number\n}\n\nexport interface OutputHTMLAttributes extends HTMLAttributes {\n form?: string\n htmlfor?: string\n name?: string\n}\n\nexport interface ParamHTMLAttributes extends HTMLAttributes {\n name?: string\n value?: string | string[] | number\n}\n\nexport interface ProgressHTMLAttributes extends HTMLAttributes {\n max?: number | string\n value?: string | string[] | number\n}\n\nexport interface ScriptHTMLAttributes extends HTMLAttributes {\n async?: boolean\n charset?: string\n crossorigin?: string\n defer?: boolean\n integrity?: string\n nonce?: string\n src?: string\n type?: string\n}\n\nexport interface SelectHTMLAttributes extends HTMLAttributes {\n autofocus?: boolean\n disabled?: boolean\n form?: string\n multiple?: boolean\n name?: string\n required?: boolean\n size?: number\n value?: string | string[] | number\n}\n\nexport interface SourceHTMLAttributes extends HTMLAttributes {\n media?: string\n sizes?: string\n src?: string\n srcset?: string\n type?: string\n}\n\nexport interface StyleHTMLAttributes extends HTMLAttributes {\n media?: string\n nonce?: string\n scoped?: boolean\n type?: string\n}\n\nexport interface TableHTMLAttributes extends HTMLAttributes {\n cellpadding?: number | string\n cellspacing?: number | string\n summary?: string\n}\n\nexport interface TextareaHTMLAttributes extends HTMLAttributes {\n autocomplete?: string\n autofocus?: boolean\n cols?: number\n dirname?: string\n disabled?: boolean\n form?: string\n maxlength?: number\n minlength?: number\n name?: string\n placeholder?: string\n readonly?: boolean\n required?: boolean\n rows?: number\n value?: string | string[] | number\n wrap?: string\n}\n\nexport interface TdHTMLAttributes extends HTMLAttributes {\n colspan?: number\n headers?: string\n rowspan?: number\n}\n\nexport interface ThHTMLAttributes extends HTMLAttributes {\n colspan?: number\n headers?: string\n rowspan?: number\n scope?: string\n}\n\nexport interface TimeHTMLAttributes extends HTMLAttributes {\n datetime?: string\n}\n\nexport interface TrackHTMLAttributes extends HTMLAttributes {\n default?: boolean\n kind?: string\n label?: string\n src?: string\n srclang?: string\n}\n\nexport interface VideoHTMLAttributes extends MediaHTMLAttributes {\n height?: number | string\n playsinline?: boolean\n poster?: string\n width?: number | string\n}\n\nexport interface AllHTMLAttributes extends HTMLAttributes {\n accept?: string\n acceptcharset?: string\n action?: boolean\n allowfullscreen?: boolean\n allowtransparency?: boolean\n alt?: string\n async?: boolean\n autocomplete?: string\n autofocus?: boolean\n autoplay?: boolean\n capture?: boolean // https://www.w3.org/tr/html-media-capture/#the-capture-attribute\n cellpadding?: number | string\n cellspacing?: number | string\n challenge?: string\n charset?: string\n checked?: boolean\n cite?: string\n classid?: string\n cols?: number\n colspan?: number\n content?: string\n controls?: boolean\n coord?: string\n crossorigin?: string\n data?: string\n datetime?: string\n default?: boolean\n defer?: boolean\n dirname?: string\n disabled?: boolean\n download?: any\n enctype?: string\n form?: string\n formaction?: string\n formenctype?: string\n formmethod?: string\n formnovalidate?: boolean\n formtarget?: string\n frameborder?: number | string\n headers?: string\n height?: number | string\n high?: number\n href?: string\n hreflang?: string\n htmlfor?: string\n httpequiv?: string\n integrity?: string\n keyparams?: string\n keytype?: string\n kind?: string\n label?: string\n list?: string\n loop?: boolean\n low?: number\n manifest?: string\n marginheight?: number\n marginwidth?: number\n max?: number | string\n maxlength?: number\n media?: string\n mediagroup?: string\n method?: string\n min?: number | string\n minlength?: number\n multiple?: boolean\n muted?: boolean\n name?: string\n nonce?: string\n novalidate?: boolean\n open?: boolean\n optimum?: number\n pattern?: string\n placeholder?: string\n playsinline?: boolean\n poster?: string\n preload?: string\n readonly?: boolean\n rel?: string\n required?: boolean\n reversed?: boolean\n rows?: number\n rowspan?: number\n sandbox?: string\n scope?: string\n scoped?: boolean\n scrolling?: string\n seamless?: boolean\n selected?: boolean\n shape?: string\n size?: number\n sizes?: string\n span?: number\n src?: string\n srcdoc?: string\n srclang?: string\n srcset?: string\n start?: number\n step?: number | string\n summary?: string\n target?: string\n type?: string\n usemap?: string\n value?: string | string[] | number\n width?: number | string\n wmode?: string\n wrap?: string\n}\n\nexport interface IntrinsicElementAttributes {\n a: AnchorHTMLAttributes\n abbr: HTMLAttributes\n address: HTMLAttributes\n area: AreaHTMLAttributes\n article: HTMLAttributes\n aside: HTMLAttributes\n audio: AudioHTMLAttributes\n b: HTMLAttributes\n base: BaseHTMLAttributes\n bdi: HTMLAttributes\n bdo: HTMLAttributes\n big: HTMLAttributes\n blockquote: BlockquoteHTMLAttributes\n body: HTMLAttributes\n br: HTMLAttributes\n button: ButtonHTMLAttributes\n canvas: CanvasHTMLAttributes\n caption: HTMLAttributes\n cite: HTMLAttributes\n code: HTMLAttributes\n col: ColHTMLAttributes\n colgroup: ColgroupHTMLAttributes\n data: HTMLAttributes\n datalist: HTMLAttributes\n dd: HTMLAttributes\n del: DelHTMLAttributes\n details: DetailsHTMLAttributes\n dfn: HTMLAttributes\n dialog: HTMLAttributes\n div: HTMLAttributes\n dl: HTMLAttributes\n dt: HTMLAttributes\n em: HTMLAttributes\n embed: EmbedHTMLAttributes\n fieldset: FieldsetHTMLAttributes\n figcaption: HTMLAttributes\n figure: HTMLAttributes\n footer: HTMLAttributes\n form: FormHTMLAttributes\n h1: HTMLAttributes\n h2: HTMLAttributes\n h3: HTMLAttributes\n h4: HTMLAttributes\n h5: HTMLAttributes\n h6: HTMLAttributes\n head: HTMLAttributes\n header: HTMLAttributes\n hgroup: HTMLAttributes\n hr: HTMLAttributes\n html: HtmlHTMLAttributes\n i: HTMLAttributes\n iframe: IframeHTMLAttributes\n img: ImgHTMLAttributes\n input: InputHTMLAttributes\n ins: InsHTMLAttributes\n kbd: HTMLAttributes\n keygen: KeygenHTMLAttributes\n label: LabelHTMLAttributes\n legend: HTMLAttributes\n li: LiHTMLAttributes\n link: LinkHTMLAttributes\n main: HTMLAttributes\n map: MapHTMLAttributes\n mark: HTMLAttributes\n menu: MenuHTMLAttributes\n menuitem: HTMLAttributes\n meta: MetaHTMLAttributes\n meter: MeterHTMLAttributes\n nav: HTMLAttributes\n noscript: HTMLAttributes\n object: ObjectHTMLAttributes\n ol: OlHTMLAttributes\n optgroup: OptgroupHTMLAttributes\n option: OptionHTMLAttributes\n output: OutputHTMLAttributes\n p: HTMLAttributes\n param: ParamHTMLAttributes\n picture: HTMLAttributes\n pre: HTMLAttributes\n progress: ProgressHTMLAttributes\n q: QuoteHTMLAttributes\n rp: HTMLAttributes\n rt: HTMLAttributes\n ruby: HTMLAttributes\n s: HTMLAttributes\n samp: HTMLAttributes\n script: ScriptHTMLAttributes\n section: HTMLAttributes\n select: SelectHTMLAttributes\n small: HTMLAttributes\n source: SourceHTMLAttributes\n span: HTMLAttributes\n strong: HTMLAttributes\n style: StyleHTMLAttributes\n sub: HTMLAttributes\n summary: HTMLAttributes\n sup: HTMLAttributes\n table: TableHTMLAttributes\n tbody: HTMLAttributes\n td: TdHTMLAttributes\n textarea: TextareaHTMLAttributes\n tfoot: HTMLAttributes\n th: ThHTMLAttributes\n thead: HTMLAttributes\n time: TimeHTMLAttributes\n title: HTMLAttributes\n tr: HTMLAttributes\n track: TrackHTMLAttributes\n u: HTMLAttributes\n ul: HTMLAttributes\n var: HTMLAttributes\n video: VideoHTMLAttributes\n wbr: HTMLAttributes\n}\n"]}
|
|
1
|
+
{"version":3,"file":"jsx.js","sourceRoot":"","sources":["../src/jsx.ts"],"names":[],"mappings":"","sourcesContent":["import type { Thunk } from './base.js'\n/* eslint-disable @typescript-eslint/no-empty-interface */\n/* eslint-disable @typescript-eslint/ban-types */\n// This code is based on react definition in DefinitelyTyped published under the MIT license.\n// Repository: https://github.com/DefinitelyTyped/DefinitelyTyped\n// Path in the repository: types/react/v15/index.d.ts\n//\n// Copyrights of original definition are:\n// Asana <https://asana.com>\n// AssureSign <http://www.assuresign.com>\n// Microsoft <https://microsoft.com>\n// John Reilly <https://github.com/johnnyreilly/>\n// Benoit Benezech <https://github.com/bbenezech>\n// Patricio Zavolinsky <https://github.com/pzavolinsky>\n// Digiguru <https://github.com/digiguru>\n// Eric Anderson <https://github.com/ericanderson>\n// Albert Kurniawan <https://github.com/morcerf>\n// Tanguy Krotoff <https://github.com/tkrotoff>\n// Dovydas Navickas <https://github.com/DovydasNavickas>\n// Stéphane Goetz <https://github.com/onigoetz>\n\ninterface EventHandler<E extends Event> {\n (event: E): void\n}\n\nexport interface AdditionalElementAttributes {\n mounted?: (n: Node) => void\n update?: (n: Node, uc: any) => void\n const?: boolean\n model?: any\n}\n\n/**\n * Used to represent DOM API's where users can either pass\n * true or false as a boolean or as its equivalent strings.\n */\ntype Booleanish = boolean | \"true\" | \"false\";\n\n/**\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin MDN}\n */\ntype CrossOrigin = \"anonymous\" | \"use-credentials\" | \"\" | undefined;\n\n// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/\ninterface AriaAttributes {\n /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */\n \"aria-activedescendant\"?: string | undefined;\n /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */\n \"aria-atomic\"?: Booleanish | undefined;\n /**\n * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\n * presented if they are made.\n */\n \"aria-autocomplete\"?: \"none\" | \"inline\" | \"list\" | \"both\" | undefined;\n /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */\n /**\n * Defines a string value that labels the current element, which is intended to be converted into Braille.\n * @see aria-label.\n */\n \"aria-braillelabel\"?: string | undefined;\n /**\n * Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n * @see aria-roledescription.\n */\n \"aria-brailleroledescription\"?: string | undefined;\n \"aria-busy\"?: Booleanish | undefined;\n /**\n * Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n * @see aria-pressed @see aria-selected.\n */\n \"aria-checked\"?: boolean | \"false\" | \"mixed\" | \"true\" | undefined;\n /**\n * Defines the total number of columns in a table, grid, or treegrid.\n * @see aria-colindex.\n */\n \"aria-colcount\"?: number | undefined;\n /**\n * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n * @see aria-colcount @see aria-colspan.\n */\n \"aria-colindex\"?: number | undefined;\n /**\n * Defines a human readable text alternative of aria-colindex.\n * @see aria-rowindextext.\n */\n \"aria-colindextext\"?: string | undefined;\n /**\n * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n * @see aria-colindex @see aria-rowspan.\n */\n \"aria-colspan\"?: number | undefined;\n /**\n * Identifies the element (or elements) whose contents or presence are controlled by the current element.\n * @see aria-owns.\n */\n \"aria-controls\"?: string | undefined;\n /** Indicates the element that represents the current item within a container or set of related elements. */\n \"aria-current\"?: boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\" | undefined;\n /**\n * Identifies the element (or elements) that describes the object.\n * @see aria-labelledby\n */\n \"aria-describedby\"?: string | undefined;\n /**\n * Defines a string value that describes or annotates the current element.\n * @see related aria-describedby.\n */\n \"aria-description\"?: string | undefined;\n /**\n * Identifies the element that provides a detailed, extended description for the object.\n * @see aria-describedby.\n */\n \"aria-details\"?: string | undefined;\n /**\n * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n * @see aria-hidden @see aria-readonly.\n */\n \"aria-disabled\"?: Booleanish | undefined;\n /**\n * Indicates what functions can be performed when a dragged object is released on the drop target.\n * @deprecated in ARIA 1.1\n */\n \"aria-dropeffect\"?: \"none\" | \"copy\" | \"execute\" | \"link\" | \"move\" | \"popup\" | undefined;\n /**\n * Identifies the element that provides an error message for the object.\n * @see aria-invalid @see aria-describedby.\n */\n \"aria-errormessage\"?: string | undefined;\n /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */\n \"aria-expanded\"?: Booleanish | undefined;\n /**\n * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\n * allows assistive technology to override the general default of reading in document source order.\n */\n \"aria-flowto\"?: string | undefined;\n /**\n * Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n * @deprecated in ARIA 1.1\n */\n \"aria-grabbed\"?: Booleanish | undefined;\n /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */\n \"aria-haspopup\"?: boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\" | undefined;\n /**\n * Indicates whether the element is exposed to an accessibility API.\n * @see aria-disabled.\n */\n \"aria-hidden\"?: Booleanish | undefined;\n /**\n * Indicates the entered value does not conform to the format expected by the application.\n * @see aria-errormessage.\n */\n \"aria-invalid\"?: boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\" | undefined;\n /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */\n \"aria-keyshortcuts\"?: string | undefined;\n /**\n * Defines a string value that labels the current element.\n * @see aria-labelledby.\n */\n \"aria-label\"?: string | undefined;\n /**\n * Identifies the element (or elements) that labels the current element.\n * @see aria-describedby.\n */\n \"aria-labelledby\"?: string | undefined;\n /** Defines the hierarchical level of an element within a structure. */\n \"aria-level\"?: number | undefined;\n /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */\n \"aria-live\"?: \"off\" | \"assertive\" | \"polite\" | undefined;\n /** Indicates whether an element is modal when displayed. */\n \"aria-modal\"?: Booleanish | undefined;\n /** Indicates whether a text box accepts multiple lines of input or only a single line. */\n \"aria-multiline\"?: Booleanish | undefined;\n /** Indicates that the user may select more than one item from the current selectable descendants. */\n \"aria-multiselectable\"?: Booleanish | undefined;\n /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */\n \"aria-orientation\"?: \"horizontal\" | \"vertical\" | undefined;\n /**\n * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\n * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n * @see aria-controls.\n */\n \"aria-owns\"?: string | undefined;\n /**\n * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\n * A hint could be a sample value or a brief description of the expected format.\n */\n \"aria-placeholder\"?: string | undefined;\n /**\n * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n * @see aria-setsize.\n */\n \"aria-posinset\"?: number | undefined;\n /**\n * Indicates the current \"pressed\" state of toggle buttons.\n * @see aria-checked @see aria-selected.\n */\n \"aria-pressed\"?: boolean | \"false\" | \"mixed\" | \"true\" | undefined;\n /**\n * Indicates that the element is not editable, but is otherwise operable.\n * @see aria-disabled.\n */\n \"aria-readonly\"?: Booleanish | undefined;\n /**\n * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n * @see aria-atomic.\n */\n \"aria-relevant\"?:\n | \"additions\"\n | \"additions removals\"\n | \"additions text\"\n | \"all\"\n | \"removals\"\n | \"removals additions\"\n | \"removals text\"\n | \"text\"\n | \"text additions\"\n | \"text removals\"\n | undefined;\n /** Indicates that user input is required on the element before a form may be submitted. */\n \"aria-required\"?: Booleanish | undefined;\n /** Defines a human-readable, author-localized description for the role of an element. */\n \"aria-roledescription\"?: string | undefined;\n /**\n * Defines the total number of rows in a table, grid, or treegrid.\n * @see aria-rowindex.\n */\n \"aria-rowcount\"?: number | undefined;\n /**\n * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n * @see aria-rowcount @see aria-rowspan.\n */\n \"aria-rowindex\"?: number | undefined;\n /**\n * Defines a human readable text alternative of aria-rowindex.\n * @see aria-colindextext.\n */\n \"aria-rowindextext\"?: string | undefined;\n /**\n * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n * @see aria-rowindex @see aria-colspan.\n */\n \"aria-rowspan\"?: number | undefined;\n /**\n * Indicates the current \"selected\" state of various widgets.\n * @see aria-checked @see aria-pressed.\n */\n \"aria-selected\"?: Booleanish | undefined;\n /**\n * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n * @see aria-posinset.\n */\n \"aria-setsize\"?: number | undefined;\n /** Indicates if items in a table or grid are sorted in ascending or descending order. */\n \"aria-sort\"?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined;\n /** Defines the maximum allowed value for a range widget. */\n \"aria-valuemax\"?: number | undefined;\n /** Defines the minimum allowed value for a range widget. */\n \"aria-valuemin\"?: number | undefined;\n /**\n * Defines the current value for a range widget.\n * @see aria-valuetext.\n */\n \"aria-valuenow\"?: number | undefined;\n /** Defines the human readable text alternative of aria-valuenow for a range widget. */\n \"aria-valuetext\"?: string | undefined;\n}\n\n// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions\ntype AriaRole =\n | \"alert\"\n | \"alertdialog\"\n | \"application\"\n | \"article\"\n | \"banner\"\n | \"button\"\n | \"cell\"\n | \"checkbox\"\n | \"columnheader\"\n | \"combobox\"\n | \"complementary\"\n | \"contentinfo\"\n | \"definition\"\n | \"dialog\"\n | \"directory\"\n | \"document\"\n | \"feed\"\n | \"figure\"\n | \"form\"\n | \"grid\"\n | \"gridcell\"\n | \"group\"\n | \"heading\"\n | \"img\"\n | \"link\"\n | \"list\"\n | \"listbox\"\n | \"listitem\"\n | \"log\"\n | \"main\"\n | \"marquee\"\n | \"math\"\n | \"menu\"\n | \"menubar\"\n | \"menuitem\"\n | \"menuitemcheckbox\"\n | \"menuitemradio\"\n | \"navigation\"\n | \"none\"\n | \"note\"\n | \"option\"\n | \"presentation\"\n | \"progressbar\"\n | \"radio\"\n | \"radiogroup\"\n | \"region\"\n | \"row\"\n | \"rowgroup\"\n | \"rowheader\"\n | \"scrollbar\"\n | \"search\"\n | \"searchbox\"\n | \"separator\"\n | \"slider\"\n | \"spinbutton\"\n | \"status\"\n | \"switch\"\n | \"tab\"\n | \"table\"\n | \"tablist\"\n | \"tabpanel\"\n | \"term\"\n | \"textbox\"\n | \"timer\"\n | \"toolbar\"\n | \"tooltip\"\n | \"tree\"\n | \"treegrid\"\n | \"treeitem\"\n | (string & {});\n\n// this list is \"complete\" in that it contains every SVG attribute\n// that React supports, but the types can be improved.\n// Full list here: https://facebook.github.io/react/docs/dom-elements.html\n//\n// The three broad type categories are (in order of restrictiveness):\n// - \"number | string\"\n// - \"string\"\n// - union of string literals\ninterface SVGAttributesBase<T> extends AriaAttributes, HTMLAttributesBase {\n // React-specific Attributes\n suppressHydrationWarning?: boolean | undefined;\n\n // Attributes which also defined in HTMLAttributes\n // See comment in SVGDOMPropertyConfig.js\n className?: string | undefined;\n color?: string | undefined;\n height?: number | string | undefined;\n id?: string | undefined;\n lang?: string | undefined;\n max?: number | string | undefined;\n media?: string | undefined;\n method?: string | undefined;\n min?: number | string | undefined;\n name?: string | undefined;\n nonce?: string | undefined;\n part?: string | undefined;\n slot?: string | undefined;\n style?: any | undefined; // react @types has CSSProperties here \n target?: string | undefined;\n type?: string | undefined;\n width?: number | string | undefined;\n\n // Other HTML properties supported by SVG elements in browsers\n role?: AriaRole | undefined;\n tabIndex?: number | undefined;\n crossOrigin?: CrossOrigin;\n\n // SVG Specific attributes\n accentHeight?: number | string | undefined;\n accumulate?: \"none\" | \"sum\" | undefined;\n additive?: \"replace\" | \"sum\" | undefined;\n alignmentBaseline?:\n | \"auto\"\n | \"baseline\"\n | \"before-edge\"\n | \"text-before-edge\"\n | \"middle\"\n | \"central\"\n | \"after-edge\"\n | \"text-after-edge\"\n | \"ideographic\"\n | \"alphabetic\"\n | \"hanging\"\n | \"mathematical\"\n | \"inherit\"\n | undefined;\n allowReorder?: \"no\" | \"yes\" | undefined;\n alphabetic?: number | string | undefined;\n amplitude?: number | string | undefined;\n arabicForm?: \"initial\" | \"medial\" | \"terminal\" | \"isolated\" | undefined;\n ascent?: number | string | undefined;\n attributeName?: string | undefined;\n attributeType?: string | undefined;\n autoReverse?: Booleanish | undefined;\n azimuth?: number | string | undefined;\n baseFrequency?: number | string | undefined;\n baselineShift?: number | string | undefined;\n baseProfile?: number | string | undefined;\n bbox?: number | string | undefined;\n begin?: number | string | undefined;\n bias?: number | string | undefined;\n by?: number | string | undefined;\n calcMode?: number | string | undefined;\n capHeight?: number | string | undefined;\n clip?: number | string | undefined;\n clipPath?: string | undefined;\n clipPathUnits?: number | string | undefined;\n clipRule?: number | string | undefined;\n colorInterpolation?: number | string | undefined;\n colorInterpolationFilters?: \"auto\" | \"sRGB\" | \"linearRGB\" | \"inherit\" | undefined;\n colorProfile?: number | string | undefined;\n colorRendering?: number | string | undefined;\n contentScriptType?: number | string | undefined;\n contentStyleType?: number | string | undefined;\n cursor?: number | string | undefined;\n cx?: number | string | undefined;\n cy?: number | string | undefined;\n d?: string | undefined;\n decelerate?: number | string | undefined;\n descent?: number | string | undefined;\n diffuseConstant?: number | string | undefined;\n direction?: number | string | undefined;\n display?: number | string | undefined;\n divisor?: number | string | undefined;\n dominantBaseline?:\n | \"auto\"\n | \"use-script\"\n | \"no-change\"\n | \"reset-size\"\n | \"ideographic\"\n | \"alphabetic\"\n | \"hanging\"\n | \"mathematical\"\n | \"central\"\n | \"middle\"\n | \"text-after-edge\"\n | \"text-before-edge\"\n | \"inherit\"\n | undefined;\n dur?: number | string | undefined;\n dx?: number | string | undefined;\n dy?: number | string | undefined;\n edgeMode?: number | string | undefined;\n elevation?: number | string | undefined;\n enableBackground?: number | string | undefined;\n end?: number | string | undefined;\n exponent?: number | string | undefined;\n externalResourcesRequired?: Booleanish | undefined;\n fill?: string | undefined;\n fillOpacity?: number | string | undefined;\n fillRule?: \"nonzero\" | \"evenodd\" | \"inherit\" | undefined;\n filter?: string | undefined;\n filterRes?: number | string | undefined;\n filterUnits?: number | string | undefined;\n floodColor?: number | string | undefined;\n floodOpacity?: number | string | undefined;\n focusable?: Booleanish | \"auto\" | undefined;\n fontFamily?: string | undefined;\n fontSize?: number | string | undefined;\n fontSizeAdjust?: number | string | undefined;\n fontStretch?: number | string | undefined;\n fontStyle?: number | string | undefined;\n fontVariant?: number | string | undefined;\n fontWeight?: number | string | undefined;\n format?: number | string | undefined;\n fr?: number | string | undefined;\n from?: number | string | undefined;\n fx?: number | string | undefined;\n fy?: number | string | undefined;\n g1?: number | string | undefined;\n g2?: number | string | undefined;\n glyphName?: number | string | undefined;\n glyphOrientationHorizontal?: number | string | undefined;\n glyphOrientationVertical?: number | string | undefined;\n glyphRef?: number | string | undefined;\n gradientTransform?: string | undefined;\n gradientUnits?: string | undefined;\n hanging?: number | string | undefined;\n horizAdvX?: number | string | undefined;\n horizOriginX?: number | string | undefined;\n href?: string | undefined;\n ideographic?: number | string | undefined;\n imageRendering?: number | string | undefined;\n in2?: number | string | undefined;\n in?: string | undefined;\n intercept?: number | string | undefined;\n k1?: number | string | undefined;\n k2?: number | string | undefined;\n k3?: number | string | undefined;\n k4?: number | string | undefined;\n k?: number | string | undefined;\n kernelMatrix?: number | string | undefined;\n kernelUnitLength?: number | string | undefined;\n kerning?: number | string | undefined;\n keyPoints?: number | string | undefined;\n keySplines?: number | string | undefined;\n keyTimes?: number | string | undefined;\n lengthAdjust?: number | string | undefined;\n letterSpacing?: number | string | undefined;\n lightingColor?: number | string | undefined;\n limitingConeAngle?: number | string | undefined;\n local?: number | string | undefined;\n markerEnd?: string | undefined;\n markerHeight?: number | string | undefined;\n markerMid?: string | undefined;\n markerStart?: string | undefined;\n markerUnits?: number | string | undefined;\n markerWidth?: number | string | undefined;\n mask?: string | undefined;\n maskContentUnits?: number | string | undefined;\n maskUnits?: number | string | undefined;\n mathematical?: number | string | undefined;\n mode?: number | string | undefined;\n numOctaves?: number | string | undefined;\n offset?: number | string | undefined;\n opacity?: number | string | undefined;\n operator?: number | string | undefined;\n order?: number | string | undefined;\n orient?: number | string | undefined;\n orientation?: number | string | undefined;\n origin?: number | string | undefined;\n overflow?: number | string | undefined;\n overlinePosition?: number | string | undefined;\n overlineThickness?: number | string | undefined;\n paintOrder?: number | string | undefined;\n panose1?: number | string | undefined;\n path?: string | undefined;\n pathLength?: number | string | undefined;\n patternContentUnits?: string | undefined;\n patternTransform?: number | string | undefined;\n patternUnits?: string | undefined;\n pointerEvents?: number | string | undefined;\n points?: string | undefined;\n pointsAtX?: number | string | undefined;\n pointsAtY?: number | string | undefined;\n pointsAtZ?: number | string | undefined;\n preserveAlpha?: Booleanish | undefined;\n preserveAspectRatio?: string | undefined;\n primitiveUnits?: number | string | undefined;\n r?: number | string | undefined;\n radius?: number | string | undefined;\n refX?: number | string | undefined;\n refY?: number | string | undefined;\n renderingIntent?: number | string | undefined;\n repeatCount?: number | string | undefined;\n repeatDur?: number | string | undefined;\n requiredExtensions?: number | string | undefined;\n requiredFeatures?: number | string | undefined;\n restart?: number | string | undefined;\n result?: string | undefined;\n rotate?: number | string | undefined;\n rx?: number | string | undefined;\n ry?: number | string | undefined;\n scale?: number | string | undefined;\n seed?: number | string | undefined;\n shapeRendering?: number | string | undefined;\n slope?: number | string | undefined;\n spacing?: number | string | undefined;\n specularConstant?: number | string | undefined;\n specularExponent?: number | string | undefined;\n speed?: number | string | undefined;\n spreadMethod?: string | undefined;\n startOffset?: number | string | undefined;\n stdDeviation?: number | string | undefined;\n stemh?: number | string | undefined;\n stemv?: number | string | undefined;\n stitchTiles?: number | string | undefined;\n stopColor?: string | undefined;\n stopOpacity?: number | string | undefined;\n strikethroughPosition?: number | string | undefined;\n strikethroughThickness?: number | string | undefined;\n string?: number | string | undefined;\n stroke?: string | undefined;\n strokeDasharray?: string | number | undefined;\n strokeDashoffset?: string | number | undefined;\n strokeLinecap?: \"butt\" | \"round\" | \"square\" | \"inherit\" | undefined;\n strokeLinejoin?: \"miter\" | \"round\" | \"bevel\" | \"inherit\" | undefined;\n strokeMiterlimit?: number | string | undefined;\n strokeOpacity?: number | string | undefined;\n strokeWidth?: number | string | undefined;\n surfaceScale?: number | string | undefined;\n systemLanguage?: number | string | undefined;\n tableValues?: number | string | undefined;\n targetX?: number | string | undefined;\n targetY?: number | string | undefined;\n textAnchor?: \"start\" | \"middle\" | \"end\" | \"inherit\" | undefined;\n textDecoration?: number | string | undefined;\n textLength?: number | string | undefined;\n textRendering?: number | string | undefined;\n to?: number | string | undefined;\n transform?: string | undefined;\n u1?: number | string | undefined;\n u2?: number | string | undefined;\n underlinePosition?: number | string | undefined;\n underlineThickness?: number | string | undefined;\n unicode?: number | string | undefined;\n unicodeBidi?: number | string | undefined;\n unicodeRange?: number | string | undefined;\n unitsPerEm?: number | string | undefined;\n vAlphabetic?: number | string | undefined;\n values?: string | undefined;\n vectorEffect?: number | string | undefined;\n version?: string | undefined;\n vertAdvY?: number | string | undefined;\n vertOriginX?: number | string | undefined;\n vertOriginY?: number | string | undefined;\n vHanging?: number | string | undefined;\n vIdeographic?: number | string | undefined;\n viewBox?: string | undefined;\n viewTarget?: number | string | undefined;\n visibility?: number | string | undefined;\n vMathematical?: number | string | undefined;\n widths?: number | string | undefined;\n wordSpacing?: number | string | undefined;\n writingMode?: number | string | undefined;\n x1?: number | string | undefined;\n x2?: number | string | undefined;\n x?: number | string | undefined;\n xChannelSelector?: string | undefined;\n xHeight?: number | string | undefined;\n xlinkActuate?: string | undefined;\n xlinkArcrole?: string | undefined;\n xlinkHref?: string | undefined;\n xlinkRole?: string | undefined;\n xlinkShow?: string | undefined;\n xlinkTitle?: string | undefined;\n xlinkType?: string | undefined;\n xmlBase?: string | undefined;\n xmlLang?: string | undefined;\n xmlns?: string | undefined;\n xmlnsXlink?: string | undefined;\n xmlSpace?: string | undefined;\n y1?: number | string | undefined;\n y2?: number | string | undefined;\n y?: number | string | undefined;\n yChannelSelector?: string | undefined;\n z?: number | string | undefined;\n zoomAndPan?: string | undefined;\n}\n\n\ntype SVGProps<T extends SVGElement> = Thunked<SVGAttributesBase<T>>\n\n/** the elements jmc knows. JSX reads them through jsx.JSX.IntrinsicElements, see h.ts */\nexport interface JmcIntrinsicElements extends IntrinsicElementAttributes {\n label: LabelHTMLAttributes & {\n for?: string\n }\n\n svg: SVGProps<SVGSVGElement> & { xmlns: \"http://www.w3.org/2000/svg\" }\n path: SVGProps<SVGPathElement>\n textPath: SVGProps<SVGTextPathElement>\n tspan: SVGProps<SVGTSpanElement>\n circle: SVGProps<SVGCircleElement>\n rect: SVGProps<SVGRectElement>\n line: SVGProps<SVGLineElement>\n text: SVGProps<SVGTextElement>\n g: SVGProps<SVGGElement>\n foreignObject: SVGProps<SVGForeignObjectElement>\n}\n\n/** each prop accepts its value or live(() => value) */\ntype Thunked<T> = { [K in keyof T]?: T[K] | Thunk<T[K]> }\n\nexport type HTMLAttributes = Thunked<HTMLAttributesBase>\n\nexport interface HTMLAttributesBase extends AdditionalElementAttributes {\n class?: string\n style?: string\n accesskey?: string\n contenteditable?: boolean\n contextmenu?: string\n dir?: string\n disabled?: boolean\n draggable?: boolean\n hidden?: boolean\n id?: string\n lang?: string\n spellcheck?: boolean\n tabindex?: number\n title?: string\n role?: string\n\n // clipboard events\n oncopy?: EventHandler<ClipboardEvent>\n oncut?: EventHandler<ClipboardEvent>\n onpaste?: EventHandler<ClipboardEvent>\n\n // composition events\n oncompositionend?: EventHandler<CompositionEvent>\n oncompositionstart?: EventHandler<CompositionEvent>\n oncompositionupdate?: EventHandler<CompositionEvent>\n\n // drag drop events\n ondrag?: EventHandler<DragEvent>\n ondragend?: EventHandler<DragEvent>\n ondragenter?: EventHandler<DragEvent>\n ondragexit?: EventHandler<DragEvent>\n ondragleave?: EventHandler<DragEvent>\n ondragover?: EventHandler<DragEvent>\n ondragstart?: EventHandler<DragEvent>\n ondrop?: EventHandler<DragEvent>\n\n // focus events\n onfocus?: (ev: FocusEvent) => void\n onfocusout?: (ev: FocusEvent) => void\n onblur?: (ev: FocusEvent) => void\n\n // form events\n onchange?: EventHandler<Event>\n oninput?: EventHandler<Event>\n onreset?: EventHandler<Event>\n onsubmit?: EventHandler<Event>\n oninvalid?: EventHandler<Event>\n\n // image events\n onload?: EventHandler<Event>\n onerror?: EventHandler<Event>\n\n // keyboard events\n onkeydown?: EventHandler<KeyboardEvent>\n onkeypress?: EventHandler<KeyboardEvent>\n onkeyup?: EventHandler<KeyboardEvent>\n\n // mouse events\n onclick?: EventHandler<MouseEvent>\n oncontextmenu?: EventHandler<MouseEvent>\n ondblclick?: EventHandler<MouseEvent>\n onmousedown?: EventHandler<MouseEvent>\n onmouseenter?: EventHandler<MouseEvent>\n onmouseleave?: EventHandler<MouseEvent>\n onmousemove?: EventHandler<MouseEvent>\n onmouseout?: EventHandler<MouseEvent>\n onmouseover?: EventHandler<MouseEvent>\n onmouseup?: EventHandler<MouseEvent>\n\n // media events\n onabort?: EventHandler<Event>\n oncanplay?: EventHandler<Event>\n oncanplaythrough?: EventHandler<Event>\n ondurationchange?: EventHandler<Event>\n onemptied?: EventHandler<Event>\n onencrypted?: EventHandler<Event>\n onended?: EventHandler<Event>\n onloadeddata?: EventHandler<Event>\n onloadedmetadata?: EventHandler<Event>\n onloadstart?: EventHandler<Event>\n onpause?: EventHandler<Event>\n onplay?: EventHandler<Event>\n onplaying?: EventHandler<Event>\n onprogress?: EventHandler<Event>\n onratechange?: EventHandler<Event>\n onseeked?: EventHandler<Event>\n onseeking?: EventHandler<Event>\n onstalled?: EventHandler<Event>\n onsuspend?: EventHandler<Event>\n ontimeupdate?: EventHandler<Event>\n onvolumechange?: EventHandler<Event>\n onwaiting?: EventHandler<Event>\n\n // selection events\n onselect?: EventHandler<Event>\n\n // UI events\n onscroll?: EventHandler<UIEvent>\n\n // touch events\n ontouchcancel?: EventHandler<TouchEvent>\n ontouchend?: EventHandler<TouchEvent>\n ontouchmove?: EventHandler<TouchEvent>\n ontouchstart?: EventHandler<TouchEvent>\n\n // wheel events\n onwheel?: EventHandler<WheelEvent>\n\n // animation events\n onanimationstart?: EventHandler<AnimationEvent>\n onanimationend?: EventHandler<AnimationEvent>\n onanimationiteration?: EventHandler<AnimationEvent>\n\n // transition events\n ontransitionend?: EventHandler<TransitionEvent>\n ontransitionstart?: EventHandler<TransitionEvent>\n}\n\nexport interface AnchorHTMLAttributes extends HTMLAttributes {\n download?: any\n href?: string\n hreflang?: string\n media?: string\n rel?: string\n target?: string\n}\n\nexport interface AreaHTMLAttributes extends HTMLAttributes {\n alt?: string\n coord?: string\n download?: any\n href?: string\n hreflang?: string\n media?: string\n rel?: string\n shape?: string\n target?: string\n}\n\nexport interface AudioHTMLAttributes extends MediaHTMLAttributes { }\n\nexport interface BaseHTMLAttributes extends HTMLAttributes {\n href?: string\n target?: string\n}\n\nexport interface BlockquoteHTMLAttributes extends HTMLAttributes {\n cite?: string\n}\n\nexport interface ButtonHTMLAttributes extends HTMLAttributes {\n autofocus?: boolean\n disabled?: boolean\n form?: string\n formaction?: string\n formenctype?: string\n formmethod?: string\n formnovalidate?: boolean\n formtarget?: string\n name?: string\n type?: string\n value?: string | string[] | number\n}\n\nexport interface CanvasHTMLAttributes extends HTMLAttributes {\n height?: number | string\n width?: number | string\n}\n\nexport interface ColHTMLAttributes extends HTMLAttributes {\n span?: number\n}\n\nexport interface ColgroupHTMLAttributes extends ColHTMLAttributes { }\n\nexport interface DetailsHTMLAttributes extends HTMLAttributes {\n open?: boolean\n}\n\nexport interface DelHTMLAttributes extends HTMLAttributes {\n cite?: string\n datetime?: string\n}\n\nexport interface EmbedHTMLAttributes extends HTMLAttributes {\n height?: number | string\n src?: string\n type?: string\n width?: number | string\n}\n\nexport interface FieldsetHTMLAttributes extends HTMLAttributes {\n disabled?: boolean\n form?: string\n name?: string\n}\n\nexport interface FormHTMLAttributes extends HTMLAttributes {\n acceptcharset?: string\n action?: string\n autocomplete?: string\n enctype?: string\n method?: string\n name?: string\n novalidate?: boolean\n target?: string\n}\n\nexport interface HtmlHTMLAttributes extends HTMLAttributes {\n manifest?: string\n}\n\nexport interface IframeHTMLAttributes extends HTMLAttributes {\n allowfullscreen?: boolean\n allowtransparency?: boolean\n frameborder?: number | string\n height?: number | string\n marginheight?: number\n marginwidth?: number\n name?: string\n sandbox?: string\n scrolling?: string\n seamless?: boolean\n src?: string\n srcdoc?: string\n width?: number | string\n}\n\nexport interface ImgHTMLAttributes extends HTMLAttributes {\n alt?: string\n height?: number | string\n sizes?: string\n src?: string\n srcset?: string\n usemap?: string\n width?: number | string\n}\n\nexport interface InsHTMLAttributes extends HTMLAttributes {\n cite?: string\n datetime?: string\n}\n\nexport interface InputHTMLAttributes extends HTMLAttributes {\n accept?: string\n alt?: string\n autocomplete?: string\n autofocus?: boolean\n capture?: boolean // https://www.w3.org/tr/html-media-capture/#the-capture-attribute\n checked?: boolean\n crossorigin?: string\n disabled?: boolean\n form?: string\n formaction?: string\n formenctype?: string\n formmethod?: string\n formnovalidate?: boolean\n formtarget?: string\n height?: number | string\n indeterminate?: boolean // a property only, there is no such attribute\n list?: string\n max?: number | string\n maxlength?: number\n min?: number | string\n minlength?: number\n multiple?: boolean\n name?: string\n pattern?: string\n placeholder?: string\n readonly?: boolean\n required?: boolean\n size?: number\n src?: string\n step?: number | string\n type?: string\n value?: string | string[] | number\n width?: number | string\n}\n\nexport interface KeygenHTMLAttributes extends HTMLAttributes {\n autofocus?: boolean\n challenge?: string\n disabled?: boolean\n form?: string\n keytype?: string\n keyparams?: string\n name?: string\n}\n\nexport interface LabelHTMLAttributes extends HTMLAttributes {\n form?: string\n for?: string\n}\n\nexport interface LiHTMLAttributes extends HTMLAttributes {\n value?: string | string[] | number\n}\n\nexport interface LinkHTMLAttributes extends HTMLAttributes {\n href?: string\n hreflang?: string\n integrity?: string\n media?: string\n rel?: string\n sizes?: string\n type?: string\n}\n\nexport interface MapHTMLAttributes extends HTMLAttributes {\n name?: string\n}\n\nexport interface MenuHTMLAttributes extends HTMLAttributes {\n type?: string\n}\n\nexport interface MediaHTMLAttributes extends HTMLAttributes {\n autoplay?: boolean\n controls?: boolean\n crossorigin?: string\n loop?: boolean\n mediagroup?: string\n muted?: boolean\n preload?: string\n src?: string\n}\n\nexport interface MetaHTMLAttributes extends HTMLAttributes {\n charset?: string\n content?: string\n httpequiv?: string\n name?: string\n}\n\nexport interface MeterHTMLAttributes extends HTMLAttributes {\n form?: string\n high?: number\n low?: number\n max?: number | string\n min?: number | string\n optimum?: number\n value?: string | string[] | number\n}\n\nexport interface QuoteHTMLAttributes extends HTMLAttributes {\n cite?: string\n}\n\nexport interface ObjectHTMLAttributes extends HTMLAttributes {\n classid?: string\n data?: string\n form?: string\n height?: number | string\n name?: string\n type?: string\n usemap?: string\n width?: number | string\n wmode?: string\n}\n\nexport interface OlHTMLAttributes extends HTMLAttributes {\n reversed?: boolean\n start?: number\n}\n\nexport interface OptgroupHTMLAttributes extends HTMLAttributes {\n disabled?: boolean\n label?: string\n}\n\nexport interface OptionHTMLAttributes extends HTMLAttributes {\n disabled?: boolean\n label?: string\n selected?: boolean\n value?: string | string[] | number\n}\n\nexport interface OutputHTMLAttributes extends HTMLAttributes {\n form?: string\n htmlfor?: string\n name?: string\n}\n\nexport interface ParamHTMLAttributes extends HTMLAttributes {\n name?: string\n value?: string | string[] | number\n}\n\nexport interface ProgressHTMLAttributes extends HTMLAttributes {\n max?: number | string\n value?: string | string[] | number\n}\n\nexport interface ScriptHTMLAttributes extends HTMLAttributes {\n async?: boolean\n charset?: string\n crossorigin?: string\n defer?: boolean\n integrity?: string\n nonce?: string\n src?: string\n type?: string\n}\n\nexport interface SelectHTMLAttributes extends HTMLAttributes {\n autofocus?: boolean\n disabled?: boolean\n form?: string\n multiple?: boolean\n name?: string\n required?: boolean\n size?: number\n value?: string | string[] | number\n}\n\nexport interface SourceHTMLAttributes extends HTMLAttributes {\n media?: string\n sizes?: string\n src?: string\n srcset?: string\n type?: string\n}\n\nexport interface StyleHTMLAttributes extends HTMLAttributes {\n media?: string\n nonce?: string\n scoped?: boolean\n type?: string\n}\n\nexport interface TableHTMLAttributes extends HTMLAttributes {\n cellpadding?: number | string\n cellspacing?: number | string\n summary?: string\n}\n\nexport interface TextareaHTMLAttributes extends HTMLAttributes {\n autocomplete?: string\n autofocus?: boolean\n cols?: number\n dirname?: string\n disabled?: boolean\n form?: string\n maxlength?: number\n minlength?: number\n name?: string\n placeholder?: string\n readonly?: boolean\n required?: boolean\n rows?: number\n value?: string | string[] | number\n wrap?: string\n}\n\nexport interface TdHTMLAttributes extends HTMLAttributes {\n colspan?: number\n headers?: string\n rowspan?: number\n}\n\nexport interface ThHTMLAttributes extends HTMLAttributes {\n colspan?: number\n headers?: string\n rowspan?: number\n scope?: string\n}\n\nexport interface TimeHTMLAttributes extends HTMLAttributes {\n datetime?: string\n}\n\nexport interface TrackHTMLAttributes extends HTMLAttributes {\n default?: boolean\n kind?: string\n label?: string\n src?: string\n srclang?: string\n}\n\nexport interface VideoHTMLAttributes extends MediaHTMLAttributes {\n height?: number | string\n playsinline?: boolean\n poster?: string\n width?: number | string\n}\n\nexport interface AllHTMLAttributes extends HTMLAttributes {\n accept?: string\n acceptcharset?: string\n action?: boolean\n allowfullscreen?: boolean\n allowtransparency?: boolean\n alt?: string\n async?: boolean\n autocomplete?: string\n autofocus?: boolean\n autoplay?: boolean\n capture?: boolean // https://www.w3.org/tr/html-media-capture/#the-capture-attribute\n cellpadding?: number | string\n cellspacing?: number | string\n challenge?: string\n charset?: string\n checked?: boolean\n cite?: string\n classid?: string\n cols?: number\n colspan?: number\n content?: string\n controls?: boolean\n coord?: string\n crossorigin?: string\n data?: string\n datetime?: string\n default?: boolean\n defer?: boolean\n dirname?: string\n disabled?: boolean\n download?: any\n enctype?: string\n form?: string\n formaction?: string\n formenctype?: string\n formmethod?: string\n formnovalidate?: boolean\n formtarget?: string\n frameborder?: number | string\n headers?: string\n height?: number | string\n high?: number\n href?: string\n hreflang?: string\n htmlfor?: string\n httpequiv?: string\n integrity?: string\n keyparams?: string\n keytype?: string\n kind?: string\n label?: string\n list?: string\n loop?: boolean\n low?: number\n manifest?: string\n marginheight?: number\n marginwidth?: number\n max?: number | string\n maxlength?: number\n media?: string\n mediagroup?: string\n method?: string\n min?: number | string\n minlength?: number\n multiple?: boolean\n muted?: boolean\n name?: string\n nonce?: string\n novalidate?: boolean\n open?: boolean\n optimum?: number\n pattern?: string\n placeholder?: string\n playsinline?: boolean\n poster?: string\n preload?: string\n readonly?: boolean\n rel?: string\n required?: boolean\n reversed?: boolean\n rows?: number\n rowspan?: number\n sandbox?: string\n scope?: string\n scoped?: boolean\n scrolling?: string\n seamless?: boolean\n selected?: boolean\n shape?: string\n size?: number\n sizes?: string\n span?: number\n src?: string\n srcdoc?: string\n srclang?: string\n srcset?: string\n start?: number\n step?: number | string\n summary?: string\n target?: string\n type?: string\n usemap?: string\n value?: string | string[] | number\n width?: number | string\n wmode?: string\n wrap?: string\n}\n\nexport interface IntrinsicElementAttributes {\n a: AnchorHTMLAttributes\n abbr: HTMLAttributes\n address: HTMLAttributes\n area: AreaHTMLAttributes\n article: HTMLAttributes\n aside: HTMLAttributes\n audio: AudioHTMLAttributes\n b: HTMLAttributes\n base: BaseHTMLAttributes\n bdi: HTMLAttributes\n bdo: HTMLAttributes\n big: HTMLAttributes\n blockquote: BlockquoteHTMLAttributes\n body: HTMLAttributes\n br: HTMLAttributes\n button: ButtonHTMLAttributes\n canvas: CanvasHTMLAttributes\n caption: HTMLAttributes\n cite: HTMLAttributes\n code: HTMLAttributes\n col: ColHTMLAttributes\n colgroup: ColgroupHTMLAttributes\n data: HTMLAttributes\n datalist: HTMLAttributes\n dd: HTMLAttributes\n del: DelHTMLAttributes\n details: DetailsHTMLAttributes\n dfn: HTMLAttributes\n dialog: HTMLAttributes\n div: HTMLAttributes\n dl: HTMLAttributes\n dt: HTMLAttributes\n em: HTMLAttributes\n embed: EmbedHTMLAttributes\n fieldset: FieldsetHTMLAttributes\n figcaption: HTMLAttributes\n figure: HTMLAttributes\n footer: HTMLAttributes\n form: FormHTMLAttributes\n h1: HTMLAttributes\n h2: HTMLAttributes\n h3: HTMLAttributes\n h4: HTMLAttributes\n h5: HTMLAttributes\n h6: HTMLAttributes\n head: HTMLAttributes\n header: HTMLAttributes\n hgroup: HTMLAttributes\n hr: HTMLAttributes\n html: HtmlHTMLAttributes\n i: HTMLAttributes\n iframe: IframeHTMLAttributes\n img: ImgHTMLAttributes\n input: InputHTMLAttributes\n ins: InsHTMLAttributes\n kbd: HTMLAttributes\n keygen: KeygenHTMLAttributes\n label: LabelHTMLAttributes\n legend: HTMLAttributes\n li: LiHTMLAttributes\n link: LinkHTMLAttributes\n main: HTMLAttributes\n map: MapHTMLAttributes\n mark: HTMLAttributes\n menu: MenuHTMLAttributes\n menuitem: HTMLAttributes\n meta: MetaHTMLAttributes\n meter: MeterHTMLAttributes\n nav: HTMLAttributes\n noscript: HTMLAttributes\n object: ObjectHTMLAttributes\n ol: OlHTMLAttributes\n optgroup: OptgroupHTMLAttributes\n option: OptionHTMLAttributes\n output: OutputHTMLAttributes\n p: HTMLAttributes\n param: ParamHTMLAttributes\n picture: HTMLAttributes\n pre: HTMLAttributes\n progress: ProgressHTMLAttributes\n q: QuoteHTMLAttributes\n rp: HTMLAttributes\n rt: HTMLAttributes\n ruby: HTMLAttributes\n s: HTMLAttributes\n samp: HTMLAttributes\n script: ScriptHTMLAttributes\n section: HTMLAttributes\n select: SelectHTMLAttributes\n small: HTMLAttributes\n source: SourceHTMLAttributes\n span: HTMLAttributes\n strong: HTMLAttributes\n style: StyleHTMLAttributes\n sub: HTMLAttributes\n summary: HTMLAttributes\n sup: HTMLAttributes\n table: TableHTMLAttributes\n tbody: HTMLAttributes\n td: TdHTMLAttributes\n textarea: TextareaHTMLAttributes\n tfoot: HTMLAttributes\n th: ThHTMLAttributes\n thead: HTMLAttributes\n time: TimeHTMLAttributes\n title: HTMLAttributes\n tr: HTMLAttributes\n track: TrackHTMLAttributes\n u: HTMLAttributes\n ul: HTMLAttributes\n var: HTMLAttributes\n video: VideoHTMLAttributes\n wbr: HTMLAttributes\n}\n"]}
|
package/dist/lib.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Children, IClassComponent, HU, J, HFragment } from './h.js';
|
|
2
2
|
export type UC = J;
|
|
3
|
-
export type FComponentT<P> = (
|
|
3
|
+
export type FComponentT<P> = (props: P) => HU;
|
|
4
4
|
export type DeepReadonly<T> = {
|
|
5
5
|
readonly [K in keyof T]: T[K] extends Record<string, unknown> ? DeepReadonly<T[K]> : T[K];
|
|
6
6
|
};
|
|
7
|
-
export declare const When: ({ cond }: {
|
|
7
|
+
export declare const When: ({ cond, children }: {
|
|
8
8
|
cond: boolean;
|
|
9
|
-
|
|
9
|
+
children?: Children;
|
|
10
|
+
}) => HFragment | null;
|
|
10
11
|
export declare abstract class Component<P extends J = {}> implements IClassComponent {
|
|
11
12
|
props: P;
|
|
12
13
|
element: HTMLElement;
|
package/dist/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGzE,MAAM,MAAM,EAAE,GAAG,CAAC,CAAA;AAClB,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGzE,MAAM,MAAM,EAAE,GAAG,CAAC,CAAA;AAClB,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAA;AAE7C,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAA;AAE5H,eAAO,MAAM,IAAI,GAAI,oBAAoB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,KAAG,SAAS,GAAG,IAA+C,CAAA;AAE7I,8BAAsB,SAAS,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAE,YAAW,eAAe;IAGrD,KAAK,EAAE,CAAC;IAD3B,OAAO,EAAG,WAAW,CAAA;gBACF,KAAK,EAAE,CAAC;IAG3B,OAAO;IACP,MAAM,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,IAAI;IAChC,QAAQ,CAAC,IAAI,IAAI,EAAE;IAGnB,UAAU;IACV,IAAI,SAAS,IAAI,OAAO,CAA0B;CACrD;AAED,wBAAgB,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CAIxE;AAED,eAAO,MAAM,YAAY,GAAI,GAAG,IAAI,SAA+B,CAAA"}
|
package/dist/lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { updateview } from './jmc.js';
|
|
2
|
-
export const When = ({ cond }
|
|
2
|
+
export const When = ({ cond, children }) => cond ? { kind: 4, cn: children } : null;
|
|
3
3
|
export class Component {
|
|
4
4
|
props;
|
|
5
5
|
element; // assigned by jmc. a placeholder Comment while view() renders nothing
|
package/dist/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAOrC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAOrC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAA0C,EAAoB,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AAE7I,MAAM,OAAgB,SAAS;IAGR;IADnB,OAAO,CAAc,CAAC,sEAAsE;IAC5F,YAAmB,KAAQ;QAAR,UAAK,GAAL,KAAK,CAAG;IAAI,CAAC;IAEhC,YAAY;IACZ,OAAO,KAAK,CAAC;IACb,MAAM,CAAC,EAAQ,IAAoB,CAAC;IAGpC,wCAAwC;IACxC,UAAU,KAAK,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA,CAAC,CAAC;IACzC,IAAI,SAAS,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAA,CAAC,CAAC;CACrD;AAED,MAAM,UAAU,EAAE,CAAC,GAAG,cAA0C;IAC5D,OAAO,cAAc;SAChB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,uCAAuC;SACzH,IAAI,CAAC,GAAG,CAAC,CAAA;AAClB,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAO,EAAE,EAAE,CAAE,CAAiB,CAAC,KAAK,EAAE,CAAA","sourcesContent":["import type { Children, IClassComponent, HU, J, HFragment } from './h.js'\r\nimport { updateview } from './jmc.js'\r\n\r\nexport type UC = J // update context\r\nexport type FComponentT<P> = (props: P) => HU // a function component with typed props. children come in props.children\r\n\r\nexport type DeepReadonly<T> = { readonly [K in keyof T]: T[K] extends Record<string, unknown> ? DeepReadonly<T[K]> : T[K]; }\r\n\r\nexport const When = ({ cond, children }: { cond: boolean, children?: Children }): HFragment | null => cond ? { kind: 4, cn: children } : null\r\n\r\nexport abstract class Component<P extends J = {}> implements IClassComponent {\r\n\r\n element!: HTMLElement // assigned by jmc. a placeholder Comment while view() renders nothing\r\n constructor(public props: P) { }\r\n\r\n // overrides\r\n mounted() { }\r\n update(uc?: any): boolean | void { }\r\n abstract view(): HU\r\n\r\n // utility: updates the component's view\r\n updateview() { updateview(this.element) }\r\n get ismounted(): boolean { return !!this.element }\r\n}\r\n\r\nexport function cc(...namesOrObjects: (string | J | undefined)[]): string {\r\n return namesOrObjects\r\n .flatMap(n => typeof n == 'string' ? n : Object.keys(n ?? {}).filter(k => n?.[k])) // objects contribute their truthy keys\r\n .join(' ')\r\n}\r\n\r\nexport const focuselement = (e: Node) => (e as HTMLElement).focus()"]}
|
package/package.json
CHANGED
|
@@ -1,76 +1,89 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@snupo/jmc",
|
|
3
|
-
"description": "Minimal JSX/TSX view library that syncs directly with the real DOM",
|
|
4
|
-
"keywords": [
|
|
5
|
-
"jsx",
|
|
6
|
-
"tsx",
|
|
7
|
-
"dom",
|
|
8
|
-
"view",
|
|
9
|
-
"ui",
|
|
10
|
-
"typescript"
|
|
11
|
-
],
|
|
12
|
-
"author": "snupo",
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/snuup/jmc.git"
|
|
17
|
-
},
|
|
18
|
-
"homepage": "https://github.com/snuup/jmc#readme",
|
|
19
|
-
"bugs": "https://github.com/snuup/jmc/issues",
|
|
20
|
-
"version": "1.
|
|
21
|
-
"publishConfig": {
|
|
22
|
-
"access": "public"
|
|
23
|
-
},
|
|
24
|
-
"type": "module",
|
|
25
|
-
"main": "./dist/index.js",
|
|
26
|
-
"types": "./dist/index.d.ts",
|
|
27
|
-
"exports": {
|
|
28
|
-
".": {
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
|
-
"import": "./dist/index.js"
|
|
31
|
-
},
|
|
32
|
-
"./jsx-runtime": {
|
|
33
|
-
"types": "./dist/jsx-runtime.d.ts",
|
|
34
|
-
"import": "./dist/jsx-runtime.js"
|
|
35
|
-
},
|
|
36
|
-
"./jsx-dev-runtime": {
|
|
37
|
-
"types": "./dist/jsx-dev-runtime.d.ts",
|
|
38
|
-
"import": "./dist/jsx-dev-runtime.js"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@snupo/jmc",
|
|
3
|
+
"description": "Minimal JSX/TSX view library that syncs directly with the real DOM",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"jsx",
|
|
6
|
+
"tsx",
|
|
7
|
+
"dom",
|
|
8
|
+
"view",
|
|
9
|
+
"ui",
|
|
10
|
+
"typescript"
|
|
11
|
+
],
|
|
12
|
+
"author": "snupo",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/snuup/jmc.git"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/snuup/jmc#readme",
|
|
19
|
+
"bugs": "https://github.com/snuup/jmc/issues",
|
|
20
|
+
"version": "1.6.0",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./jsx-runtime": {
|
|
33
|
+
"types": "./dist/jsx-runtime.d.ts",
|
|
34
|
+
"import": "./dist/jsx-runtime.js"
|
|
35
|
+
},
|
|
36
|
+
"./jsx-dev-runtime": {
|
|
37
|
+
"types": "./dist/jsx-dev-runtime.d.ts",
|
|
38
|
+
"import": "./dist/jsx-dev-runtime.js"
|
|
39
|
+
},
|
|
40
|
+
"./comps": {
|
|
41
|
+
"types": "./dist/comps/index.d.ts",
|
|
42
|
+
"import": "./dist/comps/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./comps/*": {
|
|
45
|
+
"types": "./dist/comps/*.d.ts",
|
|
46
|
+
"import": "./dist/comps/*.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"sideEffects": [
|
|
50
|
+
"**/*.css"
|
|
51
|
+
],
|
|
52
|
+
"files": [
|
|
53
|
+
"dist",
|
|
54
|
+
"src",
|
|
55
|
+
"design-guide.md",
|
|
56
|
+
"components.md"
|
|
57
|
+
],
|
|
58
|
+
"scripts": {
|
|
59
|
+
"prebuild": "rimraf dist",
|
|
60
|
+
"build": "tsc -p tsconfig.json && node scripts/copycss.mjs",
|
|
61
|
+
"test": "pnpm typecheck && vitest run",
|
|
62
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tests && tsc -p tests/automatic && tsc -p demo",
|
|
63
|
+
"release": "release-it patch",
|
|
64
|
+
"demo": "vite demo"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
68
|
+
"happy-dom": "^16.8.1",
|
|
69
|
+
"release-it": "^21.0.2",
|
|
70
|
+
"rimraf": "^6.1.3",
|
|
71
|
+
"typescript": "^6.0.3",
|
|
72
|
+
"vite": "8.2.2",
|
|
73
|
+
"vitest": "4.1.10"
|
|
74
|
+
},
|
|
75
|
+
"release-it": {
|
|
76
|
+
"hooks": {
|
|
77
|
+
"before:init": [
|
|
78
|
+
"pnpm test"
|
|
79
|
+
],
|
|
80
|
+
"after:bump": "pnpm build"
|
|
81
|
+
},
|
|
82
|
+
"git": {
|
|
83
|
+
"commitMessage": "chore: release v${version}"
|
|
84
|
+
},
|
|
85
|
+
"github": {
|
|
86
|
+
"release": true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
package/readme.md
CHANGED
|
@@ -312,6 +312,10 @@ jmcconfig.attributes.add('list') // always set this prop as an attribute
|
|
|
312
312
|
| `mount({ … })` | puts values on `globalThis`, handy for debugging in the console |
|
|
313
313
|
| `loggedmethods(o)` | logs each method call of `o` with its arguments and result |
|
|
314
314
|
|
|
315
|
+
## Ready-made components
|
|
316
|
+
|
|
317
|
+
`@snupo/jmc/comps` has input components for common needs: `TextArea` that grows with its text, `NumberStepper`, `RangeSlider`, `Select`, `ComboBox`, `DataListInput`, `Checkbox` with a third state, `ToggleGroup`, `RadioGroup`, `Tabs` and `Icon`. They are light DOM, themed with CSS variables, and follow the model and controller architecture. See [components.md](components.md).
|
|
318
|
+
|
|
315
319
|
## License
|
|
316
320
|
|
|
317
321
|
[MIT](LICENSE)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@layer jmc {
|
|
2
|
+
.jmc-checkbox {
|
|
3
|
+
--c: var(--jmc-accent, #3b82f6);
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 0.4em;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
|
|
9
|
+
input {
|
|
10
|
+
appearance: none;
|
|
11
|
+
display: grid;
|
|
12
|
+
place-content: center;
|
|
13
|
+
flex: none; /* a squeezed box would turn a round one into an ellipse */
|
|
14
|
+
width: 1.1em;
|
|
15
|
+
height: 1.1em;
|
|
16
|
+
margin: 0;
|
|
17
|
+
color: var(--jmc-bg, #fff);
|
|
18
|
+
background: var(--jmc-bg, #fff);
|
|
19
|
+
border: 1.5px solid var(--c);
|
|
20
|
+
border-radius: var(--jmc-checkbox-radius, 3px);
|
|
21
|
+
cursor: inherit;
|
|
22
|
+
|
|
23
|
+
&::after {
|
|
24
|
+
content: '';
|
|
25
|
+
width: 0.65em;
|
|
26
|
+
height: 0.65em;
|
|
27
|
+
background: currentColor;
|
|
28
|
+
transform: scale(0);
|
|
29
|
+
}
|
|
30
|
+
&:checked, &:indeterminate { background: var(--c); }
|
|
31
|
+
&:checked::after {
|
|
32
|
+
transform: scale(1);
|
|
33
|
+
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
|
|
34
|
+
}
|
|
35
|
+
&:indeterminate::after {
|
|
36
|
+
transform: scale(1);
|
|
37
|
+
clip-path: polygon(0 40%, 100% 40%, 100% 60%, 0 60%);
|
|
38
|
+
}
|
|
39
|
+
&:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
|
|
40
|
+
&:disabled { opacity: 0.4; }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.jmc-round input { border-radius: 50%; }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from '../h.js'
|
|
2
|
+
import type { InputHTMLAttributes } from '../jsx.js'
|
|
3
|
+
import { Component, cc } from '../lib.js'
|
|
4
|
+
import './checkbox.css'
|
|
5
|
+
|
|
6
|
+
type Props = Omit<InputHTMLAttributes, 'checked' | 'indeterminate' | 'onchange' | 'oninput' | 'type' | 'value'> & {
|
|
7
|
+
checked: boolean | 'mixed' // 'mixed' is the third state, for a group of which only some are checked
|
|
8
|
+
setchecked: (checked: boolean) => void
|
|
9
|
+
round?: boolean
|
|
10
|
+
children?: any // the label: text or a view
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** a checkbox with a third state. a click on 'mixed' hands out true. class and style go to the label */
|
|
14
|
+
export class Checkbox extends Component<Props> {
|
|
15
|
+
|
|
16
|
+
view() {
|
|
17
|
+
const { checked, setchecked, round, class: cls, style, children, ...rest } = this.props
|
|
18
|
+
return <label class={cc('jmc-checkbox', { 'jmc-round': round }, cls)} style={style}>
|
|
19
|
+
<input type='checkbox' {...rest} checked={checked === true} indeterminate={checked === 'mixed'} onchange={this.onchange} />
|
|
20
|
+
{children}
|
|
21
|
+
</label>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
onchange(ev: Event) {
|
|
25
|
+
const i = ev.target as HTMLInputElement
|
|
26
|
+
this.props.setchecked(i.checked)
|
|
27
|
+
// the click changed the element. jmc writes only props that changed, so show what the model decided
|
|
28
|
+
i.checked = this.props.checked === true
|
|
29
|
+
i.indeterminate = this.props.checked === 'mixed'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@layer jmc {
|
|
2
|
+
.jmc-combobox {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
color: var(--jmc-color, inherit);
|
|
7
|
+
background: var(--jmc-bg, #fff);
|
|
8
|
+
border: 1px solid var(--jmc-border, #cbd5e1);
|
|
9
|
+
border-radius: var(--jmc-radius, 6px);
|
|
10
|
+
|
|
11
|
+
&:focus-within { border-color: var(--jmc-accent, #3b82f6); }
|
|
12
|
+
&:has(input:disabled) { opacity: 0.5; }
|
|
13
|
+
|
|
14
|
+
input {
|
|
15
|
+
flex: 1;
|
|
16
|
+
min-width: 0;
|
|
17
|
+
font: inherit;
|
|
18
|
+
padding: var(--jmc-padding, 0.3em 0.5em);
|
|
19
|
+
color: inherit;
|
|
20
|
+
background: transparent;
|
|
21
|
+
border: none;
|
|
22
|
+
outline: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
button {
|
|
26
|
+
padding: 0 0.5em;
|
|
27
|
+
font: inherit;
|
|
28
|
+
color: inherit;
|
|
29
|
+
background: transparent;
|
|
30
|
+
border: none;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
|
|
33
|
+
&:hover:not(:disabled) { opacity: 0.6; }
|
|
34
|
+
&:disabled { cursor: default; }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ul {
|
|
38
|
+
position: absolute;
|
|
39
|
+
z-index: 10;
|
|
40
|
+
top: 100%;
|
|
41
|
+
left: -1px; /* over the border */
|
|
42
|
+
min-width: calc(100% + 2px);
|
|
43
|
+
max-height: 14rem;
|
|
44
|
+
margin: 2px 0 0;
|
|
45
|
+
padding: 0.2rem 0;
|
|
46
|
+
overflow-y: auto;
|
|
47
|
+
list-style: none;
|
|
48
|
+
background: var(--jmc-bg, #fff);
|
|
49
|
+
border: 1px solid var(--jmc-border, #cbd5e1);
|
|
50
|
+
border-radius: var(--jmc-radius, 6px);
|
|
51
|
+
box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
li {
|
|
55
|
+
padding: 0.25em 0.6em;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
|
|
59
|
+
&:hover, &.active { background: var(--jmc-bg-focus, #f0f7ff); }
|
|
60
|
+
&.selected { font-weight: 600; }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|