@01.software/sdk 0.2.1 → 0.2.3

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.
@@ -1,5 +1,5 @@
1
1
  import { Metadata } from 'next';
2
- import { M as Media } from './payload-types-CmDse9mQ.cjs';
2
+ import { M as Media } from './payload-types-COjt2QTn.cjs';
3
3
 
4
4
  interface MetaField {
5
5
  title?: string | null;
@@ -1,5 +1,5 @@
1
1
  import { Metadata } from 'next';
2
- import { M as Media } from './payload-types-CmDse9mQ.js';
2
+ import { M as Media } from './payload-types-COjt2QTn.js';
3
3
 
4
4
  interface MetaField {
5
5
  title?: string | null;
@@ -62,7 +62,7 @@ interface Config {
62
62
  'post-categories': PostCategory;
63
63
  'post-tags': PostTag;
64
64
  'post-images': PostImage;
65
- authors: Author;
65
+ 'post-authors': PostAuthor;
66
66
  documents: Document;
67
67
  'document-categories': DocumentCategory;
68
68
  'document-types': DocumentType;
@@ -112,7 +112,7 @@ interface Config {
112
112
  carts: {
113
113
  items: 'cart-items';
114
114
  };
115
- authors: {
115
+ 'post-authors': {
116
116
  posts: 'posts';
117
117
  };
118
118
  playlists: {
@@ -161,7 +161,7 @@ interface Config {
161
161
  'post-categories': PostCategoriesSelect<false> | PostCategoriesSelect<true>;
162
162
  'post-tags': PostTagsSelect<false> | PostTagsSelect<true>;
163
163
  'post-images': PostImagesSelect<false> | PostImagesSelect<true>;
164
- authors: AuthorsSelect<false> | AuthorsSelect<true>;
164
+ 'post-authors': PostAuthorsSelect<false> | PostAuthorsSelect<true>;
165
165
  documents: DocumentsSelect<false> | DocumentsSelect<true>;
166
166
  'document-categories': DocumentCategoriesSelect<false> | DocumentCategoriesSelect<true>;
167
167
  'document-types': DocumentTypesSelect<false> | DocumentTypesSelect<true>;
@@ -1867,7 +1867,7 @@ interface Post {
1867
1867
  */
1868
1868
  generateSlug?: boolean | null;
1869
1869
  slug?: string | null;
1870
- author?: (number | null) | Author;
1870
+ author?: (number | null) | PostAuthor;
1871
1871
  publishedAt?: string | null;
1872
1872
  categories?: (number | PostCategory)[] | null;
1873
1873
  tags?: (number | PostTag)[] | null;
@@ -1936,9 +1936,9 @@ interface PostImage {
1936
1936
  }
1937
1937
  /**
1938
1938
  * This interface was referenced by `Config`'s JSON-Schema
1939
- * via the `definition` "authors".
1939
+ * via the `definition` "post-authors".
1940
1940
  */
1941
- interface Author {
1941
+ interface PostAuthor {
1942
1942
  id: number;
1943
1943
  _order?: string | null;
1944
1944
  tenant?: (number | null) | Tenant;
@@ -2629,8 +2629,8 @@ interface PayloadLockedDocument {
2629
2629
  relationTo: 'post-images';
2630
2630
  value: number | PostImage;
2631
2631
  } | null) | ({
2632
- relationTo: 'authors';
2633
- value: number | Author;
2632
+ relationTo: 'post-authors';
2633
+ value: number | PostAuthor;
2634
2634
  } | null) | ({
2635
2635
  relationTo: 'documents';
2636
2636
  value: number | Document;
@@ -3865,9 +3865,9 @@ interface PostImagesSelect<T extends boolean = true> {
3865
3865
  }
3866
3866
  /**
3867
3867
  * This interface was referenced by `Config`'s JSON-Schema
3868
- * via the `definition` "authors_select".
3868
+ * via the `definition` "post-authors_select".
3869
3869
  */
3870
- interface AuthorsSelect<T extends boolean = true> {
3870
+ interface PostAuthorsSelect<T extends boolean = true> {
3871
3871
  _order?: T;
3872
3872
  tenant?: T;
3873
3873
  name?: T;
@@ -4274,4 +4274,4 @@ declare module 'payload' {
4274
4274
  }
4275
4275
  }
4276
4276
 
4277
- export type { Playlist as $, Audience as A, BrandLogo as B, CartItem as C, Exchange as D, EmailLog as E, Fulfillment as F, ExchangeProduct as G, FulfillmentItem as H, IframeBlock as I, Cart as J, Discount as K, Post as L, Media as M, PostImage as N, Order as O, ProductOption as P, Author as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, PostCategory as V, PostTag as W, Document as X, DocumentType as Y, DocumentImage as Z, DocumentCategory as _, OrderProduct as a, Auth as a$, Music as a0, PlaylistImage as a1, Form as a2, FormSubmission as a3, PayloadKv as a4, PayloadLockedDocument as a5, PayloadPreference as a6, PayloadMigration as a7, UsersSelect as a8, MediaSelect as a9, TransactionsSelect as aA, CustomersSelect as aB, CustomerAddressesSelect as aC, CustomerGroupsSelect as aD, CustomerGroupImagesSelect as aE, CartsSelect as aF, CartItemsSelect as aG, DiscountsSelect as aH, ShippingPoliciesSelect as aI, PostsSelect as aJ, PostCategoriesSelect as aK, PostTagsSelect as aL, PostImagesSelect as aM, AuthorsSelect as aN, DocumentsSelect as aO, DocumentCategoriesSelect as aP, DocumentTypesSelect as aQ, DocumentImagesSelect as aR, PlaylistsSelect as aS, PlaylistImagesSelect as aT, MusicsSelect as aU, FormsSelect as aV, FormSubmissionsSelect as aW, PayloadKvSelect as aX, PayloadLockedDocumentsSelect as aY, PayloadPreferencesSelect as aZ, PayloadMigrationsSelect as a_, AudiencesSelect as aa, EmailLogsSelect as ab, TenantsSelect as ac, TenantMetadataSelect as ad, TenantLogosSelect as ae, TenantOgImagesSelect as af, ApiUsageSelect as ag, SubscriptionsSelect as ah, BillingHistorySelect as ai, ProductsSelect as aj, ProductVariantsSelect as ak, ProductOptionsSelect as al, ProductCategoriesSelect as am, ProductTagsSelect as an, ProductImagesSelect as ao, ProductCollectionsSelect as ap, BrandsSelect as aq, BrandLogosSelect as ar, OrdersSelect as as, OrderProductsSelect as at, ReturnsSelect as au, ReturnProductsSelect as av, ExchangesSelect as aw, ExchangeProductsSelect as ax, FulfillmentsSelect as ay, FulfillmentItemsSelect as az, Config as b, CustomerAuthOperations as c, PlayerBlock as d, CodeBlock as e, User as f, Tenant as g, TenantMetadatum as h, TenantOgImage as i, TenantLogo as j, ApiUsage as k, Subscription as l, BillingHistory as m, Product as n, ProductImage as o, ProductVariant as p, ProductCategory as q, ProductTag as r, ProductCollection as s, Brand as t, ShippingPolicy as u, Customer as v, CustomerGroup as w, CustomerGroupImage as x, CustomerAddress as y, ReturnProduct as z };
4277
+ export type { DocumentCategory as $, Audience as A, BrandLogo as B, CartItem as C, ReturnProduct as D, EmailLog as E, Form as F, Exchange as G, ExchangeProduct as H, IframeBlock as I, FulfillmentItem as J, Cart as K, Discount as L, Media as M, Post as N, Order as O, ProductOption as P, PostImage as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, PostAuthor as V, PostCategory as W, PostTag as X, Document as Y, DocumentType as Z, DocumentImage as _, OrderProduct as a, Auth as a$, Playlist as a0, Music as a1, PlaylistImage as a2, FormSubmission as a3, PayloadKv as a4, PayloadLockedDocument as a5, PayloadPreference as a6, PayloadMigration as a7, UsersSelect as a8, MediaSelect as a9, TransactionsSelect as aA, CustomersSelect as aB, CustomerAddressesSelect as aC, CustomerGroupsSelect as aD, CustomerGroupImagesSelect as aE, CartsSelect as aF, CartItemsSelect as aG, DiscountsSelect as aH, ShippingPoliciesSelect as aI, PostsSelect as aJ, PostCategoriesSelect as aK, PostTagsSelect as aL, PostImagesSelect as aM, PostAuthorsSelect as aN, DocumentsSelect as aO, DocumentCategoriesSelect as aP, DocumentTypesSelect as aQ, DocumentImagesSelect as aR, PlaylistsSelect as aS, PlaylistImagesSelect as aT, MusicsSelect as aU, FormsSelect as aV, FormSubmissionsSelect as aW, PayloadKvSelect as aX, PayloadLockedDocumentsSelect as aY, PayloadPreferencesSelect as aZ, PayloadMigrationsSelect as a_, AudiencesSelect as aa, EmailLogsSelect as ab, TenantsSelect as ac, TenantMetadataSelect as ad, TenantLogosSelect as ae, TenantOgImagesSelect as af, ApiUsageSelect as ag, SubscriptionsSelect as ah, BillingHistorySelect as ai, ProductsSelect as aj, ProductVariantsSelect as ak, ProductOptionsSelect as al, ProductCategoriesSelect as am, ProductTagsSelect as an, ProductImagesSelect as ao, ProductCollectionsSelect as ap, BrandsSelect as aq, BrandLogosSelect as ar, OrdersSelect as as, OrderProductsSelect as at, ReturnsSelect as au, ReturnProductsSelect as av, ExchangesSelect as aw, ExchangeProductsSelect as ax, FulfillmentsSelect as ay, FulfillmentItemsSelect as az, Fulfillment as b, Config as c, CustomerAuthOperations as d, PlayerBlock as e, CodeBlock as f, User as g, Tenant as h, TenantMetadatum as i, TenantOgImage as j, TenantLogo as k, ApiUsage as l, Subscription as m, BillingHistory as n, Product as o, ProductImage as p, ProductVariant as q, ProductCategory as r, ProductTag as s, ProductCollection as t, Brand as u, ShippingPolicy as v, Customer as w, CustomerGroup as x, CustomerGroupImage as y, CustomerAddress as z };
@@ -62,7 +62,7 @@ interface Config {
62
62
  'post-categories': PostCategory;
63
63
  'post-tags': PostTag;
64
64
  'post-images': PostImage;
65
- authors: Author;
65
+ 'post-authors': PostAuthor;
66
66
  documents: Document;
67
67
  'document-categories': DocumentCategory;
68
68
  'document-types': DocumentType;
@@ -112,7 +112,7 @@ interface Config {
112
112
  carts: {
113
113
  items: 'cart-items';
114
114
  };
115
- authors: {
115
+ 'post-authors': {
116
116
  posts: 'posts';
117
117
  };
118
118
  playlists: {
@@ -161,7 +161,7 @@ interface Config {
161
161
  'post-categories': PostCategoriesSelect<false> | PostCategoriesSelect<true>;
162
162
  'post-tags': PostTagsSelect<false> | PostTagsSelect<true>;
163
163
  'post-images': PostImagesSelect<false> | PostImagesSelect<true>;
164
- authors: AuthorsSelect<false> | AuthorsSelect<true>;
164
+ 'post-authors': PostAuthorsSelect<false> | PostAuthorsSelect<true>;
165
165
  documents: DocumentsSelect<false> | DocumentsSelect<true>;
166
166
  'document-categories': DocumentCategoriesSelect<false> | DocumentCategoriesSelect<true>;
167
167
  'document-types': DocumentTypesSelect<false> | DocumentTypesSelect<true>;
@@ -1867,7 +1867,7 @@ interface Post {
1867
1867
  */
1868
1868
  generateSlug?: boolean | null;
1869
1869
  slug?: string | null;
1870
- author?: (number | null) | Author;
1870
+ author?: (number | null) | PostAuthor;
1871
1871
  publishedAt?: string | null;
1872
1872
  categories?: (number | PostCategory)[] | null;
1873
1873
  tags?: (number | PostTag)[] | null;
@@ -1936,9 +1936,9 @@ interface PostImage {
1936
1936
  }
1937
1937
  /**
1938
1938
  * This interface was referenced by `Config`'s JSON-Schema
1939
- * via the `definition` "authors".
1939
+ * via the `definition` "post-authors".
1940
1940
  */
1941
- interface Author {
1941
+ interface PostAuthor {
1942
1942
  id: number;
1943
1943
  _order?: string | null;
1944
1944
  tenant?: (number | null) | Tenant;
@@ -2629,8 +2629,8 @@ interface PayloadLockedDocument {
2629
2629
  relationTo: 'post-images';
2630
2630
  value: number | PostImage;
2631
2631
  } | null) | ({
2632
- relationTo: 'authors';
2633
- value: number | Author;
2632
+ relationTo: 'post-authors';
2633
+ value: number | PostAuthor;
2634
2634
  } | null) | ({
2635
2635
  relationTo: 'documents';
2636
2636
  value: number | Document;
@@ -3865,9 +3865,9 @@ interface PostImagesSelect<T extends boolean = true> {
3865
3865
  }
3866
3866
  /**
3867
3867
  * This interface was referenced by `Config`'s JSON-Schema
3868
- * via the `definition` "authors_select".
3868
+ * via the `definition` "post-authors_select".
3869
3869
  */
3870
- interface AuthorsSelect<T extends boolean = true> {
3870
+ interface PostAuthorsSelect<T extends boolean = true> {
3871
3871
  _order?: T;
3872
3872
  tenant?: T;
3873
3873
  name?: T;
@@ -4274,4 +4274,4 @@ declare module 'payload' {
4274
4274
  }
4275
4275
  }
4276
4276
 
4277
- export type { Playlist as $, Audience as A, BrandLogo as B, CartItem as C, Exchange as D, EmailLog as E, Fulfillment as F, ExchangeProduct as G, FulfillmentItem as H, IframeBlock as I, Cart as J, Discount as K, Post as L, Media as M, PostImage as N, Order as O, ProductOption as P, Author as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, PostCategory as V, PostTag as W, Document as X, DocumentType as Y, DocumentImage as Z, DocumentCategory as _, OrderProduct as a, Auth as a$, Music as a0, PlaylistImage as a1, Form as a2, FormSubmission as a3, PayloadKv as a4, PayloadLockedDocument as a5, PayloadPreference as a6, PayloadMigration as a7, UsersSelect as a8, MediaSelect as a9, TransactionsSelect as aA, CustomersSelect as aB, CustomerAddressesSelect as aC, CustomerGroupsSelect as aD, CustomerGroupImagesSelect as aE, CartsSelect as aF, CartItemsSelect as aG, DiscountsSelect as aH, ShippingPoliciesSelect as aI, PostsSelect as aJ, PostCategoriesSelect as aK, PostTagsSelect as aL, PostImagesSelect as aM, AuthorsSelect as aN, DocumentsSelect as aO, DocumentCategoriesSelect as aP, DocumentTypesSelect as aQ, DocumentImagesSelect as aR, PlaylistsSelect as aS, PlaylistImagesSelect as aT, MusicsSelect as aU, FormsSelect as aV, FormSubmissionsSelect as aW, PayloadKvSelect as aX, PayloadLockedDocumentsSelect as aY, PayloadPreferencesSelect as aZ, PayloadMigrationsSelect as a_, AudiencesSelect as aa, EmailLogsSelect as ab, TenantsSelect as ac, TenantMetadataSelect as ad, TenantLogosSelect as ae, TenantOgImagesSelect as af, ApiUsageSelect as ag, SubscriptionsSelect as ah, BillingHistorySelect as ai, ProductsSelect as aj, ProductVariantsSelect as ak, ProductOptionsSelect as al, ProductCategoriesSelect as am, ProductTagsSelect as an, ProductImagesSelect as ao, ProductCollectionsSelect as ap, BrandsSelect as aq, BrandLogosSelect as ar, OrdersSelect as as, OrderProductsSelect as at, ReturnsSelect as au, ReturnProductsSelect as av, ExchangesSelect as aw, ExchangeProductsSelect as ax, FulfillmentsSelect as ay, FulfillmentItemsSelect as az, Config as b, CustomerAuthOperations as c, PlayerBlock as d, CodeBlock as e, User as f, Tenant as g, TenantMetadatum as h, TenantOgImage as i, TenantLogo as j, ApiUsage as k, Subscription as l, BillingHistory as m, Product as n, ProductImage as o, ProductVariant as p, ProductCategory as q, ProductTag as r, ProductCollection as s, Brand as t, ShippingPolicy as u, Customer as v, CustomerGroup as w, CustomerGroupImage as x, CustomerAddress as y, ReturnProduct as z };
4277
+ export type { DocumentCategory as $, Audience as A, BrandLogo as B, CartItem as C, ReturnProduct as D, EmailLog as E, Form as F, Exchange as G, ExchangeProduct as H, IframeBlock as I, FulfillmentItem as J, Cart as K, Discount as L, Media as M, Post as N, Order as O, ProductOption as P, PostImage as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, PostAuthor as V, PostCategory as W, PostTag as X, Document as Y, DocumentType as Z, DocumentImage as _, OrderProduct as a, Auth as a$, Playlist as a0, Music as a1, PlaylistImage as a2, FormSubmission as a3, PayloadKv as a4, PayloadLockedDocument as a5, PayloadPreference as a6, PayloadMigration as a7, UsersSelect as a8, MediaSelect as a9, TransactionsSelect as aA, CustomersSelect as aB, CustomerAddressesSelect as aC, CustomerGroupsSelect as aD, CustomerGroupImagesSelect as aE, CartsSelect as aF, CartItemsSelect as aG, DiscountsSelect as aH, ShippingPoliciesSelect as aI, PostsSelect as aJ, PostCategoriesSelect as aK, PostTagsSelect as aL, PostImagesSelect as aM, PostAuthorsSelect as aN, DocumentsSelect as aO, DocumentCategoriesSelect as aP, DocumentTypesSelect as aQ, DocumentImagesSelect as aR, PlaylistsSelect as aS, PlaylistImagesSelect as aT, MusicsSelect as aU, FormsSelect as aV, FormSubmissionsSelect as aW, PayloadKvSelect as aX, PayloadLockedDocumentsSelect as aY, PayloadPreferencesSelect as aZ, PayloadMigrationsSelect as a_, AudiencesSelect as aa, EmailLogsSelect as ab, TenantsSelect as ac, TenantMetadataSelect as ad, TenantLogosSelect as ae, TenantOgImagesSelect as af, ApiUsageSelect as ag, SubscriptionsSelect as ah, BillingHistorySelect as ai, ProductsSelect as aj, ProductVariantsSelect as ak, ProductOptionsSelect as al, ProductCategoriesSelect as am, ProductTagsSelect as an, ProductImagesSelect as ao, ProductCollectionsSelect as ap, BrandsSelect as aq, BrandLogosSelect as ar, OrdersSelect as as, OrderProductsSelect as at, ReturnsSelect as au, ReturnProductsSelect as av, ExchangesSelect as aw, ExchangeProductsSelect as ax, FulfillmentsSelect as ay, FulfillmentItemsSelect as az, Fulfillment as b, Config as c, CustomerAuthOperations as d, PlayerBlock as e, CodeBlock as f, User as g, Tenant as h, TenantMetadatum as i, TenantOgImage as j, TenantLogo as k, ApiUsage as l, Subscription as m, BillingHistory as n, Product as o, ProductImage as p, ProductVariant as q, ProductCategory as r, ProductTag as s, ProductCollection as t, Brand as u, ShippingPolicy as v, Customer as w, CustomerGroup as x, CustomerGroupImage as y, CustomerAddress as z };
@@ -1,4 +1,4 @@
1
- import { b as Config } from './payload-types-CmDse9mQ.cjs';
1
+ import { c as Config } from './payload-types-COjt2QTn.cjs';
2
2
 
3
3
  /**
4
4
  * Collection type derived from Payload Config.
@@ -1,4 +1,4 @@
1
- import { b as Config } from './payload-types-CmDse9mQ.js';
1
+ import { c as Config } from './payload-types-COjt2QTn.js';
2
2
 
3
3
  /**
4
4
  * Collection type derived from Payload Config.
@@ -1,2 +1,2 @@
1
- export { c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-BpQ3M57n.cjs';
2
- import './payload-types-CmDse9mQ.cjs';
1
+ export { c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-CxTZjVol.cjs';
2
+ import './payload-types-COjt2QTn.cjs';
package/dist/webhook.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-DNIikEHk.js';
2
- import './payload-types-CmDse9mQ.js';
1
+ export { c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-DhK15oyO.js';
2
+ import './payload-types-COjt2QTn.js';
package/package.json CHANGED
@@ -1,23 +1,9 @@
1
1
  {
2
2
  "name": "@01.software/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "01.software SDK",
5
5
  "author": "<office@01.works>",
6
6
  "keywords": [],
7
- "scripts": {
8
- "dev": "tsup --watch",
9
- "clean": "rimraf ./dist ./coverage",
10
- "lint": "eslint ./src",
11
- "test": "vitest",
12
- "test:watch": "vitest --watch",
13
- "test:publish": "publint --strict && attw --pack --ignore-rules no-resolution",
14
- "build": "tsup",
15
- "prepublishOnly": "pnpm run build && publint --strict",
16
- "version:dev": "node ../../scripts/update-version.js",
17
- "publish:dev": "pnpm run version:dev && pnpm publish --no-git-checks --access public --tag dev",
18
- "version:prod": "pnpm version patch --no-git-tag-version",
19
- "publish:prod": "pnpm run test:publish && pnpm run build && pnpm publish --no-git-checks --access public"
20
- },
21
7
  "type": "module",
22
8
  "main": "./dist/index.cjs",
23
9
  "module": "./dist/index.js",
@@ -81,8 +67,6 @@
81
67
  ],
82
68
  "devDependencies": {
83
69
  "@arethetypeswrong/cli": "^0.17.3",
84
- "@repo/eslint-config": "workspace:*",
85
- "@repo/typescript-config": "workspace:*",
86
70
  "@tanstack/react-query": "5.90.16",
87
71
  "@types/node": "^22.15.3",
88
72
  "@types/react": "19.2.3",
@@ -95,7 +79,9 @@
95
79
  "rimraf": "^6.0.2",
96
80
  "shadcn": "^3.6.3",
97
81
  "tsup": "^8.3.7",
98
- "vitest": "^3.2.3"
82
+ "vitest": "^3.2.3",
83
+ "@repo/eslint-config": "0.0.0",
84
+ "@repo/typescript-config": "0.0.0"
99
85
  },
100
86
  "dependencies": {
101
87
  "@payloadcms/richtext-lexical": "3.77.0",
@@ -108,5 +94,18 @@
108
94
  "next": ">=14",
109
95
  "react": ">=18",
110
96
  "react-dom": ">=18"
97
+ },
98
+ "scripts": {
99
+ "dev": "tsup --watch",
100
+ "clean": "rimraf ./dist ./coverage",
101
+ "lint": "eslint ./src",
102
+ "test": "vitest",
103
+ "test:watch": "vitest --watch",
104
+ "test:publish": "publint --strict && attw --pack --ignore-rules no-resolution",
105
+ "build": "tsup",
106
+ "version:dev": "node ../../scripts/update-version.js",
107
+ "publish:dev": "pnpm run version:dev && pnpm publish --no-git-checks --access public --tag dev",
108
+ "version:prod": "pnpm version patch --no-git-tag-version",
109
+ "publish:prod": "pnpm run test:publish && pnpm run build && pnpm publish --no-git-checks --access public"
111
110
  }
112
- }
111
+ }
@@ -1,174 +0,0 @@
1
- import * as React from 'react';
2
- import React__default, { CSSProperties } from 'react';
3
- import { SerializedLinkNode, SerializedBlockNode } from '@payloadcms/richtext-lexical';
4
- import { SerializedEditorState, SerializedLexicalNode } from '@payloadcms/richtext-lexical/lexical';
5
- import { JSXConverter } from '@payloadcms/richtext-lexical/react';
6
- import { a2 as Form } from './payload-types-CmDse9mQ.js';
7
-
8
- /** Palette colors extracted from an image */
9
- interface ImagePalette {
10
- vibrant?: string | null;
11
- muted?: string | null;
12
- darkVibrant?: string | null;
13
- darkMuted?: string | null;
14
- lightVibrant?: string | null;
15
- lightMuted?: string | null;
16
- }
17
- /** Common image data shape from Payload CMS upload collections */
18
- interface ImageData {
19
- url?: string | null;
20
- width?: number | null;
21
- height?: number | null;
22
- alt?: string | null;
23
- lqip?: string | null;
24
- palette?: ImagePalette | null;
25
- sizes?: Record<string, {
26
- url?: string | null;
27
- width?: number | null;
28
- height?: number | null;
29
- } | undefined>;
30
- }
31
- /** Pre-generated image size breakpoints (px) */
32
- declare const IMAGE_SIZES: readonly [384, 768, 1536];
33
- /**
34
- * Returns the optimal image URL for a given display width.
35
- *
36
- * Picks the smallest pre-generated size whose width >= displayWidth × dpr.
37
- * Falls back to the original URL when no matching size exists.
38
- *
39
- * @param image - Payload image document
40
- * @param displayWidth - CSS pixel width the image will be displayed at
41
- * @param dpr - Device pixel ratio (default: 1)
42
- * @returns URL string, or empty string if no URL is available
43
- */
44
- declare function getImageUrl(image: ImageData, displayWidth: number, dpr?: number): string;
45
- /**
46
- * Generates an HTML `srcset` attribute string from pre-generated sizes.
47
- *
48
- * Includes all available sizes plus the original image.
49
- * Example output: `"url-384 384w, url-768 768w, url-1536 1536w, url-original 2000w"`
50
- *
51
- * @param image - Payload image document
52
- * @returns srcset string, or empty string if no URLs are available
53
- */
54
- declare function getImageSrcSet(image: ImageData): string;
55
- /**
56
- * Returns the LQIP (Low Quality Image Placeholder) data URL for an image.
57
- *
58
- * @param image - Payload image document
59
- * @returns LQIP data URL string, or undefined if not available
60
- */
61
- declare function getImageLqip(image: ImageData): string | undefined;
62
- /**
63
- * Returns the extracted color palette for an image.
64
- *
65
- * @param image - Payload image document
66
- * @returns ImagePalette object, or undefined if not available
67
- */
68
- declare function getImagePalette(image: ImageData): ImagePalette | undefined;
69
- /** Options for `getImagePlaceholderStyle` */
70
- interface ImagePlaceholderOptions {
71
- /** Placeholder strategy (default: 'blur') */
72
- type?: 'blur' | 'color' | 'none';
73
- /** Which palette color to use for 'color' strategy (default: 'muted') */
74
- paletteColor?: keyof ImagePalette;
75
- }
76
- /**
77
- * Returns inline CSS styles for an image placeholder.
78
- *
79
- * - `blur`: uses LQIP as background, falls back to palette color, then empty
80
- * - `color`: uses palette color as background, falls back to empty
81
- * - `none`: always returns empty
82
- *
83
- * @param image - Payload image document
84
- * @param options - Placeholder options
85
- * @returns CSS style object compatible with React CSSProperties
86
- */
87
- declare function getImagePlaceholderStyle(image: ImageData, options?: ImagePlaceholderOptions): Record<string, string>;
88
-
89
- type RichTextData = SerializedEditorState<SerializedLexicalNode>;
90
- interface RichTextContentProps {
91
- data: RichTextData;
92
- className?: string;
93
- internalDocToHref?: (args: {
94
- linkNode: SerializedLinkNode;
95
- }) => string;
96
- blocks?: {
97
- Iframe?: JSXConverter<SerializedBlockNode<{
98
- blockName?: string | null;
99
- blockType: string;
100
- url: string;
101
- }>>;
102
- Player?: JSXConverter<SerializedBlockNode<{
103
- blockName?: string | null;
104
- blockType: string;
105
- url: string;
106
- }>>;
107
- };
108
- }
109
- declare function RichTextContent({ data, className, internalDocToHref, blocks, }: RichTextContentProps): React__default.JSX.Element;
110
-
111
- type FormField = NonNullable<Form['fields']>[number];
112
- type InputField = Exclude<FormField, {
113
- blockType: 'message';
114
- }>;
115
- type FormValues = Record<string, string | number | boolean>;
116
- type SubmissionData = {
117
- field: string;
118
- value: string;
119
- }[];
120
- declare function toSubmissionData(values: FormValues): SubmissionData;
121
- interface FieldRenderContext {
122
- value: string | number | boolean;
123
- onChange: (value: string | number | boolean) => void;
124
- }
125
- interface FormRendererProps {
126
- form: Form;
127
- onSubmit: (data: FormValues) => void | Promise<void>;
128
- className?: string;
129
- fieldClassName?: string;
130
- buttonClassName?: string;
131
- renderField?: (field: FormField, context: FieldRenderContext, defaultRender: React__default.ReactElement) => React__default.ReactElement;
132
- renderMessage?: (data: RichTextData) => React__default.ReactElement;
133
- renderButton?: (props: {
134
- isSubmitting: boolean;
135
- label: string;
136
- }) => React__default.ReactElement;
137
- }
138
- declare function FormRenderer({ form, onSubmit, className, fieldClassName, buttonClassName, renderField, renderMessage, renderButton, }: FormRendererProps): React__default.JSX.Element;
139
-
140
- interface ImageProps {
141
- /** Payload image document */
142
- image: ImageData;
143
- /** Display width in CSS pixels (for selecting optimal srcset size) */
144
- width?: number;
145
- /** Device pixel ratio (default: 1) */
146
- dpr?: number;
147
- /** Placeholder strategy (default: 'blur') */
148
- placeholder?: 'blur' | 'color' | 'none';
149
- /** Container className */
150
- className?: string;
151
- /** Container style */
152
- style?: CSSProperties;
153
- /** Inner `<img>` className */
154
- imgClassName?: string;
155
- /** Inner `<img>` style */
156
- imgStyle?: CSSProperties;
157
- /** HTML sizes attribute */
158
- sizes?: string;
159
- /** Loading strategy (default: 'lazy') */
160
- loading?: 'lazy' | 'eager';
161
- /** Callback when image finishes loading */
162
- onLoad?: () => void;
163
- /** Object-fit for the image (default: 'cover') */
164
- objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
165
- }
166
- /**
167
- * Image component with blur-up / color placeholder support.
168
- *
169
- * Uses LQIP (Low Quality Image Placeholder) for a smooth blur-up effect,
170
- * falling back to palette color or no placeholder.
171
- */
172
- declare function Image({ image, width, dpr, placeholder, className, style, imgClassName, imgStyle, sizes, loading, onLoad, objectFit, }: ImageProps): React.JSX.Element;
173
-
174
- export { type FormField as F, type ImagePalette as I, type RichTextData as R, type SubmissionData as S, type ImageData as a, IMAGE_SIZES as b, getImageSrcSet as c, getImageLqip as d, getImagePalette as e, type ImagePlaceholderOptions as f, getImageUrl as g, getImagePlaceholderStyle as h, type RichTextContentProps as i, RichTextContent as j, type InputField as k, type FormValues as l, type FieldRenderContext as m, type FormRendererProps as n, FormRenderer as o, type ImageProps as p, Image as q, toSubmissionData as t };
@@ -1,174 +0,0 @@
1
- import * as React from 'react';
2
- import React__default, { CSSProperties } from 'react';
3
- import { SerializedLinkNode, SerializedBlockNode } from '@payloadcms/richtext-lexical';
4
- import { SerializedEditorState, SerializedLexicalNode } from '@payloadcms/richtext-lexical/lexical';
5
- import { JSXConverter } from '@payloadcms/richtext-lexical/react';
6
- import { a2 as Form } from './payload-types-CmDse9mQ.cjs';
7
-
8
- /** Palette colors extracted from an image */
9
- interface ImagePalette {
10
- vibrant?: string | null;
11
- muted?: string | null;
12
- darkVibrant?: string | null;
13
- darkMuted?: string | null;
14
- lightVibrant?: string | null;
15
- lightMuted?: string | null;
16
- }
17
- /** Common image data shape from Payload CMS upload collections */
18
- interface ImageData {
19
- url?: string | null;
20
- width?: number | null;
21
- height?: number | null;
22
- alt?: string | null;
23
- lqip?: string | null;
24
- palette?: ImagePalette | null;
25
- sizes?: Record<string, {
26
- url?: string | null;
27
- width?: number | null;
28
- height?: number | null;
29
- } | undefined>;
30
- }
31
- /** Pre-generated image size breakpoints (px) */
32
- declare const IMAGE_SIZES: readonly [384, 768, 1536];
33
- /**
34
- * Returns the optimal image URL for a given display width.
35
- *
36
- * Picks the smallest pre-generated size whose width >= displayWidth × dpr.
37
- * Falls back to the original URL when no matching size exists.
38
- *
39
- * @param image - Payload image document
40
- * @param displayWidth - CSS pixel width the image will be displayed at
41
- * @param dpr - Device pixel ratio (default: 1)
42
- * @returns URL string, or empty string if no URL is available
43
- */
44
- declare function getImageUrl(image: ImageData, displayWidth: number, dpr?: number): string;
45
- /**
46
- * Generates an HTML `srcset` attribute string from pre-generated sizes.
47
- *
48
- * Includes all available sizes plus the original image.
49
- * Example output: `"url-384 384w, url-768 768w, url-1536 1536w, url-original 2000w"`
50
- *
51
- * @param image - Payload image document
52
- * @returns srcset string, or empty string if no URLs are available
53
- */
54
- declare function getImageSrcSet(image: ImageData): string;
55
- /**
56
- * Returns the LQIP (Low Quality Image Placeholder) data URL for an image.
57
- *
58
- * @param image - Payload image document
59
- * @returns LQIP data URL string, or undefined if not available
60
- */
61
- declare function getImageLqip(image: ImageData): string | undefined;
62
- /**
63
- * Returns the extracted color palette for an image.
64
- *
65
- * @param image - Payload image document
66
- * @returns ImagePalette object, or undefined if not available
67
- */
68
- declare function getImagePalette(image: ImageData): ImagePalette | undefined;
69
- /** Options for `getImagePlaceholderStyle` */
70
- interface ImagePlaceholderOptions {
71
- /** Placeholder strategy (default: 'blur') */
72
- type?: 'blur' | 'color' | 'none';
73
- /** Which palette color to use for 'color' strategy (default: 'muted') */
74
- paletteColor?: keyof ImagePalette;
75
- }
76
- /**
77
- * Returns inline CSS styles for an image placeholder.
78
- *
79
- * - `blur`: uses LQIP as background, falls back to palette color, then empty
80
- * - `color`: uses palette color as background, falls back to empty
81
- * - `none`: always returns empty
82
- *
83
- * @param image - Payload image document
84
- * @param options - Placeholder options
85
- * @returns CSS style object compatible with React CSSProperties
86
- */
87
- declare function getImagePlaceholderStyle(image: ImageData, options?: ImagePlaceholderOptions): Record<string, string>;
88
-
89
- type RichTextData = SerializedEditorState<SerializedLexicalNode>;
90
- interface RichTextContentProps {
91
- data: RichTextData;
92
- className?: string;
93
- internalDocToHref?: (args: {
94
- linkNode: SerializedLinkNode;
95
- }) => string;
96
- blocks?: {
97
- Iframe?: JSXConverter<SerializedBlockNode<{
98
- blockName?: string | null;
99
- blockType: string;
100
- url: string;
101
- }>>;
102
- Player?: JSXConverter<SerializedBlockNode<{
103
- blockName?: string | null;
104
- blockType: string;
105
- url: string;
106
- }>>;
107
- };
108
- }
109
- declare function RichTextContent({ data, className, internalDocToHref, blocks, }: RichTextContentProps): React__default.JSX.Element;
110
-
111
- type FormField = NonNullable<Form['fields']>[number];
112
- type InputField = Exclude<FormField, {
113
- blockType: 'message';
114
- }>;
115
- type FormValues = Record<string, string | number | boolean>;
116
- type SubmissionData = {
117
- field: string;
118
- value: string;
119
- }[];
120
- declare function toSubmissionData(values: FormValues): SubmissionData;
121
- interface FieldRenderContext {
122
- value: string | number | boolean;
123
- onChange: (value: string | number | boolean) => void;
124
- }
125
- interface FormRendererProps {
126
- form: Form;
127
- onSubmit: (data: FormValues) => void | Promise<void>;
128
- className?: string;
129
- fieldClassName?: string;
130
- buttonClassName?: string;
131
- renderField?: (field: FormField, context: FieldRenderContext, defaultRender: React__default.ReactElement) => React__default.ReactElement;
132
- renderMessage?: (data: RichTextData) => React__default.ReactElement;
133
- renderButton?: (props: {
134
- isSubmitting: boolean;
135
- label: string;
136
- }) => React__default.ReactElement;
137
- }
138
- declare function FormRenderer({ form, onSubmit, className, fieldClassName, buttonClassName, renderField, renderMessage, renderButton, }: FormRendererProps): React__default.JSX.Element;
139
-
140
- interface ImageProps {
141
- /** Payload image document */
142
- image: ImageData;
143
- /** Display width in CSS pixels (for selecting optimal srcset size) */
144
- width?: number;
145
- /** Device pixel ratio (default: 1) */
146
- dpr?: number;
147
- /** Placeholder strategy (default: 'blur') */
148
- placeholder?: 'blur' | 'color' | 'none';
149
- /** Container className */
150
- className?: string;
151
- /** Container style */
152
- style?: CSSProperties;
153
- /** Inner `<img>` className */
154
- imgClassName?: string;
155
- /** Inner `<img>` style */
156
- imgStyle?: CSSProperties;
157
- /** HTML sizes attribute */
158
- sizes?: string;
159
- /** Loading strategy (default: 'lazy') */
160
- loading?: 'lazy' | 'eager';
161
- /** Callback when image finishes loading */
162
- onLoad?: () => void;
163
- /** Object-fit for the image (default: 'cover') */
164
- objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
165
- }
166
- /**
167
- * Image component with blur-up / color placeholder support.
168
- *
169
- * Uses LQIP (Low Quality Image Placeholder) for a smooth blur-up effect,
170
- * falling back to palette color or no placeholder.
171
- */
172
- declare function Image({ image, width, dpr, placeholder, className, style, imgClassName, imgStyle, sizes, loading, onLoad, objectFit, }: ImageProps): React.JSX.Element;
173
-
174
- export { type FormField as F, type ImagePalette as I, type RichTextData as R, type SubmissionData as S, type ImageData as a, IMAGE_SIZES as b, getImageSrcSet as c, getImageLqip as d, getImagePalette as e, type ImagePlaceholderOptions as f, getImageUrl as g, getImagePlaceholderStyle as h, type RichTextContentProps as i, RichTextContent as j, type InputField as k, type FormValues as l, type FieldRenderContext as m, type FormRendererProps as n, FormRenderer as o, type ImageProps as p, Image as q, toSubmissionData as t };