Skip to content

Commit f31dee1

Browse files
committed
Split nested modules into separate files
1 parent 25cdc70 commit f31dee1

File tree

608 files changed

+12310
-6613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

608 files changed

+12310
-6613
lines changed

rescript.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"name": "rescript-dom-generator",
44
"sources": [
55
{
6-
"dir": "src"
6+
"dir": "src",
7+
"subdirs": true
78
}
89
],
910
"package-specs": {

src/CSSFontLoading.js

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CSSFontLoading.res

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -99,48 +99,3 @@ type fontFaceDescriptors = {
9999
mutable descentOverride: string,
100100
mutable lineGapOverride: string,
101101
}
102-
103-
module FontFace = {
104-
/**
105-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace)
106-
*/
107-
@new
108-
external make: (string, unknown, fontFaceDescriptors) => fontFace = "FontFace"
109-
/**
110-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/load)
111-
*/
112-
@send
113-
external load: fontFace => Promise.t<fontFace> = "load"
114-
}
115-
116-
module FontFaceSet = {
117-
/**
118-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/add)
119-
*/
120-
@send
121-
external add: (fontFaceSet, fontFace) => fontFaceSet = "add"
122-
123-
/**
124-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/delete)
125-
*/
126-
@send
127-
external delete: (fontFaceSet, fontFace) => bool = "delete"
128-
129-
/**
130-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/clear)
131-
*/
132-
@send
133-
external clear: fontFaceSet => unit = "clear"
134-
135-
/**
136-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load)
137-
*/
138-
@send
139-
external load: (fontFaceSet, string, string) => Promise.t<array<fontFace>> = "load"
140-
141-
/**
142-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check)
143-
*/
144-
@send
145-
external check: (fontFaceSet, string, string) => bool = "check"
146-
}

src/CSSFontLoading/FontFace.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CSSFontLoading/FontFace.res

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
open Event
2+
open CSSFontLoading
3+
4+
module FontFace = {
5+
/**
6+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace)
7+
*/
8+
@new
9+
external make: (string, unknown, fontFaceDescriptors) => fontFace = "FontFace"
10+
/**
11+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/load)
12+
*/
13+
@send
14+
external load: fontFace => Promise.t<fontFace> = "load"
15+
}

src/CSSFontLoading/FontFaceSet.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CSSFontLoading/FontFaceSet.res

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
open Event
2+
open CSSFontLoading
3+
4+
module FontFaceSet = {
5+
/**
6+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/add)
7+
*/
8+
@send
9+
external add: (fontFaceSet, fontFace) => fontFaceSet = "add"
10+
11+
/**
12+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/delete)
13+
*/
14+
@send
15+
external delete: (fontFaceSet, fontFace) => bool = "delete"
16+
17+
/**
18+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/clear)
19+
*/
20+
@send
21+
external clear: fontFaceSet => unit = "clear"
22+
23+
/**
24+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load)
25+
*/
26+
@send
27+
external load: (fontFaceSet, string, string) => Promise.t<array<fontFace>> = "load"
28+
29+
/**
30+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check)
31+
*/
32+
@send
33+
external check: (fontFaceSet, string, string) => bool = "check"
34+
}

src/Canvas.js

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Canvas.res

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -54,50 +54,3 @@ type imageEncodeOptions = {
5454
@as("type") mutable type_: string,
5555
mutable quality: any,
5656
}
57-
58-
module OffscreenCanvas = {
59-
/**
60-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas)
61-
*/
62-
@new
63-
external make: (int, int) => offscreenCanvas = "OffscreenCanvas"
64-
/**
65-
Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
66-
67-
This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
68-
69-
Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
70-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext)
71-
*/
72-
@send
73-
external getContext: (
74-
offscreenCanvas,
75-
offscreenRenderingContextId,
76-
any,
77-
) => offscreenRenderingContext = "getContext"
78-
79-
/**
80-
Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image.
81-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/transferToImageBitmap)
82-
*/
83-
@send
84-
external transferToImageBitmap: offscreenCanvas => imageBitmap = "transferToImageBitmap"
85-
86-
/**
87-
Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object.
88-
89-
The argument, if provided, is a dictionary that controls the encoding options of the image file to be created. The type field specifies the file format and has a default value of "image/png"; that type is also used if the requested type isn't supported. If the image format supports variable quality (such as "image/jpeg"), then the quality field is a number in the range 0.0 to 1.0 inclusive indicating the desired quality level for the resulting image.
90-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/convertToBlob)
91-
*/
92-
@send
93-
external convertToBlob: (offscreenCanvas, imageEncodeOptions) => Promise.t<blob> = "convertToBlob"
94-
}
95-
96-
module ImageBitmap = {
97-
/**
98-
Releases imageBitmap's underlying bitmap data.
99-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ImageBitmap/close)
100-
*/
101-
@send
102-
external close: imageBitmap => unit = "close"
103-
}

src/Canvas/ImageBitmap.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Canvas/ImageBitmap.res

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
open Prelude
2+
open Event
3+
open File
4+
open Canvas
5+
6+
module ImageBitmap = {
7+
/**
8+
Releases imageBitmap's underlying bitmap data.
9+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ImageBitmap/close)
10+
*/
11+
@send
12+
external close: imageBitmap => unit = "close"
13+
}

src/Canvas/OffscreenCanvas.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Canvas/OffscreenCanvas.res

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
open Prelude
2+
open Event
3+
open File
4+
open Canvas
5+
6+
module OffscreenCanvas = {
7+
/**
8+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas)
9+
*/
10+
@new
11+
external make: (int, int) => offscreenCanvas = "OffscreenCanvas"
12+
/**
13+
Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
14+
15+
This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
16+
17+
Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
18+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext)
19+
*/
20+
@send
21+
external getContext: (
22+
offscreenCanvas,
23+
offscreenRenderingContextId,
24+
any,
25+
) => offscreenRenderingContext = "getContext"
26+
27+
/**
28+
Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image.
29+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/transferToImageBitmap)
30+
*/
31+
@send
32+
external transferToImageBitmap: offscreenCanvas => imageBitmap = "transferToImageBitmap"
33+
34+
/**
35+
Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object.
36+
37+
The argument, if provided, is a dictionary that controls the encoding options of the image file to be created. The type field specifies the file format and has a default value of "image/png"; that type is also used if the requested type isn't supported. If the image format supports variable quality (such as "image/jpeg"), then the quality field is a number in the range 0.0 to 1.0 inclusive indicating the desired quality level for the resulting image.
38+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/convertToBlob)
39+
*/
40+
@send
41+
external convertToBlob: (offscreenCanvas, imageEncodeOptions) => Promise.t<blob> = "convertToBlob"
42+
}

src/ChannelMessaging.js

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ChannelMessaging.res

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,3 @@ This Channel Messaging API interface represents one of the two ports of a Messag
1010
type messagePort = {
1111
...eventTarget,
1212
}
13-
14-
module MessagePort = {
15-
/**
16-
Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
17-
18-
Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
19-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
20-
*/
21-
@send
22-
external postMessage: (messagePort, any, array<Dict.t<string>>) => unit = "postMessage"
23-
24-
/**
25-
Begins dispatching messages received on the port.
26-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
27-
*/
28-
@send
29-
external start: messagePort => unit = "start"
30-
31-
/**
32-
Disconnects the port, so that it is no longer active.
33-
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
34-
*/
35-
@send
36-
external close: messagePort => unit = "close"
37-
}

src/ChannelMessaging/MessagePort.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ChannelMessaging/MessagePort.res

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
open Prelude
2+
open Event
3+
open ChannelMessaging
4+
5+
module MessagePort = {
6+
/**
7+
Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
8+
9+
Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
10+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
11+
*/
12+
@send
13+
external postMessage: (messagePort, any, array<Dict.t<string>>) => unit = "postMessage"
14+
15+
/**
16+
Begins dispatching messages received on the port.
17+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
18+
*/
19+
@send
20+
external start: messagePort => unit = "start"
21+
22+
/**
23+
Disconnects the port, so that it is no longer active.
24+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
25+
*/
26+
@send
27+
external close: messagePort => unit = "close"
28+
}

src/Clipboard.js

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)