diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..00c0cf403 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,226 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + + - package-ecosystem: npm + directory: /apps/automated + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /apps/automated/src/pages + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /apps/automated/src/ui/lifecycle + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /apps/automated/src/ui/root-view/mymodule + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /apps/automated/src/xml-declaration/mymodulewithxml + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /apps/automated/src/xml-declaration + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /apps/toolbox + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /apps/ui + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: / + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/core/css-value + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/core/css + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/core/js-libs/easysax + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/core + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/devtools + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/types-android + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/types-ios + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/types-minimal + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/types + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/ui-mobile-base + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/webpack5 + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/winter-tc + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /tools/workspace-plugin + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] \ No newline at end of file diff --git a/.github/workflows/apps_automated_android.yml b/.github/workflows/apps_automated_android.yml index 18c2fa751..0a6e307f3 100644 --- a/.github/workflows/apps_automated_android.yml +++ b/.github/workflows/apps_automated_android.yml @@ -23,25 +23,25 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 23.5.0 - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@v4 + uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 with: main-branch-name: 'main' - - uses: actions/setup-java@v4 + - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 with: distribution: 'temurin' java-version: '21' - name: Install Python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: '3' @@ -65,7 +65,7 @@ jobs: sudo udevadm trigger --name-match=kvm - name: Run tests on Android Emulator - uses: reactivecircus/android-emulator-runner@v2 + uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0 with: api-level: 35 arch: x86_64 diff --git a/.github/workflows/apps_automated_ios.yml b/.github/workflows/apps_automated_ios.yml index e726f6c25..9c58fc53f 100644 --- a/.github/workflows/apps_automated_ios.yml +++ b/.github/workflows/apps_automated_ios.yml @@ -24,17 +24,17 @@ jobs: runs-on: warp-macos-15-arm64-6x steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 # - name: ActionDebugger By Warpbuild # uses: Warpbuilds/action-debugger@v1.3 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 23.5.0 - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@v4 + uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 with: main-branch-name: 'main' @@ -52,7 +52,7 @@ jobs: run: npx nx run-many --target=test --configuration=ci --projects=core - name: Start iOS Simulator - uses: futureware-tech/simulator-action@v4 + uses: futureware-tech/simulator-action@dab10d813144ef59b48d401cd95da151222ef8cd # v4 with: model: 'iPhone 16 Pro' os_version: '18.4' diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 000000000..46f3e79e6 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,22 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, +# surfacing known-vulnerable versions of the packages declared or updated in the PR. +# Once installed, if the workflow run is marked as required, +# PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + - name: 'Dependency Review' + uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3 # v4.8.0 \ No newline at end of file diff --git a/.github/workflows/npm_release_core.yml b/.github/workflows/npm_release_core.yml index 6c7e8bea4..87b124924 100644 --- a/.github/workflows/npm_release_core.yml +++ b/.github/workflows/npm_release_core.yml @@ -19,13 +19,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: audit + + - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: Setup run: npm run setup - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@v4 + uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 with: main-branch-name: 'main' @@ -40,7 +45,7 @@ jobs: # TODO: build ui-mobile-base first - name: Build @nativescript/core - run: npx nx run core:build.npm + run: npx nx build core - name: Publish @nativescript/core working-directory: dist/packages/core diff --git a/.github/workflows/npm_release_tns_core.yml b/.github/workflows/npm_release_tns_core.yml index d4551f046..62fdbfcc4 100644 --- a/.github/workflows/npm_release_tns_core.yml +++ b/.github/workflows/npm_release_tns_core.yml @@ -18,7 +18,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: audit + + - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: Setup run: npm install diff --git a/.github/workflows/npm_release_types.yml b/.github/workflows/npm_release_types.yml index 3fe4e8f69..1e3081722 100644 --- a/.github/workflows/npm_release_types.yml +++ b/.github/workflows/npm_release_types.yml @@ -18,10 +18,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: audit + - name: Todo run: | echo "TODO: implement action" -# - uses: actions/checkout@v2 +# - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 # # - name: Setup # run: npm install diff --git a/.github/workflows/npm_release_webpack.yml b/.github/workflows/npm_release_webpack.yml index 85c0820e0..ae82ba37f 100644 --- a/.github/workflows/npm_release_webpack.yml +++ b/.github/workflows/npm_release_webpack.yml @@ -17,7 +17,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: audit + + - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: Setup run: npm install diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index 837d6bdff..62067f835 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -39,7 +39,7 @@ jobs: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 + uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 with: results_file: results.sarif results_format: sarif @@ -64,7 +64,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: SARIF file path: results.sarif @@ -73,6 +73,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@v3 + uses: github/codeql-action/upload-sarif@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0 with: sarif_file: results.sarif diff --git a/README.md b/README.md index 4673180aa..02b3bc665 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,34 @@ [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FNativeScript%2FNativeScript.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FNativeScript%2FNativeScript?ref=badge_large) +## Quick Start + +To get started with NativeScript, follow these steps: + +1. **Install the NativeScript CLI globally:** + ```bash + npm install -g nativescript + ``` + +2. **Create a new project:** + ```bash + ns create my-app + ``` + +3. **Navigate into your project directory:** + ```bash + cd my-app + ``` + +4. **Run your app on an emulator or device:** + ```bash + ns run android + ``` + or + ```bash + ns run ios + ``` + ## Contribute 1. [Setup your local development environment](https://docs.nativescript.org/setup/) diff --git a/apps/automated/src/ui/text-field/text-field-tests.ts b/apps/automated/src/ui/text-field/text-field-tests.ts index dd7193a83..72309f8b6 100644 --- a/apps/automated/src/ui/text-field/text-field-tests.ts +++ b/apps/automated/src/ui/text-field/text-field-tests.ts @@ -328,6 +328,32 @@ export var testSetKeyboardTypeNumberAndSecure = function () { }); }; +export var testSetSecureAndKeyboardTypeDecimal = function () { + helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array) { + var textField = views[0]; + + textField.secure = true; + textField.keyboardType = 'decimal'; + + var expectedValue = true; + var actualValue = getNativeSecure(textField); + TKUnit.assert(actualValue === expectedValue, 'Actual: ' + actualValue + '; Expected: ' + expectedValue); + }); +}; + +export var testSetKeyboardTypeDecimalAndSecure = function () { + helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array) { + var textField = views[0]; + + textField.keyboardType = 'decimal'; + textField.secure = true; + + var expectedValue = true; + var actualValue = getNativeSecure(textField); + TKUnit.assert(actualValue === expectedValue, 'Actual: ' + actualValue + '; Expected: ' + expectedValue); + }); +}; + export var testBindSecureDirectlyToModel = function () { helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array) { var textField = views[0]; diff --git a/package-lock.json b/package-lock.json index 71912692c..10f7fb1d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "dotenv": "~16.4.0", "dotenv-webpack": "^7.0.0", "emoji-regex": "^10.3.0", - "enhanced-resolve": "^5.8.3", + "enhanced-resolve": "^5.18.3", "eslint": "~8.57.0", "eslint-config-prettier": "^10.0.0", "fork-ts-checker-webpack-plugin": "^7.0.0", @@ -13165,9 +13165,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", - "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index ccc97c5e6..85b46956c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "dotenv": "~16.4.0", "dotenv-webpack": "^7.0.0", "emoji-regex": "^10.3.0", - "enhanced-resolve": "^5.8.3", + "enhanced-resolve": "^5.18.3", "eslint": "~8.57.0", "eslint-config-prettier": "^10.0.0", "fork-ts-checker-webpack-plugin": "^7.0.0", @@ -113,4 +113,4 @@ "npx prettier --write" ] } -} +} \ No newline at end of file diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 51add32f7..145f9b731 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,3 +1,24 @@ +## 8.9.9 (2025-09-09) + +### 🚀 Features + +- **TextField:** decimal keyboardType ([#10789](https://github.com/NativeScript/NativeScript/pull/10789)) +- iOS 26 types with improvements (ActionBar, Switch) + .ns-{platform}-{sdkVersion} css root scoping ([#10775](https://github.com/NativeScript/NativeScript/pull/10775)) + +### 🩹 Fixes + +- **android:** shared element with target name already added to transaction ([#10793](https://github.com/NativeScript/NativeScript/pull/10793)) + +### ❤️ Thank You + +- Nathan Walker + +## 8.9.8 (2025-09-09) + +### 🩹 Fixes + +- transient package update + ## 8.9.7 (2025-07-26) ### 🩹 Fixes diff --git a/packages/core/core-types/index.ts b/packages/core/core-types/index.ts index b4dbf39a5..acf33ca79 100644 --- a/packages/core/core-types/index.ts +++ b/packages/core/core-types/index.ts @@ -40,11 +40,12 @@ export namespace CoreTypes { unit: 'px', }; - export type KeyboardInputType = 'datetime' | 'phone' | 'number' | 'url' | 'email' | 'integer'; + export type KeyboardInputType = 'datetime' | 'phone' | 'number' | 'decimal' | 'url' | 'email' | 'integer'; export namespace KeyboardType { export const datetime = 'datetime'; export const phone = 'phone'; export const number = 'number'; + export const decimal = 'decimal'; export const url = 'url'; export const email = 'email'; export const integer = 'integer'; diff --git a/packages/core/globals/index.ts b/packages/core/globals/index.ts index 5f8cc36bb..70be07000 100644 --- a/packages/core/globals/index.ts +++ b/packages/core/globals/index.ts @@ -353,6 +353,7 @@ if (!global.NativeScriptHasPolyfilled) { glb.FormData = xhrImpl.FormData; glb.Blob = xhrImpl.Blob; glb.File = xhrImpl.File; + glb.FileReader = xhrImpl.FileReader; // fetch glb.fetch = fetchPolyfill.fetch; diff --git a/packages/core/index.d.ts b/packages/core/index.d.ts index 34bfd0b4e..adc95121c 100644 --- a/packages/core/index.d.ts +++ b/packages/core/index.d.ts @@ -42,6 +42,7 @@ export * as Http from './http'; export { ImageAsset } from './image-asset'; export type { ImageAssetOptions } from './image-asset'; export { ImageSource } from './image-source'; +export type { iosSymbolScaleType } from './image-source'; export { ModuleNameResolver } from './module-name-resolver'; export { _setResolver } from './module-name-resolver/helpers'; export type { PlatformContext } from './module-name-resolver'; diff --git a/packages/core/index.ts b/packages/core/index.ts index 7e25f6706..a50e888d3 100644 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -32,6 +32,7 @@ export * as Http from './http'; export { ImageAsset } from './image-asset'; export type { ImageAssetOptions } from './image-asset'; export { ImageSource } from './image-source'; +export type { iosSymbolScaleType } from './image-source'; export { ModuleNameResolver } from './module-name-resolver'; export { _setResolver } from './module-name-resolver/helpers'; export type { PlatformContext } from './module-name-resolver'; diff --git a/packages/core/inspector_modules.ts b/packages/core/inspector_modules.ts index af69d6f88..9c39b37fc 100644 --- a/packages/core/inspector_modules.ts +++ b/packages/core/inspector_modules.ts @@ -1,25 +1,14 @@ import './globals'; - import './debugger/webinspector-network'; import './debugger/webinspector-dom'; import './debugger/webinspector-css'; -// require('./debugger/webinspector-network'); -// require('./debugger/webinspector-dom'); -// require('./debugger/webinspector-css'); - -/** - * Source map remapping for stack traces for the runtime in-flight error displays - * Currently this is very slow. Need to find much faster way to remap stack traces. - * NOTE: This likely should not be in core because errors can happen on boot before core is fully loaded. Ideally the runtime should provide this in full but unsure. - */ import { File, knownFolders } from './file-system'; // import/destructure style helps commonjs/esm build issues import * as sourceMapJs from 'source-map-js'; const { SourceMapConsumer } = sourceMapJs; -// note: webpack config can by default use 'source-map' files with runtimes v9+ +// note: bundlers can by default use 'source-map' files with runtimes v9+ // helps avoid having to decode the inline base64 source maps -// currently same performance on inline vs file source maps so file source maps may just be cleaner const usingSourceMapFiles = true; let loadedSourceMaps: Map; let consumerCache: Map; @@ -30,9 +19,13 @@ function getConsumer(mapPath: string, sourceMap: any) { } let c = consumerCache.get(mapPath); if (!c) { - // parse once - c = new SourceMapConsumer(sourceMap); - consumerCache.set(mapPath, c); + try { + c = new SourceMapConsumer(sourceMap); + consumerCache.set(mapPath, c); + } catch (error) { + console.error(`Failed to create SourceMapConsumer for ${mapPath}:`, error); + return null; + } } return c; } @@ -43,35 +36,43 @@ function loadAndExtractMap(mapPath: string) { loadedSourceMaps = new Map(); } let mapText = loadedSourceMaps.get(mapPath); - // Note: not sure if separate source map files or inline is better - // need to test build times one way or other with webpack, vite and rspack - // but this handles either way if (mapText) { return mapText; // already loaded } else { if (File.exists(mapPath)) { - const contents = File.fromPath(mapPath).readTextSync(); - if (usingSourceMapFiles) { - mapText = contents; - } else { - // parse out the inline base64 - const match = contents.match(/\/\/[#@] sourceMappingURL=data:application\/json[^,]+,(.+)$/); - const base64 = match[1]; - const binary = atob(base64); - // this is the raw text of the source map - // seems to work without doing the decodeURIComponent trick - mapText = binary; - // // escape each char code into %XX and let decodeURIComponent build the UTF-8 string - // mapText = decodeURIComponent( - // binary - // .split('') - // .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)) - // .join('') - // ); + try { + const contents = File.fromPath(mapPath).readTextSync(); + + // Note: we may want to do this, keeping for reference if needed in future. + // Check size before processing (skip very large source maps) + // const maxSizeBytes = 10 * 1024 * 1024; // 10MB limit + // if (contents.length > maxSizeBytes) { + // console.warn(`Source map ${mapPath} is too large (${contents.length} bytes), skipping...`); + // return null; + // } + + if (usingSourceMapFiles) { + mapText = contents; + } else { + // parse out the inline base64 + const match = contents.match(/\/\/[#@] sourceMappingURL=data:application\/json[^,]+,(.+)$/); + if (!match) { + console.warn(`Invalid source map format in ${mapPath}`); + return null; + } + const base64 = match[1]; + const binary = atob(base64); + // this is the raw text of the source map + // seems to work without doing decodeURIComponent tricks + mapText = binary; + } + } catch (error) { + console.error(`Failed to load source map ${mapPath}:`, error); + return null; } } else { // no source maps - return { source: null, line: 0, column: 0 }; + return null; } } loadedSourceMaps.set(mapPath, mapText); // cache it @@ -80,9 +81,10 @@ function loadAndExtractMap(mapPath: string) { function remapFrame(file: string, line: number, column: number) { /** - * webpack config can use source map files or inline. + * bundlers can use source map files or inline. * To use source map files, run with `--env.sourceMap=source-map`. - * @nativescript/webpack 5.1 enables `source-map` files by default when using runtimes v9+. + * Notes: + * Starting with @nativescript/webpack 5.0.25, `source-map` files are used by default when using runtimes v9+. */ const appPath = knownFolders.currentApp().path; @@ -92,10 +94,23 @@ function remapFrame(file: string, line: number, column: number) { } const mapPath = `${appPath}/${file.replace('file:///app/', '')}${sourceMapFileExt}`; - // 3) hand it to the consumer const sourceMap = loadAndExtractMap(mapPath); + + if (!sourceMap) { + return { source: null, line: 0, column: 0 }; + } + const consumer = getConsumer(mapPath, sourceMap); - return consumer.originalPositionFor({ line, column }); + if (!consumer) { + return { source: null, line: 0, column: 0 }; + } + + try { + return consumer.originalPositionFor({ line, column }); + } catch (error) { + console.error(`Failed to get original position for ${file}:${line}:${column}:`, error); + return { source: null, line: 0, column: 0 }; + } } function remapStack(raw: string): string { @@ -103,21 +118,32 @@ function remapStack(raw: string): string { const out = lines.map((line) => { const m = /\((.+):(\d+):(\d+)\)/.exec(line); if (!m) return line; - const [_, file, l, c] = m; - const orig = remapFrame(file, +l, +c); - if (!orig.source) return line; - return line.replace(/\(.+\)/, `(${orig.source}:${orig.line}:${orig.column})`); + + try { + const [_, file, l, c] = m; + const orig = remapFrame(file, +l, +c); + if (!orig.source) return line; + return line.replace(/\(.+\)/, `(${orig.source}:${orig.line}:${orig.column})`); + } catch (error) { + console.error('Failed to remap stack frame:', line, error); + return line; // return original line if remapping fails + } }); return out.join('\n'); } /** - * Added in 9.0 runtimes. - * Allows the runtime to remap stack traces before displaying them in the in-flight error screens. + * Added with 9.0 runtimes. + * Allows the runtime to remap stack traces before displaying them via in-flight error screens. */ (global as any).__ns_remapStack = (rawStack: string) => { // console.log('Remapping stack trace...'); - return remapStack(rawStack); + try { + return remapStack(rawStack); + } catch (error) { + console.error('Failed to remap stack trace, returning original:', error); + return rawStack; // fallback to original stack trace + } }; /** * End of source map remapping for stack traces diff --git a/packages/core/ui/button/index.android.ts b/packages/core/ui/button/index.android.ts index 16e294b65..76d0b5f0d 100644 --- a/packages/core/ui/button/index.android.ts +++ b/packages/core/ui/button/index.android.ts @@ -73,6 +73,8 @@ export class Button extends ButtonBase { public initNativeView(): void { super.initNativeView(); const nativeView = this.nativeViewProtected; + // make consistent with iOS, easier on users given css styling + nativeView.setAllCaps(false); initializeClickListener(); const clickListener = new ClickListener(this); nativeView.setOnClickListener(clickListener); diff --git a/packages/core/ui/core/properties/index.ts b/packages/core/ui/core/properties/index.ts index c4410e7f3..3d2b40ef9 100644 --- a/packages/core/ui/core/properties/index.ts +++ b/packages/core/ui/core/properties/index.ts @@ -12,9 +12,16 @@ import { calc } from '@csstools/css-calc'; export { unsetValue } from './property-shared'; const cssPropertyNames: string[] = []; +const HAS_OWN = Object.prototype.hasOwnProperty; const symbolPropertyMap = {}; const cssSymbolPropertyMap = {}; +// Hoisted regex/constants for hot paths to avoid re-allocation +const CSS_VARIABLE_NAME_RE = /^--[^,\s]+?$/; +const DIP_RE = /([0-9]+(\.[0-9]+)?)dip\b/g; +const UNSET_RE = /unset/g; +const INFINITY_RE = /infinity/g; + const inheritableProperties = new Array>(); const inheritableCssProperties = new Array>(); @@ -50,7 +57,7 @@ export function _getStyleProperties(): CssProperty[] { } export function isCssVariable(property: string) { - return /^--[^,\s]+?$/.test(property); + return CSS_VARIABLE_NAME_RE.test(property); } export function isCssCalcExpression(value: string) { @@ -119,27 +126,31 @@ export function _evaluateCssCalcExpression(value: string) { } else { return value; } + return value; } function _replaceDip(value: string) { - return value.replace(/([0-9]+(\.[0-9]+)?)dip\b/g, '$1'); + return value.replace(DIP_RE, '$1'); } function _replaceKeywordsWithValues(value: string) { let cssValue = value; if (cssValue.includes('unset')) { - cssValue = cssValue.replace(/unset/g, '0'); + cssValue = cssValue.replace(UNSET_RE, '0'); } if (cssValue.includes('infinity')) { - cssValue = cssValue.replace(/infinity/g, '999999'); + cssValue = cssValue.replace(INFINITY_RE, '999999'); } return cssValue; } function getPropertiesFromMap(map): Property[] | CssProperty[] { - const props = []; - Object.getOwnPropertySymbols(map).forEach((symbol) => props.push(map[symbol])); - + const symbols = Object.getOwnPropertySymbols(map); + const len = symbols.length; + const props = new Array(len); + for (let i = 0; i < len; i++) { + props[i] = map[symbols[i]]; + } return props; } @@ -240,13 +251,11 @@ export class Property implements TypedPropertyDescriptor< if (this._suspendedUpdates) { this._suspendedUpdates[propertyName] = property; } + } else if (defaultValueKey in this) { + this[setNative](this[defaultValueKey]); + delete this[defaultValueKey]; } else { - if (defaultValueKey in this) { - this[setNative](this[defaultValueKey]); - delete this[defaultValueKey]; - } else { - this[setNative](defaultValue); - } + this[setNative](defaultValue); } } } else { @@ -424,13 +433,11 @@ export class CoercibleProperty extends Property imp if (this._suspendedUpdates) { this._suspendedUpdates[propertyName] = property; } + } else if (defaultValueKey in this) { + this[setNative](this[defaultValueKey]); + delete this[defaultValueKey]; } else { - if (defaultValueKey in this) { - this[setNative](this[defaultValueKey]); - delete this[defaultValueKey]; - } else { - this[setNative](defaultValue); - } + this[setNative](defaultValue); } } } else { @@ -577,7 +584,10 @@ export class CssProperty { const propertyName = options.name; this.name = propertyName; - cssPropertyNames.push(options.cssName); + // Guard against undefined cssName + if (options.cssName) { + cssPropertyNames.push(options.cssName); + } this.cssName = `css:${options.cssName}`; this.cssLocalName = options.cssName; @@ -657,13 +667,11 @@ export class CssProperty { if (view._suspendedUpdates) { view._suspendedUpdates[propertyName] = property; } + } else if (defaultValueKey in this) { + view[setNative](this[defaultValueKey]); + delete this[defaultValueKey]; } else { - if (defaultValueKey in this) { - view[setNative](this[defaultValueKey]); - delete this[defaultValueKey]; - } else { - view[setNative](defaultValue); - } + view[setNative](defaultValue); } } } else { @@ -743,13 +751,11 @@ export class CssProperty { if (view._suspendedUpdates) { view._suspendedUpdates[propertyName] = property; } + } else if (defaultValueKey in this) { + view[setNative](this[defaultValueKey]); + delete this[defaultValueKey]; } else { - if (defaultValueKey in this) { - view[setNative](this[defaultValueKey]); - delete this[defaultValueKey]; - } else { - view[setNative](defaultValue); - } + view[setNative](defaultValue); } } } else { @@ -856,7 +862,9 @@ export class CssAnimationProperty implements CssAnimationPro const propertyName = options.name; this.name = propertyName; - cssPropertyNames.push(options.cssName); + if (options.cssName) { + cssPropertyNames.push(options.cssName); + } CssAnimationProperty.properties[propertyName] = this; if (options.cssName && options.cssName !== propertyName) { @@ -1143,21 +1151,19 @@ export class InheritedCssProperty extends CssProperty if (view._suspendedUpdates) { view._suspendedUpdates[propertyName] = property; } - } else { - if (unsetNativeValue) { - if (defaultValueKey in this) { - view[setNative](this[defaultValueKey]); - delete this[defaultValueKey]; - } else { - view[setNative](defaultValue); - } + } else if (unsetNativeValue) { + if (defaultValueKey in this) { + view[setNative](this[defaultValueKey]); + delete this[defaultValueKey]; } else { - if (!(defaultValueKey in this)) { - this[defaultValueKey] = view[getDefault] ? view[getDefault]() : defaultValue; - } - - view[setNative](value); + view[setNative](defaultValue); } + } else { + if (!(defaultValueKey in this)) { + this[defaultValueKey] = view[getDefault] ? view[getDefault]() : defaultValue; + } + + view[setNative](value); } } @@ -1356,6 +1362,7 @@ export function applyPendingNativeSetters(view: ViewBase): void { // TODO: Check what happens if a view was suspended and its value was reset, or set back to default! const suspendedUpdates = view._suspendedUpdates; for (const propertyName in suspendedUpdates) { + if (!HAS_OWN.call(suspendedUpdates, propertyName)) continue; const property = suspendedUpdates[propertyName]; const setNative = property.setNative; if (view[setNative]) { @@ -1523,9 +1530,11 @@ export function propagateInheritableCssProperties(parentStyle: Style, childStyle export function getSetProperties(view: ViewBase): [string, any][] { const result = []; - Object.getOwnPropertyNames(view).forEach((prop) => { + const ownProps = Object.getOwnPropertyNames(view); + for (let i = 0; i < ownProps.length; i++) { + const prop = ownProps[i]; result.push([prop, view[prop]]); - }); + } const symbols = Object.getOwnPropertySymbols(view); for (const symbol of symbols) { @@ -1545,7 +1554,9 @@ export function getComputedCssValues(view: ViewBase): [string, any][] { const result = []; const style = view.style; for (const prop of cssPropertyNames) { - result.push([prop, style[prop]]); + if (prop !== undefined && prop !== null) { + result.push([prop, style[prop]]); + } } // Add these to enable box model in chrome-devtools styles tab diff --git a/packages/core/ui/dialogs/index.ios.ts b/packages/core/ui/dialogs/index.ios.ts index d7a5c6e04..17c8642dc 100644 --- a/packages/core/ui/dialogs/index.ios.ts +++ b/packages/core/ui/dialogs/index.ios.ts @@ -30,11 +30,11 @@ function addButtonsToAlertController(alertController: UIAlertController, options } if (isString(options.okButtonText)) { - alertController.addAction( - UIAlertAction.actionWithTitleStyleHandler(options.okButtonText, UIAlertActionStyle.Default, () => { - raiseCallback(callback, true); - }), - ); + const action = UIAlertAction.actionWithTitleStyleHandler(options.okButtonText, UIAlertActionStyle.Default, () => { + raiseCallback(callback, true); + }); + alertController.addAction(action); + alertController.preferredAction = action; // Allows using keyboard enter/return to confirm the dialog } } diff --git a/packages/core/ui/editable-text-base/editable-text-base-common.ts b/packages/core/ui/editable-text-base/editable-text-base-common.ts index 166774899..346baf265 100644 --- a/packages/core/ui/editable-text-base/editable-text-base-common.ts +++ b/packages/core/ui/editable-text-base/editable-text-base-common.ts @@ -67,7 +67,7 @@ export const placeholderColorProperty = new CssProperty({ }); placeholderColorProperty.register(Style); -const keyboardTypeConverter = makeParser(makeValidator(CoreTypes.KeyboardType.datetime, CoreTypes.KeyboardType.phone, CoreTypes.KeyboardType.number, CoreTypes.KeyboardType.url, CoreTypes.KeyboardType.email, CoreTypes.KeyboardType.integer), true); +const keyboardTypeConverter = makeParser(makeValidator(CoreTypes.KeyboardType.datetime, CoreTypes.KeyboardType.phone, CoreTypes.KeyboardType.number, CoreTypes.KeyboardType.decimal, CoreTypes.KeyboardType.url, CoreTypes.KeyboardType.email, CoreTypes.KeyboardType.integer), true); export const autofillTypeProperty = new Property({ name: 'autofillType' }); autofillTypeProperty.register(EditableTextBase); diff --git a/packages/core/ui/editable-text-base/index.android.ts b/packages/core/ui/editable-text-base/index.android.ts index 6f5a1e972..8ff4a4e07 100644 --- a/packages/core/ui/editable-text-base/index.android.ts +++ b/packages/core/ui/editable-text-base/index.android.ts @@ -204,7 +204,7 @@ export abstract class EditableTextBase extends EditableTextBaseCommon { [keyboardTypeProperty.getDefault](): number { return this.nativeTextViewProtected.getInputType(); } - [keyboardTypeProperty.setNative](value: 'datetime' | 'phone' | 'number' | 'url' | 'email' | 'integer' | number) { + [keyboardTypeProperty.setNative](value: 'datetime' | 'phone' | 'number' | 'decimal' | 'url' | 'email' | 'integer' | number) { let newInputType; switch (value) { @@ -220,6 +220,10 @@ export abstract class EditableTextBase extends EditableTextBaseCommon { newInputType = android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_VARIATION_NORMAL | android.text.InputType.TYPE_NUMBER_FLAG_SIGNED | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL; break; + case 'decimal': + newInputType = android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL | android.text.InputType.TYPE_NUMBER_FLAG_SIGNED; + break; + case 'url': newInputType = android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_URI; break; diff --git a/packages/core/ui/editable-text-base/index.ios.ts b/packages/core/ui/editable-text-base/index.ios.ts index 305ddb359..e12efe3eb 100644 --- a/packages/core/ui/editable-text-base/index.ios.ts +++ b/packages/core/ui/editable-text-base/index.ios.ts @@ -34,7 +34,7 @@ export abstract class EditableTextBase extends EditableTextBaseCommon { return keyboardType.toString(); } } - [keyboardTypeProperty.setNative](value: 'datetime' | 'phone' | 'number' | 'url' | 'email' | 'integer' | string) { + [keyboardTypeProperty.setNative](value: 'datetime' | 'phone' | 'number' | 'decimal' | 'url' | 'email' | 'integer' | string) { let newKeyboardType: UIKeyboardType; switch (value) { case 'datetime': @@ -49,6 +49,10 @@ export abstract class EditableTextBase extends EditableTextBaseCommon { newKeyboardType = UIKeyboardType.NumbersAndPunctuation; break; + case 'decimal': + newKeyboardType = UIKeyboardType.DecimalPad; + break; + case 'url': newKeyboardType = UIKeyboardType.URL; break; diff --git a/packages/core/ui/frame/index.d.ts b/packages/core/ui/frame/index.d.ts index 4ff6a0f83..7e919904b 100644 --- a/packages/core/ui/frame/index.d.ts +++ b/packages/core/ui/frame/index.d.ts @@ -3,7 +3,7 @@ import type { NavigatedData, Page } from '../page'; import type { Observable, EventData } from '../../data/observable'; import type { Property, View } from '../core/view'; import type { Transition } from '../transition'; -import type { BackstackEntry } from './frame-interfaces'; +import type { BackstackEntry, NavigationData } from './frame-interfaces'; export * from './frame-interfaces'; diff --git a/packages/core/ui/index.ts b/packages/core/ui/index.ts index 8acfd27dc..08eb12f97 100644 --- a/packages/core/ui/index.ts +++ b/packages/core/ui/index.ts @@ -40,8 +40,8 @@ export type { DialogOptions, CancelableOptions, AlertOptions, PromptResult, Prom export * from './editable-text-base'; export { isEmbedded } from './embedding'; -export { Frame, setActivityCallbacks } from './frame'; -export type { NavigationEntry, NavigationContext, NavigationTransition, BackstackEntry, ViewEntry, AndroidActivityCallbacks } from './frame'; +export { Frame, setActivityCallbacks, NavigationType } from './frame'; +export type { NavigationEntry, NavigationContext, NavigationTransition, BackstackEntry, ViewEntry, AndroidActivityCallbacks, NavigationData } from './frame'; export { GesturesObserver, TouchAction, GestureTypes, GestureStateTypes, SwipeDirection, GestureEvents, TouchManager } from './gestures'; export type { GestureEventData, GestureEventDataWithState, TapGestureEventData, PanGestureEventData, PinchGestureEventData, RotationGestureEventData, SwipeGestureEventData, TouchGestureEventData, TouchAnimationOptions, VisionHoverOptions } from './gestures'; @@ -76,12 +76,17 @@ export { addTaggedAdditionalCSS, removeTaggedAdditionalCSS, resolveFileNameFromU export { Background } from './styling/background'; export type { CacheMode } from './styling/background'; export { parseCSSShadow } from './styling/css-shadow'; +export type { ShadowCSSValues } from './styling/css-shadow'; +export { parseCSSStroke } from './styling/css-stroke'; +export type { StrokeCSSValues } from './styling/css-stroke'; export { animationTimingFunctionConverter, timeConverter } from './styling/converters'; export { Font, FontStyle, FontWeight, FontVariationSettings } from './styling/font'; +export type { FontStyleType, FontWeightType, FontVariationSettingsType } from './styling/font-interfaces'; export { Style } from './styling/style'; export type { CommonLayoutParams } from './styling/style'; export * from './styling/style-properties'; export * from './styling/length-shared'; +export { LinearGradient } from './styling/linear-gradient'; export { CssAnimationParser, parseKeyframeDeclarations } from './styling/css-animation-parser'; export { CSSHelper } from './styling/css-selector'; diff --git a/packages/core/ui/layouts/index.d.ts b/packages/core/ui/layouts/index.d.ts deleted file mode 100644 index e6969f47b..000000000 --- a/packages/core/ui/layouts/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { AbsoluteLayout } from './absolute-layout'; -export { DockLayout } from './dock-layout'; -export { FlexboxLayout } from './flexbox-layout'; -export { GridLayout, GridUnitType, ItemSpec } from './grid-layout'; -export { RootLayout, getRootLayout, getRootLayoutById, RootLayoutOptions, ShadeCoverOptions } from './root-layout'; -export { StackLayout } from './stack-layout'; -export { WrapLayout } from './wrap-layout'; -export { LayoutBase } from './layout-base'; diff --git a/packages/core/ui/layouts/index.ts b/packages/core/ui/layouts/index.ts index c9ebfc358..79ab9ccc6 100644 --- a/packages/core/ui/layouts/index.ts +++ b/packages/core/ui/layouts/index.ts @@ -1,6 +1,7 @@ export { AbsoluteLayout } from './absolute-layout'; export { DockLayout } from './dock-layout'; export { FlexboxLayout } from './flexbox-layout'; +export type { FlexFlow, Flex, AlignSelf, FlexDirection, FlexWrap, JustifyContent, AlignItems, AlignContent } from './flexbox-layout'; export { GridLayout, GridUnitType, ItemSpec } from './grid-layout'; export { RootLayout, getRootLayout, getRootLayoutById } from './root-layout'; export type { RootLayoutOptions, ShadeCoverOptions } from './root-layout'; diff --git a/packages/core/ui/list-view/index.ios.ts b/packages/core/ui/list-view/index.ios.ts index d8356e2f8..bb609d0e5 100644 --- a/packages/core/ui/list-view/index.ios.ts +++ b/packages/core/ui/list-view/index.ios.ts @@ -1,7 +1,7 @@ import { ItemEventData, SearchEventData, ItemsSource } from '.'; import { ListViewBase, separatorColorProperty, itemTemplatesProperty, iosEstimatedRowHeightProperty, stickyHeaderProperty, stickyHeaderTemplateProperty, stickyHeaderHeightProperty, sectionedProperty, showSearchProperty, searchAutoHideProperty } from './list-view-common'; import { CoreTypes } from '../../core-types'; -import { View, KeyedTemplate, Template } from '../core/view'; +import { View, type KeyedTemplate, type Template } from '../core/view'; import { Length } from '../styling/length-shared'; import { Observable, EventData } from '../../data/observable'; import { Color } from '../../color'; diff --git a/packages/core/ui/text-field/index.android.ts b/packages/core/ui/text-field/index.android.ts index 04c5cf9d3..f3ca90085 100644 --- a/packages/core/ui/text-field/index.android.ts +++ b/packages/core/ui/text-field/index.android.ts @@ -78,6 +78,9 @@ export class TextField extends TextFieldBase { case 'number': inputType = android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_VARIATION_NORMAL | android.text.InputType.TYPE_NUMBER_FLAG_SIGNED | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL; break; + case 'decimal': + inputType = android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL | android.text.InputType.TYPE_NUMBER_FLAG_SIGNED; + break; case 'url': inputType = android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_URI; break; diff --git a/packages/core/ui/transition/page-transition.android.ts b/packages/core/ui/transition/page-transition.android.ts index 373a8ab7e..2950290a1 100644 --- a/packages/core/ui/transition/page-transition.android.ts +++ b/packages/core/ui/transition/page-transition.android.ts @@ -262,9 +262,22 @@ export class PageTransition extends Transition { newFragment.setSharedElementEnterTransition(transitionSet); newFragment.setSharedElementReturnTransition(transitionSet); + // Guard against duplicate shared element names being added to the same transaction + const addedSharedElementNames = new Set(); presenting.forEach((v) => { + const name = v?.sharedTransitionTag; + const nativeView = v?.nativeView; + if (!name || !nativeView || addedSharedElementNames.has(name)) { + // prevent duplicates or invalid items + return; + } setTransitionName(v); - fragmentTransaction.addSharedElement(v.nativeView, v.sharedTransitionTag); + try { + fragmentTransaction.addSharedElement(nativeView, name); + addedSharedElementNames.add(name); + } catch (err) { + // ignore duplicates or issues adding shared element to avoid crashing + } }); if (toPage.isLoaded) { onPageLoaded(); diff --git a/packages/types-android/src/lib/android/org.nativescript.widgets.d.ts b/packages/types-android/src/lib/android/org.nativescript.widgets.d.ts index 9a1a5eb62..9e3fa800f 100644 --- a/packages/types-android/src/lib/android/org.nativescript.widgets.d.ts +++ b/packages/types-android/src/lib/android/org.nativescript.widgets.d.ts @@ -294,6 +294,8 @@ export class GridLayout extends LayoutBase { constructor(context: android.content.Context); + public addRow(itemSpec: ItemSpec): void; + public addColumn(itemSpec: ItemSpec): void; public addRow(value: number, type: org.nativescript.widgets.GridUnitType): void; public addColumn(value: number, type: org.nativescript.widgets.GridUnitType): void; diff --git a/packages/types-ios/src/lib/ios/ios.d.ts b/packages/types-ios/src/lib/ios/ios.d.ts index 542fd04c2..6128e0469 100644 --- a/packages/types-ios/src/lib/ios/ios.d.ts +++ b/packages/types-ios/src/lib/ios/ios.d.ts @@ -1,4 +1,5 @@ /// +/// /// /// /// @@ -170,6 +171,7 @@ /// /// /// +/// /// /// /// diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!AVFAudio.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!AVFAudio.d.ts index 9e0cb6810..42da90c58 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!AVFAudio.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!AVFAudio.d.ts @@ -303,6 +303,11 @@ declare class AVAudioCompressedBuffer extends AVAudioBuffer { packetCount: number; + /** + * @since 26.0 + */ + readonly packetDependencies: interop.Pointer | interop.Reference; + readonly packetDescriptions: interop.Pointer | interop.Reference; constructor(o: { format: AVAudioFormat; packetCapacity: number; }); @@ -395,6 +400,11 @@ declare class AVAudioConverter extends NSObject { readonly applicableEncodeSampleRates: NSArray; + /** + * @since 26.0 + */ + audioSyncPacketFrequency: number; + readonly availableEncodeBitRates: NSArray; readonly availableEncodeChannelLayoutTags: NSArray; @@ -407,10 +417,20 @@ declare class AVAudioConverter extends NSObject { channelMap: NSArray; + /** + * @since 26.0 + */ + contentSource: AVAudioContentSource; + dither: boolean; downmix: boolean; + /** + * @since 26.0 + */ + dynamicRangeControlConfiguration: AVAudioDynamicRangeControlConfiguration; + readonly inputFormat: AVAudioFormat; magicCookie: NSData; @@ -2950,6 +2970,8 @@ declare class AVAudioSessionPortExtensionBluetoothMicrophone extends NSObject { static new(): AVAudioSessionPortExtensionBluetoothMicrophone; // inherited from NSObject + readonly farFieldCapture: AVAudioSessionCapability; + readonly highQualityRecording: AVAudioSessionCapability; } diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!AVFoundation.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!AVFoundation.d.ts index c0cdcf0ad..146c5631a 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!AVFoundation.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!AVFoundation.d.ts @@ -3004,6 +3004,31 @@ declare const enum AVCaptionUnitsType { */ declare var AVCaptionUseDropFrameTimeCodeKey: string; +/** + * @since 26.0 + */ +declare var AVCaptureAspectRatio16x9: string; + +/** + * @since 26.0 + */ +declare var AVCaptureAspectRatio1x1: string; + +/** + * @since 26.0 + */ +declare var AVCaptureAspectRatio3x4: string; + +/** + * @since 26.0 + */ +declare var AVCaptureAspectRatio4x3: string; + +/** + * @since 26.0 + */ +declare var AVCaptureAspectRatio9x16: string; + /** * @since 4.0 */ @@ -3153,7 +3178,9 @@ declare const enum AVCaptureColorSpace { HLG_BT2020 = 2, - AppleLog = 3 + AppleLog = 3, + + AppleLog2 = 4 } /** @@ -3626,6 +3653,10 @@ declare class AVCaptureDevice extends NSObject { */ readonly dualCameraSwitchOverVideoZoomFactor: number; + readonly dynamicAspectRatio: string; + + readonly dynamicDimensions: CMVideoDimensions; + /** * @since 8.0 */ @@ -3705,6 +3736,11 @@ declare class AVCaptureDevice extends NSObject { */ readonly focusRectOfInterestSupported: boolean; + /** + * @since 26.0 + */ + readonly followingExternalSyncDevice: boolean; + /** * @since 7.0 */ @@ -3806,6 +3842,16 @@ declare class AVCaptureDevice extends NSObject { */ readonly minFocusRectOfInterestSize: CGSize; + /** + * @since 26.0 + */ + readonly minSupportedExternalSyncFrameDuration: CMTime; + + /** + * @since 26.0 + */ + readonly minSupportedLockedVideoFrameDuration: CMTime; + /** * @since 15.0 */ @@ -3845,6 +3891,8 @@ declare class AVCaptureDevice extends NSObject { */ readonly reactionEffectsInProgress: NSArray; + readonly smartFramingMonitor: AVCaptureSmartFramingMonitor; + /** * @since 7.0 */ @@ -3904,6 +3952,11 @@ declare class AVCaptureDevice extends NSObject { readonly uniqueID: string; + /** + * @since 26.0 + */ + readonly videoFrameDurationLocked: boolean; + /** * @since 8.0 */ @@ -4059,6 +4112,8 @@ declare class AVCaptureDevice extends NSObject { */ setCinematicVideoTrackingFocusWithDetectedObjectIDFocusMode(detectedObjectID: number, focusMode: AVCaptureCinematicVideoFocusMode): void; + setDynamicAspectRatioCompletionHandler(dynamicAspectRatio: string, handler: (p1: CMTime, p2: NSError) => void): void; + /** * @since 8.0 */ @@ -4089,6 +4144,11 @@ declare class AVCaptureDevice extends NSObject { */ setWhiteBalanceModeLockedWithDeviceWhiteBalanceGainsCompletionHandler(whiteBalanceGains: AVCaptureWhiteBalanceGains, handler: (p1: CMTime) => void): void; + /** + * @since 26.0 + */ + setWhiteBalanceModeLockedWithDeviceWhiteBalanceTemperatureAndTintValuesCompletionHandler(whiteBalanceTemperatureAndTintValues: AVCaptureWhiteBalanceTemperatureAndTintValues, handler: (p1: CMTime) => void): void; + supportsAVCaptureSessionPreset(preset: string): boolean; /** @@ -4247,6 +4307,8 @@ declare class AVCaptureDeviceFormat extends NSObject { */ readonly secondaryNativeResolutionZoomFactors: NSArray; + readonly smartFramingSupported: boolean; + readonly spatialVideoCaptureSupported: boolean; /** @@ -4264,6 +4326,8 @@ declare class AVCaptureDeviceFormat extends NSObject { */ readonly supportedDepthDataFormats: NSArray; + readonly supportedDynamicAspectRatios: NSArray; + /** * @since 16.0 */ @@ -4387,6 +4451,8 @@ declare class AVCaptureDeviceFormat extends NSObject { * @since 8.0 */ isVideoStabilizationModeSupported(videoStabilizationMode: AVCaptureVideoStabilizationMode): boolean; + + videoFieldOfViewForAspectRatioGeometricDistortionCorrected(aspectRatio: string, geometricDistortionCorrected: boolean): number; } /** @@ -4400,6 +4466,16 @@ declare class AVCaptureDeviceInput extends AVCaptureInput { static new(): AVCaptureDeviceInput; // inherited from NSObject + /** + * @since 26.0 + */ + readonly activeExternalSyncVideoFrameDuration: CMTime; + + /** + * @since 26.0 + */ + activeLockedVideoFrameDuration: CMTime; + /** * @since 26.0 */ @@ -4412,6 +4488,21 @@ declare class AVCaptureDeviceInput extends AVCaptureInput { readonly device: AVCaptureDevice; + /** + * @since 26.0 + */ + readonly externalSyncDevice: AVExternalSyncDevice; + + /** + * @since 26.0 + */ + readonly externalSyncSupported: boolean; + + /** + * @since 26.0 + */ + readonly lockedVideoFrameDurationSupported: boolean; + /** * @since 18.0 */ @@ -4444,6 +4535,11 @@ declare class AVCaptureDeviceInput extends AVCaptureInput { constructor(o: { device: AVCaptureDevice; }); + /** + * @since 26.0 + */ + followExternalSyncDeviceVideoFrameDurationDelegate(externalSyncDevice: AVExternalSyncDevice, frameDuration: CMTime, delegate: AVExternalSyncDeviceDelegate): void; + initWithDeviceError(device: AVCaptureDevice): this; /** @@ -4455,6 +4551,11 @@ declare class AVCaptureDeviceInput extends AVCaptureInput { * @since 13.0 */ portsWithMediaTypeSourceDeviceTypeSourceDevicePosition(mediaType: string, sourceDeviceType: string, sourceDevicePosition: AVCaptureDevicePosition): NSArray; + + /** + * @since 26.0 + */ + unfollowExternalSyncDevice(): void; } /** @@ -4597,6 +4698,52 @@ declare const enum AVCaptureExposureMode { */ declare var AVCaptureExposureTargetBiasCurrent: number; +/** + * @since 26.0 + */ +declare class AVCaptureExternalDisplayConfiguration extends NSObject { + + static alloc(): AVCaptureExternalDisplayConfiguration; // inherited from NSObject + + static new(): AVCaptureExternalDisplayConfiguration; // inherited from NSObject + + bypassColorSpaceConversion: boolean; + + preferredResolution: CMVideoDimensions; + + shouldMatchFrameRate: boolean; +} + +/** + * @since 26.0 + */ +declare class AVCaptureExternalDisplayConfigurator extends NSObject { + + static alloc(): AVCaptureExternalDisplayConfigurator; // inherited from NSObject + + static new(): AVCaptureExternalDisplayConfigurator; // inherited from NSObject + + readonly active: boolean; + + readonly activeExternalDisplayFrameRate: number; + + readonly device: AVCaptureDevice; + + readonly previewLayer: CALayer; + + static readonly shouldMatchFrameRateSupported: boolean; + + static readonly supportsBypassingColorSpaceConversion: boolean; + + static readonly supportsPreferredResolution: boolean; + + constructor(o: { device: AVCaptureDevice; previewLayer: CALayer; configuration: AVCaptureExternalDisplayConfiguration; }); + + initWithDevicePreviewLayerConfiguration(device: AVCaptureDevice, previewLayer: CALayer, configuration: AVCaptureExternalDisplayConfiguration): this; + + stop(): void; +} + /** * @since 4.0 */ @@ -4693,6 +4840,20 @@ declare const enum AVCaptureFocusMode { ContinuousAutoFocus = 2 } +/** + * @since 26.0 + */ +declare class AVCaptureFraming extends NSObject { + + static alloc(): AVCaptureFraming; // inherited from NSObject + + static new(): AVCaptureFraming; // inherited from NSObject + + readonly aspectRatio: string; + + readonly zoomFactor: number; +} + /** * @since 8.0 */ @@ -5352,6 +5513,16 @@ declare class AVCapturePhotoOutput extends AVCaptureOutput { */ readonly cameraCalibrationDataDeliverySupported: boolean; + /** + * @since 26.0 + */ + cameraSensorOrientationCompensationEnabled: boolean; + + /** + * @since 26.0 + */ + readonly cameraSensorOrientationCompensationSupported: boolean; + /** * @since 17.0 */ @@ -6386,6 +6557,28 @@ declare class AVCaptureSlider extends AVCaptureControl { setActionQueueAction(actionQueue: NSObject & OS_dispatch_queue, action: (p1: number) => void): void; } +/** + * @since 26.0 + */ +declare class AVCaptureSmartFramingMonitor extends NSObject { + + static alloc(): AVCaptureSmartFramingMonitor; // inherited from NSObject + + static new(): AVCaptureSmartFramingMonitor; // inherited from NSObject + + enabledFramings: NSArray; + + readonly monitoring: boolean; + + readonly recommendedFraming: AVCaptureFraming; + + readonly supportedFramings: NSArray; + + startMonitoringWithError(): boolean; + + stopMonitoring(): void; +} + /** * @since 26.0 */ @@ -6425,6 +6618,16 @@ declare class AVCaptureStillImageOutput extends AVCaptureOutput { readonly availableImageDataCodecTypes: NSArray; + /** + * @since 26.0 + */ + cameraSensorOrientationCompensationEnabled: boolean; + + /** + * @since 26.0 + */ + readonly cameraSensorOrientationCompensationSupported: boolean; + /** * @since 5.0 */ @@ -6654,6 +6857,134 @@ declare class AVCaptureSystemZoomSlider extends AVCaptureControl { initWithDeviceAction(device: AVCaptureDevice, action: (p1: number) => void): this; } +interface AVCaptureTimecode { + hours: number; + minutes: number; + seconds: number; + frames: number; + userBits: number; + frameDuration: CMTime; + sourceType: AVCaptureTimecodeSourceType; +} +declare var AVCaptureTimecode: interop.StructType; + +/** + * @since 26.0 + */ +declare function AVCaptureTimecodeAdvancedByFrames(timecode: AVCaptureTimecode, framesToAdd: number): AVCaptureTimecode; + +/** + * @since 26.0 + */ +declare function AVCaptureTimecodeCreateMetadataSampleBufferAssociatedWithPresentationTimeStamp(timecode: AVCaptureTimecode, presentationTimeStamp: CMTime): interop.Unmanaged; + +/** + * @since 26.0 + */ +declare function AVCaptureTimecodeCreateMetadataSampleBufferForDuration(timecode: AVCaptureTimecode, duration: CMTime): interop.Unmanaged; + +/** + * @since 26.0 + */ +declare class AVCaptureTimecodeGenerator extends NSObject { + + static alloc(): AVCaptureTimecodeGenerator; // inherited from NSObject + + static new(): AVCaptureTimecodeGenerator; // inherited from NSObject + + readonly availableSources: NSArray; + + readonly currentSource: AVCaptureTimecodeSource; + + readonly delegate: AVCaptureTimecodeGeneratorDelegate; + + readonly delegateCallbackQueue: NSObject & OS_dispatch_queue; + + synchronizationTimeout: number; + + timecodeAlignmentOffset: number; + + timecodeFrameDuration: CMTime; + + static readonly frameCountSource: AVCaptureTimecodeSource; + + static readonly realTimeClockSource: AVCaptureTimecodeSource; + + generateInitialTimecode(): AVCaptureTimecode; + + setDelegateQueue(delegate: AVCaptureTimecodeGeneratorDelegate, callbackQueue: NSObject & OS_dispatch_queue): void; + + startSynchronizationWithTimecodeSource(source: AVCaptureTimecodeSource): void; +} + +/** + * @since 26.0 + */ +interface AVCaptureTimecodeGeneratorDelegate extends NSObjectProtocol { + + timecodeGeneratorDidReceiveUpdateFromSource(generator: AVCaptureTimecodeGenerator, timecode: AVCaptureTimecode, source: AVCaptureTimecodeSource): void; + + timecodeGeneratorDidUpdateAvailableSources(generator: AVCaptureTimecodeGenerator, availableSources: NSArray | AVCaptureTimecodeSource[]): void; + + timecodeGeneratorTransitionedToSynchronizationStatusForSource(generator: AVCaptureTimecodeGenerator, synchronizationStatus: AVCaptureTimecodeGeneratorSynchronizationStatus, source: AVCaptureTimecodeSource): void; +} +declare var AVCaptureTimecodeGeneratorDelegate: { + + prototype: AVCaptureTimecodeGeneratorDelegate; +}; + +/** + * @since 26.0 + */ +declare const enum AVCaptureTimecodeGeneratorSynchronizationStatus { + + Unknown = 0, + + SourceSelected = 1, + + Synchronizing = 2, + + Synchronized = 3, + + TimedOut = 4, + + SourceUnavailable = 5, + + SourceUnsupported = 6, + + NotRequired = 7 +} + +/** + * @since 26.0 + */ +declare class AVCaptureTimecodeSource extends NSObject implements NSCopying { + + static alloc(): AVCaptureTimecodeSource; // inherited from NSObject + + static new(): AVCaptureTimecodeSource; // inherited from NSObject + + readonly displayName: string; + + readonly type: AVCaptureTimecodeSourceType; + + readonly uuid: NSUUID; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +/** + * @since 26.0 + */ +declare const enum AVCaptureTimecodeSourceType { + + FrameCount = 0, + + RealTimeClock = 1, + + External = 2 +} + /** * @since 4.0 */ @@ -6729,6 +7060,11 @@ declare class AVCaptureVideoDataOutput extends AVCaptureOutput { */ availableVideoCodecTypesForAssetWriterWithOutputFileType(outputFileType: string): NSArray; + /** + * @since 26.0 + */ + recommendedMovieMetadataForVideoCodecTypeAssetWriterOutputFileType(videoCodecType: string, outputFileType: string): NSArray; + /** * @since 7.0 */ @@ -6913,6 +7249,8 @@ declare const enum AVCaptureVideoStabilizationMode { CinematicExtendedEnhanced = 5, + LowLatency = 6, + Auto = -1 } @@ -6952,6 +7290,31 @@ interface AVCaptureWhiteBalanceTemperatureAndTintValues { } declare var AVCaptureWhiteBalanceTemperatureAndTintValues: interop.StructType; +/** + * @since 26.0 + */ +declare var AVCaptureWhiteBalanceTemperatureAndTintValuesCloudy: AVCaptureWhiteBalanceTemperatureAndTintValues; + +/** + * @since 26.0 + */ +declare var AVCaptureWhiteBalanceTemperatureAndTintValuesDaylight: AVCaptureWhiteBalanceTemperatureAndTintValues; + +/** + * @since 26.0 + */ +declare var AVCaptureWhiteBalanceTemperatureAndTintValuesFluorescent: AVCaptureWhiteBalanceTemperatureAndTintValues; + +/** + * @since 26.0 + */ +declare var AVCaptureWhiteBalanceTemperatureAndTintValuesShadow: AVCaptureWhiteBalanceTemperatureAndTintValues; + +/** + * @since 26.0 + */ +declare var AVCaptureWhiteBalanceTemperatureAndTintValuesTungsten: AVCaptureWhiteBalanceTemperatureAndTintValues; + /** * @since 4.0 */ @@ -7827,7 +8190,13 @@ declare const enum AVError { ContentKeyRequestPlaybackDestinationDoesNotSupportDeviceIdentifierRandomization = -11888, - ContentKeyInvalid = -11889 + ContentKeyInvalid = -11889, + + NoSmartFramingsEnabled = -11890, + + AutoWhiteBalanceNotLocked = -11891, + + FollowExternalSyncDeviceTimedOut = -11892 } /** @@ -7952,6 +8321,74 @@ declare class AVExternalStorageDeviceDiscoverySession extends NSObject { static readonly supported: boolean; } +/** + * @since 26.0 + */ +declare class AVExternalSyncDevice extends NSObject { + + static alloc(): AVExternalSyncDevice; // inherited from NSObject + + static new(): AVExternalSyncDevice; // inherited from NSObject + + readonly clock: any; + + readonly productID: number; + + signalCompensationDelay: CMTime; + + readonly status: AVExternalSyncDeviceStatus; + + readonly uuid: NSUUID; + + readonly vendorID: number; +} + +/** + * @since 26.0 + */ +interface AVExternalSyncDeviceDelegate extends NSObjectProtocol { + + externalSyncDeviceFailedWithError?(device: AVExternalSyncDevice, error: NSError): void; + + externalSyncDeviceStatusDidChange?(device: AVExternalSyncDevice): void; +} +declare var AVExternalSyncDeviceDelegate: { + + prototype: AVExternalSyncDeviceDelegate; +}; + +/** + * @since 26.0 + */ +declare class AVExternalSyncDeviceDiscoverySession extends NSObject { + + static alloc(): AVExternalSyncDeviceDiscoverySession; // inherited from NSObject + + static new(): AVExternalSyncDeviceDiscoverySession; // inherited from NSObject + + readonly devices: NSArray; + + static readonly sharedSession: AVExternalSyncDeviceDiscoverySession; + + static readonly supported: boolean; +} + +/** + * @since 26.0 + */ +declare const enum AVExternalSyncDeviceStatus { + + Unavailable = 0, + + Ready = 1, + + Calibrating = 2, + + ActiveSync = 3, + + FreeRunSync = 4 +} + /** * @since 4.0 */ @@ -10271,16 +10708,41 @@ declare var AVMetadataIdentifierQuickTimeMetadataCameraFocalLength35mmEquivalent */ declare var AVMetadataIdentifierQuickTimeMetadataCameraFrameReadoutTime: string; +/** + * @since 26.0 + */ +declare var AVMetadataIdentifierQuickTimeMetadataCameraISOSensitivity: string; + /** * @since 8.0 */ declare var AVMetadataIdentifierQuickTimeMetadataCameraIdentifier: string; +/** + * @since 26.0 + */ +declare var AVMetadataIdentifierQuickTimeMetadataCameraLensIrisFNumber: string; + /** * @since 26.0 */ declare var AVMetadataIdentifierQuickTimeMetadataCameraLensModel: string; +/** + * @since 26.0 + */ +declare var AVMetadataIdentifierQuickTimeMetadataCameraShutterSpeedAngle: string; + +/** + * @since 26.0 + */ +declare var AVMetadataIdentifierQuickTimeMetadataCameraShutterSpeedTime: string; + +/** + * @since 26.0 + */ +declare var AVMetadataIdentifierQuickTimeMetadataCameraWhiteBalance: string; + /** * @since 26.0 */ @@ -10516,6 +10978,16 @@ declare var AVMetadataIdentifierQuickTimeMetadataTitle: string; */ declare var AVMetadataIdentifierQuickTimeMetadataVideoOrientation: string; +/** + * @since 26.0 + */ +declare var AVMetadataIdentifierQuickTimeMetadataWhiteBalanceByCCTColorMatrices: string; + +/** + * @since 26.0 + */ +declare var AVMetadataIdentifierQuickTimeMetadataWhiteBalanceByCCTWhiteBalanceFactors: string; + /** * @since 8.0 */ @@ -11370,16 +11842,41 @@ declare var AVMetadataQuickTimeMetadataKeyCameraFocalLength35mmEquivalent: strin */ declare var AVMetadataQuickTimeMetadataKeyCameraFrameReadoutTime: string; +/** + * @since 26.0 + */ +declare var AVMetadataQuickTimeMetadataKeyCameraISOSensitivity: string; + /** * @since 4.0 */ declare var AVMetadataQuickTimeMetadataKeyCameraIdentifier: string; +/** + * @since 26.0 + */ +declare var AVMetadataQuickTimeMetadataKeyCameraLensIrisFNumber: string; + /** * @since 26.0 */ declare var AVMetadataQuickTimeMetadataKeyCameraLensModel: string; +/** + * @since 26.0 + */ +declare var AVMetadataQuickTimeMetadataKeyCameraShutterSpeedAngle: string; + +/** + * @since 26.0 + */ +declare var AVMetadataQuickTimeMetadataKeyCameraShutterSpeedTime: string; + +/** + * @since 26.0 + */ +declare var AVMetadataQuickTimeMetadataKeyCameraWhiteBalance: string; + /** * @since 26.0 */ @@ -11555,6 +12052,16 @@ declare var AVMetadataQuickTimeMetadataKeySoftware: string; */ declare var AVMetadataQuickTimeMetadataKeyTitle: string; +/** + * @since 26.0 + */ +declare var AVMetadataQuickTimeMetadataKeyWhiteBalanceByCCTColorMatrices: string; + +/** + * @since 26.0 + */ +declare var AVMetadataQuickTimeMetadataKeyWhiteBalanceByCCTWhiteBalanceFactors: string; + /** * @since 4.0 */ @@ -16528,6 +17035,16 @@ declare var AVVideoCodecTypeAppleProRes4444: string; */ declare var AVVideoCodecTypeAppleProRes4444XQ: string; +/** + * @since 26.0 + */ +declare var AVVideoCodecTypeAppleProResRAW: string; + +/** + * @since 26.0 + */ +declare var AVVideoCodecTypeAppleProResRAWHQ: string; + /** * @since 11.0 */ diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!CallKit.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!CallKit.d.ts index 0a5c01315..179452055 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!CallKit.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!CallKit.d.ts @@ -704,21 +704,21 @@ declare class CXSetTranslatingCallAction extends CXCallAction implements NSSecur readonly isTranslating: boolean; - readonly localLocale: NSLocale; + readonly localLanguage: string; - readonly remoteLocale: NSLocale; + readonly remoteLanguage: string; static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding - constructor(o: { callUUID: NSUUID; isTranslating: boolean; localLocale: NSLocale; remoteLocale: NSLocale; }); + constructor(o: { callUUID: NSUUID; isTranslating: boolean; localLanguage: string; remoteLanguage: string; }); constructor(o: { coder: NSCoder; }); // inherited from NSCoding encodeWithCoder(coder: NSCoder): void; - fulfillWithTranslationEngine(translationEngine: CXTranslationEngine): void; + fulfillUsingTranslationEngine(translationEngine: CXTranslationEngine): void; - initWithCallUUIDIsTranslatingLocalLocaleRemoteLocale(uuid: NSUUID, isTranslating: boolean, localLocale: NSLocale, remoteLocale: NSLocale): this; + initWithCallUUIDIsTranslatingLocalLanguageRemoteLanguage(uuid: NSUUID, isTranslating: boolean, localLanguage: string, remoteLanguage: string): this; initWithCoder(coder: NSCoder): this; } @@ -785,5 +785,5 @@ declare const enum CXTranslationEngine { Default = 0, - External = 1 + Custom = 1 } diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!CoreVideo.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!CoreVideo.d.ts index 3ea848168..6a4abde37 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!CoreVideo.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!CoreVideo.d.ts @@ -905,6 +905,11 @@ declare var kCVImageBufferLogTransferFunctionKey: string; */ declare var kCVImageBufferLogTransferFunction_AppleLog: string; +/** + * @since 26.0 + */ +declare var kCVImageBufferLogTransferFunction_AppleLog2: string; + /** * @since 11.0 */ @@ -1115,6 +1120,11 @@ declare var kCVPixelBufferIOSurfaceOpenGLESTextureCompatibilityKey: string; */ declare var kCVPixelBufferIOSurfacePropertiesKey: string; +/** + * @since 15.0 + */ +declare var kCVPixelBufferIOSurfacePurgeableKey: string; + /** * @since 4.0 */ @@ -1430,6 +1440,8 @@ declare const kCVPixelFormatType_30RGB: number; declare const kCVPixelFormatType_30RGBLEPackedWideGamut: number; +declare const kCVPixelFormatType_30RGBLE_8A_BiPlanar: number; + declare const kCVPixelFormatType_30RGB_r210: number; declare const kCVPixelFormatType_32ABGR: number; @@ -1538,6 +1550,10 @@ declare const kCVPixelFormatType_DisparityFloat16: number; declare const kCVPixelFormatType_DisparityFloat32: number; +declare const kCVPixelFormatType_Lossless_30RGBLEPackedWideGamut: number; + +declare const kCVPixelFormatType_Lossless_30RGBLE_8A_BiPlanar: number; + declare const kCVPixelFormatType_Lossless_32BGRA: number; declare const kCVPixelFormatType_Lossless_420YpCbCr10PackedBiPlanarFullRange: number; diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!Darwin.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!Darwin.d.ts index 936c35c58..f5acfdd6c 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!Darwin.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!Darwin.d.ts @@ -8128,7 +8128,9 @@ declare const enum malloc_zone_malloc_options_t { MALLOC_ZONE_MALLOC_OPTION_NONE = 0, - MALLOC_ZONE_MALLOC_OPTION_CLEAR = 1 + MALLOC_ZONE_MALLOC_OPTION_CLEAR = 1, + + MALLOC_ZONE_MALLOC_OPTION_CANONICAL_TAG = 2 } /** @@ -10990,6 +10992,12 @@ declare const enum virtual_memory_guard_exception_code_t { kGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE = 9, + kGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE = 10, + + kGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE = 11, + + kGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION = 12, + kGUARD_EXC_SEC_ACCESS_FAULT = 98, kGUARD_EXC_SEC_ASYNC_ACCESS_FAULT = 99, @@ -11240,6 +11248,7 @@ interface vm_region_submap_info_64 { behavior: number; object_id: number; user_wired_count: number; + flags: number; pages_reusable: number; object_id_full: number; } @@ -11259,6 +11268,7 @@ interface vm_region_submap_short_info_64 { behavior: number; object_id: number; user_wired_count: number; + flags: number; } declare var vm_region_submap_short_info_64: interop.StructType; diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!Matter.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!Matter.d.ts index 1d4897b63..59385e260 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!Matter.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!Matter.d.ts @@ -2584,6 +2584,8 @@ declare const enum MTRAttributeIDType { AttributeIDTypeClusterGeneralCommissioningAttributeNetworkRecoveryReasonID = 11, + AttributeIDTypeClusterGeneralCommissioningAttributeIsCommissioningWithoutPowerID = 12, + AttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID = 65528, AttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID = 65529, @@ -4708,7 +4710,7 @@ declare const enum MTRAttributeIDType { AttributeIDTypeClusterClosureDimensionAttributeCurrentStateID = 0, - AttributeIDTypeClusterClosureDimensionAttributeTargetID = 1, + AttributeIDTypeClusterClosureDimensionAttributeTargetStateID = 1, AttributeIDTypeClusterClosureDimensionAttributeResolutionID = 2, @@ -4728,6 +4730,8 @@ declare const enum MTRAttributeIDType { AttributeIDTypeClusterClosureDimensionAttributeModulationTypeID = 10, + AttributeIDTypeClusterClosureDimensionAttributeLatchControlModesID = 11, + AttributeIDTypeClusterClosureDimensionAttributeGeneratedCommandListID = 65528, AttributeIDTypeClusterClosureDimensionAttributeAcceptedCommandListID = 65529, @@ -5100,6 +5104,14 @@ declare const enum MTRAttributeIDType { AttributeIDTypeClusterThermostatAttributeSetpointHoldExpiryTimestampID = 82, + AttributeIDTypeClusterThermostatAttributeMaxThermostatSuggestionsID = 83, + + AttributeIDTypeClusterThermostatAttributeThermostatSuggestionsID = 84, + + AttributeIDTypeClusterThermostatAttributeCurrentThermostatSuggestionID = 85, + + AttributeIDTypeClusterThermostatAttributeThermostatSuggestionNotFollowingReasonID = 86, + AttributeIDTypeClusterThermostatAttributeGeneratedCommandListID = 65528, AttributeIDTypeClusterThermostatAttributeAcceptedCommandListID = 65529, @@ -6956,6 +6968,8 @@ declare const enum MTRAttributeIDType { AttributeIDTypeClusterCommodityMeteringAttributeMeasurementTypeID = 2, + AttributeIDTypeClusterCommodityMeteringAttributeMaximumMeteredQuantitiesID = 3, + AttributeIDTypeClusterCommodityMeteringAttributeGeneratedCommandListID = 65528, AttributeIDTypeClusterCommodityMeteringAttributeAcceptedCommandListID = 65529, @@ -7264,6 +7278,8 @@ declare const enum MTRAttributeIDType { AttributeIDTypeClusterUnitTestingAttributeGlobalStructID = 52, + AttributeIDTypeClusterUnitTestingAttributeUnsupportedAttributeRequiringAdminPrivilegeID = 254, + AttributeIDTypeClusterUnitTestingAttributeUnsupportedID = 255, AttributeIDTypeClusterUnitTestingAttributeReadFailureCodeID = 12288, @@ -85828,12 +85844,18 @@ declare const enum MTRCommandIDType { CommandIDTypeClusterThermostatCommandGetWeeklyScheduleID = 2, + CommandIDTypeClusterThermostatCommandAddThermostatSuggestionResponseID = 2, + CommandIDTypeClusterThermostatCommandClearWeeklyScheduleID = 3, CommandIDTypeClusterThermostatCommandSetActiveScheduleRequestID = 5, CommandIDTypeClusterThermostatCommandSetActivePresetRequestID = 6, + CommandIDTypeClusterThermostatCommandAddThermostatSuggestionID = 7, + + CommandIDTypeClusterThermostatCommandRemoveThermostatSuggestionID = 8, + CommandIDTypeClusterThermostatCommandAtomicResponseID = 253, CommandIDTypeClusterThermostatCommandAtomicRequestID = 254, @@ -89703,8 +89725,22 @@ declare const enum MTRDeviceTypeIDType { JointFabricAdministratorID = 304, + IntercomID = 320, + + AudioDoorbellID = 321, + CameraID = 322, + VideoDoorbellID = 323, + + FloodlightCameraID = 324, + + SnapshotCameraID = 325, + + ChimeID = 326, + + CameraControllerID = 327, + WindowCoveringID = 514, WindowCoveringControllerID = 515, @@ -89715,8 +89751,6 @@ declare const enum MTRDeviceTypeIDType { ClosureControllerID = 574, - HeatingCoolingUnitID = 768, - ThermostatID = 769, TemperatureSensorID = 770, @@ -89993,6 +90027,8 @@ declare const enum MTRDiscoveryCapabilities { OnNetwork = 4, + NFC = 16, + AllMask = 7 } @@ -93680,6 +93716,9 @@ declare const enum MTREnergyEVSETargetDayOfWeekBitmap { Saturday = 64 } +/** + * @since 16.1 + */ declare const enum MTRErrorCode { GeneralError = 1, @@ -94152,6 +94191,22 @@ declare const enum MTREventIDType { EventIDTypeClusterPumpConfigurationAndControlEventTurbineOperationID = 16, + EventIDTypeClusterThermostatEventSystemModeChangeID = 0, + + EventIDTypeClusterThermostatEventLocalTemperatureChangeID = 1, + + EventIDTypeClusterThermostatEventOccupancyChangeID = 2, + + EventIDTypeClusterThermostatEventSetpointChangeID = 3, + + EventIDTypeClusterThermostatEventRunningStateChangeID = 4, + + EventIDTypeClusterThermostatEventRunningModeChangeID = 5, + + EventIDTypeClusterThermostatEventActiveScheduleChangeID = 6, + + EventIDTypeClusterThermostatEventActivePresetChangeID = 7, + EventIDTypeClusterOccupancySensingEventOccupancyChangedID = 0, EventIDTypeClusterTargetNavigatorEventTargetUpdatedID = 0, @@ -96503,6 +96558,9 @@ declare const enum MTRIlluminanceMeasurementLightSensorType { CMOS = 1 } +/** + * @since 16.1 + */ declare const enum MTRInteractionErrorCode { InteractionErrorCodeFailure = 1, @@ -106676,7 +106734,9 @@ declare const enum MTRThermostatFeature { MatterScheduleConfiguration = 128, - Presets = 256 + Presets = 256, + + Events = 512 } /** @@ -110911,8 +110971,26 @@ declare class MTRXPCDeviceControllerParameters extends MTRDeviceControllerAbstra */ readonly xpcConnectionBlock: () => NSXPCConnection; + /** + * @since 26.0 + */ + constructor(o: { XPCConnectionBlock: () => NSXPCConnection; uniqueIdentifier: NSUUID; }); + + /** + * @since 18.2 + * @deprecated 26.0 + */ constructor(o: { XPConnectionBlock: () => NSXPCConnection; uniqueIdentifier: NSUUID; }); + /** + * @since 26.0 + */ + initWithXPCConnectionBlockUniqueIdentifier(xpcConnectionBlock: () => NSXPCConnection, uniqueIdentifier: NSUUID): this; + + /** + * @since 18.2 + * @deprecated 26.0 + */ initWithXPConnectionBlockUniqueIdentifier(xpcConnectionBlock: () => NSXPCConnection, uniqueIdentifier: NSUUID): this; } diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!Metal.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!Metal.d.ts index fec3010ed..b20ede546 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!Metal.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!Metal.d.ts @@ -4046,6 +4046,8 @@ declare const enum MTLGPUFamily { Apple9 = 1009, + Apple10 = 1010, + Mac1 = 2001, Mac2 = 2002, @@ -5882,6 +5884,11 @@ interface MTLRenderCommandEncoder extends MTLCommandEncoder { */ setDepthStoreActionOptions(storeActionOptions: MTLStoreActionOptions): void; + /** + * @since 26.0 + */ + setDepthTestMinBoundMaxBound(minBound: number, maxBound: number): void; + /** * @since 15.0 */ @@ -5938,12 +5945,12 @@ interface MTLRenderCommandEncoder extends MTLCommandEncoder { /** * @since 16.0 */ - setMeshBufferOffsetAtIndex(offset: number, index: number): void; + setMeshBufferOffsetAtIndex(buffer: MTLBuffer, offset: number, index: number): void; /** * @since 16.0 */ - setMeshBufferOffsetAtIndex(buffer: MTLBuffer, offset: number, index: number): void; + setMeshBufferOffsetAtIndex(offset: number, index: number): void; /** * @since 16.0 @@ -7223,6 +7230,11 @@ declare class MTLSamplerDescriptor extends NSObject implements NSCopying { */ lodAverage: boolean; + /** + * @since 26.0 + */ + lodBias: number; + lodMaxClamp: number; lodMinClamp: number; @@ -7239,6 +7251,11 @@ declare class MTLSamplerDescriptor extends NSObject implements NSCopying { rAddressMode: MTLSamplerAddressMode; + /** + * @since 26.0 + */ + reductionMode: MTLSamplerReductionMode; + sAddressMode: MTLSamplerAddressMode; /** @@ -7273,6 +7290,18 @@ declare const enum MTLSamplerMipFilter { Linear = 2 } +/** + * @since 26.0 + */ +declare const enum MTLSamplerReductionMode { + + WeightedAverage = 0, + + Minimum = 1, + + Maximum = 2 +} + /** * @since 8.0 */ diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!MetalPerformanceShadersGraph.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!MetalPerformanceShadersGraph.d.ts index 3a629aabe..448595ee5 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!MetalPerformanceShadersGraph.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!MetalPerformanceShadersGraph.d.ts @@ -1344,6 +1344,11 @@ declare class MPSGraphCompilationDescriptor extends MPSGraphObject implements NS */ optimizationProfile: MPSGraphOptimizationProfile; + /** + * @since 26.0 + */ + reducedPrecisionFastMath: MPSGraphReducedPrecisionFastMath; + /** * @since 16.0 */ @@ -2101,6 +2106,20 @@ declare class MPSGraphRandomOpDescriptor extends MPSGraphObject implements NSCop copyWithZone(zone: interop.Pointer | interop.Reference): any; } +/** + * @since 26.0 + */ +declare const enum MPSGraphReducedPrecisionFastMath { + + None = 0, + + AllowFP16Conv2DWinogradTransformIntermediate = 2, + + AllowFP16Intermediates = 2, + + Default = 0 +} + declare const enum MPSGraphReductionMode { Min = 0, diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!TouchController.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!TouchController.d.ts new file mode 100644 index 000000000..43d30ccaa --- /dev/null +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!TouchController.d.ts @@ -0,0 +1,1067 @@ + +/** + * @since 26.0 + */ +declare class TCButton extends NSObject implements TCControl, TCControlLayout { + + static alloc(): TCButton; // inherited from NSObject + + static new(): TCButton; // inherited from NSObject + + contents: TCControlContents; + + anchor: TCControlLayoutAnchor; // inherited from TCControlLayout + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; // inherited from TCControlLayout + + readonly colliderShape: TCColliderShape; // inherited from TCControl + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + enabled: boolean; // inherited from TCControl + + readonly hash: number; // inherited from NSObjectProtocol + + highlightDuration: number; // inherited from TCControl + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly label: TCControlLabel; // inherited from TCControl + + offset: CGPoint; // inherited from TCControlLayout + + readonly position: CGPoint; // inherited from TCControlLayout + + readonly pressed: boolean; // inherited from TCControl + + size: CGSize; // inherited from TCControlLayout + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + zIndex: number; // inherited from TCControlLayout + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + handleTouchBeganAtPoint(point: CGPoint): void; + + handleTouchEndedAtPoint(point: CGPoint): void; + + handleTouchMovedAtPoint(point: CGPoint): void; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +/** + * @since 26.0 + */ +declare class TCButtonDescriptor extends NSObject { + + static alloc(): TCButtonDescriptor; // inherited from NSObject + + static new(): TCButtonDescriptor; // inherited from NSObject + + anchor: TCControlLayoutAnchor; + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; + + colliderShape: TCColliderShape; + + contents: TCControlContents; + + highlightDuration: number; + + label: TCControlLabel; + + offset: CGPoint; + + size: CGSize; + + zIndex: number; +} + +/** + * @since 26.0 + */ +declare const enum TCColliderShape { + + Circle = 0, + + Rect = 1, + + LeftSide = 2, + + RightSide = 3 +} + +/** + * @since 26.0 + */ +interface TCControl extends NSObjectProtocol, TCControlLayout { + + colliderShape: TCColliderShape; + + enabled: boolean; + + highlightDuration?: number; + + label: TCControlLabel; + + pressed: boolean; + + handleTouchBeganAtPoint(point: CGPoint): void; + + handleTouchEndedAtPoint(point: CGPoint): void; + + handleTouchMovedAtPoint(point: CGPoint): void; +} +declare var TCControl: { + + prototype: TCControl; +}; + +/** + * @since 26.0 + */ +declare class TCControlContents extends NSObject { + + static alloc(): TCControlContents; // inherited from NSObject + + static buttonContentsForSystemImageNamedSizeShapeController(imageName: string, size: CGSize, shape: TCControlContentsButtonShape, controller: TCTouchController): TCControlContents; + + static contentsWithImages(images: NSArray | TCControlImage[]): TCControlContents; + + static directionPadContentsForLabelSizeStyleDirectionController(label: TCControlLabel, size: CGSize, style: TCControlContentsDpadElementStyle, direction: TCControlContentsDpadDirection, controller: TCTouchController): TCControlContents; + + static new(): TCControlContents; // inherited from NSObject + + static switchedOnContentsForSystemImageNamedSizeShapeController(imageName: string, size: CGSize, shape: TCControlContentsButtonShape, controller: TCTouchController): TCControlContents; + + static throttleBackgroundContentsOfSizeController(size: CGSize, controller: TCTouchController): TCControlContents; + + static throttleIndicatorContentsOfSizeController(size: CGSize, controller: TCTouchController): TCControlContents; + + static thumbstickBackgroundContentsOfSizeController(size: CGSize, controller: TCTouchController): TCControlContents; + + static thumbstickStickContentsOfSizeController(size: CGSize, controller: TCTouchController): TCControlContents; + + readonly images: NSArray; +} + +/** + * @since 26.0 + */ +declare const enum TCControlContentsButtonShape { + + Circle = 0, + + Rect = 1 +} + +/** + * @since 26.0 + */ +declare const enum TCControlContentsDpadDirection { + + Up = 0, + + Down = 1, + + Left = 2, + + Right = 3 +} + +/** + * @since 26.0 + */ +declare const enum TCControlContentsDpadElementStyle { + + Circle = 0, + + Pentagon = 1 +} + +/** + * @since 26.0 + */ +declare class TCControlImage extends NSObject { + + static alloc(): TCControlImage; // inherited from NSObject + + static new(): TCControlImage; // inherited from NSObject + + highlightTexture: MTLTexture; + + offset: CGPoint; + + size: CGSize; + + texture: MTLTexture; + + tintColor: any; + + constructor(o: { CGImage: any; size: CGSize; device: MTLDevice; }); + + constructor(o: { texture: MTLTexture; size: CGSize; }); + + constructor(o: { texture: MTLTexture; size: CGSize; highlightTexture: MTLTexture; offset: CGPoint; tintColor: any; }); + + constructor(o: { UIImage: UIImage; size: CGSize; device: MTLDevice; }); + + initWithCGImageSizeDevice(cgImage: any, size: CGSize, device: MTLDevice): this; + + initWithTextureSize(texture: MTLTexture, size: CGSize): this; + + initWithTextureSizeHighlightTextureOffsetTintColor(texture: MTLTexture, size: CGSize, highlightTexture: MTLTexture, offset: CGPoint, tintColor: any): this; + + initWithUIImageSizeDevice(uiImage: UIImage, size: CGSize, device: MTLDevice): this; +} + +/** + * @since 26.0 + */ +declare class TCControlLabel extends NSObject { + + static alloc(): TCControlLabel; // inherited from NSObject + + static new(): TCControlLabel; // inherited from NSObject + + readonly name: string; + + readonly role: TCControlLabelRole; + + static readonly buttonA: TCControlLabel; + + static readonly buttonB: TCControlLabel; + + static readonly buttonLeftShoulder: TCControlLabel; + + static readonly buttonLeftTrigger: TCControlLabel; + + static readonly buttonMenu: TCControlLabel; + + static readonly buttonOptions: TCControlLabel; + + static readonly buttonRightShoulder: TCControlLabel; + + static readonly buttonRightTrigger: TCControlLabel; + + static readonly buttonX: TCControlLabel; + + static readonly buttonY: TCControlLabel; + + static readonly directionPad: TCControlLabel; + + static readonly leftThumbstick: TCControlLabel; + + static readonly leftThumbstickButton: TCControlLabel; + + static readonly rightThumbstick: TCControlLabel; + + static readonly rightThumbstickButton: TCControlLabel; + + constructor(o: { name: string; role: TCControlLabelRole; }); + + initWithNameRole(name: string, role: TCControlLabelRole): this; +} + +/** + * @since 26.0 + */ +declare const enum TCControlLabelRole { + + Button = 0, + + DirectionPad = 1 +} + +/** + * @since 26.0 + */ +interface TCControlLayout extends NSObjectProtocol { + + anchor: TCControlLayoutAnchor; + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; + + offset: CGPoint; + + position: CGPoint; + + size: CGSize; + + zIndex: number; +} +declare var TCControlLayout: { + + prototype: TCControlLayout; +}; + +/** + * @since 26.0 + */ +declare const enum TCControlLayoutAnchor { + + TopLeft = 0, + + TopCenter = 1, + + TopRight = 2, + + CenterLeft = 3, + + Center = 4, + + CenterRight = 5, + + BottomLeft = 6, + + BottomCenter = 7, + + BottomRight = 8 +} + +/** + * @since 26.0 + */ +declare const enum TCControlLayoutAnchorCoordinateSystem { + + Relative = 0, + + Absolute = 1 +} + +/** + * @since 26.0 + */ +declare class TCDirectionPad extends NSObject implements TCControl, TCControlLayout { + + static alloc(): TCDirectionPad; // inherited from NSObject + + static new(): TCDirectionPad; // inherited from NSObject + + compositeLabel: TCControlLabel; + + digital: boolean; + + downContents: TCControlContents; + + downLabel: TCControlLabel; + + leftContents: TCControlContents; + + leftLabel: TCControlLabel; + + mutuallyExclusiveInput: boolean; + + radial: boolean; + + rightContents: TCControlContents; + + rightLabel: TCControlLabel; + + upContents: TCControlContents; + + upLabel: TCControlLabel; + + anchor: TCControlLayoutAnchor; // inherited from TCControlLayout + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; // inherited from TCControlLayout + + readonly colliderShape: TCColliderShape; // inherited from TCControl + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + enabled: boolean; // inherited from TCControl + + readonly hash: number; // inherited from NSObjectProtocol + + highlightDuration: number; // inherited from TCControl + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly label: TCControlLabel; // inherited from TCControl + + offset: CGPoint; // inherited from TCControlLayout + + readonly position: CGPoint; // inherited from TCControlLayout + + readonly pressed: boolean; // inherited from TCControl + + size: CGSize; // inherited from TCControlLayout + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + zIndex: number; // inherited from TCControlLayout + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + handleTouchBeganAtPoint(point: CGPoint): void; + + handleTouchEndedAtPoint(point: CGPoint): void; + + handleTouchMovedAtPoint(point: CGPoint): void; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +/** + * @since 26.0 + */ +declare class TCDirectionPadDescriptor extends NSObject { + + static alloc(): TCDirectionPadDescriptor; // inherited from NSObject + + static new(): TCDirectionPadDescriptor; // inherited from NSObject + + anchor: TCControlLayoutAnchor; + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; + + colliderShape: TCColliderShape; + + compositeLabel: TCControlLabel; + + digital: boolean; + + downContents: TCControlContents; + + downLabel: TCControlLabel; + + highlightDuration: number; + + leftContents: TCControlContents; + + leftLabel: TCControlLabel; + + mutuallyExclusiveInput: boolean; + + offset: CGPoint; + + radial: boolean; + + rightContents: TCControlContents; + + rightLabel: TCControlLabel; + + size: CGSize; + + upContents: TCControlContents; + + upLabel: TCControlLabel; + + zIndex: number; +} + +/** + * @since 26.0 + */ +declare var TCGameControllerProductCategoryTouchController: string; + +/** + * @since 26.0 + */ +declare class TCSwitch extends NSObject implements TCControl, TCControlLayout { + + static alloc(): TCSwitch; // inherited from NSObject + + static new(): TCSwitch; // inherited from NSObject + + contents: TCControlContents; + + readonly switchedOn: boolean; + + switchedOnContents: TCControlContents; + + anchor: TCControlLayoutAnchor; // inherited from TCControlLayout + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; // inherited from TCControlLayout + + readonly colliderShape: TCColliderShape; // inherited from TCControl + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + enabled: boolean; // inherited from TCControl + + readonly hash: number; // inherited from NSObjectProtocol + + highlightDuration: number; // inherited from TCControl + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly label: TCControlLabel; // inherited from TCControl + + offset: CGPoint; // inherited from TCControlLayout + + readonly position: CGPoint; // inherited from TCControlLayout + + readonly pressed: boolean; // inherited from TCControl + + size: CGSize; // inherited from TCControlLayout + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + zIndex: number; // inherited from TCControlLayout + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + handleTouchBeganAtPoint(point: CGPoint): void; + + handleTouchEndedAtPoint(point: CGPoint): void; + + handleTouchMovedAtPoint(point: CGPoint): void; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +/** + * @since 26.0 + */ +declare class TCSwitchDescriptor extends NSObject { + + static alloc(): TCSwitchDescriptor; // inherited from NSObject + + static new(): TCSwitchDescriptor; // inherited from NSObject + + anchor: TCControlLayoutAnchor; + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; + + colliderShape: TCColliderShape; + + contents: TCControlContents; + + highlightDuration: number; + + label: TCControlLabel; + + offset: CGPoint; + + size: CGSize; + + switchedOnContents: TCControlContents; + + zIndex: number; +} + +/** + * @since 26.0 + */ +declare class TCThrottle extends NSObject implements TCControl, TCControlLayout { + + static alloc(): TCThrottle; // inherited from NSObject + + static new(): TCThrottle; // inherited from NSObject + + backgroundContents: TCControlContents; + + baseValue: number; + + indicatorContents: TCControlContents; + + indicatorSize: CGSize; + + readonly orientation: TCThrottleOrientation; + + snapsToBaseValue: boolean; + + throttleSize: CGSize; + + anchor: TCControlLayoutAnchor; // inherited from TCControlLayout + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; // inherited from TCControlLayout + + readonly colliderShape: TCColliderShape; // inherited from TCControl + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + enabled: boolean; // inherited from TCControl + + readonly hash: number; // inherited from NSObjectProtocol + + highlightDuration: number; // inherited from TCControl + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly label: TCControlLabel; // inherited from TCControl + + offset: CGPoint; // inherited from TCControlLayout + + readonly position: CGPoint; // inherited from TCControlLayout + + readonly pressed: boolean; // inherited from TCControl + + size: CGSize; // inherited from TCControlLayout + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + zIndex: number; // inherited from TCControlLayout + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + handleTouchBeganAtPoint(point: CGPoint): void; + + handleTouchEndedAtPoint(point: CGPoint): void; + + handleTouchMovedAtPoint(point: CGPoint): void; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +/** + * @since 26.0 + */ +declare class TCThrottleDescriptor extends NSObject { + + static alloc(): TCThrottleDescriptor; // inherited from NSObject + + static new(): TCThrottleDescriptor; // inherited from NSObject + + anchor: TCControlLayoutAnchor; + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; + + backgroundContents: TCControlContents; + + baseValue: number; + + colliderShape: TCColliderShape; + + highlightDuration: number; + + indicatorContents: TCControlContents; + + indicatorSize: CGSize; + + label: TCControlLabel; + + offset: CGPoint; + + orientation: TCThrottleOrientation; + + size: CGSize; + + snapsToBaseValue: boolean; + + throttleSize: CGSize; + + zIndex: number; +} + +/** + * @since 26.0 + */ +declare const enum TCThrottleOrientation { + + Vertical = 0, + + Horizontal = 1 +} + +/** + * @since 26.0 + */ +declare class TCThumbstick extends NSObject implements TCControl, TCControlLayout { + + static alloc(): TCThumbstick; // inherited from NSObject + + static new(): TCThumbstick; // inherited from NSObject + + backgroundContents: TCControlContents; + + hidesWhenNotPressed: boolean; + + stickContents: TCControlContents; + + stickSize: CGSize; + + anchor: TCControlLayoutAnchor; // inherited from TCControlLayout + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; // inherited from TCControlLayout + + readonly colliderShape: TCColliderShape; // inherited from TCControl + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + enabled: boolean; // inherited from TCControl + + readonly hash: number; // inherited from NSObjectProtocol + + highlightDuration: number; // inherited from TCControl + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly label: TCControlLabel; // inherited from TCControl + + offset: CGPoint; // inherited from TCControlLayout + + readonly position: CGPoint; // inherited from TCControlLayout + + readonly pressed: boolean; // inherited from TCControl + + size: CGSize; // inherited from TCControlLayout + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + zIndex: number; // inherited from TCControlLayout + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + handleTouchBeganAtPoint(point: CGPoint): void; + + handleTouchEndedAtPoint(point: CGPoint): void; + + handleTouchMovedAtPoint(point: CGPoint): void; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +/** + * @since 26.0 + */ +declare class TCThumbstickDescriptor extends NSObject { + + static alloc(): TCThumbstickDescriptor; // inherited from NSObject + + static new(): TCThumbstickDescriptor; // inherited from NSObject + + anchor: TCControlLayoutAnchor; + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; + + backgroundContents: TCControlContents; + + colliderShape: TCColliderShape; + + hidesWhenNotPressed: boolean; + + highlightDuration: number; + + label: TCControlLabel; + + offset: CGPoint; + + size: CGSize; + + stickContents: TCControlContents; + + stickSize: CGSize; + + zIndex: number; +} + +/** + * @since 26.0 + */ +declare class TCTouchController extends NSObject { + + static alloc(): TCTouchController; // inherited from NSObject + + static new(): TCTouchController; // inherited from NSObject + + readonly buttons: NSArray; + + readonly connected: boolean; + + readonly controller: GCController; + + readonly controls: NSArray; + + readonly device: MTLDevice; + + readonly directionPads: NSArray; + + drawableSize: CGSize; + + size: CGSize; + + readonly switches: NSArray; + + readonly throttles: NSArray; + + readonly thumbsticks: NSArray; + + readonly touchpads: NSArray; + + static readonly supported: boolean; + + constructor(o: { descriptor: TCTouchControllerDescriptor; }); + + addButtonWithDescriptor(descriptor: TCButtonDescriptor): TCButton; + + addDirectionPadWithDescriptor(descriptor: TCDirectionPadDescriptor): TCDirectionPad; + + addSwitchWithDescriptor(descriptor: TCSwitchDescriptor): TCSwitch; + + addThrottleWithDescriptor(descriptor: TCThrottleDescriptor): TCThrottle; + + addThumbstickWithDescriptor(descriptor: TCThumbstickDescriptor): TCThumbstick; + + addTouchpadWithDescriptor(descriptor: TCTouchpadDescriptor): TCTouchpad; + + automaticallyLayoutControlsForLabels(labels: NSArray | TCControlLabel[]): void; + + connect(): void; + + controlAtPoint(point: CGPoint): TCControl; + + disconnect(): void; + + handleTouchBeganAtPointIndex(point: CGPoint, index: number): boolean; + + handleTouchEndedAtPointIndex(point: CGPoint, index: number): boolean; + + handleTouchMovedAtPointIndex(point: CGPoint, index: number): boolean; + + initWithDescriptor(descriptor: TCTouchControllerDescriptor): this; + + removeAllControls(): void; + + removeControl(control: TCControl): void; + + renderUsingRenderCommandEncoder(encoder: MTLRenderCommandEncoder): void; +} + +/** + * @since 26.0 + */ +declare class TCTouchControllerDescriptor extends NSObject { + + static alloc(): TCTouchControllerDescriptor; // inherited from NSObject + + static new(): TCTouchControllerDescriptor; // inherited from NSObject + + colorPixelFormat: MTLPixelFormat; + + depthAttachmentPixelFormat: MTLPixelFormat; + + device: MTLDevice; + + drawableSize: CGSize; + + sampleCount: number; + + size: CGSize; + + stencilAttachmentPixelFormat: MTLPixelFormat; + + constructor(o: { MTKView: MTKView; }); + + initWithMTKView(mtkView: MTKView): this; +} + +/** + * @since 26.0 + */ +declare class TCTouchpad extends NSObject implements TCControl, TCControlLayout { + + static alloc(): TCTouchpad; // inherited from NSObject + + static new(): TCTouchpad; // inherited from NSObject + + contents: TCControlContents; + + reportsRelativeValues: boolean; + + anchor: TCControlLayoutAnchor; // inherited from TCControlLayout + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; // inherited from TCControlLayout + + readonly colliderShape: TCColliderShape; // inherited from TCControl + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + enabled: boolean; // inherited from TCControl + + readonly hash: number; // inherited from NSObjectProtocol + + highlightDuration: number; // inherited from TCControl + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly label: TCControlLabel; // inherited from TCControl + + offset: CGPoint; // inherited from TCControlLayout + + readonly position: CGPoint; // inherited from TCControlLayout + + readonly pressed: boolean; // inherited from TCControl + + size: CGSize; // inherited from TCControlLayout + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + zIndex: number; // inherited from TCControlLayout + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + handleTouchBeganAtPoint(point: CGPoint): void; + + handleTouchEndedAtPoint(point: CGPoint): void; + + handleTouchMovedAtPoint(point: CGPoint): void; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +/** + * @since 26.0 + */ +declare class TCTouchpadDescriptor extends NSObject { + + static alloc(): TCTouchpadDescriptor; // inherited from NSObject + + static new(): TCTouchpadDescriptor; // inherited from NSObject + + anchor: TCControlLayoutAnchor; + + anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem; + + colliderShape: TCColliderShape; + + contents: TCControlContents; + + highlightDuration: number; + + label: TCControlLabel; + + offset: CGPoint; + + reportsRelativeValues: boolean; + + size: CGSize; + + zIndex: number; +} diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!UIKit.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!UIKit.d.ts index 315a02dc9..3316aa51b 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!UIKit.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!UIKit.d.ts @@ -18070,7 +18070,11 @@ declare function UIGuidedAccessRestrictionStateForIdentifier(restrictionIdentifi declare const enum UIHDRHeadroomUsageLimit { - Unspecified = -1 + Unspecified = -1, + + Active = 0, + + Inactive = 1 } /** diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!VideoToolbox.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!VideoToolbox.d.ts index e788367f4..eef649468 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!VideoToolbox.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!VideoToolbox.d.ts @@ -1933,6 +1933,8 @@ declare const kVTVideoDecoderUnsupportedDataFormatErr: number; declare const kVTVideoEncoderAuthorizationErr: number; +declare const kVTVideoEncoderAutoWhiteBalanceNotLockedErr: number; + /** * @since 15.0 */ diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!WebKit.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!WebKit.d.ts index 2796ce62b..f3d3e5fee 100644 --- a/packages/types-ios/src/lib/ios/objc-x86_64/objc!WebKit.d.ts +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!WebKit.d.ts @@ -2324,6 +2324,11 @@ declare class WKWebView extends UIView { navigationDelegate: WKNavigationDelegate; + /** + * @since 26.0 + */ + obscuredContentInsets: UIEdgeInsets; + /** * @since 14.0 */ diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!_LocationEssentials.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!_LocationEssentials.d.ts new file mode 100644 index 000000000..77807d991 --- /dev/null +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!_LocationEssentials.d.ts @@ -0,0 +1,251 @@ + +/** + * @since 8.0 + */ +declare class CLFloor extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): CLFloor; // inherited from NSObject + + static new(): CLFloor; // inherited from NSObject + + readonly level: number; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +/** + * @since 2.0 + */ +declare class CLLocation extends NSObject implements CKRecordValue, NSCopying, NSSecureCoding { + + static alloc(): CLLocation; // inherited from NSObject + + static new(): CLLocation; // inherited from NSObject + + readonly altitude: number; + + readonly coordinate: CLLocationCoordinate2D; + + /** + * @since 2.2 + */ + readonly course: number; + + /** + * @since 13.4 + */ + readonly courseAccuracy: number; + + /** + * @since 15 + */ + readonly ellipsoidalAltitude: number; + + /** + * @since 8.0 + */ + readonly floor: CLFloor; + + readonly horizontalAccuracy: number; + + /** + * @since 15.0 + */ + readonly sourceInformation: CLLocationSourceInformation; + + /** + * @since 2.2 + */ + readonly speed: number; + + /** + * @since 10.0 + */ + readonly speedAccuracy: number; + + readonly timestamp: Date; + + readonly verticalAccuracy: number; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + /** + * @since 13.4 + */ + constructor(o: { coordinate: CLLocationCoordinate2D; altitude: number; horizontalAccuracy: number; verticalAccuracy: number; course: number; courseAccuracy: number; speed: number; speedAccuracy: number; timestamp: Date; }); + + /** + * @since 15.0 + */ + constructor(o: { coordinate: CLLocationCoordinate2D; altitude: number; horizontalAccuracy: number; verticalAccuracy: number; course: number; courseAccuracy: number; speed: number; speedAccuracy: number; timestamp: Date; sourceInfo: CLLocationSourceInformation; }); + + /** + * @since 4.2 + */ + constructor(o: { coordinate: CLLocationCoordinate2D; altitude: number; horizontalAccuracy: number; verticalAccuracy: number; course: number; speed: number; timestamp: Date; }); + + constructor(o: { coordinate: CLLocationCoordinate2D; altitude: number; horizontalAccuracy: number; verticalAccuracy: number; timestamp: Date; }); + + constructor(o: { latitude: number; longitude: number; }); + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + /** + * @since 3.2 + */ + distanceFromLocation(location: CLLocation): number; + + encodeWithCoder(coder: NSCoder): void; + + /** + * @since 2.0 + * @deprecated 3.2 + */ + getDistanceFrom(location: CLLocation): number; + + initWithCoder(coder: NSCoder): this; + + /** + * @since 13.4 + */ + initWithCoordinateAltitudeHorizontalAccuracyVerticalAccuracyCourseCourseAccuracySpeedSpeedAccuracyTimestamp(coordinate: CLLocationCoordinate2D, altitude: number, hAccuracy: number, vAccuracy: number, course: number, courseAccuracy: number, speed: number, speedAccuracy: number, timestamp: Date): this; + + /** + * @since 15.0 + */ + initWithCoordinateAltitudeHorizontalAccuracyVerticalAccuracyCourseCourseAccuracySpeedSpeedAccuracyTimestampSourceInfo(coordinate: CLLocationCoordinate2D, altitude: number, hAccuracy: number, vAccuracy: number, course: number, courseAccuracy: number, speed: number, speedAccuracy: number, timestamp: Date, sourceInfo: CLLocationSourceInformation): this; + + /** + * @since 4.2 + */ + initWithCoordinateAltitudeHorizontalAccuracyVerticalAccuracyCourseSpeedTimestamp(coordinate: CLLocationCoordinate2D, altitude: number, hAccuracy: number, vAccuracy: number, course: number, speed: number, timestamp: Date): this; + + initWithCoordinateAltitudeHorizontalAccuracyVerticalAccuracyTimestamp(coordinate: CLLocationCoordinate2D, altitude: number, hAccuracy: number, vAccuracy: number, timestamp: Date): this; + + initWithLatitudeLongitude(latitude: number, longitude: number): this; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +interface CLLocationCoordinate2D { + latitude: number; + longitude: number; +} +declare var CLLocationCoordinate2D: interop.StructType; + +/** + * @since 4.0 + */ +declare function CLLocationCoordinate2DIsValid(coord: CLLocationCoordinate2D): boolean; + +/** + * @since 4.0 + */ +declare function CLLocationCoordinate2DMake(latitude: number, longitude: number): CLLocationCoordinate2D; + +/** + * @since 6.0 + */ +declare var CLLocationDistanceMax: number; + +/** + * @since 15.0 + */ +declare class CLLocationSourceInformation extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): CLLocationSourceInformation; // inherited from NSObject + + static new(): CLLocationSourceInformation; // inherited from NSObject + + readonly isProducedByAccessory: boolean; + + readonly isSimulatedBySoftware: boolean; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + constructor(o: { softwareSimulationState: boolean; andExternalAccessoryState: boolean; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; + + initWithSoftwareSimulationStateAndExternalAccessoryState(isSoftware: boolean, isAccessory: boolean): this; +} + +/** + * @since 6.0 + */ +declare var CLTimeIntervalMax: number; + +declare var kCLDistanceFilterNone: number; + +declare var kCLLocationAccuracyBest: number; + +/** + * @since 4.0 + */ +declare var kCLLocationAccuracyBestForNavigation: number; + +declare var kCLLocationAccuracyHundredMeters: number; + +declare var kCLLocationAccuracyKilometer: number; + +declare var kCLLocationAccuracyNearestTenMeters: number; + +/** + * @since 14.0 + */ +declare var kCLLocationAccuracyReduced: number; + +declare var kCLLocationAccuracyThreeKilometers: number; + +/** + * @since 4.0 + */ +declare var kCLLocationCoordinate2DInvalid: CLLocationCoordinate2D; diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!libkern.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!libkern.d.ts new file mode 100644 index 000000000..5b243624f --- /dev/null +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!libkern.d.ts @@ -0,0 +1,15 @@ + +/** + * @since 2.0 + */ +declare function sys_cache_control(_function: number, start: interop.Pointer | interop.Reference, len: number): number; + +/** + * @since 2.0 + */ +declare function sys_dcache_flush(start: interop.Pointer | interop.Reference, len: number): void; + +/** + * @since 2.0 + */ +declare function sys_icache_invalidate(start: interop.Pointer | interop.Reference, len: number): void; diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!os_object.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!os_object.d.ts new file mode 100644 index 000000000..796c4a5d3 --- /dev/null +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!os_object.d.ts @@ -0,0 +1,17 @@ + +declare class OS_object extends NSObject { + + static alloc(): OS_object; // inherited from NSObject + + static new(): OS_object; // inherited from NSObject +} + +/** + * @since 8.0 + */ +declare function os_release(object: interop.Pointer | interop.Reference): void; + +/** + * @since 8.0 + */ +declare function os_retain(object: interop.Pointer | interop.Reference): interop.Pointer | interop.Reference; diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!os_workgroup.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!os_workgroup.d.ts new file mode 100644 index 000000000..6e4f6381c --- /dev/null +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!os_workgroup.d.ts @@ -0,0 +1,113 @@ + +declare class OS_os_workgroup extends OS_object { + + static alloc(): OS_os_workgroup; // inherited from NSObject + + static new(): OS_os_workgroup; // inherited from NSObject +} + +declare class OS_os_workgroup_interval extends OS_os_workgroup implements OS_os_workgroup_intervalProtocol { + + static alloc(): OS_os_workgroup_interval; // inherited from NSObject + + static new(): OS_os_workgroup_interval; // inherited from NSObject +} + +interface OS_os_workgroup_intervalProtocol { +} +declare var OS_os_workgroup_intervalProtocol: { + + prototype: OS_os_workgroup_intervalProtocol; +}; + +declare class OS_os_workgroup_parallel extends OS_os_workgroup implements OS_os_workgroup_parallelProtocol { + + static alloc(): OS_os_workgroup_parallel; // inherited from NSObject + + static new(): OS_os_workgroup_parallel; // inherited from NSObject +} + +interface OS_os_workgroup_parallelProtocol { +} +declare var OS_os_workgroup_parallelProtocol: { + + prototype: OS_os_workgroup_parallelProtocol; +}; + +interface os_workgroup_attr_opaque_s { + sig: number; + opaque: interop.Reference; +} +declare var os_workgroup_attr_opaque_s: interop.StructType; + +/** + * @since 14.0 + */ +declare function os_workgroup_cancel(wg: OS_os_workgroup): void; + +/** + * @since 14.0 + */ +declare function os_workgroup_create_with_workgroup(name: string | interop.Pointer | interop.Reference, wg: OS_os_workgroup): OS_os_workgroup; + +/** + * @since 14.0 + */ +declare function os_workgroup_get_working_arena(wg: OS_os_workgroup, index_out: interop.Pointer | interop.Reference): interop.Pointer | interop.Reference; + +interface os_workgroup_interval_data_opaque_s { + sig: number; + opaque: interop.Reference; +} +declare var os_workgroup_interval_data_opaque_s: interop.StructType; + +/** + * @since 14.0 + */ +declare function os_workgroup_interval_finish(wg: OS_os_workgroup & OS_os_workgroup_intervalProtocol, data: interop.Pointer | interop.Reference): number; + +/** + * @since 14.0 + */ +declare function os_workgroup_interval_start(wg: OS_os_workgroup & OS_os_workgroup_intervalProtocol, start: number, deadline: number, data: interop.Pointer | interop.Reference): number; + +/** + * @since 14.0 + */ +declare function os_workgroup_interval_update(wg: OS_os_workgroup & OS_os_workgroup_intervalProtocol, deadline: number, data: interop.Pointer | interop.Reference): number; + +/** + * @since 14.0 + */ +declare function os_workgroup_join(wg: OS_os_workgroup, token_out: interop.Pointer | interop.Reference): number; + +interface os_workgroup_join_token_opaque_s { + sig: number; + opaque: interop.Reference; +} +declare var os_workgroup_join_token_opaque_s: interop.StructType; + +/** + * @since 14.0 + */ +declare function os_workgroup_leave(wg: OS_os_workgroup, token: interop.Pointer | interop.Reference): void; + +/** + * @since 14.0 + */ +declare function os_workgroup_max_parallel_threads(wg: OS_os_workgroup, attr: interop.Pointer | interop.Reference): number; + +/** + * @since 14.0 + */ +declare function os_workgroup_parallel_create(name: string | interop.Pointer | interop.Reference, attr: interop.Pointer | interop.Reference): OS_os_workgroup & OS_os_workgroup_parallelProtocol; + +/** + * @since 14.0 + */ +declare function os_workgroup_set_working_arena(wg: OS_os_workgroup, arena: interop.Pointer | interop.Reference, max_workers: number, destructor: interop.FunctionReference<(p1: interop.Pointer | interop.Reference) => void>): number; + +/** + * @since 14.0 + */ +declare function os_workgroup_testcancel(wg: OS_os_workgroup): boolean; diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!unwind.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!unwind.d.ts new file mode 100644 index 000000000..9b1d3e498 --- /dev/null +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!unwind.d.ts @@ -0,0 +1,61 @@ + +declare const enum _Unwind_Action { + + A_SEARCH_PHASE = 1, + + A_CLEANUP_PHASE = 2, + + A_HANDLER_FRAME = 4, + + A_FORCE_UNWIND = 8, + + A_END_OF_STACK = 16 +} + +declare function _Unwind_Backtrace(p1: interop.FunctionReference<(p1: interop.Pointer | interop.Reference, p2: interop.Pointer | interop.Reference) => _Unwind_Reason_Code>, p2: interop.Pointer | interop.Reference): _Unwind_Reason_Code; + +declare function _Unwind_FindEnclosingFunction(pc: interop.Pointer | interop.Reference): interop.Pointer | interop.Reference; + +declare function _Unwind_Find_FDE(pc: interop.Pointer | interop.Reference, p2: interop.Pointer | interop.Reference): interop.Pointer | interop.Reference; + +declare function _Unwind_GetCFA(p1: interop.Pointer | interop.Reference): number; + +declare function _Unwind_GetIPInfo(context: interop.Pointer | interop.Reference, ipBefore: interop.Pointer | interop.Reference): number; + +declare function _Unwind_GetLanguageSpecificData(context: interop.Pointer | interop.Reference): number; + +declare function _Unwind_GetRegionStart(context: interop.Pointer | interop.Reference): number; + +declare const enum _Unwind_Reason_Code { + + RC_NO_REASON = 0, + + RC_OK = 0, + + RC_FOREIGN_EXCEPTION_CAUGHT = 1, + + RC_FATAL_PHASE2_ERROR = 2, + + RC_FATAL_PHASE1_ERROR = 3, + + RC_NORMAL_STOP = 4, + + RC_END_OF_STACK = 5, + + RC_HANDLER_FOUND = 6, + + RC_INSTALL_CONTEXT = 7, + + RC_CONTINUE_UNWIND = 8 +} + +declare function __deregister_frame(fde: interop.Pointer | interop.Reference): void; + +declare function __register_frame(fde: interop.Pointer | interop.Reference): void; + +interface dwarf_eh_bases { + tbase: number; + dbase: number; + func: number; +} +declare var dwarf_eh_bases: interop.StructType; diff --git a/packages/types-ios/src/lib/ios/objc-x86_64/objc!xlocale.d.ts b/packages/types-ios/src/lib/ios/objc-x86_64/objc!xlocale.d.ts new file mode 100644 index 000000000..2dc154db3 --- /dev/null +++ b/packages/types-ios/src/lib/ios/objc-x86_64/objc!xlocale.d.ts @@ -0,0 +1,6 @@ + +declare var _c_locale: interop.Pointer | interop.Reference; + +declare function localeconv_l(p1: interop.Pointer | interop.Reference): interop.Pointer | interop.Reference; + +declare function querylocale(p1: number, p2: interop.Pointer | interop.Reference): interop.Pointer | interop.Reference; diff --git a/packages/webpack5/package-lock.json b/packages/webpack5/package-lock.json index b966041fc..13e969a62 100644 --- a/packages/webpack5/package-lock.json +++ b/packages/webpack5/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nativescript/webpack", - "version": "5.1.0-alpha.0", + "version": "5.0.25-alpha.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nativescript/webpack", - "version": "5.1.0-alpha.0", + "version": "5.0.25-alpha.1", "license": "Apache-2.0", "dependencies": { "@babel/core": "^7.0.0", @@ -30,7 +30,7 @@ "postcss-import": "^16.0.0", "postcss-loader": "^8.0.0", "raw-loader": "^4.0.0", - "react-refresh": "~0.17.0", + "react-refresh": "~0.18.0", "sass": "^1.0.0", "sass-loader": "^16.0.0", "sax": "^1.0.0", @@ -53,6 +53,7 @@ "devDependencies": { "@angular-devkit/build-angular": "^20.0.0", "@angular/compiler-cli": "^20.0.0", + "@babel/helpers": ">=7.26.10", "@types/css": "0.0.38", "@types/jest": "29.5.4", "@types/loader-utils": "2.0.6", @@ -64,7 +65,7 @@ "jest": "~29.7.0", "jest-matcher-utils": "~29.7.0", "nativescript-vue-template-compiler": "2.9.3", - "ts-jest": "29.4.0", + "ts-jest": "29.4.4", "typescript": "~5.8.0" }, "peerDependencies": { @@ -3396,7 +3397,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.2.0.tgz", "integrity": "sha512-io1zEbbYcElht3tdlqEOFxZ0dMTYrHz9iMf0gqn1pPjZFTCgM5R4R5IMA20Chb2UPYYsxjzs8CgZ7Nb5n2K2rA==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "dependencies": { "@jsonjoy.com/base64": "^1.1.1", @@ -3419,7 +3420,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.6.0.tgz", "integrity": "sha512-sw/RMbehRhN68WRtcKCpQOPfnH6lLP4GJfqzi3iYej8tnzpZUDr6UkZYJjcjjC0FWEJOJbyM3PTIwxucUmDG2A==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "engines": { "node": ">=10.0" @@ -4706,7 +4707,7 @@ "version": "1.19.6", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@types/connect": "*", @@ -4788,7 +4789,7 @@ "version": "4.17.23", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz", "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@types/body-parser": "*", @@ -4824,14 +4825,14 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@types/http-proxy": { "version": "1.17.16", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@types/node": "*" @@ -4964,7 +4965,7 @@ "version": "1.3.12", "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.12.tgz", "integrity": "sha512-a0ToKlRVnUw3aXKQq2F+krxZKq7B8LEQijzPn5RdFAMatARD2JX9o8FBpMXOOrjob0uc13aN+V/AXniOXW4d9A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@types/node": "*" @@ -4974,7 +4975,7 @@ "version": "6.14.0", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@types/range-parser": { @@ -5005,7 +5006,7 @@ "version": "0.17.5", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@types/mime": "^1", @@ -5026,7 +5027,7 @@ "version": "1.15.8", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@types/http-errors": "*", @@ -5136,7 +5137,7 @@ "version": "8.18.1", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@types/node": "*" @@ -5755,13 +5756,6 @@ "dev": true, "license": "MIT" }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, "node_modules/atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -6293,7 +6287,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -6307,7 +6301,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -6752,7 +6746,7 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.0.tgz", "integrity": "sha512-k6WLKfunuqCYD3t6AsuPGvQWaKwuLLh2/xHNcX4qE+vIfDNXpSqnrhwA7O53R7WVQUnt8dVAIW+YHr7xTgOgGA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "bytes": "3.1.2", @@ -7390,22 +7384,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/electron-to-chromium": { "version": "1.5.191", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.191.tgz", @@ -7572,7 +7550,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -7985,39 +7963,6 @@ } } }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -8305,7 +8250,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -8340,7 +8285,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", @@ -8444,6 +8389,38 @@ "dev": true, "license": "MIT" }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -8632,7 +8609,7 @@ "version": "0.5.10", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz", "integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/http-proxy": { @@ -9168,25 +9145,6 @@ "node": ">=8" } }, - "node_modules/jake": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", - "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/javascript-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", @@ -9927,7 +9885,7 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.10.0.tgz", "integrity": "sha512-D7dBRJo/qcGX9xlvt/6wUYzQxjh5G1RvZPgPv8vi4KRU99DVQL/oW7tnVOCCTm2HGeo3C5HvGE5Yrh6UBoZ0vA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "picocolors": "^1.0.0", @@ -10630,6 +10588,16 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/mrmime": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", @@ -10895,7 +10863,7 @@ "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -11882,9 +11850,9 @@ "license": "MIT" }, "node_modules/react-refresh": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", - "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz", + "integrity": "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -12668,7 +12636,7 @@ "version": "1.8.3", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -13339,7 +13307,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.3.tgz", "integrity": "sha512-il+Cv80yVHFBwokQSfd4bldvr1Md951DpgAGfmhydt04L+YzHgubm2tQ7zueWDcGENKHq0ZvGFR/hjvNXilHEg==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "engines": { "node": ">=10.0" @@ -13372,15 +13340,15 @@ } }, "node_modules/ts-jest": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz", - "integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==", + "version": "29.4.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.4.tgz", + "integrity": "sha512-ccVcRABct5ZELCT5U0+DZwkXMCcOCLi2doHRrKy1nK/s7J7bch6TzJMsrY09WxgUUIP/ITfmcDS8D2yl63rnXw==", "dev": true, "license": "MIT", "dependencies": { "bs-logger": "^0.2.6", - "ejs": "^3.1.10", "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.8", "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", @@ -13521,6 +13489,20 @@ "node": ">=14.17" } }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/undici-types": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", @@ -14049,7 +14031,7 @@ "version": "4.17.2", "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.17.2.tgz", "integrity": "sha512-NgYhCOWgovOXSzvYgUW0LQ7Qy72rWQMGGFJDoWg4G30RHd3z77VbYdtJ4fembJXBy8pMIUA31XNAupobOQlwdg==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "dependencies": { "@jsonjoy.com/json-pack": "^1.0.3", @@ -14229,7 +14211,7 @@ "version": "8.18.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=10.0.0" @@ -14344,6 +14326,13 @@ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "license": "MIT" }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", diff --git a/packages/webpack5/package.json b/packages/webpack5/package.json index 8c6a9b8b1..1e700a18e 100644 --- a/packages/webpack5/package.json +++ b/packages/webpack5/package.json @@ -37,7 +37,7 @@ "postcss-import": "^16.0.0", "postcss-loader": "^8.0.0", "raw-loader": "^4.0.0", - "react-refresh": "~0.17.0", + "react-refresh": "~0.18.0", "sass": "^1.0.0", "sass-loader": "^16.0.0", "sax": "^1.0.0", @@ -69,7 +69,7 @@ "jest": "~29.7.0", "jest-matcher-utils": "~29.7.0", "nativescript-vue-template-compiler": "2.9.3", - "ts-jest": "29.4.0", + "ts-jest": "29.4.4", "typescript": "~5.8.0" }, "peerDependencies": { diff --git a/packages/webpack5/src/configuration/base.ts b/packages/webpack5/src/configuration/base.ts index fe2f0894b..f7bcdf887 100644 --- a/packages/webpack5/src/configuration/base.ts +++ b/packages/webpack5/src/configuration/base.ts @@ -137,8 +137,17 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { // Ensure imports of the Node 'module' builtin resolve to our polyfill module: require.resolve('../polyfills/module.js'), }, + // Allow extension-less ESM imports (fixes "fully specified" errors) + // Example: '../timer' -> resolves to index..js without requiring explicit extension + fullySpecified: false, }); + // As an extra guard, ensure rule-level resolve also allows extension-less imports + config.module + .rule('esm-extensionless') + .test(/\.(mjs|js|ts|tsx)$/) + .resolve.set('fullySpecified', false); + const getSourceMapType = (map: string | boolean): Config.DevTool => { const defaultSourceMap = 'inline-source-map'; @@ -162,7 +171,40 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { return map as Config.DevTool; }; - config.devtool(getSourceMapType(env.sourceMap)); + const sourceMapType = getSourceMapType(env.sourceMap); + + // Use devtool for both CommonJS and ESM - let webpack handle source mapping properly + config.devtool(sourceMapType); + + // For ESM builds, fix the sourceMappingURL to use correct paths + if (!env.commonjs && sourceMapType && sourceMapType !== 'hidden-source-map') { + class FixSourceMapUrlPlugin { + apply(compiler) { + compiler.hooks.emit.tap('FixSourceMapUrlPlugin', (compilation) => { + const leadingCharacter = process.platform === 'win32' ? '/' : ''; + Object.keys(compilation.assets).forEach((filename) => { + if (filename.endsWith('.mjs') || filename.endsWith('.js')) { + const asset = compilation.assets[filename]; + let source = asset.source(); + + // Replace sourceMappingURL to use file:// protocol pointing to actual location + source = source.replace( + /\/\/# sourceMappingURL=(.+\.map)/g, + `//# sourceMappingURL=file://${leadingCharacter}${outputPath}/$1`, + ); + + compilation.assets[filename] = { + source: () => source, + size: () => source.length, + }; + } + }); + }); + } + } + + config.plugin('FixSourceMapUrlPlugin').use(FixSourceMapUrlPlugin); + } // when using hidden-source-map, output source maps to the `platforms/{platformName}-sourceMaps` folder if (env.sourceMap === 'hidden-source-map') { @@ -295,10 +337,6 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { }); } else { // Set up ESM output - // NOTE: this fixes all worker bundling issues - // however it causes issues with angular lazy loading. - // TODO: still need to investigate the right combination of webpack settings there - // TODO: test if standalone lazy loaded routes work, maybe it's just with loadChildren modules? config.output.chunkFilename('[name].mjs'); // now re‑add exactly what you want: @@ -546,6 +584,10 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { .use('sass-loader') .loader('sass-loader') .options({ + // helps ensure proper project compatibility + // particularly in cases of workspaces + // which may have different nested Sass implementations + // via transient dependencies implementation: require('sass'), }); diff --git a/packages/webpack5/src/configuration/typescript.ts b/packages/webpack5/src/configuration/typescript.ts index 378ba258e..9f7e184b7 100644 --- a/packages/webpack5/src/configuration/typescript.ts +++ b/packages/webpack5/src/configuration/typescript.ts @@ -12,7 +12,8 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { const entryPath = getEntryPath(); const virtualEntryPath = path.resolve( __dirname, - // Note: not sure we'll need this but just an idea if we do. + // Note: this is possible if needed + // at moment it's not but just leaving as note for future // `../stubs/virtual-entry-typescript.${env.commonjs ? 'js' : 'mjs'}`, `../stubs/virtual-entry-typescript.js`, ); diff --git a/packages/webpack5/src/loaders/nativescript-hot-loader/index.ts b/packages/webpack5/src/loaders/nativescript-hot-loader/index.ts index 899374cbe..41cf4d29c 100644 --- a/packages/webpack5/src/loaders/nativescript-hot-loader/index.ts +++ b/packages/webpack5/src/loaders/nativescript-hot-loader/index.ts @@ -24,15 +24,10 @@ export default function loader(content: string, map: any) { return this.callback(null, `${content}\n${hmrRuntime}`, map); } - const relativePath = relative( - opts.appPath ?? this.rootContext, - this.resourcePath, - ).replace(/\\/g, '/'); - const hmrCode = this.hot ? dedent` /* NATIVESCRIPT-HOT-LOADER */ - if(module.hot) { + if(module.hot?.accept) { module.hot.accept() } ` diff --git a/packages/webpack5/src/stubs/virtual-entry-typescript.mjs b/packages/webpack5/src/stubs/virtual-entry-typescript.mjs index 1f880d44a..05905968b 100644 --- a/packages/webpack5/src/stubs/virtual-entry-typescript.mjs +++ b/packages/webpack5/src/stubs/virtual-entry-typescript.mjs @@ -6,16 +6,6 @@ import { join, extname, relative } from 'path'; import { fileURLToPath } from 'url'; import { createRequire } from 'module'; -console.log('__COMMONJS__:', __COMMONJS__); - -// const context = require.context("~/", /* deep: */ true, /* filter: */ /\.(xml|js|(?