@minicode-dev/chat 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -14,6 +14,9 @@ All notable changes to `@minicode-dev/chat` (owner: Minicode, project: LIRA).
14
14
 
15
15
  ### Changed
16
16
 
17
+ - Incoming effects autoplay by default in visible conversations, with a 5-second cooldown and no window-focus requirement.
18
+ - New incoming effects can replace an active animation; confetti now fills the panel with 220 responsive particles.
19
+
17
20
  - Effects respect mute, reduced motion, cooldowns and manual replay; old messages and duplicates do not autoplay.
18
21
  - Standalone development and release documentation. Host applications must update their served sound assets.
19
22
 
package/README.md CHANGED
@@ -222,16 +222,16 @@ or use the existing `setChatAssetsBaseUrl` sound asset configuration. Copying th
222
222
  Open the **Efectos y zumbidos** button in the composer and click an effect to send it
223
223
  and play its animation. Each compact row shows sending/sent feedback; sound and automatic
224
224
  playback are controlled by two switches. Received
225
- effects appear as cards with manual replay; automatic playback is opt-in.
225
+ effects appear as cards with manual replay; new received effects play automatically by default in the visible conversation.
226
226
 
227
227
  ```jsx
228
228
  const config = {
229
229
  effects: {
230
230
  enabled: true,
231
- autoPlay: false,
231
+ autoPlay: true,
232
232
  sound: true,
233
233
  volume: 0.35,
234
- cooldownMs: 30000,
234
+ cooldownMs: 5000,
235
235
  maxAgeMs: 10000,
236
236
  allowGroups: false,
237
237
  onPreferencesChange: (patch) => console.log('Save user preferences', patch),
@@ -247,13 +247,13 @@ alongside the versioned payload. Set `effects: false` to disable the feature.
247
247
  Audio requires browser permission to play after a user gesture and respects the chat's
248
248
  mute control. Effects stop when closed or when leaving the conversation; motion reduction
249
249
  uses a static alternative. History, duplicates and reconnection baselines do not trigger
250
- automatic playback. Automatic effects require a visible, focused conversation. Same-origin
250
+ automatic playback. Automatic effects require a visible conversation in a visible tab. Same-origin
251
251
  tab deduplication is best effort. Receiving clients use a cooldown and ignore stale events.
252
252
  The server should enforce its own authorization and rate limits; browser controls alone
253
253
  cannot prevent abusive clients.
254
254
 
255
255
  In the demo, **Nuevas funciones** lets you simulate effects from Ana and configure playback.
256
- The demo permits effects in groups and shortens the cooldown to 1.5 seconds. None of these
256
+ The demo permits effects in groups and uses the same 5-second cooldown. None of these
257
257
  features requires a paid audio API. Sharing full songs and managing a production emoji
258
258
  upload service are outside this implementation.
259
259
 
@@ -281,3 +281,14 @@ proposal; the nudge and confetti WAVs are the original sources of the approved r
281
281
  them separately. Generated files live in `demo/audio-samples/`, are ignored by Git and
282
282
  excluded from npm. Source generators are in `demo/audio-lab/`; see
283
283
  [AUDIO_EFFECTS.md](AUDIO_EFFECTS.md) in the source repository for the arrangement and limitations.
284
+
285
+ ### Fun chat defaults
286
+
287
+ New incoming effects automatically animate in the visible conversation by default;
288
+ manual replay is still available. The default cooldown is 5 seconds. Window focus is
289
+ not required, but hidden tabs and old messages do not replay effects. A new permitted
290
+ effect can replace the animation currently playing. Confetti fills the panel with
291
+ 220 colored particles and scales to its height. Reduced-motion preferences remain respected.
292
+ Browsers can still block sound before the recipient interacts with the site; the visual
293
+ effect does not depend on successful audio playback. Both participants must use an updated
294
+ package, and explicitly saved `autoPlay: false` settings still disable automatic playback.