@rebuy/rebuy 2.2.0-rc.5 → 2.2.0-rc.7

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,3 +1,4 @@
1
+ import { type FieldArrayPath } from 'react-hook-form';
1
2
  import { z, type ZodType } from 'zod/v4';
2
3
  import { CABButtonSection } from './button';
3
4
  import { CABDataSourceSection } from './data-source';
@@ -8,6 +9,7 @@ import { CABProductSection } from './product';
8
9
  import { CABProductsSection } from './products';
9
10
  import { CABQuantitySection } from './quantity';
10
11
  import { CABReviewsSection } from './reviews';
12
+ import { type CABRootSection } from './root';
11
13
  import { CABSubscriptionSection } from './subscription';
12
14
  import { CABTableSection } from './table';
13
15
  import { CABTextSection } from './text';
@@ -31,8 +33,46 @@ export declare const CABBorder: z.ZodDefault<z.ZodObject<{
31
33
  medium: "medium";
32
34
  thick: "thick";
33
35
  }>>;
34
- }, z.core.$strict>>;
36
+ }, z.core.$strip>>;
35
37
  export type CABBorder = z.infer<typeof CABBorder>;
36
38
  export declare const CABSection: ZodType<CABSection>;
37
39
  export type CABSection = CABButtonSection | CABDataSourceSection | CABImageSection | CABLayoutSection | CABOffersSection | CABProductSection | CABProductsSection | CABQuantitySection | CABReviewsSection | CABSubscriptionSection | CABTableSection | CABTextSection | CABVariantsSection;
40
+ export type SectionId = CABSection['sectionId'];
41
+ export type SectionArrayPath = FieldArrayPath<CABRootSection>;
42
+ export type SectionPrefixPath = `${SectionArrayPath}.${number}` | null;
43
+ export type SectionDetails = {
44
+ /**
45
+ * The full React Hook Form dot-notation path to the section object itself,
46
+ * for use with `register` or `control`, e.g. `sections.0.sections.1`.
47
+ *
48
+ * Returns `null` for the root section.
49
+ */
50
+ fieldArrayPath: SectionArrayPath | null;
51
+ /**
52
+ * The index of the found section within its parent `sections` array.
53
+ *
54
+ * Returns `null` for the root section.
55
+ */
56
+ index: number | null;
57
+ /**
58
+ * The parent `sections` object.
59
+ *
60
+ * Returns `null` for the root section.
61
+ */
62
+ parent: CABSection[] | null;
63
+ /**
64
+ * The parent `sectionId`.
65
+ *
66
+ * Returns `undefined` for the root section.
67
+ */
68
+ parentId: SectionId | undefined;
69
+ /**
70
+ * The full React Hook Form dot-notation path to the section object itself,
71
+ * for use with `register` or `control`, e.g. `sections.0.sections.1`.
72
+ *
73
+ * Returns `null` for the root section.
74
+ */
75
+ prefixPath: SectionPrefixPath | null;
76
+ };
77
+ export type CABSectionProps = CABSection & SectionDetails;
38
78
  //# sourceMappingURL=shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/schema/shared.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;mBAUhB,CAAC;AAEP,MAAM,MAAM,SAAS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AAY,CAAC;AAEhD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;kBAUhB,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;AAEzB,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AAGhD,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG,GAAG,gBAAgB,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC;AAEvE,MAAM,MAAM,cAAc,GAAG;IACzB;;;;;OAKG;IACH,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxC;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;;OAIG;IACH,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,cAAc,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { z } from 'zod/v4';
2
+ import { type SectionDetails } from './shared';
2
3
  export declare const CABSubscriptionSection: z.ZodObject<{
3
4
  name: z.ZodOptional<z.ZodString>;
4
5
  sectionId: z.ZodDefault<z.ZodUUID>;
5
6
  sectionType: z.ZodDefault<z.ZodLiteral<"subscription">>;
6
- }, z.core.$strict>;
7
+ }, z.core.$strip>;
7
8
  export type CABSubscriptionSection = z.infer<typeof CABSubscriptionSection>;
9
+ export type CABSubscriptionSectionProps = CABSubscriptionSection & SectionDetails;
8
10
  //# sourceMappingURL=subscription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/schema/subscription.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,eAAO,MAAM,sBAAsB;;;;kBAIjC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/schema/subscription.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,GAAG,cAAc,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { z } from 'zod/v4';
2
+ import { type SectionDetails } from './shared';
2
3
  export declare const CABTableSection: z.ZodObject<{
3
4
  name: z.ZodOptional<z.ZodString>;
4
5
  sectionId: z.ZodDefault<z.ZodUUID>;
5
6
  sectionType: z.ZodDefault<z.ZodLiteral<"table">>;
6
- }, z.core.$strict>;
7
+ }, z.core.$strip>;
7
8
  export type CABTableSection = z.infer<typeof CABTableSection>;
9
+ export type CABTableSectionProps = CABTableSection & SectionDetails;
8
10
  //# sourceMappingURL=table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/schema/table.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,eAAO,MAAM,eAAe;;;;kBAI1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/schema/table.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,eAAe;;;;iBAI1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG,cAAc,CAAC"}
@@ -1,99 +1,100 @@
1
1
  import { z } from 'zod/v4';
2
+ import { type SectionDetails } from './shared';
2
3
  export declare const TiptapText: z.ZodObject<{
3
4
  marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
4
5
  type: z.ZodLiteral<"bold">;
5
- }, z.core.$strict>, z.ZodObject<{
6
+ }, z.core.$strip>, z.ZodObject<{
6
7
  type: z.ZodLiteral<"italic">;
7
- }, z.core.$strict>, z.ZodObject<{
8
+ }, z.core.$strip>, z.ZodObject<{
8
9
  attrs: z.ZodObject<{
9
10
  class: z.ZodNullable<z.ZodString>;
10
11
  href: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
11
12
  rel: z.ZodDefault<z.ZodString>;
12
13
  target: z.ZodDefault<z.ZodString>;
13
- }, z.core.$strict>;
14
+ }, z.core.$strip>;
14
15
  type: z.ZodLiteral<"link">;
15
- }, z.core.$strict>, z.ZodObject<{
16
+ }, z.core.$strip>, z.ZodObject<{
16
17
  type: z.ZodLiteral<"strike">;
17
- }, z.core.$strict>, z.ZodObject<{
18
+ }, z.core.$strip>, z.ZodObject<{
18
19
  attrs: z.ZodObject<{
19
20
  color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"base" | "subdued" | "accent" | "decorative" | "success" | "warning" | "critical" | undefined, string>>>>;
20
21
  fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | undefined, string>>>>;
21
- }, z.core.$strict>;
22
+ }, z.core.$strip>;
22
23
  type: z.ZodLiteral<"textStyle">;
23
- }, z.core.$strict>]>>>;
24
+ }, z.core.$strip>]>>>;
24
25
  text: z.ZodDefault<z.ZodString>;
25
26
  type: z.ZodDefault<z.ZodLiteral<"text">>;
26
- }, z.core.$strict>;
27
+ }, z.core.$strip>;
27
28
  export type TiptapText = z.infer<typeof TiptapText>;
28
29
  export declare const TiptapParagraph: z.ZodObject<{
29
30
  attrs: z.ZodDefault<z.ZodObject<{
30
31
  textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
31
- }, z.core.$strict>>;
32
+ }, z.core.$strip>>;
32
33
  content: z.ZodDefault<z.ZodArray<z.ZodObject<{
33
34
  marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
34
35
  type: z.ZodLiteral<"bold">;
35
- }, z.core.$strict>, z.ZodObject<{
36
+ }, z.core.$strip>, z.ZodObject<{
36
37
  type: z.ZodLiteral<"italic">;
37
- }, z.core.$strict>, z.ZodObject<{
38
+ }, z.core.$strip>, z.ZodObject<{
38
39
  attrs: z.ZodObject<{
39
40
  class: z.ZodNullable<z.ZodString>;
40
41
  href: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
41
42
  rel: z.ZodDefault<z.ZodString>;
42
43
  target: z.ZodDefault<z.ZodString>;
43
- }, z.core.$strict>;
44
+ }, z.core.$strip>;
44
45
  type: z.ZodLiteral<"link">;
45
- }, z.core.$strict>, z.ZodObject<{
46
+ }, z.core.$strip>, z.ZodObject<{
46
47
  type: z.ZodLiteral<"strike">;
47
- }, z.core.$strict>, z.ZodObject<{
48
+ }, z.core.$strip>, z.ZodObject<{
48
49
  attrs: z.ZodObject<{
49
50
  color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"base" | "subdued" | "accent" | "decorative" | "success" | "warning" | "critical" | undefined, string>>>>;
50
51
  fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | undefined, string>>>>;
51
- }, z.core.$strict>;
52
+ }, z.core.$strip>;
52
53
  type: z.ZodLiteral<"textStyle">;
53
- }, z.core.$strict>]>>>;
54
+ }, z.core.$strip>]>>>;
54
55
  text: z.ZodDefault<z.ZodString>;
55
56
  type: z.ZodDefault<z.ZodLiteral<"text">>;
56
- }, z.core.$strict>>>;
57
+ }, z.core.$strip>>>;
57
58
  type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
58
- }, z.core.$strict>;
59
+ }, z.core.$strip>;
59
60
  export type TiptapParagraph = z.infer<typeof TiptapParagraph>;
60
61
  export declare const TiptapDocument: z.ZodObject<{
61
62
  attrs: z.ZodDefault<z.ZodObject<{
62
63
  blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
63
- }, z.core.$strict>>;
64
+ }, z.core.$strip>>;
64
65
  content: z.ZodDefault<z.ZodArray<z.ZodObject<{
65
66
  attrs: z.ZodDefault<z.ZodObject<{
66
67
  textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
67
- }, z.core.$strict>>;
68
+ }, z.core.$strip>>;
68
69
  content: z.ZodDefault<z.ZodArray<z.ZodObject<{
69
70
  marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
70
71
  type: z.ZodLiteral<"bold">;
71
- }, z.core.$strict>, z.ZodObject<{
72
+ }, z.core.$strip>, z.ZodObject<{
72
73
  type: z.ZodLiteral<"italic">;
73
- }, z.core.$strict>, z.ZodObject<{
74
+ }, z.core.$strip>, z.ZodObject<{
74
75
  attrs: z.ZodObject<{
75
76
  class: z.ZodNullable<z.ZodString>;
76
77
  href: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
77
78
  rel: z.ZodDefault<z.ZodString>;
78
79
  target: z.ZodDefault<z.ZodString>;
79
- }, z.core.$strict>;
80
+ }, z.core.$strip>;
80
81
  type: z.ZodLiteral<"link">;
81
- }, z.core.$strict>, z.ZodObject<{
82
+ }, z.core.$strip>, z.ZodObject<{
82
83
  type: z.ZodLiteral<"strike">;
83
- }, z.core.$strict>, z.ZodObject<{
84
+ }, z.core.$strip>, z.ZodObject<{
84
85
  attrs: z.ZodObject<{
85
86
  color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"base" | "subdued" | "accent" | "decorative" | "success" | "warning" | "critical" | undefined, string>>>>;
86
87
  fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | undefined, string>>>>;
87
- }, z.core.$strict>;
88
+ }, z.core.$strip>;
88
89
  type: z.ZodLiteral<"textStyle">;
89
- }, z.core.$strict>]>>>;
90
+ }, z.core.$strip>]>>>;
90
91
  text: z.ZodDefault<z.ZodString>;
91
92
  type: z.ZodDefault<z.ZodLiteral<"text">>;
92
- }, z.core.$strict>>>;
93
+ }, z.core.$strip>>>;
93
94
  type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
94
- }, z.core.$strict>>>;
95
+ }, z.core.$strip>>>;
95
96
  type: z.ZodDefault<z.ZodLiteral<"doc">>;
96
- }, z.core.$strict>;
97
+ }, z.core.$strip>;
97
98
  export type TiptapDocument = z.infer<typeof TiptapDocument>;
98
99
  export declare const CABTextSection: z.ZodObject<{
99
100
  buttonField: z.ZodOptional<z.ZodEnum<{
@@ -118,43 +119,44 @@ export declare const CABTextSection: z.ZodObject<{
118
119
  content: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
119
120
  attrs: z.ZodDefault<z.ZodObject<{
120
121
  blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
121
- }, z.core.$strict>>;
122
+ }, z.core.$strip>>;
122
123
  content: z.ZodDefault<z.ZodArray<z.ZodObject<{
123
124
  attrs: z.ZodDefault<z.ZodObject<{
124
125
  textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
125
- }, z.core.$strict>>;
126
+ }, z.core.$strip>>;
126
127
  content: z.ZodDefault<z.ZodArray<z.ZodObject<{
127
128
  marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
128
129
  type: z.ZodLiteral<"bold">;
129
- }, z.core.$strict>, z.ZodObject<{
130
+ }, z.core.$strip>, z.ZodObject<{
130
131
  type: z.ZodLiteral<"italic">;
131
- }, z.core.$strict>, z.ZodObject<{
132
+ }, z.core.$strip>, z.ZodObject<{
132
133
  attrs: z.ZodObject<{
133
134
  class: z.ZodNullable<z.ZodString>;
134
135
  href: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
135
136
  rel: z.ZodDefault<z.ZodString>;
136
137
  target: z.ZodDefault<z.ZodString>;
137
- }, z.core.$strict>;
138
+ }, z.core.$strip>;
138
139
  type: z.ZodLiteral<"link">;
139
- }, z.core.$strict>, z.ZodObject<{
140
+ }, z.core.$strip>, z.ZodObject<{
140
141
  type: z.ZodLiteral<"strike">;
141
- }, z.core.$strict>, z.ZodObject<{
142
+ }, z.core.$strip>, z.ZodObject<{
142
143
  attrs: z.ZodObject<{
143
144
  color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"base" | "subdued" | "accent" | "decorative" | "success" | "warning" | "critical" | undefined, string>>>>;
144
145
  fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | undefined, string>>>>;
145
- }, z.core.$strict>;
146
+ }, z.core.$strip>;
146
147
  type: z.ZodLiteral<"textStyle">;
147
- }, z.core.$strict>]>>>;
148
+ }, z.core.$strip>]>>>;
148
149
  text: z.ZodDefault<z.ZodString>;
149
150
  type: z.ZodDefault<z.ZodLiteral<"text">>;
150
- }, z.core.$strict>>>;
151
+ }, z.core.$strip>>>;
151
152
  type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
152
- }, z.core.$strict>>>;
153
+ }, z.core.$strip>>>;
153
154
  type: z.ZodDefault<z.ZodLiteral<"doc">>;
154
- }, z.core.$strict>]>>>>>;
155
+ }, z.core.$strip>]>>>>>;
155
156
  name: z.ZodOptional<z.ZodString>;
156
157
  sectionId: z.ZodDefault<z.ZodUUID>;
157
158
  sectionType: z.ZodDefault<z.ZodLiteral<"text">>;
158
- }, z.core.$strict>;
159
+ }, z.core.$strip>;
159
160
  export type CABTextSection = z.infer<typeof CABTextSection>;
161
+ export type CABTextSectionProps = CABTextSection & SectionDetails;
160
162
  //# sourceMappingURL=text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/schema/text.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAwB3B,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;kBA4BrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,cAAc,CAAC"}
@@ -1,8 +1,33 @@
1
- import { type TiptapDocument } from './text';
1
+ import { type CABButtonSection } from './button';
2
+ import { type CABDataSourceSection } from './data-source';
3
+ import { type CABImageSection } from './image';
4
+ import { type CABLayoutSection } from './layout';
5
+ import { type CABOffersSection } from './offers';
6
+ import { type CABProductSection } from './product';
7
+ import { type CABProductsSection } from './products';
8
+ import { type CABQuantitySection } from './quantity';
9
+ import { type CABReviewsSection } from './reviews';
10
+ import { type CABSubscriptionSection } from './subscription';
11
+ import { type CABTableSection } from './table';
12
+ import { type CABTextSection, type TiptapDocument } from './text';
13
+ import { type CABVariantsSection } from './variants';
2
14
  export declare const isHTML: (html?: string | undefined) => boolean;
3
15
  export declare const hasHTMLInDoc: (doc: TiptapDocument) => boolean;
4
16
  export declare const checkForHTML: (input: string | TiptapDocument) => boolean;
5
17
  export declare const NO_HTML: {
6
18
  message: string;
7
19
  };
20
+ export declare const isButtonType: (section: unknown) => section is CABButtonSection;
21
+ export declare const isDataSourceType: (section: unknown) => section is CABDataSourceSection;
22
+ export declare const isImageType: (section: unknown) => section is CABImageSection;
23
+ export declare const isLayoutType: (section: unknown) => section is CABLayoutSection;
24
+ export declare const isOffersType: (section: unknown) => section is CABOffersSection;
25
+ export declare const isProductType: (section: unknown) => section is CABProductSection;
26
+ export declare const isProductsType: (section: unknown) => section is CABProductsSection;
27
+ export declare const isQuantityType: (section: unknown) => section is CABQuantitySection;
28
+ export declare const isReviewsType: (section: unknown) => section is CABReviewsSection;
29
+ export declare const isSubscriptionType: (section: unknown) => section is CABSubscriptionSection;
30
+ export declare const isTableType: (section: unknown) => section is CABTableSection;
31
+ export declare const isTextType: (section: unknown) => section is CABTextSection;
32
+ export declare const isVariantsType: (section: unknown) => section is CABVariantsSection;
8
33
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/schema/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,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"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/schema/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,eAAO,MAAM,MAAM,GAAI,OA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';
2
3
  export declare const CABVariantsSection: z.ZodObject<{
3
4
  name: z.ZodOptional<z.ZodString>;
4
5
  sectionId: z.ZodDefault<z.ZodUUID>;
@@ -10,6 +11,7 @@ export declare const CABVariantsSection: z.ZodObject<{
10
11
  radio: "radio";
11
12
  color: "color";
12
13
  }>>;
13
- }, z.core.$strict>;
14
+ }, z.core.$strip>;
14
15
  export type CABVariantsSection = z.infer<typeof CABVariantsSection>;
16
+ export type CABVariantsSectionProps = CABVariantsSection & SectionDetails;
15
17
  //# sourceMappingURL=variants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/schema/variants.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,eAAO,MAAM,kBAAkB;;;;;;;;;;;kBAK7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/schema/variants.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,kBAAkB;;;;;;;;;;;iBAK7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GAAG,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.2.0-rc.5",
4
+ "version": "2.2.0-rc.7",
5
5
  "license": "MIT",
6
6
  "author": "Rebuy, Inc.",
7
7
  "type": "module",
@@ -82,6 +82,7 @@
82
82
  "husky": "^9.1.7",
83
83
  "lint-staged": "^15.5.0",
84
84
  "prettier": "^3.5.3",
85
+ "react-hook-form": "^7.69.0",
85
86
  "semantic-release": "^24.2.5",
86
87
  "sort-package-json": "^3.2.1",
87
88
  "typescript": "^5.8.3"