Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Jsx and JsxDOM inside Pervasives. #6091

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -79,6 +79,7 @@ These are only breaking changes for unformatted code.
- Add support for `|>` in uncurried mode by desugaring it https://github.com/rescript-lang/rescript-compiler/pull/6083
- Change the compilation of pattern matching for variants so it does not depends on variats being integers https://github.com/rescript-lang/rescript-compiler/pull/6085
- Improve code generated for string templates https://github.com/rescript-lang/rescript-compiler/pull/6090
- Move Jsx and JsxDOM and JsxEvent and JsxPPXReactSupport inside Pervasives and build them separately for curried and uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/6091

# 10.1.4

2 changes: 2 additions & 0 deletions jscomp/others/jsx.res → jscomp/others/jsxC.res
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

/*** Internal: use Jsx directly. */

type element
type ref

164 changes: 83 additions & 81 deletions jscomp/others/jsxDOM.res → jscomp/others/jsxDOMC.res
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

/*** Internal: use JsxDOM directly. */

type style = JsxDOMStyle.t
type domRef

@@ -30,7 +32,7 @@ type domRef
*/
type domProps = {
key?: string,
children?: Jsx.element,
children?: JsxC.element,
ref?: domRef,
/* accessibility */
/* https://www.w3.org/TR/wai-aria-1.1/ */
@@ -260,100 +262,100 @@ type domProps = {
width?: string /* in html5 this can only be a number, but in html4 it can ba a percentage as well */,
wrap?: string /* "hard" or "soft" */,
/* Clipboard events */
onCopy?: JsxEvent.Clipboard.t => unit,
onCut?: JsxEvent.Clipboard.t => unit,
onPaste?: JsxEvent.Clipboard.t => unit,
onCopy?: JsxEventC.Clipboard.t => unit,
onCut?: JsxEventC.Clipboard.t => unit,
onPaste?: JsxEventC.Clipboard.t => unit,
/* Composition events */
onCompositionEnd?: JsxEvent.Composition.t => unit,
onCompositionStart?: JsxEvent.Composition.t => unit,
onCompositionUpdate?: JsxEvent.Composition.t => unit,
onCompositionEnd?: JsxEventC.Composition.t => unit,
onCompositionStart?: JsxEventC.Composition.t => unit,
onCompositionUpdate?: JsxEventC.Composition.t => unit,
/* Keyboard events */
onKeyDown?: JsxEvent.Keyboard.t => unit,
onKeyPress?: JsxEvent.Keyboard.t => unit,
onKeyUp?: JsxEvent.Keyboard.t => unit,
onKeyDown?: JsxEventC.Keyboard.t => unit,
onKeyPress?: JsxEventC.Keyboard.t => unit,
onKeyUp?: JsxEventC.Keyboard.t => unit,
/* Focus events */
onFocus?: JsxEvent.Focus.t => unit,
onBlur?: JsxEvent.Focus.t => unit,
onFocus?: JsxEventC.Focus.t => unit,
onBlur?: JsxEventC.Focus.t => unit,
/* Form events */
onBeforeInput?: JsxEvent.Form.t => unit,
onChange?: JsxEvent.Form.t => unit,
onInput?: JsxEvent.Form.t => unit,
onReset?: JsxEvent.Form.t => unit,
onSubmit?: JsxEvent.Form.t => unit,
onInvalid?: JsxEvent.Form.t => unit,
onBeforeInput?: JsxEventC.Form.t => unit,
onChange?: JsxEventC.Form.t => unit,
onInput?: JsxEventC.Form.t => unit,
onReset?: JsxEventC.Form.t => unit,
onSubmit?: JsxEventC.Form.t => unit,
onInvalid?: JsxEventC.Form.t => unit,
/* Mouse events */
onClick?: JsxEvent.Mouse.t => unit,
onContextMenu?: JsxEvent.Mouse.t => unit,
onDoubleClick?: JsxEvent.Mouse.t => unit,
onDrag?: JsxEvent.Mouse.t => unit,
onDragEnd?: JsxEvent.Mouse.t => unit,
onDragEnter?: JsxEvent.Mouse.t => unit,
onDragExit?: JsxEvent.Mouse.t => unit,
onDragLeave?: JsxEvent.Mouse.t => unit,
onDragOver?: JsxEvent.Mouse.t => unit,
onDragStart?: JsxEvent.Mouse.t => unit,
onDrop?: JsxEvent.Mouse.t => unit,
onMouseDown?: JsxEvent.Mouse.t => unit,
onMouseEnter?: JsxEvent.Mouse.t => unit,
onMouseLeave?: JsxEvent.Mouse.t => unit,
onMouseMove?: JsxEvent.Mouse.t => unit,
onMouseOut?: JsxEvent.Mouse.t => unit,
onMouseOver?: JsxEvent.Mouse.t => unit,
onMouseUp?: JsxEvent.Mouse.t => unit,
onClick?: JsxEventC.Mouse.t => unit,
onContextMenu?: JsxEventC.Mouse.t => unit,
onDoubleClick?: JsxEventC.Mouse.t => unit,
onDrag?: JsxEventC.Mouse.t => unit,
onDragEnd?: JsxEventC.Mouse.t => unit,
onDragEnter?: JsxEventC.Mouse.t => unit,
onDragExit?: JsxEventC.Mouse.t => unit,
onDragLeave?: JsxEventC.Mouse.t => unit,
onDragOver?: JsxEventC.Mouse.t => unit,
onDragStart?: JsxEventC.Mouse.t => unit,
onDrop?: JsxEventC.Mouse.t => unit,
onMouseDown?: JsxEventC.Mouse.t => unit,
onMouseEnter?: JsxEventC.Mouse.t => unit,
onMouseLeave?: JsxEventC.Mouse.t => unit,
onMouseMove?: JsxEventC.Mouse.t => unit,
onMouseOut?: JsxEventC.Mouse.t => unit,
onMouseOver?: JsxEventC.Mouse.t => unit,
onMouseUp?: JsxEventC.Mouse.t => unit,
/* Selection events */
onSelect?: JsxEvent.Selection.t => unit,
onSelect?: JsxEventC.Selection.t => unit,
/* Touch events */
onTouchCancel?: JsxEvent.Touch.t => unit,
onTouchEnd?: JsxEvent.Touch.t => unit,
onTouchMove?: JsxEvent.Touch.t => unit,
onTouchStart?: JsxEvent.Touch.t => unit,
onTouchCancel?: JsxEventC.Touch.t => unit,
onTouchEnd?: JsxEventC.Touch.t => unit,
onTouchMove?: JsxEventC.Touch.t => unit,
onTouchStart?: JsxEventC.Touch.t => unit,
// Pointer events
onPointerOver?: JsxEvent.Pointer.t => unit,
onPointerEnter?: JsxEvent.Pointer.t => unit,
onPointerDown?: JsxEvent.Pointer.t => unit,
onPointerMove?: JsxEvent.Pointer.t => unit,
onPointerUp?: JsxEvent.Pointer.t => unit,
onPointerCancel?: JsxEvent.Pointer.t => unit,
onPointerOut?: JsxEvent.Pointer.t => unit,
onPointerLeave?: JsxEvent.Pointer.t => unit,
onGotPointerCapture?: JsxEvent.Pointer.t => unit,
onLostPointerCapture?: JsxEvent.Pointer.t => unit,
onPointerOver?: JsxEventC.Pointer.t => unit,
onPointerEnter?: JsxEventC.Pointer.t => unit,
onPointerDown?: JsxEventC.Pointer.t => unit,
onPointerMove?: JsxEventC.Pointer.t => unit,
onPointerUp?: JsxEventC.Pointer.t => unit,
onPointerCancel?: JsxEventC.Pointer.t => unit,
onPointerOut?: JsxEventC.Pointer.t => unit,
onPointerLeave?: JsxEventC.Pointer.t => unit,
onGotPointerCapture?: JsxEventC.Pointer.t => unit,
onLostPointerCapture?: JsxEventC.Pointer.t => unit,
/* UI events */
onScroll?: JsxEvent.UI.t => unit,
onScroll?: JsxEventC.UI.t => unit,
/* Wheel events */
onWheel?: JsxEvent.Wheel.t => unit,
onWheel?: JsxEventC.Wheel.t => unit,
/* Media events */
onAbort?: JsxEvent.Media.t => unit,
onCanPlay?: JsxEvent.Media.t => unit,
onCanPlayThrough?: JsxEvent.Media.t => unit,
onDurationChange?: JsxEvent.Media.t => unit,
onEmptied?: JsxEvent.Media.t => unit,
onEncrypted?: JsxEvent.Media.t => unit,
onEnded?: JsxEvent.Media.t => unit,
onError?: JsxEvent.Media.t => unit,
onLoadedData?: JsxEvent.Media.t => unit,
onLoadedMetadata?: JsxEvent.Media.t => unit,
onLoadStart?: JsxEvent.Media.t => unit,
onPause?: JsxEvent.Media.t => unit,
onPlay?: JsxEvent.Media.t => unit,
onPlaying?: JsxEvent.Media.t => unit,
onProgress?: JsxEvent.Media.t => unit,
onRateChange?: JsxEvent.Media.t => unit,
onSeeked?: JsxEvent.Media.t => unit,
onSeeking?: JsxEvent.Media.t => unit,
onStalled?: JsxEvent.Media.t => unit,
onSuspend?: JsxEvent.Media.t => unit,
onTimeUpdate?: JsxEvent.Media.t => unit,
onVolumeChange?: JsxEvent.Media.t => unit,
onWaiting?: JsxEvent.Media.t => unit,
onAbort?: JsxEventC.Media.t => unit,
onCanPlay?: JsxEventC.Media.t => unit,
onCanPlayThrough?: JsxEventC.Media.t => unit,
onDurationChange?: JsxEventC.Media.t => unit,
onEmptied?: JsxEventC.Media.t => unit,
onEncrypted?: JsxEventC.Media.t => unit,
onEnded?: JsxEventC.Media.t => unit,
onError?: JsxEventC.Media.t => unit,
onLoadedData?: JsxEventC.Media.t => unit,
onLoadedMetadata?: JsxEventC.Media.t => unit,
onLoadStart?: JsxEventC.Media.t => unit,
onPause?: JsxEventC.Media.t => unit,
onPlay?: JsxEventC.Media.t => unit,
onPlaying?: JsxEventC.Media.t => unit,
onProgress?: JsxEventC.Media.t => unit,
onRateChange?: JsxEventC.Media.t => unit,
onSeeked?: JsxEventC.Media.t => unit,
onSeeking?: JsxEventC.Media.t => unit,
onStalled?: JsxEventC.Media.t => unit,
onSuspend?: JsxEventC.Media.t => unit,
onTimeUpdate?: JsxEventC.Media.t => unit,
onVolumeChange?: JsxEventC.Media.t => unit,
onWaiting?: JsxEventC.Media.t => unit,
/* Image events */
onLoad?: JsxEvent.Image.t => unit /* duplicate */ /* ~onError: ReactEvent.Image.t => unit=?, */,
onLoad?: JsxEventC.Image.t => unit /* duplicate */ /* ~onError: ReactEvent.Image.t => unit=?, */,
/* Animation events */
onAnimationStart?: JsxEvent.Animation.t => unit,
onAnimationEnd?: JsxEvent.Animation.t => unit,
onAnimationIteration?: JsxEvent.Animation.t => unit,
onAnimationStart?: JsxEventC.Animation.t => unit,
onAnimationEnd?: JsxEventC.Animation.t => unit,
onAnimationIteration?: JsxEventC.Animation.t => unit,
/* Transition events */
onTransitionEnd?: JsxEvent.Transition.t => unit,
onTransitionEnd?: JsxEventC.Transition.t => unit,
/* svg */
accentHeight?: string,
accumulate?: string,
624 changes: 624 additions & 0 deletions jscomp/others/jsxDOMU.res

Large diffs are not rendered by default.

358 changes: 0 additions & 358 deletions jscomp/others/jsxEvent.ml

This file was deleted.

348 changes: 348 additions & 0 deletions jscomp/others/jsxEventC.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,348 @@
/* Copyright (C) 2015-2016 Bloomberg Finance L.P.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a later version).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

/*** Internal: use JsxEvent directly. */

type synthetic<'a>

module MakeEventWithType = (
Type: {
type t
},
) => {
@get external bubbles: Type.t => bool = "bubbles"
@get external cancelable: Type.t => bool = "cancelable"
@get external currentTarget: Type.t => {..} = "currentTarget"

/* Should return Dom.eventTarget */
@get external defaultPrevented: Type.t => bool = "defaultPrevented"
@get external eventPhase: Type.t => int = "eventPhase"
@get external isTrusted: Type.t => bool = "isTrusted"
@get external nativeEvent: Type.t => {..} = "nativeEvent"

/* Should return Dom.event */
@send external preventDefault: Type.t => unit = "preventDefault"

@send external isDefaultPrevented: Type.t => bool = "isDefaultPrevented"

@send external stopPropagation: Type.t => unit = "stopPropagation"

@send external isPropagationStopped: Type.t => bool = "isPropagationStopped"

@get external target: Type.t => {..} = "target"

/* Should return Dom.eventTarget */
@get external timeStamp: Type.t => float = "timeStamp"
@get external type_: Type.t => string = "type"
@send external persist: Type.t => unit = "persist"
}

module Synthetic = {
type tag
type t = synthetic<tag>

@get external bubbles: synthetic<'a> => bool = "bubbles"
@get external cancelable: synthetic<'a> => bool = "cancelable"
@get external currentTarget: synthetic<'a> => {..} = "currentTarget"
/* Should return Dom.eventTarget */

@get external defaultPrevented: synthetic<'a> => bool = "defaultPrevented"

@get external eventPhase: synthetic<'a> => int = "eventPhase"
@get external isTrusted: synthetic<'a> => bool = "isTrusted"
@get external nativeEvent: synthetic<'a> => {..} = "nativeEvent"

/* Should return Dom.event */
@send external preventDefault: synthetic<'a> => unit = "preventDefault"

@send external isDefaultPrevented: synthetic<'a> => bool = "isDefaultPrevented"

@send external stopPropagation: synthetic<'a> => unit = "stopPropagation"

@send external isPropagationStopped: synthetic<'a> => bool = "isPropagationStopped"

@get external target: synthetic<'a> => {..} = "target"

/* Should return Dom.eventTarget */
@get external timeStamp: synthetic<'a> => float = "timeStamp"
@get external type_: synthetic<'a> => string = "type"
@send external persist: synthetic<'a> => unit = "persist"
}

/* Cast any event type to the general synthetic type. This is safe, since synthetic is more general */
external toSyntheticEvent: synthetic<'a> => Synthetic.t = "%identity"

module Clipboard = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external clipboardData: t => {..} = "clipboardData"
/* Should return Dom.dataTransfer */
}

module Composition = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external data: t => string = "data"
}

module Keyboard = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external altKey: t => bool = "altKey"
@get external charCode: t => int = "charCode"
@get external ctrlKey: t => bool = "ctrlKey"

@send external getModifierState: (t, string) => bool = "getModifierState"

@get external key: t => string = "key"
@get external keyCode: t => int = "keyCode"
@get external locale: t => string = "locale"
@get external location: t => int = "location"
@get external metaKey: t => bool = "metaKey"
@get external repeat: t => bool = "repeat"
@get external shiftKey: t => bool = "shiftKey"
@get external which: t => int = "which"
}

module Focus = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get @return(nullable) external relatedTarget: t => option<{..}> = "relatedTarget"
/* Should return Dom.eventTarget */
}

module Form = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})
}

module Mouse = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external altKey: t => bool = "altKey"
@get external button: t => int = "button"
@get external buttons: t => int = "buttons"
@get external clientX: t => int = "clientX"
@get external clientY: t => int = "clientY"
@get external ctrlKey: t => bool = "ctrlKey"

@get external getModifierState: (t => string) => bool = "getModifierState"

@get external metaKey: t => bool = "metaKey"
@get external movementX: t => int = "movementX"
@get external movementY: t => int = "movementY"
@get external pageX: t => int = "pageX"
@get external pageY: t => int = "pageY"

@get @return(nullable) external relatedTarget: t => option<{..}> = "relatedTarget"

/* Should return Dom.eventTarget */
@get external screenX: t => int = "screenX"
@get external screenY: t => int = "screenY"
@get external shiftKey: t => bool = "shiftKey"
}

module Pointer = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

/* UIEvent */
@get @get
external detail: t => int = "detail"

/* external view : t -> Dom.window = "view" */
/* Should return DOMAbstractView/WindowProxy */

/* MouseEvent */
@get external screenX: t => int = "screenX"
@get external screenY: t => int = "screenY"
@get external clientX: t => int = "clientX"
@get external clientY: t => int = "clientY"
@get external pageX: t => int = "pageX"
@get external pageY: t => int = "pageY"
@get external movementX: t => int = "movementX"
@get external movementY: t => int = "movementY"
@get external ctrlKey: t => bool = "ctrlKey"
@get external shiftKey: t => bool = "shiftKey"
@get external altKey: t => bool = "altKey"
@get external metaKey: t => bool = "metaKey"

@get external getModifierState: (t => string) => bool = "getModifierState"

@get external button: t => int = "button"
@get external buttons: t => int = "buttons"

@get @return(nullable) external relatedTarget: t => option<{..}> = "relatedTarget"
/* Should return Dom.eventTarget */

/* PointerEvent */
/* external pointerId : t -> Dom.eventPointerId = "pointerId" [@@bs.get] */
@get external width: t => float = "width"
@get external height: t => float = "height"
@get external pressure: t => float = "pressure"
@get external tangentialPressure: t => float = "tangentialPressure"
@get external tiltX: t => int = "tiltX"
@get external tiltY: t => int = "tiltY"
@get external twist: t => int = "twist"
@get external pointerType: t => string = "pointerType"
@get external isPrimary: t => bool = "isPrimary"
}

module Selection = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})
}

module Touch = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external altKey: t => bool = "altKey"
@get external changedTouches: t => {..} = "changedTouches"
/* Should return Dom.touchList */

@get external ctrlKey: t => bool = "ctrlKey"

@send external getModifierState: (t => string) => bool = "getModifierState"

@get external metaKey: t => bool = "metaKey"
@get external shiftKey: t => bool = "shiftKey"
@get external targetTouches: t => {..} = "targetTouches"
/* Should return Dom.touchList */

@get external touches: t => {..} = "touches"
/* Should return Dom.touchList */
}

module UI = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external detail: t => int = "detail"
/* external view : t -> Dom.window = "view" [@@bs.get] */
/* Should return DOMAbstractView/WindowProxy */
}

module Wheel = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external deltaMode: t => int = "deltaMode"
@get external deltaX: t => float = "deltaX"
@get external deltaY: t => float = "deltaY"
@get external deltaZ: t => float = "deltaZ"
}

module Media = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})
}

module Image = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})
}

module Animation = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external animationName: t => string = "animationName"
@get external pseudoElement: t => string = "pseudoElement"
@get external elapsedTime: t => float = "elapsedTime"
}

module Transition = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external propertyName: t => string = "propertyName"
@get external pseudoElement: t => string = "pseudoElement"
@get external elapsedTime: t => float = "elapsedTime"
}
350 changes: 350 additions & 0 deletions jscomp/others/jsxEventU.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,350 @@
/* Copyright (C) 2015-2016 Bloomberg Finance L.P.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a later version).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

/*** Internal: use JsxEvent directly. */

@@uncurried

type synthetic<'a>

module MakeEventWithType = (
Type: {
type t
},
) => {
@get external bubbles: Type.t => bool = "bubbles"
@get external cancelable: Type.t => bool = "cancelable"
@get external currentTarget: Type.t => {..} = "currentTarget"

/* Should return Dom.eventTarget */
@get external defaultPrevented: Type.t => bool = "defaultPrevented"
@get external eventPhase: Type.t => int = "eventPhase"
@get external isTrusted: Type.t => bool = "isTrusted"
@get external nativeEvent: Type.t => {..} = "nativeEvent"

/* Should return Dom.event */
@send external preventDefault: Type.t => unit = "preventDefault"

@send external isDefaultPrevented: Type.t => bool = "isDefaultPrevented"

@send external stopPropagation: Type.t => unit = "stopPropagation"

@send external isPropagationStopped: Type.t => bool = "isPropagationStopped"

@get external target: Type.t => {..} = "target"

/* Should return Dom.eventTarget */
@get external timeStamp: Type.t => float = "timeStamp"
@get external type_: Type.t => string = "type"
@send external persist: Type.t => unit = "persist"
}

module Synthetic = {
type tag
type t = synthetic<tag>

@get external bubbles: synthetic<'a> => bool = "bubbles"
@get external cancelable: synthetic<'a> => bool = "cancelable"
@get external currentTarget: synthetic<'a> => {..} = "currentTarget"
/* Should return Dom.eventTarget */

@get external defaultPrevented: synthetic<'a> => bool = "defaultPrevented"

@get external eventPhase: synthetic<'a> => int = "eventPhase"
@get external isTrusted: synthetic<'a> => bool = "isTrusted"
@get external nativeEvent: synthetic<'a> => {..} = "nativeEvent"

/* Should return Dom.event */
@send external preventDefault: synthetic<'a> => unit = "preventDefault"

@send external isDefaultPrevented: synthetic<'a> => bool = "isDefaultPrevented"

@send external stopPropagation: synthetic<'a> => unit = "stopPropagation"

@send external isPropagationStopped: synthetic<'a> => bool = "isPropagationStopped"

@get external target: synthetic<'a> => {..} = "target"

/* Should return Dom.eventTarget */
@get external timeStamp: synthetic<'a> => float = "timeStamp"
@get external type_: synthetic<'a> => string = "type"
@send external persist: synthetic<'a> => unit = "persist"
}

/* Cast any event type to the general synthetic type. This is safe, since synthetic is more general */
external toSyntheticEvent: synthetic<'a> => Synthetic.t = "%identity"

module Clipboard = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external clipboardData: t => {..} = "clipboardData"
/* Should return Dom.dataTransfer */
}

module Composition = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external data: t => string = "data"
}

module Keyboard = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external altKey: t => bool = "altKey"
@get external charCode: t => int = "charCode"
@get external ctrlKey: t => bool = "ctrlKey"

@send external getModifierState: (t, string) => bool = "getModifierState"

@get external key: t => string = "key"
@get external keyCode: t => int = "keyCode"
@get external locale: t => string = "locale"
@get external location: t => int = "location"
@get external metaKey: t => bool = "metaKey"
@get external repeat: t => bool = "repeat"
@get external shiftKey: t => bool = "shiftKey"
@get external which: t => int = "which"
}

module Focus = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get @return(nullable) external relatedTarget: t => option<{..}> = "relatedTarget"
/* Should return Dom.eventTarget */
}

module Form = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})
}

module Mouse = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external altKey: t => bool = "altKey"
@get external button: t => int = "button"
@get external buttons: t => int = "buttons"
@get external clientX: t => int = "clientX"
@get external clientY: t => int = "clientY"
@get external ctrlKey: t => bool = "ctrlKey"

@get external getModifierState: (t => string) => bool = "getModifierState"

@get external metaKey: t => bool = "metaKey"
@get external movementX: t => int = "movementX"
@get external movementY: t => int = "movementY"
@get external pageX: t => int = "pageX"
@get external pageY: t => int = "pageY"

@get @return(nullable) external relatedTarget: t => option<{..}> = "relatedTarget"

/* Should return Dom.eventTarget */
@get external screenX: t => int = "screenX"
@get external screenY: t => int = "screenY"
@get external shiftKey: t => bool = "shiftKey"
}

module Pointer = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

/* UIEvent */
@get @get
external detail: t => int = "detail"

/* external view : t -> Dom.window = "view" */
/* Should return DOMAbstractView/WindowProxy */

/* MouseEvent */
@get external screenX: t => int = "screenX"
@get external screenY: t => int = "screenY"
@get external clientX: t => int = "clientX"
@get external clientY: t => int = "clientY"
@get external pageX: t => int = "pageX"
@get external pageY: t => int = "pageY"
@get external movementX: t => int = "movementX"
@get external movementY: t => int = "movementY"
@get external ctrlKey: t => bool = "ctrlKey"
@get external shiftKey: t => bool = "shiftKey"
@get external altKey: t => bool = "altKey"
@get external metaKey: t => bool = "metaKey"

@get external getModifierState: (t => string) => bool = "getModifierState"

@get external button: t => int = "button"
@get external buttons: t => int = "buttons"

@get @return(nullable) external relatedTarget: t => option<{..}> = "relatedTarget"
/* Should return Dom.eventTarget */

/* PointerEvent */
/* external pointerId : t -> Dom.eventPointerId = "pointerId" [@@bs.get] */
@get external width: t => float = "width"
@get external height: t => float = "height"
@get external pressure: t => float = "pressure"
@get external tangentialPressure: t => float = "tangentialPressure"
@get external tiltX: t => int = "tiltX"
@get external tiltY: t => int = "tiltY"
@get external twist: t => int = "twist"
@get external pointerType: t => string = "pointerType"
@get external isPrimary: t => bool = "isPrimary"
}

module Selection = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})
}

module Touch = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external altKey: t => bool = "altKey"
@get external changedTouches: t => {..} = "changedTouches"
/* Should return Dom.touchList */

@get external ctrlKey: t => bool = "ctrlKey"

@send external getModifierState: (t => string) => bool = "getModifierState"

@get external metaKey: t => bool = "metaKey"
@get external shiftKey: t => bool = "shiftKey"
@get external targetTouches: t => {..} = "targetTouches"
/* Should return Dom.touchList */

@get external touches: t => {..} = "touches"
/* Should return Dom.touchList */
}

module UI = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external detail: t => int = "detail"
/* external view : t -> Dom.window = "view" [@@bs.get] */
/* Should return DOMAbstractView/WindowProxy */
}

module Wheel = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external deltaMode: t => int = "deltaMode"
@get external deltaX: t => float = "deltaX"
@get external deltaY: t => float = "deltaY"
@get external deltaZ: t => float = "deltaZ"
}

module Media = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})
}

module Image = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})
}

module Animation = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external animationName: t => string = "animationName"
@get external pseudoElement: t => string = "pseudoElement"
@get external elapsedTime: t => float = "elapsedTime"
}

module Transition = {
type tag
type t = synthetic<tag>

include MakeEventWithType({
type t = t
})

@get external propertyName: t => string = "propertyName"
@get external pseudoElement: t => string = "pseudoElement"
@get external elapsedTime: t => float = "elapsedTime"
}
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

module Jsx = JsxC

%%private(
@val
external propsWithKey: (@as(json`{}`) _, 'props, {"key": string}) => 'props = "Object.assign"
@@ -45,4 +47,4 @@ let createElementWithKey = (~key=?, component, props) =>
createElement(component, addKeyProp(~key?, props))

let createElementVariadicWithKey = (~key=?, component, props, elements) =>
createElementVariadic(component, addKeyProp(~key?, props), elements)
createElementVariadic(component, addKeyProp(~key?, props), elements)
52 changes: 52 additions & 0 deletions jscomp/others/jsxPPXReactSupportU.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* Copyright (C) 2022- Authors of ReScript
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a later version).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

module Jsx = JsxU

%%private(
@val
external propsWithKey: (@as(json`{}`) _, 'props, {"key": string}) => 'props = "Object.assign"

@inline
let addKeyProp = (~key: option<string>=?, p: 'props): 'props =>
switch key {
| Some(key) => propsWithKey(p, {"key": key})
| None => p
}
)

@@uncurried // Can't move this up as @inline not working with uncurried

@module("react")
external createElement: (Jsx.component<'props>, 'props) => Jsx.element = "createElement"

@variadic @module("react")
external createElementVariadic: (Jsx.component<'props>, 'props, array<Jsx.element>) => Jsx.element =
"createElement"

let createElementWithKey = (~key=?, component, props) =>
createElement(component, addKeyProp(~key?, props))

let createElementVariadicWithKey = (~key=?, component, props, elements) =>
createElementVariadic(component, addKeyProp(~key?, props), elements)
20 changes: 20 additions & 0 deletions jscomp/others/jsxU.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*** Internal: use Jsx directly. */

@@uncurried

type element
type ref

@val external null: element = "null"

external float: float => element = "%identity"
external int: int => element = "%identity"
external string: string => element = "%identity"

external array: array<element> => element = "%identity"

type componentLike<'props, 'return> = 'props => 'return
type component<'props> = componentLike<'props, element>

/* this function exists to prepare for making `component` abstract */
external component: componentLike<'props, element> => component<'props> = "%identity"
14 changes: 9 additions & 5 deletions jscomp/others/release.ninja
Original file line number Diff line number Diff line change
@@ -64,12 +64,16 @@ o others/js_vector.cmj : cc_cmi others/js_vector.ml | others/belt_internals.cmi
o others/js_vector.cmi : cc others/js_vector.mli | others/belt_internals.cmi others/js.cmi $bsc
o others/js_weakmap.cmi others/js_weakmap.cmj : cc others/js_weakmap.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/js_weakset.cmi others/js_weakset.cmj : cc others/js_weakset.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/jsx.cmi others/jsx.cmj : cc others/jsx.res | others/belt_internals.cmi others/js.cmi $bsc
o others/jsxDOM.cmi others/jsxDOM.cmj : cc others/jsxDOM.res | others/belt_internals.cmi others/js.cmi others/jsx.cmj others/jsxDOMStyle.cmj others/jsxEvent.cmj $bsc
o others/jsxC.cmi others/jsxC.cmj : cc others/jsxC.res | others/belt_internals.cmi others/js.cmi $bsc
o others/jsxDOMC.cmi others/jsxDOMC.cmj : cc others/jsxDOMC.res | others/belt_internals.cmi others/js.cmi others/jsxC.cmj others/jsxDOMStyle.cmj others/jsxEventC.cmj $bsc
o others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj : cc others/jsxDOMStyle.res | others/belt_internals.cmi others/js.cmi $bsc
o others/jsxEvent.cmi others/jsxEvent.cmj : cc others/jsxEvent.ml | others/belt_internals.cmi others/js.cmi $bsc
o others/jsxPPXReactSupport.cmi others/jsxPPXReactSupport.cmj : cc others/jsxPPXReactSupport.res | others/belt_internals.cmi others/js.cmi others/jsx.cmj $bsc
o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_list.cmi others/js_list.cmj others/js_map.cmi others/js_map.cmj others/js_mapperRt.cmi others/js_mapperRt.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_promise2.cmi others/js_promise2.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_set.cmi others/js_set.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array.cmi others/js_typed_array.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_vector.cmi others/js_vector.cmj others/js_weakmap.cmi others/js_weakmap.cmj others/js_weakset.cmi others/js_weakset.cmj others/jsx.cmi others/jsx.cmj others/jsxDOM.cmi others/jsxDOM.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxEvent.cmi others/jsxEvent.cmj others/jsxPPXReactSupport.cmi others/jsxPPXReactSupport.cmj
o others/jsxDOMU.cmi others/jsxDOMU.cmj : cc others/jsxDOMU.res | others/belt_internals.cmi others/js.cmi others/jsxDOMStyle.cmj others/jsxEventU.cmj others/jsxU.cmj $bsc
o others/jsxEventC.cmi others/jsxEventC.cmj : cc others/jsxEventC.res | others/belt_internals.cmi others/js.cmi $bsc
o others/jsxEventU.cmi others/jsxEventU.cmj : cc others/jsxEventU.res | others/belt_internals.cmi others/js.cmi $bsc
o others/jsxPPXReactSupportC.cmi others/jsxPPXReactSupportC.cmj : cc others/jsxPPXReactSupportC.res | others/belt_internals.cmi others/js.cmi others/jsxC.cmj $bsc
o others/jsxPPXReactSupportU.cmi others/jsxPPXReactSupportU.cmj : cc others/jsxPPXReactSupportU.res | others/belt_internals.cmi others/js.cmi others/jsxU.cmj $bsc
o others/jsxU.cmi others/jsxU.cmj : cc others/jsxU.res | others/belt_internals.cmi others/js.cmi $bsc
o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_list.cmi others/js_list.cmj others/js_map.cmi others/js_map.cmj others/js_mapperRt.cmi others/js_mapperRt.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_promise2.cmi others/js_promise2.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_set.cmi others/js_set.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array.cmi others/js_typed_array.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_vector.cmi others/js_vector.cmj others/js_weakmap.cmi others/js_weakmap.cmj others/js_weakset.cmi others/js_weakset.cmj others/jsxC.cmi others/jsxC.cmj others/jsxDOMC.cmi others/jsxDOMC.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxDOMU.cmi others/jsxDOMU.cmj others/jsxEventC.cmi others/jsxEventC.cmj others/jsxEventU.cmi others/jsxEventU.cmj others/jsxPPXReactSupportC.cmi others/jsxPPXReactSupportC.cmj others/jsxPPXReactSupportU.cmi others/jsxPPXReactSupportU.cmj others/jsxU.cmi others/jsxU.cmj
o others/belt_Array.cmj : cc_cmi others/belt_Array.ml | others/belt.cmi others/belt_Array.cmi others/belt_internals.cmi others/js.cmi others/js.cmj others/js_math.cmj $bsc js_pkg
o others/belt_Array.cmi : cc others/belt_Array.mli | others/belt.cmi others/belt_internals.cmi others/js.cmi others/js.cmj $bsc js_pkg
o others/belt_Float.cmj : cc_cmi others/belt_Float.ml | others/belt.cmi others/belt_Float.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg
11 changes: 10 additions & 1 deletion jscomp/stdlib-406/pervasives.res
Original file line number Diff line number Diff line change
@@ -13,7 +13,16 @@
/* */
/* ************************************************************************ */

/* type 'a option = None | Some of 'a */
module Jsx = JsxC
module JsxEvent = JsxEventC
module JsxDOM = JsxDOMC
module JsxPPXReactSupport = JsxPPXReactSupportC

module JsxModules = {
module Jsx = JsxC
module JsxEvent = JsxEventC
module JsxDOM = JsxDOMC
}

/* Internal */
external __unsafe_cast: 'a => 'b = "%identity"
451 changes: 231 additions & 220 deletions jscomp/stdlib-406/pervasives.resi

Large diffs are not rendered by default.

25 changes: 8 additions & 17 deletions jscomp/stdlib-406/pervasivesU.res
Original file line number Diff line number Diff line change
@@ -15,23 +15,14 @@

@@uncurried

module Jsx = {
type element
type ref

@val external null: element = "null"

external float: float => element = "%identity"
external int: int => element = "%identity"
external string: string => element = "%identity"

external array: array<element> => element = "%identity"

type componentLike<'props, 'return> = 'props => 'return
type component<'props> = componentLike<'props, element>

/* this function exists to prepare for making `component` abstract */
external component: componentLike<'props, element> => component<'props> = "%identity"
module Jsx = JsxU
module JsxEvent = JsxEventU
module JsxDOM = JsxDOMU
module JsxPPXReactSupport = JsxPPXReactSupportU
module JsxModules = {
module Jsx = JsxU
module JsxEvent = JsxEventU
module JsxDOM = JsxDOMU
}

/* Internal */
510 changes: 250 additions & 260 deletions jscomp/stdlib-406/pervasivesU.resi

Large diffs are not rendered by default.

5,934 changes: 2,967 additions & 2,967 deletions jscomp/test/flow_parser_reg_test.js

Large diffs are not rendered by default.

940 changes: 470 additions & 470 deletions jscomp/test/ocaml_re_test.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions jscomp/test/test_pervasive.js
Original file line number Diff line number Diff line change
@@ -56,6 +56,11 @@ var Pervasives$1 = {
fast_sort: List.fast_sort,
sort_uniq: List.sort_uniq,
merge: List.merge,
Jsx: Pervasives.Jsx,
JsxEvent: Pervasives.JsxEvent,
JsxDOM: Pervasives.JsxDOM,
JsxPPXReactSupport: Pervasives.JsxPPXReactSupport,
JsxModules: Pervasives.JsxModules,
invalid_arg: Pervasives.invalid_arg,
failwith: Pervasives.failwith,
Exit: Pervasives.Exit,
10 changes: 10 additions & 0 deletions jscomp/test/test_pervasives2.js
Original file line number Diff line number Diff line change
@@ -57,6 +57,11 @@ var List$1 = {
fast_sort: List.fast_sort,
sort_uniq: List.sort_uniq,
merge: List.merge,
Jsx: Pervasives.Jsx,
JsxEvent: Pervasives.JsxEvent,
JsxDOM: Pervasives.JsxDOM,
JsxPPXReactSupport: Pervasives.JsxPPXReactSupport,
JsxModules: Pervasives.JsxModules,
invalid_arg: Pervasives.invalid_arg,
failwith: Pervasives.failwith,
Exit: Pervasives.Exit,
@@ -100,6 +105,11 @@ var U = {
length: Stack.length,
iter: Stack.iter,
fold: Stack.fold,
Jsx: Pervasives.Jsx,
JsxEvent: Pervasives.JsxEvent,
JsxDOM: Pervasives.JsxDOM,
JsxPPXReactSupport: Pervasives.JsxPPXReactSupport,
JsxModules: Pervasives.JsxModules,
invalid_arg: Pervasives.invalid_arg,
failwith: Pervasives.failwith,
Exit: Pervasives.Exit,
5 changes: 5 additions & 0 deletions jscomp/test/test_pervasives3.js
Original file line number Diff line number Diff line change
@@ -4,6 +4,11 @@ var List = require("../../lib/js/list.js");
var Pervasives = require("../../lib/js/pervasives.js");

var Pervasives$1 = {
Jsx: Pervasives.Jsx,
JsxEvent: Pervasives.JsxEvent,
JsxDOM: Pervasives.JsxDOM,
JsxPPXReactSupport: Pervasives.JsxPPXReactSupport,
JsxModules: Pervasives.JsxModules,
invalid_arg: Pervasives.invalid_arg,
failwith: Pervasives.failwith,
Exit: Pervasives.Exit,
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
59 changes: 59 additions & 0 deletions lib/es6/jsxEventU.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@



function MakeEventWithType(Type) {
return {};
}

var Synthetic = {};

var Clipboard = {};

var Composition = {};

var Keyboard = {};

var Focus = {};

var Form = {};

var Mouse = {};

var Pointer = {};

var $$Selection = {};

var $$Touch = {};

var UI = {};

var Wheel = {};

var Media = {};

var $$Image = {};

var Animation = {};

var Transition = {};

export {
MakeEventWithType ,
Synthetic ,
Clipboard ,
Composition ,
Keyboard ,
Focus ,
Form ,
Mouse ,
Pointer ,
$$Selection ,
$$Touch ,
UI ,
Wheel ,
Media ,
$$Image ,
Animation ,
Transition ,
}
/* No side effect */
Original file line number Diff line number Diff line change
@@ -19,7 +19,10 @@ function createElementVariadicWithKey(key, component, props, elements) {
]);
}

var Jsx;

export {
Jsx ,
createElementWithKey ,
createElementVariadicWithKey ,
}
29 changes: 29 additions & 0 deletions lib/es6/jsxPPXReactSupportU.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@


import * as React from "react";
import * as Caml_splice_call from "./caml_splice_call.js";

function createElementWithKey(key, component, props) {
return React.createElement(component, key !== undefined ? Object.assign({}, props, {
key: key
}) : props);
}

function createElementVariadicWithKey(key, component, props, elements) {
return Caml_splice_call.spliceApply(React.createElement, [
component,
key !== undefined ? Object.assign({}, props, {
key: key
}) : props,
elements
]);
}

var Jsx;

export {
Jsx ,
createElementWithKey ,
createElementVariadicWithKey ,
}
/* react Not a pure module */
File renamed without changes.
19 changes: 19 additions & 0 deletions lib/es6/pervasives.js
Original file line number Diff line number Diff line change
@@ -7,6 +7,12 @@ import * as Caml_string from "./caml_string.js";
import * as Caml_exceptions from "./caml_exceptions.js";
import * as Caml_js_exceptions from "./caml_js_exceptions.js";

var JsxModules = {
Jsx: undefined,
JsxEvent: undefined,
JsxDOM: undefined
};

function failwith(s) {
throw {
RE_EXN_ID: "Failure",
@@ -204,6 +210,14 @@ function exit(retcode) {
return Caml_sys.sys_exit(retcode);
}

var Jsx;

var JsxEvent;

var JsxDOM;

var JsxPPXReactSupport;

var max_int = 2147483647;

var infinity = Infinity;
@@ -217,6 +231,11 @@ var min_float = 2.22507385850720138e-308;
var epsilon_float = 2.22044604925031308e-16;

export {
Jsx ,
JsxEvent ,
JsxDOM ,
JsxPPXReactSupport ,
JsxModules ,
invalid_arg ,
failwith ,
Exit ,
18 changes: 17 additions & 1 deletion lib/es6/pervasivesU.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,11 @@ import * as Caml_string from "./caml_string.js";
import * as Caml_exceptions from "./caml_exceptions.js";
import * as Caml_js_exceptions from "./caml_js_exceptions.js";

var Jsx = {};
var JsxModules = {
Jsx: undefined,
JsxEvent: undefined,
JsxDOM: undefined
};

function failwith(s) {
throw {
@@ -205,6 +209,14 @@ function exit(retcode) {
return Caml_sys.sys_exit(retcode);
}

var Jsx;

var JsxEvent;

var JsxDOM;

var JsxPPXReactSupport;

var max_int = 2147483647;

var infinity = Infinity;
@@ -219,6 +231,10 @@ var epsilon_float = 2.22044604925031308e-16;

export {
Jsx ,
JsxEvent ,
JsxDOM ,
JsxPPXReactSupport ,
JsxModules ,
invalid_arg ,
failwith ,
Exit ,
1 change: 1 addition & 0 deletions lib/js/jsxC.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
1 change: 1 addition & 0 deletions lib/js/jsxDOMC.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
1 change: 1 addition & 0 deletions lib/js/jsxDOMU.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
File renamed without changes.
57 changes: 57 additions & 0 deletions lib/js/jsxEventU.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
'use strict';


function MakeEventWithType(Type) {
return {};
}

var Synthetic = {};

var Clipboard = {};

var Composition = {};

var Keyboard = {};

var Focus = {};

var Form = {};

var Mouse = {};

var Pointer = {};

var $$Selection = {};

var $$Touch = {};

var UI = {};

var Wheel = {};

var Media = {};

var $$Image = {};

var Animation = {};

var Transition = {};

exports.MakeEventWithType = MakeEventWithType;
exports.Synthetic = Synthetic;
exports.Clipboard = Clipboard;
exports.Composition = Composition;
exports.Keyboard = Keyboard;
exports.Focus = Focus;
exports.Form = Form;
exports.Mouse = Mouse;
exports.Pointer = Pointer;
exports.$$Selection = $$Selection;
exports.$$Touch = $$Touch;
exports.UI = UI;
exports.Wheel = Wheel;
exports.Media = Media;
exports.$$Image = $$Image;
exports.Animation = Animation;
exports.Transition = Transition;
/* No side effect */
Original file line number Diff line number Diff line change
@@ -19,6 +19,9 @@ function createElementVariadicWithKey(key, component, props, elements) {
]);
}

var Jsx;

exports.Jsx = Jsx;
exports.createElementWithKey = createElementWithKey;
exports.createElementVariadicWithKey = createElementVariadicWithKey;
/* react Not a pure module */
27 changes: 27 additions & 0 deletions lib/js/jsxPPXReactSupportU.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
'use strict';

var React = require("react");
var Caml_splice_call = require("./caml_splice_call.js");

function createElementWithKey(key, component, props) {
return React.createElement(component, key !== undefined ? Object.assign({}, props, {
key: key
}) : props);
}

function createElementVariadicWithKey(key, component, props, elements) {
return Caml_splice_call.spliceApply(React.createElement, [
component,
key !== undefined ? Object.assign({}, props, {
key: key
}) : props,
elements
]);
}

var Jsx;

exports.Jsx = Jsx;
exports.createElementWithKey = createElementWithKey;
exports.createElementVariadicWithKey = createElementVariadicWithKey;
/* react Not a pure module */
1 change: 1 addition & 0 deletions lib/js/jsxU.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
19 changes: 19 additions & 0 deletions lib/js/pervasives.js
Original file line number Diff line number Diff line change
@@ -7,6 +7,12 @@ var Caml_string = require("./caml_string.js");
var Caml_exceptions = require("./caml_exceptions.js");
var Caml_js_exceptions = require("./caml_js_exceptions.js");

var JsxModules = {
Jsx: undefined,
JsxEvent: undefined,
JsxDOM: undefined
};

function failwith(s) {
throw {
RE_EXN_ID: "Failure",
@@ -204,6 +210,14 @@ function exit(retcode) {
return Caml_sys.sys_exit(retcode);
}

var Jsx;

var JsxEvent;

var JsxDOM;

var JsxPPXReactSupport;

var max_int = 2147483647;

var infinity = Infinity;
@@ -216,6 +230,11 @@ var min_float = 2.22507385850720138e-308;

var epsilon_float = 2.22044604925031308e-16;

exports.Jsx = Jsx;
exports.JsxEvent = JsxEvent;
exports.JsxDOM = JsxDOM;
exports.JsxPPXReactSupport = JsxPPXReactSupport;
exports.JsxModules = JsxModules;
exports.invalid_arg = invalid_arg;
exports.failwith = failwith;
exports.Exit = Exit;
18 changes: 17 additions & 1 deletion lib/js/pervasivesU.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,11 @@ var Caml_string = require("./caml_string.js");
var Caml_exceptions = require("./caml_exceptions.js");
var Caml_js_exceptions = require("./caml_js_exceptions.js");

var Jsx = {};
var JsxModules = {
Jsx: undefined,
JsxEvent: undefined,
JsxDOM: undefined
};

function failwith(s) {
throw {
@@ -205,6 +209,14 @@ function exit(retcode) {
return Caml_sys.sys_exit(retcode);
}

var Jsx;

var JsxEvent;

var JsxDOM;

var JsxPPXReactSupport;

var max_int = 2147483647;

var infinity = Infinity;
@@ -218,6 +230,10 @@ var min_float = 2.22507385850720138e-308;
var epsilon_float = 2.22044604925031308e-16;

exports.Jsx = Jsx;
exports.JsxEvent = JsxEvent;
exports.JsxDOM = JsxDOM;
exports.JsxPPXReactSupport = JsxPPXReactSupport;
exports.JsxModules = JsxModules;
exports.invalid_arg = invalid_arg;
exports.failwith = failwith;
exports.Exit = Exit;
60 changes: 40 additions & 20 deletions packages/artifacts.txt
Original file line number Diff line number Diff line change
@@ -145,11 +145,15 @@ lib/es6/js_undefined.js
lib/es6/js_vector.js
lib/es6/js_weakmap.js
lib/es6/js_weakset.js
lib/es6/jsx.js
lib/es6/jsxDOM.js
lib/es6/jsxC.js
lib/es6/jsxDOMC.js
lib/es6/jsxDOMStyle.js
lib/es6/jsxEvent.js
lib/es6/jsxPPXReactSupport.js
lib/es6/jsxDOMU.js
lib/es6/jsxEventC.js
lib/es6/jsxEventU.js
lib/es6/jsxPPXReactSupportC.js
lib/es6/jsxPPXReactSupportU.js
lib/es6/jsxU.js
lib/es6/lazy.js
lib/es6/lexing.js
lib/es6/list.js
@@ -309,11 +313,15 @@ lib/js/js_undefined.js
lib/js/js_vector.js
lib/js/js_weakmap.js
lib/js/js_weakset.js
lib/js/jsx.js
lib/js/jsxDOM.js
lib/js/jsxC.js
lib/js/jsxDOMC.js
lib/js/jsxDOMStyle.js
lib/js/jsxEvent.js
lib/js/jsxPPXReactSupport.js
lib/js/jsxDOMU.js
lib/js/jsxEventC.js
lib/js/jsxEventU.js
lib/js/jsxPPXReactSupportC.js
lib/js/jsxPPXReactSupportU.js
lib/js/jsxU.js
lib/js/lazy.js
lib/js/lexing.js
lib/js/list.js
@@ -784,21 +792,33 @@ lib/ocaml/js_weakmap.ml
lib/ocaml/js_weakset.cmi
lib/ocaml/js_weakset.cmt
lib/ocaml/js_weakset.ml
lib/ocaml/jsx.cmi
lib/ocaml/jsx.cmt
lib/ocaml/jsx.res
lib/ocaml/jsxDOM.cmi
lib/ocaml/jsxDOM.cmt
lib/ocaml/jsxDOM.res
lib/ocaml/jsxC.cmi
lib/ocaml/jsxC.cmt
lib/ocaml/jsxC.res
lib/ocaml/jsxDOMC.cmi
lib/ocaml/jsxDOMC.cmt
lib/ocaml/jsxDOMC.res
lib/ocaml/jsxDOMStyle.cmi
lib/ocaml/jsxDOMStyle.cmt
lib/ocaml/jsxDOMStyle.res
lib/ocaml/jsxEvent.cmi
lib/ocaml/jsxEvent.cmt
lib/ocaml/jsxEvent.ml
lib/ocaml/jsxPPXReactSupport.cmi
lib/ocaml/jsxPPXReactSupport.cmt
lib/ocaml/jsxPPXReactSupport.res
lib/ocaml/jsxDOMU.cmi
lib/ocaml/jsxDOMU.cmt
lib/ocaml/jsxDOMU.res
lib/ocaml/jsxEventC.cmi
lib/ocaml/jsxEventC.cmt
lib/ocaml/jsxEventC.res
lib/ocaml/jsxEventU.cmi
lib/ocaml/jsxEventU.cmt
lib/ocaml/jsxEventU.res
lib/ocaml/jsxPPXReactSupportC.cmi
lib/ocaml/jsxPPXReactSupportC.cmt
lib/ocaml/jsxPPXReactSupportC.res
lib/ocaml/jsxPPXReactSupportU.cmi
lib/ocaml/jsxPPXReactSupportU.cmt
lib/ocaml/jsxPPXReactSupportU.res
lib/ocaml/jsxU.cmi
lib/ocaml/jsxU.cmt
lib/ocaml/jsxU.res
lib/ocaml/lazy.cmi
lib/ocaml/lazy.cmt
lib/ocaml/lazy.cmti