@vaadin/hilla-react-signals
Advanced tools
Comparing version 24.6.0-alpha3 to 24.6.0-alpha4
{ | ||
"name": "@vaadin/hilla-react-signals", | ||
"version": "24.6.0-alpha3", | ||
"version": "24.6.0-alpha4", | ||
"description": "Signals for Hilla React", | ||
@@ -50,3 +50,3 @@ "main": "index.js", | ||
"@preact/signals-react": "^2.0.0", | ||
"@vaadin/hilla-frontend": "24.6.0-alpha3", | ||
"@vaadin/hilla-frontend": "24.6.0-alpha4", | ||
"nanoid": "^5.0.7" | ||
@@ -53,0 +53,0 @@ }, |
@@ -24,3 +24,3 @@ import { type StateEvent } from './events.js'; | ||
*/ | ||
set(value: T): void; | ||
set(value: T): Operation; | ||
/** | ||
@@ -27,0 +27,0 @@ * Replaces the value with a new one only if the current value is equal to the |
import { nanoid } from "nanoid"; | ||
import { | ||
createReplaceStateEvent, | ||
createSetStateEvent, | ||
isReplaceStateEvent, | ||
@@ -12,2 +13,3 @@ isSetStateEvent, | ||
$resolveOperation, | ||
$setValueQuietly, | ||
$update, | ||
@@ -29,3 +31,8 @@ FullStackSignal | ||
set(value) { | ||
this.value = value; | ||
const { parentClientSignalId } = this.server.config; | ||
const signalId = parentClientSignalId !== void 0 ? this.id : void 0; | ||
const event = createSetStateEvent(value, signalId, parentClientSignalId); | ||
const promise = this[$update](event); | ||
this[$setValueQuietly](value); | ||
return this[$createOperation]({ id: event.id, promise }); | ||
} | ||
@@ -32,0 +39,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
86401
1023
+ Added@vaadin/hilla-frontend@24.6.0-alpha4(transitive)
- Removed@vaadin/hilla-frontend@24.6.0-alpha3(transitive)