Skip to content

Commit 1d42992

Browse files
committed
Move Jsx and JsxDOM inside Pervasives.
Turn JsxDOM into a module, so it's built separately for Pervasives and PervasivesU.
1 parent 672a159 commit 1d42992

38 files changed

+5179
-3979
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ These are only breaking changes for unformatted code.
7979
- Add support for `|>` in uncurried mode by desugaring it https://github.com/rescript-lang/rescript-compiler/pull/6083
8080
- 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
8181
- Improve code generated for string templates https://github.com/rescript-lang/rescript-compiler/pull/6090
82+
- Move Jsx and JsxDOM inside Pervasives and build them separately for curried and uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/6091
8283

8384
# 10.1.4
8485

jscomp/others/jsx.res renamed to jscomp/others/jsxC.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2424

25+
/*** Internal: use Jsx directly. */
26+
2527
type element
2628
type ref
2729

jscomp/others/jsxDOM.res renamed to jscomp/others/jsxDOMC.res

Lines changed: 83 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2424

25+
/*** Internal: use JsxDOM directly. */
26+
2527
type style = JsxDOMStyle.t
2628
type domRef
2729

@@ -30,7 +32,7 @@ type domRef
3032
*/
3133
type domProps = {
3234
key?: string,
33-
children?: Jsx.element,
35+
children?: JsxC.element,
3436
ref?: domRef,
3537
/* accessibility */
3638
/* https://www.w3.org/TR/wai-aria-1.1/ */
@@ -260,100 +262,100 @@ type domProps = {
260262
width?: string /* in html5 this can only be a number, but in html4 it can ba a percentage as well */,
261263
wrap?: string /* "hard" or "soft" */,
262264
/* Clipboard events */
263-
onCopy?: JsxEvent.Clipboard.t => unit,
264-
onCut?: JsxEvent.Clipboard.t => unit,
265-
onPaste?: JsxEvent.Clipboard.t => unit,
265+
onCopy?: JsxEventC.Clipboard.t => unit,
266+
onCut?: JsxEventC.Clipboard.t => unit,
267+
onPaste?: JsxEventC.Clipboard.t => unit,
266268
/* Composition events */
267-
onCompositionEnd?: JsxEvent.Composition.t => unit,
268-
onCompositionStart?: JsxEvent.Composition.t => unit,
269-
onCompositionUpdate?: JsxEvent.Composition.t => unit,
269+
onCompositionEnd?: JsxEventC.Composition.t => unit,
270+
onCompositionStart?: JsxEventC.Composition.t => unit,
271+
onCompositionUpdate?: JsxEventC.Composition.t => unit,
270272
/* Keyboard events */
271-
onKeyDown?: JsxEvent.Keyboard.t => unit,
272-
onKeyPress?: JsxEvent.Keyboard.t => unit,
273-
onKeyUp?: JsxEvent.Keyboard.t => unit,
273+
onKeyDown?: JsxEventC.Keyboard.t => unit,
274+
onKeyPress?: JsxEventC.Keyboard.t => unit,
275+
onKeyUp?: JsxEventC.Keyboard.t => unit,
274276
/* Focus events */
275-
onFocus?: JsxEvent.Focus.t => unit,
276-
onBlur?: JsxEvent.Focus.t => unit,
277+
onFocus?: JsxEventC.Focus.t => unit,
278+
onBlur?: JsxEventC.Focus.t => unit,
277279
/* Form events */
278-
onBeforeInput?: JsxEvent.Form.t => unit,
279-
onChange?: JsxEvent.Form.t => unit,
280-
onInput?: JsxEvent.Form.t => unit,
281-
onReset?: JsxEvent.Form.t => unit,
282-
onSubmit?: JsxEvent.Form.t => unit,
283-
onInvalid?: JsxEvent.Form.t => unit,
280+
onBeforeInput?: JsxEventC.Form.t => unit,
281+
onChange?: JsxEventC.Form.t => unit,
282+
onInput?: JsxEventC.Form.t => unit,
283+
onReset?: JsxEventC.Form.t => unit,
284+
onSubmit?: JsxEventC.Form.t => unit,
285+
onInvalid?: JsxEventC.Form.t => unit,
284286
/* Mouse events */
285-
onClick?: JsxEvent.Mouse.t => unit,
286-
onContextMenu?: JsxEvent.Mouse.t => unit,
287-
onDoubleClick?: JsxEvent.Mouse.t => unit,
288-
onDrag?: JsxEvent.Mouse.t => unit,
289-
onDragEnd?: JsxEvent.Mouse.t => unit,
290-
onDragEnter?: JsxEvent.Mouse.t => unit,
291-
onDragExit?: JsxEvent.Mouse.t => unit,
292-
onDragLeave?: JsxEvent.Mouse.t => unit,
293-
onDragOver?: JsxEvent.Mouse.t => unit,
294-
onDragStart?: JsxEvent.Mouse.t => unit,
295-
onDrop?: JsxEvent.Mouse.t => unit,
296-
onMouseDown?: JsxEvent.Mouse.t => unit,
297-
onMouseEnter?: JsxEvent.Mouse.t => unit,
298-
onMouseLeave?: JsxEvent.Mouse.t => unit,
299-
onMouseMove?: JsxEvent.Mouse.t => unit,
300-
onMouseOut?: JsxEvent.Mouse.t => unit,
301-
onMouseOver?: JsxEvent.Mouse.t => unit,
302-
onMouseUp?: JsxEvent.Mouse.t => unit,
287+
onClick?: JsxEventC.Mouse.t => unit,
288+
onContextMenu?: JsxEventC.Mouse.t => unit,
289+
onDoubleClick?: JsxEventC.Mouse.t => unit,
290+
onDrag?: JsxEventC.Mouse.t => unit,
291+
onDragEnd?: JsxEventC.Mouse.t => unit,
292+
onDragEnter?: JsxEventC.Mouse.t => unit,
293+
onDragExit?: JsxEventC.Mouse.t => unit,
294+
onDragLeave?: JsxEventC.Mouse.t => unit,
295+
onDragOver?: JsxEventC.Mouse.t => unit,
296+
onDragStart?: JsxEventC.Mouse.t => unit,
297+
onDrop?: JsxEventC.Mouse.t => unit,
298+
onMouseDown?: JsxEventC.Mouse.t => unit,
299+
onMouseEnter?: JsxEventC.Mouse.t => unit,
300+
onMouseLeave?: JsxEventC.Mouse.t => unit,
301+
onMouseMove?: JsxEventC.Mouse.t => unit,
302+
onMouseOut?: JsxEventC.Mouse.t => unit,
303+
onMouseOver?: JsxEventC.Mouse.t => unit,
304+
onMouseUp?: JsxEventC.Mouse.t => unit,
303305
/* Selection events */
304-
onSelect?: JsxEvent.Selection.t => unit,
306+
onSelect?: JsxEventC.Selection.t => unit,
305307
/* Touch events */
306-
onTouchCancel?: JsxEvent.Touch.t => unit,
307-
onTouchEnd?: JsxEvent.Touch.t => unit,
308-
onTouchMove?: JsxEvent.Touch.t => unit,
309-
onTouchStart?: JsxEvent.Touch.t => unit,
308+
onTouchCancel?: JsxEventC.Touch.t => unit,
309+
onTouchEnd?: JsxEventC.Touch.t => unit,
310+
onTouchMove?: JsxEventC.Touch.t => unit,
311+
onTouchStart?: JsxEventC.Touch.t => unit,
310312
// Pointer events
311-
onPointerOver?: JsxEvent.Pointer.t => unit,
312-
onPointerEnter?: JsxEvent.Pointer.t => unit,
313-
onPointerDown?: JsxEvent.Pointer.t => unit,
314-
onPointerMove?: JsxEvent.Pointer.t => unit,
315-
onPointerUp?: JsxEvent.Pointer.t => unit,
316-
onPointerCancel?: JsxEvent.Pointer.t => unit,
317-
onPointerOut?: JsxEvent.Pointer.t => unit,
318-
onPointerLeave?: JsxEvent.Pointer.t => unit,
319-
onGotPointerCapture?: JsxEvent.Pointer.t => unit,
320-
onLostPointerCapture?: JsxEvent.Pointer.t => unit,
313+
onPointerOver?: JsxEventC.Pointer.t => unit,
314+
onPointerEnter?: JsxEventC.Pointer.t => unit,
315+
onPointerDown?: JsxEventC.Pointer.t => unit,
316+
onPointerMove?: JsxEventC.Pointer.t => unit,
317+
onPointerUp?: JsxEventC.Pointer.t => unit,
318+
onPointerCancel?: JsxEventC.Pointer.t => unit,
319+
onPointerOut?: JsxEventC.Pointer.t => unit,
320+
onPointerLeave?: JsxEventC.Pointer.t => unit,
321+
onGotPointerCapture?: JsxEventC.Pointer.t => unit,
322+
onLostPointerCapture?: JsxEventC.Pointer.t => unit,
321323
/* UI events */
322-
onScroll?: JsxEvent.UI.t => unit,
324+
onScroll?: JsxEventC.UI.t => unit,
323325
/* Wheel events */
324-
onWheel?: JsxEvent.Wheel.t => unit,
326+
onWheel?: JsxEventC.Wheel.t => unit,
325327
/* Media events */
326-
onAbort?: JsxEvent.Media.t => unit,
327-
onCanPlay?: JsxEvent.Media.t => unit,
328-
onCanPlayThrough?: JsxEvent.Media.t => unit,
329-
onDurationChange?: JsxEvent.Media.t => unit,
330-
onEmptied?: JsxEvent.Media.t => unit,
331-
onEncrypted?: JsxEvent.Media.t => unit,
332-
onEnded?: JsxEvent.Media.t => unit,
333-
onError?: JsxEvent.Media.t => unit,
334-
onLoadedData?: JsxEvent.Media.t => unit,
335-
onLoadedMetadata?: JsxEvent.Media.t => unit,
336-
onLoadStart?: JsxEvent.Media.t => unit,
337-
onPause?: JsxEvent.Media.t => unit,
338-
onPlay?: JsxEvent.Media.t => unit,
339-
onPlaying?: JsxEvent.Media.t => unit,
340-
onProgress?: JsxEvent.Media.t => unit,
341-
onRateChange?: JsxEvent.Media.t => unit,
342-
onSeeked?: JsxEvent.Media.t => unit,
343-
onSeeking?: JsxEvent.Media.t => unit,
344-
onStalled?: JsxEvent.Media.t => unit,
345-
onSuspend?: JsxEvent.Media.t => unit,
346-
onTimeUpdate?: JsxEvent.Media.t => unit,
347-
onVolumeChange?: JsxEvent.Media.t => unit,
348-
onWaiting?: JsxEvent.Media.t => unit,
328+
onAbort?: JsxEventC.Media.t => unit,
329+
onCanPlay?: JsxEventC.Media.t => unit,
330+
onCanPlayThrough?: JsxEventC.Media.t => unit,
331+
onDurationChange?: JsxEventC.Media.t => unit,
332+
onEmptied?: JsxEventC.Media.t => unit,
333+
onEncrypted?: JsxEventC.Media.t => unit,
334+
onEnded?: JsxEventC.Media.t => unit,
335+
onError?: JsxEventC.Media.t => unit,
336+
onLoadedData?: JsxEventC.Media.t => unit,
337+
onLoadedMetadata?: JsxEventC.Media.t => unit,
338+
onLoadStart?: JsxEventC.Media.t => unit,
339+
onPause?: JsxEventC.Media.t => unit,
340+
onPlay?: JsxEventC.Media.t => unit,
341+
onPlaying?: JsxEventC.Media.t => unit,
342+
onProgress?: JsxEventC.Media.t => unit,
343+
onRateChange?: JsxEventC.Media.t => unit,
344+
onSeeked?: JsxEventC.Media.t => unit,
345+
onSeeking?: JsxEventC.Media.t => unit,
346+
onStalled?: JsxEventC.Media.t => unit,
347+
onSuspend?: JsxEventC.Media.t => unit,
348+
onTimeUpdate?: JsxEventC.Media.t => unit,
349+
onVolumeChange?: JsxEventC.Media.t => unit,
350+
onWaiting?: JsxEventC.Media.t => unit,
349351
/* Image events */
350-
onLoad?: JsxEvent.Image.t => unit /* duplicate */ /* ~onError: ReactEvent.Image.t => unit=?, */,
352+
onLoad?: JsxEventC.Image.t => unit /* duplicate */ /* ~onError: ReactEvent.Image.t => unit=?, */,
351353
/* Animation events */
352-
onAnimationStart?: JsxEvent.Animation.t => unit,
353-
onAnimationEnd?: JsxEvent.Animation.t => unit,
354-
onAnimationIteration?: JsxEvent.Animation.t => unit,
354+
onAnimationStart?: JsxEventC.Animation.t => unit,
355+
onAnimationEnd?: JsxEventC.Animation.t => unit,
356+
onAnimationIteration?: JsxEventC.Animation.t => unit,
355357
/* Transition events */
356-
onTransitionEnd?: JsxEvent.Transition.t => unit,
358+
onTransitionEnd?: JsxEventC.Transition.t => unit,
357359
/* svg */
358360
accentHeight?: string,
359361
accumulate?: string,

0 commit comments

Comments
 (0)