@effect/platform-browser 0.15.2 → 0.15.4
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/dist/cjs/Clipboard.js +54 -0
- package/dist/cjs/Clipboard.js.map +1 -0
- package/dist/cjs/Effectify.js +13 -0
- package/dist/cjs/Effectify.js.map +1 -0
- package/dist/cjs/Error.js +25 -0
- package/dist/cjs/Error.js.map +1 -0
- package/dist/cjs/HttpClient.js +46 -0
- package/dist/cjs/HttpClient.js.map +1 -0
- package/dist/cjs/KeyValueStore.js +73 -0
- package/dist/cjs/KeyValueStore.js.map +1 -0
- package/dist/cjs/Path.js +17 -0
- package/dist/cjs/Path.js.map +1 -0
- package/dist/cjs/Runtime.js +38 -0
- package/dist/cjs/Runtime.js.map +1 -0
- package/dist/cjs/Worker.js +75 -0
- package/dist/cjs/Worker.js.map +1 -0
- package/dist/cjs/WorkerRunner.js +63 -0
- package/dist/cjs/WorkerRunner.js.map +1 -0
- package/dist/cjs/index.js +50 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/internal/clipboard.js +88 -0
- package/dist/cjs/internal/clipboard.js.map +1 -0
- package/dist/cjs/internal/keyValueStore.js +128 -0
- package/dist/cjs/internal/keyValueStore.js.map +1 -0
- package/dist/cjs/internal/runtime.js +46 -0
- package/dist/cjs/internal/runtime.js.map +1 -0
- package/dist/cjs/internal/worker.js +80 -0
- package/dist/cjs/internal/worker.js.map +1 -0
- package/dist/cjs/internal/workerRunner.js +94 -0
- package/dist/cjs/internal/workerRunner.js.map +1 -0
- package/dist/dts/Clipboard.d.ts.map +1 -0
- package/dist/dts/Effectify.d.ts.map +1 -0
- package/dist/dts/Error.d.ts.map +1 -0
- package/dist/dts/HttpClient.d.ts.map +1 -0
- package/dist/dts/KeyValueStore.d.ts.map +1 -0
- package/dist/dts/Path.d.ts.map +1 -0
- package/dist/dts/Runtime.d.ts.map +1 -0
- package/dist/dts/Worker.d.ts.map +1 -0
- package/dist/dts/WorkerRunner.d.ts.map +1 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/internal/clipboard.d.ts +2 -0
- package/dist/dts/internal/clipboard.d.ts.map +1 -0
- package/dist/dts/internal/keyValueStore.d.ts +2 -0
- package/dist/dts/internal/keyValueStore.d.ts.map +1 -0
- package/dist/dts/internal/runtime.d.ts +2 -0
- package/dist/dts/internal/runtime.d.ts.map +1 -0
- package/dist/dts/internal/worker.d.ts +2 -0
- package/dist/dts/internal/worker.d.ts.map +1 -0
- package/dist/dts/internal/workerRunner.d.ts +2 -0
- package/dist/dts/internal/workerRunner.d.ts.map +1 -0
- package/dist/esm/Clipboard.js +22 -0
- package/dist/esm/Clipboard.js.map +1 -0
- package/dist/esm/Effectify.js +10 -0
- package/dist/esm/Effectify.js.map +1 -0
- package/dist/esm/Error.js +20 -0
- package/dist/esm/Error.js.map +1 -0
- package/dist/esm/HttpClient.js +61 -0
- package/dist/esm/HttpClient.js.map +1 -0
- package/dist/esm/KeyValueStore.js +25 -0
- package/dist/esm/KeyValueStore.js.map +1 -0
- package/dist/esm/Path.js +7 -0
- package/dist/esm/Path.js.map +1 -0
- package/dist/esm/Runtime.js +7 -0
- package/dist/esm/Runtime.js.map +1 -0
- package/dist/esm/Worker.js +26 -0
- package/dist/esm/Worker.js.map +1 -0
- package/dist/esm/WorkerRunner.js +16 -0
- package/dist/esm/WorkerRunner.js.map +1 -0
- package/dist/esm/index.js +45 -0
- package/dist/esm/index.js.map +1 -0
- package/{Clipboard/dist/effect-platform-browser-Clipboard.esm.js → dist/esm/internal/clipboard.js} +8 -42
- package/dist/esm/internal/clipboard.js.map +1 -0
- package/{KeyValueStore/dist/effect-platform-browser-KeyValueStore.esm.js → dist/esm/internal/keyValueStore.js} +8 -35
- package/dist/esm/internal/keyValueStore.js.map +1 -0
- package/{Runtime/dist/effect-platform-browser-Runtime.esm.js → dist/esm/internal/runtime.js} +4 -16
- package/dist/esm/internal/runtime.js.map +1 -0
- package/dist/esm/internal/worker.js +49 -0
- package/dist/esm/internal/worker.js.map +1 -0
- package/{WorkerRunner/dist/effect-platform-browser-WorkerRunner.esm.js → dist/esm/internal/workerRunner.js} +8 -31
- package/dist/esm/internal/workerRunner.js.map +1 -0
- package/dist/esm/package.json +4 -0
- package/package.json +68 -88
- package/src/Clipboard.ts +1 -1
- package/src/KeyValueStore.ts +1 -1
- package/src/Runtime.ts +1 -1
- package/src/Worker.ts +1 -1
- package/src/WorkerRunner.ts +1 -1
- package/src/index.ts +9 -9
- package/src/internal/clipboard.ts +1 -1
- package/src/internal/worker.ts +13 -9
- package/Clipboard/dist/effect-platform-browser-Clipboard.cjs.d.mts +0 -2
- package/Clipboard/dist/effect-platform-browser-Clipboard.cjs.d.mts.map +0 -1
- package/Clipboard/dist/effect-platform-browser-Clipboard.cjs.d.ts +0 -2
- package/Clipboard/dist/effect-platform-browser-Clipboard.cjs.d.ts.map +0 -1
- package/Clipboard/dist/effect-platform-browser-Clipboard.cjs.dev.js +0 -118
- package/Clipboard/dist/effect-platform-browser-Clipboard.cjs.js +0 -7
- package/Clipboard/dist/effect-platform-browser-Clipboard.cjs.mjs +0 -5
- package/Clipboard/dist/effect-platform-browser-Clipboard.cjs.prod.js +0 -118
- package/Clipboard/package.json +0 -4
- package/Effectify/dist/effect-platform-browser-Effectify.cjs.d.mts +0 -2
- package/Effectify/dist/effect-platform-browser-Effectify.cjs.d.mts.map +0 -1
- package/Effectify/dist/effect-platform-browser-Effectify.cjs.d.ts +0 -2
- package/Effectify/dist/effect-platform-browser-Effectify.cjs.d.ts.map +0 -1
- package/Effectify/dist/effect-platform-browser-Effectify.cjs.dev.js +0 -12
- package/Effectify/dist/effect-platform-browser-Effectify.cjs.js +0 -7
- package/Effectify/dist/effect-platform-browser-Effectify.cjs.mjs +0 -3
- package/Effectify/dist/effect-platform-browser-Effectify.cjs.prod.js +0 -12
- package/Effectify/dist/effect-platform-browser-Effectify.esm.js +0 -1
- package/Effectify/package.json +0 -4
- package/Error/dist/effect-platform-browser-Error.cjs.d.mts +0 -2
- package/Error/dist/effect-platform-browser-Error.cjs.d.mts.map +0 -1
- package/Error/dist/effect-platform-browser-Error.cjs.d.ts +0 -2
- package/Error/dist/effect-platform-browser-Error.cjs.d.ts.map +0 -1
- package/Error/dist/effect-platform-browser-Error.cjs.dev.js +0 -20
- package/Error/dist/effect-platform-browser-Error.cjs.js +0 -7
- package/Error/dist/effect-platform-browser-Error.cjs.mjs +0 -5
- package/Error/dist/effect-platform-browser-Error.cjs.prod.js +0 -20
- package/Error/dist/effect-platform-browser-Error.esm.js +0 -1
- package/Error/package.json +0 -4
- package/HttpClient/dist/effect-platform-browser-HttpClient.cjs.d.mts +0 -2
- package/HttpClient/dist/effect-platform-browser-HttpClient.cjs.d.mts.map +0 -1
- package/HttpClient/dist/effect-platform-browser-HttpClient.cjs.d.ts +0 -2
- package/HttpClient/dist/effect-platform-browser-HttpClient.cjs.d.ts.map +0 -1
- package/HttpClient/dist/effect-platform-browser-HttpClient.cjs.dev.js +0 -47
- package/HttpClient/dist/effect-platform-browser-HttpClient.cjs.js +0 -7
- package/HttpClient/dist/effect-platform-browser-HttpClient.cjs.mjs +0 -9
- package/HttpClient/dist/effect-platform-browser-HttpClient.cjs.prod.js +0 -47
- package/HttpClient/dist/effect-platform-browser-HttpClient.esm.js +0 -14
- package/HttpClient/package.json +0 -4
- package/KeyValueStore/dist/effect-platform-browser-KeyValueStore.cjs.d.mts +0 -2
- package/KeyValueStore/dist/effect-platform-browser-KeyValueStore.cjs.d.mts.map +0 -1
- package/KeyValueStore/dist/effect-platform-browser-KeyValueStore.cjs.d.ts +0 -2
- package/KeyValueStore/dist/effect-platform-browser-KeyValueStore.cjs.d.ts.map +0 -1
- package/KeyValueStore/dist/effect-platform-browser-KeyValueStore.cjs.dev.js +0 -158
- package/KeyValueStore/dist/effect-platform-browser-KeyValueStore.cjs.js +0 -7
- package/KeyValueStore/dist/effect-platform-browser-KeyValueStore.cjs.mjs +0 -1
- package/KeyValueStore/dist/effect-platform-browser-KeyValueStore.cjs.prod.js +0 -158
- package/KeyValueStore/package.json +0 -4
- package/Path/dist/effect-platform-browser-Path.cjs.d.mts +0 -2
- package/Path/dist/effect-platform-browser-Path.cjs.d.mts.map +0 -1
- package/Path/dist/effect-platform-browser-Path.cjs.d.ts +0 -2
- package/Path/dist/effect-platform-browser-Path.cjs.d.ts.map +0 -1
- package/Path/dist/effect-platform-browser-Path.cjs.dev.js +0 -14
- package/Path/dist/effect-platform-browser-Path.cjs.js +0 -7
- package/Path/dist/effect-platform-browser-Path.cjs.mjs +0 -1
- package/Path/dist/effect-platform-browser-Path.cjs.prod.js +0 -14
- package/Path/dist/effect-platform-browser-Path.esm.js +0 -1
- package/Path/package.json +0 -4
- package/Runtime/dist/effect-platform-browser-Runtime.cjs.d.mts +0 -2
- package/Runtime/dist/effect-platform-browser-Runtime.cjs.d.mts.map +0 -1
- package/Runtime/dist/effect-platform-browser-Runtime.cjs.d.ts +0 -2
- package/Runtime/dist/effect-platform-browser-Runtime.cjs.d.ts.map +0 -1
- package/Runtime/dist/effect-platform-browser-Runtime.cjs.dev.js +0 -51
- package/Runtime/dist/effect-platform-browser-Runtime.cjs.js +0 -7
- package/Runtime/dist/effect-platform-browser-Runtime.cjs.mjs +0 -3
- package/Runtime/dist/effect-platform-browser-Runtime.cjs.prod.js +0 -51
- package/Runtime/package.json +0 -4
- package/Worker/dist/effect-platform-browser-Worker.cjs.d.mts +0 -2
- package/Worker/dist/effect-platform-browser-Worker.cjs.d.mts.map +0 -1
- package/Worker/dist/effect-platform-browser-Worker.cjs.d.ts +0 -2
- package/Worker/dist/effect-platform-browser-Worker.cjs.d.ts.map +0 -1
- package/Worker/dist/effect-platform-browser-Worker.cjs.dev.js +0 -121
- package/Worker/dist/effect-platform-browser-Worker.cjs.js +0 -7
- package/Worker/dist/effect-platform-browser-Worker.cjs.mjs +0 -1
- package/Worker/dist/effect-platform-browser-Worker.cjs.prod.js +0 -121
- package/Worker/dist/effect-platform-browser-Worker.esm.js +0 -86
- package/Worker/package.json +0 -4
- package/WorkerRunner/dist/effect-platform-browser-WorkerRunner.cjs.d.mts +0 -2
- package/WorkerRunner/dist/effect-platform-browser-WorkerRunner.cjs.d.mts.map +0 -1
- package/WorkerRunner/dist/effect-platform-browser-WorkerRunner.cjs.d.ts +0 -2
- package/WorkerRunner/dist/effect-platform-browser-WorkerRunner.cjs.d.ts.map +0 -1
- package/WorkerRunner/dist/effect-platform-browser-WorkerRunner.cjs.dev.js +0 -118
- package/WorkerRunner/dist/effect-platform-browser-WorkerRunner.cjs.js +0 -7
- package/WorkerRunner/dist/effect-platform-browser-WorkerRunner.cjs.mjs +0 -1
- package/WorkerRunner/dist/effect-platform-browser-WorkerRunner.cjs.prod.js +0 -118
- package/WorkerRunner/package.json +0 -4
- package/dist/declarations/src/Clipboard.d.ts.map +0 -1
- package/dist/declarations/src/Effectify.d.ts.map +0 -1
- package/dist/declarations/src/Error.d.ts.map +0 -1
- package/dist/declarations/src/HttpClient.d.ts.map +0 -1
- package/dist/declarations/src/KeyValueStore.d.ts.map +0 -1
- package/dist/declarations/src/Path.d.ts.map +0 -1
- package/dist/declarations/src/Runtime.d.ts.map +0 -1
- package/dist/declarations/src/Worker.d.ts.map +0 -1
- package/dist/declarations/src/WorkerRunner.d.ts.map +0 -1
- package/dist/declarations/src/index.d.ts.map +0 -1
- package/dist/effect-platform-browser.cjs.d.mts +0 -2
- package/dist/effect-platform-browser.cjs.d.mts.map +0 -1
- package/dist/effect-platform-browser.cjs.d.ts +0 -2
- package/dist/effect-platform-browser.cjs.d.ts.map +0 -1
- package/dist/effect-platform-browser.cjs.dev.js +0 -53
- package/dist/effect-platform-browser.cjs.js +0 -7
- package/dist/effect-platform-browser.cjs.mjs +0 -11
- package/dist/effect-platform-browser.cjs.prod.js +0 -53
- package/dist/effect-platform-browser.esm.js +0 -18
- package/src/tsconfig.json +0 -48
- /package/dist/{declarations/src → dts}/Clipboard.d.ts +0 -0
- /package/dist/{declarations/src → dts}/Effectify.d.ts +0 -0
- /package/dist/{declarations/src → dts}/Error.d.ts +0 -0
- /package/dist/{declarations/src → dts}/HttpClient.d.ts +0 -0
- /package/dist/{declarations/src → dts}/KeyValueStore.d.ts +0 -0
- /package/dist/{declarations/src → dts}/Path.d.ts +0 -0
- /package/dist/{declarations/src → dts}/Runtime.d.ts +0 -0
- /package/dist/{declarations/src → dts}/Worker.d.ts +0 -0
- /package/dist/{declarations/src → dts}/WorkerRunner.d.ts +0 -0
- /package/dist/{declarations/src → dts}/index.d.ts +0 -0
package/src/KeyValueStore.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Also includes exports from [`@effect/platform/KeyValueStore`](https://effect-ts.github.io/platform/platform/KeyValueStore.ts.html).
|
|
5
5
|
*/
|
|
6
|
-
import * as internal from "./internal/keyValueStore"
|
|
6
|
+
import * as internal from "./internal/keyValueStore.js"
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @since 1.0.0
|
package/src/Runtime.ts
CHANGED
package/src/Worker.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { Effect } from "effect"
|
|
|
8
8
|
import type * as Context from "effect/Context"
|
|
9
9
|
import type * as Layer from "effect/Layer"
|
|
10
10
|
import type * as Scope from "effect/Scope"
|
|
11
|
-
import * as internal from "./internal/worker"
|
|
11
|
+
import * as internal from "./internal/worker.js"
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @since 1.0.0
|
package/src/WorkerRunner.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { Effect } from "effect"
|
|
|
9
9
|
import type * as Layer from "effect/Layer"
|
|
10
10
|
import type * as Scope from "effect/Scope"
|
|
11
11
|
import type * as Stream from "effect/Stream"
|
|
12
|
-
import * as internal from "./internal/workerRunner"
|
|
12
|
+
import * as internal from "./internal/workerRunner.js"
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @since 1.0.0
|
package/src/index.ts
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
|
-
export * as Clipboard from "
|
|
4
|
+
export * as Clipboard from "./Clipboard.js"
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @since 1.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * as Effectify from "
|
|
9
|
+
export * as Effectify from "./Effectify.js"
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @since 1.0.0
|
|
13
13
|
*/
|
|
14
|
-
export * as Error from "
|
|
14
|
+
export * as Error from "./Error.js"
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @since 1.0.0
|
|
18
18
|
*/
|
|
19
|
-
export * as HttpClient from "
|
|
19
|
+
export * as HttpClient from "./HttpClient.js"
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @since 1.0.0
|
|
23
23
|
*
|
|
24
24
|
* Also includes exports from [`@effect/platform/KeyValueStore`](https://effect-ts.github.io/platform/platform/KeyValueStore.ts.html).
|
|
25
25
|
*/
|
|
26
|
-
export * as KeyValueStore from "
|
|
26
|
+
export * as KeyValueStore from "./KeyValueStore.js"
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* @since 1.0.0
|
|
30
30
|
*
|
|
31
31
|
* Also includes exports from [`@effect/platform/Path`](https://effect-ts.github.io/platform/platform/Path.ts.html).
|
|
32
32
|
*/
|
|
33
|
-
export * as Path from "
|
|
33
|
+
export * as Path from "./Path.js"
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @since 1.0.0
|
|
37
37
|
*/
|
|
38
|
-
export * as Runtime from "
|
|
38
|
+
export * as Runtime from "./Runtime.js"
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* @since 1.0.0
|
|
42
42
|
*
|
|
43
43
|
* Also includes exports from [`@effect/platform/Worker`](https://effect-ts.github.io/platform/platform/Worker.ts.html).
|
|
44
44
|
*/
|
|
45
|
-
export * as Worker from "
|
|
45
|
+
export * as Worker from "./Worker.js"
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* @since 1.0.0
|
|
49
49
|
*
|
|
50
50
|
* Also includes exports from [`@effect/platform/WorkerRunner`](https://effect-ts.github.io/platform/platform/WorkerRunner.ts.html).
|
|
51
51
|
*/
|
|
52
|
-
export * as WorkerRunner from "
|
|
52
|
+
export * as WorkerRunner from "./WorkerRunner.js"
|
|
@@ -2,7 +2,7 @@ import * as PlatformError from "@effect/platform/Error"
|
|
|
2
2
|
import { Tag } from "effect/Context"
|
|
3
3
|
import * as Effect from "effect/Effect"
|
|
4
4
|
import * as Layer from "effect/Layer"
|
|
5
|
-
import type * as Clipboard from "../Clipboard"
|
|
5
|
+
import type * as Clipboard from "../Clipboard.js"
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const tag = Tag<Clipboard.Clipboard>("@effect/platform-browser/Clipboard")
|
package/src/internal/worker.ts
CHANGED
|
@@ -21,19 +21,23 @@ const platformWorkerImpl = Worker.PlatformWorker.of({
|
|
|
21
21
|
|
|
22
22
|
const queue = yield* _(Queue.unbounded<Worker.BackingWorker.Message<O>>())
|
|
23
23
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
const fiber = yield* _(
|
|
25
|
+
Effect.async<never, WorkerError, never>((resume, signal) => {
|
|
26
|
+
port.addEventListener("message", function(event) {
|
|
27
|
+
queue.unsafeOffer((event as MessageEvent).data)
|
|
28
|
+
}, { signal })
|
|
29
|
+
port.addEventListener("error", function(event) {
|
|
30
|
+
resume(Effect.fail(WorkerError("unknown", (event as ErrorEvent).message)))
|
|
31
|
+
}, { signal })
|
|
32
|
+
}),
|
|
33
|
+
Effect.interruptible,
|
|
34
|
+
Effect.forkScoped
|
|
35
|
+
)
|
|
32
36
|
|
|
33
37
|
const send = (message: I, transfers?: ReadonlyArray<unknown>) =>
|
|
34
38
|
Effect.sync(() => port.postMessage([0, message], transfers as any))
|
|
35
39
|
|
|
36
|
-
return {
|
|
40
|
+
return { fiber, queue, send }
|
|
37
41
|
})
|
|
38
42
|
}
|
|
39
43
|
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-platform-browser-Clipboard.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/Clipboard.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-platform-browser-Clipboard.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/Clipboard.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var PlatformError = require('@effect/platform/Error');
|
|
6
|
-
var Context = require('effect/Context');
|
|
7
|
-
var Effect = require('effect/Effect');
|
|
8
|
-
var Layer = require('effect/Layer');
|
|
9
|
-
|
|
10
|
-
function _interopNamespace(e) {
|
|
11
|
-
if (e && e.__esModule) return e;
|
|
12
|
-
var n = Object.create(null);
|
|
13
|
-
if (e) {
|
|
14
|
-
Object.keys(e).forEach(function (k) {
|
|
15
|
-
if (k !== 'default') {
|
|
16
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return e[k]; }
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
n["default"] = e;
|
|
25
|
-
return Object.freeze(n);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var PlatformError__namespace = /*#__PURE__*/_interopNamespace(PlatformError);
|
|
29
|
-
var Effect__namespace = /*#__PURE__*/_interopNamespace(Effect);
|
|
30
|
-
var Layer__namespace = /*#__PURE__*/_interopNamespace(Layer);
|
|
31
|
-
|
|
32
|
-
/** @internal */
|
|
33
|
-
const tag = /*#__PURE__*/Context.Tag("@effect/platform-browser/Clipboard");
|
|
34
|
-
|
|
35
|
-
/** @internal */
|
|
36
|
-
const make$1 = impl => tag.of({
|
|
37
|
-
...impl,
|
|
38
|
-
clear: impl.writeString(""),
|
|
39
|
-
writeBlob: blob => impl.write([new ClipboardItem({
|
|
40
|
-
[blob.type]: blob
|
|
41
|
-
})])
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
/** @internal */
|
|
45
|
-
const clipboardError = props => PlatformError__namespace.SystemError({
|
|
46
|
-
reason: "PermissionDenied",
|
|
47
|
-
module: "Clipboard",
|
|
48
|
-
...props
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
/** @internal */
|
|
52
|
-
const layer$1 = /*#__PURE__*/Layer__namespace.succeed(tag, /*#__PURE__*/make$1({
|
|
53
|
-
read: /*#__PURE__*/Effect__namespace.tryPromise({
|
|
54
|
-
try: navigator.clipboard.read,
|
|
55
|
-
catch: () => clipboardError({
|
|
56
|
-
"message": "Unable to read from clipboard",
|
|
57
|
-
"method": "read",
|
|
58
|
-
"pathOrDescriptor": "layer"
|
|
59
|
-
})
|
|
60
|
-
}),
|
|
61
|
-
write: s => Effect__namespace.tryPromise({
|
|
62
|
-
try: () => navigator.clipboard.write(s),
|
|
63
|
-
catch: () => clipboardError({
|
|
64
|
-
"message": "Unable to write to clipboard",
|
|
65
|
-
"method": "write",
|
|
66
|
-
"pathOrDescriptor": "layer"
|
|
67
|
-
})
|
|
68
|
-
}),
|
|
69
|
-
readString: /*#__PURE__*/Effect__namespace.tryPromise({
|
|
70
|
-
try: navigator.clipboard.readText,
|
|
71
|
-
catch: () => clipboardError({
|
|
72
|
-
"message": "Unable to read a string from clipboard",
|
|
73
|
-
"method": "readString",
|
|
74
|
-
"pathOrDescriptor": "layer"
|
|
75
|
-
})
|
|
76
|
-
}),
|
|
77
|
-
writeString: text => Effect__namespace.tryPromise({
|
|
78
|
-
try: () => navigator.clipboard.writeText(text),
|
|
79
|
-
catch: () => clipboardError({
|
|
80
|
-
"message": "Unable to write a string to clipboard",
|
|
81
|
-
"method": "writeString",
|
|
82
|
-
"pathOrDescriptor": "layer"
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
}));
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @since 1.0.0
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @since 1.0.0
|
|
93
|
-
* @category interface
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @since 1.0.0
|
|
98
|
-
* @category constructor
|
|
99
|
-
*/
|
|
100
|
-
const make = make$1;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @since 1.0.0
|
|
104
|
-
* @category tag
|
|
105
|
-
*/
|
|
106
|
-
const Clipboard = tag;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* A layer that directly interfaces with the navigator.clipboard api
|
|
110
|
-
*
|
|
111
|
-
* @since 1.0.0
|
|
112
|
-
* @category layers
|
|
113
|
-
*/
|
|
114
|
-
const layer = layer$1;
|
|
115
|
-
|
|
116
|
-
exports.Clipboard = Clipboard;
|
|
117
|
-
exports.layer = layer;
|
|
118
|
-
exports.make = make;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var PlatformError = require('@effect/platform/Error');
|
|
6
|
-
var Context = require('effect/Context');
|
|
7
|
-
var Effect = require('effect/Effect');
|
|
8
|
-
var Layer = require('effect/Layer');
|
|
9
|
-
|
|
10
|
-
function _interopNamespace(e) {
|
|
11
|
-
if (e && e.__esModule) return e;
|
|
12
|
-
var n = Object.create(null);
|
|
13
|
-
if (e) {
|
|
14
|
-
Object.keys(e).forEach(function (k) {
|
|
15
|
-
if (k !== 'default') {
|
|
16
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return e[k]; }
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
n["default"] = e;
|
|
25
|
-
return Object.freeze(n);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var PlatformError__namespace = /*#__PURE__*/_interopNamespace(PlatformError);
|
|
29
|
-
var Effect__namespace = /*#__PURE__*/_interopNamespace(Effect);
|
|
30
|
-
var Layer__namespace = /*#__PURE__*/_interopNamespace(Layer);
|
|
31
|
-
|
|
32
|
-
/** @internal */
|
|
33
|
-
const tag = /*#__PURE__*/Context.Tag("@effect/platform-browser/Clipboard");
|
|
34
|
-
|
|
35
|
-
/** @internal */
|
|
36
|
-
const make$1 = impl => tag.of({
|
|
37
|
-
...impl,
|
|
38
|
-
clear: impl.writeString(""),
|
|
39
|
-
writeBlob: blob => impl.write([new ClipboardItem({
|
|
40
|
-
[blob.type]: blob
|
|
41
|
-
})])
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
/** @internal */
|
|
45
|
-
const clipboardError = props => PlatformError__namespace.SystemError({
|
|
46
|
-
reason: "PermissionDenied",
|
|
47
|
-
module: "Clipboard",
|
|
48
|
-
...props
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
/** @internal */
|
|
52
|
-
const layer$1 = /*#__PURE__*/Layer__namespace.succeed(tag, /*#__PURE__*/make$1({
|
|
53
|
-
read: /*#__PURE__*/Effect__namespace.tryPromise({
|
|
54
|
-
try: navigator.clipboard.read,
|
|
55
|
-
catch: () => clipboardError({
|
|
56
|
-
"message": "Unable to read from clipboard",
|
|
57
|
-
"method": "read",
|
|
58
|
-
"pathOrDescriptor": "layer"
|
|
59
|
-
})
|
|
60
|
-
}),
|
|
61
|
-
write: s => Effect__namespace.tryPromise({
|
|
62
|
-
try: () => navigator.clipboard.write(s),
|
|
63
|
-
catch: () => clipboardError({
|
|
64
|
-
"message": "Unable to write to clipboard",
|
|
65
|
-
"method": "write",
|
|
66
|
-
"pathOrDescriptor": "layer"
|
|
67
|
-
})
|
|
68
|
-
}),
|
|
69
|
-
readString: /*#__PURE__*/Effect__namespace.tryPromise({
|
|
70
|
-
try: navigator.clipboard.readText,
|
|
71
|
-
catch: () => clipboardError({
|
|
72
|
-
"message": "Unable to read a string from clipboard",
|
|
73
|
-
"method": "readString",
|
|
74
|
-
"pathOrDescriptor": "layer"
|
|
75
|
-
})
|
|
76
|
-
}),
|
|
77
|
-
writeString: text => Effect__namespace.tryPromise({
|
|
78
|
-
try: () => navigator.clipboard.writeText(text),
|
|
79
|
-
catch: () => clipboardError({
|
|
80
|
-
"message": "Unable to write a string to clipboard",
|
|
81
|
-
"method": "writeString",
|
|
82
|
-
"pathOrDescriptor": "layer"
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
}));
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @since 1.0.0
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @since 1.0.0
|
|
93
|
-
* @category interface
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @since 1.0.0
|
|
98
|
-
* @category constructor
|
|
99
|
-
*/
|
|
100
|
-
const make = make$1;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @since 1.0.0
|
|
104
|
-
* @category tag
|
|
105
|
-
*/
|
|
106
|
-
const Clipboard = tag;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* A layer that directly interfaces with the navigator.clipboard api
|
|
110
|
-
*
|
|
111
|
-
* @since 1.0.0
|
|
112
|
-
* @category layers
|
|
113
|
-
*/
|
|
114
|
-
const layer = layer$1;
|
|
115
|
-
|
|
116
|
-
exports.Clipboard = Clipboard;
|
|
117
|
-
exports.layer = layer;
|
|
118
|
-
exports.make = make;
|
package/Clipboard/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-platform-browser-Effectify.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/Effectify.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-platform-browser-Effectify.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/Effectify.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var Effectify = require('@effect/platform/Effectify');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, 'effectify', {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return Effectify.effectify; }
|
|
12
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var Effectify = require('@effect/platform/Effectify');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, 'effectify', {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return Effectify.effectify; }
|
|
12
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { effectify } from '@effect/platform/Effectify';
|
package/Effectify/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-platform-browser-Error.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/Error.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-platform-browser-Error.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/Error.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var PlatformError = require('@effect/platform/Error');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, 'BadArgument', {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return PlatformError.BadArgument; }
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, 'PlatformErrorTypeId', {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return PlatformError.PlatformErrorTypeId; }
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, 'SystemError', {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return PlatformError.SystemError; }
|
|
20
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var PlatformError = require('@effect/platform/Error');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, 'BadArgument', {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return PlatformError.BadArgument; }
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, 'PlatformErrorTypeId', {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return PlatformError.PlatformErrorTypeId; }
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, 'SystemError', {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return PlatformError.SystemError; }
|
|
20
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BadArgument, PlatformErrorTypeId, SystemError } from '@effect/platform/Error';
|
package/Error/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-platform-browser-HttpClient.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/HttpClient.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect-platform-browser-HttpClient.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/HttpClient.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var Body = require('@effect/platform/Http/Body');
|
|
6
|
-
var Client = require('@effect/platform/Http/Client');
|
|
7
|
-
var ClientError = require('@effect/platform/Http/ClientError');
|
|
8
|
-
var ClientRequest = require('@effect/platform/Http/ClientRequest');
|
|
9
|
-
var ClientResponse = require('@effect/platform/Http/ClientResponse');
|
|
10
|
-
var Headers = require('@effect/platform/Http/Headers');
|
|
11
|
-
var UrlParams = require('@effect/platform/Http/UrlParams');
|
|
12
|
-
|
|
13
|
-
function _interopNamespace(e) {
|
|
14
|
-
if (e && e.__esModule) return e;
|
|
15
|
-
var n = Object.create(null);
|
|
16
|
-
if (e) {
|
|
17
|
-
Object.keys(e).forEach(function (k) {
|
|
18
|
-
if (k !== 'default') {
|
|
19
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return e[k]; }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
n["default"] = e;
|
|
28
|
-
return Object.freeze(n);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var Body__namespace = /*#__PURE__*/_interopNamespace(Body);
|
|
32
|
-
var Client__namespace = /*#__PURE__*/_interopNamespace(Client);
|
|
33
|
-
var ClientError__namespace = /*#__PURE__*/_interopNamespace(ClientError);
|
|
34
|
-
var ClientRequest__namespace = /*#__PURE__*/_interopNamespace(ClientRequest);
|
|
35
|
-
var ClientResponse__namespace = /*#__PURE__*/_interopNamespace(ClientResponse);
|
|
36
|
-
var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
|
|
37
|
-
var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
exports.body = Body__namespace;
|
|
42
|
-
exports.client = Client__namespace;
|
|
43
|
-
exports.error = ClientError__namespace;
|
|
44
|
-
exports.request = ClientRequest__namespace;
|
|
45
|
-
exports.response = ClientResponse__namespace;
|
|
46
|
-
exports.headers = Headers__namespace;
|
|
47
|
-
exports.urlParams = UrlParams__namespace;
|