@cross-deck/web 1.6.4 → 1.8.0
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 +74 -49
- package/dist/crossdeck.umd.min.js +2 -2
- package/dist/crossdeck.umd.min.js.map +1 -1
- package/dist/error-codes.json +8 -1
- package/dist/index.cjs +222 -169
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +15 -6
- package/dist/index.d.ts +15 -6
- package/dist/index.mjs +222 -169
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +211 -158
- package/dist/react.cjs.map +1 -1
- package/dist/react.mjs +211 -158
- package/dist/react.mjs.map +1 -1
- package/dist/vue.cjs +211 -158
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.mjs +211 -158
- package/dist/vue.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/contracts.json +0 -546
package/CHANGELOG.md
CHANGED
|
@@ -2,26 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@cross-deck/web` will be documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
## [1.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
## [1.8.0] — 2026-06-11
|
|
6
|
+
|
|
7
|
+
**PARK on version-rejection — events are held, never dropped.** A third
|
|
8
|
+
event-queue outcome for the day the server stops accepting an outdated event
|
|
9
|
+
format. Purely additive; no public API change.
|
|
10
|
+
|
|
11
|
+
**Added:**
|
|
12
|
+
|
|
13
|
+
- **PARK (HTTP `426` / `sdk_version_unsupported`).** Previously a permanent 4xx
|
|
14
|
+
dropped the batch. Now a version-rejection is recognised as its own outcome —
|
|
15
|
+
distinct from retry (transient) and drop (invalid): the data is good, only the
|
|
16
|
+
wire dialect is stale. The queue **holds** the events (folded to the front of
|
|
17
|
+
the durable localStorage queue, FIFO-capped at 1000), **hushes** (stops
|
|
18
|
+
flushing a known-too-old payload — no wasted battery/bandwidth), **signals**
|
|
19
|
+
once (one `console.warn` + a typed `sdk.parked` debug event the dashboard
|
|
20
|
+
reads), and **backfills** on the next page load after you upgrade. So "paused,
|
|
21
|
+
not lost — held on-device, resumes on upgrade" is literally true.
|
|
22
|
+
- **`sdk_version_unsupported`** added to the error-codes catalogue with
|
|
23
|
+
remediation, and `version_error` to `CrossdeckErrorType`. `CrossdeckError`
|
|
24
|
+
now carries `minVersion` / `surface` (parsed from the 426 body) so the PARK
|
|
25
|
+
message names the exact version to update to.
|
|
26
|
+
- New `onParked` queue callback (host → dashboard heartbeat channel).
|
|
27
|
+
- Bundle-size budget: UMD min 33 → 35 KB gzipped (~0.5 KB for the PARK branch +
|
|
28
|
+
onParked + catalogue entry + minVersion/surface). core/react/vue unchanged,
|
|
29
|
+
under budget.
|
|
30
|
+
|
|
31
|
+
See https://cross-deck.com/docs/sdk-event-durability/ for the full durability
|
|
32
|
+
contract.
|
|
33
|
+
|
|
34
|
+
## [1.7.0] — 2026-06-10
|
|
35
|
+
|
|
36
|
+
Event Envelope v1 conformance (`backend/docs/event-envelope-spec-v1.md`). Wire-breaking change (pre-launch; free). No public API change.
|
|
37
|
+
|
|
38
|
+
- **`envelopeVersion: 1`** (integer) added to every batch POST body (spec §1). Distinct from `sdk.version`; the server uses it to gate parsing and will refuse payloads without it once enforcement deploys.
|
|
39
|
+
- **`seq`** (number) on every event (spec §3). Per-session monotonic integer, assigned synchronously at `track()` time alongside `timestamp` (one sample). Counter lives in `AutoTracker`, resets to 0 at every session boundary (`session.started`, `resetSession()`, 30-min idle rollover), and persists across tab hide/show within a session. The deterministic tiebreak for events sharing a timestamp.
|
|
40
|
+
- **`context`** object on every event (spec §4). Device/platform facts (`os`, `osVersion`, `appVersion`, `sdkName`, `sdkVersion`, `locale`, `timezone`, `browser`, `browserVersion`) are promoted OUT of `properties` into a standardised top-level object. `properties` retains screen dimensions and all app-supplied properties. This aligns the Web SDK field-set with Swift (which ships `os`, `osVersion`, `sdkName`, `sdkVersion`, `locale`, `timezone`, `deviceModel`), closing the Q3 drift documented in the spec's Phase-0 audit matrix.
|
|
41
|
+
- Bundle-size budget: core ESM + CJS 58 → 60 KB gzipped (~0.5 KB for the envelope fields + browser/browserVersion detection; CJS landed at 58.26, over the old ceiling). react/vue ESM and UMD unchanged, comfortably under budget.
|
|
25
42
|
|
|
26
43
|
## [1.6.3] — 2026-06-01
|
|
27
44
|
|
|
@@ -45,38 +62,46 @@ regardless, so context is preserved on other errors.
|
|
|
45
62
|
|
|
46
63
|
## [1.6.2] — 2026-05-31
|
|
47
64
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
before upgrading if you have downstream logic keyed on it.
|
|
65
|
+
Session-boundary correctness, plus the per-platform contract runtime status
|
|
66
|
+
that had been sitting unreleased. No public API change; `session.ended`
|
|
67
|
+
emission timing changes as described, so read before upgrading if you key
|
|
68
|
+
downstream logic on it.
|
|
53
69
|
|
|
54
|
-
**A tab left open and idle, then used again, no longer stretches one
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
**A tab left open and idle, then used again, no longer stretches one session
|
|
71
|
+
across the gap.** `markActivity()` now rolls to a new session when an event
|
|
72
|
+
lands after the 30-minute inactivity window has lapsed — covering the case the
|
|
73
|
+
page-load and tab-return resume checks miss entirely (a tab kept open and idle,
|
|
74
|
+
then interacted with, with no visibility transition). A single stored session
|
|
75
|
+
can no longer contain a >30-minute gap.
|
|
60
76
|
|
|
61
77
|
**Returning to a long-idle tab no longer back-dates `session.ended`.** The
|
|
62
|
-
visibility-resume path emitted `session.ended` at the moment of return —
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
visibility-resume path emitted `session.ended` at the moment of return — more
|
|
79
|
+
than 30 minutes after the session's last real event — which itself opened an
|
|
80
|
+
intra-session gap. The prior session now ends implicitly (its end inferred from
|
|
81
|
+
its last event), consistent with the page-load resume path. If you key
|
|
82
|
+
downstream logic on `session.ended`, note it no longer fires on a >30-minute
|
|
83
|
+
tab-return.
|
|
84
|
+
|
|
85
|
+
**Per-platform contract runtime status + a 7th live verifier.** Each bundled
|
|
86
|
+
|
|
87
|
+
**Per-platform contract runtime status + a 7th live verifier.** Each bundled
|
|
88
|
+
contract now carries `runtimeVerified` — whether *this* SDK self-verifies it
|
|
89
|
+
at runtime vs. proving it in CI only. It is derived at build time from the
|
|
90
|
+
SDK's `STATIC_VERIFIERS` registry (never hand-set), so the registry can't
|
|
91
|
+
disagree with what actually runs. `CrossdeckContracts` consumers can read it
|
|
92
|
+
to distinguish "watch it pass live" from "CI-proven every release".
|
|
93
|
+
|
|
94
|
+
- New runtime verifier `sdk-error-codes-catalogue` (boot self-test: every
|
|
95
|
+
backend wire code carries a description + resolution in the shipped
|
|
96
|
+
catalogue). Web now self-verifies **7** contracts live.
|
|
97
|
+
- Bundle-size budget: UMD min 32 → 33 KB (~0.4 KB gzipped for the flag + the
|
|
98
|
+
new verifier's frozen 15-code list). Other bundles unchanged, under budget.
|
|
99
|
+
|
|
100
|
+
## [1.6.0] — 2026-05-30
|
|
101
|
+
|
|
102
|
+
Minor — two autocapture fidelity fixes. No public API change; event
|
|
103
|
+
emission behaviour changes as described, so read before upgrading if you
|
|
104
|
+
have downstream logic keyed on `session.ended` timing.
|
|
80
105
|
|
|
81
106
|
**Sessions now survive full-page navigations.** Session state was
|
|
82
107
|
in-memory only, so on a multi-page site (where the SDK re-installs on
|