jmx-runtime 0.0.26 → 0.0.27
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/base.ts +25 -25
- package/dist/base.d.ts +5 -5
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +21 -21
- package/dist/base.js.map +1 -1
- package/dist/config.d.ts +8 -8
- package/dist/config.js +4 -4
- package/dist/h.d.ts +57 -57
- package/dist/h.js +6 -6
- package/dist/h.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/jmx.d.ts +8 -8
- package/dist/jmx.js +134 -134
- package/dist/jmx.js.map +1 -1
- package/dist/jsx.d.ts +647 -647
- package/dist/jsx.js +1 -1
- package/dist/jsx.js.map +1 -1
- package/dist/lib.d.ts +20 -19
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +16 -15
- package/dist/lib.js.map +1 -1
- package/h.ts +88 -88
- package/index.ts +5 -5
- package/jmx.ts +183 -183
- package/jsx.ts +748 -748
- package/lib.ts +28 -28
- package/package.json +14 -14
- package/rollup.config.js +30 -30
- package/tsconfig.json +37 -37
package/dist/jsx.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=jsx.js.map
|
package/dist/jsx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.js","sourceRoot":"./","sources":["jsx.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-interface */\r\n/* eslint-disable @typescript-eslint/ban-types */\r\n// This code is based on react definition in DefinitelyTyped published under the MIT license.\r\n// Repository: https://github.com/DefinitelyTyped/DefinitelyTyped\r\n// Path in the repository: types/react/v15/index.d.ts\r\n//\r\n// Copyrights of original definition are:\r\n// Asana <https://asana.com>\r\n// AssureSign <http://www.assuresign.com>\r\n// Microsoft <https://microsoft.com>\r\n// John Reilly <https://github.com/johnnyreilly/>\r\n// Benoit Benezech <https://github.com/bbenezech>\r\n// Patricio Zavolinsky <https://github.com/pzavolinsky>\r\n// Digiguru <https://github.com/digiguru>\r\n// Eric Anderson <https://github.com/ericanderson>\r\n// Albert Kurniawan <https://github.com/morcerf>\r\n// Tanguy Krotoff <https://github.com/tkrotoff>\r\n// Dovydas Navickas <https://github.com/DovydasNavickas>\r\n// Stéphane Goetz <https://github.com/onigoetz>\r\n\r\ndeclare global {\r\n namespace JSX {\r\n interface IntrinsicElements extends IntrinsicElementAttributes {\r\n // additional attributes for selected elements\r\n // label: HTMLAttributes & { bunny: number }\r\n }\r\n }\r\n}\r\n\r\ninterface EventHandler<E extends Event> {\r\n (event: E): void\r\n}\r\n\r\nexport interface AdditionalElementAttributes {\r\n mounted?: (n:Node) => void\r\n update?: (n:Node, uc:IUpdateContext) => void\r\n}\r\n\r\nexport interface HTMLAttributes extends AdditionalElementAttributes {\r\n class?: string\r\n style?: string\r\n accesskey?: string\r\n contenteditable?: boolean\r\n contextmenu?: string\r\n dir?: string\r\n disabled?: boolean\r\n draggable?: boolean\r\n hidden?: boolean\r\n id?: string\r\n lang?: string\r\n spellcheck?: boolean\r\n tabindex?: number\r\n title?: string\r\n role?: string\r\n\r\n // clipboard events\r\n onCopy?: ClipboardEvent\r\n onCut?: ClipboardEvent\r\n onPaste?: ClipboardEvent\r\n\r\n // composition events\r\n onCompositionend?: CompositionEvent\r\n onCompositionstart?: CompositionEvent\r\n onCompositionupdate?: CompositionEvent\r\n\r\n // drag drop events\r\n ondrag?: EventHandler<DragEvent>\r\n ondragend?: EventHandler<DragEvent>\r\n ondragenter?: EventHandler<DragEvent>\r\n ondragexit?: EventHandler<DragEvent>\r\n ondragleave?: EventHandler<DragEvent>\r\n ondragover?: EventHandler<DragEvent>\r\n ondragstart?: EventHandler<DragEvent>\r\n ondrop?: EventHandler<DragEvent>\r\n\r\n // focus events\r\n onfocus?: (ev: FocusEvent) => void\r\n onfocusout?: (ev: FocusEvent) => void\r\n onblur?: (ev: FocusEvent) => void\r\n\r\n // form events\r\n onchange?: EventHandler<Event>\r\n oninput?: EventHandler<Event>\r\n onreset?: EventHandler<Event>\r\n onsubmit?: EventHandler<Event>\r\n oninvalid?: EventHandler<Event>\r\n\r\n // image events\r\n onload?: EventHandler<Event>\r\n onerror?: EventHandler<Event>\r\n\r\n // keyboard events\r\n onkeydown?: EventHandler<KeyboardEvent>\r\n onkeypress?: EventHandler<KeyboardEvent>\r\n onkeyup?: EventHandler<KeyboardEvent>\r\n\r\n // mouse events\r\n onclick?: EventHandler<MouseEvent>\r\n oncontextmenu?: EventHandler<MouseEvent>\r\n ondblclick?: EventHandler<MouseEvent>\r\n onmousedown?: EventHandler<MouseEvent>\r\n onmouseenter?: EventHandler<MouseEvent>\r\n onmouseleave?: EventHandler<MouseEvent>\r\n onmousemove?: EventHandler<MouseEvent>\r\n onmouseout?: EventHandler<MouseEvent>\r\n onmouseover?: EventHandler<MouseEvent>\r\n onmouseup?: EventHandler<MouseEvent>\r\n\r\n // media events\r\n onAbort?: EventHandler<Event>\r\n onCanplay?: EventHandler<Event>\r\n onCanplaythrough?: EventHandler<Event>\r\n onDurationchange?: EventHandler<Event>\r\n onEmptied?: EventHandler<Event>\r\n onEncrypted?: EventHandler<Event>\r\n onEnded?: EventHandler<Event>\r\n onLoadeddata?: EventHandler<Event>\r\n onLoadedmetadata?: EventHandler<Event>\r\n onLoadstart?: EventHandler<Event>\r\n onPause?: EventHandler<Event>\r\n onPlay?: EventHandler<Event>\r\n onPlaying?: EventHandler<Event>\r\n onProgress?: EventHandler<Event>\r\n onRatechange?: EventHandler<Event>\r\n onSeeked?: EventHandler<Event>\r\n onSeeking?: EventHandler<Event>\r\n onStalled?: EventHandler<Event>\r\n onSuspend?: EventHandler<Event>\r\n onTimeupdate?: EventHandler<Event>\r\n onVolumechange?: EventHandler<Event>\r\n onWaiting?: EventHandler<Event>\r\n\r\n // selection events\r\n onSelect?: EventHandler<Event>\r\n\r\n // UI events\r\n onScroll?: UIEvent\r\n\r\n // touch events\r\n onTouchcancel?: TouchEvent\r\n onTouchend?: TouchEvent\r\n onTouchmove?: TouchEvent\r\n onTouchstart?: TouchEvent\r\n\r\n // wheel events\r\n onWheel?: WheelEvent\r\n\r\n // animation events\r\n onAnimationstart?: AnimationEvent\r\n onAnimationend?: AnimationEvent\r\n onAnimationiteration?: AnimationEvent\r\n\r\n // transition events\r\n onTransitionend?: TransitionEvent\r\n onTransitionstart?: TransitionEvent\r\n}\r\n\r\nexport interface AnchorHTMLAttributes extends HTMLAttributes {\r\n download?: any\r\n href?: string\r\n hreflang?: string\r\n media?: string\r\n rel?: string\r\n target?: string\r\n}\r\n\r\nexport interface AreaHTMLAttributes extends HTMLAttributes {\r\n alt?: string\r\n coord?: string\r\n download?: any\r\n href?: string\r\n hreflang?: string\r\n media?: string\r\n rel?: string\r\n shape?: string\r\n target?: string\r\n}\r\n\r\nexport interface AudioHTMLAttributes extends MediaHTMLAttributes { }\r\n\r\nexport interface BaseHTMLAttributes extends HTMLAttributes {\r\n href?: string\r\n target?: string\r\n}\r\n\r\nexport interface BlockquoteHTMLAttributes extends HTMLAttributes {\r\n cite?: string\r\n}\r\n\r\nexport interface ButtonHTMLAttributes extends HTMLAttributes {\r\n autofocus?: boolean\r\n disabled?: boolean\r\n form?: string\r\n formaction?: string\r\n formenctype?: string\r\n formmethod?: string\r\n formnovalidate?: boolean\r\n formtarget?: string\r\n name?: string\r\n type?: string\r\n value?: string | string[] | number\r\n}\r\n\r\nexport interface CanvasHTMLAttributes extends HTMLAttributes {\r\n height?: number | string\r\n width?: number | string\r\n}\r\n\r\nexport interface ColHTMLAttributes extends HTMLAttributes {\r\n span?: number\r\n}\r\n\r\nexport interface ColgroupHTMLAttributes extends ColHTMLAttributes { }\r\n\r\nexport interface DetailsHTMLAttributes extends HTMLAttributes {\r\n open?: boolean\r\n}\r\n\r\nexport interface DelHTMLAttributes extends HTMLAttributes {\r\n cite?: string\r\n datetime?: string\r\n}\r\n\r\nexport interface EmbedHTMLAttributes extends HTMLAttributes {\r\n height?: number | string\r\n src?: string\r\n type?: string\r\n width?: number | string\r\n}\r\n\r\nexport interface FieldsetHTMLAttributes extends HTMLAttributes {\r\n disabled?: boolean\r\n form?: string\r\n name?: string\r\n}\r\n\r\nexport interface FormHTMLAttributes extends HTMLAttributes {\r\n acceptcharset?: string\r\n action?: string\r\n autocomplete?: string\r\n enctype?: string\r\n method?: string\r\n name?: string\r\n novalidate?: boolean\r\n target?: string\r\n}\r\n\r\nexport interface HtmlHTMLAttributes extends HTMLAttributes {\r\n manifest?: string\r\n}\r\n\r\nexport interface IframeHTMLAttributes extends HTMLAttributes {\r\n allowfullscreen?: boolean\r\n allowtransparency?: boolean\r\n frameborder?: number | string\r\n height?: number | string\r\n marginheight?: number\r\n marginwidth?: number\r\n name?: string\r\n sandbox?: string\r\n scrolling?: string\r\n seamless?: boolean\r\n src?: string\r\n srcdoc?: string\r\n width?: number | string\r\n}\r\n\r\nexport interface ImgHTMLAttributes extends HTMLAttributes {\r\n alt?: string\r\n height?: number | string\r\n sizes?: string\r\n src?: string\r\n srcset?: string\r\n usemap?: string\r\n width?: number | string\r\n}\r\n\r\nexport interface InsHTMLAttributes extends HTMLAttributes {\r\n cite?: string\r\n datetime?: string\r\n}\r\n\r\nexport interface InputHTMLAttributes extends HTMLAttributes {\r\n accept?: string\r\n alt?: string\r\n autocomplete?: string\r\n autofocus?: boolean\r\n capture?: boolean // https://www.w3.org/tr/html-media-capture/#the-capture-attribute\r\n checked?: boolean\r\n crossorigin?: string\r\n disabled?: boolean\r\n form?: string\r\n formaction?: string\r\n formenctype?: string\r\n formmethod?: string\r\n formnovalidate?: boolean\r\n formtarget?: string\r\n height?: number | string\r\n list?: string\r\n max?: number | string\r\n maxlength?: number\r\n min?: number | string\r\n minlength?: number\r\n multiple?: boolean\r\n name?: string\r\n pattern?: string\r\n placeholder?: string\r\n readonly?: boolean\r\n required?: boolean\r\n size?: number\r\n src?: string\r\n step?: number | string\r\n type?: string\r\n value?: string | string[] | number\r\n width?: number | string\r\n}\r\n\r\nexport interface KeygenHTMLAttributes extends HTMLAttributes {\r\n autofocus?: boolean\r\n challenge?: string\r\n disabled?: boolean\r\n form?: string\r\n keytype?: string\r\n keyparams?: string\r\n name?: string\r\n}\r\n\r\nexport interface LabelHTMLAttributes extends HTMLAttributes {\r\n form?: string\r\n for?: string\r\n}\r\n\r\nexport interface LiHTMLAttributes extends HTMLAttributes {\r\n value?: string | string[] | number\r\n}\r\n\r\nexport interface LinkHTMLAttributes extends HTMLAttributes {\r\n href?: string\r\n hreflang?: string\r\n integrity?: string\r\n media?: string\r\n rel?: string\r\n sizes?: string\r\n type?: string\r\n}\r\n\r\nexport interface MapHTMLAttributes extends HTMLAttributes {\r\n name?: string\r\n}\r\n\r\nexport interface MenuHTMLAttributes extends HTMLAttributes {\r\n type?: string\r\n}\r\n\r\nexport interface MediaHTMLAttributes extends HTMLAttributes {\r\n autoplay?: boolean\r\n controls?: boolean\r\n crossorigin?: string\r\n loop?: boolean\r\n mediagroup?: string\r\n muted?: boolean\r\n preload?: string\r\n src?: string\r\n}\r\n\r\nexport interface MetaHTMLAttributes extends HTMLAttributes {\r\n charset?: string\r\n content?: string\r\n httpequiv?: string\r\n name?: string\r\n}\r\n\r\nexport interface MeterHTMLAttributes extends HTMLAttributes {\r\n form?: string\r\n high?: number\r\n low?: number\r\n max?: number | string\r\n min?: number | string\r\n optimum?: number\r\n value?: string | string[] | number\r\n}\r\n\r\nexport interface QuoteHTMLAttributes extends HTMLAttributes {\r\n cite?: string\r\n}\r\n\r\nexport interface ObjectHTMLAttributes extends HTMLAttributes {\r\n classid?: string\r\n data?: string\r\n form?: string\r\n height?: number | string\r\n name?: string\r\n type?: string\r\n usemap?: string\r\n width?: number | string\r\n wmode?: string\r\n}\r\n\r\nexport interface OlHTMLAttributes extends HTMLAttributes {\r\n reversed?: boolean\r\n start?: number\r\n}\r\n\r\nexport interface OptgroupHTMLAttributes extends HTMLAttributes {\r\n disabled?: boolean\r\n label?: string\r\n}\r\n\r\nexport interface OptionHTMLAttributes extends HTMLAttributes {\r\n disabled?: boolean\r\n label?: string\r\n selected?: boolean\r\n value?: string | string[] | number\r\n}\r\n\r\nexport interface OutputHTMLAttributes extends HTMLAttributes {\r\n form?: string\r\n htmlfor?: string\r\n name?: string\r\n}\r\n\r\nexport interface ParamHTMLAttributes extends HTMLAttributes {\r\n name?: string\r\n value?: string | string[] | number\r\n}\r\n\r\nexport interface ProgressHTMLAttributes extends HTMLAttributes {\r\n max?: number | string\r\n value?: string | string[] | number\r\n}\r\n\r\nexport interface ScriptHTMLAttributes extends HTMLAttributes {\r\n async?: boolean\r\n charset?: string\r\n crossorigin?: string\r\n defer?: boolean\r\n integrity?: string\r\n nonce?: string\r\n src?: string\r\n type?: string\r\n}\r\n\r\nexport interface SelectHTMLAttributes extends HTMLAttributes {\r\n autofocus?: boolean\r\n disabled?: boolean\r\n form?: string\r\n multiple?: boolean\r\n name?: string\r\n required?: boolean\r\n size?: number\r\n value?: string | string[] | number\r\n}\r\n\r\nexport interface SourceHTMLAttributes extends HTMLAttributes {\r\n media?: string\r\n sizes?: string\r\n src?: string\r\n srcset?: string\r\n type?: string\r\n}\r\n\r\nexport interface StyleHTMLAttributes extends HTMLAttributes {\r\n media?: string\r\n nonce?: string\r\n scoped?: boolean\r\n type?: string\r\n}\r\n\r\nexport interface TableHTMLAttributes extends HTMLAttributes {\r\n cellpadding?: number | string\r\n cellspacing?: number | string\r\n summary?: string\r\n}\r\n\r\nexport interface TextareaHTMLAttributes extends HTMLAttributes {\r\n autocomplete?: string\r\n autofocus?: boolean\r\n cols?: number\r\n dirname?: string\r\n disabled?: boolean\r\n form?: string\r\n maxlength?: number\r\n minlength?: number\r\n name?: string\r\n placeholder?: string\r\n readonly?: boolean\r\n required?: boolean\r\n rows?: number\r\n value?: string | string[] | number\r\n wrap?: string\r\n}\r\n\r\nexport interface TdHTMLAttributes extends HTMLAttributes {\r\n colspan?: number\r\n headers?: string\r\n rowspan?: number\r\n}\r\n\r\nexport interface ThHTMLAttributes extends HTMLAttributes {\r\n colspan?: number\r\n headers?: string\r\n rowspan?: number\r\n scope?: string\r\n}\r\n\r\nexport interface TimeHTMLAttributes extends HTMLAttributes {\r\n datetime?: string\r\n}\r\n\r\nexport interface TrackHTMLAttributes extends HTMLAttributes {\r\n default?: boolean\r\n kind?: string\r\n label?: string\r\n src?: string\r\n srclang?: string\r\n}\r\n\r\nexport interface VideoHTMLAttributes extends MediaHTMLAttributes {\r\n height?: number | string\r\n playsinline?: boolean\r\n poster?: string\r\n width?: number | string\r\n}\r\n\r\nexport interface AllHTMLAttributes extends HTMLAttributes {\r\n accept?: string\r\n acceptcharset?: string\r\n action?: boolean\r\n allowfullscreen?: boolean\r\n allowtransparency?: boolean\r\n alt?: string\r\n async?: boolean\r\n autocomplete?: string\r\n autofocus?: boolean\r\n autoplay?: boolean\r\n capture?: boolean // https://www.w3.org/tr/html-media-capture/#the-capture-attribute\r\n cellpadding?: number | string\r\n cellspacing?: number | string\r\n challenge?: string\r\n charset?: string\r\n checked?: boolean\r\n cite?: string\r\n classid?: string\r\n cols?: number\r\n colspan?: number\r\n content?: string\r\n controls?: boolean\r\n coord?: string\r\n crossorigin?: string\r\n data?: string\r\n datetime?: string\r\n default?: boolean\r\n defer?: boolean\r\n dirname?: string\r\n disabled?: boolean\r\n download?: any\r\n enctype?: string\r\n form?: string\r\n formaction?: string\r\n formenctype?: string\r\n formmethod?: string\r\n formnovalidate?: boolean\r\n formtarget?: string\r\n frameborder?: number | string\r\n headers?: string\r\n height?: number | string\r\n high?: number\r\n href?: string\r\n hreflang?: string\r\n htmlfor?: string\r\n httpequiv?: string\r\n integrity?: string\r\n keyparams?: string\r\n keytype?: string\r\n kind?: string\r\n label?: string\r\n list?: string\r\n loop?: boolean\r\n low?: number\r\n manifest?: string\r\n marginheight?: number\r\n marginwidth?: number\r\n max?: number | string\r\n maxlength?: number\r\n media?: string\r\n mediagroup?: string\r\n method?: string\r\n min?: number | string\r\n minlength?: number\r\n multiple?: boolean\r\n muted?: boolean\r\n name?: string\r\n nonce?: string\r\n novalidate?: boolean\r\n open?: boolean\r\n optimum?: number\r\n pattern?: string\r\n placeholder?: string\r\n playsinline?: boolean\r\n poster?: string\r\n preload?: string\r\n readonly?: boolean\r\n rel?: string\r\n required?: boolean\r\n reversed?: boolean\r\n rows?: number\r\n rowspan?: number\r\n sandbox?: string\r\n scope?: string\r\n scoped?: boolean\r\n scrolling?: string\r\n seamless?: boolean\r\n selected?: boolean\r\n shape?: string\r\n size?: number\r\n sizes?: string\r\n span?: number\r\n src?: string\r\n srcdoc?: string\r\n srclang?: string\r\n srcset?: string\r\n start?: number\r\n step?: number | string\r\n summary?: string\r\n target?: string\r\n type?: string\r\n usemap?: string\r\n value?: string | string[] | number\r\n width?: number | string\r\n wmode?: string\r\n wrap?: string\r\n}\r\n\r\nexport interface IntrinsicElementAttributes {\r\n a: AnchorHTMLAttributes\r\n abbr: HTMLAttributes\r\n address: HTMLAttributes\r\n area: AreaHTMLAttributes\r\n article: HTMLAttributes\r\n aside: HTMLAttributes\r\n audio: AudioHTMLAttributes\r\n b: HTMLAttributes\r\n base: BaseHTMLAttributes\r\n bdi: HTMLAttributes\r\n bdo: HTMLAttributes\r\n big: HTMLAttributes\r\n blockquote: BlockquoteHTMLAttributes\r\n body: HTMLAttributes\r\n br: HTMLAttributes\r\n button: ButtonHTMLAttributes\r\n canvas: CanvasHTMLAttributes\r\n caption: HTMLAttributes\r\n cite: HTMLAttributes\r\n code: HTMLAttributes\r\n col: ColHTMLAttributes\r\n colgroup: ColgroupHTMLAttributes\r\n data: HTMLAttributes\r\n datalist: HTMLAttributes\r\n dd: HTMLAttributes\r\n del: DelHTMLAttributes\r\n details: DetailsHTMLAttributes\r\n dfn: HTMLAttributes\r\n dialog: HTMLAttributes\r\n div: HTMLAttributes\r\n dl: HTMLAttributes\r\n dt: HTMLAttributes\r\n em: HTMLAttributes\r\n embed: EmbedHTMLAttributes\r\n fieldset: FieldsetHTMLAttributes\r\n figcaption: HTMLAttributes\r\n figure: HTMLAttributes\r\n footer: HTMLAttributes\r\n form: FormHTMLAttributes\r\n h1: HTMLAttributes\r\n h2: HTMLAttributes\r\n h3: HTMLAttributes\r\n h4: HTMLAttributes\r\n h5: HTMLAttributes\r\n h6: HTMLAttributes\r\n head: HTMLAttributes\r\n header: HTMLAttributes\r\n hgroup: HTMLAttributes\r\n hr: HTMLAttributes\r\n html: HtmlHTMLAttributes\r\n i: HTMLAttributes\r\n iframe: IframeHTMLAttributes\r\n img: ImgHTMLAttributes\r\n input: InputHTMLAttributes\r\n ins: InsHTMLAttributes\r\n kbd: HTMLAttributes\r\n keygen: KeygenHTMLAttributes\r\n label: LabelHTMLAttributes\r\n legend: HTMLAttributes\r\n li: LiHTMLAttributes\r\n link: LinkHTMLAttributes\r\n main: HTMLAttributes\r\n map: MapHTMLAttributes\r\n mark: HTMLAttributes\r\n menu: MenuHTMLAttributes\r\n menuitem: HTMLAttributes\r\n meta: MetaHTMLAttributes\r\n meter: MeterHTMLAttributes\r\n nav: HTMLAttributes\r\n noscript: HTMLAttributes\r\n object: ObjectHTMLAttributes\r\n ol: OlHTMLAttributes\r\n optgroup: OptgroupHTMLAttributes\r\n option: OptionHTMLAttributes\r\n output: OutputHTMLAttributes\r\n p: HTMLAttributes\r\n param: ParamHTMLAttributes\r\n picture: HTMLAttributes\r\n pre: HTMLAttributes\r\n progress: ProgressHTMLAttributes\r\n q: QuoteHTMLAttributes\r\n rp: HTMLAttributes\r\n rt: HTMLAttributes\r\n ruby: HTMLAttributes\r\n s: HTMLAttributes\r\n samp: HTMLAttributes\r\n script: ScriptHTMLAttributes\r\n section: HTMLAttributes\r\n select: SelectHTMLAttributes\r\n small: HTMLAttributes\r\n source: SourceHTMLAttributes\r\n span: HTMLAttributes\r\n strong: HTMLAttributes\r\n style: StyleHTMLAttributes\r\n sub: HTMLAttributes\r\n summary: HTMLAttributes\r\n sup: HTMLAttributes\r\n table: TableHTMLAttributes\r\n tbody: HTMLAttributes\r\n td: TdHTMLAttributes\r\n textarea: TextareaHTMLAttributes\r\n tfoot: HTMLAttributes\r\n th: ThHTMLAttributes\r\n thead: HTMLAttributes\r\n time: TimeHTMLAttributes\r\n title: HTMLAttributes\r\n tr: HTMLAttributes\r\n track: TrackHTMLAttributes\r\n u: HTMLAttributes\r\n ul: HTMLAttributes\r\n var: HTMLAttributes\r\n video: VideoHTMLAttributes\r\n wbr: HTMLAttributes\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"jsx.js","sourceRoot":"./","sources":["jsx.ts"],"names":[],"mappings":"","sourcesContent":["/* 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\ndeclare global {\n namespace JSX {\n interface IntrinsicElements extends IntrinsicElementAttributes {\n // additional attributes for selected elements\n // label: HTMLAttributes & { bunny: number }\n }\n }\n}\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:IUpdateContext) => void\n}\n\nexport interface HTMLAttributes 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?: ClipboardEvent\n onCut?: ClipboardEvent\n onPaste?: ClipboardEvent\n\n // composition events\n onCompositionend?: CompositionEvent\n onCompositionstart?: CompositionEvent\n onCompositionupdate?: 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?: UIEvent\n\n // touch events\n onTouchcancel?: TouchEvent\n onTouchend?: TouchEvent\n onTouchmove?: TouchEvent\n onTouchstart?: TouchEvent\n\n // wheel events\n onWheel?: WheelEvent\n\n // animation events\n onAnimationstart?: AnimationEvent\n onAnimationend?: AnimationEvent\n onAnimationiteration?: AnimationEvent\n\n // transition events\n onTransitionend?: TransitionEvent\n onTransitionstart?: 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"]}
|
package/dist/lib.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { Props, IClassComponent, H, Children } from 'h';
|
|
2
|
-
export type DeepReadonly<T> = {
|
|
3
|
-
readonly [K in keyof T]: T[K] extends Record<string, unknown> ? DeepReadonly<T[K]> : T[K];
|
|
4
|
-
};
|
|
5
|
-
export declare const When: ({ cond }: {
|
|
6
|
-
cond: boolean;
|
|
7
|
-
}, cn: Children) => {
|
|
8
|
-
cn: Children;
|
|
9
|
-
} | undefined;
|
|
10
|
-
export declare abstract class JMXComp<P extends Props = {}> implements IClassComponent {
|
|
11
|
-
props: P;
|
|
12
|
-
element: HTMLElement;
|
|
13
|
-
constructor(props: P);
|
|
14
|
-
mounted(): void;
|
|
15
|
-
update(uc?: IUpdateContext): boolean | void;
|
|
16
|
-
abstract view(): H;
|
|
17
|
-
updateview(): void;
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { Props, IClassComponent, H, Children } from 'h';
|
|
2
|
+
export type DeepReadonly<T> = {
|
|
3
|
+
readonly [K in keyof T]: T[K] extends Record<string, unknown> ? DeepReadonly<T[K]> : T[K];
|
|
4
|
+
};
|
|
5
|
+
export declare const When: ({ cond }: {
|
|
6
|
+
cond: boolean;
|
|
7
|
+
}, cn: Children) => {
|
|
8
|
+
cn: Children;
|
|
9
|
+
} | undefined;
|
|
10
|
+
export declare abstract class JMXComp<P extends Props = {}> implements IClassComponent {
|
|
11
|
+
props: P;
|
|
12
|
+
element: HTMLElement;
|
|
13
|
+
constructor(props: P);
|
|
14
|
+
mounted(): void;
|
|
15
|
+
update(uc?: IUpdateContext): boolean | void;
|
|
16
|
+
abstract view(): H;
|
|
17
|
+
updateview(): void;
|
|
18
|
+
get ismounted(): boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function cc(...namesOrObjects: (string | any)[]): string;
|
|
20
21
|
//# sourceMappingURL=lib.d.ts.map
|
package/dist/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"./","sources":["lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,EAAe,QAAQ,EAAE,MAAM,GAAG,CAAA;AAGpE,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,
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"./","sources":["lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,EAAe,QAAQ,EAAE,MAAM,GAAG,CAAA;AAGpE,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,UAAU;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,EAAE,IAAI,QAAQ;;aAA2B,CAAC;AAE1F,8BAAsB,OAAO,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,CAAE,YAAW,eAAe;IAOvD,KAAK,EAAE,CAAC;IAJ3B,OAAO,EAAG,WAAW,CAAA;gBAIF,KAAK,EAAE,CAAC;IAG3B,OAAO;IACP,MAAM,CAAC,EAAE,CAAC,EAAE,cAAc,GAAG,OAAO,GAAG,IAAI;IAC3C,QAAQ,CAAC,IAAI,IAAI,CAAC;IAGlB,UAAU;IACV,IAAI,SAAS,IAAG,OAAO,CAA+B;CACzD;AAED,wBAAgB,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,MAAM,CAE9D"}
|
package/dist/lib.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { updateview } from './jmx';
|
|
2
|
-
export const When = ({ cond }, cn) => cond ? { cn } : void 0;
|
|
3
|
-
export class JMXComp {
|
|
4
|
-
props;
|
|
5
|
-
element;
|
|
6
|
-
constructor(props) {
|
|
7
|
-
this.props = props;
|
|
8
|
-
}
|
|
9
|
-
mounted() { }
|
|
10
|
-
update(uc) { }
|
|
11
|
-
updateview() { updateview(this.element); }
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { updateview } from './jmx';
|
|
2
|
+
export const When = ({ cond }, cn) => cond ? { cn } : void 0;
|
|
3
|
+
export class JMXComp {
|
|
4
|
+
props;
|
|
5
|
+
element;
|
|
6
|
+
constructor(props) {
|
|
7
|
+
this.props = props;
|
|
8
|
+
}
|
|
9
|
+
mounted() { }
|
|
10
|
+
update(uc) { }
|
|
11
|
+
updateview() { updateview(this.element); }
|
|
12
|
+
get ismounted() { return this.element; }
|
|
13
|
+
}
|
|
14
|
+
export function cc(...namesOrObjects) {
|
|
15
|
+
return namesOrObjects.flatMap(n => (n.trim ? n : Object.keys(n).filter(k => n[k]))).join(' ');
|
|
16
|
+
}
|
|
16
17
|
//# sourceMappingURL=lib.js.map
|
package/dist/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"./","sources":["lib.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAIlC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,EAAqB,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAE1F,MAAM,OAAgB,OAAO;IAON;IAJnB,OAAO,CAAc;IAIrB,YAAmB,KAAQ;QAAR,UAAK,GAAL,KAAK,CAAG;IAAI,CAAC;IAGhC,OAAO,KAAK,CAAC;IACb,MAAM,CAAC,EAAmB,IAAoB,CAAC;IAI/C,UAAU,KAAK,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"./","sources":["lib.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAIlC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,EAAqB,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAE1F,MAAM,OAAgB,OAAO;IAON;IAJnB,OAAO,CAAc;IAIrB,YAAmB,KAAQ;QAAR,UAAK,GAAL,KAAK,CAAG;IAAI,CAAC;IAGhC,OAAO,KAAK,CAAC;IACb,MAAM,CAAC,EAAmB,IAAoB,CAAC;IAI/C,UAAU,KAAK,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA,CAAC,CAAC;IACzC,IAAI,SAAS,KAAa,OAAO,IAAI,CAAC,OAAc,CAAA,CAAC,CAAC;CACzD;AAED,MAAM,UAAU,EAAE,CAAC,GAAG,cAAgC;IAClD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACjG,CAAC","sourcesContent":["import { Props, IClassComponent, H, FComponentT, Children } from 'h'\nimport { updateview } from './jmx'\n\nexport type DeepReadonly<T> = { readonly [K in keyof T]: T[K] extends Record<string, unknown> ? DeepReadonly<T[K]> : T[K]; }\n\nexport const When = ({ cond }: { cond: boolean }, cn: Children) => cond ? { cn } : void 0;\n\nexport abstract class JMXComp<P extends Props = {}> implements IClassComponent {\n\n // assigned by jmx framework\n element!: HTMLElement\n\n // we provide this ctor for jsx which uses ctor arguments as properties of class components.\n // at runtime, we pass the props directly\n constructor(public props: P) { }\n\n // overrides\n mounted() { }\n update(uc?: IUpdateContext): boolean | void { }\n abstract view(): H\n\n // utility: updates the component's view\n updateview() { updateview(this.element) }\n get ismounted():boolean { return this.element as any }\n}\n\nexport function cc(...namesOrObjects: (string | any)[]): string {\n return namesOrObjects.flatMap(n => (n.trim ? n : Object.keys(n).filter(k => n[k]))).join(' ') // n.trim distinguishes strings from objects\n}"]}
|
package/h.ts
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
// jmx internal types - hopst
|
|
2
|
-
// the following types describe the js expression we get from tsx after conversion be our jmx plugin
|
|
3
|
-
// they can be useful for users as well, components might return them.
|
|
4
|
-
|
|
5
|
-
type Func<T> = () => T
|
|
6
|
-
export type Expr<T> = T | Func<T>
|
|
7
|
-
|
|
8
|
-
export type Props = Record<string, any>
|
|
9
|
-
|
|
10
|
-
export type FComponent = (props: Props | undefined, children?: ChildrenH) => HElement // show an example for usage of children
|
|
11
|
-
|
|
12
|
-
export type FComponentT<P> = (pcn: P, cn?: Children) => H | void
|
|
13
|
-
|
|
14
|
-
export interface IClassComponent {
|
|
15
|
-
element: Node
|
|
16
|
-
props?: Record<string, any>
|
|
17
|
-
view(): H
|
|
18
|
-
update(uc: IUpdateContext): boolean | void
|
|
19
|
-
mounted?(): void
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface CComponent {
|
|
23
|
-
new (props: any): IClassComponent // while a real component expresses its interface via props pass to the ctor, internally we assign props after construction with new()
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type ChildrenH = (H | undefined)[]
|
|
27
|
-
export type Children = Expr<ChildrenH>
|
|
28
|
-
|
|
29
|
-
type HText =
|
|
30
|
-
| string // text node
|
|
31
|
-
| number // text node
|
|
32
|
-
| boolean // do not allow boolean, that
|
|
33
|
-
|
|
34
|
-
export type HFragment = {
|
|
35
|
-
cn: Children
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type HElement = {
|
|
39
|
-
tag: string
|
|
40
|
-
p?: Expr<Props>
|
|
41
|
-
cn: Children
|
|
42
|
-
i?: any
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
type HCompFun = {
|
|
46
|
-
tag: FComponent
|
|
47
|
-
p?: Expr<Props>
|
|
48
|
-
cn?: Children
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type HCompClass = {
|
|
52
|
-
tag: CComponent
|
|
53
|
-
p?: Expr<Props>
|
|
54
|
-
cn: Children
|
|
55
|
-
i: IClassComponent
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type HComp = HCompFun | HCompClass
|
|
59
|
-
|
|
60
|
-
export type H = // a hyperscript atom that describes a ...
|
|
61
|
-
|
|
62
|
-
| HText
|
|
63
|
-
| HElement // a tag, like p, div with attributes and children
|
|
64
|
-
| HComp // a dynamic component computing any other HNode
|
|
65
|
-
| HFragment
|
|
66
|
-
|
|
67
|
-
declare global {
|
|
68
|
-
interface Node {
|
|
69
|
-
h?: HElement | HCompFun | HCompClass
|
|
70
|
-
}
|
|
71
|
-
export interface IUpdateContext {
|
|
72
|
-
patchElementOnly?: boolean
|
|
73
|
-
replace?: boolean
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface Window {
|
|
77
|
-
jmx?: {
|
|
78
|
-
getnamespace: (tag: string) => string | undefined
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function jsx(): HElement {
|
|
84
|
-
throw 'jmx plugin not configured'
|
|
85
|
-
} // dumy function for app code - jmx-plugin removes calls to this function, minifyer then removes it
|
|
86
|
-
export function jsxf(): HElement {
|
|
87
|
-
throw 'jmx plugin not configured'
|
|
88
|
-
} // dumy function for app code - jmx-plugin removes calls to this function, minifyer then removes it
|
|
1
|
+
// jmx internal types - hopst
|
|
2
|
+
// the following types describe the js expression we get from tsx after conversion be our jmx plugin
|
|
3
|
+
// they can be useful for users as well, components might return them.
|
|
4
|
+
|
|
5
|
+
type Func<T> = () => T
|
|
6
|
+
export type Expr<T> = T | Func<T>
|
|
7
|
+
|
|
8
|
+
export type Props = Record<string, any>
|
|
9
|
+
|
|
10
|
+
export type FComponent = (props: Props | undefined, children?: ChildrenH) => HElement // show an example for usage of children
|
|
11
|
+
|
|
12
|
+
export type FComponentT<P> = (pcn: P, cn?: Children) => H | void
|
|
13
|
+
|
|
14
|
+
export interface IClassComponent {
|
|
15
|
+
element: Node
|
|
16
|
+
props?: Record<string, any>
|
|
17
|
+
view(): H
|
|
18
|
+
update(uc: IUpdateContext): boolean | void
|
|
19
|
+
mounted?(): void
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface CComponent {
|
|
23
|
+
new (props: any): IClassComponent // while a real component expresses its interface via props pass to the ctor, internally we assign props after construction with new()
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ChildrenH = (H | undefined)[]
|
|
27
|
+
export type Children = Expr<ChildrenH>
|
|
28
|
+
|
|
29
|
+
type HText =
|
|
30
|
+
| string // text node
|
|
31
|
+
| number // text node
|
|
32
|
+
| boolean // do not allow boolean, that
|
|
33
|
+
|
|
34
|
+
export type HFragment = {
|
|
35
|
+
cn: Children
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type HElement = {
|
|
39
|
+
tag: string
|
|
40
|
+
p?: Expr<Props>
|
|
41
|
+
cn: Children
|
|
42
|
+
i?: any
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type HCompFun = {
|
|
46
|
+
tag: FComponent
|
|
47
|
+
p?: Expr<Props>
|
|
48
|
+
cn?: Children
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type HCompClass = {
|
|
52
|
+
tag: CComponent
|
|
53
|
+
p?: Expr<Props>
|
|
54
|
+
cn: Children
|
|
55
|
+
i: IClassComponent
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type HComp = HCompFun | HCompClass
|
|
59
|
+
|
|
60
|
+
export type H = // a hyperscript atom that describes a ...
|
|
61
|
+
|
|
62
|
+
| HText
|
|
63
|
+
| HElement // a tag, like p, div with attributes and children
|
|
64
|
+
| HComp // a dynamic component computing any other HNode
|
|
65
|
+
| HFragment
|
|
66
|
+
|
|
67
|
+
declare global {
|
|
68
|
+
interface Node {
|
|
69
|
+
h?: HElement | HCompFun | HCompClass
|
|
70
|
+
}
|
|
71
|
+
export interface IUpdateContext {
|
|
72
|
+
patchElementOnly?: boolean
|
|
73
|
+
replace?: boolean
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface Window {
|
|
77
|
+
jmx?: {
|
|
78
|
+
getnamespace: (tag: string) => string | undefined
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function jsx(): HElement {
|
|
84
|
+
throw 'jmx plugin not configured'
|
|
85
|
+
} // dumy function for app code - jmx-plugin removes calls to this function, minifyer then removes it
|
|
86
|
+
export function jsxf(): HElement {
|
|
87
|
+
throw 'jmx plugin not configured'
|
|
88
|
+
} // dumy function for app code - jmx-plugin removes calls to this function, minifyer then removes it
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './jmx';
|
|
2
|
-
export * from './lib';
|
|
3
|
-
export * from './base';
|
|
4
|
-
export * from './h';
|
|
5
|
-
export * from './jsx';
|
|
1
|
+
export * from './jmx';
|
|
2
|
+
export * from './lib';
|
|
3
|
+
export * from './base';
|
|
4
|
+
export * from './h';
|
|
5
|
+
export * from './jsx';
|