@rebuy/rebuy 2.0.2 → 2.2.0-rc.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.
Files changed (47) hide show
  1. package/dist/client.d.ts +1 -1
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/index.js.map +2 -2
  4. package/dist/index.mjs.map +2 -2
  5. package/dist/schema/button.d.ts +271 -0
  6. package/dist/schema/button.d.ts.map +1 -0
  7. package/dist/schema/common.d.ts +369 -0
  8. package/dist/schema/common.d.ts.map +1 -0
  9. package/dist/schema/constants.d.ts +165 -0
  10. package/dist/schema/constants.d.ts.map +1 -0
  11. package/dist/schema/data-source.d.ts +11 -0
  12. package/dist/schema/data-source.d.ts.map +1 -0
  13. package/dist/schema/image.d.ts +63 -0
  14. package/dist/schema/image.d.ts.map +1 -0
  15. package/dist/schema/index.d.ts +20 -0
  16. package/dist/schema/index.d.ts.map +1 -0
  17. package/dist/schema/index.mjs +629 -0
  18. package/dist/schema/index.mjs.map +7 -0
  19. package/dist/schema/layout.d.ts +78 -0
  20. package/dist/schema/layout.d.ts.map +1 -0
  21. package/dist/schema/offers.d.ts +67 -0
  22. package/dist/schema/offers.d.ts.map +1 -0
  23. package/dist/schema/product.d.ts +147 -0
  24. package/dist/schema/product.d.ts.map +1 -0
  25. package/dist/schema/products.d.ts +150 -0
  26. package/dist/schema/products.d.ts.map +1 -0
  27. package/dist/schema/quantity.d.ts +19 -0
  28. package/dist/schema/quantity.d.ts.map +1 -0
  29. package/dist/schema/regex.d.ts +7 -0
  30. package/dist/schema/regex.d.ts.map +1 -0
  31. package/dist/schema/reviews.d.ts +8 -0
  32. package/dist/schema/reviews.d.ts.map +1 -0
  33. package/dist/schema/root.d.ts +127 -0
  34. package/dist/schema/root.d.ts.map +1 -0
  35. package/dist/schema/shared.d.ts +38 -0
  36. package/dist/schema/shared.d.ts.map +1 -0
  37. package/dist/schema/subscription.d.ts +8 -0
  38. package/dist/schema/subscription.d.ts.map +1 -0
  39. package/dist/schema/table.d.ts +8 -0
  40. package/dist/schema/table.d.ts.map +1 -0
  41. package/dist/schema/text.d.ts +160 -0
  42. package/dist/schema/text.d.ts.map +1 -0
  43. package/dist/schema/utils.d.ts +8 -0
  44. package/dist/schema/utils.d.ts.map +1 -0
  45. package/dist/schema/variants.d.ts +15 -0
  46. package/dist/schema/variants.d.ts.map +1 -0
  47. package/package.json +11 -9
@@ -0,0 +1,127 @@
1
+ import { z } from 'zod';
2
+ import { EditorMode } from '~/schema/common';
3
+ import { WidgetType } from '~/schema/constants';
4
+ import { CABLayoutSection } from '~/schema/layout';
5
+ export type TargetArea = {
6
+ fill?: boolean;
7
+ flip?: 'horizontal' | 'vertical' | 'both';
8
+ icon: string;
9
+ label: string;
10
+ width: string;
11
+ };
12
+ export declare const CABRootSection: z.ZodObject<{
13
+ alignment: z.ZodDefault<z.ZodObject<{
14
+ horizontal: z.ZodDefault<z.ZodEnum<{
15
+ start: "start";
16
+ center: "center";
17
+ end: "end";
18
+ }>>;
19
+ vertical: z.ZodDefault<z.ZodEnum<{
20
+ top: "top";
21
+ middle: "middle";
22
+ bottom: "bottom";
23
+ }>>;
24
+ }, z.core.$strict>>;
25
+ border: z.ZodDefault<z.ZodObject<{
26
+ radius: z.ZodDefault<z.ZodEnum<{
27
+ small: "small";
28
+ none: "none";
29
+ base: "base";
30
+ large: "large";
31
+ fullyRounded: "fullyRounded";
32
+ }>>;
33
+ style: z.ZodDefault<z.ZodEnum<{
34
+ none: "none";
35
+ base: "base";
36
+ dotted: "dotted";
37
+ dashed: "dashed";
38
+ }>>;
39
+ width: z.ZodDefault<z.ZodEnum<{
40
+ base: "base";
41
+ medium: "medium";
42
+ thick: "thick";
43
+ }>>;
44
+ }, z.core.$strict>>;
45
+ direction: z.ZodDefault<z.ZodEnum<{
46
+ columns: "columns";
47
+ rows: "rows";
48
+ }>>;
49
+ name: z.ZodOptional<z.ZodString>;
50
+ padding: z.ZodDefault<z.ZodEnum<{
51
+ none: "none";
52
+ base: "base";
53
+ extraTight: "extraTight";
54
+ tight: "tight";
55
+ loose: "loose";
56
+ extraLoose: "extraLoose";
57
+ }>>;
58
+ sectionId: z.ZodDefault<z.ZodUUID>;
59
+ sections: z.ZodDefault<z.ZodArray<z.ZodLazy<z.ZodType<import("./shared").CABSection, unknown, z.core.$ZodTypeInternals<import("./shared").CABSection, unknown>>>>>;
60
+ sectionType: z.ZodDefault<z.ZodLiteral<"layout">>;
61
+ spacing: z.ZodDefault<z.ZodEnum<{
62
+ none: "none";
63
+ base: "base";
64
+ extraTight: "extraTight";
65
+ tight: "tight";
66
+ loose: "loose";
67
+ extraLoose: "extraLoose";
68
+ }>>;
69
+ width: z.ZodDefault<z.ZodNumber>;
70
+ editorMode: z.ZodDefault<z.ZodEnum<{
71
+ checkoutExtension: "checkoutExtension";
72
+ postPurchaseOffer: "postPurchaseOffer";
73
+ thankYouPage: "thankYouPage";
74
+ orderStatusPage: "orderStatusPage";
75
+ ordersIndexPage: "ordersIndexPage";
76
+ customerProfilePage: "customerProfilePage";
77
+ }>>;
78
+ previewMode: z.ZodDefault<z.ZodBoolean>;
79
+ storeId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
80
+ targetArea: z.ZodNullable<z.ZodDefault<z.ZodObject<{
81
+ fill: z.ZodOptional<z.ZodBoolean>;
82
+ flip: z.ZodOptional<z.ZodEnum<{
83
+ horizontal: "horizontal";
84
+ vertical: "vertical";
85
+ both: "both";
86
+ }>>;
87
+ icon: z.ZodString;
88
+ label: z.ZodString;
89
+ width: z.ZodString;
90
+ }, z.core.$strict>>>;
91
+ type: z.ZodDefault<z.ZodEnum<{
92
+ product: "product";
93
+ bundle_builder: "bundle_builder";
94
+ cart: "cart";
95
+ cart_subscription: "cart_subscription";
96
+ dynamic_bundle: "dynamic_bundle";
97
+ gift_with_purchase: "gift_with_purchase";
98
+ pre_purchase: "pre_purchase";
99
+ product_addon: "product_addon";
100
+ product_upsell: "product_upsell";
101
+ recharge_checkout: "recharge_checkout";
102
+ recharge_customer_portal: "recharge_customer_portal";
103
+ recharge_post_purchase: "recharge_post_purchase";
104
+ shopify_checkout: "shopify_checkout";
105
+ shopify_checkout_extension: "shopify_checkout_extension";
106
+ shopify_post_purchase: "shopify_post_purchase";
107
+ shopify_post_purchase_extension: "shopify_post_purchase_extension";
108
+ switch_to_subscription: "switch_to_subscription";
109
+ ui_extension_ad: "ui_extension_ad";
110
+ ui_extension_button: "ui_extension_button";
111
+ ui_extension_content_block: "ui_extension_content_block";
112
+ ui_extension_line_item_editor: "ui_extension_line_item_editor";
113
+ ui_extension_progress_bar: "ui_extension_progress_bar";
114
+ }>>;
115
+ version: z.ZodDefault<z.ZodLiteral<2>>;
116
+ widgetId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
117
+ }, z.core.$strict>;
118
+ export type CABRootSection = CABLayoutSection & {
119
+ editorMode: EditorMode;
120
+ previewMode: boolean;
121
+ storeId: number | null;
122
+ targetArea: TargetArea | null;
123
+ type: WidgetType;
124
+ version: number;
125
+ widgetId: number | null;
126
+ };
127
+ //# sourceMappingURL=root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/schema/root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAe,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAe,UAAU,EAAe,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAYnD,MAAM,MAAM,UAAU,GAAG;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAU1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG;IAC5C,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { z, type ZodType } from 'zod';
2
+ import { CABButtonSection } from '~/schema/button';
3
+ import { CABDataSourceSection } from '~/schema/data-source';
4
+ import { CABImageSection } from '~/schema/image';
5
+ import { CABLayoutSection } from '~/schema/layout';
6
+ import { CABOffersSection } from '~/schema/offers';
7
+ import { CABProductSection } from '~/schema/product';
8
+ import { CABProductsSection } from '~/schema/products';
9
+ import { CABQuantitySection } from '~/schema/quantity';
10
+ import { CABReviewsSection } from '~/schema/reviews';
11
+ import { CABSubscriptionSection } from '~/schema/subscription';
12
+ import { CABTableSection } from '~/schema/table';
13
+ import { CABTextSection } from '~/schema/text';
14
+ import { CABVariantsSection } from '~/schema/variants';
15
+ export declare const CABBorder: z.ZodDefault<z.ZodObject<{
16
+ radius: z.ZodDefault<z.ZodEnum<{
17
+ small: "small";
18
+ none: "none";
19
+ base: "base";
20
+ large: "large";
21
+ fullyRounded: "fullyRounded";
22
+ }>>;
23
+ style: z.ZodDefault<z.ZodEnum<{
24
+ none: "none";
25
+ base: "base";
26
+ dotted: "dotted";
27
+ dashed: "dashed";
28
+ }>>;
29
+ width: z.ZodDefault<z.ZodEnum<{
30
+ base: "base";
31
+ medium: "medium";
32
+ thick: "thick";
33
+ }>>;
34
+ }, z.core.$strict>>;
35
+ export type CABBorder = z.infer<typeof CABBorder>;
36
+ export declare const CABSection: ZodType<CABSection>;
37
+ export type CABSection = CABButtonSection | CABDataSourceSection | CABImageSection | CABLayoutSection | CABOffersSection | CABProductSection | CABProductsSection | CABQuantitySection | CABReviewsSection | CABSubscriptionSection | CABTableSection | CABTextSection | CABVariantsSection;
38
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/schema/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;mBAUhB,CAAC;AAEP,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,UAAU,CAgB1C,CAAC;AAEF,MAAM,MAAM,UAAU,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,sBAAsB,GACtB,eAAe,GACf,cAAc,GACd,kBAAkB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const CABSubscriptionSection: z.ZodObject<{
3
+ name: z.ZodOptional<z.ZodString>;
4
+ sectionId: z.ZodDefault<z.ZodUUID>;
5
+ sectionType: z.ZodDefault<z.ZodLiteral<"subscription">>;
6
+ }, z.core.$strict>;
7
+ export type CABSubscriptionSection = z.infer<typeof CABSubscriptionSection>;
8
+ //# sourceMappingURL=subscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/schema/subscription.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;;;;kBAIjC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const CABTableSection: z.ZodObject<{
3
+ name: z.ZodOptional<z.ZodString>;
4
+ sectionId: z.ZodDefault<z.ZodUUID>;
5
+ sectionType: z.ZodDefault<z.ZodLiteral<"table">>;
6
+ }, z.core.$strict>;
7
+ export type CABTableSection = z.infer<typeof CABTableSection>;
8
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/schema/table.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,eAAe;;;;kBAI1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { z } from 'zod';
2
+ export declare const TiptapText: z.ZodObject<{
3
+ marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ type: z.ZodLiteral<"bold">;
5
+ }, z.core.$strict>, z.ZodObject<{
6
+ type: z.ZodLiteral<"italic">;
7
+ }, z.core.$strict>, z.ZodObject<{
8
+ attrs: z.ZodObject<{
9
+ class: z.ZodNullable<z.ZodString>;
10
+ href: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
11
+ rel: z.ZodDefault<z.ZodString>;
12
+ target: z.ZodDefault<z.ZodString>;
13
+ }, z.core.$strict>;
14
+ type: z.ZodLiteral<"link">;
15
+ }, z.core.$strict>, z.ZodObject<{
16
+ type: z.ZodLiteral<"strike">;
17
+ }, z.core.$strict>, z.ZodObject<{
18
+ attrs: z.ZodObject<{
19
+ color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"base" | "subdued" | "accent" | "decorative" | "success" | "warning" | "critical" | undefined, string>>>>;
20
+ fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | undefined, string>>>>;
21
+ }, z.core.$strict>;
22
+ type: z.ZodLiteral<"textStyle">;
23
+ }, z.core.$strict>], "type">>>;
24
+ text: z.ZodDefault<z.ZodString>;
25
+ type: z.ZodDefault<z.ZodLiteral<"text">>;
26
+ }, z.core.$strict>;
27
+ export type TiptapText = z.infer<typeof TiptapText>;
28
+ export declare const TiptapParagraph: z.ZodObject<{
29
+ attrs: z.ZodDefault<z.ZodObject<{
30
+ textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
31
+ }, z.core.$strict>>;
32
+ content: z.ZodDefault<z.ZodArray<z.ZodObject<{
33
+ marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
34
+ type: z.ZodLiteral<"bold">;
35
+ }, z.core.$strict>, z.ZodObject<{
36
+ type: z.ZodLiteral<"italic">;
37
+ }, z.core.$strict>, z.ZodObject<{
38
+ attrs: z.ZodObject<{
39
+ class: z.ZodNullable<z.ZodString>;
40
+ href: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
41
+ rel: z.ZodDefault<z.ZodString>;
42
+ target: z.ZodDefault<z.ZodString>;
43
+ }, z.core.$strict>;
44
+ type: z.ZodLiteral<"link">;
45
+ }, z.core.$strict>, z.ZodObject<{
46
+ type: z.ZodLiteral<"strike">;
47
+ }, z.core.$strict>, z.ZodObject<{
48
+ attrs: z.ZodObject<{
49
+ color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"base" | "subdued" | "accent" | "decorative" | "success" | "warning" | "critical" | undefined, string>>>>;
50
+ fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | undefined, string>>>>;
51
+ }, z.core.$strict>;
52
+ type: z.ZodLiteral<"textStyle">;
53
+ }, z.core.$strict>], "type">>>;
54
+ text: z.ZodDefault<z.ZodString>;
55
+ type: z.ZodDefault<z.ZodLiteral<"text">>;
56
+ }, z.core.$strict>>>;
57
+ type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
58
+ }, z.core.$strict>;
59
+ export type TiptapParagraph = z.infer<typeof TiptapParagraph>;
60
+ export declare const TiptapDocument: z.ZodObject<{
61
+ attrs: z.ZodDefault<z.ZodObject<{
62
+ blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
63
+ }, z.core.$strict>>;
64
+ content: z.ZodDefault<z.ZodArray<z.ZodObject<{
65
+ attrs: z.ZodDefault<z.ZodObject<{
66
+ textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
67
+ }, z.core.$strict>>;
68
+ content: z.ZodDefault<z.ZodArray<z.ZodObject<{
69
+ marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
70
+ type: z.ZodLiteral<"bold">;
71
+ }, z.core.$strict>, z.ZodObject<{
72
+ type: z.ZodLiteral<"italic">;
73
+ }, z.core.$strict>, z.ZodObject<{
74
+ attrs: z.ZodObject<{
75
+ class: z.ZodNullable<z.ZodString>;
76
+ href: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
77
+ rel: z.ZodDefault<z.ZodString>;
78
+ target: z.ZodDefault<z.ZodString>;
79
+ }, z.core.$strict>;
80
+ type: z.ZodLiteral<"link">;
81
+ }, z.core.$strict>, z.ZodObject<{
82
+ type: z.ZodLiteral<"strike">;
83
+ }, z.core.$strict>, z.ZodObject<{
84
+ attrs: z.ZodObject<{
85
+ color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"base" | "subdued" | "accent" | "decorative" | "success" | "warning" | "critical" | undefined, string>>>>;
86
+ fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | undefined, string>>>>;
87
+ }, z.core.$strict>;
88
+ type: z.ZodLiteral<"textStyle">;
89
+ }, z.core.$strict>], "type">>>;
90
+ text: z.ZodDefault<z.ZodString>;
91
+ type: z.ZodDefault<z.ZodLiteral<"text">>;
92
+ }, z.core.$strict>>>;
93
+ type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
94
+ }, z.core.$strict>>>;
95
+ type: z.ZodDefault<z.ZodLiteral<"doc">>;
96
+ }, z.core.$strict>;
97
+ export type TiptapDocument = z.infer<typeof TiptapDocument>;
98
+ export declare const CABTextSection: z.ZodObject<{
99
+ buttonField: z.ZodOptional<z.ZodEnum<{
100
+ declineAllOffers: "declineAllOffers";
101
+ declineOffer: "declineOffer";
102
+ removeFromCart: "removeFromCart";
103
+ showVariants: "showVariants";
104
+ addedToCart: "addedToCart";
105
+ addingToCart: "addingToCart";
106
+ addToCart: "addToCart";
107
+ buttonLabel: "buttonLabel";
108
+ destinationUrl: "destinationUrl";
109
+ payNow: "payNow";
110
+ showVariant: "showVariant";
111
+ soldOut: "soldOut";
112
+ switchToOneTimeAction: "switchToOneTimeAction";
113
+ switchToOneTimePurchase: "switchToOneTimePurchase";
114
+ switchToSubscriptionAction: "switchToSubscriptionAction";
115
+ switchToSubscriptionNoDiscount: "switchToSubscriptionNoDiscount";
116
+ switchToSubscriptionWithDiscount: "switchToSubscriptionWithDiscount";
117
+ }>>;
118
+ content: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
119
+ attrs: z.ZodDefault<z.ZodObject<{
120
+ blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
121
+ }, z.core.$strict>>;
122
+ content: z.ZodDefault<z.ZodArray<z.ZodObject<{
123
+ attrs: z.ZodDefault<z.ZodObject<{
124
+ textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
125
+ }, z.core.$strict>>;
126
+ content: z.ZodDefault<z.ZodArray<z.ZodObject<{
127
+ marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
128
+ type: z.ZodLiteral<"bold">;
129
+ }, z.core.$strict>, z.ZodObject<{
130
+ type: z.ZodLiteral<"italic">;
131
+ }, z.core.$strict>, z.ZodObject<{
132
+ attrs: z.ZodObject<{
133
+ class: z.ZodNullable<z.ZodString>;
134
+ href: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
135
+ rel: z.ZodDefault<z.ZodString>;
136
+ target: z.ZodDefault<z.ZodString>;
137
+ }, z.core.$strict>;
138
+ type: z.ZodLiteral<"link">;
139
+ }, z.core.$strict>, z.ZodObject<{
140
+ type: z.ZodLiteral<"strike">;
141
+ }, z.core.$strict>, z.ZodObject<{
142
+ attrs: z.ZodObject<{
143
+ color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"base" | "subdued" | "accent" | "decorative" | "success" | "warning" | "critical" | undefined, string>>>>;
144
+ fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | undefined, string>>>>;
145
+ }, z.core.$strict>;
146
+ type: z.ZodLiteral<"textStyle">;
147
+ }, z.core.$strict>], "type">>>;
148
+ text: z.ZodDefault<z.ZodString>;
149
+ type: z.ZodDefault<z.ZodLiteral<"text">>;
150
+ }, z.core.$strict>>>;
151
+ type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
152
+ }, z.core.$strict>>>;
153
+ type: z.ZodDefault<z.ZodLiteral<"doc">>;
154
+ }, z.core.$strict>]>>>>>;
155
+ name: z.ZodOptional<z.ZodString>;
156
+ sectionId: z.ZodDefault<z.ZodUUID>;
157
+ sectionType: z.ZodDefault<z.ZodLiteral<"text">>;
158
+ }, z.core.$strict>;
159
+ export type CABTextSection = z.infer<typeof CABTextSection>;
160
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/schema/text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;kBA4BrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQ1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6BrB,CAAC;AAEP,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type TiptapDocument } from '~/schema/text';
2
+ export declare const isHTML: (html?: string | undefined) => boolean;
3
+ export declare const hasHTMLInDoc: (doc: TiptapDocument) => boolean;
4
+ export declare const checkForHTML: (input: string | TiptapDocument) => boolean;
5
+ export declare const NO_HTML: {
6
+ message: string;
7
+ };
8
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/schema/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,MAAM,GAAI,OAAM,MAAM,GAAG,SAAc,KAAG,OAWtD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,KAAK,cAAc,KAAG,OACiC,CAAC;AAErF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,GAAG,cAAc,KAAG,OAC8C,CAAC;AAE7G,eAAO,MAAM,OAAO;;CAAuC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const CABVariantsSection: z.ZodObject<{
3
+ name: z.ZodOptional<z.ZodString>;
4
+ sectionId: z.ZodDefault<z.ZodUUID>;
5
+ sectionType: z.ZodDefault<z.ZodLiteral<"variants">>;
6
+ selector: z.ZodDefault<z.ZodEnum<{
7
+ button: "button";
8
+ image: "image";
9
+ menu: "menu";
10
+ radio: "radio";
11
+ color: "color";
12
+ }>>;
13
+ }, z.core.$strict>;
14
+ export type CABVariantsSection = z.infer<typeof CABVariantsSection>;
15
+ //# sourceMappingURL=variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/schema/variants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;kBAK7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebuy/rebuy",
3
3
  "description": "This is the default library for Rebuy",
4
- "version": "2.0.2",
4
+ "version": "2.2.0-rc.1",
5
5
  "license": "MIT",
6
6
  "author": "Rebuy, Inc.",
7
7
  "type": "module",
@@ -14,6 +14,10 @@
14
14
  "import": "./dist/index.mjs",
15
15
  "require": "./dist/index.js"
16
16
  },
17
+ "./schema": {
18
+ "types": "./dist/schema/index.d.ts",
19
+ "import": "./dist/schema/index.mjs"
20
+ },
17
21
  "./utilities": {
18
22
  "types": "./dist/utilities.d.ts",
19
23
  "import": "./dist/index.mjs",
@@ -53,14 +57,6 @@
53
57
  "config": ".cz-config.cjs"
54
58
  }
55
59
  },
56
- "repository": {
57
- "type": "git",
58
- "url": "git+ssh://git@bitbucket.org/rebuyengine/npm-rebuy.git"
59
- },
60
- "bugs": {
61
- "url": "https://bitbucket.org/rebuyengine/npm-rebuy/issues"
62
- },
63
- "homepage": "https://bitbucket.org/rebuyengine/npm-rebuy#readme",
64
60
  "devDependencies": {
65
61
  "@commitlint/cli": "^19.8.1",
66
62
  "@commitlint/config-conventional": "^19.8.1",
@@ -68,6 +64,7 @@
68
64
  "@semantic-release/commit-analyzer": "^13.0.1",
69
65
  "@semantic-release/exec": "^7.1.0",
70
66
  "@semantic-release/release-notes-generator": "^14.0.3",
67
+ "@types/lodash-es": "^4.17.12",
71
68
  "@typescript-eslint/eslint-plugin": "^8.33.1",
72
69
  "@typescript-eslint/parser": "^8.33.1",
73
70
  "concurrently": "^9.1.2",
@@ -92,5 +89,10 @@
92
89
  "semantic-release": "^24.2.5",
93
90
  "sort-package-json": "^3.2.1",
94
91
  "typescript": "^5.8.3"
92
+ },
93
+ "dependencies": {
94
+ "lodash-es": "^4.17.22",
95
+ "uuid": "^13.0.0",
96
+ "zod": "^4.2.1"
95
97
  }
96
98
  }