From e44d51fecd675c96935d6aae8f215c177344987f Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 25 Oct 2026 22:57:53 -0700 Subject: [PATCH] ci(js): seed release API reports Co-Authored-By: GPT-6 --- .remarkignore | 3 + bun.lock | 87 +- js/auth/api/index.api.md | 757 +++++++++++++ js/binary/api/index.api.md | 94 ++ js/common/api.ts | 135 +++ js/common/package.ts | 17 +- js/flate/api/index.api.md | 31 + js/hang/api/catalog.api.md | 1024 ++++++++++++++++++ js/hang/api/container.api.md | 1256 ++++++++++++++++++++++ js/hang/api/index.api.md | 1429 +++++++++++++++++++++++++ js/hang/api/util.api.md | 92 ++ js/json/api/index.api.md | 262 +++++ js/justfile | 3 +- js/loc/api/index.api.md | 35 + js/moq-boy/api/element.api.md | 84 ++ js/moq-boy/api/index.api.md | 116 ++ js/msf/api/index.api.md | 118 ++ js/net/api/index.api.md | 1010 +++++++++++++++++ js/net/api/zod.api.md | 330 ++++++ js/pattern/api/index.api.md | 99 ++ js/publish/api/element.api.md | 603 +++++++++++ js/publish/api/index.api.md | 615 +++++++++++ js/publish/api/support-element.api.md | 27 + js/publish/api/support.api.md | 43 + js/publish/api/ui.api.md | 15 + js/room/api/index.api.md | 257 +++++ js/signals/api/dom.api.md | 98 ++ js/signals/api/index.api.md | 141 +++ js/signals/api/react.api.md | 50 + js/signals/api/solid.api.md | 56 + js/watch/api/element.api.md | 447 ++++++++ js/watch/api/index.api.md | 441 ++++++++ js/watch/api/support-element.api.md | 27 + js/watch/api/support.api.md | 43 + js/watch/api/ui.api.md | 15 + package.json | 1 + 36 files changed, 9852 insertions(+), 9 deletions(-) create mode 100644 js/auth/api/index.api.md create mode 100644 js/binary/api/index.api.md create mode 100644 js/common/api.ts create mode 100644 js/flate/api/index.api.md create mode 100644 js/hang/api/catalog.api.md create mode 100644 js/hang/api/container.api.md create mode 100644 js/hang/api/index.api.md create mode 100644 js/hang/api/util.api.md create mode 100644 js/json/api/index.api.md create mode 100644 js/loc/api/index.api.md create mode 100644 js/moq-boy/api/element.api.md create mode 100644 js/moq-boy/api/index.api.md create mode 100644 js/msf/api/index.api.md create mode 100644 js/net/api/index.api.md create mode 100644 js/net/api/zod.api.md create mode 100644 js/pattern/api/index.api.md create mode 100644 js/publish/api/element.api.md create mode 100644 js/publish/api/index.api.md create mode 100644 js/publish/api/support-element.api.md create mode 100644 js/publish/api/support.api.md create mode 100644 js/publish/api/ui.api.md create mode 100644 js/room/api/index.api.md create mode 100644 js/signals/api/dom.api.md create mode 100644 js/signals/api/index.api.md create mode 100644 js/signals/api/react.api.md create mode 100644 js/signals/api/solid.api.md create mode 100644 js/watch/api/element.api.md create mode 100644 js/watch/api/index.api.md create mode 100644 js/watch/api/support-element.api.md create mode 100644 js/watch/api/support.api.md create mode 100644 js/watch/api/ui.api.md diff --git a/.remarkignore b/.remarkignore index 5716b01a44d..1c90029f2fc 100644 --- a/.remarkignore +++ b/.remarkignore @@ -22,3 +22,6 @@ quest/ .claude/shared/ .claude/skills/ .agents/ + +# API Extractor owns the layout of its generated reports. +js/*/api/*.api.md diff --git a/bun.lock b/bun.lock index dc96af8eb89..70655daa8e9 100644 --- a/bun.lock +++ b/bun.lock @@ -7,6 +7,7 @@ "devDependencies": { "@babel/parser": "^8.0.6", "@biomejs/biome": "^2.5.14", + "@microsoft/api-extractor": "7.59.4", "concurrently": "^10.0.5", "markdown-extensions": "^2.0.0", "publint": "^0.3.24", @@ -662,6 +663,14 @@ "@libav.js/variant-opus-af": ["@libav.js/variant-opus-af@6.10.9", "", {}, "sha512-yULJUCQIHDtwDPbT38t9pP/7EGgqwynVcOau46hZjtCe8TWMp67DTi2X0Emr2M4Ci3nzxNPf25IzO+IXSmHDBg=="], + "@microsoft/api-extractor": ["@microsoft/api-extractor@7.59.4", "", { "dependencies": { "@microsoft/api-extractor-model": "7.33.15", "@microsoft/tsdoc": "~0.17.0", "@microsoft/tsdoc-config": "~0.18.2", "@rushstack/node-core-library": "5.25.1", "@rushstack/rig-package": "0.7.4", "@rushstack/terminal": "0.24.7", "@rushstack/ts-command-line": "5.3.17", "diff": "~8.0.2", "minimatch": "10.2.3", "resolve": "~1.22.1", "semver": "~7.7.4", "source-map": "~0.6.1", "typescript": "5.9.3" }, "bin": { "api-extractor": "bin/api-extractor" } }, "sha512-XqseDKIw736qlhQwS9SOpbY4veOiP2Nc7YiWmgXXBmeA3kY9qGXw+Tu7DFpU9FvXywE1z8SvLJKUVxFpcX0kig=="], + + "@microsoft/api-extractor-model": ["@microsoft/api-extractor-model@7.33.15", "", { "dependencies": { "@microsoft/tsdoc": "~0.17.0", "@microsoft/tsdoc-config": "~0.18.2", "@rushstack/node-core-library": "5.25.1" } }, "sha512-UpCnItIJwu03iNTWtJVKv8Qbf0MXN7WLQZUail9cpAQmnZiIX36YPRRoRxz0pocwytzUpmJhstsLkyW5tsaHBA=="], + + "@microsoft/tsdoc": ["@microsoft/tsdoc@0.17.1", "", {}, "sha512-VHyYyyoH63jFoO3shpw9Zfijk5v/9p/VrClW35z0/q6ooK7sSmxpzOkS4iZPxs3vO4XtBW4H38HRAKkAMIK7DA=="], + + "@microsoft/tsdoc-config": ["@microsoft/tsdoc-config@0.18.3", "", { "dependencies": { "@microsoft/tsdoc": "0.17.1", "ajv": "~8.18.0", "jju": "~1.4.0", "resolve": "~1.22.2" } }, "sha512-0I0rGXo1eJziw3EEErkDS9p/0RzBcyOiV+zbSDqOZTeURmhtut+WIvpih0LM5g+ZpZ9SyFxDfkhAcl/r8e2zGw=="], + "@moq/audio-quality": ["@moq/audio-quality@workspace:test/audio-quality/clients/js"], "@moq/auth": ["@moq/auth@workspace:js/auth"], @@ -838,6 +847,16 @@ "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.62.2", "", { "os": "win32", "cpu": "x64" }, "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA=="], + "@rushstack/node-core-library": ["@rushstack/node-core-library@5.25.1", "", { "dependencies": { "ajv": "~8.20.0", "ajv-draft-04": "~1.0.0", "ajv-formats": "~3.0.1", "fs-extra": "~11.3.0", "import-lazy": "~4.0.0", "jju": "~1.4.0", "resolve": "~1.22.1", "semver": "~7.7.4" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-ozoRDwIx3jStOYpx86rFyXH4SaUR+DVT6HubQ59avLplJkWXSm5InztYH7RrOzzq9PJXTdq9/+lKX06SfkLVsA=="], + + "@rushstack/problem-matcher": ["@rushstack/problem-matcher@0.2.1", "", { "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-gulfhBs6n+I5b7DvjKRfhMGyUejtSgOHTclF/eONr8hcgF1APEDjhxIsfdUYYMzC3rvLwGluqLjbwCFZ8nxrog=="], + + "@rushstack/rig-package": ["@rushstack/rig-package@0.7.4", "", { "dependencies": { "jju": "~1.4.0", "resolve": "~1.22.1" } }, "sha512-SHZdzc9b2ptUb5uvRWALtAceD/QKZ4UAnZjcaKviTMPmHBnW14gs7XDocn6sDv2EqgnxxFPFkpV7/I3cUijCbw=="], + + "@rushstack/terminal": ["@rushstack/terminal@0.24.7", "", { "dependencies": { "@rushstack/node-core-library": "5.25.1", "@rushstack/problem-matcher": "0.2.1", "supports-color": "~8.1.1" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-o8J9nHOIwfYb0s0eG2WYhx7ed3YIvBXQHVFxYdXCmVdBOkTkdArJcgVzRS8ewUepmlic4nGgJPjKIVaNKSqEnA=="], + + "@rushstack/ts-command-line": ["@rushstack/ts-command-line@5.3.17", "", { "dependencies": { "@rushstack/terminal": "0.24.7", "@types/argparse": "1.0.38", "argparse": "~1.0.9", "string-argv": "~0.3.1" } }, "sha512-pIwhWawZXAT0nTXwvcE/InQ7uaVAgSeIzILMb2mBrI01Hz1yEvxrhV2+DE2Fzux8aZY9OJTdLsI+sk9kZDuAJw=="], + "@shikijs/core": ["@shikijs/core@2.5.0", "", { "dependencies": { "@shikijs/engine-javascript": "2.5.0", "@shikijs/engine-oniguruma": "2.5.0", "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.4" } }, "sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg=="], "@shikijs/engine-javascript": ["@shikijs/engine-javascript@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^3.1.0" } }, "sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w=="], @@ -894,6 +913,8 @@ "@tailwindcss/vite": ["@tailwindcss/vite@4.3.3", "", { "dependencies": { "@tailwindcss/node": "4.3.3", "@tailwindcss/oxide": "4.3.3", "tailwindcss": "4.3.3" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw=="], + "@types/argparse": ["@types/argparse@1.0.38", "", {}, "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA=="], + "@types/audioworklet": ["@types/audioworklet@0.0.100", "", {}, "sha512-mWt4Z5CWi0CupDnSYWJgx6dw61XUk9JSRGrM9F/YNrpOoY/0XG+sxP+8rAjQq80H4febOe8PrzGmmN/X3w8LsQ=="], "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], @@ -1030,6 +1051,12 @@ "acorn": ["acorn@8.17.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg=="], + "ajv": ["ajv@8.18.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A=="], + + "ajv-draft-04": ["ajv-draft-04@1.0.0", "", { "peerDependencies": { "ajv": "^8.5.0" }, "optionalPeers": ["ajv"] }, "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw=="], + + "ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="], + "algoliasearch": ["algoliasearch@5.55.1", "", { "dependencies": { "@algolia/abtesting": "1.21.1", "@algolia/client-abtesting": "5.55.1", "@algolia/client-analytics": "5.55.1", "@algolia/client-common": "5.55.1", "@algolia/client-insights": "5.55.1", "@algolia/client-personalization": "5.55.1", "@algolia/client-query-suggestions": "5.55.1", "@algolia/client-search": "5.55.1", "@algolia/ingestion": "1.55.1", "@algolia/monitoring": "1.55.1", "@algolia/recommend": "5.55.1", "@algolia/requester-browser-xhr": "5.55.1", "@algolia/requester-fetch": "5.55.1", "@algolia/requester-node-http": "5.55.1" } }, "sha512-FyaFnnsbVPtevQwqSj/SdxE3jAsSsY0BEH8IVLf9rXxEBdAhAmT6VKCVSMWoaPIHVN1Eufh/1w8q6k8URpIkWw=="], "ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], @@ -1038,7 +1065,7 @@ "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], - "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + "argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="], "async": ["async@3.2.6", "", {}, "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA=="], @@ -1170,6 +1197,8 @@ "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], + "diff": ["diff@8.0.4", "", {}, "sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw=="], + "dom-serializer": ["dom-serializer@1.4.1", "", { "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.0", "entities": "^2.0.0" } }, "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag=="], "domelementtype": ["domelementtype@2.3.0", "", {}, "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="], @@ -1206,6 +1235,8 @@ "error-stack-parser-es": ["error-stack-parser-es@1.0.5", "", {}, "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA=="], + "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], + "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], @@ -1220,8 +1251,12 @@ "extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="], + "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], + "fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="], + "fast-uri": ["fast-uri@3.1.9", "", {}, "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ=="], + "fastq": ["fastq@1.20.1", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw=="], "fault": ["fault@2.0.1", "", { "dependencies": { "format": "^0.2.0" } }, "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ=="], @@ -1248,6 +1283,8 @@ "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], @@ -1262,6 +1299,10 @@ "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + + "hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="], + "hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="], "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], @@ -1284,6 +1325,8 @@ "ignore": ["ignore@6.0.2", "", {}, "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A=="], + "import-lazy": ["import-lazy@4.0.0", "", {}, "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw=="], + "import-meta-resolve": ["import-meta-resolve@4.2.0", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="], "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], @@ -1298,6 +1341,8 @@ "is-binary-path": ["is-binary-path@2.1.0", "", { "dependencies": { "binary-extensions": "^2.0.0" } }, "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw=="], + "is-core-module": ["is-core-module@2.17.0", "", { "dependencies": { "hasown": "^2.0.4" } }, "sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA=="], + "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], "is-docker": ["is-docker@3.0.0", "", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="], @@ -1334,6 +1379,8 @@ "jiti": ["jiti@2.7.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="], + "jju": ["jju@1.4.0", "", {}, "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA=="], + "jose": ["jose@6.2.12", "", {}, "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw=="], "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], @@ -1344,6 +1391,8 @@ "json-parse-even-better-errors": ["json-parse-even-better-errors@3.0.2", "", {}, "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ=="], + "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], "jsonfile": ["jsonfile@6.2.1", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q=="], @@ -1486,7 +1535,7 @@ "miniflare": ["miniflare@5.20260918.0-alpha", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "sharp": "0.35.4", "undici": "7.29.0", "workerd": "1.20260918.1", "ws": "8.21.0", "youch": "4.1.0-beta.10" } }, "sha512-vyIes7yW/OTzHtz4GhcBCTohZfqk2eQNiIkngZ07VRA5Qu24aNgW/TrFwlPkMLMjWDQ8R4JJBBHR/KX+liSDtg=="], - "minimatch": ["minimatch@10.2.6", "", { "dependencies": { "brace-expansion": "^5.0.8" } }, "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A=="], + "minimatch": ["minimatch@10.2.3", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-Rwi3pnapEqirPSbWbrZaa6N3nmqq4Xer/2XooiOKyV3q12ML06f7MOuc5DVH8ONZIFhwIYQ3yzPH4nt7iWHaTg=="], "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], @@ -1562,6 +1611,8 @@ "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + "path-parse": ["path-parse@1.0.7", "", {}, "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="], + "path-scurry": ["path-scurry@2.0.2", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg=="], "path-to-regexp": ["path-to-regexp@6.3.0", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="], @@ -1700,6 +1751,10 @@ "require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="], + "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], + + "resolve": ["resolve@1.22.13", "", { "dependencies": { "es-errors": "^1.3.0", "is-core-module": "^2.17.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA=="], + "retry": ["retry@0.12.0", "", {}, "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow=="], "reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="], @@ -1726,7 +1781,7 @@ "section-matter": ["section-matter@1.0.0", "", { "dependencies": { "extend-shallow": "^2.0.1", "kind-of": "^6.0.0" } }, "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA=="], - "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], "seroval": ["seroval@1.5.4", "", {}, "sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw=="], @@ -1772,6 +1827,10 @@ "speakingurl": ["speakingurl@14.0.1", "", {}, "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ=="], + "sprintf-js": ["sprintf-js@1.0.3", "", {}, "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="], + + "string-argv": ["string-argv@0.3.2", "", {}, "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q=="], + "string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], "string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], @@ -1790,6 +1849,8 @@ "supports-color": ["supports-color@10.2.2", "", {}, "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g=="], + "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], + "tabbable": ["tabbable@6.5.0", "", {}, "sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA=="], "tailwindcss": ["tailwindcss@4.3.3", "", {}, "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ=="], @@ -1944,12 +2005,16 @@ "@babel/core/@babel/types": ["@babel/types@7.29.7", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA=="], + "@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "@babel/generator/@babel/parser": ["@babel/parser@7.29.7", "", { "dependencies": { "@babel/types": "^7.29.7" }, "bin": "./bin/babel-parser.js" }, "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg=="], "@babel/generator/@babel/types": ["@babel/types@7.29.7", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA=="], "@babel/helper-compilation-targets/lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + "@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "@babel/helper-module-imports/@babel/types": ["@babel/types@7.29.7", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA=="], "@babel/helper-module-transforms/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], @@ -1970,6 +2035,8 @@ "@isaacs/cliui/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], + "@microsoft/api-extractor/typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "@npmcli/config/ini": ["ini@4.1.3", "", {}, "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg=="], "@npmcli/config/semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], @@ -1994,6 +2061,12 @@ "@rollup/pluginutils/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + "@rushstack/node-core-library/ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], + + "@rushstack/node-core-library/fs-extra": ["fs-extra@11.3.5", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-eKpRKAovdpZtR1WopLHxlBWvAgPny3c4gX1G5Jhwmmw4XJj0ifSD5qB5TOo8hmA0wlRKDAOAhEE1yVPgs6Fgcg=="], + + "@rushstack/terminal/supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="], + "@tailwindcss/node/lightningcss": ["lightningcss@1.32.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.32.0", "lightningcss-darwin-arm64": "1.32.0", "lightningcss-darwin-x64": "1.32.0", "lightningcss-freebsd-x64": "1.32.0", "lightningcss-linux-arm-gnueabihf": "1.32.0", "lightningcss-linux-arm64-gnu": "1.32.0", "lightningcss-linux-arm64-musl": "1.32.0", "lightningcss-linux-x64-gnu": "1.32.0", "lightningcss-linux-x64-musl": "1.32.0", "lightningcss-win32-arm64-msvc": "1.32.0", "lightningcss-win32-x64-msvc": "1.32.0" } }, "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ=="], "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" }, "bundled": true }, "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ=="], @@ -2032,6 +2105,8 @@ "@vue/compiler-sfc/postcss": ["postcss@8.5.16", "", { "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg=="], + "ajv-formats/ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], + "anymatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], "babel-plugin-jsx-dom-expressions/@babel/helper-module-imports": ["@babel/helper-module-imports@7.18.6", "", { "dependencies": { "@babel/types": "^7.18.6" } }, "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA=="], @@ -2060,6 +2135,10 @@ "html-minifier-terser/commander": ["commander@8.3.0", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="], + "js-yaml/argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + + "markdown-it/argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], "millify/yargs": ["yargs@17.7.3", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g=="], @@ -2110,6 +2189,8 @@ "vitepress/vite": ["vite@5.4.21", "", { "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", "rollup": "^4.20.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "optionalPeers": ["@types/node", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser"], "bin": { "vite": "bin/vite.js" } }, "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw=="], + "vitepress-plugin-llms/minimatch": ["minimatch@10.2.6", "", { "dependencies": { "brace-expansion": "^5.0.8" } }, "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A=="], + "wrangler/esbuild": ["esbuild@0.28.1", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.1", "@esbuild/android-arm": "0.28.1", "@esbuild/android-arm64": "0.28.1", "@esbuild/android-x64": "0.28.1", "@esbuild/darwin-arm64": "0.28.1", "@esbuild/darwin-x64": "0.28.1", "@esbuild/freebsd-arm64": "0.28.1", "@esbuild/freebsd-x64": "0.28.1", "@esbuild/linux-arm": "0.28.1", "@esbuild/linux-arm64": "0.28.1", "@esbuild/linux-ia32": "0.28.1", "@esbuild/linux-loong64": "0.28.1", "@esbuild/linux-mips64el": "0.28.1", "@esbuild/linux-ppc64": "0.28.1", "@esbuild/linux-riscv64": "0.28.1", "@esbuild/linux-s390x": "0.28.1", "@esbuild/linux-x64": "0.28.1", "@esbuild/netbsd-arm64": "0.28.1", "@esbuild/netbsd-x64": "0.28.1", "@esbuild/openbsd-arm64": "0.28.1", "@esbuild/openbsd-x64": "0.28.1", "@esbuild/openharmony-arm64": "0.28.1", "@esbuild/sunos-x64": "0.28.1", "@esbuild/win32-arm64": "0.28.1", "@esbuild/win32-ia32": "0.28.1", "@esbuild/win32-x64": "0.28.1" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw=="], "wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], diff --git a/js/auth/api/index.api.md b/js/auth/api/index.api.md new file mode 100644 index 00000000000..4bdcc61f398 --- /dev/null +++ b/js/auth/api/index.api.md @@ -0,0 +1,757 @@ +## API Report File for "@moq/auth" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { compareSpecificity } from '@moq/pattern'; +import { InvalidPattern } from '@moq/pattern'; +import { Pattern } from '@moq/pattern'; +import { Patterns } from '@moq/pattern'; +import { Segment } from '@moq/pattern'; +import { Specificity } from '@moq/pattern'; +import * as z from '@zod/mini'; + +type Algorithm_2 = z.infer; +export { Algorithm_2 as Algorithm } + +export const AlgorithmSchema: z.ZodMiniEnum<{ + ES256: "ES256"; + ES384: "ES384"; + EdDSA: "EdDSA"; + HS256: "HS256"; + HS384: "HS384"; + HS512: "HS512"; + PS256: "PS256"; + PS384: "PS384"; + PS512: "PS512"; + RS256: "RS256"; + RS384: "RS384"; + RS512: "RS512"; +}>; + +export type AsymmetricKey = Exclude; + +export function authorize(claims: Claims, path: string): Permissions_2; + +export type Bytes = z.infer; + +export const BytesSchema: z.ZodMiniObject<{ + sent: z.ZodMiniInt; + received: z.ZodMiniInt; +}, z.core.$strip>; + +export type Claims = z.output; + +export const ClaimsSchema: z.ZodMiniPipe>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + exp: z.ZodMiniOptional; + iat: z.ZodMiniOptional; + nbf: z.ZodMiniOptional; + iss: z.ZodMiniOptional; + sub: z.ZodMiniOptional; + jti: z.ZodMiniOptional; + put: z.ZodMiniOptional, z.ZodMiniArray>]>>; + get: z.ZodMiniOptional, z.ZodMiniArray>]>>; +}, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; +}, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + exp?: number | undefined; + iat?: number | undefined; + nbf?: number | undefined; + iss?: unknown; + sub?: unknown; + jti?: unknown; + put?: string | string[] | undefined; + get?: string | string[] | undefined; +}>>; + +export { compareSpecificity } + +function find(set: KeySet, kid: string): Key | undefined; + +function generate(algorithm: Algorithm_2, kid?: string): Promise; + +export type Grant = z.infer; + +export const GrantSchema: z.ZodMiniObject<{ + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + root: z.ZodMiniOptional>; + mounts: z.ZodMiniOptional, z.ZodMiniString>>; + expires: z.ZodMiniOptional; + revalidate: z.ZodMiniOptional; + tier: z.ZodMiniOptional>; + peer: z.ZodMiniOptional>; +}, z.core.$strip>; + +export { InvalidPattern } + +export type Key = z.infer; + +export const Key: { + parse: typeof parse; + public: typeof toPublic; + sign: typeof sign; + verify: typeof verify; + generate: typeof generate; +}; + +export type KeyId = z.infer; + +export const KeyIdSchema: z.ZodMiniString; + +export const KeySchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ + alg: z.ZodMiniEnum<{ + ES256: "ES256"; + ES384: "ES384"; + EdDSA: "EdDSA"; + HS256: "HS256"; + HS384: "HS384"; + HS512: "HS512"; + PS256: "PS256"; + PS384: "PS384"; + PS512: "PS512"; + RS256: "RS256"; + RS384: "RS384"; + RS512: "RS512"; + }>; + key_ops: z.ZodMiniDefault>>; + kid: z.ZodMiniOptional>; + scope: z.ZodMiniOptional>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; + }, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; + }, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; + }>>>; + kty: z.ZodMiniLiteral<"oct">; + k: z.ZodMiniString; +}, z.core.$strip>, z.ZodMiniObject<{ + alg: z.ZodMiniEnum<{ + ES256: "ES256"; + ES384: "ES384"; + EdDSA: "EdDSA"; + HS256: "HS256"; + HS384: "HS384"; + HS512: "HS512"; + PS256: "PS256"; + PS384: "PS384"; + PS512: "PS512"; + RS256: "RS256"; + RS384: "RS384"; + RS512: "RS512"; + }>; + key_ops: z.ZodMiniDefault>>; + kid: z.ZodMiniOptional>; + scope: z.ZodMiniOptional>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; + }, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; + }, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; + }>>>; + kty: z.ZodMiniLiteral<"RSA">; + n: z.ZodMiniString; + e: z.ZodMiniString; + d: z.ZodMiniOptional>; + p: z.ZodMiniOptional>; + q: z.ZodMiniOptional>; + dp: z.ZodMiniOptional>; + dq: z.ZodMiniOptional>; + qi: z.ZodMiniOptional>; +}, z.core.$strip>, z.ZodMiniObject<{ + alg: z.ZodMiniEnum<{ + ES256: "ES256"; + ES384: "ES384"; + EdDSA: "EdDSA"; + HS256: "HS256"; + HS384: "HS384"; + HS512: "HS512"; + PS256: "PS256"; + PS384: "PS384"; + PS512: "PS512"; + RS256: "RS256"; + RS384: "RS384"; + RS512: "RS512"; + }>; + key_ops: z.ZodMiniDefault>>; + kid: z.ZodMiniOptional>; + scope: z.ZodMiniOptional>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; + }, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; + }, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; + }>>>; + kty: z.ZodMiniLiteral<"EC">; + crv: z.ZodMiniEnum<{ + "P-256": "P-256"; + "P-384": "P-384"; + }>; + x: z.ZodMiniString; + y: z.ZodMiniString; + d: z.ZodMiniOptional>; +}, z.core.$strip>, z.ZodMiniObject<{ + alg: z.ZodMiniEnum<{ + ES256: "ES256"; + ES384: "ES384"; + EdDSA: "EdDSA"; + HS256: "HS256"; + HS384: "HS384"; + HS512: "HS512"; + PS256: "PS256"; + PS384: "PS384"; + PS512: "PS512"; + RS256: "RS256"; + RS384: "RS384"; + RS512: "RS512"; + }>; + key_ops: z.ZodMiniDefault>>; + kid: z.ZodMiniOptional>; + scope: z.ZodMiniOptional>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; + }, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; + }, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; + }>>>; + kty: z.ZodMiniLiteral<"OKP">; + crv: z.ZodMiniLiteral<"Ed25519">; + x: z.ZodMiniString; + d: z.ZodMiniOptional>; +}, z.core.$strip>], "kty">; + +export type KeySet = z.infer; + +export const KeySet: { + parse: typeof parse_2; + public: typeof toPublic_2; + find: typeof find; + sign: typeof sign_2; + verify: typeof verify_2; +}; + +export const KeySetSchema: z.ZodMiniObject<{ + keys: z.ZodMiniArray; + key_ops: z.ZodMiniDefault>>; + kid: z.ZodMiniOptional>; + scope: z.ZodMiniOptional>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; + }, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; + }, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; + }>>>; + kty: z.ZodMiniLiteral<"oct">; + k: z.ZodMiniString; + }, z.core.$strip>, z.ZodMiniObject<{ + alg: z.ZodMiniEnum<{ + ES256: "ES256"; + ES384: "ES384"; + EdDSA: "EdDSA"; + HS256: "HS256"; + HS384: "HS384"; + HS512: "HS512"; + PS256: "PS256"; + PS384: "PS384"; + PS512: "PS512"; + RS256: "RS256"; + RS384: "RS384"; + RS512: "RS512"; + }>; + key_ops: z.ZodMiniDefault>>; + kid: z.ZodMiniOptional>; + scope: z.ZodMiniOptional>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; + }, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; + }, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; + }>>>; + kty: z.ZodMiniLiteral<"RSA">; + n: z.ZodMiniString; + e: z.ZodMiniString; + d: z.ZodMiniOptional>; + p: z.ZodMiniOptional>; + q: z.ZodMiniOptional>; + dp: z.ZodMiniOptional>; + dq: z.ZodMiniOptional>; + qi: z.ZodMiniOptional>; + }, z.core.$strip>, z.ZodMiniObject<{ + alg: z.ZodMiniEnum<{ + ES256: "ES256"; + ES384: "ES384"; + EdDSA: "EdDSA"; + HS256: "HS256"; + HS384: "HS384"; + HS512: "HS512"; + PS256: "PS256"; + PS384: "PS384"; + PS512: "PS512"; + RS256: "RS256"; + RS384: "RS384"; + RS512: "RS512"; + }>; + key_ops: z.ZodMiniDefault>>; + kid: z.ZodMiniOptional>; + scope: z.ZodMiniOptional>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; + }, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; + }, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; + }>>>; + kty: z.ZodMiniLiteral<"EC">; + crv: z.ZodMiniEnum<{ + "P-256": "P-256"; + "P-384": "P-384"; + }>; + x: z.ZodMiniString; + y: z.ZodMiniString; + d: z.ZodMiniOptional>; + }, z.core.$strip>, z.ZodMiniObject<{ + alg: z.ZodMiniEnum<{ + ES256: "ES256"; + ES384: "ES384"; + EdDSA: "EdDSA"; + HS256: "HS256"; + HS384: "HS384"; + HS512: "HS512"; + PS256: "PS256"; + PS384: "PS384"; + PS512: "PS512"; + RS256: "RS256"; + RS384: "RS384"; + RS512: "RS512"; + }>; + key_ops: z.ZodMiniDefault>>; + kid: z.ZodMiniOptional>; + scope: z.ZodMiniOptional>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; + }, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; + }, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; + }>>>; + kty: z.ZodMiniLiteral<"OKP">; + crv: z.ZodMiniLiteral<"Ed25519">; + x: z.ZodMiniString; + d: z.ZodMiniOptional>; + }, z.core.$strip>], "kty">>; +}, z.core.$strip>; + +export type Operation = z.infer; + +export const OperationSchema: z.ZodMiniEnum<{ + decrypt: "decrypt"; + encrypt: "encrypt"; + sign: "sign"; + verify: "verify"; +}>; + +function parse(jwk: string): Key; + +function parse_2(jwks: string): KeySet; + +export { Pattern } + +export const PatternListSchema: z.ZodMiniArray>; + +export { Patterns } + +export function patterns(texts: readonly string[] | undefined): Patterns; + +export type Peer = z.infer; + +export const PeerSchema: z.ZodMiniObject<{ + name: z.ZodMiniString; + fingerprint: z.ZodMiniString; + expires: z.ZodMiniOptional; + issuer: z.ZodMiniString; +}, z.core.$strip>; + +interface Permissions_2 { + publish: Patterns; + subscribe: Patterns; +} +export { Permissions_2 as Permissions } + +export type PublicKey = Omit; + +export interface PublicKeySet { + keys: PublicKey[]; +} + +type Request_2 = z.infer; +export { Request_2 as Request } + +export const RequestSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ + id: z.ZodMiniString; + node: z.ZodMiniString; + transport: z.ZodMiniEnum<{ + http: "http"; + iroh: "iroh"; + quic: "quic"; + tcp: "tcp"; + unix: "unix"; + websocket: "websocket"; + }>; + remote: z.ZodMiniOptional>; + local: z.ZodMiniOptional>; + server_name: z.ZodMiniOptional>; + alpn: z.ZodMiniOptional>; + path: z.ZodMiniString; + query: z.ZodMiniOptional>; + token: z.ZodMiniOptional; + }, z.core.$strip>>; + role: z.ZodMiniOptional>; + tls: z.ZodMiniOptional; + fingerprint: z.ZodMiniString; + expires: z.ZodMiniOptional; + issuer: z.ZodMiniString; + }, z.core.$strip>>; + event: z.ZodMiniLiteral<"connect">; +}, z.core.$strip>, z.ZodMiniObject<{ + id: z.ZodMiniString; + node: z.ZodMiniString; + transport: z.ZodMiniEnum<{ + http: "http"; + iroh: "iroh"; + quic: "quic"; + tcp: "tcp"; + unix: "unix"; + websocket: "websocket"; + }>; + remote: z.ZodMiniOptional>; + local: z.ZodMiniOptional>; + server_name: z.ZodMiniOptional>; + alpn: z.ZodMiniOptional>; + path: z.ZodMiniString; + query: z.ZodMiniOptional>; + token: z.ZodMiniOptional; + }, z.core.$strip>>; + role: z.ZodMiniOptional>; + tls: z.ZodMiniOptional; + fingerprint: z.ZodMiniString; + expires: z.ZodMiniOptional; + issuer: z.ZodMiniString; + }, z.core.$strip>>; + event: z.ZodMiniLiteral<"revalidate">; +}, z.core.$strip>, z.ZodMiniObject<{ + id: z.ZodMiniString; + node: z.ZodMiniString; + transport: z.ZodMiniEnum<{ + http: "http"; + iroh: "iroh"; + quic: "quic"; + tcp: "tcp"; + unix: "unix"; + websocket: "websocket"; + }>; + remote: z.ZodMiniOptional>; + local: z.ZodMiniOptional>; + server_name: z.ZodMiniOptional>; + alpn: z.ZodMiniOptional>; + path: z.ZodMiniString; + query: z.ZodMiniOptional>; + token: z.ZodMiniOptional; + }, z.core.$strip>>; + role: z.ZodMiniOptional>; + tls: z.ZodMiniOptional; + fingerprint: z.ZodMiniString; + expires: z.ZodMiniOptional; + issuer: z.ZodMiniString; + }, z.core.$strip>>; + event: z.ZodMiniLiteral<"end">; + reason: z.ZodMiniString; + duration: z.ZodMiniNumber; + bytes: z.ZodMiniObject<{ + sent: z.ZodMiniInt; + received: z.ZodMiniInt; + }, z.core.$strip>; +}, z.core.$strip>], "event">; + +export type Role = z.infer; + +export const RoleSchema: z.ZodMiniEnum<{ + publisher: "publisher"; + subscriber: "subscriber"; +}>; + +export type Scope = z.output; + +export function scopeAllows(scope: Scope, claims: Claims): boolean; + +export const ScopeSchema: z.ZodMiniPipe>; + publish: z.ZodMiniOptional>>; + subscribe: z.ZodMiniOptional>>; + put: z.ZodMiniOptional>>; + get: z.ZodMiniOptional>>; +}, z.core.$strict>, z.ZodMiniTransform & { + publish?: string[]; + subscribe?: string[]; +}, { + root: string; + publish?: string[] | undefined; + subscribe?: string[] | undefined; + put?: string[] | undefined; + get?: string[] | undefined; +}>>; + +export { Segment } + +function sign(key: Key, claims: Claims): Promise; + +function sign_2(set: KeySet, claims: Claims): Promise; + +export { Specificity } + +export type SymmetricKey = Extract; + +export type Token = z.infer; + +export const TokenSchema: z.ZodMiniObject<{ + kind: z.ZodMiniInt; + value: z.ZodMiniString; +}, z.core.$strip>; + +function toPublic(key: Key): PublicKey; + +function toPublic_2(set: KeySet): PublicKeySet; + +export type Transport = z.infer; + +export const TransportSchema: z.ZodMiniEnum<{ + http: "http"; + iroh: "iroh"; + quic: "quic"; + tcp: "tcp"; + unix: "unix"; + websocket: "websocket"; +}>; + +function verify(key: PublicKey | SymmetricKey, token: string): Promise; + +function verify_2(set: KeySet, token: string): Promise; + + +``` diff --git a/js/binary/api/index.api.md b/js/binary/api/index.api.md new file mode 100644 index 00000000000..197a148f01a --- /dev/null +++ b/js/binary/api/index.api.md @@ -0,0 +1,94 @@ +## API Report File for "@moq/binary" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as Moq from '@moq/net'; +import { Time } from '@moq/net'; + +export type Compression = "none" | "deflate"; + +interface Config { + compression?: Compression; +} + +interface Config_2 { + compression?: Compression; +} + +class Consumer { + [Symbol.asyncIterator](): AsyncIterator; + constructor(config: Consumer.Config); + next(): Promise; +} + +namespace Consumer { + type Config = Config & { + track: Moq.Track.Subscriber; + }; +} + +class Consumer_2 { + [Symbol.asyncIterator](): AsyncIterator; + constructor(config: Consumer_2.Config); + next(): Promise; +} + +namespace Consumer_2 { + type Config = Config_2 & { + track: Moq.Track.Subscriber; + }; +} + +type Init = Config & { + track: Moq.Track.Producer; +}; + +type Init_2 = Config_2 & { + track: Moq.Track.Producer; +}; + +class Producer { + constructor(config: Producer.Config); + finish(): void; + update(payload: Uint8Array, at?: Time.Timestamp): void; +} + +namespace Producer { + type Config = Init; +} + +class Producer_2 { + constructor(config: Producer_2.Config); + append(payload: Uint8Array, at?: Time.Timestamp): void; + finish(): void; +} + +namespace Producer_2 { + type Config = Init_2; +} + +class Rolled extends Error { + constructor(); +} + +declare namespace Snapshot { + export { + Consumer, + Config, + Producer + } +} + +declare namespace Stream { + export { + Consumer_2 as Consumer, + Rolled, + Config_2 as Config, + Producer_2 as Producer + } +} + + +``` diff --git a/js/common/api.ts b/js/common/api.ts new file mode 100644 index 00000000000..a871a3e1b6f --- /dev/null +++ b/js/common/api.ts @@ -0,0 +1,135 @@ +// The API Extractor setup every `@moq/*` package shares: one report per `exports` entrypoint, +// committed beside the package and diffed by the release gate. +// +// The built `dist/` is analyzed in a copy outside the repository, where no `node_modules` +// resolves its imports, so a package's report never depends on whether its dependencies are built. + +import { cpSync, existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { Extractor, ExtractorConfig, ExtractorLogLevel } from "@microsoft/api-extractor"; + +/** + * Compare the built package in `dir` with its committed reports in `api/`, exiting on a + * difference, or rewrite them when `MOQ_API_REPORT=update`, as `just fix` sets. + */ +export function checkReports(dir: string) { + const folder = join(dir, "api"); + const current = reports(join(dir, "dist")); + const committed = existsSync(folder) ? readdirSync(folder).filter((file) => file.endsWith(".api.md")) : []; + const stale = [...new Set([...current.keys(), ...committed])].filter((file) => { + const path = join(folder, file); + return current.get(file) !== (existsSync(path) ? readFileSync(path, "utf8") : undefined); + }); + + if (process.env.MOQ_API_REPORT === "update") { + mkdirSync(folder, { recursive: true }); + for (const file of stale) { + const report = current.get(file); + if (report === undefined) rmSync(join(folder, file)); + else writeFileSync(join(folder, file), report); + } + } else if (stale.length > 0) { + console.error("The public API no longer matches its committed report; run `just fix` and review the diff:"); + for (const file of stale) console.error(` api/${file}`); + process.exit(1); + } +} + +/** Every entrypoint's API report for the built package in `dist`, by file name such as `index.api.md`. */ +function reports(dist: string): Map { + const work = mkdtempSync(join(tmpdir(), "moq-api-")); + try { + const root = join(work, "package"); + cpSync(dist, root, { recursive: true }); + rewriteExternalNamespaces(root); + const folder = join(work, "reports"); + mkdirSync(folder); + + const found = new Map(); + const exports: Record = + JSON.parse(readFileSync(join(root, "package.json"), "utf8")).exports ?? {}; + for (const [subpath, target] of Object.entries(exports)) { + const types = (target as { types?: string }).types; + if (!types) continue; + const entry = subpath === "." ? "index" : subpath.replace(/^\.\//, "").replaceAll("/", "-"); + found.set(`${entry}.api.md`, extract(root, join(root, types), folder, entry)); + } + return found; + } finally { + rmSync(work, { recursive: true, force: true }); + } +} + +// API Extractor cannot follow `export * as X from ""`, which every entrypoint uses to +// re-export its dependencies, but reads the equivalent import-then-export form. +function rewriteExternalNamespaces(root: string) { + for (const rel of new Bun.Glob("**/*.d.ts").scanSync(root)) { + const file = join(root, rel); + const body = readFileSync(file, "utf8"); + const next = body.replace( + /^export \* as ([A-Za-z_$][\w$]*) from "([^."][^"]*)";$/gm, + 'import * as $1 from "$2";\nexport { $1 };', + ); + if (next !== body) writeFileSync(file, next); + } +} + +function extract(root: string, entrypoint: string, folder: string, entry: string): string { + const config = ExtractorConfig.prepare({ + configObject: { + projectFolder: root, + newlineKind: "lf", + mainEntryPointFilePath: entrypoint, + compiler: { + overrideTsconfig: { + compilerOptions: { + target: "esnext", + module: "esnext", + moduleResolution: "bundler", + lib: ["esnext", "dom"], + strict: true, + }, + files: [entrypoint], + }, + }, + apiReport: { + enabled: true, + reportFolder: folder, + reportTempFolder: join(root, ".api-extractor"), + reportFileName: entry, + // A type the API references without exporting is still part of it, so a change to + // its declaration must change the report. + includeForgottenExports: true, + }, + docModel: { enabled: false }, + dtsRollup: { enabled: false }, + tsdocMetadata: { enabled: false }, + // The report is the output. Its findings about doc comments and unresolved + // dependencies are left to the build's own declaration checks. + messages: { + compilerMessageReporting: { default: { logLevel: ExtractorLogLevel.None } }, + extractorMessageReporting: { default: { logLevel: ExtractorLogLevel.None } }, + tsdocMessageReporting: { default: { logLevel: ExtractorLogLevel.None } }, + }, + }, + configObjectFullPath: join(root, "api-extractor.json"), + packageJsonFullPath: join(root, "package.json"), + }); + + // localBuild writes the report into the scratch folder instead of failing because it is new, + // and the console chatter about that is suppressed; errors still fail the result. + const result = Extractor.invoke(config, { + localBuild: true, + messageCallback: (message) => { + if (message.logLevel !== ExtractorLogLevel.Error) message.handled = true; + }, + }); + if (!result.succeeded) throw new Error(`API Extractor failed on ${entry}: ${result.errorCount} errors`); + + // Keep only the API: whether an item has a doc comment is not part of it, and every exported + // item is @public, so neither marker churns the report or reads as a break. + return readFileSync(join(folder, `${entry}.api.md`), "utf8") + .replaceAll(" (undocumented)", "") + .replace(/^ *\/\/( @public| \(No @packageDocumentation comment for this package\))?\n/gm, ""); +} diff --git a/js/common/package.ts b/js/common/package.ts index 3ada5587889..843f949bbab 100644 --- a/js/common/package.ts +++ b/js/common/package.ts @@ -6,6 +6,7 @@ import { copyFileSync, existsSync, readFileSync, writeFileSync } from "node:fs"; import { basename, join, resolve } from "node:path"; import { publint } from "publint"; import { formatMessage } from "publint/utils"; +import { checkReports } from "./api.ts"; import { problems } from "./declarations.ts"; console.log("✍️ Rewriting package.json..."); @@ -15,11 +16,12 @@ const pkg = JSON.parse(readFileSync("package.json", "utf8")); // JSR config can map them to the built (.js) entrypoints. const srcExports: Record = structuredClone(pkg.exports ?? {}); -// Publish to JSR alongside npm for every package that publishes at all (has a -// release script), unless it opts out with "jsr": false. The web-component -// packages opt out: JSR forbids the HTMLElementTagNameMap global augmentation -// every custom element needs. Captured before pkg.scripts/jsr are cleared below. -const publishJsr = Boolean(pkg.scripts?.release) && pkg.jsr !== false; +// Capture whether the package publishes before pkg.scripts is cleared below. +const published = Boolean(pkg.scripts?.release); + +// Publish to JSR unless the package opts out. Web components opt out because +// JSR forbids the HTMLElementTagNameMap global augmentation they need. +const publishJsr = published && pkg.jsr !== false; function rewritePath(p: string, ext: string): string { return p.replace(/^\.\/src/, ".").replace(/\.ts(x)?$/, `.${ext}`); @@ -133,6 +135,11 @@ if (unresolved.length > 0) { process.exit(1); } +if (published) { + console.log("🔍 Checking API reports..."); + checkReports("."); +} + console.log("📦 Package built successfully in dist/"); // Optionally emit a jsr.json so the package can also publish to JSR (jsr.io). diff --git a/js/flate/api/index.api.md b/js/flate/api/index.api.md new file mode 100644 index 00000000000..e970acc5f6c --- /dev/null +++ b/js/flate/api/index.api.md @@ -0,0 +1,31 @@ +## API Report File for "@moq/flate" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +export class Decoder { + constructor(options?: DecoderOptions); + frame(slice: Uint8Array): Uint8Array; + get maxFrameSize(): number; +} + +export interface DecoderOptions { + maxFrameSize?: number; +} + +export const DEFAULT_LEVEL = 6; + +export const DEFAULT_MAX_FRAME_SIZE: number; + +export class Encoder { + constructor(options?: EncoderOptions); + frame(payload: Uint8Array): Uint8Array; +} + +export interface EncoderOptions { + level?: number; +} + + +``` diff --git a/js/hang/api/catalog.api.md b/js/hang/api/catalog.api.md new file mode 100644 index 00000000000..73d9d90db61 --- /dev/null +++ b/js/hang/api/catalog.api.md @@ -0,0 +1,1024 @@ +## API Report File for "@moq/hang" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type * as Moq from '@moq/net'; +import { Time } from '@moq/net'; +import * as z from '@zod/mini'; +import * as z_2 from 'zod/mini'; + +export type Archive = z.infer; + +export const ARCHIVE_VERSION = 1; + +export const ArchiveSchema: z.ZodMiniObject<{ + track: z.ZodMiniString; + timescale: z.ZodMiniDefault, "u53", "out">>; + durationMax: z.ZodMiniOptional, "u53", "out">>; + replay: z.ZodMiniOptional>>; + store: z.ZodMiniOptional; + version: z.ZodMiniOptional, "u53", "out">>; +}, z.core.$strip>; + +type Audio_2 = z.infer; +export { Audio_2 as Audio } + +export type AudioConfig = z.infer; + +export const AudioConfigSchema: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; +}, z.core.$strip>; + +export const AudioSchema: z.ZodMiniUnion, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; +}, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; +}, z.core.$strip>, z.ZodMiniTransform<{ + renditions: { + [x: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; +}, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; +}>>]>; + +export type Binary = z_2.infer; + +export type BinaryConfig = z_2.infer; + +export const BinaryConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + mime: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$loose>; + +export const BinarySchema: z_2.ZodMiniObject<{ + tracks: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + mime: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$loose>>; +}, z_2.core.$strip>; + +export function checkRenditions(root: Root): Root; + +export function checkResolvable(root: Root, base: Moq.Path.Valid): Root; + +const CLEAR_FRAMES = 3; + +export type Clock = z.infer; + +export const ClockSchema: z.ZodMiniObject<{ + wall: z.core.$ZodBranded, "u53", "out">; + timescale: z.ZodMiniDefault>; +}, z.core.$strip>; + +export type CmafContainer = Extract; + +export type Compression = z_2.infer; + +export const CompressionSchema: z_2.ZodMiniString; + +export function compressionSupported(compression: Compression): compression is KnownCompression; + +export type Container = z.infer; + +export const ContainerSchema: z.ZodMiniDefault; +}, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; +}, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; +}, z.core.$strip>], "kind">, z.ZodMiniPipe; +}, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; +}, { + [x: string]: unknown; + kind: string; +}>>]>>; + +export function containerSupported(container: Container): boolean; + +export const DEFAULT_FORMAT: Format; + +const DEFAULT_INTERVAL: Time.Micro; + +export function detectFormat(name: string): Format | undefined; + +class Detector { + flag(): true | undefined; + observe(sample: Sample): boolean; + get stalled(): boolean; +} + +export class EscapingBroadcast extends Error { + constructor(broadcast: RelativeBroadcast); + readonly broadcast: RelativeBroadcast; +} + +export type Format = (typeof FORMATS)[number]; + +export const FORMATS: readonly ["hang", "msf"]; + +export type Hex = z.infer; + +export const hexSchema: z.ZodMiniString; + +function interval(value: Time.Micro): Time.Micro; + +function intervalFromFps(fps: number | undefined): Time.Micro; + +export type Json = z_2.infer; + +export type JsonConfig = z_2.infer; + +export const JsonConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + schema: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$loose>; + +export const JsonSchema: z_2.ZodMiniObject<{ + tracks: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + schema: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$loose>>; +}, z_2.core.$strip>; + +export type KnownCompression = "deflate"; + +export type KnownMode = "snapshot" | "stream"; + +export const MAX_RENDITIONS = 64; + +export type Mode = z_2.infer; + +export const ModeSchema: z_2.ZodMiniString; + +export function modeSupported(mode: Mode): mode is KnownMode; + +export const MOQ_EPOCH_UNIX_MILLIS = 1577836800000; + +export const nonzeroU53Schema: z.core.$ZodBranded, "u53", "out">; + +export const PRIORITY: { + readonly catalog: 100; + readonly text: 90; + readonly audio: 80; + readonly video: 60; +}; + +export type RelativeBroadcast = string & { + __brand: "Relative"; +}; + +export const RelativeBroadcastSchema: z.ZodMiniType; + +export type Root = z.infer; + +export const RootSchema: z.ZodMiniObject<{ + video: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + display: z.ZodMiniOptional, "u53", "out">; + height: z.core.$ZodBranded, "u53", "out">; + }, z.core.$strip>>; + rotation: z.ZodMiniOptional>; + flip: z.ZodMiniOptional>; + }, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; + }, z.core.$strip>>, z.ZodMiniTransform<{ + renditions: { + [k: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + display: { + width: number & z.$brand<"u53">; + height: number & z.$brand<"u53">; + } | undefined; + rotation: undefined; + flip: undefined; + }, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }[]>>]>>; + audio: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + }, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; + }, z.core.$strip>, z.ZodMiniTransform<{ + renditions: { + [x: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + }, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }>>]>>; + archive: z.ZodMiniCatch; + timescale: z.ZodMiniDefault, "u53", "out">>; + durationMax: z.ZodMiniOptional, "u53", "out">>; + replay: z.ZodMiniOptional>>; + store: z.ZodMiniOptional; + version: z.ZodMiniOptional, "u53", "out">>; + }, z.core.$strip>>>; + clock: z.ZodMiniOptional, "u53", "out">; + timescale: z.ZodMiniDefault>; + }, z.core.$strip>>; + text: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + format: z.ZodMiniString; + role: z.ZodMiniDefault>; + lang: z.ZodMiniOptional>; + label: z.ZodMiniOptional>; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; + json: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + mode: z.ZodMiniString; + compression: z.ZodMiniOptional>; + schema: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$loose>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; + binary: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + mode: z.ZodMiniString; + compression: z.ZodMiniOptional>; + mime: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$loose>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; +}, z.core.$loose>; + +interface Sample { + demand: boolean; + frame: boolean; + idle: boolean; + interval: Time.Micro; + mediaLag: Time.Micro; + quiet: Time.Micro; +} + +const SET_INTERVALS = 3; + +declare namespace Stalled { + export { + interval, + intervalFromFps, + SET_INTERVALS, + CLEAR_FRAMES, + DEFAULT_INTERVAL, + Sample, + Detector + } +} + +type Text_2 = z_2.infer; +export { Text_2 as Text } + +export type TextConfig = z_2.infer; + +export const TextConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + format: z_2.ZodMiniString; + role: z_2.ZodMiniDefault>; + lang: z_2.ZodMiniOptional>; + label: z_2.ZodMiniOptional>; + container: z_2.ZodMiniDefault; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"cmaf">; + init: z_2.ZodMiniBase64; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"loc">; + }, z_2.core.$strip>], "kind">, z_2.ZodMiniPipe; + }, z_2.core.$loose>, z_2.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$strip>; + +export const TextFormatSchema: z_2.ZodMiniString; + +export type TextRole = z_2.infer; + +export const TextRoleSchema: z_2.ZodMiniString; + +export const TextSchema: z_2.ZodMiniObject<{ + renditions: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + format: z_2.ZodMiniString; + role: z_2.ZodMiniDefault>; + lang: z_2.ZodMiniOptional>; + label: z_2.ZodMiniOptional>; + container: z_2.ZodMiniDefault; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"cmaf">; + init: z_2.ZodMiniBase64; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"loc">; + }, z_2.core.$strip>], "kind">, z_2.ZodMiniPipe; + }, z_2.core.$loose>, z_2.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$strip>>; +}, z_2.core.$strip>; + +export class TooManyRenditions extends Error { + constructor(count: number); + readonly count: number; +} + +export const TRACK = "catalog.json"; + +export type Track = z.infer; + +export const TRACK_COMPRESSED = "catalog.json.z"; + +export const TrackSchema: z.ZodMiniObject<{ + name: z.ZodMiniString; +}, z.core.$strip>; + +export type U53 = z.infer; + +export function u53(value: number): U53; + +export const u53Schema: z.core.$ZodBranded, "u53", "out">; + +export type U8 = z.infer; + +export function u8(value: number): U8; + +export const u8Schema: z.core.$ZodBranded, "u8", "out">; + +export const UnknownContainerSchema: z.ZodMiniPipe; +}, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; +}, { + [x: string]: unknown; + kind: string; +}>>; + +export type Video = z.infer; + +export type VideoConfig = z.infer; + +export const VideoConfigSchema: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; +}, z.core.$strip>; + +export const VideoSchema: z.ZodMiniUnion, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + display: z.ZodMiniOptional, "u53", "out">; + height: z.core.$ZodBranded, "u53", "out">; + }, z.core.$strip>>; + rotation: z.ZodMiniOptional>; + flip: z.ZodMiniOptional>; +}, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; +}, z.core.$strip>>, z.ZodMiniTransform<{ + renditions: { + [k: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + display: { + width: number & z.$brand<"u53">; + height: number & z.$brand<"u53">; + } | undefined; + rotation: undefined; + flip: undefined; +}, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; +}[]>>]>; + +export function wallClockTime(clock: Clock, pts: number, ptsTimescale: number): Date; + +export function watch(broadcast: Moq.Broadcast.Consumer): AsyncIterable; + + +``` diff --git a/js/hang/api/container.api.md b/js/hang/api/container.api.md new file mode 100644 index 00000000000..7e9ea65e9f5 --- /dev/null +++ b/js/hang/api/container.api.md @@ -0,0 +1,1256 @@ +## API Report File for "@moq/hang" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Getter } from '@moq/signals'; +import { GetterInit } from '@moq/signals'; +import * as Loc from '@moq/loc'; +import * as Moq from '@moq/net'; +import { Time } from '@moq/net'; +import { Track as Track_2 } from '@moq/net'; +import * as z from '@zod/mini'; +import * as z_2 from 'zod/mini'; + +type Archive = z.infer; + +const ARCHIVE_VERSION = 1; + +const ArchiveSchema: z.ZodMiniObject<{ + track: z.ZodMiniString; + timescale: z.ZodMiniDefault, "u53", "out">>; + durationMax: z.ZodMiniOptional, "u53", "out">>; + replay: z.ZodMiniOptional>>; + store: z.ZodMiniOptional; + version: z.ZodMiniOptional, "u53", "out">>; +}, z.core.$strip>; + +type Audio_2 = z.infer; + +type AudioConfig = z.infer; + +const AudioConfigSchema: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; +}, z.core.$strip>; + +const AudioSchema: z.ZodMiniUnion, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; +}, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; +}, z.core.$strip>, z.ZodMiniTransform<{ + renditions: { + [x: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; +}, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; +}>>]>; + +type Binary = z_2.infer; + +type BinaryConfig = z_2.infer; + +const BinaryConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + mime: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$loose>; + +const BinarySchema: z_2.ZodMiniObject<{ + tracks: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + mime: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$loose>>; +}, z_2.core.$strip>; + +export interface BufferedRange { + end: Time.Milli; + start: Time.Milli; +} + +export type BufferedRanges = BufferedRange[]; + +declare namespace Catalog { + export { + Stalled, + MOQ_EPOCH_UNIX_MILLIS, + ARCHIVE_VERSION, + ArchiveSchema, + Archive, + AudioConfigSchema, + AudioSchema, + Audio_2 as Audio, + AudioConfig, + BinaryConfigSchema, + BinarySchema, + Binary, + BinaryConfig, + wallClockTime, + ClockSchema, + Clock, + compressionSupported, + KnownCompression, + CompressionSchema, + Compression, + containerSupported, + UnknownContainerSchema, + ContainerSchema, + Container, + CmafContainer, + detectFormat, + TRACK, + TRACK_COMPRESSED, + FORMATS, + Format_3 as Format, + DEFAULT_FORMAT, + hexSchema, + Hex, + u8, + u53, + u8Schema, + U8, + u53Schema, + U53, + nonzeroU53Schema, + JsonConfigSchema, + JsonSchema, + Json, + JsonConfig, + modeSupported, + KnownMode, + ModeSchema, + Mode, + RelativeBroadcastSchema, + RelativeBroadcast, + PRIORITY, + checkRenditions, + checkResolvable, + watch, + RootSchema, + Root, + MAX_RENDITIONS, + TooManyRenditions, + EscapingBroadcast, + TextFormatSchema, + TextRoleSchema, + TextConfigSchema, + TextSchema, + Text_2 as Text, + TextConfig, + TextRole, + TrackSchema, + Track, + VideoConfigSchema, + VideoSchema, + Video, + VideoConfig + } +} + +function checkRenditions(root: Root): Root; + +function checkResolvable(root: Root, base: Moq.Path.Valid): Root; + +const CLEAR_FRAMES = 3; + +type Clock = z.infer; + +const ClockSchema: z.ZodMiniObject<{ + wall: z.core.$ZodBranded, "u53", "out">; + timescale: z.ZodMiniDefault>; +}, z.core.$strip>; + +declare namespace Cmaf { + export { + Format_2 as Format, + decodeInitSegment, + decodeTimestamp, + decodeDataSegment, + InitSegment, + Sample, + createVideoInitSegment, + createAudioInitSegment, + encodeDataSegment, + DataSegmentOptions + } +} + +type CmafContainer = Extract; + +type Compression = z_2.infer; + +const CompressionSchema: z_2.ZodMiniString; + +function compressionSupported(compression: Compression): compression is KnownCompression; + +export class Consumer { + constructor(track: Moq.Track.Subscriber, props: ConsumerProps); + readonly buffered: Getter; + close(): void; + get discontinuity(): number; + next(): Promise<{ + frame: Frame | undefined; + group: number; + discontinuity: number; + continuous: boolean; + end?: Time.Micro; + } | undefined>; +} + +export interface ConsumerProps { + format: Format; + maxAge?: GetterInit; +} + +type Container = z.infer; + +const ContainerSchema: z.ZodMiniDefault; +}, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; +}, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; +}, z.core.$strip>], "kind">, z.ZodMiniPipe; +}, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; +}, { + [x: string]: unknown; + kind: string; +}>>]>>; + +function containerSupported(container: Container): boolean; + +function createAudioInitSegment(config: Catalog.AudioConfig): Uint8Array; + +function createVideoInitSegment(config: Catalog.VideoConfig): Uint8Array; + +interface DataSegmentOptions { + data: Uint8Array; + duration: number; + keyframe: boolean; + kind: "audio" | "video"; + sequence: number; + timestamp: number; + trackId?: number; +} + +function decodeDataSegment(segment: Uint8Array, init: InitSegment): Sample[]; + +function decodeInitSegment(init: Uint8Array): InitSegment; + +function decodeTimestamp(segment: Uint8Array, init: InitSegment): Time.Micro; + +const DEFAULT_FORMAT: Format_3; + +const DEFAULT_INTERVAL: Time.Micro; + +function detectFormat(name: string): Format_3 | undefined; + +class Detector { + flag(): true | undefined; + observe(sample: Sample_2): boolean; + get stalled(): boolean; +} + +function encodeDataSegment(opts: DataSegmentOptions): Uint8Array; + +function encodeFrame(source: Uint8Array | Source, timestamp: Time.Micro): Uint8Array; + +class EscapingBroadcast extends Error { + constructor(broadcast: RelativeBroadcast); + readonly broadcast: RelativeBroadcast; +} + +export interface Format { + decode(frame: Uint8Array): Frame[]; + end?(frame: Frame): Time.Micro | undefined; +} + +class Format_2 implements Format { + constructor(init: InitSegment); + decode(frame: Uint8Array): Frame[]; +} + +type Format_3 = (typeof FORMATS)[number]; + +class Format_4 implements Format { + constructor(config: AudioConfig | VideoConfig | "audio" | "video" | "data"); + decode(frame: Uint8Array): Frame[]; + end(frame: Frame): Time.Micro | undefined; + finishGroup(group: Moq.Group.Producer, end?: Time.Micro): void; + readonly kind: "audio" | "video" | "data"; +} + +const FORMATS: readonly ["hang", "msf"]; + +export interface Frame { + duration?: Time.Micro; + keyframe: boolean; + payload: Uint8Array; + timestamp: Time.Micro; +} + +type Hex = z.infer; + +const hexSchema: z.ZodMiniString; + +interface InitSegment { + defaultSampleDuration: number; + defaultSampleFlags: number; + defaultSampleSize: number; + description?: Uint8Array; + kind: "audio" | "video"; + timescale: number; + trackId: number; +} + +function interval(value: Time.Micro): Time.Micro; + +function intervalFromFps(fps: number | undefined): Time.Micro; + +type Json = z_2.infer; + +type JsonConfig = z_2.infer; + +const JsonConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + schema: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$loose>; + +const JsonSchema: z_2.ZodMiniObject<{ + tracks: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + schema: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$loose>>; +}, z_2.core.$strip>; + +type KnownCompression = "deflate"; + +type KnownMode = "snapshot" | "stream"; + +declare namespace Legacy { + export { + encodeFrame, + BufferedRange, + BufferedRanges, + Frame, + Format_4 as Format, + Source, + ProducerProps, + Producer + } +} + +export { Loc } + +const MAX_RENDITIONS = 64; + +export function mergeBufferedRanges(a: BufferedRanges, b: BufferedRanges): BufferedRanges; + +type Mode = z_2.infer; + +const ModeSchema: z_2.ZodMiniString; + +function modeSupported(mode: Mode): mode is KnownMode; + +const MOQ_EPOCH_UNIX_MILLIS = 1577836800000; + +const nonzeroU53Schema: z.core.$ZodBranded, "u53", "out">; + +const PRIORITY: { + readonly catalog: 100; + readonly text: 90; + readonly audio: 80; + readonly video: 60; +}; + +class Producer { + constructor(track: Moq.Track.Producer, format: Format_4, props?: ProducerProps); + close(err?: Error): void; + cut(end?: Time.Micro): void; + encode(data: Uint8Array | Source, timestamp: Time.Micro, keyframe: boolean): void; +} + +interface ProducerProps { + timeline?: Recorder; +} + +class Recorder { + close(): void; + end(pts: Time.Micro): void; + record(sequence: number, pts: Time.Micro, keyframe?: boolean): void; +} + +type RelativeBroadcast = string & { + __brand: "Relative"; +}; + +const RelativeBroadcastSchema: z.ZodMiniType; + +type Root = z.infer; + +const RootSchema: z.ZodMiniObject<{ + video: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + display: z.ZodMiniOptional, "u53", "out">; + height: z.core.$ZodBranded, "u53", "out">; + }, z.core.$strip>>; + rotation: z.ZodMiniOptional>; + flip: z.ZodMiniOptional>; + }, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; + }, z.core.$strip>>, z.ZodMiniTransform<{ + renditions: { + [k: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + display: { + width: number & z.$brand<"u53">; + height: number & z.$brand<"u53">; + } | undefined; + rotation: undefined; + flip: undefined; + }, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }[]>>]>>; + audio: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + }, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; + }, z.core.$strip>, z.ZodMiniTransform<{ + renditions: { + [x: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + }, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }>>]>>; + archive: z.ZodMiniCatch; + timescale: z.ZodMiniDefault, "u53", "out">>; + durationMax: z.ZodMiniOptional, "u53", "out">>; + replay: z.ZodMiniOptional>>; + store: z.ZodMiniOptional; + version: z.ZodMiniOptional, "u53", "out">>; + }, z.core.$strip>>>; + clock: z.ZodMiniOptional, "u53", "out">; + timescale: z.ZodMiniDefault>; + }, z.core.$strip>>; + text: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + format: z.ZodMiniString; + role: z.ZodMiniDefault>; + lang: z.ZodMiniOptional>; + label: z.ZodMiniOptional>; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; + json: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + mode: z.ZodMiniString; + compression: z.ZodMiniOptional>; + schema: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$loose>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; + binary: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + mode: z.ZodMiniString; + compression: z.ZodMiniOptional>; + mime: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$loose>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; +}, z.core.$loose>; + +interface Sample { + data: Uint8Array; + duration: number; + keyframe: boolean; + timestamp: number; +} + +interface Sample_2 { + demand: boolean; + frame: boolean; + idle: boolean; + interval: Time.Micro; + mediaLag: Time.Micro; + quiet: Time.Micro; +} + +const SET_INTERVALS = 3; + +interface Source { + byteLength: number; + copyTo(buffer: Uint8Array): void; +} + +declare namespace Stalled { + export { + interval, + intervalFromFps, + SET_INTERVALS, + CLEAR_FRAMES, + DEFAULT_INTERVAL, + Sample_2 as Sample, + Detector + } +} + +type Text_2 = z_2.infer; + +type TextConfig = z_2.infer; + +const TextConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + format: z_2.ZodMiniString; + role: z_2.ZodMiniDefault>; + lang: z_2.ZodMiniOptional>; + label: z_2.ZodMiniOptional>; + container: z_2.ZodMiniDefault; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"cmaf">; + init: z_2.ZodMiniBase64; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"loc">; + }, z_2.core.$strip>], "kind">, z_2.ZodMiniPipe; + }, z_2.core.$loose>, z_2.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$strip>; + +const TextFormatSchema: z_2.ZodMiniString; + +type TextRole = z_2.infer; + +const TextRoleSchema: z_2.ZodMiniString; + +const TextSchema: z_2.ZodMiniObject<{ + renditions: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + format: z_2.ZodMiniString; + role: z_2.ZodMiniDefault>; + lang: z_2.ZodMiniOptional>; + label: z_2.ZodMiniOptional>; + container: z_2.ZodMiniDefault; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"cmaf">; + init: z_2.ZodMiniBase64; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"loc">; + }, z_2.core.$strip>], "kind">, z_2.ZodMiniPipe; + }, z_2.core.$loose>, z_2.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$strip>>; +}, z_2.core.$strip>; + +class TooManyRenditions extends Error { + constructor(count: number); + readonly count: number; +} + +const TRACK = "catalog.json"; + +type Track = z.infer; + +const TRACK_COMPRESSED = "catalog.json.z"; + +export function trackInfo(options: TrackInfoOptions): Partial; + +export type TrackInfoOptions = { + priority: number; + maxAge?: Time.Milli; +}; + +const TrackSchema: z.ZodMiniObject<{ + name: z.ZodMiniString; +}, z.core.$strip>; + +type U53 = z.infer; + +function u53(value: number): U53; + +const u53Schema: z.core.$ZodBranded, "u53", "out">; + +type U8 = z.infer; + +function u8(value: number): U8; + +const u8Schema: z.core.$ZodBranded, "u8", "out">; + +const UnknownContainerSchema: z.ZodMiniPipe; +}, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; +}, { + [x: string]: unknown; + kind: string; +}>>; + +type Video = z.infer; + +type VideoConfig = z.infer; + +const VideoConfigSchema: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; +}, z.core.$strip>; + +const VideoSchema: z.ZodMiniUnion, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + display: z.ZodMiniOptional, "u53", "out">; + height: z.core.$ZodBranded, "u53", "out">; + }, z.core.$strip>>; + rotation: z.ZodMiniOptional>; + flip: z.ZodMiniOptional>; +}, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; +}, z.core.$strip>>, z.ZodMiniTransform<{ + renditions: { + [k: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + display: { + width: number & z.$brand<"u53">; + height: number & z.$brand<"u53">; + } | undefined; + rotation: undefined; + flip: undefined; +}, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; +}[]>>]>; + +function wallClockTime(clock: Clock, pts: number, ptsTimescale: number): Date; + +function watch(broadcast: Moq.Broadcast.Consumer): AsyncIterable; + + +``` diff --git a/js/hang/api/index.api.md b/js/hang/api/index.api.md new file mode 100644 index 00000000000..5993b1b1989 --- /dev/null +++ b/js/hang/api/index.api.md @@ -0,0 +1,1429 @@ +## API Report File for "@moq/hang" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Getter } from '@moq/signals'; +import { GetterInit } from '@moq/signals'; +import * as Json_2 from '@moq/json'; +import * as Loc from '@moq/loc'; +import * as Net from '@moq/net'; +import * as Signals from '@moq/signals'; +import { Time } from '@moq/net'; +import { Track as Track_2 } from '@moq/net'; +import * as z from '@zod/mini'; +import * as z_2 from 'zod/mini'; + +type Archive = z.infer; + +const ARCHIVE_VERSION = 1; + +const ArchiveSchema: z.ZodMiniObject<{ + track: z.ZodMiniString; + timescale: z.ZodMiniDefault, "u53", "out">>; + durationMax: z.ZodMiniOptional, "u53", "out">>; + replay: z.ZodMiniOptional>>; + store: z.ZodMiniOptional; + version: z.ZodMiniOptional, "u53", "out">>; +}, z.core.$strip>; + +type Audio_2 = z.infer; + +type AudioConfig = z.infer; + +const AudioConfigSchema: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; +}, z.core.$strip>; + +const AudioSchema: z.ZodMiniUnion, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; +}, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; +}, z.core.$strip>, z.ZodMiniTransform<{ + renditions: { + [x: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; +}, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; +}>>]>; + +type Binary = z_2.infer; + +type BinaryConfig = z_2.infer; + +const BinaryConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + mime: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$loose>; + +const BinarySchema: z_2.ZodMiniObject<{ + tracks: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + mime: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$loose>>; +}, z_2.core.$strip>; + +interface BufferedRange { + end: Time.Milli; + start: Time.Milli; +} + +type BufferedRanges = BufferedRange[]; + +declare namespace Catalog { + export { + Stalled, + MOQ_EPOCH_UNIX_MILLIS, + ARCHIVE_VERSION, + ArchiveSchema, + Archive, + AudioConfigSchema, + AudioSchema, + Audio_2 as Audio, + AudioConfig, + BinaryConfigSchema, + BinarySchema, + Binary, + BinaryConfig, + wallClockTime, + ClockSchema, + Clock, + compressionSupported, + KnownCompression, + CompressionSchema, + Compression, + containerSupported, + UnknownContainerSchema, + ContainerSchema, + Container_2 as Container, + CmafContainer, + detectFormat, + TRACK, + TRACK_COMPRESSED, + FORMATS, + Format, + DEFAULT_FORMAT, + hexSchema, + Hex, + u8, + u53, + u8Schema, + U8, + u53Schema, + U53, + nonzeroU53Schema, + JsonConfigSchema, + JsonSchema, + Json, + JsonConfig, + modeSupported, + KnownMode, + ModeSchema, + Mode, + RelativeBroadcastSchema, + RelativeBroadcast, + PRIORITY, + checkRenditions, + checkResolvable, + watch, + RootSchema, + Root, + MAX_RENDITIONS, + TooManyRenditions, + EscapingBroadcast, + TextFormatSchema, + TextRoleSchema, + TextConfigSchema, + TextSchema, + Text_2 as Text, + TextConfig, + TextRole, + TrackSchema, + Track, + VideoConfigSchema, + VideoSchema, + Video, + VideoConfig + } +} + +declare namespace Catalog_2 { + export { + Stalled, + MOQ_EPOCH_UNIX_MILLIS, + ARCHIVE_VERSION, + ArchiveSchema, + Archive, + AudioConfigSchema, + AudioSchema, + Audio_2 as Audio, + AudioConfig, + BinaryConfigSchema, + BinarySchema, + Binary, + BinaryConfig, + wallClockTime, + ClockSchema, + Clock, + compressionSupported, + KnownCompression, + CompressionSchema, + Compression, + containerSupported, + UnknownContainerSchema, + ContainerSchema, + Container_2 as Container, + CmafContainer, + detectFormat, + TRACK, + TRACK_COMPRESSED, + FORMATS, + Format, + DEFAULT_FORMAT, + hexSchema, + Hex, + u8, + u53, + u8Schema, + U8, + u53Schema, + U53, + nonzeroU53Schema, + JsonConfigSchema, + JsonSchema, + Json, + JsonConfig, + modeSupported, + KnownMode, + ModeSchema, + Mode, + RelativeBroadcastSchema, + RelativeBroadcast, + PRIORITY, + checkRenditions, + checkResolvable, + watch, + RootSchema, + Root, + MAX_RENDITIONS, + TooManyRenditions, + EscapingBroadcast, + TextFormatSchema, + TextRoleSchema, + TextConfigSchema, + TextSchema, + Text_2 as Text, + TextConfig, + TextRole, + TrackSchema, + Track, + VideoConfigSchema, + VideoSchema, + Video, + VideoConfig + } +} + +function checkRenditions(root: Root): Root; + +function checkResolvable(root: Root, base: Net.Path.Valid): Root; + +const CLEAR_FRAMES = 3; + +type Clock = z.infer; + +const ClockSchema: z.ZodMiniObject<{ + wall: z.core.$ZodBranded, "u53", "out">; + timescale: z.ZodMiniDefault>; +}, z.core.$strip>; + +declare namespace Cmaf { + export { + Format_2 as Format, + decodeInitSegment, + decodeTimestamp, + decodeDataSegment, + InitSegment, + Sample_2 as Sample, + createVideoInitSegment, + createAudioInitSegment, + encodeDataSegment, + DataSegmentOptions + } +} + +type CmafContainer = Extract; + +type Compression = z_2.infer; + +const CompressionSchema: z_2.ZodMiniString; + +function compressionSupported(compression: Compression): compression is KnownCompression; + +class Consumer { + constructor(track: Net.Track.Subscriber, props: ConsumerProps); + readonly buffered: Getter; + close(): void; + get discontinuity(): number; + next(): Promise<{ + frame: Frame | undefined; + group: number; + discontinuity: number; + continuous: boolean; + end?: Time.Micro; + } | undefined>; +} + +class Consumer_2 implements AsyncIterable { + [Symbol.asyncIterator](): AsyncIterator; + close(): void; + next(): Promise; + static subscribe(broadcast: Net.Broadcast.Consumer, archive: Catalog_2.Archive): Consumer_2; +} + +interface ConsumerProps { + format: Format_3; + maxAge?: GetterInit; +} + +declare namespace Container { + export { + Loc, + Cmaf, + Consumer, + ConsumerProps, + Format_3 as Format, + Legacy, + TrackInfoOptions, + trackInfo, + mergeBufferedRanges, + Frame, + BufferedRange, + BufferedRanges + } +} + +type Container_2 = z.infer; + +const ContainerSchema: z.ZodMiniDefault; +}, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; +}, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; +}, z.core.$strip>], "kind">, z.ZodMiniPipe; +}, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; +}, { + [x: string]: unknown; + kind: string; +}>>]>>; + +function containerSupported(container: Container_2): boolean; + +function createAudioInitSegment(config: Catalog_2.AudioConfig): Uint8Array; + +function createVideoInitSegment(config: Catalog_2.VideoConfig): Uint8Array; + +interface DataSegmentOptions { + data: Uint8Array; + duration: number; + keyframe: boolean; + kind: "audio" | "video"; + sequence: number; + timestamp: number; + trackId?: number; +} + +function decodeDataSegment(segment: Uint8Array, init: InitSegment): Sample_2[]; + +function decodeInitSegment(init: Uint8Array): InitSegment; + +function decodeTimestamp(segment: Uint8Array, init: InitSegment): Time.Micro; + +const DEFAULT_DURATION_MIN_MS: Time.Milli; + +const DEFAULT_FORMAT: Format; + +const DEFAULT_INTERVAL: Time.Micro; + +const DEFAULT_NAME = "timeline.z"; + +const DEFAULT_TIMESCALE = 1000; + +function detectFormat(name: string): Format | undefined; + +class Detector { + flag(): true | undefined; + observe(sample: Sample): boolean; + get stalled(): boolean; +} + +function encodeDataSegment(opts: DataSegmentOptions): Uint8Array; + +function encodeFrame(source: Uint8Array | Source, timestamp: Time.Micro): Uint8Array; + +type Entry = Omit & { + pts: Time.Micro; + duration: Time.Micro; +}; + +class EscapingBroadcast extends Error { + constructor(broadcast: RelativeBroadcast); + readonly broadcast: RelativeBroadcast; +} + +type Event_2 = { + push: { + index: number; + entry: Entry; + }; +} | { + pop: Json_2.Window.Span; +} | { + skip: Json_2.Window.Span; +}; + +type Format = (typeof FORMATS)[number]; + +class Format_2 implements Format_3 { + constructor(init: InitSegment); + decode(frame: Uint8Array): Frame[]; +} + +interface Format_3 { + decode(frame: Uint8Array): Frame[]; + end?(frame: Frame): Time.Micro | undefined; +} + +class Format_4 implements Format_3 { + constructor(config: AudioConfig | VideoConfig | "audio" | "video" | "data"); + decode(frame: Uint8Array): Frame[]; + end(frame: Frame): Time.Micro | undefined; + finishGroup(group: Net.Group.Producer, end?: Time.Micro): void; + readonly kind: "audio" | "video" | "data"; +} + +const FORMATS: readonly ["hang", "msf"]; + +interface Frame { + duration?: Time.Micro; + keyframe: boolean; + payload: Uint8Array; + timestamp: Time.Micro; +} + +type Hex = z.infer; + +const hexSchema: z.ZodMiniString; + +interface InitSegment { + defaultSampleDuration: number; + defaultSampleFlags: number; + defaultSampleSize: number; + description?: Uint8Array; + kind: "audio" | "video"; + timescale: number; + trackId: number; +} + +function interval(value: Time.Micro): Time.Micro; + +function intervalFromFps(fps: number | undefined): Time.Micro; + +type Json = z_2.infer; + +type JsonConfig = z_2.infer; + +const JsonConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + schema: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$loose>; + +const JsonSchema: z_2.ZodMiniObject<{ + tracks: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + mode: z_2.ZodMiniString; + compression: z_2.ZodMiniOptional>; + schema: z_2.ZodMiniOptional>; + bitrate: z_2.ZodMiniOptional, "u53", "out">>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$loose>>; +}, z_2.core.$strip>; + +type KnownCompression = "deflate"; + +type KnownMode = "snapshot" | "stream"; + +declare namespace Legacy { + export { + encodeFrame, + BufferedRange, + BufferedRanges, + Frame, + Format_4 as Format, + Source, + ProducerProps, + Producer + } +} + +const MAX_RENDITIONS = 64; + +function mergeBufferedRanges(a: BufferedRanges, b: BufferedRanges): BufferedRanges; + +type Mode = z_2.infer; + +const ModeSchema: z_2.ZodMiniString; + +function modeSupported(mode: Mode): mode is KnownMode; + +const MOQ_EPOCH_UNIX_MILLIS = 1577836800000; + +export { Net } + +const nonzeroU53Schema: z.core.$ZodBranded, "u53", "out">; + +const PRIORITY: { + readonly catalog: 100; + readonly text: 90; + readonly audio: 80; + readonly video: 60; +}; + +class Producer { + constructor(track: Net.Track.Producer, format: Format_4, props?: ProducerProps); + close(err?: Error): void; + cut(end?: Time.Micro): void; + encode(data: Uint8Array | Source, timestamp: Time.Micro, keyframe: boolean): void; +} + +class Producer_2 { + constructor(track: Net.Track.Producer, props?: ProducerProps_2); + cut(pts: Time.Micro): void; + finish(): void; + pacingTrack(name: string): Recorder; + reserve(): () => void; + section(): Catalog_2.Archive; + track(name: string): Recorder; +} + +interface ProducerProps { + timeline?: Recorder; +} + +interface ProducerProps_2 { + durationMax?: Time.Milli; + durationMin?: Time.Milli; +} + +interface Range_2 { + end: number; + keyframe?: boolean; + start: number; +} + +interface Record_2 { + duration: number; + pts: number; + segment: number; + tracks?: { + [track: string]: Range_2[]; + }; +} + +class Recorder { + close(): void; + end(pts: Time.Micro): void; + record(sequence: number, pts: Time.Micro, keyframe?: boolean): void; +} + +type RelativeBroadcast = string & { + __brand: "Relative"; +}; + +const RelativeBroadcastSchema: z.ZodMiniType; + +type Root = z.infer; + +const RootSchema: z.ZodMiniObject<{ + video: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + display: z.ZodMiniOptional, "u53", "out">; + height: z.core.$ZodBranded, "u53", "out">; + }, z.core.$strip>>; + rotation: z.ZodMiniOptional>; + flip: z.ZodMiniOptional>; + }, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; + }, z.core.$strip>>, z.ZodMiniTransform<{ + renditions: { + [k: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + display: { + width: number & z.$brand<"u53">; + height: number & z.$brand<"u53">; + } | undefined; + rotation: undefined; + flip: undefined; + }, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }[]>>]>>; + audio: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + }, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + sampleRate: z.core.$ZodBranded, "u53", "out">; + numberOfChannels: z.core.$ZodBranded, "u53", "out">; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; + }, z.core.$strip>, z.ZodMiniTransform<{ + renditions: { + [x: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + }, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + sampleRate: number & z.$brand<"u53">; + numberOfChannels: number & z.$brand<"u53">; + bitrate?: (number & z.$brand<"u53">) | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }>>]>>; + archive: z.ZodMiniCatch; + timescale: z.ZodMiniDefault, "u53", "out">>; + durationMax: z.ZodMiniOptional, "u53", "out">>; + replay: z.ZodMiniOptional>>; + store: z.ZodMiniOptional; + version: z.ZodMiniOptional, "u53", "out">>; + }, z.core.$strip>>>; + clock: z.ZodMiniOptional, "u53", "out">; + timescale: z.ZodMiniDefault>; + }, z.core.$strip>>; + text: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + format: z.ZodMiniString; + role: z.ZodMiniDefault>; + lang: z.ZodMiniOptional>; + label: z.ZodMiniOptional>; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; + json: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + mode: z.ZodMiniString; + compression: z.ZodMiniOptional>; + schema: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$loose>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; + binary: z.ZodMiniOptional, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + mode: z.ZodMiniString; + compression: z.ZodMiniOptional>; + mime: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$loose>>; + }, z.core.$strip>, z.ZodMiniPipe, z.ZodMiniTransform>]>>; +}, z.core.$loose>; + +interface Sample { + demand: boolean; + frame: boolean; + idle: boolean; + interval: Time.Micro; + mediaLag: Time.Micro; + quiet: Time.Micro; +} + +interface Sample_2 { + data: Uint8Array; + duration: number; + keyframe: boolean; + timestamp: number; +} + +const SET_INTERVALS = 3; + +export { Signals } + +interface Source { + byteLength: number; + copyTo(buffer: Uint8Array): void; +} + +declare namespace Stalled { + export { + interval, + intervalFromFps, + SET_INTERVALS, + CLEAR_FRAMES, + DEFAULT_INTERVAL, + Sample, + Detector + } +} + +type Text_2 = z_2.infer; + +type TextConfig = z_2.infer; + +const TextConfigSchema: z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + format: z_2.ZodMiniString; + role: z_2.ZodMiniDefault>; + lang: z_2.ZodMiniOptional>; + label: z_2.ZodMiniOptional>; + container: z_2.ZodMiniDefault; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"cmaf">; + init: z_2.ZodMiniBase64; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"loc">; + }, z_2.core.$strip>], "kind">, z_2.ZodMiniPipe; + }, z_2.core.$loose>, z_2.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; +}, z_2.core.$strip>; + +const TextFormatSchema: z_2.ZodMiniString; + +type TextRole = z_2.infer; + +const TextRoleSchema: z_2.ZodMiniString; + +const TextSchema: z_2.ZodMiniObject<{ + renditions: z_2.ZodMiniRecord, z_2.ZodMiniObject<{ + broadcast: z_2.ZodMiniOptional>>; + format: z_2.ZodMiniString; + role: z_2.ZodMiniDefault>; + lang: z_2.ZodMiniOptional>; + label: z_2.ZodMiniOptional>; + container: z_2.ZodMiniDefault; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"cmaf">; + init: z_2.ZodMiniBase64; + }, z_2.core.$strip>, z_2.ZodMiniObject<{ + kind: z_2.ZodMiniLiteral<"loc">; + }, z_2.core.$strip>], "kind">, z_2.ZodMiniPipe; + }, z_2.core.$loose>, z_2.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + jitter: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + delay: z_2.ZodMiniOptional, "u53", "out">, z_2.ZodMiniTransform<(number & z_2.$brand<"u53">) | undefined, number & z_2.$brand<"u53">>>>; + }, z_2.core.$strip>>; +}, z_2.core.$strip>; + +declare namespace Timeline { + export { + Range_2 as Range, + Record_2 as Record, + DEFAULT_TIMESCALE, + DEFAULT_DURATION_MIN_MS, + DEFAULT_NAME, + Entry, + Event_2 as Event, + Consumer_2 as Consumer, + ProducerProps_2 as ProducerProps, + Producer_2 as Producer, + Recorder + } +} + +class TooManyRenditions extends Error { + constructor(count: number); + readonly count: number; +} + +const TRACK = "catalog.json"; + +type Track = z.infer; + +const TRACK_COMPRESSED = "catalog.json.z"; + +function trackInfo(options: TrackInfoOptions): Partial; + +type TrackInfoOptions = { + priority: number; + maxAge?: Time.Milli; +}; + +const TrackSchema: z.ZodMiniObject<{ + name: z.ZodMiniString; +}, z.core.$strip>; + +type U53 = z.infer; + +function u53(value: number): U53; + +const u53Schema: z.core.$ZodBranded, "u53", "out">; + +type U8 = z.infer; + +function u8(value: number): U8; + +const u8Schema: z.core.$ZodBranded, "u8", "out">; + +const UnknownContainerSchema: z.ZodMiniPipe; +}, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; +}, { + [x: string]: unknown; + kind: string; +}>>; + +type Video = z.infer; + +type VideoConfig = z.infer; + +const VideoConfigSchema: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; +}, z.core.$strip>; + +const VideoSchema: z.ZodMiniUnion, z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>>; + display: z.ZodMiniOptional, "u53", "out">; + height: z.core.$ZodBranded, "u53", "out">; + }, z.core.$strip>>; + rotation: z.ZodMiniOptional>; + flip: z.ZodMiniOptional>; +}, z.core.$strip>, z.ZodMiniPipe; + }, z.core.$strip>; + config: z.ZodMiniObject<{ + broadcast: z.ZodMiniOptional>>; + label: z.ZodMiniOptional>; + codec: z.ZodMiniString; + container: z.ZodMiniDefault; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"cmaf">; + init: z.ZodMiniBase64; + }, z.core.$strip>, z.ZodMiniObject<{ + kind: z.ZodMiniLiteral<"loc">; + }, z.core.$strip>], "kind">, z.ZodMiniPipe; + }, z.core.$loose>, z.ZodMiniTransform<{ + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }, { + [x: string]: unknown; + kind: string; + }>>]>>; + description: z.ZodMiniOptional>; + codedWidth: z.ZodMiniOptional, "u53", "out">>; + codedHeight: z.ZodMiniOptional, "u53", "out">>; + displayAspectWidth: z.ZodMiniOptional, "u53", "out">>; + displayAspectHeight: z.ZodMiniOptional, "u53", "out">>; + framerate: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional, "u53", "out">>; + stalled: z.ZodMiniOptional>; + optimizeForLatency: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + delay: z.ZodMiniOptional, "u53", "out">, z.ZodMiniTransform<(number & z.$brand<"u53">) | undefined, number & z.$brand<"u53">>>>; + }, z.core.$strip>; +}, z.core.$strip>>, z.ZodMiniTransform<{ + renditions: { + [k: string]: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; + }; + display: { + width: number & z.$brand<"u53">; + height: number & z.$brand<"u53">; + } | undefined; + rotation: undefined; + flip: undefined; +}, { + track: { + name: string; + }; + config: { + broadcast?: RelativeBroadcast | undefined; + label?: string | undefined; + codec: string; + container: { + kind: "legacy"; + } | { + kind: "cmaf"; + init: string; + } | { + kind: "loc"; + } | { + kind: "unknown"; + raw: { + [x: string]: unknown; + kind: string; + }; + }; + description?: string | undefined; + codedWidth?: (number & z.$brand<"u53">) | undefined; + codedHeight?: (number & z.$brand<"u53">) | undefined; + displayAspectWidth?: (number & z.$brand<"u53">) | undefined; + displayAspectHeight?: (number & z.$brand<"u53">) | undefined; + framerate?: number | undefined; + bitrate?: (number & z.$brand<"u53">) | undefined; + stalled?: boolean | undefined; + optimizeForLatency?: boolean | undefined; + jitter?: (number & z.$brand<"u53">) | undefined; + delay?: (number & z.$brand<"u53">) | undefined; + }; +}[]>>]>; + +function wallClockTime(clock: Clock, pts: number, ptsTimescale: number): Date; + +function watch(broadcast: Net.Broadcast.Consumer): AsyncIterable; + + +``` diff --git a/js/hang/api/util.api.md b/js/hang/api/util.api.md new file mode 100644 index 00000000000..06e5930e66c --- /dev/null +++ b/js/hang/api/util.api.md @@ -0,0 +1,92 @@ +## API Report File for "@moq/hang" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Effect } from '@moq/signals'; +import { Getter } from '@moq/signals'; + +declare namespace Aac { + export { + supportsRate, + pickRate, + audioSpecificConfig, + SAMPLE_RATES + } +} + +function audioSpecificConfig(sampleRate: number, channelCount: number): Uint8Array; + +const DEFAULT_SAMPLE_RATE = 48000; + +function fromBytes(bytes: Uint8Array): string; + +declare namespace Gesture { + export { + unlock + } +} + +declare namespace Hacks { + export { + isChrome, + isFirefox, + isSafari + } +} + +declare namespace Hex { + export { + toBytes, + fromBytes + } +} + +const isChrome: boolean; + +const isFirefox: boolean; + +const isSafari: boolean; + +declare namespace Libav { + export { + polyfill + } +} + +declare namespace Opus { + export { + supportsRate_2 as supportsRate, + pickRate_2 as pickRate, + preSkip, + toDOps, + DEFAULT_SAMPLE_RATE, + SAMPLE_RATES_2 as SAMPLE_RATES + } +} + +function pickRate(rate: number): number; + +function pickRate_2(rate: number): number; + +function polyfill(): Promise; + +function preSkip(description: Uint8Array): number; + +const SAMPLE_RATES: readonly number[]; + +const SAMPLE_RATES_2: readonly number[]; + +function supportsRate(rate: number): boolean; + +function supportsRate_2(rate: number): boolean; + +function toBytes(hex: string): Uint8Array; + +function toDOps(description: Uint8Array): Uint8Array; + +function unlock(effect: Effect, context: AudioContext): Getter; + + +``` diff --git a/js/json/api/index.api.md b/js/json/api/index.api.md new file mode 100644 index 00000000000..e6b5a3b36f8 --- /dev/null +++ b/js/json/api/index.api.md @@ -0,0 +1,262 @@ +## API Report File for "@moq/json" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as Moq from '@moq/net'; +import { Time } from '@moq/net'; +import type * as z from '@zod/mini'; + +export type Compression = "none" | "deflate"; + +interface Config { + compression?: Compression; + deltaRatio?: number; + initial?: T; + schema?: z.ZodMiniType; +} + +interface Config_2 { + compression?: Compression; + schema?: z.ZodMiniType; +} + +interface Config_3 { + checkpointRecords?: number; + compression?: boolean; + opRatio?: number; +} + +class Consumer { + [Symbol.asyncIterator](): AsyncIterator; + constructor(config: Consumer.Config); + next(): Promise; +} + +namespace Consumer { + type Config = Pick, "schema" | "compression"> & { + track: Moq.Track.Subscriber; + }; +} + +class Consumer_2 { + [Symbol.asyncIterator](): AsyncIterator; + constructor(config: Consumer_2.Config); + next(): Promise; +} + +namespace Consumer_2 { + type Config = Config_2 & { + track: Moq.Track.Subscriber; + }; +} + +class Consumer_3 { + [Symbol.asyncIterator](): AsyncIterator>; + constructor(config: ConsumerConfig); + next(): Promise | undefined>; + get offset(): number; +} + +type ConsumerConfig = ConsumerConfig_2 & { + track: Moq.Track.Subscriber; +}; + +interface ConsumerConfig_2 { + compression?: boolean; +} + +class Decoder { + constructor(config?: Pick, "schema" | "compression">); + decode(): T | undefined; + delta(payload: Uint8Array): void; + snapshot(payload: Uint8Array): void; + get value(): unknown; +} + +class Decoder_2 { + constructor(config?: Config_2); + decode(payload: Uint8Array): T; + reset(): void; +} + +class Decoder_3 { + constructor(config?: ConsumerConfig_2); + group(): Group; + next(): Event_2 | undefined; + get offset(): number; +} + +export function deepEqual(a: unknown, b: unknown): boolean; + +export class Desync extends Error { + constructor(); +} + +export interface Diff { + forcedSnapshot: boolean; + patch: unknown; +} + +export function diff(oldVal: unknown, newVal: unknown): Diff; + +interface Encoded { + keyframe: boolean; + payload: Uint8Array; +} + +interface Encoded_2 { + keyframe: boolean; + payload: Uint8Array; +} + +class Encoder { + constructor(config?: Config); + reset(): void; + update(value: T): Pending | undefined; + get value(): T | undefined; +} + +class Encoder_2 { + constructor(config?: Config_2); + encode(value: T): Pending_2; + reset(): void; +} + +class Encoder_3 { + constructor(config?: Config_3); + get end(): number; + get offset(): number; + pop(count: number): Pending_3 | undefined; + push(value: T): Pending_3; + get window(): T[]; +} + +type Event_2 = { + push: { + index: number; + value: T; + }; +} | { + pop: Span; +} | { + skip: Span; +}; + +interface Group { + decode(payload: Uint8Array): void; +} + +export function merge(target: unknown, patch: unknown): unknown; + +export class MissingSnapshot extends Error { + constructor(); +} + +interface Pending extends Encoded { + commit(): void; +} + +interface Pending_2 { + commit(): void; + payload: Uint8Array; +} + +interface Pending_3 extends Encoded_2 { + commit(): void; +} + +class Producer { + constructor(config: Producer.Config); + cut(): void; + finish(): void; + mutate(fn: (value: T) => void): void; + update(value: T, at?: Time.Timestamp): void; +} + +namespace Producer { + type Config = Config & { + track: Moq.Track.Producer; + }; +} + +class Producer_2 { + constructor(config: Producer_2.Config); + append(value: T, at?: Time.Timestamp): void; + finish(): void; +} + +namespace Producer_2 { + type Config = Config_2 & { + track: Moq.Track.Producer; + }; +} + +class Producer_3 { + constructor(config: ProducerConfig); + finish(): void; + get offset(): number; + pop(count: number): void; + push(value: T): void; + get window(): T[]; +} + +type ProducerConfig = Config_3 & { + track: Moq.Track.Producer; +}; + +class Rolled extends Error { + constructor(); +} + +declare namespace Snapshot { + export { + MissingSnapshot, + Consumer, + Decoder, + Config, + Encoded, + Encoder, + Pending, + Producer + } +} + +interface Span { + end: number; + start: number; +} + +declare namespace Stream { + export { + Desync, + Consumer_2 as Consumer, + Rolled, + Decoder_2 as Decoder, + Config_2 as Config, + Encoder_2 as Encoder, + Pending_2 as Pending, + Producer_2 as Producer + } +} + +declare namespace Window_2 { + export { + Consumer_3 as Consumer, + ConsumerConfig, + Decoder_3 as Decoder, + Event_2 as Event, + Group, + Span, + Config_3 as Config, + Encoded_2 as Encoded, + Encoder_3 as Encoder, + Pending_3 as Pending, + Producer_3 as Producer, + ProducerConfig + } +} + + +``` diff --git a/js/justfile b/js/justfile index 63d4a2e1a89..1fff9d23f2a 100644 --- a/js/justfile +++ b/js/justfile @@ -32,10 +32,11 @@ check: workers: ../sh/js/workers.sh -# Auto-fix lint and formatting issues. +# Auto-fix lint and formatting issues, then regenerate the committed API reports. fix: bun install bun biome check --write + MOQ_API_REPORT=update just build # Run all unit tests. test: diff --git a/js/loc/api/index.api.md b/js/loc/api/index.api.md new file mode 100644 index 00000000000..4b1658ef991 --- /dev/null +++ b/js/loc/api/index.api.md @@ -0,0 +1,35 @@ +## API Report File for "@moq/loc" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as Moq from '@moq/net'; +import { Time } from '@moq/net'; + +export class Format { + constructor(kind?: "audio" | "video" | "data"); + decode(frame: Uint8Array): Frame[]; + end(frame: Frame): Time.Micro | undefined; + readonly kind: "audio" | "video" | "data"; +} + +export interface Frame { + keyframe: boolean; + payload: Uint8Array; + timestamp: Time.Micro; +} + +export class Producer { + constructor(track: Moq.Track.Producer); + close(err?: Error): void; + encode(data: Uint8Array | Source, timestamp: Time.Micro, keyframe: boolean): void; +} + +export interface Source { + byteLength: number; + copyTo(buffer: Uint8Array): void; +} + + +``` diff --git a/js/moq-boy/api/element.api.md b/js/moq-boy/api/element.api.md new file mode 100644 index 00000000000..bba24fd091e --- /dev/null +++ b/js/moq-boy/api/element.api.md @@ -0,0 +1,84 @@ +## API Report File for "@moq/boy" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as Moq from '@moq/net'; +import * as Watch from '@moq/watch'; + +class Game { + constructor(config: GameConfig); + readonly active: Moq.Signals.Signal; + readonly audioDecoder: Watch.Audio.Decoder; + readonly audioEmitter: Watch.Audio.Emitter; + readonly audioSource: Watch.Audio.Source; + readonly broadcast: Watch.Broadcast; + readonly canvas: Moq.Signals.Signal; + close(): void; + readonly delay: Moq.Signals.Signal; + readonly expanded: Moq.Signals.Signal; + readonly heldButtons: Set; + readonly hovered: Moq.Signals.Signal; + sendButtons(): void; + sendCommand(cmd: Record): void; + readonly sessionId: string; + readonly status: Moq.Signals.Signal<{ + buttons: string[]; + latency: Record; + location?: string | undefined; + stats?: { + video_secs: number; + audio_secs: number; + emulation_secs: number; + wall_secs: number; + } | undefined; + } | undefined>; + readonly sync: Watch.Sync; + readonly userMuted: Moq.Signals.Signal; + readonly videoDecoder: Watch.Video.Decoder; + readonly videoRenderer: Watch.Video.Renderer; + readonly videoSource: Watch.Video.Source; + readonly viewerId: Moq.Signals.Signal; + readonly volume: Moq.Signals.Signal; +} + +interface GameConfig { + connection: Moq.Connection; + expanded: Moq.Signals.Signal; + gamePrefix: string; + origin: Moq.Origin.Producer; + sessionId: string; + viewerPrefix: string; +} + +class MoqBoy extends HTMLElement { + constructor(); + attributeChangedCallback(name: Observed, _oldValue: string | null, newValue: string | null): void; + connectedCallback(): void; + readonly connection: Moq.Connection; + disconnectedCallback(): void; + readonly expanded: Moq.Signals.Signal; + readonly games: Moq.Signals.Signal>; + static observedAttributes: readonly ["url", "prefix", "prefix-game", "prefix-viewer"]; + readonly origin: Moq.Origin.Producer; + get prefixGame(): string; + set prefixGame(value: string); + get prefixPath(): string; + set prefixPath(value: string); + get prefixViewer(): string; + set prefixViewer(value: string); + get url(): URL | undefined; + set url(value: string | URL | undefined); +} +export default MoqBoy; + +const OBSERVED: readonly ["url", "prefix", "prefix-game", "prefix-viewer"]; + +type Observed = (typeof OBSERVED)[number]; + + +``` diff --git a/js/moq-boy/api/index.api.md b/js/moq-boy/api/index.api.md new file mode 100644 index 00000000000..9df06dc8115 --- /dev/null +++ b/js/moq-boy/api/index.api.md @@ -0,0 +1,116 @@ +## API Report File for "@moq/boy" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as Moq from '@moq/net'; +import * as Watch from '@moq/watch'; +import { z } from '@zod/mini'; + +export class Game { + constructor(config: GameConfig); + readonly active: Moq.Signals.Signal; + readonly audioDecoder: Watch.Audio.Decoder; + readonly audioEmitter: Watch.Audio.Emitter; + readonly audioSource: Watch.Audio.Source; + readonly broadcast: Watch.Broadcast; + readonly canvas: Moq.Signals.Signal; + close(): void; + readonly delay: Moq.Signals.Signal; + readonly expanded: Moq.Signals.Signal; + readonly heldButtons: Set; + readonly hovered: Moq.Signals.Signal; + sendButtons(): void; + sendCommand(cmd: Record): void; + readonly sessionId: string; + readonly status: Moq.Signals.Signal<{ + buttons: string[]; + latency: Record; + location?: string | undefined; + stats?: { + video_secs: number; + audio_secs: number; + emulation_secs: number; + wall_secs: number; + } | undefined; + } | undefined>; + readonly sync: Watch.Sync; + readonly userMuted: Moq.Signals.Signal; + readonly videoDecoder: Watch.Video.Decoder; + readonly videoRenderer: Watch.Video.Renderer; + readonly videoSource: Watch.Video.Source; + readonly viewerId: Moq.Signals.Signal; + readonly volume: Moq.Signals.Signal; +} + +export interface GameConfig { + connection: Moq.Connection; + expanded: Moq.Signals.Signal; + gamePrefix: string; + origin: Moq.Origin.Producer; + sessionId: string; + viewerPrefix: string; +} + +export type GameStats = z.infer; + +export const GameStatsSchema: z.ZodMiniObject<{ + video_secs: z.ZodMiniNumber; + audio_secs: z.ZodMiniNumber; + emulation_secs: z.ZodMiniNumber; + wall_secs: z.ZodMiniNumber; +}, z.core.$strip>; + +export type GameStatus = z.infer; + +export const GameStatusSchema: z.ZodMiniObject<{ + buttons: z.ZodMiniArray>; + latency: z.ZodMiniRecord, z.ZodMiniArray; + ms: z.ZodMiniNumber; + }, z.core.$strip>>>; + location: z.ZodMiniOptional>; + stats: z.ZodMiniOptional; + audio_secs: z.ZodMiniNumber; + emulation_secs: z.ZodMiniNumber; + wall_secs: z.ZodMiniNumber; + }, z.core.$strip>>; +}, z.core.$strip>; + +export const KEY_MAP: Record; + +export { Moq } + +export class MoqBoy extends HTMLElement { + constructor(); + attributeChangedCallback(name: Observed, _oldValue: string | null, newValue: string | null): void; + connectedCallback(): void; + readonly connection: Moq.Connection; + disconnectedCallback(): void; + readonly expanded: Moq.Signals.Signal; + readonly games: Moq.Signals.Signal>; + static observedAttributes: readonly ["url", "prefix", "prefix-game", "prefix-viewer"]; + readonly origin: Moq.Origin.Producer; + get prefixGame(): string; + set prefixGame(value: string); + get prefixPath(): string; + set prefixPath(value: string); + get prefixViewer(): string; + set prefixViewer(value: string); + get url(): URL | undefined; + set url(value: string | URL | undefined); +} + +const OBSERVED: readonly ["url", "prefix", "prefix-game", "prefix-viewer"]; + +type Observed = (typeof OBSERVED)[number]; + +export { Watch } + + +``` diff --git a/js/msf/api/index.api.md b/js/msf/api/index.api.md new file mode 100644 index 00000000000..9266b1c1d81 --- /dev/null +++ b/js/msf/api/index.api.md @@ -0,0 +1,118 @@ +## API Report File for "@moq/msf" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type * as Moq from '@moq/net'; +import * as z from '@zod/mini'; + +export type Catalog = z.infer; + +export const CatalogSchema: z.ZodMiniObject<{ + tracks: z.ZodMiniArray; + packaging: z.ZodMiniUnion, z.ZodMiniString]>; + isLive: z.ZodMiniOptional>; + role: z.ZodMiniOptional, z.ZodMiniString]>>; + codec: z.ZodMiniOptional>; + width: z.ZodMiniOptional>; + height: z.ZodMiniOptional>; + framerate: z.ZodMiniOptional>; + samplerate: z.ZodMiniOptional>; + channelConfig: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional>; + stalled: z.ZodMiniOptional>; + initData: z.ZodMiniOptional>; + renderGroup: z.ZodMiniOptional>; + altGroup: z.ZodMiniOptional>; + maxGrpSapStartingType: z.ZodMiniOptional>; + maxObjSapStartingType: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional>; + delay: z.ZodMiniOptional>; + }, z.core.$strip>>; + ext: z.ZodMiniOptional, z.ZodMiniUnknown>>; +}, z.core.$strip>; + +export function decode(raw: Uint8Array): Catalog; + +export function encode(catalog: Catalog): Uint8Array; + +function fetch_2(track: Moq.Track.Ordered): Promise; +export { fetch_2 as fetch } + +export type Packaging = z.infer; + +export const PackagingSchema: z.ZodMiniUnion, z.ZodMiniString]>; + +export type Role = z.infer; + +export const RoleSchema: z.ZodMiniUnion, z.ZodMiniString]>; + +export type Track = z.infer; + +export const TrackSchema: z.ZodMiniObject<{ + name: z.ZodMiniString; + packaging: z.ZodMiniUnion, z.ZodMiniString]>; + isLive: z.ZodMiniOptional>; + role: z.ZodMiniOptional, z.ZodMiniString]>>; + codec: z.ZodMiniOptional>; + width: z.ZodMiniOptional>; + height: z.ZodMiniOptional>; + framerate: z.ZodMiniOptional>; + samplerate: z.ZodMiniOptional>; + channelConfig: z.ZodMiniOptional>; + bitrate: z.ZodMiniOptional>; + stalled: z.ZodMiniOptional>; + initData: z.ZodMiniOptional>; + renderGroup: z.ZodMiniOptional>; + altGroup: z.ZodMiniOptional>; + maxGrpSapStartingType: z.ZodMiniOptional>; + maxObjSapStartingType: z.ZodMiniOptional>; + jitter: z.ZodMiniOptional>; + delay: z.ZodMiniOptional>; +}, z.core.$strip>; + +export const VERSION = "draft-01"; + + +``` diff --git a/js/net/api/index.api.md b/js/net/api/index.api.md new file mode 100644 index 00000000000..341b594f1cd --- /dev/null +++ b/js/net/api/index.api.md @@ -0,0 +1,1010 @@ +## API Report File for "@moq/net" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { compareSpecificity } from '@moq/pattern'; +import { GetPromise } from '@moq/signals'; +import { Getter } from '@moq/signals'; +import { InvalidPattern } from '@moq/pattern'; +import { Pattern } from '@moq/pattern'; +import { Patterns } from '@moq/pattern'; +import { Segment } from '@moq/pattern'; +import { Signal } from '@moq/signals'; +import * as Signals from '@moq/signals'; +import { Specificity } from '@moq/pattern'; +import * as z from 'zod/mini'; + +function accept(input: AcceptProps): Promise; + +interface AcceptProps { + consume?: Producer_5; + discovery?: boolean; + publish?: Consumer_5; + transport: WebTransport; + url: URL; + version?: number; +} + +class Allocator implements Handle { + constructor(estimate?: Getter); + close(): void; + reserve(track: Demand, max: number): Reservation; + static unlimited(): Allocator; +} + +declare namespace Announce { + export { + Consumer, + isActive, + Kind, + Update + } +} + +declare namespace Announce_2 { + export { + isActive, + Kind, + Update, + Options, + Producer_4 as Producer, + Consumer + } +} + +declare namespace Bandwidth { + export { + Allocator, + Demand, + Handle, + Reservation + } +} + +type Bound = { + included: number; + excluded?: never; +} | { + excluded: number; + included?: never; +}; + +declare namespace Broadcast { + export { + Producer, + Consumer_2 as Consumer + } +} + +declare namespace Broadcast_2 { + export { + Producer, + Consumer_2 as Consumer + } +} + +interface CertificateHash { + algorithm?: "sha-256"; + value: BufferSource | string; +} + +function certificateHash(cert: string | BufferSource): Promise>; + +function connect(input: ConnectProps): Promise; + +export class Connection { + constructor(props?: ConnectionProps); + static readonly accept: typeof accept; + announced(scope?: Path_2.Pattern, options?: Announce_2.Options): Announce_2.Consumer; + readonly bandwidth: Getter; + static readonly certificateHash: typeof certificateHash; + close(abort?: Error): void; + get closed(): GetPromise; + static readonly connect: typeof connect; + enabled: Signal; + readonly error: Getter; + static readonly isWebTransportSupported: typeof isWebTransportSupported; + readonly origin: Getter; + readonly probe: Getter; + stats(): Promise; + readonly status: Getter; + readonly transport: Getter; + url: Signal; +} + +export namespace Connection { + export type AcceptProps = AcceptProps; + export type Backoff = ReloadDelay; + export type CertificateHash = CertificateHash; + export type ConnectProps = ConnectProps; + export type Established = Established; + export type Goaway = GoawayProps; + export type Probe = Probe; + export type Props = ConnectionProps; + export type Redirect = Redirect; + export type Stats = Stats; + export type Status = ReloadStatus; + export type Transport = Transport; + export type WebSocketProps = WebSocketProps; + export type WebTransportProps = WebTransportProps; +} + +interface ConnectionProps { + consume?: Origin_3.Producer; + delay?: ReloadDelay; + discovery?: boolean; + enabled?: boolean | Signal; + goaway?: GoawayProps; + linger?: Time_2.Milli; + publish?: Origin_3.Consumer; + share?: boolean; + signal?: never; + transport?: never; + url?: URL | Signal; + websocket?: WebSocketProps; + webtransport?: WebTransportProps; +} + +interface ConnectProps { + consume?: Producer_5; + discovery?: boolean; + publish?: Consumer_5; + signal?: AbortSignal; + transport?: WebTransport; + url: URL; + websocket?: WebSocketProps; + webtransport?: WebTransportProps; +} + +class Consumer { + [Symbol.asyncIterator](): AsyncGenerator; + close(abort?: Error): void; + get closed(): GetPromise; + next(): Promise; +} + +class Consumer_2 { + protected constructor(shared?: never); + clone(): Consumer_2; + close(): void; + // @deprecated + close(abort?: Error): void; + get closed(): GetPromise; + get path(): Path_2.Valid; + protected shareState(): never; + track(name: string): track.Consumer; +} + +class Consumer_3 { + close(abort?: Error): void; + get closed(): GetPromise; + get done(): boolean; + get frameCount(): number; + get isClosed(): boolean; + readable(): Promise; + readBool(): Promise; + readFrame(): Promise; + readFrameSequence(options?: ReadOptions): Promise<({ + sequence: number; + } & Frame) | undefined>; + readJson(): Promise; + readString(): Promise; + readonly sequence: number; + tryReadFrame(): Frame | undefined; + tryReadFrameSequence(): ({ + sequence: number; + } & Frame) | undefined; +} + +class Consumer_4 { + fetchGroup(sequence: number, options?: FetchGroupOptions): Promise; + info(): Promise; + readonly name: string; + subscribe(options?: Subscription): Subscriber; +} + +class Consumer_5 { + announced(scope?: Path_2.Pattern, options?: Announce_2.Options): Announce_2.Consumer; + broadcasts(scope?: Path_2.Pattern, options?: Announce_2.Options): Getter>; + get closed(): GetPromise; + get discovery(): Getter; + request(path: Path_2.Valid, options?: RequestOptions): Requesting; +} + +interface Cost { + cold: bigint; + warm: bigint; +} + +const Cost: { + zero: Cost; +}; + +interface Datagram { + payload: Uint8Array; + sequence: number; + timestamp: Timestamp; +} + +function decode(raw: string): Valid; + +function decode_2(buf: Uint8Array): [number, Uint8Array]; + +function decodeBigInt(buf: Uint8Array): [bigint, Uint8Array]; + +function decodeLeadingOnes(buf: Uint8Array): [bigint, Uint8Array]; + +const DEFAULT_MAX_AGE_MS: Milli; + +interface Demand { + readonly closed: GetPromise; + readonly priority: number; + readonly used: Getter; +} + +class Dynamic { + close(): void; + readonly prefix: Path_2.Valid; + requested(): AsyncIterableIterator; + update(route: Route | { + hops?: Route["hops"]; + cost?: Route["cost"] | bigint; + }): void; +} + +function empty(): Valid; + +function encode(path: Valid): Valid; + +function encode_2(v: number | bigint): Uint8Array; + +function encodeLeadingOnes(v: number | bigint): Uint8Array; + +function encodeLeadingOnesTo(dst: ArrayBuffer, v: number | bigint): Uint8Array; + +function encodeTo(dst: ArrayBuffer, v: number | bigint): Uint8Array; + +declare namespace Error_2 { + export { + FrameTooLarge, + GroupTooLarge, + NotFound, + ProtocolViolation, + RefusedRedirect, + Session, + Stream, + StreamOptions, + TooFarBehind + } +} + +interface Established { + announced(scope?: Path_2.Pattern, options?: Announce_2.Options): Announce_2.Consumer; + close(): void; + closed: Promise; + readonly discovery: boolean; + readonly probe: Getter; + stats(): Promise; + readonly transport: Transport; + readonly url: URL; + readonly version: string; +} + +interface FetchGroupOptions { + priority?: number; + signal?: AbortSignal; +} + +interface Frame { + payload: Uint8Array; + timestamp: Timestamp; +} + +class FrameTooLarge extends Stream { + constructor(options?: { + cause?: unknown; + }); +} + +function from(...paths: string[]): Valid; + +interface GoawayProps { + handover?: Time_2.Milli; + redirect?: Redirect; +} + +declare namespace Group { + export { + MAX_GROUP_CACHE_BYTES, + MAX_GROUP_FRAMES, + Frame, + ReadOptions, + Info_2 as Info, + Producer_3 as Producer, + Consumer_3 as Consumer + } +} + +interface Groups { + end?: Bound; + start?: Bound; +} + +class GroupTooLarge extends Stream { + constructor(options?: { + cause?: unknown; + }); +} + +interface Handle { + reserve(track: Demand, max: number): Reservation; +} + +function hasPrefix(prefix: Valid, path: Valid): boolean; + +type Hop = z.infer; + +const HopSchema: z.core.$ZodBranded, "Hop", "out">; + +interface Info { + maxAge: Milli; + priority: number; + timescale: Timescale; +} + +interface Info_2 { + sequence: number; +} + +function infoDefaults(info?: Partial): Info; + +function isActive(kind: Kind): boolean; + +function isAnonymous(route: Route): boolean; + +function isWebTransportSupported(): boolean; + +function join(path: Valid, other: Valid): Valid; + +type Kind = "announced" | "updated" | "retracted"; + +interface Location_2 { + frame: number; + group: number; +} + +const MAX_GROUP_CACHE_BYTES: number; + +const MAX_GROUP_FRAMES = 8192; + +const MAX_PARTS = 32; + +const MAX_U14: number; + +const MAX_U30: number; + +const MAX_U53: number; + +const MAX_U6: number; + +type Micro = number & { + readonly _brand: "micro"; +}; + +const Micro: ((value: number) => Micro) & { + zero: Micro; + fromNano: (ns: Nano) => Micro; + fromMilli: (ms: Milli) => Micro; + fromSecond: (s: Second) => Micro; + toNano: (us: Micro) => Nano; + toMilli: (us: Micro) => Milli; + toSecond: (us: Micro) => Second; + now: () => Micro; + add: (a: Micro, b: Micro) => Micro; + sub: (a: Micro, b: Micro) => Micro; + mul: (a: Micro, b: number) => Micro; + div: (a: Micro, b: number) => Micro; + max: (a: Micro, b: Micro) => Micro; + min: (a: Micro, b: Micro) => Micro; +}; + +type Milli = number & { + readonly _brand: "milli"; +}; + +const Milli: ((value: number) => Milli) & { + zero: Milli; + fromNano: (ns: Nano) => Milli; + fromMicro: (us: Micro) => Milli; + fromSecond: (s: Second) => Milli; + toNano: (ms: Milli) => Nano; + toMicro: (ms: Milli) => Micro; + toSecond: (ms: Milli) => Second; + now: () => Milli; + add: (a: Milli, b: Milli) => Milli; + sub: (a: Milli, b: Milli) => Milli; + mul: (a: Milli, b: number) => Milli; + div: (a: Milli, b: number) => Milli; + max: (a: Milli, b: Milli) => Milli; + min: (a: Milli, b: Milli) => Milli; +}; + +type Nano = number & { + readonly _brand: "nano"; +}; + +const Nano: ((value: number) => Nano) & { + zero: Nano; + fromMicro: (us: Micro) => Nano; + fromMilli: (ms: Milli) => Nano; + fromSecond: (s: Second) => Nano; + toMicro: (ns: Nano) => Micro; + toMilli: (ns: Nano) => Milli; + toSecond: (ns: Nano) => Second; + now: () => Nano; + add: (a: Nano, b: Nano) => Nano; + sub: (a: Nano, b: Nano) => Nano; + mul: (a: Nano, b: number) => Nano; + div: (a: Nano, b: number) => Nano; + max: (a: Nano, b: Nano) => Nano; + min: (a: Nano, b: Nano) => Nano; +}; + +function normalizeRelative(rel: string): Relative; + +class NotFound extends Stream { + constructor(what: string, options?: { + cause?: unknown; + }); +} + +interface Options { + hidden?: boolean; +} + +class Ordered { + close(abort?: Error): void; + get closed(): GetPromise; + final(): number | undefined; + finished(): Promise; + info(): Promise; + latest(): number | undefined; + readonly name: string; + nextGroup(): Promise; + readBool(): Promise; + readFrame(): Promise<({ + group: number; + frame: number; + } & Frame) | undefined>; + readJson(): Promise; + readString(): Promise; + recvDatagram(): Promise; + setGroups(groups: Groups): void; + get subscription(): Getter; + update(options: Subscription): void; + withGroups(groups: Groups): this; +} + +declare namespace Origin_2 { + export { + Cost, + Hop, + Route, + isAnonymous, + Table, + RequestOptions, + Producer_5 as Producer, + Requesting, + Consumer_5 as Consumer, + Dynamic, + Request_3 as Request + } +} + +declare namespace Origin_3 { + export { + Cost, + Hop, + Route, + isAnonymous, + Table, + RequestOptions, + Producer_5 as Producer, + Requesting, + Consumer_5 as Consumer, + Dynamic, + Request_3 as Request + } +} + +function parts(path: Valid): string[]; + +declare namespace Path { + export { + from, + parts, + decode, + encode, + hasPrefix, + stripPrefix, + join, + empty, + normalizeRelative, + resolve, + tryResolve, + relative, + Valid, + Relative, + MAX_PARTS, + compareSpecificity, + InvalidPattern, + Pattern, + Patterns, + Segment, + Specificity + } +} + +declare namespace Path_2 { + export { + from, + parts, + decode, + encode, + hasPrefix, + stripPrefix, + join, + empty, + normalizeRelative, + resolve, + tryResolve, + relative, + Valid, + Relative, + MAX_PARTS, + compareSpecificity, + InvalidPattern, + Pattern, + Patterns, + Segment, + Specificity + } +} + +interface Probe { + estimatedRecvRate?: number; + rtt?: Time_2.Milli; +} + +class Producer { + constructor(); + announce(route?: Route | { + hops?: Route["hops"]; + cost?: Route["cost"] | bigint; + }): void; + close(): void; + // @deprecated + close(abort?: Error): void; + get closed(): GetPromise; + consume(): Consumer_2; + createTrack(name: string, info?: Partial): track.Producer; + insertTrack(track: track.Producer): void; + removeTrack(name: string): void; + track(name: string): track.Consumer; + unannounce(): void; +} + +class Producer_2 { + constructor(name: string); + accept(info?: Partial): this; + appendDatagram(timestamp: Timestamp, payload: Uint8Array): number; + appendGroup(): Producer_3; + close(abort?: Error): void; + get closed(): GetPromise; + finishAt(final: number): void; + info(): Promise; + insertDatagram(sequence: number, timestamp: Timestamp, payload: Uint8Array): void; + readonly name: string; + get priority(): number; + subscribe(options?: Subscription): Subscriber; + get subscription(): Getter; + unused(): Promise; + get used(): Getter; + writeBool(bool: boolean): void; + writeFrame(frame: Frame): void; + writeGroup(group: Producer_3): void; + writeJson(json: unknown): void; + writeString(str: string): void; +} + +class Producer_3 { + constructor(sequence: number); + close(abort?: Error): void; + get closed(): GetPromise; + consume(): Consumer_3; + get isClosed(): boolean; + readonly sequence: number; + writeBool(bool: boolean): void; + writeFrame(frame: Frame): void; + writeJson(json: unknown): void; + writeString(str: string): void; +} + +class Producer_4 { + append(update: Update): void; + close(abort?: Error): void; + get closed(): GetPromise; + consume(): Consumer; +} + +class Producer_5 implements Table { + constructor(); + announced(scope?: Path_2.Pattern, options?: Announce_2.Options): Announce_2.Consumer; + broadcasts(scope?: Path_2.Pattern, options?: Announce_2.Options): Getter>; + close(abort?: Error): void; + get closed(): GetPromise; + consume(): Consumer_5; + createBroadcast(path: Path_2.Valid): Broadcast_2.Producer; + get discovery(): Getter; + dynamic(prefix: Path_2.Valid, route?: Route | { + hops?: Route["hops"]; + cost?: Route["cost"] | bigint; + }): Dynamic; + request(path: Path_2.Valid, options?: RequestOptions): Requesting; + scope(root: Path_2.Valid, patterns: Path_2.Patterns): Producer_5; +} + +class ProtocolViolation extends Error { + constructor(message: string, options?: { + cause?: unknown; + }); +} + +interface ReadOptions { + from?: number; +} + +type Redirect = "follow" | "same-host" | "ignore"; + +class RefusedRedirect extends Error { + constructor(reason: string); +} + +type Relative = string & { + __brand: "Relative"; +}; + +function relative(target: Valid, base: Valid): Relative | undefined; + +type ReloadDelay = { + initial?: Time_2.Milli; + multiplier?: number; + max?: Time_2.Milli; + timeout?: Time_2.Milli; +}; + +type ReloadStatus = "connecting" | "connected" | "disconnected"; + +class Request_2 { + accept(info?: Partial): Producer_2; + readonly name: string; + get priority(): number; + reject(err?: Error): void; + get subscription(): Readonly; +} + +class Request_3 { + accept(source: Broadcast_2.Producer | Broadcast_2.Consumer): void; + readonly path: Path_2.Valid; + reject(err: Error): void; +} + +class Requesting { + readonly active: Getter; + close(): void; + readonly closed: GetPromise; + readonly path: Path_2.Valid; + readonly unroutable: Getter; +} + +interface RequestOptions { + announced?: boolean; +} + +class Reservation implements Disposable { + [Symbol.dispose](): void; + close(): void; + get grant(): Getter; + peek(): number | undefined; + update(max: number): void; +} + +function resolve(base: Valid, rel: Relative): Valid; + +interface Route { + cost: Cost; + hops: Hop[]; +} + +const Route: { + default: Route; + normalize(route?: Route | { + hops?: readonly Hop[]; + cost?: Cost | bigint; + }): Route; +}; + +type Second = number & { + readonly _brand: "second"; +}; + +const Second: ((value: number) => Second) & { + zero: Second; + fromNano: (ns: Nano) => Second; + fromMicro: (us: Micro) => Second; + fromMilli: (ms: Milli) => Second; + toNano: (s: Second) => Nano; + toMicro: (s: Second) => Micro; + toMilli: (s: Second) => Milli; + now: () => Second; + add: (a: Second, b: Second) => Second; + sub: (a: Second, b: Second) => Second; + mul: (a: Second, b: number) => Second; + div: (a: Second, b: number) => Second; + max: (a: Second, b: Second) => Second; + min: (a: Second, b: Second) => Second; +}; + +class Session extends Error { + constructor(code: SessionCode, options?: { + cause?: unknown; + reason?: string; + }); + readonly code: SessionCode; +} + +const SESSION_CODE: unique symbol; + +export type SessionCode = number & { + readonly [SESSION_CODE]: true; +}; + +export const SessionCode: ((code: number) => SessionCode) & { + readonly Cancel: SessionCode; + readonly Internal: SessionCode; + readonly Unauthorized: SessionCode; + readonly ProtocolViolation: SessionCode; + readonly KeyValueFormatting: SessionCode; + readonly GoawayTimeout: SessionCode; + readonly Timeout: SessionCode; + readonly Version: SessionCode; +}; + +export { Signals } + +function size(v: number): number; + +function sizeLeadingOnes(v: number | bigint): number; + +interface Stats { + bytesLost?: number; + bytesReceived?: number; + bytesSent?: number; + estimatedSendRate?: number; + packetsLost?: number; + packetsReceived?: number; + packetsSent?: number; + rtt?: Time_2.Milli; +} + +class Stream extends Error { + constructor(code: StreamCode, options?: StreamOptions); + readonly code: StreamCode; +} + +const STREAM_CODE: unique symbol; + +export type StreamCode = number & { + readonly [STREAM_CODE]: true; +}; + +export const StreamCode: ((code: number) => StreamCode) & { + readonly Internal: StreamCode; + readonly Cancel: StreamCode; + readonly DeliveryTimeout: StreamCode; + readonly SessionClosed: StreamCode; + readonly GoingAway: StreamCode; + readonly TooFarBehind: StreamCode; + readonly MalformedTrack: StreamCode; + readonly ControlTimeout: StreamCode; + readonly NotFound: StreamCode; + readonly Old: StreamCode; + readonly Evicted: StreamCode; + readonly FrameTooLarge: StreamCode; + readonly NoCapacity: StreamCode; + readonly GroupTooLarge: StreamCode; +}; + +interface StreamOptions { + cause?: unknown; + message?: string; + reason?: string; +} + +function stripPrefix(prefix: Valid, path: Valid): Valid | null; + +class Subscriber { + close(abort?: Error): void; + get closed(): GetPromise; + final(): number | undefined; + finished(): Promise; + info(): Promise; + largest(): Location_2 | undefined; + latest(): number | undefined; + readonly name: string; + ordered(): Ordered; + recvDatagram(): Promise; + recvGroup(): Promise; + setGroups(groups: Groups): void; + get subscription(): Getter; + tryRecvGroup(): Consumer_3 | undefined; + update(options: Subscription): void; + withGroups(groups: Groups): this; +} + +interface Subscription { + groups?: Groups; + maxAge?: Milli; + priority?: number; +} + +interface Table { + announced(scope?: Path_2.Pattern, options?: Announce_2.Options): Announce_2.Consumer; + broadcasts(scope?: Path_2.Pattern, options?: Announce_2.Options): Getter>; + readonly closed: GetPromise; + createBroadcast(path: Path_2.Valid): Broadcast_2.Producer; + readonly discovery: Getter; + dynamic(prefix: Path_2.Valid, route?: Route | { + hops?: Route["hops"]; + cost?: Route["cost"] | bigint; + }): Dynamic; + request(path: Path_2.Valid, options?: RequestOptions): Requesting; +} + +declare namespace Time { + export { + Nano, + Micro, + Milli, + Timescale, + Timestamp, + Second + } +} + +declare namespace Time_2 { + export { + Nano, + Micro, + Milli, + Timescale, + Timestamp, + Second + } +} + +type Timescale = number & { + readonly _brand: "timescale"; +}; + +const Timescale: ((unitsPerSecond: number) => Timescale) & { + SECOND: Timescale; + MILLI: Timescale; + MICRO: Timescale; + NANO: Timescale; +}; + +class Timestamp { + constructor(value: number, scale: Timescale); + as(scale: Timescale): number; + asMicros(): number; + asMillis(): number; + static fromMicros(us: number): Timestamp; + static fromMillis(ms: number): Timestamp; + static now(): Timestamp; + readonly scale: Timescale; + readonly value: number; +} + +class TooFarBehind extends Stream { + constructor(options?: { + cause?: unknown; + }); +} + +declare namespace Track { + export { + infoDefaults, + Datagram, + DEFAULT_MAX_AGE_MS, + Location_2 as Location, + Info, + Bound, + Groups, + Subscription, + Request_2 as Request, + FetchGroupOptions, + Consumer_4 as Consumer, + Producer_2 as Producer, + Subscriber, + Ordered + } +} + +declare namespace track { + export { + infoDefaults, + Datagram, + DEFAULT_MAX_AGE_MS, + Location_2 as Location, + Info, + Bound, + Groups, + Subscription, + Request_2 as Request, + FetchGroupOptions, + Consumer_4 as Consumer, + Producer_2 as Producer, + Subscriber, + Ordered + } +} + +type Transport = "webtransport" | "websocket"; + +function tryResolve(base: Valid, rel: Relative): Valid | undefined; + +interface Update { + captures: Path_2.Pattern[] | undefined; + kind: Kind; + prefix: Path_2.Valid; + route: Route; +} + +type Valid = string & { + __brand: "Name"; +}; + +declare namespace Varint { + export { + sizeLeadingOnes, + encodeLeadingOnesTo, + encodeLeadingOnes, + decodeLeadingOnes, + size, + encodeTo, + encode_2 as encode, + decodeBigInt, + decode_2 as decode, + MAX_U6, + MAX_U14, + MAX_U30, + MAX_U53 + } +} + +interface WebSocketProps { + delay?: Time_2.Milli; + enabled?: boolean; + url?: URL; +} + +interface WebTransportProps extends Omit { + serverCertificate?: string | BufferSource; + serverCertificateHashes?: CertificateHash[]; +} + + +``` diff --git a/js/net/api/zod.api.md b/js/net/api/zod.api.md new file mode 100644 index 00000000000..ae2e119e58e --- /dev/null +++ b/js/net/api/zod.api.md @@ -0,0 +1,330 @@ +## API Report File for "@moq/net" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { GetPromise } from '@moq/signals'; +import { Getter } from '@moq/signals'; +import type * as z from '@zod/mini'; + +type Bound = { + included: number; + excluded?: never; +} | { + excluded: number; + included?: never; +}; + +class Consumer { + close(abort?: Error): void; + get closed(): GetPromise; + get done(): boolean; + get frameCount(): number; + get isClosed(): boolean; + readable(): Promise; + readBool(): Promise; + readFrame(): Promise; + readFrameSequence(options?: ReadOptions): Promise<({ + sequence: number; + } & Frame) | undefined>; + readJson(): Promise; + readString(): Promise; + readonly sequence: number; + tryReadFrame(): Frame | undefined; + tryReadFrameSequence(): ({ + sequence: number; + } & Frame) | undefined; +} + +class Consumer_2 { + fetchGroup(sequence: number, options?: FetchGroupOptions): Promise; + info(): Promise; + readonly name: string; + subscribe(options?: Subscription): Subscriber; +} + +interface Datagram { + payload: Uint8Array; + sequence: number; + timestamp: Timestamp; +} + +const DEFAULT_MAX_AGE_MS: Milli; + +interface FetchGroupOptions { + priority?: number; + signal?: AbortSignal; +} + +interface Frame { + payload: Uint8Array; + timestamp: Timestamp; +} + +declare namespace group { + export { + MAX_GROUP_CACHE_BYTES, + MAX_GROUP_FRAMES, + Frame, + ReadOptions, + Info_2 as Info, + Producer_2 as Producer, + Consumer + } +} + +interface Groups { + end?: Bound; + start?: Bound; +} + +interface Info { + maxAge: Milli; + priority: number; + timescale: Timescale; +} + +interface Info_2 { + sequence: number; +} + +function infoDefaults(info?: Partial): Info; + +interface Location_2 { + frame: number; + group: number; +} + +const MAX_GROUP_CACHE_BYTES: number; + +const MAX_GROUP_FRAMES = 8192; + +type Micro = number & { + readonly _brand: "micro"; +}; + +const Micro: ((value: number) => Micro) & { + zero: Micro; + fromNano: (ns: Nano) => Micro; + fromMilli: (ms: Milli) => Micro; + fromSecond: (s: Second) => Micro; + toNano: (us: Micro) => Nano; + toMilli: (us: Micro) => Milli; + toSecond: (us: Micro) => Second; + now: () => Micro; + add: (a: Micro, b: Micro) => Micro; + sub: (a: Micro, b: Micro) => Micro; + mul: (a: Micro, b: number) => Micro; + div: (a: Micro, b: number) => Micro; + max: (a: Micro, b: Micro) => Micro; + min: (a: Micro, b: Micro) => Micro; +}; + +type Milli = number & { + readonly _brand: "milli"; +}; + +const Milli: ((value: number) => Milli) & { + zero: Milli; + fromNano: (ns: Nano) => Milli; + fromMicro: (us: Micro) => Milli; + fromSecond: (s: Second) => Milli; + toNano: (ms: Milli) => Nano; + toMicro: (ms: Milli) => Micro; + toSecond: (ms: Milli) => Second; + now: () => Milli; + add: (a: Milli, b: Milli) => Milli; + sub: (a: Milli, b: Milli) => Milli; + mul: (a: Milli, b: number) => Milli; + div: (a: Milli, b: number) => Milli; + max: (a: Milli, b: Milli) => Milli; + min: (a: Milli, b: Milli) => Milli; +}; + +type Nano = number & { + readonly _brand: "nano"; +}; + +const Nano: ((value: number) => Nano) & { + zero: Nano; + fromMicro: (us: Micro) => Nano; + fromMilli: (ms: Milli) => Nano; + fromSecond: (s: Second) => Nano; + toMicro: (ns: Nano) => Micro; + toMilli: (ns: Nano) => Milli; + toSecond: (ns: Nano) => Second; + now: () => Nano; + add: (a: Nano, b: Nano) => Nano; + sub: (a: Nano, b: Nano) => Nano; + mul: (a: Nano, b: number) => Nano; + div: (a: Nano, b: number) => Nano; + max: (a: Nano, b: Nano) => Nano; + min: (a: Nano, b: Nano) => Nano; +}; + +class Ordered { + close(abort?: Error): void; + get closed(): GetPromise; + final(): number | undefined; + finished(): Promise; + info(): Promise; + latest(): number | undefined; + readonly name: string; + nextGroup(): Promise; + readBool(): Promise; + readFrame(): Promise<({ + group: number; + frame: number; + } & Frame) | undefined>; + readJson(): Promise; + readString(): Promise; + recvDatagram(): Promise; + setGroups(groups: Groups): void; + get subscription(): Getter; + update(options: Subscription): void; + withGroups(groups: Groups): this; +} + +class Producer { + constructor(name: string); + accept(info?: Partial): this; + appendDatagram(timestamp: Timestamp, payload: Uint8Array): number; + appendGroup(): Producer_2; + close(abort?: Error): void; + get closed(): GetPromise; + finishAt(final: number): void; + info(): Promise; + insertDatagram(sequence: number, timestamp: Timestamp, payload: Uint8Array): void; + readonly name: string; + get priority(): number; + subscribe(options?: Subscription): Subscriber; + get subscription(): Getter; + unused(): Promise; + get used(): Getter; + writeBool(bool: boolean): void; + writeFrame(frame: Frame): void; + writeGroup(group: Producer_2): void; + writeJson(json: unknown): void; + writeString(str: string): void; +} + +class Producer_2 { + constructor(sequence: number); + close(abort?: Error): void; + get closed(): GetPromise; + consume(): Consumer; + get isClosed(): boolean; + readonly sequence: number; + writeBool(bool: boolean): void; + writeFrame(frame: Frame): void; + writeJson(json: unknown): void; + writeString(str: string): void; +} + +export function read(source: track.Ordered | group.Consumer, schema: z.ZodMiniType): Promise; + +interface ReadOptions { + from?: number; +} + +class Request_2 { + accept(info?: Partial): Producer; + readonly name: string; + get priority(): number; + reject(err?: Error): void; + get subscription(): Readonly; +} + +type Second = number & { + readonly _brand: "second"; +}; + +const Second: ((value: number) => Second) & { + zero: Second; + fromNano: (ns: Nano) => Second; + fromMicro: (us: Micro) => Second; + fromMilli: (ms: Milli) => Second; + toNano: (s: Second) => Nano; + toMicro: (s: Second) => Micro; + toMilli: (s: Second) => Milli; + now: () => Second; + add: (a: Second, b: Second) => Second; + sub: (a: Second, b: Second) => Second; + mul: (a: Second, b: number) => Second; + div: (a: Second, b: number) => Second; + max: (a: Second, b: Second) => Second; + min: (a: Second, b: Second) => Second; +}; + +class Subscriber { + close(abort?: Error): void; + get closed(): GetPromise; + final(): number | undefined; + finished(): Promise; + info(): Promise; + largest(): Location_2 | undefined; + latest(): number | undefined; + readonly name: string; + ordered(): Ordered; + recvDatagram(): Promise; + recvGroup(): Promise; + setGroups(groups: Groups): void; + get subscription(): Getter; + tryRecvGroup(): Consumer | undefined; + update(options: Subscription): void; + withGroups(groups: Groups): this; +} + +interface Subscription { + groups?: Groups; + maxAge?: Milli; + priority?: number; +} + +type Timescale = number & { + readonly _brand: "timescale"; +}; + +const Timescale: ((unitsPerSecond: number) => Timescale) & { + SECOND: Timescale; + MILLI: Timescale; + MICRO: Timescale; + NANO: Timescale; +}; + +class Timestamp { + constructor(value: number, scale: Timescale); + as(scale: Timescale): number; + asMicros(): number; + asMillis(): number; + static fromMicros(us: number): Timestamp; + static fromMillis(ms: number): Timestamp; + static now(): Timestamp; + readonly scale: Timescale; + readonly value: number; +} + +declare namespace track { + export { + infoDefaults, + Datagram, + DEFAULT_MAX_AGE_MS, + Location_2 as Location, + Info, + Bound, + Groups, + Subscription, + Request_2 as Request, + FetchGroupOptions, + Consumer_2 as Consumer, + Producer, + Subscriber, + Ordered + } +} + +export function write(source: track.Producer | group.Producer, value: T, schema: z.ZodMiniType): void; + + +``` diff --git a/js/pattern/api/index.api.md b/js/pattern/api/index.api.md new file mode 100644 index 00000000000..0b82ad97195 --- /dev/null +++ b/js/pattern/api/index.api.md @@ -0,0 +1,99 @@ +## API Report File for "@moq/pattern" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +export function compareSpecificity(a: Specificity, b: Specificity): number; + +export class IntersectionError extends Error { + constructor(); +} + +export class InvalidPattern extends Error { + constructor(code: InvalidPattern.Code, message: string); + readonly code: InvalidPattern.Code; +} + +export namespace InvalidPattern { + export type Code = + /** A segment is empty: a leading, trailing, or doubled `/`. */ + "empty-segment" + /** A segment's kind, fields, or wildcard syntax is invalid. */ + | "invalid-segment" + /** More than one `**`. */ + | "multiple-globstars" + /** More than {@link Pattern.MAX_SEGMENTS} segments. */ + | "too-many-segments"; +} + +export class Pattern { + static all(): Pattern; + asPrefix(): string | undefined; + captures(matched: Pattern): Pattern[] | undefined; + static compare(a: Pattern, b: Pattern): number; + contains(other: Pattern): boolean; + static empty(): Pattern; + equals(other: Pattern): boolean; + static from(segments: Iterable): Pattern; + get hasGlobstar(): boolean; + get head(): string; + intersect(other: Pattern): Patterns; + get isLiteral(): boolean; + static literal(path: string): Pattern; + matches(path: string): boolean; + static get MAX_INTERSECTIONS(): number; + static get MAX_SEGMENTS(): number; + overlaps(other: Pattern): boolean; + static parse(text: string): Pattern; + rebase(root: string): Patterns; + rooted(root: string): Pattern; + readonly segments: readonly Segment[]; + specificity(): Specificity; + static subtree(path: string): Pattern; + readonly text: string; + toJSON(): string; + toString(): string; +} + +export class Patterns implements Iterable { + [Symbol.iterator](): Iterator; + constructor(patterns?: Iterable); + contains(pattern: Pattern): boolean; + covers(other: Patterns): boolean; + equals(other: Patterns): boolean; + insert(pattern: Pattern): boolean; + intersect(other: Patterns): Patterns; + matches(path: string): boolean; + overlaps(pattern: Pattern): boolean; + rebase(root: string): Patterns; + rooted(root: string): Patterns; + get size(): number; + toArray(): Pattern[]; + toJSON(): string[]; +} + +export type Segment = { + readonly kind: "literal"; + readonly value: string; +} | { + readonly kind: "wildcard"; +} | { + readonly kind: "partial"; + readonly prefix: string; + readonly suffix: string; +} | { + readonly kind: "globstar"; +}; + +export interface Specificity { + readonly exact: boolean; + readonly head: number; + readonly literals: number; + readonly partials: number; + readonly pinned: number; + readonly wildcards: number; +} + + +``` diff --git a/js/publish/api/element.api.md b/js/publish/api/element.api.md new file mode 100644 index 00000000000..1fcfb66a7a4 --- /dev/null +++ b/js/publish/api/element.api.md @@ -0,0 +1,603 @@ +## API Report File for "@moq/publish" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as Catalog from '@moq/hang/catalog'; +import { Dispose } from '@moq/signals'; +import { Effect } from '@moq/signals'; +import { Getter } from '@moq/signals'; +import { Inputs } from '@moq/signals'; +import * as Moq from '@moq/net'; +import { Readonlys } from '@moq/signals'; +import { Signal } from '@moq/signals'; +import { Time } from '@moq/net'; + +type Aac = "aac" | AacConfig; + +type AacConfig = { + mime: "aac"; + bitrate?: number; +}; + +export type AnnounceMode = "always" | "source" | "never"; + +declare namespace Audio_2 { + export { + Aac, + AacConfig, + Codec, + Encoder_2 as Encoder, + EncoderInput_2 as EncoderInput, + EncoderProps_2 as EncoderProps, + Opus, + OpusConfig, + Stats_2 as Stats, + Rendition_3 as Rendition, + AudioFrame, + Format, + CaptureInput_2 as CaptureInput, + CaptureProps, + Capture_2 as Capture, + isSampleSource, + sourceKind, + normalizeSource_2 as normalizeSource, + Kind_2 as Kind, + CodecMime, + Source_2 as Source, + SourceConfig_2 as SourceConfig, + SampleSource, + Constraints_2 as Constraints, + StreamTrack_2 as StreamTrack, + TrackSettings_2 as TrackSettings + } +} + +interface AudioFrame { + channels: Float32Array[]; + timestamp: Time.Micro; +} + +class Broadcast { + constructor(props?: Inputs); + audio(name: string): Rendition_2; + readonly catalog: CatalogProducer; + static readonly CATALOG_TRACK = "catalog.json"; + static readonly CATALOG_TRACK_COMPRESSED = "catalog.json.z"; + close(): void; + readonly in: Readonlys; + readonly net: Signal; + text(name: string): Rendition_2; + video(name: string): Rendition_2; +} + +type BroadcastInput = { + origin: Getter; + enabled: Getter; + announce: Getter; + name: Getter; + display: Getter<{ + width: number; + height: number; + } | undefined>; + flip: Getter; + maxAge: Getter; +}; + +class Camera { + constructor(props?: CameraProps); + close(): void; + constraints: Signal; + static readonly DEFAULT_CONSTRAINTS: Video.Constraints; + readonly device: Device<"video">; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type CameraInput = { + enabled: Getter; +}; + +type CameraOutput = { + source: Signal; + error: Signal; +}; + +interface CameraProps extends Inputs { + constraints?: Video.Constraints | Signal; + device?: DeviceProps; +} + +class Capture { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +class Capture_2 { + constructor(props?: CaptureProps); + channelCount: Signal; + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + sampleRate: Signal; +} + +type CaptureInput = { + source: Getter; +}; + +type CaptureInput_2 = { + source: Getter; + enabled: Getter; +}; + +type CaptureOutput = { + frames: Signal | undefined>; + display: Signal<{ + width: number; + height: number; + scale?: number; + } | undefined>; +}; + +type CaptureOutput_2 = { + frames: Signal | undefined>; + format: Signal; + root: Signal; +}; + +type CaptureProps = Inputs & { + sampleRate?: number | Signal; + channelCount?: number | Signal; +}; + +class CatalogProducer { + mutate(fn: (catalog: Catalog.Root) => void): void; + serve(track: Moq.Track.Producer, effect: Effect, opts?: { + compression?: boolean; + }): void; +} + +type Codec = Opus | Aac; + +type CodecMime = "opus" | "aac"; + +interface Config { + bitrateScale?: number; + codec?: string; + frameRate?: number; + keyframeInterval?: Time.Milli; + maxBitrate?: number; + maxPixels?: number; + maxScale?: number; +} + +type Constraints = Omit & { + resizeMode?: "none" | "crop-and-scale"; +}; + +type Constraints_2 = Omit; + +class Device { + constructor(kind: Kind, props?: DeviceProps); + capture(deviceId: string | undefined): Dispose; + close(): void; + readonly kind: Kind; + readonly out: Readonlys; + preferred: Signal; + requestPermission(): void; +} + +type DeviceOutput = { + available: Signal; + default: Signal; + requested: Signal; + active: Signal; + permission: Signal; +}; + +interface DeviceProps { + preferred?: string | Signal; +} + +class Encoder { + constructor(name: string, props?: EncoderProps); + get capture(): Capture | undefined; + close(): void; + config: Signal; + readonly in: Readonlys; + readonly name: string; + readonly out: Readonlys; +} + +class Encoder_2 { + constructor(name: string, props?: EncoderProps_2); + get capture(): Capture_2 | undefined; + close(): void; + codec: Signal; + readonly in: Readonlys; + readonly name: string; + readonly out: Readonlys; + volume: Signal; +} + +type EncoderInput = { + enabled: Getter; + broadcast: Getter; + capture: Getter; + bandwidth: Getter; +}; + +type EncoderInput_2 = { + enabled: Getter; + broadcast: Getter; + capture: Getter; + bandwidth: Getter; +}; + +type EncoderOutput = { + catalog: Signal; + resolved: Signal; + active: Signal; + stats: Signal; +}; + +type EncoderOutput_2 = { + catalog: Signal; + root: Signal; + active: Signal; + stats: Signal; +}; + +type EncoderProps = Inputs & { + config?: Config | Signal; +}; + +type EncoderProps_2 = Inputs & { + volume?: number | Signal; + codec?: Codec | Signal; +}; + +class Fanout { + constructor(source: ReadableStream, props?: FanoutProps); + close(): void; + subscribe(effect: Effect, queue?: number): ReadableStream; +} + +interface FanoutProps { + clone?: (value: T) => T; + queue?: number; + release?: (value: T) => void; +} + +class File_2 { + constructor(props?: FileProps); + close(): void; + file: Signal; + readonly in: Readonlys; + readonly out: Readonlys; + prompt(): void; +} + +type FileInput = { + enabled: Getter; +}; + +type FileOutput = { + source: Signal; +}; + +interface FileProps extends Inputs { + file?: globalThis.File | Signal; +} + +interface Format { + channelCount: number; + sampleRate: number; +} + +interface FrameSource { + frameRate?: number; + frames: ReadableStream; +} + +function isSampleSource(source: Source_2): source is SampleSource; + +function isStreamTrack(source: Source): source is StreamTrack; + +type Kind = "video" | "audio" | "text"; + +type Kind_2 = "voice" | "music" | "auto"; + +type Media = { + video?: Video.Source; + audio?: Audio_2.Source; +}; + +class Microphone { + constructor(props?: MicrophoneProps); + close(): void; + constraints: Signal; + readonly device: Device<"audio">; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type MicrophoneInput = { + enabled: Getter; +}; + +type MicrophoneOutput = { + source: Signal; + error: Signal; +}; + +interface MicrophoneProps extends Inputs { + constraints?: Audio_2.Constraints | Signal; + device?: DeviceProps; +} + +type Mode = "none" | "source" | "encoded"; + +class MoqPublish extends HTMLElement { + constructor(); + get announce(): AnnounceMode; + set announce(value: AnnounceMode); + attributeChangedCallback(name: Observed, oldValue: string | null, newValue: string | null): void; + audio: Audio_2.Encoder; + broadcast: Broadcast; + connectedCallback(): void; + connection: Moq.Connection; + readonly controls: { + source: Signal; + muted: Signal; + invisible: Signal; + preview: Signal; + announce: Signal; + }; + disconnectedCallback(): void; + get invisible(): boolean; + set invisible(value: boolean); + get muted(): boolean; + set muted(value: boolean); + get name(): Moq.Path.Valid; + set name(value: string | Moq.Path.Valid); + static observedAttributes: readonly ["url", "name", "muted", "invisible", "source", "preview", "announce"]; + get preview(): Preview.Mode; + set preview(value: Preview.Mode); + readonly signals: Effect; + get source(): SourceType | File | undefined; + set source(value: SourceType | File | undefined); + readonly sources: Moq.Signals.Readonlys<{ + video: Signal; + audio: Signal; + file: Signal; + }>; + get url(): URL | undefined; + set url(value: string | URL | undefined); + video: Video.Encoder; +} +export default MoqPublish; + +function normalizeSource(source: StreamTrack | SourceConfig): SourceConfig; + +function normalizeSource_2(source: StreamTrack_2 | SourceConfig_2): SourceConfig_2; + +const OBSERVED: readonly ["url", "name", "muted", "invisible", "source", "preview", "announce"]; + +type Observed = (typeof OBSERVED)[number]; + +type Opus = "opus" | OpusConfig; + +type OpusConfig = { + mime: "opus"; + bitrate?: number; + frameDuration?: Time.Milli; + complexity?: number; + packetlossperc?: number; + useinbandfec?: boolean; + usedtx?: boolean; +}; + +declare namespace Preview { + export { + Mode, + RendererInput, + RendererProps, + Renderer, + TranscodeInput, + TranscodeProps, + Transcode + } +} + +class Renderer { + constructor(props?: RendererProps); + close(): void; + readonly in: Readonlys; +} + +type RendererInput = { + canvas: Getter; + frames: Getter | undefined>; + display: Getter<{ + width: number; + height: number; + } | undefined>; + flip: Getter; + encoder: Getter; + mode: Getter; + enabled: Getter; +}; + +type RendererProps = Inputs; + +type Rendition = Rendition_2; + +class Rendition_2 { + close(): void; + readonly config: Signal; + readonly kind: Kind; + readonly name: string; + readonly track: Getter; +} + +type Rendition_3 = Rendition_2; + +interface SampleSource { + channelCount: number; + kind: Kind_2; + sampleRate: number; + samples: ReadableStream; +} + +class Screen_2 { + constructor(props?: ScreenProps); + audio: Signal; + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + video: Signal; +} + +type ScreenInput = { + enabled: Getter; +}; + +type ScreenOutput = { + source: Signal; +}; + +interface ScreenProps extends Inputs { + audio?: Audio_2.Constraints | boolean | Signal; + video?: Video.Constraints | boolean | Signal; +} + +type Source = StreamTrack | SourceConfig | FrameSource; + +type Source_2 = StreamTrack_2 | SourceConfig_2 | SampleSource; + +declare namespace Source_3 { + export { + CameraInput, + CameraProps, + Camera, + DeviceProps, + Device, + FileInput, + FileProps, + File_2 as File, + MicrophoneInput, + MicrophoneProps, + Microphone, + ScreenInput, + ScreenProps, + Screen_2 as Screen, + Media + } +} + +interface SourceConfig { + scale?: number; + track: StreamTrack; +} + +interface SourceConfig_2 { + kind: Kind_2; + track: StreamTrack_2; +} + +function sourceKind(source: Source_2): Kind_2; + +export type SourceType = "camera" | "screen" | "file"; + +interface Stats { + bytes: number; + frames: number; + keyframes: number; +} + +interface Stats_2 { + bytes: number; + frames: number; +} + +interface StreamTrack extends MediaStreamTrack { + clone(): StreamTrack; + getSettings(): TrackSettings; + kind: "video"; +} + +interface StreamTrack_2 extends MediaStreamTrack { + clone(): StreamTrack_2; + getSettings(): TrackSettings_2; + kind: "audio"; +} + +interface TrackSettings { + aspectRatio: number; + deviceId: string; + facingMode: "user" | "environment" | "left" | "right"; + frameRate?: number; + groupId: string; + height: number; + resizeMode: "none" | "crop-and-scale"; + width: number; +} + +interface TrackSettings_2 { + autoGainControl?: boolean; + channelCount?: number; + deviceId: string; + echoCancellation?: boolean; + groupId: string; + noiseSuppression?: boolean; + sampleRate: number; + sampleSize?: number; +} + +class Transcode { + constructor(props?: TranscodeProps); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type TranscodeInput = { + source: Getter | undefined>; + config: Getter; + settings: Getter; +}; + +type TranscodeOutput = { + frame: Signal; +}; + +type TranscodeProps = Inputs; + +declare namespace Video { + export { + Rendition, + CaptureInput, + Capture, + Stats, + Config, + EncoderInput, + EncoderProps, + Encoder, + normalizeSource, + isStreamTrack, + Source, + SourceConfig, + FrameSource, + StreamTrack, + TrackSettings, + Constraints + } +} + + +``` diff --git a/js/publish/api/index.api.md b/js/publish/api/index.api.md new file mode 100644 index 00000000000..556120bb486 --- /dev/null +++ b/js/publish/api/index.api.md @@ -0,0 +1,615 @@ +## API Report File for "@moq/publish" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as Catalog from '@moq/hang/catalog'; +import { Dispose } from '@moq/signals'; +import type { Effect } from '@moq/signals'; +import { Getter } from '@moq/signals'; +import * as Hang from '@moq/hang'; +import { Inputs } from '@moq/signals'; +import * as Net from '@moq/net'; +import { Readonlys } from '@moq/signals'; +import { Signal } from '@moq/signals'; +import * as Signals from '@moq/signals'; +import { Time } from '@moq/net'; + +type Aac = "aac" | AacConfig; + +type AacConfig = { + mime: "aac"; + bitrate?: number; +}; + +declare namespace Audio_2 { + export { + Aac, + AacConfig, + Codec, + Encoder, + EncoderInput, + EncoderProps, + Opus, + OpusConfig, + Stats, + Rendition_2 as Rendition, + AudioFrame, + Format, + CaptureInput, + CaptureProps, + Capture, + isSampleSource, + sourceKind, + normalizeSource, + Kind_2 as Kind, + CodecMime, + Source_2 as Source, + SourceConfig, + SampleSource, + Constraints, + StreamTrack, + TrackSettings + } +} + +declare namespace Audio_3 { + export { + Aac, + AacConfig, + Codec, + Encoder, + EncoderInput, + EncoderProps, + Opus, + OpusConfig, + Stats, + Rendition_2 as Rendition, + AudioFrame, + Format, + CaptureInput, + CaptureProps, + Capture, + isSampleSource, + sourceKind, + normalizeSource, + Kind_2 as Kind, + CodecMime, + Source_2 as Source, + SourceConfig, + SampleSource, + Constraints, + StreamTrack, + TrackSettings + } +} + +interface AudioFrame { + channels: Float32Array[]; + timestamp: Time.Micro; +} + +export class Broadcast { + constructor(props?: Inputs); + audio(name: string): Rendition; + readonly catalog: CatalogProducer; + static readonly CATALOG_TRACK = "catalog.json"; + static readonly CATALOG_TRACK_COMPRESSED = "catalog.json.z"; + close(): void; + readonly in: Readonlys; + readonly net: Signal; + text(name: string): Rendition; + video(name: string): Rendition; +} + +export type BroadcastInput = { + origin: Getter; + enabled: Getter; + announce: Getter; + name: Getter; + display: Getter<{ + width: number; + height: number; + } | undefined>; + flip: Getter; + maxAge: Getter; +}; + +class Camera { + constructor(props?: CameraProps); + close(): void; + constraints: Signal; + static readonly DEFAULT_CONSTRAINTS: Video_2.Constraints; + readonly device: Device<"video">; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type CameraInput = { + enabled: Getter; +}; + +type CameraOutput = { + source: Signal; + error: Signal; +}; + +interface CameraProps extends Inputs { + constraints?: Video_2.Constraints | Signal; + device?: DeviceProps; +} + +class Capture { + constructor(props?: CaptureProps); + channelCount: Signal; + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + sampleRate: Signal; +} + +class Capture_2 { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type CaptureInput = { + source: Getter; + enabled: Getter; +}; + +type CaptureInput_2 = { + source: Getter; +}; + +type CaptureOutput = { + frames: Signal | undefined>; + format: Signal; + root: Signal; +}; + +type CaptureOutput_2 = { + frames: Signal | undefined>; + display: Signal<{ + width: number; + height: number; + scale?: number; + } | undefined>; +}; + +type CaptureProps = Inputs & { + sampleRate?: number | Signal; + channelCount?: number | Signal; +}; + +export class CatalogProducer { + mutate(fn: (catalog: Catalog.Root) => void): void; + serve(track: Net.Track.Producer, effect: Effect, opts?: { + compression?: boolean; + }): void; +} + +type Codec = Opus | Aac; + +type CodecMime = "opus" | "aac"; + +interface Config { + bitrateScale?: number; + codec?: string; + frameRate?: number; + keyframeInterval?: Time.Milli; + maxBitrate?: number; + maxPixels?: number; + maxScale?: number; +} + +type Constraints = Omit; + +type Constraints_2 = Omit & { + resizeMode?: "none" | "crop-and-scale"; +}; + +class Device { + constructor(kind: Kind, props?: DeviceProps); + capture(deviceId: string | undefined): Dispose; + close(): void; + readonly kind: Kind; + readonly out: Readonlys; + preferred: Signal; + requestPermission(): void; +} + +type DeviceOutput = { + available: Signal; + default: Signal; + requested: Signal; + active: Signal; + permission: Signal; +}; + +interface DeviceProps { + preferred?: string | Signal; +} + +class Encoder { + constructor(name: string, props?: EncoderProps); + get capture(): Capture | undefined; + close(): void; + codec: Signal; + readonly in: Readonlys; + readonly name: string; + readonly out: Readonlys; + volume: Signal; +} + +class Encoder_2 { + constructor(name: string, props?: EncoderProps_2); + get capture(): Capture_2 | undefined; + close(): void; + config: Signal; + readonly in: Readonlys; + readonly name: string; + readonly out: Readonlys; +} + +type EncoderInput = { + enabled: Getter; + broadcast: Getter; + capture: Getter; + bandwidth: Getter; +}; + +type EncoderInput_2 = { + enabled: Getter; + broadcast: Getter; + capture: Getter; + bandwidth: Getter; +}; + +type EncoderOutput = { + catalog: Signal; + root: Signal; + active: Signal; + stats: Signal; +}; + +type EncoderOutput_2 = { + catalog: Signal; + resolved: Signal; + active: Signal; + stats: Signal; +}; + +type EncoderProps = Inputs & { + volume?: number | Signal; + codec?: Codec | Signal; +}; + +type EncoderProps_2 = Inputs & { + config?: Config | Signal; +}; + +class Fanout { + constructor(source: ReadableStream, props?: FanoutProps); + close(): void; + subscribe(effect: Effect, queue?: number): ReadableStream; +} + +interface FanoutProps { + clone?: (value: T) => T; + queue?: number; + release?: (value: T) => void; +} + +class File_2 { + constructor(props?: FileProps); + close(): void; + file: Signal; + readonly in: Readonlys; + readonly out: Readonlys; + prompt(): void; +} + +type FileInput = { + enabled: Getter; +}; + +type FileOutput = { + source: Signal; +}; + +interface FileProps extends Inputs { + file?: globalThis.File | Signal; +} + +interface Format { + channelCount: number; + sampleRate: number; +} + +interface FrameSource { + frameRate?: number; + frames: ReadableStream; +} + +export { Hang } + +function isSampleSource(source: Source_2): source is SampleSource; + +function isStreamTrack(source: Source_3): source is StreamTrack_2; + +export type Kind = "video" | "audio" | "text"; + +type Kind_2 = "voice" | "music" | "auto"; + +type Media = { + video?: Video_2.Source; + audio?: Audio_3.Source; +}; + +class Microphone { + constructor(props?: MicrophoneProps); + close(): void; + constraints: Signal; + readonly device: Device<"audio">; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type MicrophoneInput = { + enabled: Getter; +}; + +type MicrophoneOutput = { + source: Signal; + error: Signal; +}; + +interface MicrophoneProps extends Inputs { + constraints?: Audio_3.Constraints | Signal; + device?: DeviceProps; +} + +type Mode = "none" | "source" | "encoded"; + +export { Net } + +function normalizeSource(source: StreamTrack | SourceConfig): SourceConfig; + +function normalizeSource_2(source: StreamTrack_2 | SourceConfig_2): SourceConfig_2; + +type Opus = "opus" | OpusConfig; + +type OpusConfig = { + mime: "opus"; + bitrate?: number; + frameDuration?: Time.Milli; + complexity?: number; + packetlossperc?: number; + useinbandfec?: boolean; + usedtx?: boolean; +}; + +declare namespace Preview { + export { + Mode, + RendererInput, + RendererProps, + Renderer, + TranscodeInput, + TranscodeProps, + Transcode + } +} + +class Renderer { + constructor(props?: RendererProps); + close(): void; + readonly in: Readonlys; +} + +type RendererInput = { + canvas: Getter; + frames: Getter | undefined>; + display: Getter<{ + width: number; + height: number; + } | undefined>; + flip: Getter; + encoder: Getter; + mode: Getter; + enabled: Getter; +}; + +type RendererProps = Inputs; + +export class Rendition { + close(): void; + readonly config: Signal; + readonly kind: Kind; + readonly name: string; + readonly track: Getter; +} + +type Rendition_2 = Rendition; + +type Rendition_3 = Rendition; + +interface SampleSource { + channelCount: number; + kind: Kind_2; + sampleRate: number; + samples: ReadableStream; +} + +class Screen_2 { + constructor(props?: ScreenProps); + audio: Signal; + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + video: Signal; +} + +type ScreenInput = { + enabled: Getter; +}; + +type ScreenOutput = { + source: Signal; +}; + +interface ScreenProps extends Inputs { + audio?: Audio_3.Constraints | boolean | Signal; + video?: Video_2.Constraints | boolean | Signal; +} + +export { Signals } + +declare namespace Source { + export { + CameraInput, + CameraProps, + Camera, + DeviceProps, + Device, + FileInput, + FileProps, + File_2 as File, + MicrophoneInput, + MicrophoneProps, + Microphone, + ScreenInput, + ScreenProps, + Screen_2 as Screen, + Media + } +} + +type Source_2 = StreamTrack | SourceConfig | SampleSource; + +type Source_3 = StreamTrack_2 | SourceConfig_2 | FrameSource; + +interface SourceConfig { + kind: Kind_2; + track: StreamTrack; +} + +interface SourceConfig_2 { + scale?: number; + track: StreamTrack_2; +} + +function sourceKind(source: Source_2): Kind_2; + +interface Stats { + bytes: number; + frames: number; +} + +interface Stats_2 { + bytes: number; + frames: number; + keyframes: number; +} + +interface StreamTrack extends MediaStreamTrack { + clone(): StreamTrack; + getSettings(): TrackSettings; + kind: "audio"; +} + +interface StreamTrack_2 extends MediaStreamTrack { + clone(): StreamTrack_2; + getSettings(): TrackSettings_2; + kind: "video"; +} + +interface TrackSettings { + autoGainControl?: boolean; + channelCount?: number; + deviceId: string; + echoCancellation?: boolean; + groupId: string; + noiseSuppression?: boolean; + sampleRate: number; + sampleSize?: number; +} + +interface TrackSettings_2 { + aspectRatio: number; + deviceId: string; + facingMode: "user" | "environment" | "left" | "right"; + frameRate?: number; + groupId: string; + height: number; + resizeMode: "none" | "crop-and-scale"; + width: number; +} + +class Transcode { + constructor(props?: TranscodeProps); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type TranscodeInput = { + source: Getter | undefined>; + config: Getter; + settings: Getter; +}; + +type TranscodeOutput = { + frame: Signal; +}; + +type TranscodeProps = Inputs; + +declare namespace Video { + export { + Rendition_3 as Rendition, + CaptureInput_2 as CaptureInput, + Capture_2 as Capture, + Stats_2 as Stats, + Config, + EncoderInput_2 as EncoderInput, + EncoderProps_2 as EncoderProps, + Encoder_2 as Encoder, + normalizeSource_2 as normalizeSource, + isStreamTrack, + Source_3 as Source, + SourceConfig_2 as SourceConfig, + FrameSource, + StreamTrack_2 as StreamTrack, + TrackSettings_2 as TrackSettings, + Constraints_2 as Constraints + } +} + +declare namespace Video_2 { + export { + Rendition_3 as Rendition, + CaptureInput_2 as CaptureInput, + Capture_2 as Capture, + Stats_2 as Stats, + Config, + EncoderInput_2 as EncoderInput, + EncoderProps_2 as EncoderProps, + Encoder_2 as Encoder, + normalizeSource_2 as normalizeSource, + isStreamTrack, + Source_3 as Source, + SourceConfig_2 as SourceConfig, + FrameSource, + StreamTrack_2 as StreamTrack, + TrackSettings_2 as TrackSettings, + Constraints_2 as Constraints + } +} + + +``` diff --git a/js/publish/api/support-element.api.md b/js/publish/api/support-element.api.md new file mode 100644 index 00000000000..248e5ad17e4 --- /dev/null +++ b/js/publish/api/support-element.api.md @@ -0,0 +1,27 @@ +## API Report File for "@moq/publish" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +class MoqPublishSupport extends HTMLElement { + constructor(); + attributeChangedCallback(name: Observed, _oldValue: string | null, newValue: string | null): void; + connectedCallback(): void; + get details(): boolean; + set details(details: boolean); + disconnectedCallback(): void; + static observedAttributes: readonly ["show", "details"]; + get show(): Show; + set show(show: Show); +} +export default MoqPublishSupport; + +const OBSERVED: readonly ["show", "details"]; + +type Observed = (typeof OBSERVED)[number]; + +export type Show = "always" | "warning" | "error" | "never"; + + +``` diff --git a/js/publish/api/support.api.md b/js/publish/api/support.api.md new file mode 100644 index 00000000000..96363bb7910 --- /dev/null +++ b/js/publish/api/support.api.md @@ -0,0 +1,43 @@ +## API Report File for "@moq/publish" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +type Audio_2 = { + aac: boolean; + opus: Level; +}; +export { Audio_2 as Audio } + +export type Codec = { + hardware?: boolean; + software: boolean; +}; + +export type Full = { + webtransport: Level; + audio: { + capture: boolean; + encoding: Audio_2; + }; + video: { + capture: Level; + encoding: Video | undefined; + }; +}; + +export function isSupported(): Promise; + +export type Level = "full" | "partial" | "none"; + +export type Video = { + h264: Codec; + h265: Codec; + vp8: Codec; + vp9: Codec; + av1: Codec; +}; + + +``` diff --git a/js/publish/api/ui.api.md b/js/publish/api/ui.api.md new file mode 100644 index 00000000000..788ca2b3e62 --- /dev/null +++ b/js/publish/api/ui.api.md @@ -0,0 +1,15 @@ +## API Report File for "@moq/publish" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +class MoqPublishUi extends HTMLElement { + constructor(); + connectedCallback(): void; + disconnectedCallback(): void; +} +export default MoqPublishUi; + + +``` diff --git a/js/room/api/index.api.md b/js/room/api/index.api.md new file mode 100644 index 00000000000..0500a52b895 --- /dev/null +++ b/js/room/api/index.api.md @@ -0,0 +1,257 @@ +## API Report File for "@moq/room" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { Broadcast } from '@moq/net'; +import { Effect } from '@moq/signals'; +import { Getter } from '@moq/signals'; +import { GetterInit } from '@moq/signals'; +import * as Hang from '@moq/hang'; +import * as Json from '@moq/json'; +import * as Net from '@moq/net'; +import { Path } from '@moq/net'; +import * as Publish from '@moq/publish'; +import { Readonlys } from '@moq/signals'; +import type { Root } from '@moq/hang/catalog'; +import { Signal } from '@moq/signals'; +import * as Signals from '@moq/signals'; +import type { Track } from '@moq/net'; +import * as Watch from '@moq/watch'; + +export function broadcastPath(identity: Path.Valid, kind: Kind): Path.Valid; + +declare namespace Chat { + export { + info, + TRACK_2 as TRACK, + PRIORITY_2 as PRIORITY, + HISTORY, + Event_2 as Event, + Publisher, + Subscriber + } +} + +export type Claims = { + root: string; + subscribe: string[]; + publish: string[]; +}; + +export function claims(room: string, identity: string): Claims; + +export function consume(broadcast: Watch.Broadcast): Consumed; + +type Consumed = { + user: Readonlys; + preview: Getter; + close: () => void; +}; + +type Event_2 = Json.Window.Event; + +export type ExtendedCatalog = Root & { + hang?: HangCatalog; +}; + +export { Hang } + +export type HangCatalog = { + user?: TrackRef; + preview?: TrackRef; + chat?: TrackRef; + location?: TrackRef; +}; + +const HISTORY = 10000; + +function info(): Pick; + +export function isKind(value: string): value is Kind; + +export const KIND: { + readonly camera: "camera"; + readonly screen: "screen"; +}; + +export type Kind = (typeof KIND)[keyof typeof KIND]; + +export function kindFromSegment(segment: string): Kind | undefined; + +export class Local { + constructor(props: LocalProps); + readonly camera: Publish.Broadcast; + readonly cameraCapture: Publish.Video.Capture; + readonly cameraEnabled: Signal; + readonly chatting: Signal; + close(): void; + readonly enabled: Signal; + readonly identity: Getter; + readonly microphone: Publish.Source.Microphone; + readonly microphoneEnabled: Signal; + get preview(): Getter; + readonly screen: Publish.Broadcast; + readonly screenCapture: Publish.Video.Capture; + readonly screenEnabled: Signal; + readonly share: Publish.Source.Screen; + readonly typing: Signal; + readonly user: ReturnType; + readonly webcam: Publish.Source.Camera; +} + +export interface LocalProps { + cameraEnabled?: GetterInit; + connection: Net.Connection; + enabled?: GetterInit; + identity: GetterInit; + microphoneEnabled?: GetterInit; + screenEnabled?: GetterInit; + user?: UserProps; +} + +export class Member { + constructor(kind: Kind, path: Net.Path.Valid, connection: Net.Connection); + readonly audio: Watch.Audio.Decoder; + readonly broadcast: Watch.Broadcast; + readonly canvas: Signal; + close(): void; + readonly emitter: Watch.Audio.Emitter; + readonly kind: Kind; + readonly muted: Signal; + readonly path: Net.Path.Valid; + readonly player: Watch.Player; + readonly preview: Getter; + readonly renderer: Watch.Video.Renderer; + readonly user: Readonlys; + readonly video: Watch.Video.Decoder; + readonly volume: Signal; +} + +export { Net } + +export function parse(path: Path.Valid): Parsed | undefined; + +export type Parsed = { + identity: Path.Valid; + kind: Kind; +}; + +export type Preview = { + audio?: boolean; + video?: boolean; + screen?: boolean; + name?: string; + avatar?: string; + chat?: boolean; + typing?: boolean; +}; + +export const PRIORITY = 90; + +const PRIORITY_2 = 10; + +export { Publish } + +class Publisher { + constructor(track: Track.Producer); + static create(broadcast: Broadcast.Producer): Publisher; + expire(): void; + finish(): void; + send(text: string): void; +} + +export class Remote { + constructor(props: RemoteProps); + attach(kind: Kind, path: Net.Path.Valid): void; + readonly camera: Getter; + close(): void; + detach(kind: Kind): void; + empty(): boolean; + readonly identity: Net.Path.Valid; + readonly preview: Getter; + readonly screen: Getter; + readonly user: Readonlys; +} + +export interface RemoteProps { + connection: Net.Connection; + identity: Net.Path.Valid; +} + +export class Room { + constructor(props: RoomProps); + close(): void; + readonly connection: Net.Connection; + readonly enabled: Getter; + readonly identity: Getter; + readonly prefix: Getter; + get remotes(): Getter>; +} + +export interface RoomProps { + connection: Net.Connection; + enabled?: GetterInit; + identity?: GetterInit; + prefix?: GetterInit; +} + +export function serve(broadcast: Publish.Broadcast, user: UserInput, preview: Getter, effect: Effect): void; + +export { Signals } + +class Subscriber { + constructor(track: Track.Subscriber); + close(): void; + recv(): Promise; + static subscribe(broadcast: Broadcast.Consumer): Subscriber; +} + +export const TRACK: { + readonly user: "hang/user.json"; + readonly preview: "hang/preview.json"; + readonly chat: "hang/chat.json"; + readonly location: "hang/location.json"; +}; + +const TRACK_2 = "chat"; + +type TrackRef = { + track: string; +}; + +export type User = { + id?: string; + name?: string; + avatar?: string; + color?: string; +}; + +export type UserFields = { + id: Signal; + name: Signal; + avatar: Signal; + color: Signal; +}; + +export function userFields(props?: UserProps): UserFields; + +type UserInput = { + id: Getter; + name: Getter; + avatar: Getter; + color: Getter; +}; + +export type UserProps = { + id?: string | Signal; + name?: string | Signal; + avatar?: string | Signal; + color?: string | Signal; +}; + +export { Watch } + + +``` diff --git a/js/signals/api/dom.api.md b/js/signals/api/dom.api.md new file mode 100644 index 00000000000..d4deb80de90 --- /dev/null +++ b/js/signals/api/dom.api.md @@ -0,0 +1,98 @@ +## API Report File for "@moq/signals" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +interface ArrayElement extends Array { +} + +class Computed implements Getter { + readonly [GETTER_BRAND] = true; + constructor(fn: (effect: Effect) => T); + changed(): Promise; + changed(fn: Subscriber): Dispose; + close(): void; + peek(): T | undefined; + subscribe(fn: Subscriber): Dispose; +} + +export function create(tagName: K, options?: CreateOptions, ...children: (HTMLElement | string)[]): HTMLElementTagNameMap[K]; + +export type CreateOptions = { + style?: Partial; + className?: string; + classList?: string[]; + id?: string; + dataset?: Record; + attributes?: Record; +} & Partial>; + +type Dispose = () => void; + +class Effect { + constructor(fn?: (effect: Effect) => void); + get abort(): AbortSignal; + animate(fn: (now: DOMHighResTimeStamp) => void): void; + cleanup(fn: Dispose): void; + close(): void; + get closed(): Promise; + computed(fn: (effect: Effect) => T): Computed; + event(target: HTMLElement, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: SVGElement, type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: Document, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: Window, type: K, listener: (this: Window, ev: WindowEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: WebSocket, type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: XMLHttpRequest, type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: MediaQueryList, type: K, listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: Animation, type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: EventSource, type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + get(signal: Getter): T; + getAll[]>(signals: [...S]): { + [K in keyof S]: Truthy>; + } | undefined; + interval(fn: () => void, ms: DOMHighResTimeStamp): void; + proxy(dst: Setter, src: Getter): void; + race(...values: T): Promise | undefined>; + run(fn: (effect: Effect) => void): Dispose; + set>(signal: S, value: SetterType, ...args: undefined extends SetterType ? [cleanup?: SetterType] : [cleanup: SetterType]): void; + spawn(fn: () => Promise): void; + subscribe(signal: Getter, fn: (value: T) => void): void; + timeout(fn: (effect: Effect) => void, ms: DOMHighResTimeStamp): void; + timer(fn: () => void, ms: DOMHighResTimeStamp): void; +} + +type Element_2 = Node | ArrayElement | (string & {}) | number | boolean | null | undefined; +export { Element_2 as Element } + +type Falsy = false | 0 | "" | null | undefined; + +interface Getter { + changed(): Promise; + changed(fn: Subscriber): Dispose; + peek(): T; + subscribe(fn: Subscriber): Dispose; +} + +const GETTER_BRAND: unique symbol; + +type GetterType = G extends Getter ? T : never; + +export function render(effect: Effect, parent: Node, element: Element_2 | ((effect: Effect) => Element_2)): void; + +export function setClass(effect: Effect, element: HTMLElement, ...classNames: string[]): void; + +interface Setter { + set(value: T): void; + update(fn: (prev: T) => T): void; +} + +type SetterType = S extends Setter ? T : never; + +type Subscriber = (value: T) => void; + +type Truthy = Exclude; + + +``` diff --git a/js/signals/api/index.api.md b/js/signals/api/index.api.md new file mode 100644 index 00000000000..c5688c60f14 --- /dev/null +++ b/js/signals/api/index.api.md @@ -0,0 +1,141 @@ +## API Report File for "@moq/signals" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +export class Computed implements Getter { + readonly [GETTER_BRAND] = true; + constructor(fn: (effect: Effect) => T); + changed(): Promise; + changed(fn: Subscriber): Dispose; + close(): void; + peek(): T | undefined; + subscribe(fn: Subscriber): Dispose; +} + +export class Derived[], T> implements Getter { + readonly [GETTER_BRAND] = true; + constructor(sources: S, fn: (...values: GetterValues) => T); + changed(): Promise; + changed(fn: Subscriber): Dispose; + peek(): T; + subscribe(fn: Subscriber): Dispose; +} + +export type Dispose = () => void; + +export class Effect { + constructor(fn?: (effect: Effect) => void); + get abort(): AbortSignal; + animate(fn: (now: DOMHighResTimeStamp) => void): void; + cleanup(fn: Dispose): void; + close(): void; + get closed(): Promise; + computed(fn: (effect: Effect) => T): Computed; + event(target: HTMLElement, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: SVGElement, type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: Document, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: Window, type: K, listener: (this: Window, ev: WindowEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: WebSocket, type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: XMLHttpRequest, type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: MediaQueryList, type: K, listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: Animation, type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: EventSource, type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; + event(target: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + get(signal: Getter): T; + getAll[]>(signals: [...S]): { + [K in keyof S]: Truthy>; + } | undefined; + interval(fn: () => void, ms: DOMHighResTimeStamp): void; + proxy(dst: Setter, src: Getter): void; + race(...values: T): Promise | undefined>; + run(fn: (effect: Effect) => void): Dispose; + set>(signal: S, value: SetterType, ...args: undefined extends SetterType ? [cleanup?: SetterType] : [cleanup: SetterType]): void; + spawn(fn: () => Promise): void; + subscribe(signal: Getter, fn: (value: T) => void): void; + timeout(fn: (effect: Effect) => void, ms: DOMHighResTimeStamp): void; + timer(fn: () => void, ms: DOMHighResTimeStamp): void; +} + +type Falsy = false | 0 | "" | null | undefined; + +export interface GetPromise extends Getter, PromiseLike { +} + +export interface Getter { + changed(): Promise; + changed(fn: Subscriber): Dispose; + peek(): T; + subscribe(fn: Subscriber): Dispose; +} + +export function getter(value: GetterInit): Getter; + +const GETTER_BRAND: unique symbol; + +export type GetterInit = T | Getter; + +export type GetterType = G extends Getter ? T : never; + +export type GetterValues[]> = { + [K in keyof S]: GetterType; +}; + +export type Inputs = { + [K in keyof I]?: GetterInit>; +}; + +export class Once implements GetPromise { + readonly [GETTER_BRAND] = true; + changed(): Promise; + changed(fn: (value: T | undefined) => void): Dispose; + peek(): T | undefined; + set(value: T): void; + subscribe(fn: (value: T | undefined) => void): Dispose; + then(onFulfilled?: ((value: T) => R1 | PromiseLike) | null, onRejected?: ((reason: unknown) => R2 | PromiseLike) | null): PromiseLike; +} + +export function race(values: T): Promise>; + +export type Readonlys = { + readonly [K in keyof T]: Getter>; +}; + +export function readonlys(signals: T): Readonlys; + +export interface Setter { + set(value: T): void; + update(fn: (prev: T) => T): void; +} + +type SetterType = S extends Setter ? T : never; + +export class Signal implements Getter, Setter { + readonly [GETTER_BRAND] = true; + readonly [SIGNAL_BRAND] = true; + constructor(value: T); + changed(): Promise; + changed(fn: Subscriber): Dispose; + static from(value: T | Signal): Signal; + mutate(fn: (value: T) => R, notify?: boolean): R; + peek(): T; + static race(...sigs: { + [K in keyof T]: Getter; + }): Promise>; + set(value: T, notify?: boolean): void; + subscribe(fn: Subscriber): Dispose; + update(fn: (prev: T) => T, notify?: boolean): void; + watch(fn: Subscriber): Dispose; +} + +const SIGNAL_BRAND: unique symbol; + +export type SignalMap = Record>; + +type Subscriber = (value: T) => void; + +type Truthy = Exclude; + + +``` diff --git a/js/signals/api/react.api.md b/js/signals/api/react.api.md new file mode 100644 index 00000000000..ad7677e56cd --- /dev/null +++ b/js/signals/api/react.api.md @@ -0,0 +1,50 @@ +## API Report File for "@moq/signals" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +type Dispose = () => void; + +interface Getter { + changed(): Promise; + changed(fn: Subscriber): Dispose; + peek(): T; + subscribe(fn: Subscriber): Dispose; +} + +const GETTER_BRAND: unique symbol; + +interface Setter { + set(value: T): void; + update(fn: (prev: T) => T): void; +} + +class Signal implements Getter, Setter { + readonly [GETTER_BRAND] = true; + readonly [SIGNAL_BRAND] = true; + constructor(value: T); + changed(): Promise; + changed(fn: Subscriber): Dispose; + static from(value: T | Signal): Signal; + mutate(fn: (value: T) => R, notify?: boolean): R; + peek(): T; + static race(...sigs: { + [K in keyof T]: Getter; + }): Promise>; + set(value: T, notify?: boolean): void; + subscribe(fn: Subscriber): Dispose; + update(fn: (prev: T) => T, notify?: boolean): void; + watch(fn: Subscriber): Dispose; +} + +const SIGNAL_BRAND: unique symbol; + +type Subscriber = (value: T) => void; + +export function useSignal(signal: Signal): [T, (value: T | ((prev: T) => T)) => void]; + +export function useValue(signal: Getter): T; + + +``` diff --git a/js/signals/api/solid.api.md b/js/signals/api/solid.api.md new file mode 100644 index 00000000000..ab4d386ea12 --- /dev/null +++ b/js/signals/api/solid.api.md @@ -0,0 +1,56 @@ +## API Report File for "@moq/signals" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Accessor } from 'solid-js'; +import { Setter as Setter_2 } from 'solid-js'; +import { Signal as Signal_2 } from 'solid-js'; + +export function createAccessor(signal: Getter): Accessor; + +export function createPair(signal: Signal): Signal_2; + +export function createSetter(signal: Signal): Setter_2; + +type Dispose = () => void; + +interface Getter { + changed(): Promise; + changed(fn: Subscriber): Dispose; + peek(): T; + subscribe(fn: Subscriber): Dispose; +} + +const GETTER_BRAND: unique symbol; + +interface Setter { + set(value: T): void; + update(fn: (prev: T) => T): void; +} + +class Signal implements Getter, Setter { + readonly [GETTER_BRAND] = true; + readonly [SIGNAL_BRAND] = true; + constructor(value: T); + changed(): Promise; + changed(fn: Subscriber): Dispose; + static from(value: T | Signal): Signal; + mutate(fn: (value: T) => R, notify?: boolean): R; + peek(): T; + static race(...sigs: { + [K in keyof T]: Getter; + }): Promise>; + set(value: T, notify?: boolean): void; + subscribe(fn: Subscriber): Dispose; + update(fn: (prev: T) => T, notify?: boolean): void; + watch(fn: Subscriber): Dispose; +} + +const SIGNAL_BRAND: unique symbol; + +type Subscriber = (value: T) => void; + + +``` diff --git a/js/watch/api/element.api.md b/js/watch/api/element.api.md new file mode 100644 index 00000000000..c14133e00f4 --- /dev/null +++ b/js/watch/api/element.api.md @@ -0,0 +1,447 @@ +## API Report File for "@moq/watch" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as Catalog from '@moq/hang/catalog'; +import * as Container from '@moq/hang/container'; +import { Dispose } from '@moq/signals'; +import { Effect } from '@moq/signals'; +import { Getter } from '@moq/signals'; +import { Inputs } from '@moq/signals'; +import * as Moq from '@moq/net'; +import { Path } from '@moq/net'; +import { Readonlys } from '@moq/signals'; +import { Signal } from '@moq/signals'; +import { Time } from '@moq/net'; + +declare namespace Audio_2 { + export { + DecoderInput_2 as DecoderInput, + DecoderProps_2 as DecoderProps, + Stats_2 as Stats, + Decoder_2 as Decoder, + EmitterInput, + EmitterProps, + Emitter, + Target_2 as Target, + Supported_2 as Supported, + SourceInput_3 as SourceInput, + Source_3 as Source + } +} + +class Broadcast { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + relativeBroadcast(effect: Effect, rel: Path.Relative | undefined): Moq.Broadcast.Consumer | undefined; +} + +type BroadcastInput = { + origin: Getter; + enabled: Getter; + name: Getter; + announced: Getter; + catalogFormat: Getter; + catalog: Getter; +}; + +type BroadcastOutput = { + status: Signal; + active: Signal; + catalog: Signal; +}; + +const CATALOG_FORMATS: readonly ["hang", "msf", "hangz", "manual"]; + +type CatalogFormat = (typeof CATALOG_FORMATS)[number]; + +class Decoder { + constructor(props: DecoderProps); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + readonly source: Source; + static supported: typeof supported; + readonly sync: Sync; +} + +class Decoder_2 { + constructor(props: DecoderProps_2); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + reset(): void; + readonly source: Source_3; + static supported: typeof supported_2; + readonly sync: Sync; +} + +type DecoderInput = { + enabled: Getter; +}; + +type DecoderInput_2 = { + enabled: Getter; +}; + +type DecoderOutput = { + frame: Signal; + timestamp: Signal; + display: Signal<{ + width: number; + height: number; + } | undefined>; + stalled: Signal; + stats: Signal; + jitter: Signal; + buffered: Signal; +}; + +type DecoderOutput_2 = { + context: Signal; + root: Signal; + sampleRate: Signal; + stats: Signal; + timestamp: Signal; + stalled: Signal; + buffered: Signal; +}; + +type DecoderProps = Inputs & { + source: Source; + sync: Sync; +}; + +type DecoderProps_2 = Inputs & { + source: Source_3; + sync: Sync; +}; + +type Delay = "instant" | "auto" | Time.Milli; + +class Emitter { + constructor(props: EmitterProps); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + readonly source: Decoder_2; +} + +type EmitterInput = { + volume: Getter; + muted: Getter; + paused: Getter; +}; + +type EmitterOutput = { + enabled: Signal; +}; + +type EmitterProps = Inputs & { + source: Decoder_2; +}; + +class MoqWatch extends HTMLElement { + constructor(); + get announced(): boolean; + set announced(value: boolean); + attributeChangedCallback(name: Observed, oldValue: string | null, newValue: string | null): void; + audio: Audio_2.Decoder; + broadcast: Broadcast; + get buffer(): Time.Milli; + set buffer(value: Time.Milli); + get captions(): string | undefined; + set captions(value: string | undefined); + get catalog(): Catalog.Root | undefined; + set catalog(value: Catalog.Root | undefined); + get catalogFormat(): CatalogFormat | undefined; + set catalogFormat(value: CatalogFormat | undefined); + connectedCallback(): void; + connection: Moq.Connection; + readonly controls: { + paused: Signal; + volume: Signal; + muted: Signal; + visible: Signal; + delay: Signal; + buffer: Signal; + target: Signal; + captions: Signal; + }; + get delay(): Delay; + set delay(value: Delay); + disconnectedCallback(): void; + emitter: Audio_2.Emitter; + get jitter(): Time.Milli; + set jitter(_value: unknown); + set latency(_value: unknown); + set latencyMin(_value: unknown); + get muted(): boolean; + set muted(value: boolean); + get name(): Moq.Path.Valid; + set name(value: string | Moq.Path.Valid); + static observedAttributes: readonly ["url", "name", "paused", "volume", "muted", "visible", "announced", "delay", "buffer", "reload", "latency", "latency-min", "jitter", "catalog-format", "captions"]; + get paused(): boolean; + set paused(value: boolean); + readonly player: Player; + renderer: Video.Renderer; + reset(): void; + readonly signals: Effect; + sync: Sync; + text: Text_2.Source; + textRenderer: Text_2.Renderer; + get url(): URL | undefined; + set url(value: string | URL | undefined); + video: Video.Decoder; + get visible(): Video.Visible; + set visible(value: Video.Visible); + get volume(): number; + set volume(value: number); +} +export default MoqWatch; + +const OBSERVED: readonly ["url", "name", "paused", "volume", "muted", "visible", "announced", "delay", "buffer", "reload", "latency", "latency-min", "jitter", "catalog-format", "captions"]; + +type Observed = (typeof OBSERVED)[number]; + +export function parseCatalogFormat(value: string | null): CatalogFormat | undefined; + +class Player { + constructor(props?: PlayerProps); + readonly audio: Audio_2.Decoder; + readonly broadcast: Broadcast; + close(): void; + readonly emitter: Audio_2.Emitter; + readonly in: Readonlys; + readonly renderer: Video.Renderer; + reset(): void; + readonly sync: Sync; + readonly text: Text_2.Source; + readonly textRenderer: Text_2.Renderer; + readonly video: Video.Decoder; +} + +type PlayerInput = { + origin: Getter; + name: Getter; + enabled: Getter; + announced: Getter; + catalogFormat: Getter; + catalog: Getter; + probe: Getter; + canvas: Getter; + container: Getter; + paused: Getter; + volume: Getter; + muted: Getter; + visible: Getter; + delay: Getter; + buffer: Getter; + target: Getter; + captions: Getter; +}; + +type PlayerProps = Inputs; + +function renderable(config: Catalog.TextConfig): boolean; + +class Renderer { + constructor(props: RendererProps); + close(): void; + readonly decoder: Decoder; + readonly in: Readonlys; + readonly out: Readonlys; +} + +class Renderer_2 { + constructor(props: RendererProps_2); + close(): void; + readonly in: Readonlys; + readonly source: Source_2; + readonly sync: Sync; +} + +type RendererInput = { + canvas: Getter; + visible: Getter; +}; + +type RendererInput_2 = { + container: Getter; + enabled: Getter; +}; + +type RendererOutput = { + frame: Signal; + timestamp: Signal; + visible: Signal; +}; + +type RendererProps = Inputs & { + decoder: Decoder; +}; + +type RendererProps_2 = Inputs & { + source: Source_2; + sync: Sync; +}; + +class Source { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +class Source_2 { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +class Source_3 { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type SourceError = "unsupported"; + +type SourceInput = { + broadcast: Getter; + target: Getter; + supported: Getter; + probe: Getter; +}; + +type SourceInput_2 = { + broadcast: Getter; + target: Getter; +}; + +type SourceInput_3 = { + broadcast: Getter; + target: Getter; + supported: Getter; +}; + +type SourceOutput = { + catalog: Signal; + available: Signal>; + error: Signal; + track: Signal; + config: Signal; +}; + +type SourceOutput_2 = { + catalog: Signal; + available: Signal>; + track: Signal; + config: Signal; +}; + +type SourceOutput_3 = { + catalog: Signal; + available: Signal>; + track: Signal; + config: Signal; + jitter: Signal; +}; + +interface Stats { + bytesReceived: number; + frameCount: number; +} + +interface Stats_2 { + bytesReceived: number; +} + +type Status = "offline" | "loading" | "live"; + +type Supported = (config: Catalog.VideoConfig) => Promise; + +function supported(config: Catalog.VideoConfig): Promise; + +type Supported_2 = (config: Catalog.AudioConfig) => Promise; + +function supported_2(config: Catalog.AudioConfig): Promise; + +class Sync { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + now(): Time.Milli | undefined; + readonly out: Readonlys; + received(timestamp: Time.Milli, label?: string): void; + register(jitter: Getter): Dispose; + reset(): void; + wait(timestamp: Time.Milli): Promise; +} + +type SyncInput = { + delay: Getter; + buffer: Getter; + probe: Getter; +}; + +type SyncOutput = { + reference: Signal; + delay: Signal; + jitter: Signal; + timestamp: Signal; + buffered: Signal; + maxAge: Signal; +}; + +type Target = { + name?: string; + pixels?: number; + width?: number; + height?: number; + bitrate?: number; +}; + +type Target_2 = { + name?: string; +}; + +declare namespace Text_2 { + export { + RendererInput_2 as RendererInput, + RendererProps_2 as RendererProps, + Renderer_2 as Renderer, + renderable, + SourceInput_2 as SourceInput, + Source_2 as Source + } +} + +declare namespace Video { + export { + DecoderInput, + DecoderProps, + Stats, + Decoder, + Visible, + RendererInput, + RendererProps, + Renderer, + Supported, + SourceError, + Target, + SourceInput, + Source + } +} + +type Visible = "never" | "always" | (string & {}); + + +``` diff --git a/js/watch/api/index.api.md b/js/watch/api/index.api.md new file mode 100644 index 00000000000..e96058be14c --- /dev/null +++ b/js/watch/api/index.api.md @@ -0,0 +1,441 @@ +## API Report File for "@moq/watch" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { BufferedRange } from '@moq/hang/container'; +import { BufferedRanges } from '@moq/hang/container'; +import * as Catalog from '@moq/hang/catalog'; +import * as Container from '@moq/hang/container'; +import { Dispose } from '@moq/signals'; +import { Effect } from '@moq/signals'; +import { Getter } from '@moq/signals'; +import * as Hang from '@moq/hang'; +import { Inputs } from '@moq/signals'; +import * as Net from '@moq/net'; +import { Path } from '@moq/net'; +import { Readonlys } from '@moq/signals'; +import { Signal } from '@moq/signals'; +import * as Signals from '@moq/signals'; +import { Time } from '@moq/net'; + +declare namespace Audio_2 { + export { + DecoderInput, + DecoderProps, + Stats, + Decoder, + EmitterInput, + EmitterProps, + Emitter, + Target, + Supported, + SourceInput, + Source + } +} + +declare namespace Audio_3 { + export { + DecoderInput, + DecoderProps, + Stats, + Decoder, + EmitterInput, + EmitterProps, + Emitter, + Target, + Supported, + SourceInput, + Source + } +} + +export class Broadcast { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + relativeBroadcast(effect: Effect, rel: Path.Relative | undefined): Net.Broadcast.Consumer | undefined; +} + +export type BroadcastInput = { + origin: Getter; + enabled: Getter; + name: Getter; + announced: Getter; + catalogFormat: Getter; + catalog: Getter; +}; + +type BroadcastOutput = { + status: Signal; + active: Signal; + catalog: Signal; +}; + +export { BufferedRange } + +export { BufferedRanges } + +export const CATALOG_FORMATS: readonly ["hang", "msf", "hangz", "manual"]; + +export type CatalogFormat = (typeof CATALOG_FORMATS)[number]; + +class Decoder { + constructor(props: DecoderProps); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + reset(): void; + readonly source: Source; + static supported: typeof supported; + readonly sync: Sync; +} + +class Decoder_2 { + constructor(props: DecoderProps_2); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + readonly source: Source_3; + static supported: typeof supported_2; + readonly sync: Sync; +} + +type DecoderInput = { + enabled: Getter; +}; + +type DecoderInput_2 = { + enabled: Getter; +}; + +type DecoderOutput = { + context: Signal; + root: Signal; + sampleRate: Signal; + stats: Signal; + timestamp: Signal; + stalled: Signal; + buffered: Signal; +}; + +type DecoderOutput_2 = { + frame: Signal; + timestamp: Signal; + display: Signal<{ + width: number; + height: number; + } | undefined>; + stalled: Signal; + stats: Signal; + jitter: Signal; + buffered: Signal; +}; + +type DecoderProps = Inputs & { + source: Source; + sync: Sync; +}; + +type DecoderProps_2 = Inputs & { + source: Source_3; + sync: Sync; +}; + +export type Delay = "instant" | "auto" | Time.Milli; + +class Emitter { + constructor(props: EmitterProps); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; + readonly source: Decoder; +} + +type EmitterInput = { + volume: Getter; + muted: Getter; + paused: Getter; +}; + +type EmitterOutput = { + enabled: Signal; +}; + +type EmitterProps = Inputs & { + source: Decoder; +}; + +export { Hang } + +export { Net } + +export class Player { + constructor(props?: PlayerProps); + readonly audio: Audio_3.Decoder; + readonly broadcast: Broadcast; + close(): void; + readonly emitter: Audio_3.Emitter; + readonly in: Readonlys; + readonly renderer: Video_2.Renderer; + reset(): void; + readonly sync: Sync; + readonly text: Text_3.Source; + readonly textRenderer: Text_3.Renderer; + readonly video: Video_2.Decoder; +} + +export type PlayerInput = { + origin: Getter; + name: Getter; + enabled: Getter; + announced: Getter; + catalogFormat: Getter; + catalog: Getter; + probe: Getter; + canvas: Getter; + container: Getter; + paused: Getter; + volume: Getter; + muted: Getter; + visible: Getter; + delay: Getter; + buffer: Getter; + target: Getter; + captions: Getter; +}; + +export type PlayerProps = Inputs; + +function renderable(config: Catalog.TextConfig): boolean; + +class Renderer { + constructor(props: RendererProps); + close(): void; + readonly in: Readonlys; + readonly source: Source_2; + readonly sync: Sync; +} + +class Renderer_2 { + constructor(props: RendererProps_2); + close(): void; + readonly decoder: Decoder_2; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type RendererInput = { + container: Getter; + enabled: Getter; +}; + +type RendererInput_2 = { + canvas: Getter; + visible: Getter; +}; + +type RendererOutput = { + frame: Signal; + timestamp: Signal; + visible: Signal; +}; + +type RendererProps = Inputs & { + source: Source_2; + sync: Sync; +}; + +type RendererProps_2 = Inputs & { + decoder: Decoder_2; +}; + +export { Signals } + +class Source { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +class Source_2 { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +class Source_3 { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + readonly out: Readonlys; +} + +type SourceError = "unsupported"; + +type SourceInput = { + broadcast: Getter; + target: Getter; + supported: Getter; +}; + +type SourceInput_2 = { + broadcast: Getter; + target: Getter; +}; + +type SourceInput_3 = { + broadcast: Getter; + target: Getter; + supported: Getter; + probe: Getter; +}; + +type SourceOutput = { + catalog: Signal; + available: Signal>; + track: Signal; + config: Signal; + jitter: Signal; +}; + +type SourceOutput_2 = { + catalog: Signal; + available: Signal>; + track: Signal; + config: Signal; +}; + +type SourceOutput_3 = { + catalog: Signal; + available: Signal>; + error: Signal; + track: Signal; + config: Signal; +}; + +interface Stats { + bytesReceived: number; +} + +interface Stats_2 { + bytesReceived: number; + frameCount: number; +} + +type Status = "offline" | "loading" | "live"; + +type Supported = (config: Catalog.AudioConfig) => Promise; + +function supported(config: Catalog.AudioConfig): Promise; + +type Supported_2 = (config: Catalog.VideoConfig) => Promise; + +function supported_2(config: Catalog.VideoConfig): Promise; + +export class Sync { + constructor(props?: Inputs); + close(): void; + readonly in: Readonlys; + now(): Time.Milli | undefined; + readonly out: Readonlys; + received(timestamp: Time.Milli, label?: string): void; + register(jitter: Getter): Dispose; + reset(): void; + wait(timestamp: Time.Milli): Promise; +} + +export type SyncInput = { + delay: Getter; + buffer: Getter; + probe: Getter; +}; + +type SyncOutput = { + reference: Signal; + delay: Signal; + jitter: Signal; + timestamp: Signal; + buffered: Signal; + maxAge: Signal; +}; + +type Target = { + name?: string; +}; + +type Target_2 = { + name?: string; + pixels?: number; + width?: number; + height?: number; + bitrate?: number; +}; + +declare namespace Text_2 { + export { + RendererInput, + RendererProps, + Renderer, + renderable, + SourceInput_2 as SourceInput, + Source_2 as Source + } +} + +declare namespace Text_3 { + export { + RendererInput, + RendererProps, + Renderer, + renderable, + SourceInput_2 as SourceInput, + Source_2 as Source + } +} + +declare namespace Video { + export { + DecoderInput_2 as DecoderInput, + DecoderProps_2 as DecoderProps, + Stats_2 as Stats, + Decoder_2 as Decoder, + Visible, + RendererInput_2 as RendererInput, + RendererProps_2 as RendererProps, + Renderer_2 as Renderer, + Supported_2 as Supported, + SourceError, + Target_2 as Target, + SourceInput_3 as SourceInput, + Source_3 as Source + } +} + +declare namespace Video_2 { + export { + DecoderInput_2 as DecoderInput, + DecoderProps_2 as DecoderProps, + Stats_2 as Stats, + Decoder_2 as Decoder, + Visible, + RendererInput_2 as RendererInput, + RendererProps_2 as RendererProps, + Renderer_2 as Renderer, + Supported_2 as Supported, + SourceError, + Target_2 as Target, + SourceInput_3 as SourceInput, + Source_3 as Source + } +} + +type Visible = "never" | "always" | (string & {}); + + +``` diff --git a/js/watch/api/support-element.api.md b/js/watch/api/support-element.api.md new file mode 100644 index 00000000000..8bd388f3efc --- /dev/null +++ b/js/watch/api/support-element.api.md @@ -0,0 +1,27 @@ +## API Report File for "@moq/watch" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +class MoqWatchSupport extends HTMLElement { + constructor(); + attributeChangedCallback(name: Observed, _oldValue: string | null, newValue: string | null): void; + connectedCallback(): void; + get details(): boolean; + set details(details: boolean); + disconnectedCallback(): void; + static observedAttributes: readonly ["show", "details"]; + get show(): Show; + set show(show: Show); +} +export default MoqWatchSupport; + +const OBSERVED: readonly ["show", "details"]; + +type Observed = (typeof OBSERVED)[number]; + +export type Show = "always" | "warning" | "error" | "never"; + + +``` diff --git a/js/watch/api/support.api.md b/js/watch/api/support.api.md new file mode 100644 index 00000000000..efa7f88c64d --- /dev/null +++ b/js/watch/api/support.api.md @@ -0,0 +1,43 @@ +## API Report File for "@moq/watch" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +type Audio_2 = { + aac: boolean; + opus: Level; +}; +export { Audio_2 as Audio } + +export type Codec = { + hardware?: boolean; + software: boolean; +}; + +export type Full = { + webtransport: Level; + audio: { + decoding: Audio_2; + render: boolean; + }; + video: { + decoding: Video | undefined; + render: boolean; + }; +}; + +export function isSupported(): Promise; + +export type Level = "full" | "partial" | "none"; + +export type Video = { + h264: Codec; + h265: Codec; + vp8: Codec; + vp9: Codec; + av1: Codec; +}; + + +``` diff --git a/js/watch/api/ui.api.md b/js/watch/api/ui.api.md new file mode 100644 index 00000000000..b98b4dab9e2 --- /dev/null +++ b/js/watch/api/ui.api.md @@ -0,0 +1,15 @@ +## API Report File for "@moq/watch" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +class MoqWatchUi extends HTMLElement { + constructor(); + connectedCallback(): void; + disconnectedCallback(): void; +} +export default MoqWatchUi; + + +``` diff --git a/package.json b/package.json index 441d42acb4f..1852abae1e5 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "devDependencies": { "@babel/parser": "^8.0.6", "@biomejs/biome": "^2.5.14", + "@microsoft/api-extractor": "7.59.4", "concurrently": "^10.0.5", "markdown-extensions": "^2.0.0", "publint": "^0.3.24",