@effect/platform-browser 4.0.0-beta.74 → 4.0.0-beta.76

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.
@@ -42,8 +42,8 @@ export type XHRResponseType = "arraybuffer" | "text";
42
42
  *
43
43
  * **When to use**
44
44
  *
45
- * Use when XHR-backed HTTP requests need to receive response bodies as text or
46
- * as raw `ArrayBuffer` values.
45
+ * Use when you need XHR-backed HTTP requests to receive response bodies as text
46
+ * or raw `ArrayBuffer` values.
47
47
  *
48
48
  * @see {@link XHRResponseType} for the allowed response body modes
49
49
  * @see {@link withXHRArrayBuffer} for scoping XHR response handling to `ArrayBuffer`
@@ -81,8 +81,8 @@ RequestInit } from "effect/unstable/http/FetchHttpClient";
81
81
  *
82
82
  * **When to use**
83
83
  *
84
- * Use when XHR-backed HTTP requests need to receive response bodies as text or
85
- * as raw `ArrayBuffer` values.
84
+ * Use when you need XHR-backed HTTP requests to receive response bodies as text
85
+ * or raw `ArrayBuffer` values.
86
86
  *
87
87
  * @see {@link XHRResponseType} for the allowed response body modes
88
88
  * @see {@link withXHRArrayBuffer} for scoping XHR response handling to `ArrayBuffer`
@@ -20,8 +20,8 @@ export declare const layerSessionStorage: Layer.Layer<KeyValueStore.KeyValueStor
20
20
  *
21
21
  * **When to use**
22
22
  *
23
- * Use when a browser `KeyValueStore` needs persistent asynchronous IndexedDB
24
- * storage instead of the synchronous Web Storage APIs.
23
+ * Use when you need persistent asynchronous IndexedDB storage for a browser
24
+ * `KeyValueStore` instead of the synchronous Web Storage APIs.
25
25
  *
26
26
  * **Details**
27
27
  *
@@ -75,8 +75,8 @@ export const layerSessionStorage = /*#__PURE__*/KeyValueStore.layerStorage(() =>
75
75
  *
76
76
  * **When to use**
77
77
  *
78
- * Use when a browser `KeyValueStore` needs persistent asynchronous IndexedDB
79
- * storage instead of the synchronous Web Storage APIs.
78
+ * Use when you need persistent asynchronous IndexedDB storage for a browser
79
+ * `KeyValueStore` instead of the synchronous Web Storage APIs.
80
80
  *
81
81
  * **Details**
82
82
  *
@@ -45,8 +45,8 @@ import * as Socket from "effect/unstable/socket/Socket";
45
45
  *
46
46
  * **When to use**
47
47
  *
48
- * Use when browser or client-side code needs a complete `Socket` layer
49
- * connected to a WebSocket URL.
48
+ * Use when you need browser code to satisfy the platform socket service from a
49
+ * URL without wiring the browser constructor service separately.
50
50
  *
51
51
  * **Details**
52
52
  *
@@ -45,8 +45,8 @@ import * as Socket from "effect/unstable/socket/Socket";
45
45
  *
46
46
  * **When to use**
47
47
  *
48
- * Use when browser or client-side code needs a complete `Socket` layer
49
- * connected to a WebSocket URL.
48
+ * Use when you need browser code to satisfy the platform socket service from a
49
+ * URL without wiring the browser constructor service separately.
50
50
  *
51
51
  * **Details**
52
52
  *
@@ -5,8 +5,8 @@ import * as Worker from "effect/unstable/workers/Worker";
5
5
  *
6
6
  * **When to use**
7
7
  *
8
- * Use when browser parent or client code needs both the browser
9
- * `WorkerPlatform` and a `Spawner` from one layer.
8
+ * Use when you need both the browser `WorkerPlatform` and a `Spawner` from one
9
+ * layer.
10
10
  *
11
11
  * **Details**
12
12
  *
@@ -47,8 +47,8 @@ import { WorkerError, WorkerReceiveError } from "effect/unstable/workers/WorkerE
47
47
  *
48
48
  * **When to use**
49
49
  *
50
- * Use when browser parent or client code needs both the browser
51
- * `WorkerPlatform` and a `Spawner` from one layer.
50
+ * Use when you need both the browser `WorkerPlatform` and a `Spawner` from one
51
+ * layer.
52
52
  *
53
53
  * **Details**
54
54
  *
@@ -12,8 +12,8 @@ export declare const make: (self: MessagePort | Window) => WorkerRunner.WorkerRu
12
12
  *
13
13
  * **When to use**
14
14
  *
15
- * Use when a browser worker entry point uses the ambient `self` object as the
16
- * worker transport.
15
+ * Use when you need a browser worker entry point to use the ambient `self`
16
+ * object as the worker transport.
17
17
  *
18
18
  * **Details**
19
19
  *
@@ -167,8 +167,8 @@ export const make = self => ({
167
167
  *
168
168
  * **When to use**
169
169
  *
170
- * Use when a browser worker entry point uses the ambient `self` object as the
171
- * worker transport.
170
+ * Use when you need a browser worker entry point to use the ambient `self`
171
+ * object as the worker transport.
172
172
  *
173
173
  * **Details**
174
174
  *
@@ -41,6 +41,11 @@ declare const ErrorTypeId = "~@effect/platform-browser/Clipboard/ClipboardError"
41
41
  /**
42
42
  * Defines the service interface for reading from, writing to, and clearing the browser clipboard.
43
43
  *
44
+ * **When to use**
45
+ *
46
+ * Use when an application needs clipboard operations through an Effect service
47
+ * so browser failures stay in the error channel.
48
+ *
44
49
  * **Details**
45
50
  *
46
51
  * `read` and `write` work with `ClipboardItem` arrays. `readString` and
@@ -86,8 +91,8 @@ export declare class ClipboardError extends ClipboardError_base<{
86
91
  *
87
92
  * **When to use**
88
93
  *
89
- * Use when an Effect needs to require or provide clipboard capabilities through
90
- * the context.
94
+ * Use when you need to require or provide clipboard capabilities through
95
+ * Effect's context.
91
96
  *
92
97
  * @see {@link make} for building a custom clipboard service
93
98
  * @see {@link layer} for providing the browser-backed clipboard service
@@ -1 +1 @@
1
- {"version":3,"file":"Clipboard.d.ts","sourceRoot":"","sources":["../src/Clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AAEzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,QAAA,MAAM,MAAM,wCAAwC,CAAA;AACpD,QAAA,MAAM,WAAW,uDAAuD,CAAA;AAExE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;IAC5D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MA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,OAAO,GAAG,WAAW,GAAG,OAAO,MAAM,CAAC,KAC3D,SAMC,CAAA;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAsCxC,CAAA"}
package/dist/Clipboard.js CHANGED
@@ -53,8 +53,8 @@ export class ClipboardError extends /*#__PURE__*/Data.TaggedError("ClipboardErro
53
53
  *
54
54
  * **When to use**
55
55
  *
56
- * Use when an Effect needs to require or provide clipboard capabilities through
57
- * the context.
56
+ * Use when you need to require or provide clipboard capabilities through
57
+ * Effect's context.
58
58
  *
59
59
  * @see {@link make} for building a custom clipboard service
60
60
  * @see {@link layer} for providing the browser-backed clipboard service
@@ -1 +1 @@
1
- {"version":3,"file":"Clipboard.js","names":["Context","Data","Effect","Layer","TypeId","ErrorTypeId","ClipboardError","TaggedError","Clipboard","Service","make","impl","of","clear","writeString","writeBlob","blob","write","ClipboardItem","type","layer","succeed","read","tryPromise","try","navigator","clipboard","catch","cause","s","readString","readText","text","writeText"],"sources":["../src/Clipboard.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AAErC,MAAMC,MAAM,GAAG,qCAAqC;AACpD,MAAMC,WAAW,GAAG,oDAAoD;AA+BxE;;;;;;AAMA,OAAM,MAAOC,cAAe,sBAAQL,IAAI,CAACM,WAAW,CAAC,gBAAgB,CAGnE;EACS,CAACF,WAAW,IAAIA,WAAW;;AAGtC;;;;;;;;;;;;;;AAcA,OAAO,MAAMG,SAAS,gBAA0CR,OAAO,CAACS,OAAO,CAAYL,MAAM,CAAC;AAElG;;;;;;AAMA,OAAO,MAAMM,IAAI,GACfC,IAA4D,IAE5DH,SAAS,CAACI,EA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cAAc,CAAC;MACjBsB,KAAK;MACL,SAAS,EAAE;KACZ;GACJ;CACJ,CAAC,CACH","ignoreList":[]}
1
+ {"version":3,"file":"Clipboard.js","names":["Context","Data","Effect","Layer","TypeId","ErrorTypeId","ClipboardError","TaggedError","Clipboard","Service","make","impl","of","clear","writeString","writeBlob","blob","write","ClipboardItem","type","layer","succeed","read","tryPromise","try","navigator","clipboard","catch","cause","s","readString","readText","text","writeText"],"sources":["../src/Clipboard.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AAErC,MAAMC,MAAM,GAAG,qCAAqC;AACpD,MAAMC,WAAW,GAAG,oDAAoD;AAoCxE;;;;;;AAMA,OAAM,MAAOC,cAAe,sBAAQL,IAAI,CAACM,WAAW,CAAC,gBAAgB,CAGnE;EACS,CAACF,WAAW,IAAIA,WAAW;;AAGtC;;;;;;;;;;;;;;AAcA,OAAO,MAAMG,SAAS,gBAA0CR,OAAO,CAACS,OAAO,CAAYL,MAAM,CAAC;AAElG;;;;;;AAMA,OAAO,MAAMM,IAAI,GACfC,IAA4D,IAE5DH,SAAS,CAACI,EAAE,CAAC;EACX,GAAGD,IAAI;EACP,CAACP,MAAM,GAAGA,MAAM;EAChBS,KAAK,EAAEF,IAAI,CAACG,WAAW,CAAC,EAAE,CAAC;EAC3BC,SAAS,EAAGC,IAAU,IAAKL,IAAI,CAACM,KAAK,CAAC,CAAC,IAAIC,aAAa,CAAC;IAAE,CAACF,IAAI,CAACG,IAAI,GAAGH;EAAI,CAAE,CAAC,CAAC;CACjF,CAAC;AAEJ;;;;;;AAMA,OAAO,MAAMI,KAAK,gBAA2BjB,KAAK,CAACkB,OAAO,CACxDb,SAAS,eACTE,IAAI,CAAC;EACHY,IAAI,eAAEpB,MAAM,CAACqB,UAAU,CAAC;IACtBC,GAAG,EAAEA,CAAA,KAAMC,SAAS,CAACC,SAAS,CAACJ,IAAI,EAAE;IACrCK,KAAK,EAAGC,KAAK,IACX,IAAItB,cAAc,CAAC;MACjBsB,KAAK;MACL,SAAS,EAAE;KACZ;GACJ,CAAC;EACFX,KAAK,EAAGY,CAAuB,IAC7B3B,MAAM,CAACqB,UAAU,CAAC;IAChBC,GAAG,EAAEA,CAAA,KAAMC,SAAS,CAACC,SAAS,CAACT,KAAK,CAACY,CAAC,CAAC;IACvCF,KAAK,EAAGC,KAAK,IACX,IAAItB,cAAc,CAAC;MACjBsB,KAAK;MACL,SAAS,EAAE;KACZ;GACJ,CAAC;EACJE,UAAU,eAAE5B,MAAM,CAACqB,UAAU,CAAC;IAC5BC,GAAG,EAAEA,CAAA,KAAMC,SAAS,CAACC,SAAS,CAACK,QAAQ,EAAE;IACzCJ,KAAK,EAAGC,KAAK,IACX,IAAItB,cAAc,CAAC;MACjBsB,KAAK;MACL,SAAS,EAAE;KACZ;GACJ,CAAC;EACFd,WAAW,EAAGkB,IAAY,IACxB9B,MAAM,CAACqB,UAAU,CAAC;IAChBC,GAAG,EAAEA,CAAA,KAAMC,SAAS,CAACC,SAAS,CAACO,SAAS,CAACD,IAAI,CAAC;IAC9CL,KAAK,EAAGC,KAAK,IACX,IAAItB,cAAc,CAAC;MACjBsB,KAAK;MACL,SAAS,EAAE;KACZ;GACJ;CACJ,CAAC,CACH","ignoreList":[]}
@@ -78,8 +78,8 @@ export interface Geolocation {
78
78
  *
79
79
  * **When to use**
80
80
  *
81
- * Use when an Effect needs to access or provide geolocation capabilities
82
- * through the context.
81
+ * Use when you need to access or provide geolocation capabilities through
82
+ * Effect's context.
83
83
  *
84
84
  * @see {@link layer} for providing the browser-backed geolocation service
85
85
  *
@@ -47,8 +47,8 @@ const ErrorTypeId = "~@effect/platform-browser/Geolocation/GeolocationError";
47
47
  *
48
48
  * **When to use**
49
49
  *
50
- * Use when an Effect needs to access or provide geolocation capabilities
51
- * through the context.
50
+ * Use when you need to access or provide geolocation capabilities through
51
+ * Effect's context.
52
52
  *
53
53
  * @see {@link layer} for providing the browser-backed geolocation service
54
54
  *
@@ -57,8 +57,8 @@ export declare const IDBValidKey: Schema.Union<readonly [Schema.Union<readonly [
57
57
  *
58
58
  * **When to use**
59
59
  *
60
- * Use when defining numeric key-path fields for `IndexedDbTable` definitions
61
- * that use IndexedDB auto-increment keys.
60
+ * Use when you need to define numeric key-path fields for `IndexedDbTable`
61
+ * definitions that use IndexedDB auto-increment keys.
62
62
  *
63
63
  * **Details**
64
64
  *
package/dist/IndexedDb.js CHANGED
@@ -49,8 +49,8 @@ export const IDBValidKey = /*#__PURE__*/Schema.Union([IDBFlatKey, /*#__PURE__*/S
49
49
  *
50
50
  * **When to use**
51
51
  *
52
- * Use when defining numeric key-path fields for `IndexedDbTable` definitions
53
- * that use IndexedDB auto-increment keys.
52
+ * Use when you need to define numeric key-path fields for `IndexedDbTable`
53
+ * definitions that use IndexedDB auto-increment keys.
54
54
  *
55
55
  * **Details**
56
56
  *
@@ -75,7 +75,7 @@ declare const IndexedDbDatabase_base: Context.ServiceClass<IndexedDbDatabase, "~
75
75
  *
76
76
  * **When to use**
77
77
  *
78
- * Use when an effect needs access to the live database service after an
78
+ * Use when you need access to the live database service after an
79
79
  * `IndexedDbSchema` layer has been provided, especially for `rebuild` or
80
80
  * lower-level database primitives.
81
81
  *
@@ -94,7 +94,7 @@ export class IndexedDbDatabaseError extends /*#__PURE__*/Data.TaggedError("Index
94
94
  *
95
95
  * **When to use**
96
96
  *
97
- * Use when an effect needs access to the live database service after an
97
+ * Use when you need access to the live database service after an
98
98
  * `IndexedDbSchema` layer has been provided, especially for `rebuild` or
99
99
  * lower-level database primitives.
100
100
  *
@@ -72,6 +72,11 @@ export type SchemaWithName<Db extends Any, TableName extends string> = IndexedDb
72
72
  /**
73
73
  * Creates an `IndexedDbVersion` from one or more table definitions.
74
74
  *
75
+ * **When to use**
76
+ *
77
+ * Use when you need a typed description of the target IndexedDB schema that a
78
+ * database migration will materialize.
79
+ *
75
80
  * **Details**
76
81
  *
77
82
  * The returned version exposes a `tables` map keyed by each table's
@@ -1 +1 @@
1
- {"version":3,"file":"IndexedDbVersion.d.ts","sourceRoot":"","sources":["../src/IndexedDbVersion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,KAAK,KAAK,cAAc,MAAM,qBAAqB,CAAA;AAE1D,QAAA,MAAM,MAAM,+CAA+C,CAAA;AAE3D;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAC/B,GAAG,CAAC,MAAM,SAAS,cAAc,CAAC,YAAY,CAC9C,SAAQ,QAAQ;IAChB,KAAI,CAAC,EAAE,KAAK,GAAG,EAAE,CAAA;IACjB,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IAChC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC7C;AAED;;;;;GAKG;AACH,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;CACjC;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;AAExE;;;;;GAKG;AACH,MAAM,MAAM,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,EAAE,SAAS,gBAAgB,CAAC,MAAM,OAAO,CAAC,GAAG,OAAO,GAAG,KAAK,CAAA;AAEjG;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CACvB,EAAE,SAAS,GAAG,EACd,SAAS,SAAS,MAAM,IACtB,cAAc,CA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M,MAAM,YAAY,GAAG,gBAAgB,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;AAExE;;;;;GAKG;AACH,MAAM,MAAM,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,EAAE,SAAS,gBAAgB,CAAC,MAAM,OAAO,CAAC,GAAG,OAAO,GAAG,KAAK,CAAA;AAEjG;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CACvB,EAAE,SAAS,GAAG,EACd,SAAS,SAAS,MAAM,IACtB,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;AAElD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CACxB,EAAE,SAAS,GAAG,EACd,SAAS,SAAS,MAAM,IACtB,cAAc,CAAC,WAAW,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAA;AAmB9E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,IAAI,GACf,KAAK,CAAC,MAAM,SAAS,qBAAqB,CAAC,cAAc,CAAC,YAAY,CAAC,EAEvE,GAAG,QAAQ,MAAM,KAChB,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAG9B,CAAA"}
@@ -16,6 +16,11 @@ const makeProto = options => {
16
16
  /**
17
17
  * Creates an `IndexedDbVersion` from one or more table definitions.
18
18
  *
19
+ * **When to use**
20
+ *
21
+ * Use when you need a typed description of the target IndexedDB schema that a
22
+ * database migration will materialize.
23
+ *
19
24
  * **Details**
20
25
  *
21
26
  * The returned version exposes a `tables` map keyed by each table's
@@ -1 +1 @@
1
- {"version":3,"file":"IndexedDbVersion.js","names":["pipeArguments","TypeId","Proto","pipe","arguments","makeProto","options","Version","Object","assign","tables","make","Map","map","table","tableName"],"sources":["../src/IndexedDbVersion.ts"],"sourcesContent":[null],"mappings":"AAqBA,SAASA,aAAa,QAAQ,iBAAiB;AAG/C,MAAMC,MAAM,GAAG,4CAA4C;AAgE3D,MAAMC,KAAK,GAAG;EACZ,CAACD,MAAM,GAAGA,MAAM;EAChBE,IAAIA,CAAA;IACF,OAAOH,aAAa,CAAC,IAAI,EAAEI,SAAS,CAAC;EACvC;CACD;AAED,MAAMC,SAAS,GAAgDC,OAE9D,IAA8B;EAC7B;EACA,MAAMC,OAAO;EACbC,MAAM,CAACC,MAAM,CAACF,OAAO,EAAEL,KAAK,CAAC;EAC3BK,OAAe,CAACG,MAAM,GAAGJ,OAAO,CAACI,MAAM;EACzC,OAAOH,OAAc;AACvB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMI,IAAI,GAAGA,CAGlB,GAAGD,MAAc,KAEjBL,SAAS,CAAC;EACRK,MAAM,EAAE,IAAIE,GAAG,CAACF,MAAM,CAACG,GAAG,CAAEC,KAAK,IAAK,CAACA,KAAK,CAACC,SAAS,EAAED,KAAK,CAAC,CAAC;CAChE,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"IndexedDbVersion.js","names":["pipeArguments","TypeId","Proto","pipe","arguments","makeProto","options","Version","Object","assign","tables","make","Map","map","table","tableName"],"sources":["../src/IndexedDbVersion.ts"],"sourcesContent":[null],"mappings":"AAqBA,SAASA,aAAa,QAAQ,iBAAiB;AAG/C,MAAMC,MAAM,GAAG,4CAA4C;AAgE3D,MAAMC,KAAK,GAAG;EACZ,CAACD,MAAM,GAAGA,MAAM;EAChBE,IAAIA,CAAA;IACF,OAAOH,aAAa,CAAC,IAAI,EAAEI,SAAS,CAAC;EACvC;CACD;AAED,MAAMC,SAAS,GAAgDC,OAE9D,IAA8B;EAC7B;EACA,MAAMC,OAAO;EACbC,MAAM,CAACC,MAAM,CAACF,OAAO,EAAEL,KAAK,CAAC;EAC3BK,OAAe,CAACG,MAAM,GAAGJ,OAAO,CAACI,MAAM;EACzC,OAAOH,OAAc;AACvB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMI,IAAI,GAAGA,CAGlB,GAAGD,MAAc,KAEjBL,SAAS,CAAC;EACRK,MAAM,EAAE,IAAIE,GAAG,CAACF,MAAM,CAACG,GAAG,CAAEC,KAAK,IAAK,CAACA,KAAK,CAACC,SAAS,EAAED,KAAK,CAAC,CAAC;CAChE,CAAC","ignoreList":[]}
@@ -112,8 +112,8 @@ export declare class PermissionsError extends PermissionsError_base<{
112
112
  *
113
113
  * **When to use**
114
114
  *
115
- * Use when an Effect needs to require or provide browser permission querying
116
- * through the context.
115
+ * Use when you need to require or provide browser permission querying through
116
+ * Effect's context.
117
117
  *
118
118
  * @category services
119
119
  * @since 4.0.0
@@ -124,8 +124,8 @@ export declare const Permissions: Context.Service<Permissions, Permissions>;
124
124
  *
125
125
  * **When to use**
126
126
  *
127
- * Use when browser programs need a live `Permissions` service backed by the
128
- * ambient `navigator.permissions` implementation.
127
+ * Use when you need a live browser `Permissions` service backed by the ambient
128
+ * `navigator.permissions` implementation.
129
129
  *
130
130
  * **Details**
131
131
  *
@@ -84,8 +84,8 @@ export class PermissionsError extends /*#__PURE__*/Data.TaggedError("Permissions
84
84
  *
85
85
  * **When to use**
86
86
  *
87
- * Use when an Effect needs to require or provide browser permission querying
88
- * through the context.
87
+ * Use when you need to require or provide browser permission querying through
88
+ * Effect's context.
89
89
  *
90
90
  * @category services
91
91
  * @since 4.0.0
@@ -96,8 +96,8 @@ export const Permissions = /*#__PURE__*/Context.Service(TypeId);
96
96
  *
97
97
  * **When to use**
98
98
  *
99
- * Use when browser programs need a live `Permissions` service backed by the
100
- * ambient `navigator.permissions` implementation.
99
+ * Use when you need a live browser `Permissions` service backed by the ambient
100
+ * `navigator.permissions` implementation.
101
101
  *
102
102
  * **Details**
103
103
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@effect/platform-browser",
3
3
  "type": "module",
4
- "version": "4.0.0-beta.74",
4
+ "version": "4.0.0-beta.76",
5
5
  "license": "MIT",
6
6
  "description": "Platform specific implementations for the browser",
7
7
  "homepage": "https://effect.website",
@@ -45,12 +45,12 @@
45
45
  "provenance": true
46
46
  },
47
47
  "peerDependencies": {
48
- "effect": "^4.0.0-beta.74"
48
+ "effect": "^4.0.0-beta.76"
49
49
  },
50
50
  "devDependencies": {
51
51
  "mock-xmlhttprequest": "^8.4.1",
52
52
  "fake-indexeddb": "^6.2.5",
53
- "effect": "^4.0.0-beta.74"
53
+ "effect": "^4.0.0-beta.76"
54
54
  },
55
55
  "dependencies": {
56
56
  "multipasta": "^0.2.7"
@@ -101,8 +101,8 @@ export type XHRResponseType = "arraybuffer" | "text"
101
101
  *
102
102
  * **When to use**
103
103
  *
104
- * Use when XHR-backed HTTP requests need to receive response bodies as text or
105
- * as raw `ArrayBuffer` values.
104
+ * Use when you need XHR-backed HTTP requests to receive response bodies as text
105
+ * or raw `ArrayBuffer` values.
106
106
  *
107
107
  * @see {@link XHRResponseType} for the allowed response body modes
108
108
  * @see {@link withXHRArrayBuffer} for scoping XHR response handling to `ArrayBuffer`
@@ -82,8 +82,8 @@ export const layerSessionStorage: Layer.Layer<KeyValueStore.KeyValueStore> = Key
82
82
  *
83
83
  * **When to use**
84
84
  *
85
- * Use when a browser `KeyValueStore` needs persistent asynchronous IndexedDB
86
- * storage instead of the synchronous Web Storage APIs.
85
+ * Use when you need persistent asynchronous IndexedDB storage for a browser
86
+ * `KeyValueStore` instead of the synchronous Web Storage APIs.
87
87
  *
88
88
  * **Details**
89
89
  *
@@ -46,8 +46,8 @@ import * as Socket from "effect/unstable/socket/Socket"
46
46
  *
47
47
  * **When to use**
48
48
  *
49
- * Use when browser or client-side code needs a complete `Socket` layer
50
- * connected to a WebSocket URL.
49
+ * Use when you need browser code to satisfy the platform socket service from a
50
+ * URL without wiring the browser constructor service separately.
51
51
  *
52
52
  * **Details**
53
53
  *
@@ -48,8 +48,8 @@ import { WorkerError, WorkerReceiveError } from "effect/unstable/workers/WorkerE
48
48
  *
49
49
  * **When to use**
50
50
  *
51
- * Use when browser parent or client code needs both the browser
52
- * `WorkerPlatform` and a `Spawner` from one layer.
51
+ * Use when you need both the browser `WorkerPlatform` and a `Spawner` from one
52
+ * layer.
53
53
  *
54
54
  * **Details**
55
55
  *
@@ -187,8 +187,8 @@ export const make = (self: MessagePort | Window): WorkerRunner.WorkerRunnerPlatf
187
187
  *
188
188
  * **When to use**
189
189
  *
190
- * Use when a browser worker entry point uses the ambient `self` object as the
191
- * worker transport.
190
+ * Use when you need a browser worker entry point to use the ambient `self`
191
+ * object as the worker transport.
192
192
  *
193
193
  * **Details**
194
194
  *
package/src/Clipboard.ts CHANGED
@@ -44,6 +44,11 @@ const ErrorTypeId = "~@effect/platform-browser/Clipboard/ClipboardError"
44
44
  /**
45
45
  * Defines the service interface for reading from, writing to, and clearing the browser clipboard.
46
46
  *
47
+ * **When to use**
48
+ *
49
+ * Use when an application needs clipboard operations through an Effect service
50
+ * so browser failures stay in the error channel.
51
+ *
47
52
  * **Details**
48
53
  *
49
54
  * `read` and `write` work with `ClipboardItem` arrays. `readString` and
@@ -88,8 +93,8 @@ export class ClipboardError extends Data.TaggedError("ClipboardError")<{
88
93
  *
89
94
  * **When to use**
90
95
  *
91
- * Use when an Effect needs to require or provide clipboard capabilities through
92
- * the context.
96
+ * Use when you need to require or provide clipboard capabilities through
97
+ * Effect's context.
93
98
  *
94
99
  * @see {@link make} for building a custom clipboard service
95
100
  * @see {@link layer} for providing the browser-backed clipboard service
@@ -89,8 +89,8 @@ export interface Geolocation {
89
89
  *
90
90
  * **When to use**
91
91
  *
92
- * Use when an Effect needs to access or provide geolocation capabilities
93
- * through the context.
92
+ * Use when you need to access or provide geolocation capabilities through
93
+ * Effect's context.
94
94
  *
95
95
  * @see {@link layer} for providing the browser-backed geolocation service
96
96
  *
package/src/IndexedDb.ts CHANGED
@@ -75,8 +75,8 @@ export const IDBValidKey = Schema.Union([IDBFlatKey, Schema.Array(IDBFlatKey)])
75
75
  *
76
76
  * **When to use**
77
77
  *
78
- * Use when defining numeric key-path fields for `IndexedDbTable` definitions
79
- * that use IndexedDB auto-increment keys.
78
+ * Use when you need to define numeric key-path fields for `IndexedDbTable`
79
+ * definitions that use IndexedDB auto-increment keys.
80
80
  *
81
81
  * **Details**
82
82
  *
@@ -125,7 +125,7 @@ export class IndexedDbDatabaseError extends Data.TaggedError(
125
125
  *
126
126
  * **When to use**
127
127
  *
128
- * Use when an effect needs access to the live database service after an
128
+ * Use when you need access to the live database service after an
129
129
  * `IndexedDbSchema` layer has been provided, especially for `rebuild` or
130
130
  * lower-level database primitives.
131
131
  *
@@ -106,6 +106,11 @@ const makeProto = <Tables extends IndexedDbTable.AnyWithProps>(options: {
106
106
  /**
107
107
  * Creates an `IndexedDbVersion` from one or more table definitions.
108
108
  *
109
+ * **When to use**
110
+ *
111
+ * Use when you need a typed description of the target IndexedDB schema that a
112
+ * database migration will materialize.
113
+ *
109
114
  * **Details**
110
115
  *
111
116
  * The returned version exposes a `tables` map keyed by each table's
@@ -128,8 +128,8 @@ export class PermissionsError extends Data.TaggedError("PermissionsError")<{
128
128
  *
129
129
  * **When to use**
130
130
  *
131
- * Use when an Effect needs to require or provide browser permission querying
132
- * through the context.
131
+ * Use when you need to require or provide browser permission querying through
132
+ * Effect's context.
133
133
  *
134
134
  * @category services
135
135
  * @since 4.0.0
@@ -141,8 +141,8 @@ export const Permissions: Context.Service<Permissions, Permissions> = Context.Se
141
141
  *
142
142
  * **When to use**
143
143
  *
144
- * Use when browser programs need a live `Permissions` service backed by the
145
- * ambient `navigator.permissions` implementation.
144
+ * Use when you need a live browser `Permissions` service backed by the ambient
145
+ * `navigator.permissions` implementation.
146
146
  *
147
147
  * **Details**
148
148
  *