isChanged() compared against a fabricated '{}' baseline before the first
snapshot() call, so the first query on any non-empty form reported true.
Consumers that embed the boolean in their own baseline (settings dirty
guards) froze that false positive in. Now reports false until a baseline
exists; hasSnapshot getter exposes the state.
New: form listens (capture phase, so non-bubbling events are caught) to
the tp-* control change events and re-emits them as 'form-changed'
(detail.changed = isChanged()), scoped to its own registered controls.
Consumers can drop polling.
20 lines
410 B
JSON
20 lines
410 B
JSON
{
|
|
"name": "@tp/tp-form",
|
|
"version": "1.3.0",
|
|
"description": "",
|
|
"main": "tp-form.js",
|
|
"scripts": {
|
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://gitea.codeblob.work/tp-elements/tp-form.git"
|
|
},
|
|
"author": "trading_peter",
|
|
"license": "Apache-2.0",
|
|
"dependencies": {
|
|
"@tp/helpers": "^2.3.1",
|
|
"lit": "^2.8.0"
|
|
}
|
|
}
|