@phreshos/client 0.1.17 → 0.1.19

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/README.md CHANGED
@@ -180,25 +180,21 @@ two independent operations and can expose an intermediate state remotely.
180
180
  An `under` or `over` representation may request one local host-rendered Surface:
181
181
 
182
182
  ```ts
183
- await current.window.local.surface.set({
184
- opacity: 0.65,
185
- radius: "large"
186
- }, { duration: 240, easing: "ease-out", wait: true })
183
+ await current.window.local.surface.set({ duration: 240, easing: "ease-out", wait: true })
187
184
 
188
- await current.window.local.surface.remove()
185
+ await current.window.local.surface.remove({ duration: 180, easing: "ease-in" })
189
186
  ```
190
187
 
191
188
  The desktop holds local state only for the lifetime of that iframe
192
189
  representation. Reloading or destroying it resets the representation from
193
190
  authoritative truth, while other desktops remain unaffected. Program code may
194
- synchronize desired settings through its Server and explicitly apply them
195
- again. `set()` with no settings creates a sharp, fully opaque Surface.
196
- Opacity is a finite number from `0` through `1`; zero retains the Surface node.
197
- Radius accepts a nonnegative pixel number, a Theme-derived `ScaleLevel`, or
198
- `"full"`. Only `remove()` restores exact `null` and immediately removes the
199
- node. The optional transaction uses milliseconds and a stable named or cubic
200
- Bézier easing; the desktop performs the motion, honors reduced motion, and does
201
- does not restore anything when a new iframe representation begins. The sharp
191
+ synchronize desired presence through its Server and explicitly apply it
192
+ again. `set()` and `remove()` accept only a required `VisibilityTransition`;
193
+ Programs cannot configure the host Surface's material, opacity, or radius.
194
+ The transition uses milliseconds and a stable named or cubic Bézier easing;
195
+ the desktop performs the motion, honors reduced motion, and removes the Surface
196
+ only after its exit transition completes. `wait: true` makes the request settle
197
+ with that transition. A new iframe representation restores nothing. The
202
198
  container follows the iframe geometry while the independently rounded Surface
203
199
  neither clips nor masks Client content. `window` and `wallpaper` layers reject
204
200
  the capability.
package/dist/domain.js CHANGED
@@ -308,10 +308,12 @@ class LocalWindowSurfaceHandle {
308
308
  constructor(target) {
309
309
  this.target = target;
310
310
  }
311
- async set(settings = {}, transaction) {
312
- await wire.request(["windowLocalSurfaceSet", await this.target(), settings, transaction]);
311
+ async set(transition) {
312
+ await wire.request(["windowLocalSurfaceSet", await this.target(), transition]);
313
+ }
314
+ async remove(transition) {
315
+ await wire.request(["windowLocalSurfaceRemove", await this.target(), transition]);
313
316
  }
314
- async remove() { await wire.request(["windowLocalSurfaceRemove", await this.target()]); }
315
317
  }
316
318
  function deferredScoped(route, target, convert) {
317
319
  return [
package/dist/main.d.ts CHANGED
@@ -5,4 +5,4 @@ export { current, type Current, type CurrentServer } from "./current.js";
5
5
  export { type Channel, type ChannelCapture, type ChannelEvents, type ChannelMessage } from "./channel.js";
6
6
  export { ClientServiceHandler, ServerServiceHandler, ServiceHandler, type ClientServiceChannel, type ServerServiceChannel, type ServiceChannel, type ServiceKey, type ServiceLifecycleEvents } from "@phreshos/core";
7
7
  export { Client, Endpoint, Process, Program, Server, type Window, type ProgramProcess, type AnswerCapture, type AnswerMessage, type AnswerObserver, type AskCapture, type AskMessage, type AskObserver, type ClientTraffic, type EndpointTraffic, type ServerTraffic, type TrafficCapture, type TrafficEvents, type TrafficMessage } from "./domain.js";
8
- export type { Askable, Capture, Captures, ClientDeclaration, Cleanup, DirectoryStat, EndpointDeclaration, EntryStat, EventMessage, EventName, EventObserver, EventOptions, EventSubscriber, Exit, FileStat, Launch, LaunchClient, Layer, LogKind, LogRecord, LogSource, Message, OtherStat, Outcome, PermissionDecision, Permission, Position, Storage, ProgramEvents, ProgramProcessEvents, ProgramProcessExit, ProgramSql, ProgramStore, ProcessEvents, Publishable, ServedFile, Size, Subscribable, SubscribableEvents, SubscribableFallback, TimedAskable, TimedPermission, Timeoutable, Theme, ThemeEvents, ThemeProperties, Value, WritableTheme, WindowEvents, WindowGeometry, WindowLayer, WindowState, Easing, LocalWindow, LocalWindowSurface, SurfaceSettings, Transaction } from "@phreshos/core";
8
+ export type { Askable, Capture, Captures, ClientDeclaration, Cleanup, DirectoryStat, EndpointDeclaration, EntryStat, EventMessage, EventName, EventObserver, EventOptions, EventSubscriber, Exit, FileStat, Launch, LaunchClient, Layer, LogKind, LogRecord, LogSource, Message, OtherStat, Outcome, PermissionDecision, Permission, Position, Storage, ProgramEvents, ProgramProcessEvents, ProgramProcessExit, ProgramSql, ProgramStore, ProcessEvents, Publishable, ServedFile, Size, Subscribable, SubscribableEvents, SubscribableFallback, TimedAskable, TimedPermission, Timeoutable, Theme, ThemeEvents, ThemeProperties, Value, WritableTheme, WindowEvents, WindowGeometry, WindowLayer, WindowState, Easing, LocalWindow, LocalWindowSurface, VisibilityTransition, Transaction } from "@phreshos/core";
package/dist/wire.js CHANGED
@@ -12,7 +12,6 @@ class Wire {
12
12
  impossible = new Map();
13
13
  identityPromise = null;
14
14
  constructor() {
15
- this.send("boundary", "document", crypto.randomUUID());
16
15
  window.addEventListener("message", event => {
17
16
  if (event.source !== this.parent || !Array.isArray(event.data))
18
17
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phreshos/client",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "The SDK used by a Program's client endpoint.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
@@ -47,13 +47,13 @@
47
47
  "prepack": "node --run build"
48
48
  },
49
49
  "peerDependencies": {
50
- "@phreshos/core": "^0.1.12"
50
+ "@phreshos/core": "^0.1.15"
51
51
  },
52
52
  "dependencies": {
53
53
  "@msgpack/msgpack": "^3.1.3"
54
54
  },
55
55
  "devDependencies": {
56
- "@phreshos/core": "^0.1.14",
56
+ "@phreshos/core": "^0.1.15",
57
57
  "typescript": "^6.0.3"
58
58
  }
59
59
  }