@01.software/sdk 0.35.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.
Files changed (80) hide show
  1. package/README.md +71 -6
  2. package/dist/analytics/react.cjs +33 -9
  3. package/dist/analytics/react.cjs.map +1 -1
  4. package/dist/analytics/react.d.cts +1 -1
  5. package/dist/analytics/react.d.ts +1 -1
  6. package/dist/analytics/react.js +33 -9
  7. package/dist/analytics/react.js.map +1 -1
  8. package/dist/analytics.cjs +30 -8
  9. package/dist/analytics.cjs.map +1 -1
  10. package/dist/analytics.d.cts +6 -0
  11. package/dist/analytics.d.ts +6 -0
  12. package/dist/analytics.js +30 -8
  13. package/dist/analytics.js.map +1 -1
  14. package/dist/client.cjs +94 -114
  15. package/dist/client.cjs.map +1 -1
  16. package/dist/client.d.cts +6 -6
  17. package/dist/client.d.ts +6 -6
  18. package/dist/client.js +94 -114
  19. package/dist/client.js.map +1 -1
  20. package/dist/{collection-client-DkREjhQ9.d.ts → collection-client-DyELGUcL.d.ts} +3 -3
  21. package/dist/{collection-client-CR2B8c1v.d.cts → collection-client-zOmnxwdA.d.cts} +3 -3
  22. package/dist/{const-CdqCauHQ.d.ts → const-CK_FPaIn.d.cts} +3 -3
  23. package/dist/{const-BTvdrXtY.d.cts → const-Dqz05oaG.d.ts} +3 -3
  24. package/dist/{image-BDz2-AaO.d.cts → image-BDjHp03R.d.cts} +13 -9
  25. package/dist/{image-BDz2-AaO.d.ts → image-BDjHp03R.d.ts} +13 -9
  26. package/dist/{index-DK8_NXkh.d.ts → index-DRJs7QIh.d.cts} +9 -6
  27. package/dist/{index-CjA3U6X3.d.cts → index-DTqoUZk_.d.ts} +9 -6
  28. package/dist/index.cjs +229 -136
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +10 -9
  31. package/dist/index.d.ts +10 -9
  32. package/dist/index.js +229 -136
  33. package/dist/index.js.map +1 -1
  34. package/dist/metadata.cjs +5 -3
  35. package/dist/metadata.cjs.map +1 -1
  36. package/dist/metadata.js +5 -3
  37. package/dist/metadata.js.map +1 -1
  38. package/dist/{payload-types-C7tb7Xbs.d.cts → payload-types-CREOjFNT.d.cts} +281 -128
  39. package/dist/{payload-types-C7tb7Xbs.d.ts → payload-types-CREOjFNT.d.ts} +281 -128
  40. package/dist/query.cjs +5 -3
  41. package/dist/query.cjs.map +1 -1
  42. package/dist/query.d.cts +5 -5
  43. package/dist/query.d.ts +5 -5
  44. package/dist/query.js +5 -3
  45. package/dist/query.js.map +1 -1
  46. package/dist/realtime.d.cts +2 -2
  47. package/dist/realtime.d.ts +2 -2
  48. package/dist/server.cjs +99 -69
  49. package/dist/server.cjs.map +1 -1
  50. package/dist/server.d.cts +7 -7
  51. package/dist/server.d.ts +7 -7
  52. package/dist/server.js +99 -69
  53. package/dist/server.js.map +1 -1
  54. package/dist/{types-DDhtZI6E.d.cts → types-BWMUr3Zw.d.cts} +274 -84
  55. package/dist/{types-Bx558PU6.d.cts → types-BkZNhuBh.d.cts} +1 -1
  56. package/dist/{types-1ylMrCuW.d.ts → types-CxzWHspI.d.ts} +1 -1
  57. package/dist/{types-Byo_Rty4.d.ts → types-DMvVHdb1.d.ts} +274 -84
  58. package/dist/ui/canvas.cjs +15 -5
  59. package/dist/ui/canvas.cjs.map +1 -1
  60. package/dist/ui/canvas.d.cts +1 -1
  61. package/dist/ui/canvas.d.ts +1 -1
  62. package/dist/ui/canvas.js +15 -5
  63. package/dist/ui/canvas.js.map +1 -1
  64. package/dist/ui/form.d.cts +1 -1
  65. package/dist/ui/form.d.ts +1 -1
  66. package/dist/ui/image.cjs +15 -5
  67. package/dist/ui/image.cjs.map +1 -1
  68. package/dist/ui/image.d.cts +1 -1
  69. package/dist/ui/image.d.ts +1 -1
  70. package/dist/ui/image.js +15 -5
  71. package/dist/ui/image.js.map +1 -1
  72. package/dist/ui/video.d.cts +1 -1
  73. package/dist/ui/video.d.ts +1 -1
  74. package/dist/webhook.cjs +5 -1
  75. package/dist/webhook.cjs.map +1 -1
  76. package/dist/webhook.d.cts +4 -4
  77. package/dist/webhook.d.ts +4 -4
  78. package/dist/webhook.js +5 -1
  79. package/dist/webhook.js.map +1 -1
  80. package/package.json +3 -3
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-DDhtZI6E.cjs';
4
- import './payload-types-C7tb7Xbs.cjs';
5
- import { C as CollectionClient } from './collection-client-CR2B8c1v.cjs';
6
- import { S as ServerCollection, P as PublicCollection } from './const-BTvdrXtY.cjs';
7
- import { C as CollectionType } from './types-Bx558PU6.cjs';
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-Byo_Rty4.js';
4
- import './payload-types-C7tb7Xbs.js';
5
- import { C as CollectionClient } from './collection-client-DkREjhQ9.js';
6
- import { S as ServerCollection, P as PublicCollection } from './const-CdqCauHQ.js';
7
- import { C as CollectionType } from './types-1ylMrCuW.js';
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
- var resolveRelation = (ref) => {
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?.["1536"];
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;