diff --git a/plugin-sdk/src/cli/dev.ts b/plugin-sdk/src/cli/dev.ts index 2215869e..e9c4ff74 100644 --- a/plugin-sdk/src/cli/dev.ts +++ b/plugin-sdk/src/cli/dev.ts @@ -634,6 +634,7 @@ iframe{width:100%;border:0;background:transparent;min-height:120px;display:block +
@@ -658,7 +659,7 @@ function ctx(){ tripId: val("trip").checked?${tripId}:null, userId:"1", user:{name:"Dev User",avatar:null,isAdmin:true}, appearance:{scheme:accent,density:"comfortable",reducedMotion:val("rm").checked,noTransparency:val("nt").checked}, - formats:{locale:"en",currency:"EUR",timeFormat:"24h",distanceUnit:"metric",temperatureUnit:"celsius",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,blurBookingCodes:false}, + formats:{locale:"en",currency:"EUR",timeFormat:"24h",distanceUnit:"metric",temperatureUnit:"celsius",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,blurBookingCodes:val("blur").checked}, tokens:tokens}; } function postCtx(){ if(f.contentWindow) f.contentWindow.postMessage(ctx(),"*"); } @@ -698,7 +699,7 @@ window.addEventListener("message", function(ev){ } }); var geoTick=null; -["theme","accent","rm","nt","trip"].forEach(function(id){ val(id).addEventListener("change",postCtx); }); +["theme","accent","rm","nt","blur","trip"].forEach(function(id){ val(id).addEventListener("change",postCtx); }); f.addEventListener("load", function(){ f.style.height="120px"; postCtx(); }); var __v; setInterval(function(){ fetch("/__dev/version").then(function(r){return r.text();}).then(function(v){ if(__v&&v!==__v){ f.src=f.src; } __v=v; }).catch(function(){}); },1000); diff --git a/wiki/Plugin-Development.md b/wiki/Plugin-Development.md index be0e9224..3d3155bf 100644 --- a/wiki/Plugin-Development.md +++ b/wiki/Plugin-Development.md @@ -533,7 +533,7 @@ declared), no popups. | `locale` | e.g. `'en'` | | `hostOrigin` | the app origin | | `user` | `{ name, avatar, isAdmin } \| null` — **never** an email; role only as a boolean | -| `formats` | `{ locale, currency, timeFormat, distanceUnit, temperatureUnit, timezone, blurBookingCodes }` | +| `formats` | `{ locale, currency, timeFormat, distanceUnit, temperatureUnit, timezone, blurBookingCodes }` — `blurBookingCodes` mirrors the user's "blur booking codes" preference so your UI can hide confirmation numbers until they're revealed. It is a **display hint, not redaction**: the codes still reach your plugin in full over `trek:invoke`. | | `tokens` | TREK's resolved CSS design tokens for the current theme (see below) | | `appearance` | `{ scheme, density: 'comfortable'\|'compact', reducedMotion, noTransparency }` |