@effect/platform-browser 4.0.0-beta.7 → 4.0.0-beta.70

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.
Files changed (91) hide show
  1. package/dist/BrowserCrypto.d.ts +23 -0
  2. package/dist/BrowserCrypto.d.ts.map +1 -0
  3. package/dist/BrowserCrypto.js +61 -0
  4. package/dist/BrowserCrypto.js.map +1 -0
  5. package/dist/BrowserHttpClient.d.ts +32 -16
  6. package/dist/BrowserHttpClient.d.ts.map +1 -1
  7. package/dist/BrowserHttpClient.js +66 -18
  8. package/dist/BrowserHttpClient.js.map +1 -1
  9. package/dist/BrowserKeyValueStore.d.ts +17 -14
  10. package/dist/BrowserKeyValueStore.d.ts.map +1 -1
  11. package/dist/BrowserKeyValueStore.js +130 -10
  12. package/dist/BrowserKeyValueStore.js.map +1 -1
  13. package/dist/BrowserPersistence.d.ts +21 -0
  14. package/dist/BrowserPersistence.d.ts.map +1 -0
  15. package/dist/BrowserPersistence.js +188 -0
  16. package/dist/BrowserPersistence.js.map +1 -0
  17. package/dist/BrowserRuntime.d.ts +31 -4
  18. package/dist/BrowserRuntime.d.ts.map +1 -1
  19. package/dist/BrowserRuntime.js +3 -1
  20. package/dist/BrowserRuntime.js.map +1 -1
  21. package/dist/BrowserSocket.d.ts +31 -6
  22. package/dist/BrowserSocket.d.ts.map +1 -1
  23. package/dist/BrowserSocket.js +31 -6
  24. package/dist/BrowserSocket.js.map +1 -1
  25. package/dist/BrowserStream.d.ts +33 -5
  26. package/dist/BrowserStream.d.ts.map +1 -1
  27. package/dist/BrowserStream.js +33 -5
  28. package/dist/BrowserStream.js.map +1 -1
  29. package/dist/BrowserWorker.d.ts +8 -4
  30. package/dist/BrowserWorker.d.ts.map +1 -1
  31. package/dist/BrowserWorker.js +30 -6
  32. package/dist/BrowserWorker.js.map +1 -1
  33. package/dist/BrowserWorkerRunner.d.ts +12 -6
  34. package/dist/BrowserWorkerRunner.d.ts.map +1 -1
  35. package/dist/BrowserWorkerRunner.js +34 -10
  36. package/dist/BrowserWorkerRunner.js.map +1 -1
  37. package/dist/Clipboard.d.ts +40 -13
  38. package/dist/Clipboard.d.ts.map +1 -1
  39. package/dist/Clipboard.js +33 -11
  40. package/dist/Clipboard.js.map +1 -1
  41. package/dist/Geolocation.d.ts +58 -24
  42. package/dist/Geolocation.d.ts.map +1 -1
  43. package/dist/Geolocation.js +46 -16
  44. package/dist/Geolocation.js.map +1 -1
  45. package/dist/IndexedDb.d.ts +77 -0
  46. package/dist/IndexedDb.d.ts.map +1 -0
  47. package/dist/IndexedDb.js +87 -0
  48. package/dist/IndexedDb.js.map +1 -0
  49. package/dist/IndexedDbDatabase.d.ts +150 -0
  50. package/dist/IndexedDbDatabase.d.ts.map +1 -0
  51. package/dist/IndexedDbDatabase.js +324 -0
  52. package/dist/IndexedDbDatabase.js.map +1 -0
  53. package/dist/IndexedDbQueryBuilder.d.ts +430 -0
  54. package/dist/IndexedDbQueryBuilder.d.ts.map +1 -0
  55. package/dist/IndexedDbQueryBuilder.js +927 -0
  56. package/dist/IndexedDbQueryBuilder.js.map +1 -0
  57. package/dist/IndexedDbTable.d.ts +153 -0
  58. package/dist/IndexedDbTable.d.ts.map +1 -0
  59. package/dist/IndexedDbTable.js +58 -0
  60. package/dist/IndexedDbTable.js.map +1 -0
  61. package/dist/IndexedDbVersion.d.ts +80 -0
  62. package/dist/IndexedDbVersion.d.ts.map +1 -0
  63. package/dist/IndexedDbVersion.js +25 -0
  64. package/dist/IndexedDbVersion.js.map +1 -0
  65. package/dist/Permissions.d.ts +45 -15
  66. package/dist/Permissions.d.ts.map +1 -1
  67. package/dist/Permissions.js +35 -10
  68. package/dist/Permissions.js.map +1 -1
  69. package/dist/index.d.ts +357 -10
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +357 -10
  72. package/dist/index.js.map +1 -1
  73. package/package.json +4 -3
  74. package/src/BrowserCrypto.ts +71 -0
  75. package/src/BrowserHttpClient.ts +76 -24
  76. package/src/BrowserKeyValueStore.ts +146 -12
  77. package/src/BrowserPersistence.ts +319 -0
  78. package/src/BrowserRuntime.ts +31 -4
  79. package/src/BrowserSocket.ts +31 -6
  80. package/src/BrowserStream.ts +33 -5
  81. package/src/BrowserWorker.ts +30 -6
  82. package/src/BrowserWorkerRunner.ts +34 -10
  83. package/src/Clipboard.ts +37 -13
  84. package/src/Geolocation.ts +54 -20
  85. package/src/IndexedDb.ts +115 -0
  86. package/src/IndexedDbDatabase.ts +645 -0
  87. package/src/IndexedDbQueryBuilder.ts +2040 -0
  88. package/src/IndexedDbTable.ts +247 -0
  89. package/src/IndexedDbVersion.ts +119 -0
  90. package/src/Permissions.ts +40 -13
  91. package/src/index.ts +364 -10
@@ -0,0 +1,247 @@
1
+ /**
2
+ * Defines typed table descriptors for the browser IndexedDB integration.
3
+ *
4
+ * An `IndexedDbTable` records the object store name, row schema, primary key
5
+ * path, indexes, auto-increment behavior, and transaction durability used by
6
+ * database versions, migrations, and typed queries. These descriptors are
7
+ * useful for local caches, offline-first application state, background queues,
8
+ * drafts, and other browser-persisted data that should be validated through
9
+ * `Schema`.
10
+ *
11
+ * Key paths and index paths must reference encoded schema fields whose values
12
+ * are valid IndexedDB keys, and compound paths are represented as readonly
13
+ * arrays. Tables without a key path use an out-of-line `key` that is added to
14
+ * reads and required for writes, so the row schema itself cannot define a
15
+ * `key` field. Auto-increment tables require a numeric key path; when that key
16
+ * is omitted on write, the module uses a derived schema without the generated
17
+ * key. Declaring indexes here types query builder index selection, but the
18
+ * indexes still need to be created during database migrations.
19
+ *
20
+ * @since 4.0.0
21
+ */
22
+ import { type Pipeable, pipeArguments } from "effect/Pipeable"
23
+ import * as Schema from "effect/Schema"
24
+ import * as Struct from "effect/Struct"
25
+ import type { NoInfer } from "effect/Types"
26
+ import * as IndexedDb from "./IndexedDb.ts"
27
+ import type * as IndexedDbQueryBuilder from "./IndexedDbQueryBuilder.ts"
28
+
29
+ const TypeId = "~@effect/platform-browser/IndexedDbTable"
30
+
31
+ /**
32
+ * Typed IndexedDB table definition containing its name, schema, key path, indexes, auto-increment setting, and transaction durability.
33
+ *
34
+ * @category interface
35
+ * @since 4.0.0
36
+ */
37
+ export interface IndexedDbTable<
38
+ out Name extends string,
39
+ out TableSchema extends AnySchemaStruct,
40
+ out Indexes extends Record<
41
+ string,
42
+ IndexedDbQueryBuilder.KeyPath<TableSchema>
43
+ >,
44
+ out KeyPath extends Readonly<IDBValidKey | undefined>,
45
+ out AutoIncrement extends boolean
46
+ > extends Pipeable {
47
+ new(_: never): {}
48
+ readonly [TypeId]: typeof TypeId
49
+ readonly tableName: Name
50
+ readonly tableSchema: TableSchema
51
+ readonly readSchema: Schema.Top
52
+ readonly autoincrementSchema: Schema.Top
53
+ readonly arraySchema: Schema.Top
54
+ readonly keyPath: KeyPath
55
+ readonly indexes: Indexes
56
+ readonly autoIncrement: AutoIncrement
57
+ readonly durability: IDBTransactionDurability
58
+ }
59
+
60
+ /**
61
+ * Schema constraint for table schemas that expose struct fields.
62
+ *
63
+ * @category models
64
+ * @since 4.0.0
65
+ */
66
+ export type AnySchemaStruct = Schema.Top & {
67
+ readonly fields: Schema.Struct.Fields
68
+ }
69
+
70
+ /**
71
+ * Type-erased shape of an `IndexedDbTable` used when table type parameters are not needed.
72
+ *
73
+ * @category models
74
+ * @since 4.0.0
75
+ */
76
+ export interface Any {
77
+ readonly [TypeId]: typeof TypeId
78
+ readonly keyPath: any
79
+ readonly tableName: string
80
+ readonly tableSchema: Schema.Top
81
+ readonly readSchema: Schema.Top
82
+ readonly autoincrementSchema: Schema.Top
83
+ readonly arraySchema: Schema.Top
84
+ readonly autoIncrement: boolean
85
+ readonly indexes: any
86
+ }
87
+
88
+ /**
89
+ * Type-erased `IndexedDbTable` retaining the table interface properties with broad type parameters.
90
+ *
91
+ * @category models
92
+ * @since 4.0.0
93
+ */
94
+ export type AnyWithProps = IndexedDbTable<
95
+ string,
96
+ AnySchemaStruct,
97
+ any,
98
+ any,
99
+ boolean
100
+ >
101
+
102
+ /**
103
+ * Extracts the table name type from an `IndexedDbTable`.
104
+ *
105
+ * @category models
106
+ * @since 4.0.0
107
+ */
108
+ export type TableName<Table extends Any> = Table["tableName"]
109
+ /**
110
+ * Extracts the key-path type from an `IndexedDbTable`.
111
+ *
112
+ * @category models
113
+ * @since 4.0.0
114
+ */
115
+ export type KeyPath<Table extends Any> = Table["keyPath"]
116
+
117
+ /**
118
+ * Extracts the auto-increment flag type from an `IndexedDbTable`.
119
+ *
120
+ * @category models
121
+ * @since 4.0.0
122
+ */
123
+ export type AutoIncrement<Table extends Any> = Table["autoIncrement"]
124
+
125
+ /**
126
+ * Extracts the schema type from an `IndexedDbTable`.
127
+ *
128
+ * @category models
129
+ * @since 4.0.0
130
+ */
131
+ export type TableSchema<Table extends Any> = Table["tableSchema"]
132
+ /**
133
+ * Extracts the decoding or encoding service requirements needed by an `IndexedDbTable` schema.
134
+ *
135
+ * @category models
136
+ * @since 4.0.0
137
+ */
138
+ export type Context<Table extends Any> =
139
+ | Table["tableSchema"]["DecodingServices"]
140
+ | Table["tableSchema"]["EncodingServices"]
141
+
142
+ /**
143
+ * Extracts the encoded row type from an `IndexedDbTable` schema.
144
+ *
145
+ * @category models
146
+ * @since 4.0.0
147
+ */
148
+ export type Encoded<Table extends Any> = Table["tableSchema"]["Encoded"]
149
+
150
+ /**
151
+ * Extracts the index definition map from an `IndexedDbTable`.
152
+ *
153
+ * @category models
154
+ * @since 4.0.0
155
+ */
156
+ export type Indexes<Table extends Any> = Table["indexes"]
157
+
158
+ /**
159
+ * Selects the table with the given name from a union of `IndexedDbTable` types.
160
+ *
161
+ * @category models
162
+ * @since 4.0.0
163
+ */
164
+ export type WithName<Table extends Any, TableName extends string> = Extract<
165
+ Table,
166
+ { readonly tableName: TableName }
167
+ >
168
+
169
+ const Proto = {
170
+ [TypeId]: TypeId,
171
+ pipe() {
172
+ return pipeArguments(this, arguments)
173
+ }
174
+ }
175
+
176
+ /**
177
+ * Creates a typed IndexedDB table definition from its name, schema, optional key path, indexes, auto-increment flag, and durability.
178
+ *
179
+ * @category constructors
180
+ * @since 4.0.0
181
+ */
182
+ export const make = <
183
+ const Name extends string,
184
+ TableSchema extends AnySchemaStruct,
185
+ const Indexes extends Record<
186
+ string,
187
+ IndexedDbQueryBuilder.KeyPath<TableSchema>
188
+ >,
189
+ const KeyPath extends
190
+ | (AutoIncrement extends true ? IndexedDbQueryBuilder.KeyPathNumber<NoInfer<TableSchema>>
191
+ : IndexedDbQueryBuilder.KeyPath<NoInfer<TableSchema>>)
192
+ | undefined = undefined,
193
+ const AutoIncrement extends boolean = false
194
+ >(options: {
195
+ readonly name: Name
196
+ readonly schema: [KeyPath] extends [undefined]
197
+ ? "key" extends keyof TableSchema["fields"] ? "Cannot have a 'key' field when keyPath is undefined"
198
+ : TableSchema
199
+ : TableSchema
200
+ readonly keyPath?: KeyPath
201
+ readonly indexes?: Indexes | undefined
202
+ readonly autoIncrement?: IsValidAutoIncrementKeyPath<
203
+ TableSchema,
204
+ KeyPath
205
+ > extends true ? AutoIncrement | undefined
206
+ : never
207
+ readonly durability?: IDBTransactionDurability | undefined
208
+ }): IndexedDbTable<
209
+ Name,
210
+ TableSchema,
211
+ Indexes,
212
+ Extract<KeyPath, Readonly<IDBValidKey | undefined>>,
213
+ AutoIncrement
214
+ > => {
215
+ // oxlint-disable-next-line typescript/no-extraneous-class
216
+ class Table {}
217
+ Object.assign(Table, Proto)
218
+ const readSchema = options.keyPath === undefined
219
+ ? Schema.Struct({
220
+ ...(options.schema as Schema.Struct<{}>).fields,
221
+ key: IndexedDb.IDBValidKey
222
+ })
223
+ : options.schema
224
+ ;(Table as any).tableName = options.name
225
+ ;(Table as any).tableSchema = options.schema
226
+ ;(Table as any).readSchema = readSchema
227
+ ;(Table as any).arraySchema = Schema.Array(readSchema as any)
228
+ ;(Table as any).autoincrementSchema = options.autoIncrement
229
+ ? Schema.Struct(Struct.omit((options.schema as Schema.Struct<{}>).fields, [options.keyPath!] as any))
230
+ : options.schema
231
+ ;(Table as any).keyPath = options.keyPath
232
+ ;(Table as any).indexes = options.indexes
233
+ ;(Table as any).autoIncrement = options.autoIncrement === true
234
+ ;(Table as any).durability = options.durability ?? "relaxed"
235
+ return Table as any
236
+ }
237
+
238
+ // -----------------------------------------------------------------------------
239
+ // internal
240
+ // -----------------------------------------------------------------------------
241
+
242
+ type IsValidAutoIncrementKeyPath<
243
+ TableSchema extends AnySchemaStruct,
244
+ KeyPath
245
+ > = KeyPath extends keyof TableSchema["Encoded"] ? TableSchema["Encoded"][KeyPath] extends number ? true
246
+ : false
247
+ : false
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Typed IndexedDB schema version definitions.
3
+ *
4
+ * This module represents one logical IndexedDB database version as a non-empty set of `IndexedDbTable` definitions.
5
+ * Versions are consumed by `IndexedDbDatabase.make` and `.add` to type query builders and migration transactions, so
6
+ * applications can describe the tables available after initialization or after each schema upgrade.
7
+ *
8
+ * Use an `IndexedDbVersion` when defining the initial stores for a browser database, adding or removing object stores,
9
+ * changing indexes, or moving data between differently shaped table schemas. The version value is a typed description of
10
+ * the target schema; creating and deleting object stores or indexes still happens explicitly inside the corresponding
11
+ * `IndexedDbDatabase` migration callback.
12
+ *
13
+ * IndexedDB versioning is ordered by the migration chain rather than by a number stored here. Each `.add` step becomes
14
+ * the next browser database version, and only migrations after the browser's current version are run. Include every table
15
+ * that should be queryable in each target version, avoid duplicate table names, and remember that key-path or
16
+ * auto-increment changes usually require creating a new object store and copying data during the upgrade transaction.
17
+ *
18
+ * @since 4.0.0
19
+ */
20
+ import type { NonEmptyReadonlyArray } from "effect/Array"
21
+ import type { Pipeable } from "effect/Pipeable"
22
+ import { pipeArguments } from "effect/Pipeable"
23
+ import type * as IndexedDbTable from "./IndexedDbTable.ts"
24
+
25
+ const TypeId = "~@effect/platform-browser/IndexedDbVersion"
26
+
27
+ /**
28
+ * Typed IndexedDB version definition containing the tables available in that schema version.
29
+ *
30
+ * @category interface
31
+ * @since 4.0.0
32
+ */
33
+ export interface IndexedDbVersion<
34
+ out Tables extends IndexedDbTable.AnyWithProps
35
+ > extends Pipeable {
36
+ new(_: never): {}
37
+ readonly [TypeId]: typeof TypeId
38
+ readonly tables: ReadonlyMap<string, Tables>
39
+ }
40
+
41
+ /**
42
+ * Type-erased shape of an `IndexedDbVersion`.
43
+ *
44
+ * @category models
45
+ * @since 4.0.0
46
+ */
47
+ export interface Any {
48
+ readonly [TypeId]: typeof TypeId
49
+ }
50
+
51
+ /**
52
+ * Type-erased `IndexedDbVersion` retaining version properties with broad table types.
53
+ *
54
+ * @category models
55
+ * @since 4.0.0
56
+ */
57
+ export type AnyWithProps = IndexedDbVersion<IndexedDbTable.AnyWithProps>
58
+
59
+ /**
60
+ * Extracts the table union from an `IndexedDbVersion`.
61
+ *
62
+ * @category models
63
+ * @since 4.0.0
64
+ */
65
+ export type Tables<Db extends Any> = Db extends IndexedDbVersion<infer _Tables> ? _Tables : never
66
+
67
+ /**
68
+ * Selects a table by name from an `IndexedDbVersion`.
69
+ *
70
+ * @category models
71
+ * @since 4.0.0
72
+ */
73
+ export type TableWithName<
74
+ Db extends Any,
75
+ TableName extends string
76
+ > = IndexedDbTable.WithName<Tables<Db>, TableName>
77
+
78
+ /**
79
+ * Extracts the schema for a named table within an `IndexedDbVersion`.
80
+ *
81
+ * @category models
82
+ * @since 4.0.0
83
+ */
84
+ export type SchemaWithName<
85
+ Db extends Any,
86
+ TableName extends string
87
+ > = IndexedDbTable.TableSchema<IndexedDbTable.WithName<Tables<Db>, TableName>>
88
+
89
+ const Proto = {
90
+ [TypeId]: TypeId,
91
+ pipe() {
92
+ return pipeArguments(this, arguments)
93
+ }
94
+ }
95
+
96
+ const makeProto = <Tables extends IndexedDbTable.AnyWithProps>(options: {
97
+ readonly tables: ReadonlyMap<string, Tables>
98
+ }): IndexedDbVersion<Tables> => {
99
+ // oxlint-disable-next-line typescript/no-extraneous-class
100
+ class Version {}
101
+ Object.assign(Version, Proto)
102
+ ;(Version as any).tables = options.tables
103
+ return Version as any
104
+ }
105
+
106
+ /**
107
+ * Creates an `IndexedDbVersion` from one or more table definitions.
108
+ *
109
+ * @category constructors
110
+ * @since 4.0.0
111
+ */
112
+ export const make = <
113
+ const Tables extends NonEmptyReadonlyArray<IndexedDbTable.AnyWithProps>
114
+ >(
115
+ ...tables: Tables
116
+ ): IndexedDbVersion<Tables[number]> =>
117
+ makeProto({
118
+ tables: new Map(tables.map((table) => [table.tableName, table]))
119
+ })
@@ -1,10 +1,27 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * Browser Permissions API support for Effect programs.
3
+ *
4
+ * This module provides a `Permissions` service and browser-backed layer for
5
+ * querying `navigator.permissions` from Effect code. Use it to check whether a
6
+ * browser capability is currently `granted`, `prompt`, or `denied` before
7
+ * showing UI for flows such as geolocation, notifications, clipboard access,
8
+ * camera, microphone, or persistent storage.
9
+ *
10
+ * Permission queries do not request access by themselves and should not replace
11
+ * the feature API that actually performs the operation. Browser support for
12
+ * permission names and states is uneven, queries may reject for unsupported or
13
+ * invalid descriptors, and some permissions are only meaningful in secure
14
+ * contexts or after user activation. Returned `PermissionStatus` objects can
15
+ * change when the user updates browser settings or responds to prompts; when
16
+ * watching `change` or `onchange`, account for browser differences and clean up
17
+ * listeners when the surrounding Effect scope ends.
18
+ *
19
+ * @since 4.0.0
3
20
  */
21
+ import * as Context from "effect/Context"
4
22
  import * as Data from "effect/Data"
5
23
  import * as Effect from "effect/Effect"
6
24
  import * as Layer from "effect/Layer"
7
- import * as ServiceMap from "effect/ServiceMap"
8
25
 
9
26
  const TypeId = "~@effect/platform-browser/Permissions"
10
27
  const ErrorTypeId = "~@effect/platform-browser/Permissions/PermissionsError"
@@ -13,8 +30,8 @@ const ErrorTypeId = "~@effect/platform-browser/Permissions/PermissionsError"
13
30
  * Wrapper on the Permission API (`navigator.permissions`) with methods for
14
31
  * querying status of permissions.
15
32
  *
16
- * @since 1.0.0
17
- * @category Models
33
+ * @category models
34
+ * @since 4.0.0
18
35
  */
19
36
  export interface Permissions {
20
37
  readonly [TypeId]: typeof TypeId
@@ -33,8 +50,10 @@ export interface Permissions {
33
50
  }
34
51
 
35
52
  /**
36
- * @since 1.0.0
53
+ * Error reason for an `InvalidStateError` raised by the browser Permissions API.
54
+ *
37
55
  * @category errors
56
+ * @since 4.0.0
38
57
  */
39
58
  export class PermissionsInvalidStateError extends Data.TaggedError("InvalidStateError")<{
40
59
  readonly cause: unknown
@@ -45,8 +64,10 @@ export class PermissionsInvalidStateError extends Data.TaggedError("InvalidState
45
64
  }
46
65
 
47
66
  /**
48
- * @since 1.0.0
67
+ * Error reason for a `TypeError` raised by the browser Permissions API.
68
+ *
49
69
  * @category errors
70
+ * @since 4.0.0
50
71
  */
51
72
  export class PermissionsTypeError extends Data.TaggedError("TypeError")<{
52
73
  readonly cause: unknown
@@ -57,14 +78,18 @@ export class PermissionsTypeError extends Data.TaggedError("TypeError")<{
57
78
  }
58
79
 
59
80
  /**
60
- * @since 1.0.0
81
+ * Union of browser Permissions API error reasons represented by the service.
82
+ *
61
83
  * @category errors
84
+ * @since 4.0.0
62
85
  */
63
86
  export type PermissionsErrorReason = PermissionsInvalidStateError | PermissionsTypeError
64
87
 
65
88
  /**
66
- * @since 1.0.0
89
+ * Tagged error wrapping a browser Permissions API failure reason.
90
+ *
67
91
  * @category errors
92
+ * @since 4.0.0
68
93
  */
69
94
  export class PermissionsError extends Data.TaggedError("PermissionsError")<{
70
95
  readonly reason: PermissionsErrorReason
@@ -84,16 +109,18 @@ export class PermissionsError extends Data.TaggedError("PermissionsError")<{
84
109
  }
85
110
 
86
111
  /**
87
- * @since 1.0.0
88
- * @category Service
112
+ * Service tag for the browser `Permissions` service.
113
+ *
114
+ * @category services
115
+ * @since 4.0.0
89
116
  */
90
- export const Permissions: ServiceMap.Service<Permissions, Permissions> = ServiceMap.Service<Permissions>(TypeId)
117
+ export const Permissions: Context.Service<Permissions, Permissions> = Context.Service<Permissions>(TypeId)
91
118
 
92
119
  /**
93
120
  * A layer that directly interfaces with the `navigator.permissions` api
94
121
  *
95
- * @since 1.0.0
96
- * @category Layers
122
+ * @category layers
123
+ * @since 4.0.0
97
124
  */
98
125
  export const layer: Layer.Layer<Permissions> = Layer.succeed(
99
126
  Permissions,