@01.software/sdk 0.36.0 → 0.37.0
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 +71 -6
- package/dist/analytics/react.cjs +33 -9
- package/dist/analytics/react.cjs.map +1 -1
- package/dist/analytics/react.d.cts +1 -1
- package/dist/analytics/react.d.ts +1 -1
- package/dist/analytics/react.js +33 -9
- package/dist/analytics/react.js.map +1 -1
- package/dist/analytics.cjs +30 -8
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.d.cts +6 -0
- package/dist/analytics.d.ts +6 -0
- package/dist/analytics.js +30 -8
- package/dist/analytics.js.map +1 -1
- package/dist/client.cjs +94 -114
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +94 -114
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-Bq5Zd7p7.d.ts → collection-client-DyELGUcL.d.ts} +3 -3
- package/dist/{collection-client-Cv0D2w1Q.d.cts → collection-client-zOmnxwdA.d.cts} +3 -3
- package/dist/{const-DVcM7Ac_.d.cts → const-CK_FPaIn.d.cts} +3 -3
- package/dist/{const-BDUKFP9w.d.ts → const-Dqz05oaG.d.ts} +3 -3
- package/dist/{image-BDz2-AaO.d.cts → image-BDjHp03R.d.cts} +13 -9
- package/dist/{image-BDz2-AaO.d.ts → image-BDjHp03R.d.ts} +13 -9
- package/dist/{index-DTSXUYkr.d.ts → index-DRJs7QIh.d.cts} +9 -6
- package/dist/{index-BHDKJ6B3.d.cts → index-DTqoUZk_.d.ts} +9 -6
- package/dist/index.cjs +172 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.js +172 -132
- package/dist/index.js.map +1 -1
- package/dist/metadata.cjs +5 -3
- package/dist/metadata.cjs.map +1 -1
- package/dist/metadata.js +5 -3
- package/dist/metadata.js.map +1 -1
- package/dist/{payload-types-BCui2Oml.d.cts → payload-types-CREOjFNT.d.cts} +281 -108
- package/dist/{payload-types-BCui2Oml.d.ts → payload-types-CREOjFNT.d.ts} +281 -108
- package/dist/query.cjs +5 -3
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +5 -3
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +84 -69
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.js +84 -69
- package/dist/server.js.map +1 -1
- package/dist/{types-Dib-zdK6.d.cts → types-BWMUr3Zw.d.cts} +195 -71
- package/dist/{types-CEzLf3PX.d.cts → types-BkZNhuBh.d.cts} +1 -1
- package/dist/{types-3qV6sY7T.d.ts → types-CxzWHspI.d.ts} +1 -1
- package/dist/{types-DK9EnLwJ.d.ts → types-DMvVHdb1.d.ts} +195 -71
- package/dist/ui/canvas.cjs +15 -5
- package/dist/ui/canvas.cjs.map +1 -1
- package/dist/ui/canvas.d.cts +1 -1
- package/dist/ui/canvas.d.ts +1 -1
- package/dist/ui/canvas.js +15 -5
- package/dist/ui/canvas.js.map +1 -1
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/image.cjs +15 -5
- package/dist/ui/image.cjs.map +1 -1
- package/dist/ui/image.d.cts +1 -1
- package/dist/ui/image.d.ts +1 -1
- package/dist/ui/image.js +15 -5
- package/dist/ui/image.js.map +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.cjs +5 -1
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +4 -4
- package/dist/webhook.d.ts +4 -4
- package/dist/webhook.js +5 -1
- package/dist/webhook.js.map +1 -1
- package/package.json +1 -1
package/dist/query.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient, UseQueryResult, UseSuspenseQueryResult, InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import { A as ApiQueryOptions, P as PayloadFindResponse, h as PayloadMutationResponse, a8 as CustomerAuth, a9 as CustomerProfile, aa as CustomerAuthResponse, ab as CustomerLoginData, ac as CustomerRegisterResponse, ad as CustomerRegisterData, ae as CustomerRefreshResponse, af as UpdateProfileData, ag as ProductDetailParams, ah as ProductDetailResult, ai as ProductListingGroupsItem, i as RootClient, Y as RootServerClient } from './types-
|
|
4
|
-
import './payload-types-
|
|
5
|
-
import { C as CollectionClient } from './collection-client-
|
|
6
|
-
import { S as ServerCollection, P as PublicCollection } from './const-
|
|
7
|
-
import { C as CollectionType } from './types-
|
|
3
|
+
import { A as ApiQueryOptions, P as PayloadFindResponse, h as PayloadMutationResponse, a8 as CustomerAuth, a9 as CustomerProfile, aa as CustomerAuthResponse, ab as CustomerLoginData, ac as CustomerRegisterResponse, ad as CustomerRegisterData, ae as CustomerRefreshResponse, af as UpdateProfileData, ag as ProductDetailParams, ah as ProductDetailResult, ai as ProductListingGroupsItem, i as RootClient, Y as RootServerClient } from './types-BWMUr3Zw.cjs';
|
|
4
|
+
import './payload-types-CREOjFNT.cjs';
|
|
5
|
+
import { C as CollectionClient } from './collection-client-zOmnxwdA.cjs';
|
|
6
|
+
import { S as ServerCollection, P as PublicCollection } from './const-CK_FPaIn.cjs';
|
|
7
|
+
import { C as CollectionType } from './types-BkZNhuBh.cjs';
|
|
8
8
|
import { SDKError } from './errors.cjs';
|
|
9
9
|
export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
|
|
10
10
|
import './metadata.cjs';
|
package/dist/query.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient, UseQueryResult, UseSuspenseQueryResult, InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import { A as ApiQueryOptions, P as PayloadFindResponse, h as PayloadMutationResponse, a8 as CustomerAuth, a9 as CustomerProfile, aa as CustomerAuthResponse, ab as CustomerLoginData, ac as CustomerRegisterResponse, ad as CustomerRegisterData, ae as CustomerRefreshResponse, af as UpdateProfileData, ag as ProductDetailParams, ah as ProductDetailResult, ai as ProductListingGroupsItem, i as RootClient, Y as RootServerClient } from './types-
|
|
4
|
-
import './payload-types-
|
|
5
|
-
import { C as CollectionClient } from './collection-client-
|
|
6
|
-
import { S as ServerCollection, P as PublicCollection } from './const-
|
|
7
|
-
import { C as CollectionType } from './types-
|
|
3
|
+
import { A as ApiQueryOptions, P as PayloadFindResponse, h as PayloadMutationResponse, a8 as CustomerAuth, a9 as CustomerProfile, aa as CustomerAuthResponse, ab as CustomerLoginData, ac as CustomerRegisterResponse, ad as CustomerRegisterData, ae as CustomerRefreshResponse, af as UpdateProfileData, ag as ProductDetailParams, ah as ProductDetailResult, ai as ProductListingGroupsItem, i as RootClient, Y as RootServerClient } from './types-DMvVHdb1.js';
|
|
4
|
+
import './payload-types-CREOjFNT.js';
|
|
5
|
+
import { C as CollectionClient } from './collection-client-DyELGUcL.js';
|
|
6
|
+
import { S as ServerCollection, P as PublicCollection } from './const-Dqz05oaG.js';
|
|
7
|
+
import { C as CollectionType } from './types-CxzWHspI.js';
|
|
8
8
|
import { SDKError } from './errors.js';
|
|
9
9
|
export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.js';
|
|
10
10
|
import './metadata.js';
|
package/dist/query.js
CHANGED
|
@@ -997,13 +997,15 @@ var RealtimeConnection = class {
|
|
|
997
997
|
};
|
|
998
998
|
|
|
999
999
|
// src/utils/types.ts
|
|
1000
|
-
|
|
1000
|
+
function resolveRelation(ref) {
|
|
1001
1001
|
if (typeof ref === "string" || typeof ref === "number" || ref === null || ref === void 0)
|
|
1002
1002
|
return null;
|
|
1003
1003
|
return ref;
|
|
1004
|
-
}
|
|
1004
|
+
}
|
|
1005
1005
|
|
|
1006
1006
|
// src/core/metadata/index.ts
|
|
1007
|
+
var OPEN_GRAPH_IMAGE_SIZE = "1200";
|
|
1008
|
+
var LEGACY_OPEN_GRAPH_IMAGE_SIZE = "1536";
|
|
1007
1009
|
function extractSeo(doc) {
|
|
1008
1010
|
const seo = doc.seo ?? {};
|
|
1009
1011
|
const og = seo.openGraph ?? {};
|
|
@@ -1047,7 +1049,7 @@ function generateMetadata(input, options) {
|
|
|
1047
1049
|
function resolveMetaImage(ref) {
|
|
1048
1050
|
const image = resolveRelation(ref);
|
|
1049
1051
|
if (!image) return null;
|
|
1050
|
-
const sized = image.sizes?.[
|
|
1052
|
+
const sized = image.sizes?.[OPEN_GRAPH_IMAGE_SIZE] ?? image.sizes?.[LEGACY_OPEN_GRAPH_IMAGE_SIZE];
|
|
1051
1053
|
const url = sized?.url || image.url;
|
|
1052
1054
|
if (!url) return null;
|
|
1053
1055
|
const width = sized?.url ? sized.width : image.width;
|