2016-06-14 18:23:40 -07:00
|
|
|
{
|
|
|
|
|
"name": "@angular/forms",
|
|
|
|
|
"version": "0.0.0-PLACEHOLDER",
|
2016-09-14 16:44:39 -07:00
|
|
|
"description": "Angular - directives and services for creating forms",
|
2016-06-14 18:23:40 -07:00
|
|
|
"author": "angular",
|
|
|
|
|
"license": "MIT",
|
2021-04-12 12:12:42 -07:00
|
|
|
"engines": {
|
2026-05-21 14:30:39 +00:00
|
|
|
"node": "^22.22.3 || ^24.15.0 || >=26.0.0"
|
2021-04-12 12:12:42 -07:00
|
|
|
},
|
2020-05-19 14:35:37 +02:00
|
|
|
"dependencies": {
|
2025-12-12 13:53:00 +01:00
|
|
|
"tslib": "^2.3.0",
|
2026-04-21 23:04:39 +02:00
|
|
|
"@standard-schema/spec": "^1.0.0",
|
|
|
|
|
"zod": "^4.0.10"
|
2020-05-19 14:35:37 +02:00
|
|
|
},
|
refactor(forms): add `provideExperimentalWebMcpForms`
This enables the use of the `experimentalWebMcpTool` option on signal forms and implicitly declares a WebMCP tool based on the form data model. This is an experiment inspirted by the WebMCP declarative forms API to see if Angular's framework-level knowledge of the form's declarative data model can produce higher quality WebMCP tools than the web standard can on its own with less effort from the developer.
Example:
```typescript
// main.ts
import {bootstrapApplication} from '@angular/platform-browser';
import {provideExperimentalWebMcpForms} from '@angular/forms';
import {MyComp} from './form';
bootstrapApplication(MyComp, {
providers: [
// Activate the feature.
provideExperimentalWebMcpForms(),
],
});
```
```typescript
// form.ts
import {Component, signal} from '@angular/core';
import {form} from '@angular/forms';
@Component({ /* ... */ })
export class MyComp {
private readonly f = form(signal({
firstName: '',
lastName: '',
}), {
// Implicitly creates a WebMCP tool named `createUser` which accepts a `firstName` and `lastName` as parameters.
experimentalWebMcpTool: {
name: 'createUser',
description: 'Creates a user with the given name.',
},
// Invokes the submit action when the agent calls the WebMCP tool.
submission: {
action: () => {
console.log('User clicked submit, or agent called the tool!');
},
},
});
// ...
}
```
2026-05-04 14:05:20 -07:00
|
|
|
"devDependencies": {
|
2026-08-26 08:40:34 +00:00
|
|
|
"@mcp-b/webmcp-polyfill": "^5.0.0",
|
|
|
|
|
"@mcp-b/webmcp-types": "^5.0.0"
|
refactor(forms): add `provideExperimentalWebMcpForms`
This enables the use of the `experimentalWebMcpTool` option on signal forms and implicitly declares a WebMCP tool based on the form data model. This is an experiment inspirted by the WebMCP declarative forms API to see if Angular's framework-level knowledge of the form's declarative data model can produce higher quality WebMCP tools than the web standard can on its own with less effort from the developer.
Example:
```typescript
// main.ts
import {bootstrapApplication} from '@angular/platform-browser';
import {provideExperimentalWebMcpForms} from '@angular/forms';
import {MyComp} from './form';
bootstrapApplication(MyComp, {
providers: [
// Activate the feature.
provideExperimentalWebMcpForms(),
],
});
```
```typescript
// form.ts
import {Component, signal} from '@angular/core';
import {form} from '@angular/forms';
@Component({ /* ... */ })
export class MyComp {
private readonly f = form(signal({
firstName: '',
lastName: '',
}), {
// Implicitly creates a WebMCP tool named `createUser` which accepts a `firstName` and `lastName` as parameters.
experimentalWebMcpTool: {
name: 'createUser',
description: 'Creates a user with the given name.',
},
// Invokes the submit action when the agent calls the WebMCP tool.
submission: {
action: () => {
console.log('User clicked submit, or agent called the tool!');
},
},
});
// ...
}
```
2026-05-04 14:05:20 -07:00
|
|
|
},
|
2016-06-14 18:23:40 -07:00
|
|
|
"peerDependencies": {
|
|
|
|
|
"@angular/core": "0.0.0-PLACEHOLDER",
|
fix(forms): make composition event buffering configurable (#15256)
This commit fixes a regression where `ngModel` no longer syncs
letter by letter on Android devices, and instead syncs at the
end of every word. This broke when we introduced buffering of
IME events so IMEs like Pinyin keyboards or Katakana keyboards
wouldn't display composition strings. Unfortunately, iOS devices
and Android devices have opposite event behavior. Whereas iOS
devices fire composition events for IME keyboards only, Android
fires composition events for Latin-language keyboards. For
this reason, languages like English don't work as expected on
Android if we always buffer. So to support both platforms,
composition string buffering will only be turned on by default
for non-Android devices.
However, we have also added a `COMPOSITION_BUFFER_MODE` token
to make this configurable by the application. In some cases, apps
might might still want to receive intermediate values. For example,
some inputs begin searching based on Latin letters before a
character selection is made.
As a provider, this is fairly flexible. If you want to turn
composition buffering off, simply provide the token at the top
level:
```ts
providers: [
{provide: COMPOSITION_BUFFER_MODE, useValue: false}
]
```
Or, if you want to change the mode based on locale or platform,
you can use a factory:
```ts
import {shouldUseBuffering} from 'my/lib';
....
providers: [
{provide: COMPOSITION_BUFFER_MODE, useFactory: shouldUseBuffering}
]
```
Closes #15079.
PR Close #15256
2017-03-20 17:38:33 -07:00
|
|
|
"@angular/common": "0.0.0-PLACEHOLDER",
|
2019-10-09 16:08:16 +02:00
|
|
|
"@angular/platform-browser": "0.0.0-PLACEHOLDER",
|
2021-10-06 14:29:30 -07:00
|
|
|
"rxjs": "^6.5.3 || ^7.4.0"
|
2016-06-14 18:23:40 -07:00
|
|
|
},
|
|
|
|
|
"repository": {
|
|
|
|
|
"type": "git",
|
2018-12-07 12:12:59 +01:00
|
|
|
"url": "https://github.com/angular/angular.git",
|
|
|
|
|
"directory": "packages/forms"
|
2018-02-27 15:04:35 -08:00
|
|
|
},
|
2025-12-04 16:07:59 -05:00
|
|
|
"angular": {
|
|
|
|
|
"examples": {
|
|
|
|
|
"format": "sqlite",
|
|
|
|
|
"path": "./resources/code-examples.db"
|
|
|
|
|
}
|
|
|
|
|
},
|
2018-02-27 15:04:35 -08:00
|
|
|
"ng-update": {
|
|
|
|
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
2018-03-14 18:30:18 -07:00
|
|
|
},
|
2021-05-14 12:20:11 -07:00
|
|
|
"sideEffects": false
|
2022-10-11 12:39:05 +00:00
|
|
|
}
|