@krak-stack/auth 0.1.0 → 0.1.1
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 +7 -7
- package/dist/backend/index.d.ts +7 -38
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.js +5 -12
- package/dist/backend/index.js.map +1 -1
- package/dist/frontend/index.d.ts +7 -7
- package/dist/frontend/index.d.ts.map +1 -1
- package/dist/frontend/index.js +4 -4
- package/dist/frontend/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,15 +17,15 @@ bun add @krak-stack/auth effect
|
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
19
|
import { Effect } from "effect";
|
|
20
|
-
import {
|
|
20
|
+
import { AuthClient } from "@krak-stack/auth/backend";
|
|
21
21
|
|
|
22
22
|
const users = await Effect.runPromise(
|
|
23
23
|
Effect.gen(function* () {
|
|
24
|
-
const client = yield*
|
|
24
|
+
const client = yield* AuthClient;
|
|
25
25
|
return yield* client.listUsersByIds({
|
|
26
26
|
query: { ids: "user_1,user_2" },
|
|
27
27
|
});
|
|
28
|
-
}).pipe(Effect.provide(
|
|
28
|
+
}).pipe(Effect.provide(AuthClient.layer)),
|
|
29
29
|
);
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -33,16 +33,16 @@ const users = await Effect.runPromise(
|
|
|
33
33
|
|
|
34
34
|
```ts
|
|
35
35
|
import { Effect } from "effect";
|
|
36
|
-
import {
|
|
36
|
+
import { AuthClient } from "@krak-stack/auth/frontend";
|
|
37
37
|
|
|
38
38
|
const organizations = await Effect.runPromise(
|
|
39
39
|
Effect.gen(function* () {
|
|
40
|
-
const client = yield*
|
|
40
|
+
const client = yield* AuthClient;
|
|
41
41
|
return yield* client.listUserOrganizations({
|
|
42
42
|
params: { userId: "user_1" },
|
|
43
43
|
});
|
|
44
|
-
}).pipe(Effect.provide(
|
|
44
|
+
}).pipe(Effect.provide(AuthClient.layer)),
|
|
45
45
|
);
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
The frontend subpath also exports `FrontendApiClient` for Atom-based browser state.
|
package/dist/backend/index.d.ts
CHANGED
|
@@ -1,38 +1,7 @@
|
|
|
1
1
|
import { Context, Effect, Layer, Redacted } from "effect";
|
|
2
2
|
import { HttpClient } from "effect/unstable/http";
|
|
3
3
|
import { HttpApiClient } from "effect/unstable/httpapi";
|
|
4
|
-
|
|
5
|
-
declare const BackendApiClient_base: AtomHttpApi.AtomHttpApiClient<BackendApiClient, "BackendApiClient", import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"backend", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
6
|
-
readonly ids: import("effect/Schema").NonEmptyString;
|
|
7
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
8
|
-
readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
9
|
-
readonly id: import("effect/Schema").String;
|
|
10
|
-
readonly name: import("effect/Schema").String;
|
|
11
|
-
readonly email: import("effect/Schema").String;
|
|
12
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
13
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
14
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
15
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
16
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
17
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
18
|
-
}>>;
|
|
19
|
-
readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
20
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listOrganizationsByIds", "GET", "/api/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
21
|
-
readonly ids: import("effect/Schema").NonEmptyString;
|
|
22
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
23
|
-
readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
24
|
-
readonly id: import("effect/Schema").String;
|
|
25
|
-
readonly name: import("effect/Schema").String;
|
|
26
|
-
readonly slug: import("effect/Schema").String;
|
|
27
|
-
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
28
|
-
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
|
|
29
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
30
|
-
}>>;
|
|
31
|
-
readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
32
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false>>;
|
|
33
|
-
export declare class BackendApiClient extends BackendApiClient_base {
|
|
34
|
-
}
|
|
35
|
-
declare const BackendClientConfig_base: Context.ServiceClass<BackendClientConfig, "BackendClientConfig", {
|
|
4
|
+
declare const AuthClientConfig_base: Context.ServiceClass<AuthClientConfig, "AuthClientConfig", {
|
|
36
5
|
baseUrl: string;
|
|
37
6
|
apiKey: Redacted.Redacted<string>;
|
|
38
7
|
}> & {
|
|
@@ -41,10 +10,10 @@ declare const BackendClientConfig_base: Context.ServiceClass<BackendClientConfig
|
|
|
41
10
|
apiKey: Redacted.Redacted<string>;
|
|
42
11
|
}, import("effect/Config").ConfigError, never>;
|
|
43
12
|
};
|
|
44
|
-
export declare class
|
|
45
|
-
static readonly layer: Layer.Layer<
|
|
13
|
+
export declare class AuthClientConfig extends AuthClientConfig_base {
|
|
14
|
+
static readonly layer: Layer.Layer<AuthClientConfig, import("effect/Config").ConfigError, never>;
|
|
46
15
|
}
|
|
47
|
-
declare const
|
|
16
|
+
declare const AuthClient_base: Context.ServiceClass<AuthClient, "AuthClient", {
|
|
48
17
|
readonly listUsersByIds: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
49
18
|
readonly query: {
|
|
50
19
|
readonly ids: string;
|
|
@@ -117,10 +86,10 @@ declare const BackendClient_base: Context.ServiceClass<BackendClient, "BackendCl
|
|
|
117
86
|
}[];
|
|
118
87
|
readonly missingIds: readonly string[];
|
|
119
88
|
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
120
|
-
}, never, HttpClient.HttpClient
|
|
89
|
+
}, never, AuthClientConfig | HttpClient.HttpClient>;
|
|
121
90
|
};
|
|
122
|
-
export declare class
|
|
123
|
-
static readonly layer: Layer.Layer<
|
|
91
|
+
export declare class AuthClient extends AuthClient_base {
|
|
92
|
+
static readonly layer: Layer.Layer<AuthClient, import("effect/Config").ConfigError, never>;
|
|
124
93
|
}
|
|
125
94
|
export { BackendApi, BackendApiGroup } from "./api";
|
|
126
95
|
export type { BackendOrganizationsResponse, BackendUsersResponse } from "./schema";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/backend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAEL,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/backend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAEL,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;;;;;;;;;;AAKxD,qBAAa,gBAAiB,SAAQ,qBAGrC;IACC,MAAM,CAAC,QAAQ,CAAC,KAAK,4EAAiC;CACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,UAAW,SAAQ,eAgB/B;IACC,MAAM,CAAC,QAAQ,CAAC,KAAK,sEAGnB;CACH;AAED,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACpD,YAAY,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACnF,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/backend/index.js
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { Context, Effect, Layer, Redacted } from "effect";
|
|
2
2
|
import { FetchHttpClient, HttpClient, HttpClientRequest, } from "effect/unstable/http";
|
|
3
3
|
import { HttpApiClient } from "effect/unstable/httpapi";
|
|
4
|
-
import {
|
|
5
|
-
import { defaultBaseUrl, readClientConfig } from "../config";
|
|
4
|
+
import { readClientConfig } from "../config";
|
|
6
5
|
import { BackendApi } from "./api";
|
|
7
|
-
export class
|
|
8
|
-
api: BackendApi,
|
|
9
|
-
baseUrl: defaultBaseUrl(),
|
|
10
|
-
httpClient: FetchHttpClient.layer,
|
|
11
|
-
}) {
|
|
12
|
-
}
|
|
13
|
-
export class BackendClientConfig extends Context.Service()("BackendClientConfig", { make: readClientConfig }) {
|
|
6
|
+
export class AuthClientConfig extends Context.Service()("AuthClientConfig", { make: readClientConfig }) {
|
|
14
7
|
static layer = Layer.effect(this, this.make);
|
|
15
8
|
}
|
|
16
|
-
export class
|
|
9
|
+
export class AuthClient extends Context.Service()("AuthClient", {
|
|
17
10
|
make: Effect.gen(function* () {
|
|
18
|
-
const config = yield*
|
|
11
|
+
const config = yield* AuthClientConfig;
|
|
19
12
|
const http = yield* HttpClient.HttpClient;
|
|
20
13
|
return yield* HttpApiClient.group(BackendApi, {
|
|
21
14
|
group: "backend",
|
|
@@ -24,7 +17,7 @@ export class BackendClient extends Context.Service()("BackendClient", {
|
|
|
24
17
|
});
|
|
25
18
|
}),
|
|
26
19
|
}) {
|
|
27
|
-
static layer = Layer.effect(this, this.make).pipe(Layer.provide(
|
|
20
|
+
static layer = Layer.effect(this, this.make).pipe(Layer.provide(AuthClientConfig.layer), Layer.provide(FetchHttpClient.layer));
|
|
28
21
|
}
|
|
29
22
|
export { BackendApi, BackendApiGroup } from "./api";
|
|
30
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/backend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,UAAU,E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AC,MAAM,CAAC,CAAC,CACtE;SACF,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CACF;IACC,MAAM,CAAU,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CACxD,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,EACrC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CACrC,CAAC;;AAGJ,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/frontend/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const FrontendApiClient_base: AtomHttpApi.AtomHttpApiClient<FrontendApiC
|
|
|
24
24
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").BadRequest>, never, never>, false>>;
|
|
25
25
|
export declare class FrontendApiClient extends FrontendApiClient_base {
|
|
26
26
|
}
|
|
27
|
-
declare const
|
|
27
|
+
declare const AuthClientConfig_base: Context.ServiceClass<AuthClientConfig, "AuthClientConfig", {
|
|
28
28
|
baseUrl: string;
|
|
29
29
|
apiKey: Redacted.Redacted<string>;
|
|
30
30
|
}> & {
|
|
@@ -33,10 +33,10 @@ declare const FrontendClientConfig_base: Context.ServiceClass<FrontendClientConf
|
|
|
33
33
|
apiKey: Redacted.Redacted<string>;
|
|
34
34
|
}, import("effect/Config").ConfigError, never>;
|
|
35
35
|
};
|
|
36
|
-
export declare class
|
|
37
|
-
static readonly layer: Layer.Layer<
|
|
36
|
+
export declare class AuthClientConfig extends AuthClientConfig_base {
|
|
37
|
+
static readonly layer: Layer.Layer<AuthClientConfig, import("effect/Config").ConfigError, never>;
|
|
38
38
|
}
|
|
39
|
-
declare const
|
|
39
|
+
declare const AuthClient_base: Context.ServiceClass<AuthClient, "AuthClient", {
|
|
40
40
|
readonly listUserOrganizations: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
41
41
|
readonly params: {
|
|
42
42
|
readonly userId: string;
|
|
@@ -101,10 +101,10 @@ declare const FrontendClient_base: Context.ServiceClass<FrontendClient, "Fronten
|
|
|
101
101
|
readonly uploadUrl: string;
|
|
102
102
|
readonly url: string;
|
|
103
103
|
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").BadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
104
|
-
}, never, HttpClient.HttpClient |
|
|
104
|
+
}, never, HttpClient.HttpClient | AuthClientConfig>;
|
|
105
105
|
};
|
|
106
|
-
export declare class
|
|
107
|
-
static readonly layer: Layer.Layer<
|
|
106
|
+
export declare class AuthClient extends AuthClient_base {
|
|
107
|
+
static readonly layer: Layer.Layer<AuthClient, import("effect/Config").ConfigError, never>;
|
|
108
108
|
}
|
|
109
109
|
export { FrontendApi, FrontendOrganizationsApiGroup } from "./api";
|
|
110
110
|
export type { FrontendActiveOrganization, FrontendOrganizationsResponse, FrontendPresignedUpload, FrontendPresignUploadPayload, } from "./schema";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/frontend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAEL,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;AAKzD,qBAAa,iBAAkB,SAAQ,sBAOtC;CAAG;;;;;;;;;;AAEJ,qBAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/frontend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAEL,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;AAKzD,qBAAa,iBAAkB,SAAQ,sBAOtC;CAAG;;;;;;;;;;AAEJ,qBAAa,gBAAiB,SAAQ,qBAGrC;IACC,MAAM,CAAC,QAAQ,CAAC,KAAK,4EAAiC;CACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,UAAW,SAAQ,eAgB/B;IACC,MAAM,CAAC,QAAQ,CAAC,KAAK,sEAGnB;CACH;AAED,OAAO,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,OAAO,CAAC;AACnE,YAAY,EACV,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/frontend/index.js
CHANGED
|
@@ -10,12 +10,12 @@ export class FrontendApiClient extends AtomHttpApi.Service()("FrontendApiClient"
|
|
|
10
10
|
httpClient: FetchHttpClient.layer,
|
|
11
11
|
}) {
|
|
12
12
|
}
|
|
13
|
-
export class
|
|
13
|
+
export class AuthClientConfig extends Context.Service()("AuthClientConfig", { make: readClientConfig }) {
|
|
14
14
|
static layer = Layer.effect(this, this.make);
|
|
15
15
|
}
|
|
16
|
-
export class
|
|
16
|
+
export class AuthClient extends Context.Service()("AuthClient", {
|
|
17
17
|
make: Effect.gen(function* () {
|
|
18
|
-
const config = yield*
|
|
18
|
+
const config = yield* AuthClientConfig;
|
|
19
19
|
const http = yield* HttpClient.HttpClient;
|
|
20
20
|
return yield* HttpApiClient.group(FrontendApi, {
|
|
21
21
|
group: "organizations",
|
|
@@ -24,7 +24,7 @@ export class FrontendClient extends Context.Service()("FrontendClient", {
|
|
|
24
24
|
});
|
|
25
25
|
}),
|
|
26
26
|
}) {
|
|
27
|
-
static layer = Layer.effect(this, this.make).pipe(Layer.provide(
|
|
27
|
+
static layer = Layer.effect(this, this.make).pipe(Layer.provide(AuthClientConfig.layer), Layer.provide(FetchHttpClient.layer));
|
|
28
28
|
}
|
|
29
29
|
export { FrontendApi, FrontendOrganizationsApiGroup } from "./api";
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/frontend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,UAAU,EACV,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,MAAM,OAAO,iBAAkB,SAAQ,WAAW,CAAC,OAAO,EAAqB,CAC7E,mBAAmB,EACnB;IACE,GAAG,EAAE,WAAW;IAChB,OAAO,EAAE,cAAc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KAAK,CAAC,WAAW,EAAE;YAC7C,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAClD,iBAAiB,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CACtE;SACF,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CACF;IACC,MAAM,CAAU,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CACxD,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,EACrC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CACrC,CAAC;;AAGJ,OAAO,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
|