diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a67c7054..c9a38613 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,45 +56,20 @@ jobs: id: vars run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - - name: Update workspace versions to - + - name: Update package version to - env: PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }}-experimental-${{ env.COMMIT_HASH }} run: | node <<'NODE' const fs = require("node:fs"); - const path = require("node:path"); - - const packagesDir = path.join(process.cwd(), "packages"); - const version = process.env.PACKAGE_VERSION; - const packages = fs - .readdirSync(packagesDir) - .filter((dir) => fs.existsSync(path.join(packagesDir, dir, "package.json"))) - .map((dir) => { - const packageJsonPath = path.join(packagesDir, dir, "package.json"); - const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8")); - return { packageJsonPath, packageJson }; - }); - const workspaceNames = new Set(packages.map(({ packageJson }) => packageJson.name)); - - for (const { packageJsonPath, packageJson } of packages) { - packageJson.version = version; - - for (const field of ["dependencies", "peerDependencies", "devDependencies"]) { - if (!packageJson[field]) continue; - - for (const dependencyName of Object.keys(packageJson[field])) { - if (workspaceNames.has(dependencyName)) { - packageJson[field][dependencyName] = version; - } - } - } - - fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`); - } + const packageJsonPath = "package.json"; + const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8")); + packageJson.version = process.env.PACKAGE_VERSION; + fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`); NODE - - name: Package npm workspaces - run: npm pack --workspaces + - name: Package npm package + run: npm pack - name: Upload npm package artifact uses: actions/upload-artifact@v7 @@ -102,16 +77,11 @@ jobs: name: npm-packages path: "*.tgz" - - name: Publish npm packages + - name: Publish npm package if: github.ref == 'refs/heads/main' && github.event_name == 'push' env: NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} - run: | - for package in packages/*; do - if [ -f "$package/package.json" ]; then - npm publish --workspace "$package" --access public --tag experimental - fi - done + run: npm publish --access public --tag experimental deploy-docs: needs: build diff --git a/.gitignore b/.gitignore index 80164aa8..24b4284b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,10 @@ dist/ tmp/ docs/public/llm.txt +.npm-cache/ +*.tgz *~ +.worktrees/ **/lib/bs/ **/lib/ocaml @@ -14,4 +17,6 @@ docs/public/llm.txt rescript.lock -**/*.res.js \ No newline at end of file +src/**/*.js +tests/**/*.js +**/*.res.js diff --git a/README.md b/README.md index 54c0e16f..45c022cb 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,22 @@ and add `@rescript/webapi` to your `rescript.json`: ```json { "bs-dependencies": [ -+ "@rescript/webapi", + "@rescript/webapi" ], "bsc-flags": [ -+ "-open WebAPI.Global" + "-open WebAPI.Global" ] } ``` +## Usage + +```rescript +let location = window.location +let href = location.href +location->WebAPI.Location.reload +``` + ## Documentation More information can be found on https://rescript-lang.github.io/experimental-rescript-webapi/ diff --git a/docs/content/docs/contributing/api-modelling.mdx b/docs/content/docs/contributing/api-modelling.mdx index 1b7aedb2..c81195a3 100644 --- a/docs/content/docs/contributing/api-modelling.mdx +++ b/docs/content/docs/contributing/api-modelling.mdx @@ -88,8 +88,8 @@ mutable fillStyle: fillStyle When we wish to read and write the `fillStyle` property, we can use a helper module to lift the type to an actual ReScript variant: export const fillStyleModule = ` -open WebApiCanvas -open WebApiDOM +open WebAPI.Canvas +open WebAPI.DOM external fromString: string => fillStyle = "%identity" external fromCanvasGradient: canvasGradient => fillStyle = "%identity" diff --git a/docs/content/docs/contributing/getting-started.mdx b/docs/content/docs/contributing/getting-started.mdx index 42cf96d1..bc7a11e6 100644 --- a/docs/content/docs/contributing/getting-started.mdx +++ b/docs/content/docs/contributing/getting-started.mdx @@ -11,7 +11,7 @@ import { Aside } from "@astrojs/starlight/components"; upside? It’s stupid easy to toss us a PR and make it better! -The [WebAPI](https://developer.mozilla.org/en-US/docs/Web/API) are vast and ever-growing. We need your help to make them better. +The [Web APIs](https://developer.mozilla.org/en-US/docs/Web/API) are vast and ever-growing. We need your help to make them better. There is no way our [contributors](https://github.com/rescript-lang/experimental-rescript-webapi/graphs/contributors) can cover everything. And that's where you come in! A small PR, focused on what you want to get out of this project can make a huge difference. diff --git a/docs/content/docs/index.mdx b/docs/content/docs/index.mdx index 20b01cf8..81715bbd 100644 --- a/docs/content/docs/index.mdx +++ b/docs/content/docs/index.mdx @@ -39,7 +39,7 @@ and add `@rescript/webapi` to your `rescript.json`: export const rescriptJson = ` { "bs-dependencies": [ - "@rescript/webapi", + "@rescript/webapi" ], "bsc-flags": [ "-open WebAPI.Global" @@ -61,7 +61,7 @@ let location = window.location let href = location.href // Invoke methods using the \`->TypeModule.method\` -location->Location.reload +location->WebAPI.Location.reload `; export const compiledSample = ` diff --git a/docs/content/docs/philosophy.mdx b/docs/content/docs/philosophy.mdx index ef6ff8df..41919367 100644 --- a/docs/content/docs/philosophy.mdx +++ b/docs/content/docs/philosophy.mdx @@ -16,13 +16,13 @@ The bindings are generated from the [MDN Web API documentation](https://develope In other words, if you are searching for a specific JavaScript binding, begin your journey at the [MDN Web API documentation](https://developer.mozilla.org/en-US/docs/Web/API) and determine which module contains your sample. Ensure that the module is available in the bindings by checking the specific API. Please [open an issue](https://github.com/rescript-lang/experimental-rescript-webapi/issues/new/choose) if you require an API that is not yet present. -Each API will have its interface and auxiliary types in a module named after the API, suffixed with `API` to prevent collisions with the type module. +The bindings are exposed under the `WebAPI` namespace, with feature entry modules such as `WebAPI.DOM` available when you want to scope imports more narrowly. ```ReScript open WebAPI.Global -open WebAPI.DOMAPI +// or WebAPI.DOM -let myElement: element = document->Document.createElement( ~localName = "div") +let myElement: WebAPI.Element.t = document->WebAPI.Document.createElement("div") ``` ## Interfaces @@ -44,18 +44,11 @@ JavaScript supports function overloads, where a function can have multiple signa In some cases, type conversion will be required. Subtypes can safely be cast to their base type using conversion helpers within their module. ```ReScript -open WebAPI +open WebAPI.Global +// or WebAPI.DOM -let element: element = document->Document.createElement( ~localName = "div") -let node: node = element->Element.asNode +let element: WebAPI.Element.t = document->WebAPI.Document.createElement("div") +let node: WebAPI.Node.t = element->WebAPI.Element.asNode ``` -Any other conversions can be performed using the `Base.unsafeConversation` helper. This should be done with caution, as it can lead to runtime errors. - -```ReScript -open WebAPI - -let element: element = document->Document.createElement( ~localName = "div") -// This is potentially unsafe, as the type system cannot guarantee the conversion -let divElement: htmlDivElement = element->Base.unsafeConversation -``` +Any other conversions should be treated as unsafe casts and used with caution, because the type system cannot guarantee they are valid at runtime. diff --git a/docs/llm.js b/docs/llm.js index b84eb524..c37eaf9b 100644 --- a/docs/llm.js +++ b/docs/llm.js @@ -2,6 +2,7 @@ import * as path from "node:path"; import { exec } from "node:child_process"; import { promisify } from "node:util"; import fs from "node:fs/promises"; +import { featureSpecs, publicNameForLeafModule } from "../scripts/unmonorepo/feature-spec.mjs"; const execAsync = promisify(exec); @@ -33,10 +34,7 @@ async function getDocJson(filePath) { async function processFile(filePath) { const json = await getDocJson(filePath); const relativePath = path.relative(path.join(import.meta.dirname, ".."), filePath); - const parts = relativePath.split(path.sep); - const packageName = parts[1]; - const leafName = path.basename(filePath, ".res"); - const moduleName = leafName === "Types" ? packageName : `${packageName}.${leafName}`; + const moduleName = moduleNameForFile(relativePath); const types = []; const functions = []; @@ -97,7 +95,26 @@ Module: ${moduleName}${typeString}${functionString} `; } -const pattern = "../packages/*/src/**/*.res"; +const specByDir = new Map(featureSpecs.map((spec) => [spec.dirName, spec])); + +function moduleNameForFile(relativePath) { + const [, dirName, fileName] = relativePath.split(path.sep); + const spec = specByDir.get(dirName); + + if (!spec) { + throw new Error(`Unsupported source directory for documentation: ${relativePath}`); + } + + const leafName = path.basename(fileName, ".res"); + + if (leafName === spec.publicModule) { + return `WebAPI.${spec.publicModule}`; + } + + return `WebAPI.${spec.publicModule}.${publicNameForLeafModule(leafName, spec.internalPrefix)}`; +} + +const pattern = "../src/*/**/*.res"; const files = []; for await (const file of fs.glob(pattern, { recursive: true, cwd: import.meta.dirname })) { files.push(path.join(import.meta.dirname, file)); @@ -109,7 +126,7 @@ const packageJson = await fs.readFile(path.join(import.meta.dirname, "../package let version = JSON.parse(packageJson).version; const sha = await execAsync("git rev-parse --short HEAD").then(({ stdout }) => stdout.trim()); const fullVersion = `${version}-experimental-${sha}`; -const header = `Experimental Rescript WebAPI Documentation ${fullVersion} +const header = `Experimental ReScript WebAPI Documentation ${fullVersion} This is the API documentation for the experimental WebAPI module version ${fullVersion}. More information can be found on https://rescript-lang.github.io/experimental-rescript-webapi/ diff --git a/docs/superpowers/specs/2026-04-22-unmonorepo-webapi-design.md b/docs/superpowers/specs/2026-04-22-unmonorepo-webapi-design.md new file mode 100644 index 00000000..915f687e --- /dev/null +++ b/docs/superpowers/specs/2026-04-22-unmonorepo-webapi-design.md @@ -0,0 +1,246 @@ +# Unmonorepo WebAPI Design + +**Date:** 2026-04-22 +**Status:** Approved in conversation, written for review before implementation + +## Context + +The repository was split into npm workspaces so each Web API area could build and publish independently from `packages/*`. The ReScript compiler now supports feature-gated source directories and feature-gated dependencies, so the package split is no longer required to support partial builds. + +The new target is a single published npm package, `@rescript/webapi`, with a unified internal build and an external API that still preserves feature-level boundaries such as `WebAPI.DOM`, `WebAPI.Fetch`, and `WebAPI.Base`. + +## Goals + +- Remove the monorepo/workspace package split. +- Move all feature sources from `packages//src` to `src/`. +- Delete every subpackage `package.json` and `rescript.json`. +- Make the root `rescript.json` the single source of truth for sources, features, and ReScript dependencies. +- Preserve the logical public API boundaries as `WebAPI.`. +- Keep internal helper modules private through the new `public` source setting. +- Publish one npm package: `@rescript/webapi`. +- Let internal builds and downstream consumers compile only the features they need. + +## Non-Goals + +- This change does not redesign the feature taxonomy. +- This change does not flatten the public API into one global namespace. +- This change does not preserve the old multi-package publish flow. + +## Repository Structure + +### Before + +- `packages/Base/src` +- `packages/DOM/src` +- `packages/Fetch/src` +- One `package.json` and one `rescript.json` per package +- Root npm workspaces pointing at `packages/*` + +### After + +- `src/Base` +- `src/DOM` +- `src/Fetch` +- One root `package.json` +- One root `rescript.json` +- No npm workspaces + +Each former package directory remains a logical feature boundary, but only as source layout and public API grouping, not as an npm workspace. + +## Root `rescript.json` + +The root `rescript.json` becomes the canonical build definition for the entire repo. + +### Sources + +Each former package source directory is listed as its own source entry. Example shape: + +```json +{ + "name": "@rescript/webapi", + "sources": [ + { + "dir": "src/DOM", + "subdirs": true, + "feature": "WebAPI.DOM", + "public": ["DOM"] + }, + { + "dir": "src/Fetch", + "subdirs": true, + "feature": "WebAPI.Fetch", + "public": ["Fetch"] + }, + { + "dir": "tests", + "subdirs": true, + "type": "dev" + } + ] +} +``` + +Rules: + +- Every former package gets one root source entry. +- The `feature` value matches the public module name, for example `"WebAPI.DOM"` and `"WebAPI.Fetch"`. +- The `public` list exposes only the feature entry module for that source directory. +- Helper modules such as `DomTypes` and `DomGlobal` stay internal because they are not listed in `public`. +- `tests` remains a dev-only source. + +### Dependencies + +The root `dependencies` section in `rescript.json` should only describe real package dependencies after the unmonorepo migration. + +The current per-package `rescript.json` files mostly depend on other workspace packages from the same repository. Once everything lives inside one ReScript package, those internal relationships should become normal module references inside the unified package rather than package dependencies. + +Feature-gated dependency objects are still available when the unified package needs to depend on an external ReScript package only for a subset of features, but that is not the primary migration mechanism for replacing the old workspace graph. + +Example: + +```json +{ + "dependencies": [ + "@plain/dep", + { "name": "@other/heavy", "features": ["WebAPI.WebCrypto"] } + ] +} +``` + +Migration rule: + +- Remove internal package-to-package dependencies that only existed because of the workspace split. +- Keep or add root `dependencies` entries only for actual external ReScript packages. +- Use feature-gated dependency objects only when an external dependency truly belongs to a subset of the unified API surface. + +## Public API Shape + +The public API remains feature-oriented: + +- `WebAPI.Base` +- `WebAPI.DOM` +- `WebAPI.Fetch` +- `WebAPI.WebCrypto` +- and the rest of the former package surfaces + +The unified build must not expose raw internal file modules as first-class public API. Consumers should interact with a curated surface through the feature entry modules only. + +Each feature directory therefore needs one public entry module whose filename matches the feature name: + +- `src/DOM/DOM.res` +- `src/Fetch/Fetch.res` +- `src/Base/Base.res` + +Those entry modules are the only modules exported from their source directory through `public`. + +## Internal Module Naming + +The current workspace layout relied on per-package namespaces, which allowed repeated generic file names such as: + +- `Types.res` +- `Global.res` +- `Event.res` +- `File.res` +- `HTMLMediaElement.res` + +In a unified package these names would collide, so the migration must rename generic internal modules to feature-qualified names. + +Examples: + +- `src/DOM/Types.res` -> `src/DOM/DomTypes.res` +- `src/DOM/Global.res` -> `src/DOM/DomGlobal.res` +- `src/Fetch/Global.res` -> `src/Fetch/FetchGlobal.res` +- `src/Base/Event.res` -> `src/Base/BaseEvent.res` +- `src/File/Types.res` -> `src/File/FileTypes.res` + +Naming rule: + +- Prefix internal modules with the feature’s public module stem. +- Keep the public entry module itself unprefixed when it is the exported surface module, for example `DOM.res` and `Fetch.res`. + +This keeps the public API stable while making the unified internal module graph collision-free. + +## Publishing And Package Metadata + +The root `package.json` becomes the only published npm package definition. + +Required changes: + +- Rename the package to `@rescript/webapi`. +- Remove the `workspaces` field. +- Remove workspace-oriented scripts such as `build:packages`. +- Replace multi-workspace publishing with a single-package publish flow from the repo root. +- Replace any placeholder-package tooling that exists only to reserve or publish subpackage names. + +The published package contents should include the files needed for one ReScript package rather than many workspace packages. + +## Tooling And CI Updates + +Any tooling that assumes the workspace layout must be updated to the new unified structure. + +Known affected areas: + +- `scripts/create-npm-packages.js` +- `.github/workflows/ci.yml` +- `docs/llm.js` +- Documentation that references multiple packages or workspace publishing + +Expected changes: + +- CI should build and package only the root package. +- Publish jobs should run one `npm publish` from the root package, not loop over `packages/*`. +- Source discovery scripts should read from `src/*` instead of `packages/*/src`. +- Documentation should instruct consumers to install `@rescript/webapi`. + +## Data Flow And Build Model + +The build becomes unified at the repository level: + +1. ReScript reads the root `rescript.json`. +2. Each feature source directory is included in the build graph. +3. Feature gating determines which source directories and gated dependencies participate in a given build. +4. Only the explicitly public feature entry modules are exposed to consumers. +5. Internal helper modules remain compile-time implementation details. + +This provides one coherent package without losing the ability to compile narrower slices of the API surface. + +## Migration Strategy + +Implementation should proceed in this order: + +1. Add the new root `src/` layout. +2. Move source files out of `packages/*/src`. +3. Rename internal generic modules to feature-qualified names. +4. Update intra-feature and cross-feature references to the new module names. +5. Rewrite the root `rescript.json` sources and dependencies. +6. Remove subpackage `rescript.json` and `package.json` files. +7. Rewrite root npm metadata and publish scripts for a single package. +8. Update docs and CI for the new layout. + +This order minimizes the time spent in a partially migrated state with broken module references. + +## Testing And Verification + +Implementation should verify: + +- Full repo build succeeds from the root package. +- Tests still run successfully from the root package. +- Feature-gated builds can compile selected features without pulling the entire surface area. +- Internal helper modules are not exposed through source `public` settings. +- Packaging and publish dry-run operate on the single root package. + +The most important regression risks are: + +- Broken module references after internal renames +- Leaving stale internal package dependencies in root `rescript.json` +- Accidentally public helper modules +- CI or publish logic still assuming workspaces + +## Open Decisions Already Resolved + +- Use a single package instead of npm workspaces. +- Preserve feature boundaries in the external API. +- Use `WebAPI.*` spelling, not `WebApi.*`. +- Map feature names to public module names such as `"WebAPI.DOM"`. +- Rename generic internal modules to feature-qualified names. +- Use source-level `public` settings so only the feature entry module is exposed. diff --git a/package.json b/package.json index f785cf6e..b96ddbb4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { - "name": "experimental-rescript-webapi", + "name": "@rescript/webapi", "version": "0.1.0", - "private": true, "description": "Experimental successor to [rescript-webapi](https://github.com/TheSpyder/rescript-webapi)", "keywords": [ "dom", @@ -23,8 +22,11 @@ "type": "git", "url": "git+https://github.com/rescript-lang/experimental-rescript-webapi.git" }, - "workspaces": [ - "packages/*" + "files": [ + "rescript.json", + "src/**/*.res", + "src/**/*.resi", + "README.md" ], "type": "module", "publishConfig": { @@ -34,11 +36,9 @@ "scripts": { "test": "node tests/index.js", "build": "rescript", - "build:packages": "npm run build --workspaces --if-present", "format": "rescript format && oxfmt ./tests/index.js ./package.json ./docs && prettier --write ./docs/pages", "format:check": "rescript format --check && oxfmt ./tests/index.js ./package.json ./docs --check && prettier --check ./docs/pages", "docs": "astro dev", - "create:npm-packages": "node scripts/create-npm-packages.js", "prebuild:docs": "node docs/llm.js", "build:docs": "astro build" }, diff --git a/packages/Base/package.json b/packages/Base/package.json deleted file mode 100644 index f7dfed79..00000000 --- a/packages/Base/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/base", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": {} -} diff --git a/packages/Base/rescript.json b/packages/Base/rescript.json deleted file mode 100644 index a304e4c8..00000000 --- a/packages/Base/rescript.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@rescript-webapi/base", - "namespace": "WebApiBase", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [] -} diff --git a/packages/CSSFontLoading/package.json b/packages/CSSFontLoading/package.json deleted file mode 100644 index e8b2ef7d..00000000 --- a/packages/CSSFontLoading/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/css-font-loading", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/CSSFontLoading/rescript.json b/packages/CSSFontLoading/rescript.json deleted file mode 100644 index d3825c04..00000000 --- a/packages/CSSFontLoading/rescript.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rescript-webapi/css-font-loading", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event", - "@rescript-webapi/base" - ], - "namespace": "WebApiCSSFontLoading" -} diff --git a/packages/CSSFontLoading/src/FontFaceSet.res b/packages/CSSFontLoading/src/FontFaceSet.res deleted file mode 100644 index a0d32199..00000000 --- a/packages/CSSFontLoading/src/FontFaceSet.res +++ /dev/null @@ -1,35 +0,0 @@ -include WebApiEvent.EventTarget.Impl({type t = Types.fontFaceSet}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/add) -*/ -@send -external add: (Types.fontFaceSet, Types.fontFace) => Types.fontFaceSet = "add" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/delete) -*/ -@send -external delete: (Types.fontFaceSet, Types.fontFace) => bool = "delete" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/clear) -*/ -@send -external clear: Types.fontFaceSet => unit = "clear" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load) -*/ -@send -external load: ( - Types.fontFaceSet, - ~font: string, - ~text: string=?, -) => promise> = "load" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check) -*/ -@send -external check: (Types.fontFaceSet, ~font: string, ~text: string=?) => bool = "check" diff --git a/packages/Canvas/package.json b/packages/Canvas/package.json deleted file mode 100644 index a877c5a6..00000000 --- a/packages/Canvas/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@rescript-webapi/canvas", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/dom": "0.1.0", - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/file": "0.1.0", - "@rescript-webapi/media-capture-and-streams": "0.1.0", - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/Canvas/rescript.json b/packages/Canvas/rescript.json deleted file mode 100644 index a60ad2b0..00000000 --- a/packages/Canvas/rescript.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@rescript-webapi/canvas", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/dom", - "@rescript-webapi/event", - "@rescript-webapi/file", - "@rescript-webapi/media-capture-and-streams", - "@rescript-webapi/base" - ], - "namespace": "WebApiCanvas" -} diff --git a/packages/Canvas/src/FillStyle.res b/packages/Canvas/src/FillStyle.res deleted file mode 100644 index aa5141ed..00000000 --- a/packages/Canvas/src/FillStyle.res +++ /dev/null @@ -1,25 +0,0 @@ -external fromString: string => Types.fillStyle = "%identity" -external fromCanvasGradient: Types.canvasGradient => Types.fillStyle = "%identity" -external fromCanvasPattern: Types.canvasPattern => Types.fillStyle = "%identity" - -external toString: Types.fillStyle => string = "%identity" -external toCanvasGradient: Types.fillStyle => Types.canvasGradient = "%identity" -external toCanvasPattern: Types.fillStyle => Types.canvasPattern = "%identity" - -/** -Represents a decoded version of the abstract `fillStyle` type, used in Context2D. - */ -type decoded = - | String(string) - | CanvasGradient(Types.canvasGradient) - | CanvasPattern(Types.canvasPattern) - -let decode = (t: Types.fillStyle): decoded => { - if CanvasGradient.isInstanceOf(t) { - CanvasGradient(toCanvasGradient(t)) - } else if CanvasPattern.isInstanceOf(t) { - CanvasPattern(toCanvasPattern(t)) - } else { - String(toString(t)) - } -} diff --git a/packages/Canvas/src/VideoFrame.res b/packages/Canvas/src/VideoFrame.res deleted file mode 100644 index 10fb9cdd..00000000 --- a/packages/Canvas/src/VideoFrame.res +++ /dev/null @@ -1,140 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make: ( - ~image: WebApiDOM.Types.htmlImageElement, - ~init: WebApiDOM.Types.videoFrameInit=?, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make2: ( - ~image: WebApiDOM.Types.svgImageElement, - ~init: WebApiDOM.Types.videoFrameInit=?, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make3: ( - ~image: WebApiDOM.Types.htmlVideoElement, - ~init: WebApiDOM.Types.videoFrameInit=?, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make4: ( - ~image: WebApiDOM.Types.htmlCanvasElement, - ~init: WebApiDOM.Types.videoFrameInit=?, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make5: ( - ~image: Types.imageBitmap, - ~init: WebApiDOM.Types.videoFrameInit=?, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make6: ( - ~image: Types.offscreenCanvas, - ~init: WebApiDOM.Types.videoFrameInit=?, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make7: ( - ~image: WebApiDOM.Types.videoFrame, - ~init: WebApiDOM.Types.videoFrameInit=?, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make8: ( - ~data: ArrayBuffer.t, - ~init: WebApiDOM.Types.videoFrameBufferInit, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make9: ( - ~data: WebApiBase.ArrayBufferTypedArrayOrDataView.t, - ~init: WebApiDOM.Types.videoFrameBufferInit, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame) -*/ -@new -external make10: ( - ~data: DataView.t, - ~init: WebApiDOM.Types.videoFrameBufferInit, -) => WebApiDOM.Types.videoFrame = "VideoFrame" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/allocationSize) -*/ -@send -external allocationSize: ( - WebApiDOM.Types.videoFrame, - ~options: WebApiDOM.Types.videoFrameCopyToOptions=?, -) => int = "allocationSize" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo) -*/ -@send -external copyTo: ( - WebApiDOM.Types.videoFrame, - ~destination: ArrayBuffer.t, - ~options: WebApiDOM.Types.videoFrameCopyToOptions=?, -) => promise> = "copyTo" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo) -*/ -@send -external copyTo2: ( - WebApiDOM.Types.videoFrame, - ~destination: WebApiBase.ArrayBufferTypedArrayOrDataView.t, - ~options: WebApiDOM.Types.videoFrameCopyToOptions=?, -) => promise> = "copyTo" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo) -*/ -@send -external copyTo3: ( - WebApiDOM.Types.videoFrame, - ~destination: DataView.t, - ~options: WebApiDOM.Types.videoFrameCopyToOptions=?, -) => promise> = "copyTo" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/clone) -*/ -@send -external clone: WebApiDOM.Types.videoFrame => WebApiDOM.Types.videoFrame = "clone" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/close) -*/ -@send -external close: WebApiDOM.Types.videoFrame => unit = "close" diff --git a/packages/ChannelMessaging/package.json b/packages/ChannelMessaging/package.json deleted file mode 100644 index 2c7cabef..00000000 --- a/packages/ChannelMessaging/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/channel-messaging", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/ChannelMessaging/rescript.json b/packages/ChannelMessaging/rescript.json deleted file mode 100644 index 5e80ca77..00000000 --- a/packages/ChannelMessaging/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/channel-messaging", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiChannelMessaging" -} diff --git a/packages/Clipboard/package.json b/packages/Clipboard/package.json deleted file mode 100644 index 9843cba1..00000000 --- a/packages/Clipboard/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@rescript-webapi/clipboard", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/file": "0.1.0" - } -} diff --git a/packages/Clipboard/rescript.json b/packages/Clipboard/rescript.json deleted file mode 100644 index ae36d535..00000000 --- a/packages/Clipboard/rescript.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rescript-webapi/clipboard", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event", - "@rescript-webapi/file" - ], - "namespace": "WebApiClipboard" -} diff --git a/packages/Clipboard/src/Clipboard.res b/packages/Clipboard/src/Clipboard.res deleted file mode 100644 index faa42675..00000000 --- a/packages/Clipboard/src/Clipboard.res +++ /dev/null @@ -1,25 +0,0 @@ -include WebApiEvent.EventTarget.Impl({type t = Types.clipboard}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/read) -*/ -@send -external read: Types.clipboard => promise> = "read" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/readText) -*/ -@send -external readText: Types.clipboard => promise = "readText" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/write) -*/ -@send -external write: (Types.clipboard, array) => promise = "write" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/writeText) -*/ -@send -external writeText: (Types.clipboard, string) => promise = "writeText" diff --git a/packages/CredentialManagement/package.json b/packages/CredentialManagement/package.json deleted file mode 100644 index 7da6252c..00000000 --- a/packages/CredentialManagement/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@rescript-webapi/credential-management", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/CredentialManagement/rescript.json b/packages/CredentialManagement/rescript.json deleted file mode 100644 index 38484418..00000000 --- a/packages/CredentialManagement/rescript.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rescript-webapi/credential-management", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event", - "@rescript-webapi/base" - ], - "namespace": "WebApiCredentialManagement" -} diff --git a/packages/CredentialManagement/src/CredentialsContainer.res b/packages/CredentialManagement/src/CredentialsContainer.res deleted file mode 100644 index fb8df6e1..00000000 --- a/packages/CredentialManagement/src/CredentialsContainer.res +++ /dev/null @@ -1,29 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/get) -*/ -@send -external get: ( - Types.credentialsContainer, - ~options: Types.credentialRequestOptions=?, -) => promise = "get" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/store) -*/ -@send -external store: (Types.credentialsContainer, Types.credential) => promise = "store" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/create) -*/ -@send -external create: ( - Types.credentialsContainer, - ~options: Types.credentialCreationOptions=?, -) => promise = "create" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/preventSilentAccess) -*/ -@send -external preventSilentAccess: Types.credentialsContainer => promise = "preventSilentAccess" diff --git a/packages/DOM/package.json b/packages/DOM/package.json deleted file mode 100644 index 51abf8fd..00000000 --- a/packages/DOM/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@rescript-webapi/dom", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/css-font-loading": "0.1.0", - "@rescript-webapi/channel-messaging": "0.1.0", - "@rescript-webapi/clipboard": "0.1.0", - "@rescript-webapi/credential-management": "0.1.0", - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/fetch": "0.1.0", - "@rescript-webapi/file": "0.1.0", - "@rescript-webapi/file-and-directory-entries": "0.1.0", - "@rescript-webapi/gamepad": "0.1.0", - "@rescript-webapi/geolocation": "0.1.0", - "@rescript-webapi/history": "0.1.0", - "@rescript-webapi/indexed-db": "0.1.0", - "@rescript-webapi/media-capabilities": "0.1.0", - "@rescript-webapi/media-capture-and-streams": "0.1.0", - "@rescript-webapi/media-session": "0.1.0", - "@rescript-webapi/performance": "0.1.0", - "@rescript-webapi/permissions": "0.1.0", - "@rescript-webapi/picture-in-picture": "0.1.0", - "@rescript-webapi/base": "0.1.0", - "@rescript-webapi/remote-playback": "0.1.0", - "@rescript-webapi/screen-wake-lock": "0.1.0", - "@rescript-webapi/service-worker": "0.1.0", - "@rescript-webapi/storage": "0.1.0", - "@rescript-webapi/url": "0.1.0", - "@rescript-webapi/view-transitions": "0.1.0", - "@rescript-webapi/visual-viewport": "0.1.0", - "@rescript-webapi/web-crypto": "0.1.0", - "@rescript-webapi/web-locks": "0.1.0", - "@rescript-webapi/web-midi": "0.1.0", - "@rescript-webapi/web-speech": "0.1.0", - "@rescript-webapi/web-storage": "0.1.0", - "@rescript-webapi/web-vtt": "0.1.0", - "@rescript-webapi/web-workers": "0.1.0" - } -} diff --git a/packages/DOM/rescript.json b/packages/DOM/rescript.json deleted file mode 100644 index f8860d5b..00000000 --- a/packages/DOM/rescript.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "@rescript-webapi/dom", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/css-font-loading", - "@rescript-webapi/channel-messaging", - "@rescript-webapi/clipboard", - "@rescript-webapi/credential-management", - "@rescript-webapi/event", - "@rescript-webapi/fetch", - "@rescript-webapi/file", - "@rescript-webapi/file-and-directory-entries", - "@rescript-webapi/gamepad", - "@rescript-webapi/geolocation", - "@rescript-webapi/history", - "@rescript-webapi/indexed-db", - "@rescript-webapi/media-capabilities", - "@rescript-webapi/media-capture-and-streams", - "@rescript-webapi/media-session", - "@rescript-webapi/performance", - "@rescript-webapi/permissions", - "@rescript-webapi/picture-in-picture", - "@rescript-webapi/base", - "@rescript-webapi/remote-playback", - "@rescript-webapi/screen-wake-lock", - "@rescript-webapi/service-worker", - "@rescript-webapi/storage", - "@rescript-webapi/url", - "@rescript-webapi/view-transitions", - "@rescript-webapi/visual-viewport", - "@rescript-webapi/web-crypto", - "@rescript-webapi/web-locks", - "@rescript-webapi/web-midi", - "@rescript-webapi/web-speech", - "@rescript-webapi/web-storage", - "@rescript-webapi/web-vtt", - "@rescript-webapi/web-workers" - ], - "namespace": "WebApiDOM" -} diff --git a/packages/DOM/src/CSSStyleSheet.res b/packages/DOM/src/CSSStyleSheet.res deleted file mode 100644 index 5d6cac8d..00000000 --- a/packages/DOM/src/CSSStyleSheet.res +++ /dev/null @@ -1,30 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) -*/ -@new -external make: (~options: Types.cssStyleSheetInit=?) => Types.cssStyleSheet = "CSSStyleSheet" - -external asStyleSheet: Types.cssStyleSheet => Types.styleSheet = "%identity" -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/insertRule) -*/ -@send -external insertRule: (Types.cssStyleSheet, ~rule: string, ~index: int=?) => int = "insertRule" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/deleteRule) -*/ -@send -external deleteRule: (Types.cssStyleSheet, int) => unit = "deleteRule" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replace) -*/ -@send -external replace: (Types.cssStyleSheet, string) => promise = "replace" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replaceSync) -*/ -@send -external replaceSync: (Types.cssStyleSheet, string) => unit = "replaceSync" diff --git a/packages/DOM/src/CaretPosition.res b/packages/DOM/src/CaretPosition.res deleted file mode 100644 index b8be2b90..00000000 --- a/packages/DOM/src/CaretPosition.res +++ /dev/null @@ -1,2 +0,0 @@ -@send -external getClientRect: Types.caretPosition => Types.domRect = "getClientRect" diff --git a/packages/DOM/src/Comment.res b/packages/DOM/src/Comment.res deleted file mode 100644 index 623d9652..00000000 --- a/packages/DOM/src/Comment.res +++ /dev/null @@ -1,7 +0,0 @@ -include CharacterData.Impl({type t = Types.comment}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Comment) -*/ -@new -external make: (~data: string=?) => Types.comment = "Comment" diff --git a/packages/DOM/src/DOMMatrix.res b/packages/DOM/src/DOMMatrix.res deleted file mode 100644 index f9e85641..00000000 --- a/packages/DOM/src/DOMMatrix.res +++ /dev/null @@ -1,184 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrix) -*/ -@new -external make: (~init: string=?) => Types.domMatrix = "DOMMatrix" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrix) -*/ -@new -external make2: (~init: array=?) => Types.domMatrix = "DOMMatrix" - -external asDOMMatrixReadOnly: Types.domMatrix => Types.domMatrixReadOnly = "%identity" -@scope("DOMMatrix") -external fromMatrix: (~other: Types.domMatrixInit=?) => Types.domMatrixReadOnly = "fromMatrix" - -@scope("DOMMatrix") -external fromFloat32Array: array => Types.domMatrixReadOnly = "fromFloat32Array" - -@scope("DOMMatrix") -external fromFloat64Array: Float64Array.t => Types.domMatrixReadOnly = "fromFloat64Array" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/translate) -*/ -@send -external translate: (Types.domMatrix, ~tx: float=?, ~ty: float=?, ~tz: float=?) => Types.domMatrix = - "translate" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale) -*/ -@send -external scale: ( - Types.domMatrix, - ~scaleX: float=?, - ~scaleY: float=?, - ~scaleZ: float=?, - ~originX: float=?, - ~originY: float=?, - ~originZ: float=?, -) => Types.domMatrix = "scale" - -@send -external scale3d: ( - Types.domMatrix, - ~scale: float=?, - ~originX: float=?, - ~originY: float=?, - ~originZ: float=?, -) => Types.domMatrix = "scale3d" - -@send -external rotate: ( - Types.domMatrix, - ~rotX: float=?, - ~rotY: float=?, - ~rotZ: float=?, -) => Types.domMatrix = "rotate" - -@send -external rotateFromVector: (Types.domMatrix, ~x: float=?, ~y: float=?) => Types.domMatrix = - "rotateFromVector" - -@send -external rotateAxisAngle: ( - Types.domMatrix, - ~x: float=?, - ~y: float=?, - ~z: float=?, - ~angle: float=?, -) => Types.domMatrix = "rotateAxisAngle" - -@send -external skewX: (Types.domMatrix, ~sx: float=?) => Types.domMatrix = "skewX" - -@send -external skewY: (Types.domMatrix, ~sy: float=?) => Types.domMatrix = "skewY" - -@send -external multiply: (Types.domMatrix, ~other: Types.domMatrixInit=?) => Types.domMatrix = "multiply" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX) -*/ -@send -external flipX: Types.domMatrix => Types.domMatrix = "flipX" - -@send -external flipY: Types.domMatrix => Types.domMatrix = "flipY" - -@send -external inverse: Types.domMatrix => Types.domMatrix = "inverse" - -@send -external transformPoint: (Types.domMatrix, ~point: Types.domPointInit=?) => Types.domPoint = - "transformPoint" - -@send -external toFloat32Array: Types.domMatrix => array = "toFloat32Array" - -@send -external toFloat64Array: Types.domMatrix => Float64Array.t = "toFloat64Array" - -@send -external toJSON: Types.domMatrix => Dict.t = "toJSON" - -@scope("DOMMatrix") -external fromMatrixD: (~other: Types.domMatrixInit=?) => Types.domMatrix = "fromMatrix" - -@scope("DOMMatrix") -external fromFloat32ArrayD: array => Types.domMatrix = "fromFloat32Array" - -@scope("DOMMatrix") -external fromFloat64ArrayD: Float64Array.t => Types.domMatrix = "fromFloat64Array" - -@send -external multiplySelf: (Types.domMatrix, ~other: Types.domMatrixInit=?) => Types.domMatrix = - "multiplySelf" - -@send -external preMultiplySelf: (Types.domMatrix, ~other: Types.domMatrixInit=?) => Types.domMatrix = - "preMultiplySelf" - -@send -external translateSelf: ( - Types.domMatrix, - ~tx: float=?, - ~ty: float=?, - ~tz: float=?, -) => Types.domMatrix = "translateSelf" - -@send -external scaleSelf: ( - Types.domMatrix, - ~scaleX: float=?, - ~scaleY: float=?, - ~scaleZ: float=?, - ~originX: float=?, - ~originY: float=?, - ~originZ: float=?, -) => Types.domMatrix = "scaleSelf" - -@send -external scale3dSelf: ( - Types.domMatrix, - ~scale: float=?, - ~originX: float=?, - ~originY: float=?, - ~originZ: float=?, -) => Types.domMatrix = "scale3dSelf" - -@send -external rotateSelf: ( - Types.domMatrix, - ~rotX: float=?, - ~rotY: float=?, - ~rotZ: float=?, -) => Types.domMatrix = "rotateSelf" - -@send -external rotateFromVectorSelf: (Types.domMatrix, ~x: float=?, ~y: float=?) => Types.domMatrix = - "rotateFromVectorSelf" - -@send -external rotateAxisAngleSelf: ( - Types.domMatrix, - ~x: float=?, - ~y: float=?, - ~z: float=?, - ~angle: float=?, -) => Types.domMatrix = "rotateAxisAngleSelf" - -@send -external skewXSelf: (Types.domMatrix, ~sx: float=?) => Types.domMatrix = "skewXSelf" - -@send -external skewYSelf: (Types.domMatrix, ~sy: float=?) => Types.domMatrix = "skewYSelf" - -@send -external invertSelf: Types.domMatrix => Types.domMatrix = "invertSelf" - -@send -external setMatrixValue: (Types.domMatrix, string) => Types.domMatrix = "setMatrixValue" diff --git a/packages/DOM/src/DOMMatrixReadOnly.res b/packages/DOM/src/DOMMatrixReadOnly.res deleted file mode 100644 index 1c5cc270..00000000 --- a/packages/DOM/src/DOMMatrixReadOnly.res +++ /dev/null @@ -1,110 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) -*/ -@new -external make: (~init: string=?) => Types.domMatrixReadOnly = "DOMMatrixReadOnly" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) -*/ -@new -external make2: (~init: array=?) => Types.domMatrixReadOnly = "DOMMatrixReadOnly" - -@scope("DOMMatrixReadOnly") -external fromMatrix: (~other: Types.domMatrixInit=?) => Types.domMatrixReadOnly = "fromMatrix" - -@scope("DOMMatrixReadOnly") -external fromFloat32Array: array => Types.domMatrixReadOnly = "fromFloat32Array" - -@scope("DOMMatrixReadOnly") -external fromFloat64Array: Float64Array.t => Types.domMatrixReadOnly = "fromFloat64Array" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/translate) -*/ -@send -external translate: ( - Types.domMatrixReadOnly, - ~tx: float=?, - ~ty: float=?, - ~tz: float=?, -) => Types.domMatrix = "translate" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale) -*/ -@send -external scale: ( - Types.domMatrixReadOnly, - ~scaleX: float=?, - ~scaleY: float=?, - ~scaleZ: float=?, - ~originX: float=?, - ~originY: float=?, - ~originZ: float=?, -) => Types.domMatrix = "scale" - -@send -external scale3d: ( - Types.domMatrixReadOnly, - ~scale: float=?, - ~originX: float=?, - ~originY: float=?, - ~originZ: float=?, -) => Types.domMatrix = "scale3d" - -@send -external rotate: ( - Types.domMatrixReadOnly, - ~rotX: float=?, - ~rotY: float=?, - ~rotZ: float=?, -) => Types.domMatrix = "rotate" - -@send -external rotateFromVector: (Types.domMatrixReadOnly, ~x: float=?, ~y: float=?) => Types.domMatrix = - "rotateFromVector" - -@send -external rotateAxisAngle: ( - Types.domMatrixReadOnly, - ~x: float=?, - ~y: float=?, - ~z: float=?, - ~angle: float=?, -) => Types.domMatrix = "rotateAxisAngle" - -@send -external skewX: (Types.domMatrixReadOnly, ~sx: float=?) => Types.domMatrix = "skewX" - -@send -external skewY: (Types.domMatrixReadOnly, ~sy: float=?) => Types.domMatrix = "skewY" - -@send -external multiply: (Types.domMatrixReadOnly, ~other: Types.domMatrixInit=?) => Types.domMatrix = - "multiply" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX) -*/ -@send -external flipX: Types.domMatrixReadOnly => Types.domMatrix = "flipX" - -@send -external flipY: Types.domMatrixReadOnly => Types.domMatrix = "flipY" - -@send -external inverse: Types.domMatrixReadOnly => Types.domMatrix = "inverse" - -@send -external transformPoint: (Types.domMatrixReadOnly, ~point: Types.domPointInit=?) => Types.domPoint = - "transformPoint" - -@send -external toFloat32Array: Types.domMatrixReadOnly => array = "toFloat32Array" - -@send -external toFloat64Array: Types.domMatrixReadOnly => Float64Array.t = "toFloat64Array" - -@send -external toJSON: Types.domMatrixReadOnly => Dict.t = "toJSON" diff --git a/packages/DOM/src/DOMPoint.res b/packages/DOM/src/DOMPoint.res deleted file mode 100644 index 7c2d45c6..00000000 --- a/packages/DOM/src/DOMPoint.res +++ /dev/null @@ -1,28 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPoint) -*/ -@new -external make: (~x: float=?, ~y: float=?, ~z: float=?, ~w: float=?) => Types.domPoint = "DOMPoint" - -external asDOMPointReadOnly: Types.domPoint => Types.domPointReadOnly = "%identity" -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) -*/ -@scope("DOMPoint") -external fromPoint: (~other: Types.domPointInit=?) => Types.domPointReadOnly = "fromPoint" - -@send -external matrixTransform: (Types.domPoint, ~matrix: Types.domMatrixInit=?) => Types.domPoint = - "matrixTransform" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/toJSON) -*/ -@send -external toJSON: Types.domPoint => Dict.t = "toJSON" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) -*/ -@scope("DOMPoint") -external fromPointD: (~other: Types.domPointInit=?) => Types.domPoint = "fromPoint" diff --git a/packages/DOM/src/DOMRectList.res b/packages/DOM/src/DOMRectList.res deleted file mode 100644 index 8fd1645a..00000000 --- a/packages/DOM/src/DOMRectList.res +++ /dev/null @@ -1,2 +0,0 @@ -@send -external item: (Types.domRectList, int) => Types.domRect = "item" diff --git a/packages/DOM/src/DocumentTimeline.res b/packages/DOM/src/DocumentTimeline.res deleted file mode 100644 index 441b1558..00000000 --- a/packages/DOM/src/DocumentTimeline.res +++ /dev/null @@ -1,8 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentTimeline) -*/ -@new -external make: (~options: Types.documentTimelineOptions=?) => Types.documentTimeline = - "DocumentTimeline" - -external asAnimationTimeline: Types.documentTimeline => Types.animationTimeline = "%identity" diff --git a/packages/DOM/src/HTMLAnchorElement.res b/packages/DOM/src/HTMLAnchorElement.res deleted file mode 100644 index 5894994d..00000000 --- a/packages/DOM/src/HTMLAnchorElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlAnchorElement}) diff --git a/packages/DOM/src/HTMLAreaElement.res b/packages/DOM/src/HTMLAreaElement.res deleted file mode 100644 index eefec7c9..00000000 --- a/packages/DOM/src/HTMLAreaElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlAreaElement}) diff --git a/packages/DOM/src/HTMLAudioElement.res b/packages/DOM/src/HTMLAudioElement.res deleted file mode 100644 index e3774f94..00000000 --- a/packages/DOM/src/HTMLAudioElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLMediaElement.Impl({type t = Types.htmlAudioElement}) diff --git a/packages/DOM/src/HTMLBRElement.res b/packages/DOM/src/HTMLBRElement.res deleted file mode 100644 index 42c5d78a..00000000 --- a/packages/DOM/src/HTMLBRElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlbrElement}) diff --git a/packages/DOM/src/HTMLBaseElement.res b/packages/DOM/src/HTMLBaseElement.res deleted file mode 100644 index 5d7a9f07..00000000 --- a/packages/DOM/src/HTMLBaseElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlBaseElement}) diff --git a/packages/DOM/src/HTMLBodyElement.res b/packages/DOM/src/HTMLBodyElement.res deleted file mode 100644 index 953df584..00000000 --- a/packages/DOM/src/HTMLBodyElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlBodyElement}) diff --git a/packages/DOM/src/HTMLDListElement.res b/packages/DOM/src/HTMLDListElement.res deleted file mode 100644 index d3fb938e..00000000 --- a/packages/DOM/src/HTMLDListElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmldListElement}) diff --git a/packages/DOM/src/HTMLDataElement.res b/packages/DOM/src/HTMLDataElement.res deleted file mode 100644 index 21689c4a..00000000 --- a/packages/DOM/src/HTMLDataElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlDataElement}) diff --git a/packages/DOM/src/HTMLDataListElement.res b/packages/DOM/src/HTMLDataListElement.res deleted file mode 100644 index eab8f211..00000000 --- a/packages/DOM/src/HTMLDataListElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlDataListElement}) diff --git a/packages/DOM/src/HTMLDivElement.res b/packages/DOM/src/HTMLDivElement.res deleted file mode 100644 index 77f61667..00000000 --- a/packages/DOM/src/HTMLDivElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlDivElement}) diff --git a/packages/DOM/src/HTMLEmbedElement.res b/packages/DOM/src/HTMLEmbedElement.res deleted file mode 100644 index 7c269908..00000000 --- a/packages/DOM/src/HTMLEmbedElement.res +++ /dev/null @@ -1,4 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlEmbedElement}) - -@send -external getSVGDocument: Types.htmlEmbedElement => Types.document = "getSVGDocument" diff --git a/packages/DOM/src/HTMLFormControlsCollection.res b/packages/DOM/src/HTMLFormControlsCollection.res deleted file mode 100644 index f347bc51..00000000 --- a/packages/DOM/src/HTMLFormControlsCollection.res +++ /dev/null @@ -1,15 +0,0 @@ -external asHTMLCollection: Types.htmlFormControlsCollection => Types.htmlCollection = - "%identity" -/** -Retrieves an object from various collections. -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/item) -*/ -@send -external item: (Types.htmlFormControlsCollection, int) => Types.element = "item" - -/** -Retrieves a select object or an object from an options collection. -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/namedItem) -*/ -@send -external namedItem: (Types.htmlFormControlsCollection, string) => Types.element = "namedItem" diff --git a/packages/DOM/src/HTMLFrameSetElement.res b/packages/DOM/src/HTMLFrameSetElement.res deleted file mode 100644 index aed6c7e7..00000000 --- a/packages/DOM/src/HTMLFrameSetElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlFrameSetElement}) diff --git a/packages/DOM/src/HTMLHRElement.res b/packages/DOM/src/HTMLHRElement.res deleted file mode 100644 index 856fcc3c..00000000 --- a/packages/DOM/src/HTMLHRElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlhrElement}) diff --git a/packages/DOM/src/HTMLHeadElement.res b/packages/DOM/src/HTMLHeadElement.res deleted file mode 100644 index 45124481..00000000 --- a/packages/DOM/src/HTMLHeadElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlHeadElement}) diff --git a/packages/DOM/src/HTMLHeadingElement.res b/packages/DOM/src/HTMLHeadingElement.res deleted file mode 100644 index 7f896e63..00000000 --- a/packages/DOM/src/HTMLHeadingElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlHeadingElement}) diff --git a/packages/DOM/src/HTMLHtmlElement.res b/packages/DOM/src/HTMLHtmlElement.res deleted file mode 100644 index 0e760954..00000000 --- a/packages/DOM/src/HTMLHtmlElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlHtmlElement}) diff --git a/packages/DOM/src/HTMLIFrameElement.res b/packages/DOM/src/HTMLIFrameElement.res deleted file mode 100644 index 637d2bd9..00000000 --- a/packages/DOM/src/HTMLIFrameElement.res +++ /dev/null @@ -1,4 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmliFrameElement}) - -@send -external getSVGDocument: Types.htmliFrameElement => Types.document = "getSVGDocument" diff --git a/packages/DOM/src/HTMLImageElement.res b/packages/DOM/src/HTMLImageElement.res deleted file mode 100644 index 64979a5d..00000000 --- a/packages/DOM/src/HTMLImageElement.res +++ /dev/null @@ -1,7 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlImageElement}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/decode) -*/ -@send -external decode: Types.htmlImageElement => promise = "decode" diff --git a/packages/DOM/src/HTMLLIElement.res b/packages/DOM/src/HTMLLIElement.res deleted file mode 100644 index cbf76f46..00000000 --- a/packages/DOM/src/HTMLLIElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlliElement}) diff --git a/packages/DOM/src/HTMLLabelElement.res b/packages/DOM/src/HTMLLabelElement.res deleted file mode 100644 index 9b02a020..00000000 --- a/packages/DOM/src/HTMLLabelElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlLabelElement}) diff --git a/packages/DOM/src/HTMLLegendElement.res b/packages/DOM/src/HTMLLegendElement.res deleted file mode 100644 index aa727c73..00000000 --- a/packages/DOM/src/HTMLLegendElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlLegendElement}) diff --git a/packages/DOM/src/HTMLLinkElement.res b/packages/DOM/src/HTMLLinkElement.res deleted file mode 100644 index 6ed981b7..00000000 --- a/packages/DOM/src/HTMLLinkElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlLinkElement}) diff --git a/packages/DOM/src/HTMLMapElement.res b/packages/DOM/src/HTMLMapElement.res deleted file mode 100644 index ec7c9f7c..00000000 --- a/packages/DOM/src/HTMLMapElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlMapElement}) diff --git a/packages/DOM/src/HTMLMenuElement.res b/packages/DOM/src/HTMLMenuElement.res deleted file mode 100644 index 1015ce32..00000000 --- a/packages/DOM/src/HTMLMenuElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlMenuElement}) diff --git a/packages/DOM/src/HTMLMetaElement.res b/packages/DOM/src/HTMLMetaElement.res deleted file mode 100644 index 883342d3..00000000 --- a/packages/DOM/src/HTMLMetaElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlMetaElement}) diff --git a/packages/DOM/src/HTMLMeterElement.res b/packages/DOM/src/HTMLMeterElement.res deleted file mode 100644 index 8d3ba7b9..00000000 --- a/packages/DOM/src/HTMLMeterElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlMeterElement}) diff --git a/packages/DOM/src/HTMLModElement.res b/packages/DOM/src/HTMLModElement.res deleted file mode 100644 index a337135a..00000000 --- a/packages/DOM/src/HTMLModElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlModElement}) diff --git a/packages/DOM/src/HTMLOListElement.res b/packages/DOM/src/HTMLOListElement.res deleted file mode 100644 index 4aeac356..00000000 --- a/packages/DOM/src/HTMLOListElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmloListElement}) diff --git a/packages/DOM/src/HTMLOptGroupElement.res b/packages/DOM/src/HTMLOptGroupElement.res deleted file mode 100644 index 3b2b9f20..00000000 --- a/packages/DOM/src/HTMLOptGroupElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlOptGroupElement}) diff --git a/packages/DOM/src/HTMLOptionElement.res b/packages/DOM/src/HTMLOptionElement.res deleted file mode 100644 index 11e2b30f..00000000 --- a/packages/DOM/src/HTMLOptionElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlOptionElement}) diff --git a/packages/DOM/src/HTMLParagraphElement.res b/packages/DOM/src/HTMLParagraphElement.res deleted file mode 100644 index e22f47a5..00000000 --- a/packages/DOM/src/HTMLParagraphElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlParagraphElement}) diff --git a/packages/DOM/src/HTMLPictureElement.res b/packages/DOM/src/HTMLPictureElement.res deleted file mode 100644 index 2d245073..00000000 --- a/packages/DOM/src/HTMLPictureElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlPictureElement}) diff --git a/packages/DOM/src/HTMLPreElement.res b/packages/DOM/src/HTMLPreElement.res deleted file mode 100644 index 13ca9cba..00000000 --- a/packages/DOM/src/HTMLPreElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlPreElement}) diff --git a/packages/DOM/src/HTMLProgressElement.res b/packages/DOM/src/HTMLProgressElement.res deleted file mode 100644 index d434c5f4..00000000 --- a/packages/DOM/src/HTMLProgressElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlProgressElement}) diff --git a/packages/DOM/src/HTMLQuoteElement.res b/packages/DOM/src/HTMLQuoteElement.res deleted file mode 100644 index 5a66af0a..00000000 --- a/packages/DOM/src/HTMLQuoteElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlQuoteElement}) diff --git a/packages/DOM/src/HTMLSourceElement.res b/packages/DOM/src/HTMLSourceElement.res deleted file mode 100644 index fba7a318..00000000 --- a/packages/DOM/src/HTMLSourceElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlSourceElement}) diff --git a/packages/DOM/src/HTMLSpanElement.res b/packages/DOM/src/HTMLSpanElement.res deleted file mode 100644 index 6653b8ba..00000000 --- a/packages/DOM/src/HTMLSpanElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlSpanElement}) diff --git a/packages/DOM/src/HTMLStyleElement.res b/packages/DOM/src/HTMLStyleElement.res deleted file mode 100644 index 71021b40..00000000 --- a/packages/DOM/src/HTMLStyleElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlStyleElement}) diff --git a/packages/DOM/src/HTMLTableCaptionElement.res b/packages/DOM/src/HTMLTableCaptionElement.res deleted file mode 100644 index a315b6ff..00000000 --- a/packages/DOM/src/HTMLTableCaptionElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlTableCaptionElement}) diff --git a/packages/DOM/src/HTMLTableCellElement.res b/packages/DOM/src/HTMLTableCellElement.res deleted file mode 100644 index 404cb6e2..00000000 --- a/packages/DOM/src/HTMLTableCellElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlTableCellElement}) diff --git a/packages/DOM/src/HTMLTemplateElement.res b/packages/DOM/src/HTMLTemplateElement.res deleted file mode 100644 index e62437c7..00000000 --- a/packages/DOM/src/HTMLTemplateElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlTemplateElement}) diff --git a/packages/DOM/src/HTMLTimeElement.res b/packages/DOM/src/HTMLTimeElement.res deleted file mode 100644 index a7d18248..00000000 --- a/packages/DOM/src/HTMLTimeElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlTimeElement}) diff --git a/packages/DOM/src/HTMLTitleElement.res b/packages/DOM/src/HTMLTitleElement.res deleted file mode 100644 index 56ae8e75..00000000 --- a/packages/DOM/src/HTMLTitleElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlTitleElement}) diff --git a/packages/DOM/src/HTMLTrackElement.res b/packages/DOM/src/HTMLTrackElement.res deleted file mode 100644 index eb52ee4f..00000000 --- a/packages/DOM/src/HTMLTrackElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmlTrackElement}) diff --git a/packages/DOM/src/HTMLUListElement.res b/packages/DOM/src/HTMLUListElement.res deleted file mode 100644 index 1983a1c7..00000000 --- a/packages/DOM/src/HTMLUListElement.res +++ /dev/null @@ -1 +0,0 @@ -include HTMLElement.Impl({type t = Types.htmluListElement}) diff --git a/packages/DOM/src/MediaQueryList.res b/packages/DOM/src/MediaQueryList.res deleted file mode 100644 index cdea6dc7..00000000 --- a/packages/DOM/src/MediaQueryList.res +++ /dev/null @@ -1 +0,0 @@ -include WebApiEvent.EventTarget.Impl({type t = Types.mediaQueryList}) diff --git a/packages/DOM/src/NodeFilter.res b/packages/DOM/src/NodeFilter.res deleted file mode 100644 index fdadeb82..00000000 --- a/packages/DOM/src/NodeFilter.res +++ /dev/null @@ -1,2 +0,0 @@ -@send -external acceptNode: (Types.nodeFilter, Types.node) => int = "acceptNode" diff --git a/packages/DOM/src/SVGGraphicsElement.res b/packages/DOM/src/SVGGraphicsElement.res deleted file mode 100644 index c70f0c93..00000000 --- a/packages/DOM/src/SVGGraphicsElement.res +++ /dev/null @@ -1,18 +0,0 @@ -include Element.Impl({type t = Types.svgGraphicsElement}) - -external asSVGElement: Types.svgGraphicsElement => Types.svgElement = "%identity" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SVGGraphicsElement/getBBox) -*/ -@send -external getBBox: ( - Types.svgGraphicsElement, - ~options: Types.svgBoundingBoxOptions=?, -) => Types.domRect = "getBBox" - -@send -external getCTM: Types.svgGraphicsElement => Types.domMatrix = "getCTM" - -@send -external getScreenCTM: Types.svgGraphicsElement => Types.domMatrix = "getScreenCTM" diff --git a/packages/DOM/src/ScreenOrientation.res b/packages/DOM/src/ScreenOrientation.res deleted file mode 100644 index 5297626f..00000000 --- a/packages/DOM/src/ScreenOrientation.res +++ /dev/null @@ -1,7 +0,0 @@ -include WebApiEvent.EventTarget.Impl({type t = Types.screenOrientation}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/unlock) -*/ -@send -external unlock: Types.screenOrientation => unit = "unlock" diff --git a/packages/DOM/src/ShadowRoot.res b/packages/DOM/src/ShadowRoot.res deleted file mode 100644 index 576938ee..00000000 --- a/packages/DOM/src/ShadowRoot.res +++ /dev/null @@ -1,19 +0,0 @@ -include DocumentFragment.Impl({type t = Types.shadowRoot}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getAnimations) -*/ -@send -external getAnimations: Types.shadowRoot => array = "getAnimations" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/setHTMLUnsafe) -*/ -@send -external setHTMLUnsafe: (Types.shadowRoot, string) => unit = "setHTMLUnsafe" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot/getHTML) -*/ -@send -external getHTML: (Types.shadowRoot, ~options: Types.getHTMLOptions=?) => string = "getHTML" diff --git a/packages/DOM/src/StylePropertyMap.res b/packages/DOM/src/StylePropertyMap.res deleted file mode 100644 index 8e790a52..00000000 --- a/packages/DOM/src/StylePropertyMap.res +++ /dev/null @@ -1,51 +0,0 @@ -external asStylePropertyMapReadOnly: Types.stylePropertyMap => Types.stylePropertyMapReadOnly = - "%identity" -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll) -*/ -@send -external getAll: (Types.stylePropertyMap, string) => array = "getAll" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/has) -*/ -@send -external has: (Types.stylePropertyMap, string) => bool = "has" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/set) -*/ -@send -external set: (Types.stylePropertyMap, ~property: string, ~values: Types.cssStyleValue) => unit = - "set" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/set) -*/ -@send -external set2: (Types.stylePropertyMap, ~property: string, ~values: string) => unit = "set" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/append) -*/ -@send -external append: (Types.stylePropertyMap, ~property: string, ~values: Types.cssStyleValue) => unit = - "append" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/append) -*/ -@send -external append2: (Types.stylePropertyMap, ~property: string, ~values: string) => unit = "append" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/delete) -*/ -@send -external delete: (Types.stylePropertyMap, string) => unit = "delete" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/clear) -*/ -@send -external clear: Types.stylePropertyMap => unit = "clear" diff --git a/packages/DOM/src/TextTrackList.res b/packages/DOM/src/TextTrackList.res deleted file mode 100644 index ef88d2b2..00000000 --- a/packages/DOM/src/TextTrackList.res +++ /dev/null @@ -1,8 +0,0 @@ -include WebApiEvent.EventTarget.Impl({type t = Types.textTrackList}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/TextTrackList/getTrackById) -*/ -@send -external getTrackById: (Types.textTrackList, string) => WebApiWebVTT.Types.textTrack = - "getTrackById" diff --git a/packages/EncryptedMediaExtensions/package.json b/packages/EncryptedMediaExtensions/package.json deleted file mode 100644 index 32735685..00000000 --- a/packages/EncryptedMediaExtensions/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@rescript-webapi/encrypted-media-extensions", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/dom": "0.1.0", - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/EncryptedMediaExtensions/rescript.json b/packages/EncryptedMediaExtensions/rescript.json deleted file mode 100644 index 2dd8c9c3..00000000 --- a/packages/EncryptedMediaExtensions/rescript.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@rescript-webapi/encrypted-media-extensions", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/dom", - "@rescript-webapi/event", - "@rescript-webapi/base" - ], - "namespace": "WebApiEncryptedMediaExtensions" -} diff --git a/packages/EncryptedMediaExtensions/src/HTMLMediaElement.res b/packages/EncryptedMediaExtensions/src/HTMLMediaElement.res deleted file mode 100644 index 4840daca..00000000 --- a/packages/EncryptedMediaExtensions/src/HTMLMediaElement.res +++ /dev/null @@ -1,12 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/mediaKeys) -*/ -@get -external mediaKeys: WebApiDOM.Types.htmlMediaElement => Null.t = "mediaKeys" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setMediaKeys) -*/ -@send -external setMediaKeys: (WebApiDOM.Types.htmlMediaElement, Types.mediaKeys) => promise = - "setMediaKeys" diff --git a/packages/EncryptedMediaExtensions/src/MediaKeySystemAccess.res b/packages/EncryptedMediaExtensions/src/MediaKeySystemAccess.res deleted file mode 100644 index f6170e2c..00000000 --- a/packages/EncryptedMediaExtensions/src/MediaKeySystemAccess.res +++ /dev/null @@ -1,12 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess/getConfiguration) -*/ -@send -external getConfiguration: Types.mediaKeySystemAccess => Types.mediaKeySystemConfiguration = - "getConfiguration" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess/createMediaKeys) -*/ -@send -external createMediaKeys: Types.mediaKeySystemAccess => promise = "createMediaKeys" diff --git a/packages/EncryptedMediaExtensions/src/MediaKeys.res b/packages/EncryptedMediaExtensions/src/MediaKeys.res deleted file mode 100644 index 364a5e91..00000000 --- a/packages/EncryptedMediaExtensions/src/MediaKeys.res +++ /dev/null @@ -1,31 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/createSession) -*/ -@send -external createSession: ( - Types.mediaKeys, - ~sessionType: Types.mediaKeySessionType=?, -) => Types.mediaKeySession = "createSession" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/getStatusForPolicy) -*/ -@send -external getStatusForPolicy: ( - Types.mediaKeys, - ~policy: Types.mediaKeysPolicy=?, -) => promise = "getStatusForPolicy" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/setServerCertificate) -*/ -@send -external setServerCertificate: (Types.mediaKeys, DataView.t) => promise = - "setServerCertificate" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/setServerCertificate) -*/ -@send -external setServerCertificate2: (Types.mediaKeys, ArrayBuffer.t) => promise = - "setServerCertificate" diff --git a/packages/Event/package.json b/packages/Event/package.json deleted file mode 100644 index 599fa4c5..00000000 --- a/packages/Event/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/event", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/dom": "0.1.0" - } -} diff --git a/packages/Event/rescript.json b/packages/Event/rescript.json deleted file mode 100644 index 7fb58767..00000000 --- a/packages/Event/rescript.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rescript-webapi/event", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/dom", - "@rescript-webapi/base" - ], - "namespace": "WebApiEvent" -} diff --git a/packages/Event/src/ExtendableEvent.res b/packages/Event/src/ExtendableEvent.res deleted file mode 100644 index 8d01992f..00000000 --- a/packages/Event/src/ExtendableEvent.res +++ /dev/null @@ -1,14 +0,0 @@ -module Impl = ( - T: { - type t - }, -) => { - external asExtendableEvent: T.t => Types.extendableEvent = "%identity" - - include Event.Impl({type t = T.t}) - - @send - external waitUntil: (T.t, promise<'a>) => unit = "waitUntil" -} - -include Impl({type t = Types.extendableEvent}) diff --git a/packages/Fetch/package.json b/packages/Fetch/package.json deleted file mode 100644 index bd3a152e..00000000 --- a/packages/Fetch/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@rescript-webapi/fetch", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/base": "0.1.0", - "@rescript-webapi/file": "0.1.0", - "@rescript-webapi/url": "0.1.0", - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/Fetch/rescript.json b/packages/Fetch/rescript.json deleted file mode 100644 index 302da0e9..00000000 --- a/packages/Fetch/rescript.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/fetch", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event", - "@rescript-webapi/file", - "@rescript-webapi/base", - "@rescript-webapi/url" - ], - "namespace": "WebApiFetch" -} diff --git a/packages/Fetch/src/FormDataEntryValue.res b/packages/Fetch/src/FormDataEntryValue.res deleted file mode 100644 index 88a83030..00000000 --- a/packages/Fetch/src/FormDataEntryValue.res +++ /dev/null @@ -1,2 +0,0 @@ -@unboxed -type t = Types.formDataEntryValue = | ...Types.formDataEntryValue diff --git a/packages/File/package.json b/packages/File/package.json deleted file mode 100644 index 4bddcc3f..00000000 --- a/packages/File/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/file", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/File/rescript.json b/packages/File/rescript.json deleted file mode 100644 index 56ebf96a..00000000 --- a/packages/File/rescript.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rescript-webapi/file", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event", - "@rescript-webapi/base" - ], - "namespace": "WebApiFile" -} diff --git a/packages/File/src/FileSystemFileHandle.res b/packages/File/src/FileSystemFileHandle.res deleted file mode 100644 index 8369510b..00000000 --- a/packages/File/src/FileSystemFileHandle.res +++ /dev/null @@ -1,22 +0,0 @@ -external asFileSystemHandle: Types.fileSystemFileHandle => Types.fileSystemHandle = "%identity" -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) -*/ -@send -external isSameEntry: (Types.fileSystemFileHandle, Types.fileSystemHandle) => promise = - "isSameEntry" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/getFile) -*/ -@send -external getFile: Types.fileSystemFileHandle => promise = "getFile" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/createWritable) -*/ -@send -external createWritable: ( - Types.fileSystemFileHandle, - ~options: Types.fileSystemCreateWritableOptions=?, -) => promise = "createWritable" diff --git a/packages/File/src/WritableStream.res b/packages/File/src/WritableStream.res deleted file mode 100644 index bc7fb2fe..00000000 --- a/packages/File/src/WritableStream.res +++ /dev/null @@ -1,26 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream) -*/ -@new -external make: ( - ~underlyingSink: Types.underlyingSink<'w>=?, - ~strategy: Types.queuingStrategy<'w>=?, -) => Types.writableStream<'w> = "WritableStream" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) -*/ -@send -external abort: (Types.writableStream<'w>, ~reason: JSON.t=?) => promise = "abort" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/close) -*/ -@send -external close: Types.writableStream<'w> => promise = "close" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) -*/ -@send -external getWriter: Types.writableStream<'w> => Types.writableStreamDefaultWriter<'w> = "getWriter" diff --git a/packages/FileAndDirectoryEntries/package.json b/packages/FileAndDirectoryEntries/package.json deleted file mode 100644 index 75887a75..00000000 --- a/packages/FileAndDirectoryEntries/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/file-and-directory-entries", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/FileAndDirectoryEntries/rescript.json b/packages/FileAndDirectoryEntries/rescript.json deleted file mode 100644 index adcb2533..00000000 --- a/packages/FileAndDirectoryEntries/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/file-and-directory-entries", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/base" - ], - "namespace": "WebApiFileAndDirectoryEntries" -} diff --git a/packages/FileAndDirectoryEntries/src/FileSystemDirectoryEntry.res b/packages/FileAndDirectoryEntries/src/FileSystemDirectoryEntry.res deleted file mode 100644 index e902de20..00000000 --- a/packages/FileAndDirectoryEntries/src/FileSystemDirectoryEntry.res +++ /dev/null @@ -1,41 +0,0 @@ -external asFileSystemEntry: Types.fileSystemDirectoryEntry => Types.fileSystemEntry = "%identity" -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/getParent) -*/ -@send -external getParent: ( - Types.fileSystemDirectoryEntry, - ~successCallback: Types.fileSystemEntryCallback=?, - ~errorCallback: Types.errorCallback=?, -) => unit = "getParent" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry/createReader) -*/ -@send -external createReader: Types.fileSystemDirectoryEntry => Types.fileSystemDirectoryReader = - "createReader" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry/getFile) -*/ -@send -external getFile: ( - Types.fileSystemDirectoryEntry, - ~path: string=?, - ~options: Types.fileSystemFlags=?, - ~successCallback: Types.fileSystemEntryCallback=?, - ~errorCallback: Types.errorCallback=?, -) => unit = "getFile" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry/getDirectory) -*/ -@send -external getDirectory: ( - Types.fileSystemDirectoryEntry, - ~path: string=?, - ~options: Types.fileSystemFlags=?, - ~successCallback: Types.fileSystemEntryCallback=?, - ~errorCallback: Types.errorCallback=?, -) => unit = "getDirectory" diff --git a/packages/FileAndDirectoryEntries/src/FileSystemDirectoryReader.res b/packages/FileAndDirectoryEntries/src/FileSystemDirectoryReader.res deleted file mode 100644 index 2efb94cb..00000000 --- a/packages/FileAndDirectoryEntries/src/FileSystemDirectoryReader.res +++ /dev/null @@ -1,9 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryReader/readEntries) -*/ -@send -external readEntries: ( - Types.fileSystemDirectoryReader, - ~successCallback: Types.fileSystemEntriesCallback, - ~errorCallback: Types.errorCallback=?, -) => unit = "readEntries" diff --git a/packages/FileAndDirectoryEntries/src/FileSystemEntry.res b/packages/FileAndDirectoryEntries/src/FileSystemEntry.res deleted file mode 100644 index 963f2667..00000000 --- a/packages/FileAndDirectoryEntries/src/FileSystemEntry.res +++ /dev/null @@ -1,9 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/getParent) -*/ -@send -external getParent: ( - Types.fileSystemEntry, - ~successCallback: Types.fileSystemEntryCallback=?, - ~errorCallback: Types.errorCallback=?, -) => unit = "getParent" diff --git a/packages/Gamepad/package.json b/packages/Gamepad/package.json deleted file mode 100644 index a7061a26..00000000 --- a/packages/Gamepad/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/gamepad", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/Gamepad/rescript.json b/packages/Gamepad/rescript.json deleted file mode 100644 index c2cb0f87..00000000 --- a/packages/Gamepad/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/gamepad", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/base" - ], - "namespace": "WebApiGamepad" -} diff --git a/packages/Gamepad/src/GamepadHapticActuator.res b/packages/Gamepad/src/GamepadHapticActuator.res deleted file mode 100644 index 311a1c66..00000000 --- a/packages/Gamepad/src/GamepadHapticActuator.res +++ /dev/null @@ -1,15 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/playEffect) -*/ -@send -external playEffect: ( - Types.gamepadHapticActuator, - ~type_: Types.gamepadHapticEffectType, - ~params: Types.gamepadEffectParameters=?, -) => promise = "playEffect" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/reset) -*/ -@send -external reset: Types.gamepadHapticActuator => promise = "reset" diff --git a/packages/Geolocation/package.json b/packages/Geolocation/package.json deleted file mode 100644 index 9a1bf73f..00000000 --- a/packages/Geolocation/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/geolocation", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": {} -} diff --git a/packages/Geolocation/rescript.json b/packages/Geolocation/rescript.json deleted file mode 100644 index 3860cd3d..00000000 --- a/packages/Geolocation/rescript.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@rescript-webapi/geolocation", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [], - "namespace": "WebApiGeolocation" -} diff --git a/packages/Geolocation/src/Geolocation.res b/packages/Geolocation/src/Geolocation.res deleted file mode 100644 index 60b9c4f5..00000000 --- a/packages/Geolocation/src/Geolocation.res +++ /dev/null @@ -1,27 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation/getCurrentPosition) -*/ -@send -external getCurrentPosition: ( - Types.geolocation, - ~successCallback: Types.positionCallback, - ~errorCallback: Types.positionErrorCallback=?, - ~options: Types.positionOptions=?, -) => unit = "getCurrentPosition" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation/watchPosition) -*/ -@send -external watchPosition: ( - Types.geolocation, - ~successCallback: Types.positionCallback, - ~errorCallback: Types.positionErrorCallback=?, - ~options: Types.positionOptions=?, -) => int = "watchPosition" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation/clearWatch) -*/ -@send -external clearWatch: (Types.geolocation, int) => unit = "clearWatch" diff --git a/packages/History/package.json b/packages/History/package.json deleted file mode 100644 index 128ff317..00000000 --- a/packages/History/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/history", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": {} -} diff --git a/packages/History/rescript.json b/packages/History/rescript.json deleted file mode 100644 index 17c3e71b..00000000 --- a/packages/History/rescript.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@rescript-webapi/history", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [], - "namespace": "WebApiHistory" -} diff --git a/packages/IndexedDB/package.json b/packages/IndexedDB/package.json deleted file mode 100644 index 5d1db379..00000000 --- a/packages/IndexedDB/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@rescript-webapi/indexed-db", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/IndexedDB/rescript.json b/packages/IndexedDB/rescript.json deleted file mode 100644 index b3419afd..00000000 --- a/packages/IndexedDB/rescript.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rescript-webapi/indexed-db", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event", - "@rescript-webapi/base" - ], - "namespace": "WebApiIndexedDB" -} diff --git a/packages/IntersectionObserver/package.json b/packages/IntersectionObserver/package.json deleted file mode 100644 index f9842794..00000000 --- a/packages/IntersectionObserver/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/intersection-observer", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/dom": "0.1.0" - } -} diff --git a/packages/IntersectionObserver/rescript.json b/packages/IntersectionObserver/rescript.json deleted file mode 100644 index 3d7ae753..00000000 --- a/packages/IntersectionObserver/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/intersection-observer", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/dom" - ], - "namespace": "WebApiIntersectionObserver" -} diff --git a/packages/IntersectionObserver/src/IntersectionObserver.res b/packages/IntersectionObserver/src/IntersectionObserver.res deleted file mode 100644 index 60e4e304..00000000 --- a/packages/IntersectionObserver/src/IntersectionObserver.res +++ /dev/null @@ -1,33 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver) -*/ -@new -external make: ( - ~callback: Types.intersectionObserverCallback, - ~options: Types.intersectionObserverInit=?, -) => Types.intersectionObserver = "IntersectionObserver" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/observe) -*/ -@send -external observe: (Types.intersectionObserver, WebApiDOM.Types.element) => unit = "observe" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/unobserve) -*/ -@send -external unobserve: (Types.intersectionObserver, WebApiDOM.Types.element) => unit = "unobserve" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/disconnect) -*/ -@send -external disconnect: Types.intersectionObserver => unit = "disconnect" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/takeRecords) -*/ -@send -external takeRecords: Types.intersectionObserver => array = - "takeRecords" diff --git a/packages/IntersectionObserver/src/IntersectionObserverRoot.res b/packages/IntersectionObserver/src/IntersectionObserverRoot.res deleted file mode 100644 index d92008f8..00000000 --- a/packages/IntersectionObserver/src/IntersectionObserverRoot.res +++ /dev/null @@ -1,21 +0,0 @@ -external fromDocument: WebApiDOM.Types.document => Types.root = "%identity" -external fromElement: WebApiDOM.Types.element => Types.root = "%identity" -external fromNull: Types.root = "null" - -external toElement: Types.root => WebApiDOM.Types.element = "%identity" -external toDocument: Types.root => WebApiDOM.Types.document = "%identity" - -type decoded = - | Element(WebApiDOM.Types.element) - | Document(WebApiDOM.Types.document) - | Null - -let decode = (t: Types.root): decoded => { - if WebApiDOM.Element.isInstanceOf(t) { - Element(t->toElement) - } else if WebApiDOM.Document.isInstanceOf(t) { - Document(t->toDocument) - } else { - Null - } -} diff --git a/packages/MediaCapabilities/package.json b/packages/MediaCapabilities/package.json deleted file mode 100644 index 637f51fc..00000000 --- a/packages/MediaCapabilities/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/media-capabilities", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": {} -} diff --git a/packages/MediaCapabilities/rescript.json b/packages/MediaCapabilities/rescript.json deleted file mode 100644 index aa7e6132..00000000 --- a/packages/MediaCapabilities/rescript.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@rescript-webapi/media-capabilities", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [], - "namespace": "WebApiMediaCapabilities" -} diff --git a/packages/MediaCapabilities/src/MediaCapabilities.res b/packages/MediaCapabilities/src/MediaCapabilities.res deleted file mode 100644 index f21bf2fc..00000000 --- a/packages/MediaCapabilities/src/MediaCapabilities.res +++ /dev/null @@ -1,17 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/decodingInfo) -*/ -@send -external decodingInfo: ( - Types.mediaCapabilities, - Types.mediaDecodingConfiguration, -) => promise = "decodingInfo" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/encodingInfo) -*/ -@send -external encodingInfo: ( - Types.mediaCapabilities, - Types.mediaEncodingConfiguration, -) => promise = "encodingInfo" diff --git a/packages/MediaCaptureAndStreams/package.json b/packages/MediaCaptureAndStreams/package.json deleted file mode 100644 index 1c16547a..00000000 --- a/packages/MediaCaptureAndStreams/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/media-capture-and-streams", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/MediaCaptureAndStreams/rescript.json b/packages/MediaCaptureAndStreams/rescript.json deleted file mode 100644 index 4cac4279..00000000 --- a/packages/MediaCaptureAndStreams/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/media-capture-and-streams", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiMediaCaptureAndStreams" -} diff --git a/packages/MediaSession/package.json b/packages/MediaSession/package.json deleted file mode 100644 index 2cf71815..00000000 --- a/packages/MediaSession/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/media-session", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": {} -} diff --git a/packages/MediaSession/rescript.json b/packages/MediaSession/rescript.json deleted file mode 100644 index ce57fb37..00000000 --- a/packages/MediaSession/rescript.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@rescript-webapi/media-session", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [], - "namespace": "WebApiMediaSession" -} diff --git a/packages/MediaSession/src/MediaMetadata.res b/packages/MediaSession/src/MediaMetadata.res deleted file mode 100644 index 469ec32f..00000000 --- a/packages/MediaSession/src/MediaMetadata.res +++ /dev/null @@ -1,8 +0,0 @@ -type t = Types.mediaMetadata = private {...Types.mediaMetadata} -type mediaMetadataInit = Types.mediaMetadataInit = {...Types.mediaMetadataInit} - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaMetadata) -*/ -@new -external make: (~init: mediaMetadataInit=?) => t = "MediaMetadata" diff --git a/packages/MutationObserver/package.json b/packages/MutationObserver/package.json deleted file mode 100644 index 20512d53..00000000 --- a/packages/MutationObserver/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/mutation-observer", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/dom": "0.1.0" - } -} diff --git a/packages/MutationObserver/rescript.json b/packages/MutationObserver/rescript.json deleted file mode 100644 index b67324b7..00000000 --- a/packages/MutationObserver/rescript.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rescript-webapi/mutation-observer", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/dom", - "@rescript-webapi/base" - ], - "namespace": "WebApiMutationObserver" -} diff --git a/packages/MutationObserver/src/MutationObserver.res b/packages/MutationObserver/src/MutationObserver.res deleted file mode 100644 index 3c7cd459..00000000 --- a/packages/MutationObserver/src/MutationObserver.res +++ /dev/null @@ -1,27 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver) -*/ -@new -external make: Types.mutationObserverCallback => Types.mutationObserver = "MutationObserver" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/observe) -*/ -@send -external observe: ( - Types.mutationObserver, - ~target: WebApiDOM.Types.node, - ~options: Types.mutationObserverInit=?, -) => unit = "observe" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/disconnect) -*/ -@send -external disconnect: Types.mutationObserver => unit = "disconnect" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/takeRecords) -*/ -@send -external takeRecords: Types.mutationObserver => array = "takeRecords" diff --git a/packages/Notification/package.json b/packages/Notification/package.json deleted file mode 100644 index ddfe8e68..00000000 --- a/packages/Notification/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/notification", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/Notification/rescript.json b/packages/Notification/rescript.json deleted file mode 100644 index ccea1ca3..00000000 --- a/packages/Notification/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/notification", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiNotification" -} diff --git a/packages/Notification/src/Notification.res b/packages/Notification/src/Notification.res deleted file mode 100644 index 02b867cb..00000000 --- a/packages/Notification/src/Notification.res +++ /dev/null @@ -1,36 +0,0 @@ -type t = Types.notification = private {...Types.notification} -type notificationDirection = Types.notificationDirection -type notificationPermission = Types.notificationPermission -type notificationAction = Types.notificationAction = {...Types.notificationAction} -type notificationOptions = Types.notificationOptions = {...Types.notificationOptions} -type getNotificationOptions = Types.getNotificationOptions = {...Types.getNotificationOptions} -type notificationPermissionCallback = Types.notificationPermissionCallback -type notificationEvent = Types.notificationEvent = {...Types.notificationEvent} - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Notification) -*/ -@new -external make: (~title: string, ~options: notificationOptions=?) => t = "Notification" - -include WebApiEvent.EventTarget.Impl({type t = t}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Notification/requestPermission_static) -*/ -@scope("Notification") -external requestPermission: ( - ~deprecatedCallback: notificationPermissionCallback=?, -) => promise = "requestPermission" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Notification/close) -*/ -@send -external close: t => unit = "close" - -/** -[Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission_static) -*/ -@scope("Notification") @val -external permission: notificationPermission = "permission" diff --git a/packages/Performance/package.json b/packages/Performance/package.json deleted file mode 100644 index 9a0cefc1..00000000 --- a/packages/Performance/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/performance", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/Performance/rescript.json b/packages/Performance/rescript.json deleted file mode 100644 index 47588862..00000000 --- a/packages/Performance/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/performance", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiPerformance" -} diff --git a/packages/Performance/src/PerformanceMark.res b/packages/Performance/src/PerformanceMark.res deleted file mode 100644 index 7139874c..00000000 --- a/packages/Performance/src/PerformanceMark.res +++ /dev/null @@ -1,15 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceMark) -*/ -@new -external make: ( - ~markName: string, - ~markOptions: Types.performanceMarkOptions=?, -) => Types.performanceMark = "PerformanceMark" - -external asPerformanceEntry: Types.performanceMark => Types.performanceEntry = "%identity" -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) -*/ -@send -external toJSON: Types.performanceMark => Dict.t = "toJSON" diff --git a/packages/Permissions/package.json b/packages/Permissions/package.json deleted file mode 100644 index 5ac0d4b4..00000000 --- a/packages/Permissions/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/permissions", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/Permissions/rescript.json b/packages/Permissions/rescript.json deleted file mode 100644 index fe6b4956..00000000 --- a/packages/Permissions/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/permissions", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiPermissions" -} diff --git a/packages/Permissions/src/Permissions.res b/packages/Permissions/src/Permissions.res deleted file mode 100644 index 44ab7d27..00000000 --- a/packages/Permissions/src/Permissions.res +++ /dev/null @@ -1,6 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Permissions/query) -*/ -@send -external query: (Types.permissions, Types.permissionDescriptor) => promise = - "query" diff --git a/packages/PictureInPicture/package.json b/packages/PictureInPicture/package.json deleted file mode 100644 index 3e4cb66f..00000000 --- a/packages/PictureInPicture/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/picture-in-picture", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/PictureInPicture/rescript.json b/packages/PictureInPicture/rescript.json deleted file mode 100644 index 91a9379f..00000000 --- a/packages/PictureInPicture/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/picture-in-picture", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiPictureInPicture" -} diff --git a/packages/PictureInPicture/src/PictureInPicture.res b/packages/PictureInPicture/src/PictureInPicture.res deleted file mode 100644 index edc3fc51..00000000 --- a/packages/PictureInPicture/src/PictureInPicture.res +++ /dev/null @@ -1,3 +0,0 @@ -type t = Types.pictureInPictureWindow = {...Types.pictureInPictureWindow} - -include WebApiEvent.EventTarget.Impl({type t = t}) diff --git a/packages/Push/package.json b/packages/Push/package.json deleted file mode 100644 index a5871dd4..00000000 --- a/packages/Push/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/push", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/Push/rescript.json b/packages/Push/rescript.json deleted file mode 100644 index d71ce8c4..00000000 --- a/packages/Push/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/push", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiPush" -} diff --git a/packages/Push/src/ApplicationServerKey.res b/packages/Push/src/ApplicationServerKey.res deleted file mode 100644 index 38b8b194..00000000 --- a/packages/Push/src/ApplicationServerKey.res +++ /dev/null @@ -1,2 +0,0 @@ -external fromString: string => Types.applicationServerKey = "%identity" -external fromUint8Array: Uint8Array.t => Types.applicationServerKey = "%identity" diff --git a/packages/Push/src/PushEvent.res b/packages/Push/src/PushEvent.res deleted file mode 100644 index e8a12afe..00000000 --- a/packages/Push/src/PushEvent.res +++ /dev/null @@ -1,3 +0,0 @@ -type t = Types.pushEvent = private {...Types.pushEvent} - -include WebApiEvent.ExtendableEvent.Impl({type t = t}) diff --git a/packages/Push/src/PushManager.res b/packages/Push/src/PushManager.res deleted file mode 100644 index b6d80943..00000000 --- a/packages/Push/src/PushManager.res +++ /dev/null @@ -1,23 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushManager/subscribe) -*/ -@send -external subscribe: ( - Types.pushManager, - ~options: Types.pushSubscriptionOptionsInit=?, -) => promise = "subscribe" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushManager/getSubscription) -*/ -@send -external getSubscription: Types.pushManager => promise = "getSubscription" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushManager/permissionState) -*/ -@send -external permissionState: ( - Types.pushManager, - ~options: Types.pushSubscriptionOptionsInit=?, -) => promise = "permissionState" diff --git a/packages/RemotePlayback/package.json b/packages/RemotePlayback/package.json deleted file mode 100644 index de942d1a..00000000 --- a/packages/RemotePlayback/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/remote-playback", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/RemotePlayback/rescript.json b/packages/RemotePlayback/rescript.json deleted file mode 100644 index d129b428..00000000 --- a/packages/RemotePlayback/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/remote-playback", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiRemotePlayback" -} diff --git a/packages/ResizeObserver/package.json b/packages/ResizeObserver/package.json deleted file mode 100644 index 9da54e85..00000000 --- a/packages/ResizeObserver/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/resize-observer", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/dom": "0.1.0" - } -} diff --git a/packages/ResizeObserver/rescript.json b/packages/ResizeObserver/rescript.json deleted file mode 100644 index 3df604cd..00000000 --- a/packages/ResizeObserver/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/resize-observer", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/dom" - ], - "namespace": "WebApiResizeObserver" -} diff --git a/packages/ResizeObserver/src/ResizeObserver.res b/packages/ResizeObserver/src/ResizeObserver.res deleted file mode 100644 index 748ead41..00000000 --- a/packages/ResizeObserver/src/ResizeObserver.res +++ /dev/null @@ -1,27 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver) -*/ -@new -external make: Types.resizeObserverCallback => Types.resizeObserver = "ResizeObserver" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver/observe) -*/ -@send -external observe: ( - Types.resizeObserver, - ~target: WebApiDOM.Types.element, - ~options: Types.resizeObserverOptions=?, -) => unit = "observe" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver/unobserve) -*/ -@send -external unobserve: (Types.resizeObserver, WebApiDOM.Types.element) => unit = "unobserve" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver/disconnect) -*/ -@send -external disconnect: Types.resizeObserver => unit = "disconnect" diff --git a/packages/ScreenWakeLock/package.json b/packages/ScreenWakeLock/package.json deleted file mode 100644 index 905e8113..00000000 --- a/packages/ScreenWakeLock/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/screen-wake-lock", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/ScreenWakeLock/rescript.json b/packages/ScreenWakeLock/rescript.json deleted file mode 100644 index fd0672cf..00000000 --- a/packages/ScreenWakeLock/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/screen-wake-lock", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiScreenWakeLock" -} diff --git a/packages/ScreenWakeLock/src/WakeLock.res b/packages/ScreenWakeLock/src/WakeLock.res deleted file mode 100644 index 6e079c19..00000000 --- a/packages/ScreenWakeLock/src/WakeLock.res +++ /dev/null @@ -1,8 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WakeLock/request) -*/ -@send -external request: ( - Types.wakeLock, - ~type_: Types.wakeLockType=?, -) => promise = "request" diff --git a/packages/ScreenWakeLock/src/WakeLockSentinel.res b/packages/ScreenWakeLock/src/WakeLockSentinel.res deleted file mode 100644 index 3c24be97..00000000 --- a/packages/ScreenWakeLock/src/WakeLockSentinel.res +++ /dev/null @@ -1,7 +0,0 @@ -include WebApiEvent.EventTarget.Impl({type t = Types.wakeLockSentinel}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WakeLockSentinel/release) -*/ -@send -external release: Types.wakeLockSentinel => promise = "release" diff --git a/packages/ServiceWorker/package.json b/packages/ServiceWorker/package.json deleted file mode 100644 index a69761c8..00000000 --- a/packages/ServiceWorker/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@rescript-webapi/service-worker", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/channel-messaging": "0.1.0", - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/fetch": "0.1.0", - "@rescript-webapi/notification": "0.1.0", - "@rescript-webapi/base": "0.1.0", - "@rescript-webapi/push": "0.1.0", - "@rescript-webapi/web-workers": "0.1.0" - } -} diff --git a/packages/ServiceWorker/rescript.json b/packages/ServiceWorker/rescript.json deleted file mode 100644 index 4cd862b7..00000000 --- a/packages/ServiceWorker/rescript.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@rescript-webapi/service-worker", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/channel-messaging", - "@rescript-webapi/event", - "@rescript-webapi/fetch", - "@rescript-webapi/notification", - "@rescript-webapi/base", - "@rescript-webapi/push", - "@rescript-webapi/web-workers" - ], - "namespace": "WebApiServiceWorker" -} diff --git a/packages/ServiceWorker/src/Cache.res b/packages/ServiceWorker/src/Cache.res deleted file mode 100644 index cff60fa1..00000000 --- a/packages/ServiceWorker/src/Cache.res +++ /dev/null @@ -1,120 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/match) -*/ -@send -external match: ( - WebApiWebWorkers.Types.cache, - ~request: WebApiFetch.Types.request, - ~options: WebApiWebWorkers.Types.cacheQueryOptions=?, -) => Nullable.t = "match" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/match) -*/ -@send -external match2: ( - WebApiWebWorkers.Types.cache, - ~request: string, - ~options: WebApiWebWorkers.Types.cacheQueryOptions=?, -) => Nullable.t = "match" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/matchAll) -*/ -@send -external matchAll: ( - WebApiWebWorkers.Types.cache, - ~request: WebApiFetch.Types.request=?, - ~options: WebApiWebWorkers.Types.cacheQueryOptions=?, -) => promise> = "matchAll" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/matchAll) -*/ -@send -external matchAll2: ( - WebApiWebWorkers.Types.cache, - ~request: string=?, - ~options: WebApiWebWorkers.Types.cacheQueryOptions=?, -) => promise> = "matchAll" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/add) -*/ -@send -external add: (WebApiWebWorkers.Types.cache, WebApiFetch.Types.request) => promise = "add" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/add) -*/ -@send -external add2: (WebApiWebWorkers.Types.cache, string) => promise = "add" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/addAll) -*/ -@send -external addAll: ( - WebApiWebWorkers.Types.cache, - array, -) => promise = "addAll" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/put) -*/ -@send -external put: ( - WebApiWebWorkers.Types.cache, - ~request: WebApiFetch.Types.request, - ~response: WebApiFetch.Types.response, -) => promise = "put" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/put) -*/ -@send -external put2: ( - WebApiWebWorkers.Types.cache, - ~request: string, - ~response: WebApiFetch.Types.response, -) => promise = "put" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/delete) -*/ -@send -external delete: ( - WebApiWebWorkers.Types.cache, - ~request: WebApiFetch.Types.request, - ~options: WebApiWebWorkers.Types.cacheQueryOptions=?, -) => promise = "delete" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/delete) -*/ -@send -external delete2: ( - WebApiWebWorkers.Types.cache, - ~request: string, - ~options: WebApiWebWorkers.Types.cacheQueryOptions=?, -) => promise = "delete" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/keys) -*/ -@send -external keys: ( - WebApiWebWorkers.Types.cache, - ~request: WebApiFetch.Types.request=?, - ~options: WebApiWebWorkers.Types.cacheQueryOptions=?, -) => promise> = "keys" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/keys) -*/ -@send -external keys2: ( - WebApiWebWorkers.Types.cache, - ~request: string=?, - ~options: WebApiWebWorkers.Types.cacheQueryOptions=?, -) => promise> = "keys" diff --git a/packages/ServiceWorker/src/ServiceWorker.res b/packages/ServiceWorker/src/ServiceWorker.res deleted file mode 100644 index 72bd845a..00000000 --- a/packages/ServiceWorker/src/ServiceWorker.res +++ /dev/null @@ -1,30 +0,0 @@ -type t = Types.serviceWorker = private {...Types.serviceWorker} - -include WebApiEvent.EventTarget.Impl({type t = t}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorker/postMessage) -*/ -@send -external postMessage: (t, ~message: JSON.t, ~transfer: array>) => unit = - "postMessage" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorker/postMessage) -*/ -@send -external postMessage2: ( - t, - ~message: JSON.t, - ~options: WebApiChannelMessaging.MessagePort.structuredSerializeOptions=?, -) => unit = "postMessage" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorker/postMessage) -*/ -@send -external postMessageWithOptions: ( - t, - ~message: JSON.t, - ~options: WebApiChannelMessaging.MessagePort.structuredSerializeOptions=?, -) => unit = "postMessage" diff --git a/packages/ServiceWorker/src/ServiceWorkerContainer.res b/packages/ServiceWorker/src/ServiceWorkerContainer.res deleted file mode 100644 index 1a6051a3..00000000 --- a/packages/ServiceWorker/src/ServiceWorkerContainer.res +++ /dev/null @@ -1,34 +0,0 @@ -include WebApiEvent.EventTarget.Impl({type t = Types.serviceWorkerContainer}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/register) -*/ -@send -external register: ( - Types.serviceWorkerContainer, - string, - ~options: Types.registrationOptions=?, -) => promise = "register" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/getRegistration) -*/ -@send -external getRegistration: ( - Types.serviceWorkerContainer, - ~clientURL: string=?, -) => Nullable.t = "getRegistration" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/getRegistrations) -*/ -@send -external getRegistrations: Types.serviceWorkerContainer => promise< - array, -> = "getRegistrations" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/startMessages) -*/ -@send -external startMessages: Types.serviceWorkerContainer => unit = "startMessages" diff --git a/packages/Storage/package.json b/packages/Storage/package.json deleted file mode 100644 index b03c27e6..00000000 --- a/packages/Storage/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/storage", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/file": "0.1.0" - } -} diff --git a/packages/Storage/rescript.json b/packages/Storage/rescript.json deleted file mode 100644 index 5f3d17b5..00000000 --- a/packages/Storage/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/storage", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/file" - ], - "namespace": "WebApiStorage" -} diff --git a/packages/UIEvents/package.json b/packages/UIEvents/package.json deleted file mode 100644 index 67f55d04..00000000 --- a/packages/UIEvents/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@rescript-webapi/ui-events", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/dom": "0.1.0", - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/file-and-directory-entries": "0.1.0", - "@rescript-webapi/file": "0.1.0", - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/UIEvents/rescript.json b/packages/UIEvents/rescript.json deleted file mode 100644 index dd97bf72..00000000 --- a/packages/UIEvents/rescript.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@rescript-webapi/ui-events", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/dom", - "@rescript-webapi/event", - "@rescript-webapi/file-and-directory-entries", - "@rescript-webapi/file", - "@rescript-webapi/base" - ], - "namespace": "WebApiUIEvents" -} diff --git a/packages/UIEvents/src/CompositionEvent.res b/packages/UIEvents/src/CompositionEvent.res deleted file mode 100644 index ed08e27d..00000000 --- a/packages/UIEvents/src/CompositionEvent.res +++ /dev/null @@ -1,10 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CompositionEvent) -*/ -@new -external make: ( - ~type_: string, - ~eventInitDict: Types.compositionEventInit=?, -) => Types.compositionEvent = "CompositionEvent" - -include UIEvent.Impl({type t = Types.compositionEvent}) diff --git a/packages/UIEvents/src/FocusEvent.res b/packages/UIEvents/src/FocusEvent.res deleted file mode 100644 index 0c7948cc..00000000 --- a/packages/UIEvents/src/FocusEvent.res +++ /dev/null @@ -1,8 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FocusEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.focusEventInit=?) => Types.focusEvent = - "FocusEvent" - -include UIEvent.Impl({type t = Types.focusEvent}) diff --git a/packages/UIEvents/src/InputEvent.res b/packages/UIEvents/src/InputEvent.res deleted file mode 100644 index a0d7f0e9..00000000 --- a/packages/UIEvents/src/InputEvent.res +++ /dev/null @@ -1,14 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/InputEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.inputEventInit=?) => Types.inputEvent = - "InputEvent" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/InputEvent/getTargetRanges) -*/ -@send -external getTargetRanges: Types.inputEvent => array = "getTargetRanges" - -include UIEvent.Impl({type t = Types.inputEvent}) diff --git a/packages/UIEvents/src/KeyboardEvent.res b/packages/UIEvents/src/KeyboardEvent.res deleted file mode 100644 index 488b4ab8..00000000 --- a/packages/UIEvents/src/KeyboardEvent.res +++ /dev/null @@ -1,14 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/KeyboardEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.keyboardEventInit=?) => Types.keyboardEvent = - "KeyboardEvent" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/getModifierState) -*/ -@send -external getModifierState: (Types.keyboardEvent, string) => bool = "getModifierState" - -include UIEvent.Impl({type t = Types.keyboardEvent}) diff --git a/packages/UIEvents/src/PointerEvent.res b/packages/UIEvents/src/PointerEvent.res deleted file mode 100644 index de51e255..00000000 --- a/packages/UIEvents/src/PointerEvent.res +++ /dev/null @@ -1,20 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PointerEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.pointerEventInit=?) => Types.pointerEvent = - "PointerEvent" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PointerEvent/getCoalescedEvents) -*/ -@send -external getCoalescedEvents: Types.pointerEvent => array = "getCoalescedEvents" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PointerEvent/getPredictedEvents) -*/ -@send -external getPredictedEvents: Types.pointerEvent => array = "getPredictedEvents" - -include MouseEvent.Impl({type t = Types.pointerEvent}) diff --git a/packages/UIEvents/src/TouchEvent.res b/packages/UIEvents/src/TouchEvent.res deleted file mode 100644 index f4b786df..00000000 --- a/packages/UIEvents/src/TouchEvent.res +++ /dev/null @@ -1,8 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/TouchEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.touchEventInit=?) => Types.touchEvent = - "TouchEvent" - -include UIEvent.Impl({type t = Types.touchEvent}) diff --git a/packages/UIEvents/src/UIEvent.res b/packages/UIEvents/src/UIEvent.res deleted file mode 100644 index a7cd692d..00000000 --- a/packages/UIEvents/src/UIEvent.res +++ /dev/null @@ -1,17 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/UIEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.uiEventInit=?) => Types.uiEvent = "UIEvent" - -module Impl = ( - T: { - type t - }, -) => { - external asUIEvent: T.t => Types.uiEvent = "%identity" - - include WebApiEvent.Event.Impl({type t = T.t}) -} - -include Impl({type t = Types.uiEvent}) diff --git a/packages/UIEvents/src/WheelEvent.res b/packages/UIEvents/src/WheelEvent.res deleted file mode 100644 index 1705b970..00000000 --- a/packages/UIEvents/src/WheelEvent.res +++ /dev/null @@ -1,8 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WheelEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.wheelEventInit=?) => Types.wheelEvent = - "WheelEvent" - -include MouseEvent.Impl({type t = Types.wheelEvent}) diff --git a/packages/URL/package.json b/packages/URL/package.json deleted file mode 100644 index 63a7ce33..00000000 --- a/packages/URL/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/url", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": {} -} diff --git a/packages/URL/rescript.json b/packages/URL/rescript.json deleted file mode 100644 index e0e3c0d0..00000000 --- a/packages/URL/rescript.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@rescript-webapi/url", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [], - "namespace": "WebApiURL" -} diff --git a/packages/ViewTransitions/package.json b/packages/ViewTransitions/package.json deleted file mode 100644 index 43e5589d..00000000 --- a/packages/ViewTransitions/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/view-transitions", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": {} -} diff --git a/packages/ViewTransitions/rescript.json b/packages/ViewTransitions/rescript.json deleted file mode 100644 index c6faa347..00000000 --- a/packages/ViewTransitions/rescript.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@rescript-webapi/view-transitions", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [], - "namespace": "WebApiViewTransitions" -} diff --git a/packages/VisualViewport/package.json b/packages/VisualViewport/package.json deleted file mode 100644 index a20e825e..00000000 --- a/packages/VisualViewport/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/visual-viewport", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/VisualViewport/rescript.json b/packages/VisualViewport/rescript.json deleted file mode 100644 index b3da60cf..00000000 --- a/packages/VisualViewport/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/visual-viewport", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiVisualViewport" -} diff --git a/packages/WebAudio/package.json b/packages/WebAudio/package.json deleted file mode 100644 index 447b0f6b..00000000 --- a/packages/WebAudio/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@rescript-webapi/web-audio", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/channel-messaging": "0.1.0", - "@rescript-webapi/dom": "0.1.0", - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/media-capture-and-streams": "0.1.0", - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/WebAudio/rescript.json b/packages/WebAudio/rescript.json deleted file mode 100644 index 12eddd22..00000000 --- a/packages/WebAudio/rescript.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@rescript-webapi/web-audio", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/channel-messaging", - "@rescript-webapi/dom", - "@rescript-webapi/event", - "@rescript-webapi/media-capture-and-streams", - "@rescript-webapi/base" - ], - "namespace": "WebApiWebAudio" -} diff --git a/packages/WebAudio/src/AnalyserNode.res b/packages/WebAudio/src/AnalyserNode.res deleted file mode 100644 index f72212c4..00000000 --- a/packages/WebAudio/src/AnalyserNode.res +++ /dev/null @@ -1,35 +0,0 @@ -include AudioNode.Impl({type t = Types.analyserNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.analyserOptions=?, -) => Types.analyserNode = "AnalyserNode" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/getFloatFrequencyData) -*/ -@send -external getFloatFrequencyData: (Types.analyserNode, array) => unit = "getFloatFrequencyData" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/getByteFrequencyData) -*/ -@send -external getByteFrequencyData: (Types.analyserNode, array) => unit = "getByteFrequencyData" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/getFloatTimeDomainData) -*/ -@send -external getFloatTimeDomainData: (Types.analyserNode, array) => unit = - "getFloatTimeDomainData" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnalyserNode/getByteTimeDomainData) -*/ -@send -external getByteTimeDomainData: (Types.analyserNode, array) => unit = "getByteTimeDomainData" diff --git a/packages/WebAudio/src/AudioDestinationNode.res b/packages/WebAudio/src/AudioDestinationNode.res deleted file mode 100644 index 342f623e..00000000 --- a/packages/WebAudio/src/AudioDestinationNode.res +++ /dev/null @@ -1 +0,0 @@ -include AudioNode.Impl({type t = Types.audioDestinationNode}) diff --git a/packages/WebAudio/src/AudioProcessingEvent.res b/packages/WebAudio/src/AudioProcessingEvent.res deleted file mode 100644 index 60c2bb78..00000000 --- a/packages/WebAudio/src/AudioProcessingEvent.res +++ /dev/null @@ -1,10 +0,0 @@ -include WebApiEvent.Event.Impl({type t = Types.audioProcessingEvent}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioProcessingEvent) -*/ -@new -external make: ( - ~type_: string, - ~eventInitDict: Types.audioProcessingEventInit, -) => Types.audioProcessingEvent = "AudioProcessingEvent" diff --git a/packages/WebAudio/src/AudioWorkletNode.res b/packages/WebAudio/src/AudioWorkletNode.res deleted file mode 100644 index ba813872..00000000 --- a/packages/WebAudio/src/AudioWorkletNode.res +++ /dev/null @@ -1,11 +0,0 @@ -include AudioNode.Impl({type t = Types.audioWorkletNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~name: string, - ~options: Types.audioWorkletNodeOptions=?, -) => Types.audioWorkletNode = "AudioWorkletNode" diff --git a/packages/WebAudio/src/ChannelMergerNode.res b/packages/WebAudio/src/ChannelMergerNode.res deleted file mode 100644 index a490ba0f..00000000 --- a/packages/WebAudio/src/ChannelMergerNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.channelMergerNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ChannelMergerNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.channelMergerOptions=?, -) => Types.channelMergerNode = "ChannelMergerNode" diff --git a/packages/WebAudio/src/ChannelSplitterNode.res b/packages/WebAudio/src/ChannelSplitterNode.res deleted file mode 100644 index 3189f485..00000000 --- a/packages/WebAudio/src/ChannelSplitterNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.channelSplitterNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ChannelSplitterNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.channelSplitterOptions=?, -) => Types.channelSplitterNode = "ChannelSplitterNode" diff --git a/packages/WebAudio/src/ConstantSourceNode.res b/packages/WebAudio/src/ConstantSourceNode.res deleted file mode 100644 index 033a4813..00000000 --- a/packages/WebAudio/src/ConstantSourceNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioScheduledSourceNode.Impl({type t = Types.constantSourceNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ConstantSourceNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.constantSourceOptions=?, -) => Types.constantSourceNode = "ConstantSourceNode" diff --git a/packages/WebAudio/src/ConvolverNode.res b/packages/WebAudio/src/ConvolverNode.res deleted file mode 100644 index f0a25170..00000000 --- a/packages/WebAudio/src/ConvolverNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.convolverNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ConvolverNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.convolverOptions=?, -) => Types.convolverNode = "ConvolverNode" diff --git a/packages/WebAudio/src/DelayNode.res b/packages/WebAudio/src/DelayNode.res deleted file mode 100644 index b51d05bc..00000000 --- a/packages/WebAudio/src/DelayNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.delayNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DelayNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.delayOptions=?, -) => Types.delayNode = "DelayNode" diff --git a/packages/WebAudio/src/DynamicsCompressorNode.res b/packages/WebAudio/src/DynamicsCompressorNode.res deleted file mode 100644 index 0cd14b91..00000000 --- a/packages/WebAudio/src/DynamicsCompressorNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.dynamicsCompressorNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.dynamicsCompressorOptions=?, -) => Types.dynamicsCompressorNode = "DynamicsCompressorNode" diff --git a/packages/WebAudio/src/GainNode.res b/packages/WebAudio/src/GainNode.res deleted file mode 100644 index 02d3a0c8..00000000 --- a/packages/WebAudio/src/GainNode.res +++ /dev/null @@ -1,8 +0,0 @@ -include AudioNode.Impl({type t = Types.gainNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GainNode) -*/ -@new -external make: (~context: Types.baseAudioContext, ~options: Types.gainOptions=?) => Types.gainNode = - "GainNode" diff --git a/packages/WebAudio/src/MediaElementAudioSourceNode.res b/packages/WebAudio/src/MediaElementAudioSourceNode.res deleted file mode 100644 index 7ffea219..00000000 --- a/packages/WebAudio/src/MediaElementAudioSourceNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.mediaElementAudioSourceNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaElementAudioSourceNode) -*/ -@new -external make: ( - ~context: Types.audioContext, - ~options: Types.mediaElementAudioSourceOptions, -) => Types.mediaElementAudioSourceNode = "MediaElementAudioSourceNode" diff --git a/packages/WebAudio/src/MediaStreamAudioDestinationNode.res b/packages/WebAudio/src/MediaStreamAudioDestinationNode.res deleted file mode 100644 index e743e584..00000000 --- a/packages/WebAudio/src/MediaStreamAudioDestinationNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.mediaStreamAudioDestinationNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamAudioDestinationNode) -*/ -@new -external make: ( - ~context: Types.audioContext, - ~options: Types.audioNodeOptions=?, -) => Types.mediaStreamAudioDestinationNode = "MediaStreamAudioDestinationNode" diff --git a/packages/WebAudio/src/MediaStreamAudioSourceNode.res b/packages/WebAudio/src/MediaStreamAudioSourceNode.res deleted file mode 100644 index 6c794632..00000000 --- a/packages/WebAudio/src/MediaStreamAudioSourceNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.mediaStreamAudioSourceNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamAudioSourceNode) -*/ -@new -external make: ( - ~context: Types.audioContext, - ~options: Types.mediaStreamAudioSourceOptions, -) => Types.mediaStreamAudioSourceNode = "MediaStreamAudioSourceNode" diff --git a/packages/WebAudio/src/OfflineAudioCompletionEvent.res b/packages/WebAudio/src/OfflineAudioCompletionEvent.res deleted file mode 100644 index ad6329ff..00000000 --- a/packages/WebAudio/src/OfflineAudioCompletionEvent.res +++ /dev/null @@ -1,10 +0,0 @@ -include WebApiEvent.Event.Impl({type t = Types.offlineAudioCompletionEvent}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioCompletionEvent) -*/ -@new -external make: ( - ~type_: string, - ~eventInitDict: Types.offlineAudioCompletionEventInit, -) => Types.offlineAudioCompletionEvent = "OfflineAudioCompletionEvent" diff --git a/packages/WebAudio/src/OscillatorNode.res b/packages/WebAudio/src/OscillatorNode.res deleted file mode 100644 index e92e1ac0..00000000 --- a/packages/WebAudio/src/OscillatorNode.res +++ /dev/null @@ -1,16 +0,0 @@ -include AudioScheduledSourceNode.Impl({type t = Types.oscillatorNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OscillatorNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.oscillatorOptions=?, -) => Types.oscillatorNode = "OscillatorNode" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OscillatorNode/setPeriodicWave) -*/ -@send -external setPeriodicWave: (Types.oscillatorNode, Types.periodicWave) => unit = "setPeriodicWave" diff --git a/packages/WebAudio/src/PannerNode.res b/packages/WebAudio/src/PannerNode.res deleted file mode 100644 index 048ca661..00000000 --- a/packages/WebAudio/src/PannerNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.pannerNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PannerNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.pannerOptions=?, -) => Types.pannerNode = "PannerNode" diff --git a/packages/WebAudio/src/PeriodicWave.res b/packages/WebAudio/src/PeriodicWave.res deleted file mode 100644 index cf954a1d..00000000 --- a/packages/WebAudio/src/PeriodicWave.res +++ /dev/null @@ -1,8 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PeriodicWave) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.periodicWaveOptions=?, -) => Types.periodicWave = "PeriodicWave" diff --git a/packages/WebAudio/src/StereoPannerNode.res b/packages/WebAudio/src/StereoPannerNode.res deleted file mode 100644 index b38285a1..00000000 --- a/packages/WebAudio/src/StereoPannerNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.stereoPannerNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StereoPannerNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.stereoPannerOptions=?, -) => Types.stereoPannerNode = "StereoPannerNode" diff --git a/packages/WebAudio/src/WaveShaperNode.res b/packages/WebAudio/src/WaveShaperNode.res deleted file mode 100644 index 1de54764..00000000 --- a/packages/WebAudio/src/WaveShaperNode.res +++ /dev/null @@ -1,10 +0,0 @@ -include AudioNode.Impl({type t = Types.waveShaperNode}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WaveShaperNode) -*/ -@new -external make: ( - ~context: Types.baseAudioContext, - ~options: Types.waveShaperOptions=?, -) => Types.waveShaperNode = "WaveShaperNode" diff --git a/packages/WebCrypto/package.json b/packages/WebCrypto/package.json deleted file mode 100644 index d138ca9d..00000000 --- a/packages/WebCrypto/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/web-crypto", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/WebCrypto/rescript.json b/packages/WebCrypto/rescript.json deleted file mode 100644 index 2e73c9bc..00000000 --- a/packages/WebCrypto/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/web-crypto", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/base" - ], - "namespace": "WebApiWebCrypto" -} diff --git a/packages/WebLocks/package.json b/packages/WebLocks/package.json deleted file mode 100644 index 7704feb0..00000000 --- a/packages/WebLocks/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/web-locks", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/WebLocks/rescript.json b/packages/WebLocks/rescript.json deleted file mode 100644 index a1f5d5d0..00000000 --- a/packages/WebLocks/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/web-locks", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiWebLocks" -} diff --git a/packages/WebMIDI/package.json b/packages/WebMIDI/package.json deleted file mode 100644 index 55846991..00000000 --- a/packages/WebMIDI/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@rescript-webapi/web-midi", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/base": "0.1.0" - } -} diff --git a/packages/WebMIDI/rescript.json b/packages/WebMIDI/rescript.json deleted file mode 100644 index 77f0e1c9..00000000 --- a/packages/WebMIDI/rescript.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rescript-webapi/web-midi", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event", - "@rescript-webapi/base" - ], - "namespace": "WebApiWebMIDI" -} diff --git a/packages/WebMIDI/src/WebMIDI.res b/packages/WebMIDI/src/WebMIDI.res deleted file mode 100644 index 4083ae9f..00000000 --- a/packages/WebMIDI/src/WebMIDI.res +++ /dev/null @@ -1,5 +0,0 @@ -type t = Types.midiAccess = {...Types.midiAccess} - -include WebApiEvent.EventTarget.Impl({type t = t}) - -type midiOptions = Types.midiOptions = {...Types.midiOptions} diff --git a/packages/WebSockets/package.json b/packages/WebSockets/package.json deleted file mode 100644 index be933ff0..00000000 --- a/packages/WebSockets/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@rescript-webapi/web-sockets", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/channel-messaging": "0.1.0", - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/file": "0.1.0" - } -} diff --git a/packages/WebSockets/rescript.json b/packages/WebSockets/rescript.json deleted file mode 100644 index 0fded572..00000000 --- a/packages/WebSockets/rescript.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@rescript-webapi/web-sockets", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/channel-messaging", - "@rescript-webapi/event", - "@rescript-webapi/file" - ], - "namespace": "WebApiWebSockets" -} diff --git a/packages/WebSockets/src/CloseEvent.res b/packages/WebSockets/src/CloseEvent.res deleted file mode 100644 index 1bee18b0..00000000 --- a/packages/WebSockets/src/CloseEvent.res +++ /dev/null @@ -1,8 +0,0 @@ -include WebApiEvent.Event.Impl({type t = Types.closeEvent}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CloseEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.closeEventInit=?) => Types.closeEvent = - "CloseEvent" diff --git a/packages/WebSpeech/package.json b/packages/WebSpeech/package.json deleted file mode 100644 index c413147a..00000000 --- a/packages/WebSpeech/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/web-speech", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/WebSpeech/rescript.json b/packages/WebSpeech/rescript.json deleted file mode 100644 index d8991897..00000000 --- a/packages/WebSpeech/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/web-speech", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiWebSpeech" -} diff --git a/packages/WebSpeech/src/SpeechSynthesisUtterance.res b/packages/WebSpeech/src/SpeechSynthesisUtterance.res deleted file mode 100644 index f62eee64..00000000 --- a/packages/WebSpeech/src/SpeechSynthesisUtterance.res +++ /dev/null @@ -1,7 +0,0 @@ -include WebApiEvent.EventTarget.Impl({type t = Types.speechSynthesisUtterance}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance) -*/ -@new -external make: (~text: string=?) => Types.speechSynthesisUtterance = "SpeechSynthesisUtterance" diff --git a/packages/WebStorage/package.json b/packages/WebStorage/package.json deleted file mode 100644 index 50b1dbd7..00000000 --- a/packages/WebStorage/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/web-storage", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/WebStorage/rescript.json b/packages/WebStorage/rescript.json deleted file mode 100644 index 7f17b48f..00000000 --- a/packages/WebStorage/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/web-storage", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiWebStorage" -} diff --git a/packages/WebStorage/src/StorageEvent.res b/packages/WebStorage/src/StorageEvent.res deleted file mode 100644 index 314b0424..00000000 --- a/packages/WebStorage/src/StorageEvent.res +++ /dev/null @@ -1,8 +0,0 @@ -include WebApiEvent.Event.Impl({type t = Types.storageEvent}) - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent) -*/ -@new -external make: (~type_: string, ~eventInitDict: Types.storageEventInit=?) => Types.storageEvent = - "StorageEvent" diff --git a/packages/WebVTT/package.json b/packages/WebVTT/package.json deleted file mode 100644 index add73477..00000000 --- a/packages/WebVTT/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@rescript-webapi/web-vtt", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/event": "0.1.0" - } -} diff --git a/packages/WebVTT/rescript.json b/packages/WebVTT/rescript.json deleted file mode 100644 index 24694423..00000000 --- a/packages/WebVTT/rescript.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@rescript-webapi/web-vtt", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/event" - ], - "namespace": "WebApiWebVTT" -} diff --git a/packages/WebWorkers/package.json b/packages/WebWorkers/package.json deleted file mode 100644 index 35af9fc8..00000000 --- a/packages/WebWorkers/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@rescript-webapi/web-workers", - "version": "0.1.0", - "license": "MIT", - "type": "module", - "files": [ - "rescript.json", - "src/**/*.res" - ], - "publishConfig": { - "access": "public", - "provenance": true - }, - "scripts": { - "build": "rescript" - }, - "peerDependencies": { - "rescript": ">=12.0.0 <13" - }, - "dependencies": { - "@rescript-webapi/channel-messaging": "0.1.0", - "@rescript-webapi/event": "0.1.0", - "@rescript-webapi/fetch": "0.1.0", - "@rescript-webapi/url": "0.1.0" - } -} diff --git a/packages/WebWorkers/rescript.json b/packages/WebWorkers/rescript.json deleted file mode 100644 index 963f7e4a..00000000 --- a/packages/WebWorkers/rescript.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@rescript-webapi/web-workers", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": { - "module": "esmodule", - "in-source": true - }, - "suffix": ".js", - "dependencies": [ - "@rescript-webapi/channel-messaging", - "@rescript-webapi/event", - "@rescript-webapi/fetch", - "@rescript-webapi/url" - ], - "namespace": "WebApiWebWorkers" -} diff --git a/packages/WebWorkers/src/CacheStorage.res b/packages/WebWorkers/src/CacheStorage.res deleted file mode 100644 index f39fbf32..00000000 --- a/packages/WebWorkers/src/CacheStorage.res +++ /dev/null @@ -1,43 +0,0 @@ -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/match) -*/ -@send -external match: ( - Types.cacheStorage, - ~request: WebApiFetch.Types.request, - ~options: Types.multiCacheQueryOptions=?, -) => Nullable.t = "match" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/match) -*/ -@send -external match2: ( - Types.cacheStorage, - ~request: string, - ~options: Types.multiCacheQueryOptions=?, -) => Nullable.t = "match" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/has) -*/ -@send -external has: (Types.cacheStorage, string) => promise = "has" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) -*/ -@send -external open_: (Types.cacheStorage, string) => promise = "open" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/delete) -*/ -@send -external delete: (Types.cacheStorage, string) => promise = "delete" - -/** -[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/keys) -*/ -@send -external keys: Types.cacheStorage => promise> = "keys" diff --git a/rescript.json b/rescript.json index 3d265240..e4252578 100644 --- a/rescript.json +++ b/rescript.json @@ -1,6 +1,358 @@ { - "name": "experimental-rescript-webapi", + "name": "@rescript/webapi", "sources": [ + { + "dir": "src/Base", + "subdirs": true, + "feature": "WebAPI.Base", + "public": [ + "Base" + ] + }, + { + "dir": "src/CSSFontLoading", + "subdirs": true, + "feature": "WebAPI.CSSFontLoading", + "public": [ + "CSSFontLoading" + ] + }, + { + "dir": "src/Canvas", + "subdirs": true, + "feature": "WebAPI.Canvas", + "public": [ + "Canvas" + ] + }, + { + "dir": "src/ChannelMessaging", + "subdirs": true, + "feature": "WebAPI.ChannelMessaging", + "public": [ + "ChannelMessaging" + ] + }, + { + "dir": "src/Clipboard", + "subdirs": true, + "feature": "WebAPI.Clipboard", + "public": [ + "Clipboard" + ] + }, + { + "dir": "src/CredentialManagement", + "subdirs": true, + "feature": "WebAPI.CredentialManagement", + "public": [ + "CredentialManagement" + ] + }, + { + "dir": "src/DOM", + "subdirs": true, + "feature": "WebAPI.DOM", + "public": [ + "DOM" + ] + }, + { + "dir": "src/EncryptedMediaExtensions", + "subdirs": true, + "feature": "WebAPI.EncryptedMediaExtensions", + "public": [ + "EncryptedMediaExtensions" + ] + }, + { + "dir": "src/Event", + "subdirs": true, + "feature": "WebAPI.Event", + "public": [ + "Event" + ] + }, + { + "dir": "src/Fetch", + "subdirs": true, + "feature": "WebAPI.Fetch", + "public": [ + "Fetch" + ] + }, + { + "dir": "src/File", + "subdirs": true, + "feature": "WebAPI.File", + "public": [ + "File" + ] + }, + { + "dir": "src/FileAndDirectoryEntries", + "subdirs": true, + "feature": "WebAPI.FileAndDirectoryEntries", + "public": [ + "FileAndDirectoryEntries" + ] + }, + { + "dir": "src/Gamepad", + "subdirs": true, + "feature": "WebAPI.Gamepad", + "public": [ + "Gamepad" + ] + }, + { + "dir": "src/Geolocation", + "subdirs": true, + "feature": "WebAPI.Geolocation", + "public": [ + "Geolocation" + ] + }, + { + "dir": "src/History", + "subdirs": true, + "feature": "WebAPI.History", + "public": [ + "History" + ] + }, + { + "dir": "src/IndexedDB", + "subdirs": true, + "feature": "WebAPI.IndexedDB", + "public": [ + "IndexedDB" + ] + }, + { + "dir": "src/IntersectionObserver", + "subdirs": true, + "feature": "WebAPI.IntersectionObserver", + "public": [ + "IntersectionObserver" + ] + }, + { + "dir": "src/MediaCapabilities", + "subdirs": true, + "feature": "WebAPI.MediaCapabilities", + "public": [ + "MediaCapabilities" + ] + }, + { + "dir": "src/MediaCaptureAndStreams", + "subdirs": true, + "feature": "WebAPI.MediaCaptureAndStreams", + "public": [ + "MediaCaptureAndStreams" + ] + }, + { + "dir": "src/MediaSession", + "subdirs": true, + "feature": "WebAPI.MediaSession", + "public": [ + "MediaSession" + ] + }, + { + "dir": "src/MutationObserver", + "subdirs": true, + "feature": "WebAPI.MutationObserver", + "public": [ + "MutationObserver" + ] + }, + { + "dir": "src/Notification", + "subdirs": true, + "feature": "WebAPI.Notification", + "public": [ + "Notification" + ] + }, + { + "dir": "src/Performance", + "subdirs": true, + "feature": "WebAPI.Performance", + "public": [ + "Performance" + ] + }, + { + "dir": "src/Permissions", + "subdirs": true, + "feature": "WebAPI.Permissions", + "public": [ + "Permissions" + ] + }, + { + "dir": "src/PictureInPicture", + "subdirs": true, + "feature": "WebAPI.PictureInPicture", + "public": [ + "PictureInPicture" + ] + }, + { + "dir": "src/Push", + "subdirs": true, + "feature": "WebAPI.Push", + "public": [ + "Push" + ] + }, + { + "dir": "src/RemotePlayback", + "subdirs": true, + "feature": "WebAPI.RemotePlayback", + "public": [ + "RemotePlayback" + ] + }, + { + "dir": "src/ResizeObserver", + "subdirs": true, + "feature": "WebAPI.ResizeObserver", + "public": [ + "ResizeObserver" + ] + }, + { + "dir": "src/ScreenWakeLock", + "subdirs": true, + "feature": "WebAPI.ScreenWakeLock", + "public": [ + "ScreenWakeLock" + ] + }, + { + "dir": "src/ServiceWorker", + "subdirs": true, + "feature": "WebAPI.ServiceWorker", + "public": [ + "ServiceWorker" + ] + }, + { + "dir": "src/Storage", + "subdirs": true, + "feature": "WebAPI.Storage", + "public": [ + "Storage" + ] + }, + { + "dir": "src/UIEvents", + "subdirs": true, + "feature": "WebAPI.UIEvents", + "public": [ + "UIEvents" + ] + }, + { + "dir": "src/URL", + "subdirs": true, + "feature": "WebAPI.URL", + "public": [ + "URL" + ] + }, + { + "dir": "src/ViewTransitions", + "subdirs": true, + "feature": "WebAPI.ViewTransitions", + "public": [ + "ViewTransitions" + ] + }, + { + "dir": "src/VisualViewport", + "subdirs": true, + "feature": "WebAPI.VisualViewport", + "public": [ + "VisualViewport" + ] + }, + { + "dir": "src/WebAudio", + "subdirs": true, + "feature": "WebAPI.WebAudio", + "public": [ + "WebAudio" + ] + }, + { + "dir": "src/WebCrypto", + "subdirs": true, + "feature": "WebAPI.WebCrypto", + "public": [ + "WebCrypto" + ] + }, + { + "dir": "src/WebLocks", + "subdirs": true, + "feature": "WebAPI.WebLocks", + "public": [ + "WebLocks" + ] + }, + { + "dir": "src/WebMIDI", + "subdirs": true, + "feature": "WebAPI.WebMIDI", + "public": [ + "WebMIDI" + ] + }, + { + "dir": "src/WebSockets", + "subdirs": true, + "feature": "WebAPI.WebSockets", + "public": [ + "WebSockets" + ] + }, + { + "dir": "src/WebSpeech", + "subdirs": true, + "feature": "WebAPI.WebSpeech", + "public": [ + "WebSpeech" + ] + }, + { + "dir": "src/WebStorage", + "subdirs": true, + "feature": "WebAPI.WebStorage", + "public": [ + "WebStorage" + ] + }, + { + "dir": "src/WebVTT", + "subdirs": true, + "feature": "WebAPI.WebVTT", + "public": [ + "WebVTT" + ] + }, + { + "dir": "src/WebWorkers", + "subdirs": true, + "feature": "WebAPI.WebWorkers", + "public": [ + "WebWorkers" + ] + }, { "dir": "tests", "subdirs": true, @@ -11,51 +363,6 @@ "module": "esmodule", "in-source": true }, - "suffix": ".res.js", - "dependencies": [ - "@rescript-webapi/css-font-loading", - "@rescript-webapi/canvas", - "@rescript-webapi/channel-messaging", - "@rescript-webapi/clipboard", - "@rescript-webapi/credential-management", - "@rescript-webapi/dom", - "@rescript-webapi/encrypted-media-extensions", - "@rescript-webapi/event", - "@rescript-webapi/fetch", - "@rescript-webapi/file", - "@rescript-webapi/file-and-directory-entries", - "@rescript-webapi/gamepad", - "@rescript-webapi/geolocation", - "@rescript-webapi/history", - "@rescript-webapi/indexed-db", - "@rescript-webapi/intersection-observer", - "@rescript-webapi/media-capabilities", - "@rescript-webapi/media-capture-and-streams", - "@rescript-webapi/media-session", - "@rescript-webapi/mutation-observer", - "@rescript-webapi/notification", - "@rescript-webapi/performance", - "@rescript-webapi/permissions", - "@rescript-webapi/picture-in-picture", - "@rescript-webapi/base", - "@rescript-webapi/push", - "@rescript-webapi/remote-playback", - "@rescript-webapi/resize-observer", - "@rescript-webapi/screen-wake-lock", - "@rescript-webapi/service-worker", - "@rescript-webapi/storage", - "@rescript-webapi/ui-events", - "@rescript-webapi/url", - "@rescript-webapi/view-transitions", - "@rescript-webapi/visual-viewport", - "@rescript-webapi/web-audio", - "@rescript-webapi/web-crypto", - "@rescript-webapi/web-locks", - "@rescript-webapi/web-midi", - "@rescript-webapi/web-sockets", - "@rescript-webapi/web-speech", - "@rescript-webapi/web-storage", - "@rescript-webapi/web-vtt", - "@rescript-webapi/web-workers" - ] + "suffix": ".js", + "dependencies": [] } diff --git a/scripts/create-npm-packages.js b/scripts/create-npm-packages.js deleted file mode 100644 index d83c2c49..00000000 --- a/scripts/create-npm-packages.js +++ /dev/null @@ -1,141 +0,0 @@ -import { spawnSync } from "node:child_process"; -import { existsSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; -import { tmpdir } from "node:os"; -import path from "node:path"; - -const root = process.cwd(); -const rootPackageJson = JSON.parse(readFileSync(path.join(root, "package.json"), "utf8")); -const args = new Set(process.argv.slice(2)); - -const publish = args.has("--publish"); -const force = args.has("--force"); -const list = args.has("--list"); -const version = readArg("--version") ?? "0.1.0-pre-alpha.0"; -const tag = readArg("--tag") ?? "pre-alpha"; -const otp = readArg("--otp"); -const registry = readArg("--registry"); -const timeout = Number(readArg("--timeout") ?? "30000"); - -function readArg(name) { - const prefix = `${name}=`; - const value = process.argv.slice(2).find((arg) => arg.startsWith(prefix)); - return value ? value.slice(prefix.length) : undefined; -} - -function npm(args, options = {}) { - const result = spawnSync("npm", args, { - cwd: root, - encoding: "utf8", - stdio: options.stdio ?? "pipe", - timeout, - }); - - return result; -} - -function npmViewPackageExists(name) { - const args = ["view", name, "version", "--json"]; - if (registry) args.push("--registry", registry); - - const result = npm(args); - if (result.status === 0) { - return true; - } - - const output = `${result.stdout}\n${result.stderr}`; - if (output.includes("E404") || output.includes("404 Not Found")) { - return false; - } - - throw new Error(`Could not check npm package ${name}:\n${output}`); -} - -function workspacePackagePaths() { - return rootPackageJson.workspaces.flatMap((workspace) => { - if (!workspace.endsWith("/*")) { - throw new Error(`Unsupported workspace pattern: ${workspace}`); - } - - const workspaceRoot = path.join(root, workspace.slice(0, -2)); - const directories = readdirSync(workspaceRoot, { withFileTypes: true }) - .filter((entry) => entry.isDirectory()) - .map((entry) => path.join(workspaceRoot, entry.name)) - .sort(); - - return directories - .map((directory) => path.join(directory, "package.json")) - .filter((packageJsonPath) => existsSync(packageJsonPath)); - }); -} - -function createPlaceholderPackage(originalPackageJson) { - return { - name: originalPackageJson.name, - version, - description: `Placeholder package for ${originalPackageJson.name}. Real releases are published from the monorepo workspaces.`, - license: originalPackageJson.license ?? rootPackageJson.license, - repository: rootPackageJson.repository, - bugs: rootPackageJson.bugs, - homepage: rootPackageJson.homepage, - type: "module", - files: ["README.md"], - publishConfig: { - access: "public", - }, - peerDependencies: originalPackageJson.peerDependencies, - }; -} - -function publishPlaceholder(originalPackageJson) { - const temporaryDirectory = mkdtempSync(path.join(tmpdir(), "webapi-package-placeholder-")); - const packageJson = createPlaceholderPackage(originalPackageJson); - - writeFileSync(path.join(temporaryDirectory, "package.json"), `${JSON.stringify(packageJson, null, 2)}\n`); - writeFileSync( - path.join(temporaryDirectory, "README.md"), - `# ${originalPackageJson.name}\n\nThis placeholder package reserves the package name. Real releases are published from https://github.com/rescript-lang/experimental-rescript-webapi.\n`, - ); - - const publishArgs = ["publish", temporaryDirectory, "--access", "public", "--tag", tag, "--provenance=false"]; - if (!publish) publishArgs.push("--dry-run"); - if (otp) publishArgs.push("--otp", otp); - if (registry) publishArgs.push("--registry", registry); - - const result = npm(publishArgs, { stdio: "inherit" }); - rmSync(temporaryDirectory, { recursive: true, force: true }); - - if (result.status !== 0) { - throw new Error(`npm publish failed for ${originalPackageJson.name}`); - } -} - -const packageJsonPaths = workspacePackagePaths(); -const packages = packageJsonPaths.map((packageJsonPath) => { - const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8")); - return { packageJsonPath, packageJson }; -}); - -if (list) { - for (const { packageJson } of packages) { - console.log(packageJson.name); - } - process.exit(0); -} - -for (const { packageJson } of packages) { - if (!packageJson.name) continue; - - const exists = npmViewPackageExists(packageJson.name); - if (exists && !force) { - console.log(`skip ${packageJson.name}: already exists on npm`); - continue; - } - - const action = publish ? "publish" : "dry-run"; - console.log(`${action} ${packageJson.name}@${version} with dist-tag ${tag}`); - publishPlaceholder(packageJson); -} - -if (!publish) { - console.log("\nDry run only. Re-run with --publish to create missing packages on npm."); -} diff --git a/scripts/unmonorepo/feature-spec.mjs b/scripts/unmonorepo/feature-spec.mjs new file mode 100644 index 00000000..e5f71031 --- /dev/null +++ b/scripts/unmonorepo/feature-spec.mjs @@ -0,0 +1,117 @@ +import fs from "node:fs"; +import path from "node:path"; + +export function namespaceToPublicModule(namespace) { + if (!namespace.startsWith("WebApi")) { + throw new Error(`Unsupported namespace: ${namespace}`); + } + + return namespace.slice("WebApi".length); +} + +export function publicModuleToInternalPrefix(publicModule) { + return publicModule.replace(/[A-Z]+(?=[A-Z][a-z]|$)|[A-Z][a-z]*/g, (part) => { + return part[0] + part.slice(1).toLowerCase(); + }); +} + +export function publicNameForLeafModule(leafName, internalPrefix) { + const preservedPrefixedModules = new Set(["PushEvent"]); + const duplicatedSuffixes = ["Types", "Global", "Event", "File", "HTMLMediaElement"]; + const featureSuffix = featureSpecs + .map(({ publicModule }) => publicModule) + .find((publicModule) => leafName === `${internalPrefix}${publicModule}`); + + if (preservedPrefixedModules.has(leafName)) { + return leafName; + } + + for (const suffix of duplicatedSuffixes) { + if (leafName === `${internalPrefix}${suffix}`) { + return suffix; + } + } + + if (featureSuffix) { + return featureSuffix; + } + + return leafName; +} + +export const featureSpecs = [ + ["Base", "WebApiBase"], + ["CSSFontLoading", "WebApiCSSFontLoading"], + ["Canvas", "WebApiCanvas"], + ["ChannelMessaging", "WebApiChannelMessaging"], + ["Clipboard", "WebApiClipboard"], + ["CredentialManagement", "WebApiCredentialManagement"], + ["DOM", "WebApiDOM"], + ["EncryptedMediaExtensions", "WebApiEncryptedMediaExtensions"], + ["Event", "WebApiEvent"], + ["Fetch", "WebApiFetch"], + ["File", "WebApiFile"], + ["FileAndDirectoryEntries", "WebApiFileAndDirectoryEntries"], + ["Gamepad", "WebApiGamepad"], + ["Geolocation", "WebApiGeolocation"], + ["History", "WebApiHistory"], + ["IndexedDB", "WebApiIndexedDB"], + ["IntersectionObserver", "WebApiIntersectionObserver"], + ["MediaCapabilities", "WebApiMediaCapabilities"], + ["MediaCaptureAndStreams", "WebApiMediaCaptureAndStreams"], + ["MediaSession", "WebApiMediaSession"], + ["MutationObserver", "WebApiMutationObserver"], + ["Notification", "WebApiNotification"], + ["Performance", "WebApiPerformance"], + ["Permissions", "WebApiPermissions"], + ["PictureInPicture", "WebApiPictureInPicture"], + ["Push", "WebApiPush"], + ["RemotePlayback", "WebApiRemotePlayback"], + ["ResizeObserver", "WebApiResizeObserver"], + ["ScreenWakeLock", "WebApiScreenWakeLock"], + ["ServiceWorker", "WebApiServiceWorker"], + ["Storage", "WebApiStorage"], + ["UIEvents", "WebApiUIEvents"], + ["URL", "WebApiURL"], + ["ViewTransitions", "WebApiViewTransitions"], + ["VisualViewport", "WebApiVisualViewport"], + ["WebAudio", "WebApiWebAudio"], + ["WebCrypto", "WebApiWebCrypto"], + ["WebLocks", "WebApiWebLocks"], + ["WebMIDI", "WebApiWebMIDI"], + ["WebSockets", "WebApiWebSockets"], + ["WebSpeech", "WebApiWebSpeech"], + ["WebStorage", "WebApiWebStorage"], + ["WebVTT", "WebApiWebVTT"], + ["WebWorkers", "WebApiWebWorkers"], +].map(([dirName, legacyNamespace]) => { + const publicModule = namespaceToPublicModule(legacyNamespace); + + return { + dirName, + legacyNamespace, + publicModule, + featureName: `WebAPI.${publicModule}`, + internalPrefix: publicModuleToInternalPrefix(publicModule), + sourceDir: `src/${dirName}`, + entryModulePath: `src/${dirName}/${publicModule}.res`, + }; +}); + +export function findDuplicateLeafModules(rootDir, specs = featureSpecs) { + const counts = new Map(); + + for (const spec of specs) { + const legacySourceDir = path.join(rootDir, "packages", spec.dirName, "src"); + if (!fs.existsSync(legacySourceDir)) continue; + + for (const entry of fs.readdirSync(legacySourceDir, { withFileTypes: true })) { + if (!entry.isFile() || !entry.name.endsWith(".res")) continue; + + const leafName = path.basename(entry.name, ".res"); + counts.set(leafName, (counts.get(leafName) ?? 0) + 1); + } + } + + return new Set([...counts.entries()].filter(([, count]) => count > 1).map(([leafName]) => leafName)); +} diff --git a/scripts/unmonorepo/generate-entry-modules.mjs b/scripts/unmonorepo/generate-entry-modules.mjs new file mode 100644 index 00000000..1844ddf7 --- /dev/null +++ b/scripts/unmonorepo/generate-entry-modules.mjs @@ -0,0 +1,40 @@ +import fs from "node:fs"; +import path from "node:path"; +import { featureSpecs, publicNameForLeafModule } from "./feature-spec.mjs"; + +export function readModuleLeaves(featureDir) { + return fs + .readdirSync(featureDir) + .filter((name) => name.endsWith(".res")) + .map((name) => path.basename(name, ".res")) + .filter((leaf) => !featureSpecs.some((spec) => spec.publicModule === leaf)); +} + +export function renderEntryModule({ internalPrefix, moduleLeaves }) { + const aliases = moduleLeaves + .sort() + .map((leaf) => `module ${publicNameForLeafModule(leaf, internalPrefix)} = ${leaf}`) + .join("\n"); + + return aliases; +} + +export function generateEntryModules(rootDir) { + for (const spec of featureSpecs) { + const featureDir = path.join(rootDir, "src", spec.dirName); + if (!fs.existsSync(featureDir)) continue; + + const entryPath = path.join(featureDir, `${spec.publicModule}.res`); + const moduleLeaves = readModuleLeaves(featureDir).filter((leaf) => leaf !== spec.publicModule); + const output = renderEntryModule({ + internalPrefix: spec.internalPrefix, + moduleLeaves, + }); + + fs.writeFileSync(entryPath, `${output}\n`); + } +} + +if (process.argv.includes("--write")) { + generateEntryModules(process.cwd()); +} diff --git a/scripts/unmonorepo/migrate-layout.mjs b/scripts/unmonorepo/migrate-layout.mjs new file mode 100644 index 00000000..8579df83 --- /dev/null +++ b/scripts/unmonorepo/migrate-layout.mjs @@ -0,0 +1,54 @@ +import fs from "node:fs"; +import path from "node:path"; +import { featureSpecs, findDuplicateLeafModules } from "./feature-spec.mjs"; + +function moveFile(fromPath, toPath) { + fs.mkdirSync(path.dirname(toPath), { recursive: true }); + fs.renameSync(fromPath, toPath); +} + +export function migrateLayout(rootDir) { + const duplicateLeaves = findDuplicateLeafModules(rootDir, featureSpecs); + const reservedPublicModules = new Set(featureSpecs.map((spec) => spec.publicModule)); + + for (const spec of featureSpecs) { + const legacySourceDir = path.join(rootDir, "packages", spec.dirName, "src"); + if (!fs.existsSync(legacySourceDir)) continue; + + const nextSourceDir = path.join(rootDir, "src", spec.dirName); + fs.mkdirSync(nextSourceDir, { recursive: true }); + + for (const entry of fs.readdirSync(legacySourceDir, { withFileTypes: true })) { + if (!entry.isFile() || !entry.name.endsWith(".res")) continue; + + const leafName = path.basename(entry.name, ".res"); + const nextLeafName = + duplicateLeaves.has(leafName) || reservedPublicModules.has(leafName) + ? `${spec.internalPrefix}${leafName}` + : leafName; + + moveFile( + path.join(legacySourceDir, entry.name), + path.join(nextSourceDir, `${nextLeafName}.res`), + ); + } + + for (const removable of ["package.json", "rescript.json", "lib"]) { + fs.rmSync(path.join(rootDir, "packages", spec.dirName, removable), { + recursive: true, + force: true, + }); + } + + fs.rmSync(path.join(rootDir, "packages", spec.dirName), { + recursive: true, + force: true, + }); + } + + fs.rmSync(path.join(rootDir, "packages", "Prelude"), { recursive: true, force: true }); +} + +if (process.argv.includes("--write")) { + migrateLayout(process.cwd()); +} diff --git a/scripts/unmonorepo/rewrite-references.mjs b/scripts/unmonorepo/rewrite-references.mjs new file mode 100644 index 00000000..28fb0b06 --- /dev/null +++ b/scripts/unmonorepo/rewrite-references.mjs @@ -0,0 +1,107 @@ +import fs from "node:fs"; +import path from "node:path"; +import { featureSpecs, publicNameForLeafModule } from "./feature-spec.mjs"; + +function escapeRegExp(value) { + return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} + +function rewriteBareModuleReference(source, publicLeaf, leaf) { + const pattern = new RegExp(`(^|[^A-Za-z0-9_])${escapeRegExp(publicLeaf)}\\.`, "g"); + return source.replace(pattern, (match, prefix, offset, input) => { + const moduleStart = offset + prefix.length; + + if (prefix === "." && input.slice(Math.max(0, moduleStart - 3), moduleStart) !== "...") { + return match; + } + + return `${prefix}${leaf}.`; + }); +} + +export function rewriteSourceText(source, { currentFeature, specs, localLeaves }) { + const currentSpec = specs.find((spec) => spec.publicModule === currentFeature); + let next = source; + + for (const leaf of localLeaves) { + const publicLeaf = publicNameForLeafModule(leaf, currentSpec.internalPrefix); + next = next.replaceAll(`${currentSpec.legacyNamespace}.${publicLeaf}.`, `${leaf}.`); + next = next.replaceAll(`WebAPI.${currentSpec.publicModule}.${publicLeaf}.`, `${leaf}.`); + next = next.replaceAll(`WebApi.${currentSpec.publicModule}.${publicLeaf}.`, `${leaf}.`); + next = next.replaceAll(`${currentSpec.publicModule}.${publicLeaf}.`, `${leaf}.`); + + if (leaf !== publicLeaf) { + next = rewriteBareModuleReference(next, publicLeaf, leaf); + } + } + + for (const spec of specs) { + next = next.replaceAll(`${spec.legacyNamespace}.`, `${spec.publicModule}.`); + next = next.replaceAll(`WebAPI.${spec.publicModule}.`, `${spec.publicModule}.`); + next = next.replaceAll(`WebApi.${spec.publicModule}.`, `${spec.publicModule}.`); + } + + return next; +} + +export function rewriteTestText(source, specs = featureSpecs) { + let next = source; + + for (const spec of specs) { + next = next.replaceAll(`${spec.legacyNamespace}.`, `${spec.publicModule}.`); + next = next.replaceAll(`WebAPI.${spec.publicModule}.`, `${spec.publicModule}.`); + next = next.replaceAll(`WebApi.${spec.publicModule}.`, `${spec.publicModule}.`); + } + + return next; +} + +function rewriteTestFilesInDirectory(directoryPath) { + for (const entry of fs.readdirSync(directoryPath, { withFileTypes: true })) { + const entryPath = path.join(directoryPath, entry.name); + + if (entry.isDirectory()) { + rewriteTestFilesInDirectory(entryPath); + continue; + } + + if (!entry.isFile() || !entry.name.endsWith(".res")) continue; + fs.writeFileSync(entryPath, rewriteTestText(fs.readFileSync(entryPath, "utf8"))); + } +} + +export function rewriteRepoReferences(rootDir) { + for (const spec of featureSpecs) { + const featureDir = path.join(rootDir, "src", spec.dirName); + if (!fs.existsSync(featureDir)) continue; + + const localLeaves = fs + .readdirSync(featureDir) + .filter((name) => name.endsWith(".res")) + .map((name) => path.basename(name, ".res")); + + for (const fileName of fs.readdirSync(featureDir)) { + if (!fileName.endsWith(".res")) continue; + + const filePath = path.join(featureDir, fileName); + const source = fs.readFileSync(filePath, "utf8"); + fs.writeFileSync( + filePath, + rewriteSourceText(source, { + currentFeature: spec.publicModule, + specs: featureSpecs, + localLeaves, + }), + ); + } + } + + const testsDir = path.join(rootDir, "tests"); + if (fs.existsSync(testsDir)) { + rewriteTestFilesInDirectory(testsDir); + } +} + +if (process.argv.includes("--write")) { + rewriteRepoReferences(process.cwd()); +} diff --git a/scripts/unmonorepo/write-root-config.mjs b/scripts/unmonorepo/write-root-config.mjs new file mode 100644 index 00000000..aab7134c --- /dev/null +++ b/scripts/unmonorepo/write-root-config.mjs @@ -0,0 +1,56 @@ +import fs from "node:fs"; +import path from "node:path"; +import { featureSpecs } from "./feature-spec.mjs"; + +export function buildRootRescriptJson(specs) { + return { + name: "@rescript/webapi", + sources: [ + ...specs.map((spec) => ({ + dir: `src/${spec.dirName}`, + subdirs: true, + feature: spec.featureName, + public: [spec.publicModule], + })), + { + dir: "tests", + subdirs: true, + type: "dev", + }, + ], + "package-specs": { + module: "esmodule", + "in-source": true, + }, + suffix: ".js", + dependencies: [], + }; +} + +export function buildRootPackageJson(currentPackage) { + const nextPackage = structuredClone(currentPackage); + nextPackage.name = "@rescript/webapi"; + + delete nextPackage.private; + delete nextPackage.workspaces; + delete nextPackage.scripts["build:packages"]; + delete nextPackage.scripts["create:npm-packages"]; + + nextPackage.files = ["rescript.json", "src/**/*.res", "src/**/*.resi", "README.md"]; + + return nextPackage; +} + +export function writeRootConfig(rootDir) { + const packagePath = path.join(rootDir, "package.json"); + const rescriptPath = path.join(rootDir, "rescript.json"); + const currentPackage = JSON.parse(fs.readFileSync(packagePath, "utf8")); + + fs.writeFileSync(rescriptPath, `${JSON.stringify(buildRootRescriptJson(featureSpecs), null, 2)}\n`); + fs.writeFileSync(packagePath, `${JSON.stringify(buildRootPackageJson(currentPackage), null, 2)}\n`); + fs.rmSync(path.join(rootDir, "scripts", "create-npm-packages.js"), { force: true }); +} + +if (process.argv.includes("--write")) { + writeRootConfig(process.cwd()); +} diff --git a/packages/Base/src/ArrayBufferTypedArrayOrDataView.res b/src/Base/ArrayBufferTypedArrayOrDataView.res similarity index 100% rename from packages/Base/src/ArrayBufferTypedArrayOrDataView.res rename to src/Base/ArrayBufferTypedArrayOrDataView.res diff --git a/src/Base/Base.res b/src/Base/Base.res new file mode 100644 index 00000000..84a24dbb --- /dev/null +++ b/src/Base/Base.res @@ -0,0 +1,7 @@ +module ArrayBufferTypedArrayOrDataView = ArrayBufferTypedArrayOrDataView +module CSSFontLoading = BaseCSSFontLoading +module DOM = BaseDOM +module EncryptedMediaExtensions = BaseEncryptedMediaExtensions +module Event = BaseEvent +module File = BaseFile +module FileAndDirectoryEntries = BaseFileAndDirectoryEntries diff --git a/packages/Base/src/CSSFontLoading.res b/src/Base/BaseCSSFontLoading.res similarity index 88% rename from packages/Base/src/CSSFontLoading.res rename to src/Base/BaseCSSFontLoading.res index dff65d9d..f5c6eabf 100644 --- a/packages/Base/src/CSSFontLoading.res +++ b/src/Base/BaseCSSFontLoading.res @@ -11,9 +11,9 @@ type fontFaceSetLoadStatus = /** [See FontFaceSet on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ -@editor.completeFrom(WebApiCSSFontLoading.FontFaceSet) +@editor.completeFrom(BaseCSSFontLoading.FontFaceSet) type rec fontFaceSet = private { - ...Event.eventTarget, + ...BaseEvent.eventTarget, /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */ diff --git a/packages/Base/src/DOM.res b/src/Base/BaseDOM.res similarity index 97% rename from packages/Base/src/DOM.res rename to src/Base/BaseDOM.res index 8a7c0068..da76815a 100644 --- a/packages/Base/src/DOM.res +++ b/src/Base/BaseDOM.res @@ -192,7 +192,7 @@ type predefinedColorSpace = | @as("srgb") Srgb type shareData = { - mutable files?: array, + mutable files?: array, mutable title?: string, mutable text?: string, mutable url?: string, @@ -203,12 +203,12 @@ The location (WebApiURL) of the object it is linked to. Changes done on it are r [See Location on MDN](https://developer.mozilla.org/docs/Web/API/Location) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.Location) +@editor.completeFrom(BaseDOM.Location) type location = { /** - Returns the Location object's WebApiURL. + Returns the Location object's URL. -Can be set, to navigate to the given WebApiURL. +Can be set, to navigate to the given URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Location/href) */ mutable href: string, @@ -291,11 +291,11 @@ type userActivation = { The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. [See Navigator on MDN](https://developer.mozilla.org/docs/Web/API/Navigator) */ -@editor.completeFrom(WebApiDOM.Navigator) +@editor.completeFrom(BaseDOM.Navigator) type navigator // TODO: mark as private once mutating fields of private records is allowed -@editor.completeFrom(WebApiDOM.DOMTokenList) +@editor.completeFrom(BaseDOM.DOMTokenList) type domTokenList = { /** Returns the number of tokens. @@ -315,7 +315,7 @@ Can be set, to change the associated attribute. A collection of Attr objects. Objects inside a NamedNodeMap are not in any particular order, unlike NodeList, although they may be accessed by an index as in an array. [See NamedNodeMap on MDN](https://developer.mozilla.org/docs/Web/API/NamedNodeMap) */ -@editor.completeFrom(WebApiDOM.NamedNodeMap) +@editor.completeFrom(BaseDOM.NamedNodeMap) type namedNodeMap = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NamedNodeMap/length) @@ -331,7 +331,7 @@ type fragmentDirective = {} /** [See CustomElementRegistry on MDN](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry) */ -@editor.completeFrom(WebApiDOM.CustomElementRegistry) +@editor.completeFrom(BaseDOM.CustomElementRegistry) type customElementRegistry = private {} /** @@ -347,9 +347,9 @@ type barProp = { /** [See ScreenOrientation on MDN](https://developer.mozilla.org/docs/Web/API/ScreenOrientation) */ -@editor.completeFrom(WebApiDOM.ScreenOrientation) +@editor.completeFrom(BaseDOM.ScreenOrientation) type screenOrientation = private { - ...Event.eventTarget, + ...BaseEvent.eventTarget, /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/type) */ @@ -408,7 +408,7 @@ type offscreenRenderingContext = unknown /** [See AnimationTimeline on MDN](https://developer.mozilla.org/docs/Web/API/AnimationTimeline) */ -@editor.completeFrom(WebApiDOM.Animation) +@editor.completeFrom(BaseDOM.Animation) type rec animationTimeline = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/currentTime) @@ -419,7 +419,7 @@ type rec animationTimeline = private { /** [See DocumentTimeline on MDN](https://developer.mozilla.org/docs/Web/API/DocumentTimeline) */ -@editor.completeFrom(WebApiDOM.DocumentTimeline) and documentTimeline = private { +@editor.completeFrom(BaseDOM.DocumentTimeline) and documentTimeline = private { // Base properties from AnimationTimeline /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/currentTime) @@ -432,7 +432,7 @@ type rec animationTimeline = private { [See MediaList on MDN](https://developer.mozilla.org/docs/Web/API/MediaList) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.MediaList) +@editor.completeFrom(BaseDOM.MediaList) type mediaList = { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaList/mediaText) @@ -447,7 +447,7 @@ type mediaList = { /** [See StylePropertyMapReadOnly on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) */ -@editor.completeFrom(WebApiDOM.StylePropertyMapReadOnly) +@editor.completeFrom(BaseDOM.StylePropertyMapReadOnly) type stylePropertyMapReadOnly = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size) @@ -458,7 +458,7 @@ type stylePropertyMapReadOnly = private { /** [See StylePropertyMap on MDN](https://developer.mozilla.org/docs/Web/API/StylePropertyMap) */ -@editor.completeFrom(WebApiDOM.StylePropertyMap) +@editor.completeFrom(BaseDOM.StylePropertyMap) type stylePropertyMap = private { ...stylePropertyMapReadOnly, } @@ -473,7 +473,7 @@ type domStringMap = {} A list of StyleSheet. [See StyleSheetList on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList) */ -@editor.completeFrom(WebApiDOM.StyleSheetList) +@editor.completeFrom(BaseDOM.StyleSheetList) type rec styleSheetList = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheetList/length) @@ -522,7 +522,7 @@ A single CSS style sheet. It inherits properties and methods from its parent, St [See CSSStyleSheet on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.CSSStyleSheet) and cssStyleSheet = { +@editor.completeFrom(BaseDOM.CSSStyleSheet) and cssStyleSheet = { // Base properties from StyleSheet /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StyleSheet/type) @@ -588,7 +588,7 @@ and cssRule = { A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. [See CSSRuleList on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList) */ -@editor.completeFrom(WebApiDOM.CSSRuleList) and cssRuleList = private { +@editor.completeFrom(BaseDOM.CSSRuleList) and cssRuleList = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/length) */ @@ -600,7 +600,7 @@ An object that is a CSS declaration block, and exposes style information and var [See CSSStyleDeclaration on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.CSSStyleDeclaration) and cssStyleDeclaration = { +@editor.completeFrom(BaseDOM.CSSStyleDeclaration) and cssStyleDeclaration = { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText) */ @@ -2308,9 +2308,9 @@ Node is an interface from which a number of WebApiDOM API object types inherit. [See Node on MDN](https://developer.mozilla.org/docs/Web/API/Node) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.Node) +@editor.completeFrom(BaseDOM.Node) type rec node = { - ...Event.eventTarget, + ...BaseEvent.eventTarget, /** Returns the type of node. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/nodeType) @@ -2322,7 +2322,7 @@ type rec node = { */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -2385,7 +2385,7 @@ type rec node = { NodeList objects are collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll(). [See NodeList on MDN](https://developer.mozilla.org/docs/Web/API/NodeList) */ -@editor.completeFrom(WebApiDOM.NodeList) and nodeList<'tNode> = private { +@editor.completeFrom(BaseDOM.NodeList) and nodeList<'tNode> = private { /** Returns the number of nodes in the collection. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NodeList/length) @@ -2398,7 +2398,7 @@ Element is the most general base class from which all objects in a Document inhe [See Element on MDN](https://developer.mozilla.org/docs/Web/API/Element) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.Element) and element = { +@editor.completeFrom(BaseDOM.Element) and element = { // Base properties from Node /** Returns the type of node. @@ -2411,7 +2411,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -2770,7 +2770,7 @@ TODO: mark as private once mutating fields of private records is allowed [See ShadowRoot on MDN](https://developer.mozilla.org/docs/Web/API/ShadowRoot) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.ShadowRoot) and shadowRoot = { +@editor.completeFrom(BaseDOM.ShadowRoot) and shadowRoot = { // Base properties from DocumentFragment // End base properties from DocumentFragment @@ -2786,7 +2786,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -2910,7 +2910,7 @@ Similarly, when the focused element is in a different node tree than documentOrS A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list. [See HTMLCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection) */ -@editor.completeFrom(WebApiDOM.HTMLCollection) and htmlCollection<'t> = private { +@editor.completeFrom(BaseDOM.HTMLCollection) and htmlCollection<'t> = private { /** Sets or retrieves the number of objects in a collection. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCollection/length) @@ -2923,7 +2923,7 @@ A collection of HTML form control elements. [See HTMLFormControlsCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormControlsCollection) */ @editor.completeFrom( - WebApiDOM.DOM.HTMLFormControlsCollection + BaseDOM.DOM.HTMLFormControlsCollection ) and htmlFormControlsCollection = private { // Base properties from HTMLCollection /** @@ -2939,7 +2939,7 @@ Any HTML element. Some elements directly implement this interface, while others [See HTMLElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.HTMLElement) and htmlElement = { +@editor.completeFrom(BaseDOM.HTMLElement) and htmlElement = { // Base properties from Element /** Returns the namespace. @@ -3052,7 +3052,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -3234,7 +3234,7 @@ Contains the descriptive information, or metadata, for a document. This object i [See HTMLHeadElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLHeadElement) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.HTMLHeadElement) and htmlHeadElement = { +@editor.completeFrom(BaseDOM.HTMLHeadElement) and htmlHeadElement = { // Base properties from HTMLElement /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) @@ -3426,7 +3426,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -3491,7 +3491,7 @@ A
element in the WebApiDOM; it allows access to and in some cases modific [See HTMLFormElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLFormElement) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.HTMLFormElement) and htmlFormElement = { +@editor.completeFrom(BaseDOM.HTMLFormElement) and htmlFormElement = { // Base properties from HTMLElement /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) @@ -3683,7 +3683,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -3799,7 +3799,7 @@ Provides special properties and methods for manipulating elements. [See HTMLImageElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLImageElement) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.HTMLImageElement) and htmlImageElement = { +@editor.completeFrom(BaseDOM.HTMLImageElement) and htmlImageElement = { // Base properties from HTMLElement /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) @@ -3991,7 +3991,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -4143,7 +4143,7 @@ Provides special properties (beyond the regular HTMLElement interface it also ha [See HTMLEmbedElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLEmbedElement) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.HTMLEmbedElement) and htmlEmbedElement = { +@editor.completeFrom(BaseDOM.HTMLEmbedElement) and htmlEmbedElement = { // Base properties from HTMLElement /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) @@ -4335,7 +4335,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -4416,7 +4416,7 @@ Hyperlink elements and provides special properties and methods (beyond those of [See HTMLAnchorElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.HTMLAnchorElement) and htmlAnchorElement = { +@editor.completeFrom(BaseDOM.HTMLAnchorElement) and htmlAnchorElement = { // Base properties from HTMLElement /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) @@ -4608,7 +4608,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -4709,9 +4709,9 @@ TODO: mark as private once mutating fields of private records is allowed */ mutable referrerPolicy: string, /** - Returns the hyperlink's WebApiURL. + Returns the hyperlink's URL. -Can be set, to change the WebApiURL. +Can be set, to change the URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/href) */ mutable href: string, @@ -4790,7 +4790,7 @@ Provides special properties and methods (beyond those of the regular object HTML [See HTMLAreaElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiDOM.HTMLAreaElement) and htmlAreaElement = { +@editor.completeFrom(BaseDOM.HTMLAreaElement) and htmlAreaElement = { // Base properties from HTMLElement /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) @@ -4982,7 +4982,7 @@ TODO: mark as private once mutating fields of private records is allowed */ nodeName: string, /** - Returns node's node document's document base WebApiURL. + Returns node's node document's document base URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/baseURI) */ baseURI: string, @@ -5063,9 +5063,9 @@ TODO: mark as private once mutating fields of private records is allowed */ mutable referrerPolicy: string, /** - Returns the hyperlink's WebApiURL. + Returns the hyperlink's URL. -Can be set, to change the WebApiURL. +Can be set, to change the URL. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/href) */ mutable href: string, @@ -5144,7 +5144,7 @@ HTML