@prismicio/client 7.0.0-alpha.5 → 7.0.1-alpha.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 (231) hide show
  1. package/dist/buildQueryURL.cjs.map +1 -1
  2. package/dist/buildQueryURL.d.ts +15 -14
  3. package/dist/buildQueryURL.js.map +1 -1
  4. package/dist/createClient.cjs +63 -30
  5. package/dist/createClient.cjs.map +1 -1
  6. package/dist/createClient.d.ts +95 -48
  7. package/dist/createClient.js +63 -30
  8. package/dist/createClient.js.map +1 -1
  9. package/dist/filter.cjs +39 -39
  10. package/dist/filter.cjs.map +1 -1
  11. package/dist/filter.d.ts +39 -39
  12. package/dist/filter.js +39 -39
  13. package/dist/filter.js.map +1 -1
  14. package/dist/getGraphQLEndpoint.cjs.map +1 -1
  15. package/dist/getGraphQLEndpoint.d.ts +1 -0
  16. package/dist/getGraphQLEndpoint.js.map +1 -1
  17. package/dist/getRepositoryEndpoint.cjs.map +1 -1
  18. package/dist/getRepositoryEndpoint.d.ts +2 -0
  19. package/dist/getRepositoryEndpoint.js.map +1 -1
  20. package/dist/getRepositoryName.cjs.map +1 -1
  21. package/dist/getRepositoryName.d.ts +1 -0
  22. package/dist/getRepositoryName.js.map +1 -1
  23. package/dist/getToolbarSrc.cjs.map +1 -1
  24. package/dist/getToolbarSrc.d.ts +1 -1
  25. package/dist/getToolbarSrc.js.map +1 -1
  26. package/dist/helpers/asDate.cjs.map +1 -1
  27. package/dist/helpers/asDate.d.ts +3 -2
  28. package/dist/helpers/asDate.js.map +1 -1
  29. package/dist/helpers/asHTML.cjs.map +1 -1
  30. package/dist/helpers/asHTML.d.ts +34 -28
  31. package/dist/helpers/asHTML.js.map +1 -1
  32. package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
  33. package/dist/helpers/asImagePixelDensitySrcSet.d.ts +5 -5
  34. package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
  35. package/dist/helpers/asImageSrc.cjs.map +1 -1
  36. package/dist/helpers/asImageSrc.d.ts +3 -3
  37. package/dist/helpers/asImageSrc.js.map +1 -1
  38. package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
  39. package/dist/helpers/asImageWidthSrcSet.d.ts +6 -6
  40. package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
  41. package/dist/helpers/asLink.cjs.map +1 -1
  42. package/dist/helpers/asLink.d.ts +32 -23
  43. package/dist/helpers/asLink.js.map +1 -1
  44. package/dist/helpers/asLinkAttrs.cjs.map +1 -1
  45. package/dist/helpers/asLinkAttrs.d.ts +12 -7
  46. package/dist/helpers/asLinkAttrs.js.map +1 -1
  47. package/dist/helpers/asText.cjs.map +1 -1
  48. package/dist/helpers/asText.d.ts +18 -14
  49. package/dist/helpers/asText.js.map +1 -1
  50. package/dist/helpers/documentToLinkField.cjs.map +1 -1
  51. package/dist/helpers/documentToLinkField.d.ts +2 -0
  52. package/dist/helpers/documentToLinkField.js.map +1 -1
  53. package/dist/helpers/isFilled.cjs +3 -1
  54. package/dist/helpers/isFilled.cjs.map +1 -1
  55. package/dist/helpers/isFilled.d.ts +24 -20
  56. package/dist/helpers/isFilled.js +3 -1
  57. package/dist/helpers/isFilled.js.map +1 -1
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.d.ts +13 -3
  60. package/dist/index.js.map +1 -1
  61. package/dist/lib/appendFilters.cjs.map +1 -1
  62. package/dist/lib/appendFilters.d.ts +4 -4
  63. package/dist/lib/appendFilters.js.map +1 -1
  64. package/dist/lib/castArray.cjs.map +1 -1
  65. package/dist/lib/castArray.d.ts +1 -0
  66. package/dist/lib/castArray.js.map +1 -1
  67. package/dist/lib/castThunk.cjs.map +1 -1
  68. package/dist/lib/castThunk.d.ts +2 -1
  69. package/dist/lib/castThunk.js.map +1 -1
  70. package/dist/lib/everyTagFilter.cjs.map +1 -1
  71. package/dist/lib/everyTagFilter.d.ts +2 -2
  72. package/dist/lib/everyTagFilter.js.map +1 -1
  73. package/dist/lib/findMasterRef.cjs.map +1 -1
  74. package/dist/lib/findMasterRef.d.ts +1 -0
  75. package/dist/lib/findMasterRef.js.map +1 -1
  76. package/dist/lib/findRef.cjs.map +1 -1
  77. package/dist/lib/findRef.d.ts +3 -2
  78. package/dist/lib/findRef.js.map +1 -1
  79. package/dist/lib/findRefByID.cjs.map +1 -1
  80. package/dist/lib/findRefByID.d.ts +1 -0
  81. package/dist/lib/findRefByID.js.map +1 -1
  82. package/dist/lib/findRefByLabel.cjs.map +1 -1
  83. package/dist/lib/findRefByLabel.d.ts +1 -0
  84. package/dist/lib/findRefByLabel.js.map +1 -1
  85. package/dist/package.json.cjs +1 -1
  86. package/dist/package.json.js +1 -1
  87. package/dist/types/api/query.d.ts +1 -0
  88. package/dist/types/api/release.d.ts +1 -0
  89. package/dist/types/api/repository.d.ts +2 -2
  90. package/dist/types/api/tags.d.ts +1 -0
  91. package/dist/types/model/boolean.d.ts +1 -1
  92. package/dist/types/model/color.d.ts +1 -1
  93. package/dist/types/model/contentRelationship.d.ts +2 -3
  94. package/dist/types/model/customType.d.ts +11 -11
  95. package/dist/types/model/date.d.ts +1 -1
  96. package/dist/types/model/embed.d.ts +1 -1
  97. package/dist/types/model/geoPoint.d.ts +1 -1
  98. package/dist/types/model/group.d.ts +1 -1
  99. package/dist/types/model/image.d.ts +3 -3
  100. package/dist/types/model/{integrationFields.d.ts → integration.d.ts} +3 -3
  101. package/dist/types/model/keyText.d.ts +1 -1
  102. package/dist/types/model/link.cjs.map +1 -1
  103. package/dist/types/model/link.d.ts +4 -6
  104. package/dist/types/model/link.js.map +1 -1
  105. package/dist/types/model/linkToMedia.d.ts +2 -3
  106. package/dist/types/model/number.d.ts +1 -1
  107. package/dist/types/model/richText.d.ts +3 -3
  108. package/dist/types/model/select.d.ts +1 -1
  109. package/dist/types/model/sharedSlice.d.ts +2 -2
  110. package/dist/types/model/sharedSliceVariation.d.ts +1 -1
  111. package/dist/types/model/slice.cjs.map +1 -1
  112. package/dist/types/model/slice.d.ts +1 -1
  113. package/dist/types/model/slice.js.map +1 -1
  114. package/dist/types/model/sliceZone.cjs.map +1 -1
  115. package/dist/types/model/sliceZone.d.ts +2 -2
  116. package/dist/types/model/sliceZone.js.map +1 -1
  117. package/dist/types/model/timestamp.d.ts +1 -1
  118. package/dist/types/model/title.d.ts +1 -1
  119. package/dist/types/model/types.cjs +5 -1
  120. package/dist/types/model/types.cjs.map +1 -1
  121. package/dist/types/model/types.d.ts +10 -6
  122. package/dist/types/model/types.js +5 -1
  123. package/dist/types/model/types.js.map +1 -1
  124. package/dist/types/model/uid.d.ts +1 -1
  125. package/dist/types/value/boolean.d.ts +1 -1
  126. package/dist/types/value/color.d.ts +2 -1
  127. package/dist/types/value/contentRelationship.d.ts +1 -1
  128. package/dist/types/value/date.d.ts +2 -1
  129. package/dist/types/value/document.d.ts +4 -4
  130. package/dist/types/value/embed.cjs.map +1 -1
  131. package/dist/types/value/embed.d.ts +2 -1
  132. package/dist/types/value/embed.js.map +1 -1
  133. package/dist/types/value/geoPoint.d.ts +2 -1
  134. package/dist/types/value/group.d.ts +1 -1
  135. package/dist/types/value/image.d.ts +5 -3
  136. package/dist/types/value/{integrationFields.d.ts → integration.d.ts} +3 -2
  137. package/dist/types/value/keyText.d.ts +2 -1
  138. package/dist/types/value/link.cjs.map +1 -1
  139. package/dist/types/value/link.d.ts +2 -2
  140. package/dist/types/value/link.js.map +1 -1
  141. package/dist/types/value/linkToMedia.d.ts +2 -2
  142. package/dist/types/value/number.d.ts +2 -1
  143. package/dist/types/value/richText.cjs.map +1 -1
  144. package/dist/types/value/richText.d.ts +26 -26
  145. package/dist/types/value/richText.js.map +1 -1
  146. package/dist/types/value/select.d.ts +2 -1
  147. package/dist/types/value/sharedSlice.d.ts +1 -1
  148. package/dist/types/value/sharedSliceVariation.d.ts +3 -0
  149. package/dist/types/value/slice.d.ts +1 -1
  150. package/dist/types/value/timestamp.d.ts +1 -1
  151. package/dist/types/value/title.d.ts +1 -1
  152. package/dist/types/value/types.d.ts +3 -2
  153. package/dist/types/webhook/apiUpdate.d.ts +1 -1
  154. package/package.json +4 -4
  155. package/src/buildQueryURL.ts +15 -14
  156. package/src/createClient.ts +112 -55
  157. package/src/filter.ts +43 -43
  158. package/src/getGraphQLEndpoint.ts +1 -0
  159. package/src/getRepositoryEndpoint.ts +2 -0
  160. package/src/getRepositoryName.ts +1 -0
  161. package/src/getToolbarSrc.ts +1 -1
  162. package/src/helpers/asDate.ts +3 -2
  163. package/src/helpers/asHTML.ts +36 -30
  164. package/src/helpers/asImagePixelDensitySrcSet.ts +5 -5
  165. package/src/helpers/asImageSrc.ts +3 -3
  166. package/src/helpers/asImageWidthSrcSet.ts +6 -6
  167. package/src/helpers/asLink.ts +36 -27
  168. package/src/helpers/asLinkAttrs.ts +12 -7
  169. package/src/helpers/asText.ts +18 -14
  170. package/src/helpers/documentToLinkField.ts +3 -1
  171. package/src/helpers/isFilled.ts +27 -22
  172. package/src/index.ts +20 -3
  173. package/src/lib/appendFilters.ts +4 -4
  174. package/src/lib/castArray.ts +1 -0
  175. package/src/lib/castThunk.ts +9 -2
  176. package/src/lib/everyTagFilter.ts +2 -2
  177. package/src/lib/findMasterRef.ts +1 -0
  178. package/src/lib/findRef.ts +3 -2
  179. package/src/lib/findRefByID.ts +1 -0
  180. package/src/lib/findRefByLabel.ts +1 -0
  181. package/src/types/api/query.ts +1 -0
  182. package/src/types/api/release.ts +1 -0
  183. package/src/types/api/repository.ts +2 -2
  184. package/src/types/api/tags.ts +1 -0
  185. package/src/types/model/boolean.ts +1 -1
  186. package/src/types/model/color.ts +1 -1
  187. package/src/types/model/contentRelationship.ts +2 -3
  188. package/src/types/model/customType.ts +11 -11
  189. package/src/types/model/date.ts +1 -1
  190. package/src/types/model/embed.ts +1 -1
  191. package/src/types/model/geoPoint.ts +1 -1
  192. package/src/types/model/group.ts +1 -1
  193. package/src/types/model/image.ts +3 -3
  194. package/src/types/model/{integrationFields.ts → integration.ts} +3 -3
  195. package/src/types/model/keyText.ts +1 -1
  196. package/src/types/model/link.ts +4 -6
  197. package/src/types/model/linkToMedia.ts +2 -3
  198. package/src/types/model/number.ts +1 -1
  199. package/src/types/model/richText.ts +3 -3
  200. package/src/types/model/select.ts +1 -1
  201. package/src/types/model/sharedSlice.ts +2 -2
  202. package/src/types/model/sharedSliceVariation.ts +1 -1
  203. package/src/types/model/slice.ts +1 -1
  204. package/src/types/model/sliceZone.ts +2 -2
  205. package/src/types/model/timestamp.ts +1 -1
  206. package/src/types/model/title.ts +1 -1
  207. package/src/types/model/types.ts +10 -6
  208. package/src/types/model/uid.ts +1 -1
  209. package/src/types/value/boolean.ts +1 -1
  210. package/src/types/value/color.ts +2 -1
  211. package/src/types/value/contentRelationship.ts +1 -1
  212. package/src/types/value/date.ts +2 -1
  213. package/src/types/value/document.ts +4 -4
  214. package/src/types/value/embed.ts +2 -1
  215. package/src/types/value/geoPoint.ts +2 -1
  216. package/src/types/value/group.ts +1 -1
  217. package/src/types/value/image.ts +6 -4
  218. package/src/types/value/{integrationFields.ts → integration.ts} +3 -2
  219. package/src/types/value/keyText.ts +2 -1
  220. package/src/types/value/link.ts +2 -2
  221. package/src/types/value/linkToMedia.ts +2 -2
  222. package/src/types/value/number.ts +2 -1
  223. package/src/types/value/richText.ts +26 -26
  224. package/src/types/value/select.ts +2 -1
  225. package/src/types/value/sharedSlice.ts +1 -1
  226. package/src/types/value/sharedSliceVariation.ts +3 -0
  227. package/src/types/value/slice.ts +1 -1
  228. package/src/types/value/timestamp.ts +1 -1
  229. package/src/types/value/title.ts +1 -1
  230. package/src/types/value/types.ts +3 -2
  231. package/src/types/webhook/apiUpdate.ts +1 -1
@@ -5,7 +5,7 @@ import type { AnyOEmbed, EmbedField } from "../types/value/embed";
5
5
  import type { GeoPointField } from "../types/value/geoPoint";
6
6
  import type { GroupField } from "../types/value/group";
7
7
  import type { ImageField, ImageFieldImage } from "../types/value/image";
8
- import type { IntegrationFields } from "../types/value/integrationFields";
8
+ import type { IntegrationField } from "../types/value/integration";
9
9
  import type { KeyTextField } from "../types/value/keyText";
10
10
  import type { LinkField } from "../types/value/link";
11
11
  import type { LinkToMediaField } from "../types/value/linkToMedia";
@@ -19,15 +19,15 @@ import type { TimestampField } from "../types/value/timestamp";
19
19
  import type { TitleField } from "../types/value/title";
20
20
  import type { AnyRegularField } from "../types/value/types";
21
21
  /**
22
- * Determines if a Rich Text field is filled.
22
+ * Determines if a rich text field is filled.
23
23
  *
24
- * @param field - Rich Text field to check.
24
+ * @param field - rich text field to check.
25
25
  *
26
26
  * @returns `true` if `field` is filled, `false` otherwise.
27
27
  */
28
28
  export declare const richText: (field: RichTextField | null | undefined) => field is [import("../types/value/richText").RTNode, ...import("../types/value/richText").RTNode[]];
29
29
  /**
30
- * Determines if a Title field is filled.
30
+ * Determines if a title field is filled.
31
31
  *
32
32
  * @param field - Title field to check.
33
33
  *
@@ -45,7 +45,7 @@ export declare const title: (field: TitleField | null | undefined) => field is [
45
45
  */
46
46
  export declare const imageThumbnail: (thumbnail: ImageFieldImage | null | undefined) => thumbnail is import("../types/value/image").FilledImageFieldImage;
47
47
  /**
48
- * Determines if an Image field is filled.
48
+ * Determines if an image field is filled.
49
49
  *
50
50
  * @param field - Image field to check.
51
51
  *
@@ -53,7 +53,7 @@ export declare const imageThumbnail: (thumbnail: ImageFieldImage | null | undefi
53
53
  */
54
54
  export declare const image: <ThumbnailNames extends string | null = never>(field: ImageField<ThumbnailNames> | null | undefined) => field is import("../types/value/types").Simplify<import("../types/value/image").FilledImageFieldImage & Record<Extract<ThumbnailNames, string>, import("../types/value/image").FilledImageFieldImage>>;
55
55
  /**
56
- * Determines if a Link field is filled.
56
+ * Determines if a link field is filled.
57
57
  *
58
58
  * @param field - Link field to check.
59
59
  *
@@ -61,15 +61,15 @@ export declare const image: <ThumbnailNames extends string | null = never>(field
61
61
  */
62
62
  export declare const link: <TypeEnum = string, LangEnum = string, DataInterface extends unknown = unknown>(field: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined) => field is import("../types/value/link").FilledLinkToWebField | import("../types/value/linkToMedia").FilledLinkToMediaField | import("../types/value/contentRelationship").FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface>;
63
63
  /**
64
- * Determines if a Link to Media field is filled.
64
+ * Determines if a link to media field is filled.
65
65
  *
66
- * @param field - Link to Media field to check.
66
+ * @param field - Link to media field to check.
67
67
  *
68
68
  * @returns `true` if `field` is filled, `false` otherwise.
69
69
  */
70
70
  export declare const linkToMedia: (field: LinkToMediaField | null | undefined) => field is import("../types/value/linkToMedia").FilledLinkToMediaField;
71
71
  /**
72
- * Determines if a Content Relationship field is filled.
72
+ * Determines if a content relationship field is filled.
73
73
  *
74
74
  * @param field - Content Relationship field to check.
75
75
  *
@@ -77,7 +77,7 @@ export declare const linkToMedia: (field: LinkToMediaField | null | undefined) =
77
77
  */
78
78
  export declare const contentRelationship: <TypeEnum = string, LangEnum = string, DataInterface extends unknown = unknown>(field: ContentRelationshipField<TypeEnum, LangEnum, DataInterface> | null | undefined) => field is import("../types/value/contentRelationship").FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface>;
79
79
  /**
80
- * Determines if a Date field is filled.
80
+ * Determines if a date field is filled.
81
81
  *
82
82
  * @param field - Date field to check.
83
83
  *
@@ -85,7 +85,7 @@ export declare const contentRelationship: <TypeEnum = string, LangEnum = string,
85
85
  */
86
86
  export declare const date: (field: DateField | null | undefined) => field is `${number}-${number}-${number}`;
87
87
  /**
88
- * Determines if a Timestamp field is filled.
88
+ * Determines if a timestamp field is filled.
89
89
  *
90
90
  * @param field - Timestamp field to check.
91
91
  *
@@ -93,7 +93,7 @@ export declare const date: (field: DateField | null | undefined) => field is `${
93
93
  */
94
94
  export declare const timestamp: (field: TimestampField | null | undefined) => field is `${number}-${number}-${number}T${number}:${number}:${number}+${number}`;
95
95
  /**
96
- * Determines if a Color field is filled.
96
+ * Determines if a color field is filled.
97
97
  *
98
98
  * @param field - Color field to check.
99
99
  *
@@ -101,7 +101,7 @@ export declare const timestamp: (field: TimestampField | null | undefined) => fi
101
101
  */
102
102
  export declare const color: (field: ColorField | null | undefined) => field is `#${string}`;
103
103
  /**
104
- * Determines if a Number field is filled.
104
+ * Determines if a number field is filled.
105
105
  *
106
106
  * @param field - Number field to check.
107
107
  *
@@ -109,7 +109,7 @@ export declare const color: (field: ColorField | null | undefined) => field is `
109
109
  */
110
110
  export declare const number: (field: NumberField | null | undefined) => field is number;
111
111
  /**
112
- * Determines if a Key Text field is filled.
112
+ * Determines if a key text field is filled.
113
113
  *
114
114
  * @param field - Key Text field to check.
115
115
  *
@@ -117,7 +117,7 @@ export declare const number: (field: NumberField | null | undefined) => field is
117
117
  */
118
118
  export declare const keyText: (field: KeyTextField | null | undefined) => field is string;
119
119
  /**
120
- * Determines if a Select field is filled.
120
+ * Determines if a select field is filled.
121
121
  *
122
122
  * @param field - Select field to check.
123
123
  *
@@ -125,7 +125,7 @@ export declare const keyText: (field: KeyTextField | null | undefined) => field
125
125
  */
126
126
  export declare const select: <Enum extends string>(field: SelectField<Enum> | undefined) => field is Enum;
127
127
  /**
128
- * Determines if an Embed field is filled.
128
+ * Determines if an embed field is filled.
129
129
  *
130
130
  * @param field - Embed field to check.
131
131
  *
@@ -136,7 +136,7 @@ export declare const embed: <Field extends EmbedField<AnyOEmbed>>(field: Field |
136
136
  html: string | null;
137
137
  }>;
138
138
  /**
139
- * Determines if a GeoPoint field is filled.
139
+ * Determines if a geopoint field is filled.
140
140
  *
141
141
  * @param field - GeoPoint field to check.
142
142
  *
@@ -147,13 +147,17 @@ export declare const geoPoint: (field: GeoPointField | null | undefined) => fiel
147
147
  longitude: number;
148
148
  };
149
149
  /**
150
- * Determines if an Integration Fields field is filled.
150
+ * Determines if an integration field is filled.
151
151
  *
152
- * @param field - Integration Fields field to check.
152
+ * @param field - Integration field to check.
153
153
  *
154
154
  * @returns `true` if `field` is filled, `false` otherwise.
155
155
  */
156
- export declare const integrationFields: <Data extends Record<string, unknown>>(field: IntegrationFields<Data> | undefined) => field is Data;
156
+ export declare const integrationField: <Data extends Record<string, unknown>>(field: IntegrationField<Data> | undefined) => field is Data;
157
+ /**
158
+ * @deprecated Renamed to `integrationField`.
159
+ */
160
+ export declare const integrationFields: <Data extends Record<string, unknown>>(field: IntegrationField<Data> | undefined) => field is Data;
157
161
  /**
158
162
  * Determines if a Group has at least one item.
159
163
  *
@@ -37,7 +37,8 @@ const embed = (field) => {
37
37
  const geoPoint = (field) => {
38
38
  return isNonNullish(field) && "longitude" in field;
39
39
  };
40
- const integrationFields = isNonNullish;
40
+ const integrationField = isNonNullish;
41
+ const integrationFields = integrationField;
41
42
  const group = (group2) => {
42
43
  return isNonNullish(group2) && isNonEmptyArray(group2);
43
44
  };
@@ -53,6 +54,7 @@ export {
53
54
  group,
54
55
  image,
55
56
  imageThumbnail,
57
+ integrationField,
56
58
  integrationFields,
57
59
  keyText,
58
60
  link,
@@ -1 +1 @@
1
- {"version":3,"file":"isFilled.js","sources":["../../../src/helpers/isFilled.ts"],"sourcesContent":["import type { ColorField } from \"../types/value/color\";\nimport type { ContentRelationshipField } from \"../types/value/contentRelationship\";\nimport type { DateField } from \"../types/value/date\";\nimport type { AnyOEmbed, EmbedField } from \"../types/value/embed\";\nimport type { GeoPointField } from \"../types/value/geoPoint\";\nimport type { GroupField } from \"../types/value/group\";\nimport type { ImageField, ImageFieldImage } from \"../types/value/image\";\nimport type { IntegrationFields } from \"../types/value/integrationFields\";\nimport type { KeyTextField } from \"../types/value/keyText\";\nimport type { LinkField } from \"../types/value/link\";\nimport type { LinkToMediaField } from \"../types/value/linkToMedia\";\nimport type { NumberField } from \"../types/value/number\";\nimport type { RichTextField } from \"../types/value/richText\";\nimport type { SelectField } from \"../types/value/select\";\nimport type { SharedSlice } from \"../types/value/sharedSlice\";\nimport type { Slice } from \"../types/value/slice\";\nimport type { SliceZone } from \"../types/value/sliceZone\";\nimport type { TimestampField } from \"../types/value/timestamp\";\nimport type { TitleField } from \"../types/value/title\";\nimport type { AnyRegularField } from \"../types/value/types\";\n\n/**\n * Determines if a value is not nullish (i.e. not `null` or `undefined`). This\n * is used to check if nullable field values are filled.\n *\n * @param input - The value to check.\n *\n * @returns `true` if `input` is not nullish, `false` otherwise.\n */\nconst isNonNullish = <T>(input: T): input is NonNullable<T> => {\n\treturn input != null;\n};\n\n/**\n * Determines if an array is not empty. This is used to check if array-based\n * fields are filled.\n *\n * @param input - The array to check.\n *\n * @returns `true` if `input` has at least one element, `false` otherwise.\n */\nconst isNonEmptyArray = <T>(input: T[]): input is [T, ...T[]] => {\n\treturn !!input.length;\n};\n\n/**\n * Determines if a Rich Text field is filled.\n *\n * @param field - Rich Text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const richText = (\n\tfield: RichTextField | null | undefined,\n): field is RichTextField<\"filled\"> => {\n\tif (!isNonNullish(field)) {\n\t\treturn false;\n\t} else if (field.length === 1 && \"text\" in field[0]) {\n\t\treturn !!field[0].text;\n\t} else {\n\t\treturn !!field.length;\n\t}\n};\n\n/**\n * Determines if a Title field is filled.\n *\n * @param field - Title field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const title = richText as (\n\tfield: TitleField | null | undefined,\n) => field is TitleField<\"filled\">;\n\n/**\n * Determines if an Image thumbnail is filled.\n *\n * @param thumbnail - Image thumbnail to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const imageThumbnail = (\n\tthumbnail: ImageFieldImage | null | undefined,\n): thumbnail is ImageFieldImage<\"filled\"> => {\n\treturn isNonNullish(thumbnail) && !!thumbnail.url;\n};\n\n/**\n * Determines if an Image field is filled.\n *\n * @param field - Image field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const image = imageThumbnail as <\n\tThumbnailNames extends string | null = never,\n>(\n\tfield: ImageField<ThumbnailNames> | null | undefined,\n) => field is ImageField<ThumbnailNames, \"filled\">;\n\n/**\n * Determines if a Link field is filled.\n *\n * @param field - Link field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const link = <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,\n): field is LinkField<TypeEnum, LangEnum, DataInterface, \"filled\"> => {\n\treturn isNonNullish(field) && (\"id\" in field || \"url\" in field);\n};\n\n/**\n * Determines if a Link to Media field is filled.\n *\n * @param field - Link to Media field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const linkToMedia = link as (\n\tfield: LinkToMediaField | null | undefined,\n) => field is LinkToMediaField<\"filled\">;\n\n/**\n * Determines if a Content Relationship field is filled.\n *\n * @param field - Content Relationship field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const contentRelationship = link as <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield:\n\t\t| ContentRelationshipField<TypeEnum, LangEnum, DataInterface>\n\t\t| null\n\t\t| undefined,\n) => field is ContentRelationshipField<\n\tTypeEnum,\n\tLangEnum,\n\tDataInterface,\n\t\"filled\"\n>;\n\n/**\n * Determines if a Date field is filled.\n *\n * @param field - Date field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const date = isNonNullish as (\n\tfield: DateField | null | undefined,\n) => field is DateField<\"filled\">;\n\n/**\n * Determines if a Timestamp field is filled.\n *\n * @param field - Timestamp field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const timestamp = isNonNullish as (\n\tfield: TimestampField | null | undefined,\n) => field is TimestampField<\"filled\">;\n\n/**\n * Determines if a Color field is filled.\n *\n * @param field - Color field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const color = isNonNullish as (\n\tfield: ColorField | null | undefined,\n) => field is ColorField<\"filled\">;\n\n/**\n * Determines if a Number field is filled.\n *\n * @param field - Number field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const number = isNonNullish as (\n\tfield: NumberField | null | undefined,\n) => field is NumberField<\"filled\">;\n\n/**\n * Determines if a Key Text field is filled.\n *\n * @param field - Key Text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const keyText = (\n\tfield: KeyTextField | null | undefined,\n): field is KeyTextField<\"filled\"> => {\n\treturn isNonNullish(keyText) && !!field;\n};\n\n/**\n * Determines if a Select field is filled.\n *\n * @param field - Select field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const select = isNonNullish as <Enum extends string>(\n\tfield: SelectField<Enum> | null | undefined,\n) => field is SelectField<Enum, \"filled\">;\n\n/**\n * Determines if an Embed field is filled.\n *\n * @param field - Embed field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const embed = <Field extends EmbedField<AnyOEmbed>>(\n\tfield: Field | null | undefined,\n): field is Extract<Field, EmbedField<AnyOEmbed, \"filled\">> => {\n\treturn isNonNullish(field) && !!field.embed_url;\n};\n\n/**\n * Determines if a GeoPoint field is filled.\n *\n * @param field - GeoPoint field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const geoPoint = (\n\tfield: GeoPointField | null | undefined,\n): field is GeoPointField<\"filled\"> => {\n\treturn isNonNullish(field) && \"longitude\" in field;\n};\n\n/**\n * Determines if an Integration Fields field is filled.\n *\n * @param field - Integration Fields field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const integrationFields = isNonNullish as <\n\tData extends Record<string, unknown>,\n>(\n\tfield: IntegrationFields<Data> | null | undefined,\n) => field is IntegrationFields<Data, \"filled\">;\n\n/**\n * Determines if a Group has at least one item.\n *\n * @param group - Group to check.\n *\n * @returns `true` if `group` contains at least one item, `false` otherwise.\n */\nexport const group = <Fields extends Record<string, AnyRegularField>>(\n\tgroup: GroupField<Fields> | null | undefined,\n): group is GroupField<Fields, \"filled\"> => {\n\treturn isNonNullish(group) && isNonEmptyArray(group);\n};\n\n/**\n * Determines if a Slice Zone has at least one Slice.\n *\n * @param slices - Slice Zone to check.\n *\n * @returns `true` if `slices` contains at least one Slice, `false` otherwise.\n */\nexport const sliceZone = <Slices extends Slice | SharedSlice>(\n\tslices: SliceZone<Slices> | null | undefined,\n): slices is SliceZone<Slices, \"filled\"> => {\n\treturn isNonNullish(slices) && isNonEmptyArray(slices);\n};\n"],"names":["group"],"mappings":"AA6BA,MAAM,eAAe,CAAI,UAAqC;AAC7D,SAAO,SAAS;AACjB;AAUA,MAAM,kBAAkB,CAAI,UAAoC;AACxD,SAAA,CAAC,CAAC,MAAM;AAChB;AASa,MAAA,WAAW,CACvB,UACqC;AACjC,MAAA,CAAC,aAAa,KAAK,GAAG;AAClB,WAAA;AAAA,EAAA,WACG,MAAM,WAAW,KAAK,UAAU,MAAM,CAAC,GAAG;AACpD,WAAO,CAAC,CAAC,MAAM,CAAC,EAAE;AAAA,EAAA,OACZ;AACC,WAAA,CAAC,CAAC,MAAM;AAAA,EACf;AACF;AASO,MAAM,QAAQ;AAWR,MAAA,iBAAiB,CAC7B,cAC2C;AAC3C,SAAO,aAAa,SAAS,KAAK,CAAC,CAAC,UAAU;AAC/C;AASO,MAAM,QAAQ;AAaR,MAAA,OAAO,CAOnB,UACoE;AACpE,SAAO,aAAa,KAAK,MAAM,QAAQ,SAAS,SAAS;AAC1D;AASO,MAAM,cAAc;AAWpB,MAAM,sBAAsB;AAyB5B,MAAM,OAAO;AAWb,MAAM,YAAY;AAWlB,MAAM,QAAQ;AAWd,MAAM,SAAS;AAWT,MAAA,UAAU,CACtB,UACoC;AACpC,SAAO,aAAa,OAAO,KAAK,CAAC,CAAC;AACnC;AASO,MAAM,SAAS;AAWT,MAAA,QAAQ,CACpB,UAC6D;AAC7D,SAAO,aAAa,KAAK,KAAK,CAAC,CAAC,MAAM;AACvC;AASa,MAAA,WAAW,CACvB,UACqC;AAC9B,SAAA,aAAa,KAAK,KAAK,eAAe;AAC9C;AASO,MAAM,oBAAoB;AAapB,MAAA,QAAQ,CACpBA,WAC0C;AAC1C,SAAO,aAAaA,MAAK,KAAK,gBAAgBA,MAAK;AACpD;AASa,MAAA,YAAY,CACxB,WAC0C;AAC1C,SAAO,aAAa,MAAM,KAAK,gBAAgB,MAAM;AACtD;"}
1
+ {"version":3,"file":"isFilled.js","sources":["../../../src/helpers/isFilled.ts"],"sourcesContent":["import type { ColorField } from \"../types/value/color\";\nimport type { ContentRelationshipField } from \"../types/value/contentRelationship\";\nimport type { DateField } from \"../types/value/date\";\nimport type { AnyOEmbed, EmbedField } from \"../types/value/embed\";\nimport type { GeoPointField } from \"../types/value/geoPoint\";\nimport type { GroupField } from \"../types/value/group\";\nimport type { ImageField, ImageFieldImage } from \"../types/value/image\";\nimport type { IntegrationField } from \"../types/value/integration\";\nimport type { KeyTextField } from \"../types/value/keyText\";\nimport type { LinkField } from \"../types/value/link\";\nimport type { LinkToMediaField } from \"../types/value/linkToMedia\";\nimport type { NumberField } from \"../types/value/number\";\nimport type { RichTextField } from \"../types/value/richText\";\nimport type { SelectField } from \"../types/value/select\";\nimport type { SharedSlice } from \"../types/value/sharedSlice\";\nimport type { Slice } from \"../types/value/slice\";\nimport type { SliceZone } from \"../types/value/sliceZone\";\nimport type { TimestampField } from \"../types/value/timestamp\";\nimport type { TitleField } from \"../types/value/title\";\nimport type { AnyRegularField } from \"../types/value/types\";\n\n/**\n * Determines if a value is not nullish (i.e. not `null` or `undefined`). This\n * is used to check if nullable field values are filled.\n *\n * @param input - The value to check.\n *\n * @returns `true` if `input` is not nullish, `false` otherwise.\n */\nconst isNonNullish = <T>(input: T): input is NonNullable<T> => {\n\treturn input != null;\n};\n\n/**\n * Determines if an array is not empty. This is used to check if array-based\n * fields are filled.\n *\n * @param input - The array to check.\n *\n * @returns `true` if `input` has at least one element, `false` otherwise.\n */\nconst isNonEmptyArray = <T>(input: T[]): input is [T, ...T[]] => {\n\treturn !!input.length;\n};\n\n/**\n * Determines if a rich text field is filled.\n *\n * @param field - rich text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const richText = (\n\tfield: RichTextField | null | undefined,\n): field is RichTextField<\"filled\"> => {\n\tif (!isNonNullish(field)) {\n\t\treturn false;\n\t} else if (field.length === 1 && \"text\" in field[0]) {\n\t\treturn !!field[0].text;\n\t} else {\n\t\treturn !!field.length;\n\t}\n};\n\n/**\n * Determines if a title field is filled.\n *\n * @param field - Title field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const title = richText as (\n\tfield: TitleField | null | undefined,\n) => field is TitleField<\"filled\">;\n\n/**\n * Determines if an Image thumbnail is filled.\n *\n * @param thumbnail - Image thumbnail to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const imageThumbnail = (\n\tthumbnail: ImageFieldImage | null | undefined,\n): thumbnail is ImageFieldImage<\"filled\"> => {\n\treturn isNonNullish(thumbnail) && !!thumbnail.url;\n};\n\n/**\n * Determines if an image field is filled.\n *\n * @param field - Image field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const image = imageThumbnail as <\n\tThumbnailNames extends string | null = never,\n>(\n\tfield: ImageField<ThumbnailNames> | null | undefined,\n) => field is ImageField<ThumbnailNames, \"filled\">;\n\n/**\n * Determines if a link field is filled.\n *\n * @param field - Link field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const link = <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,\n): field is LinkField<TypeEnum, LangEnum, DataInterface, \"filled\"> => {\n\treturn isNonNullish(field) && (\"id\" in field || \"url\" in field);\n};\n\n/**\n * Determines if a link to media field is filled.\n *\n * @param field - Link to media field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const linkToMedia = link as (\n\tfield: LinkToMediaField | null | undefined,\n) => field is LinkToMediaField<\"filled\">;\n\n/**\n * Determines if a content relationship field is filled.\n *\n * @param field - Content Relationship field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const contentRelationship = link as <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield:\n\t\t| ContentRelationshipField<TypeEnum, LangEnum, DataInterface>\n\t\t| null\n\t\t| undefined,\n) => field is ContentRelationshipField<\n\tTypeEnum,\n\tLangEnum,\n\tDataInterface,\n\t\"filled\"\n>;\n\n/**\n * Determines if a date field is filled.\n *\n * @param field - Date field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const date = isNonNullish as (\n\tfield: DateField | null | undefined,\n) => field is DateField<\"filled\">;\n\n/**\n * Determines if a timestamp field is filled.\n *\n * @param field - Timestamp field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const timestamp = isNonNullish as (\n\tfield: TimestampField | null | undefined,\n) => field is TimestampField<\"filled\">;\n\n/**\n * Determines if a color field is filled.\n *\n * @param field - Color field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const color = isNonNullish as (\n\tfield: ColorField | null | undefined,\n) => field is ColorField<\"filled\">;\n\n/**\n * Determines if a number field is filled.\n *\n * @param field - Number field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const number = isNonNullish as (\n\tfield: NumberField | null | undefined,\n) => field is NumberField<\"filled\">;\n\n/**\n * Determines if a key text field is filled.\n *\n * @param field - Key Text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const keyText = (\n\tfield: KeyTextField | null | undefined,\n): field is KeyTextField<\"filled\"> => {\n\treturn isNonNullish(keyText) && !!field;\n};\n\n/**\n * Determines if a select field is filled.\n *\n * @param field - Select field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const select = isNonNullish as <Enum extends string>(\n\tfield: SelectField<Enum> | null | undefined,\n) => field is SelectField<Enum, \"filled\">;\n\n/**\n * Determines if an embed field is filled.\n *\n * @param field - Embed field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const embed = <Field extends EmbedField<AnyOEmbed>>(\n\tfield: Field | null | undefined,\n): field is Extract<Field, EmbedField<AnyOEmbed, \"filled\">> => {\n\treturn isNonNullish(field) && !!field.embed_url;\n};\n\n/**\n * Determines if a geopoint field is filled.\n *\n * @param field - GeoPoint field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const geoPoint = (\n\tfield: GeoPointField | null | undefined,\n): field is GeoPointField<\"filled\"> => {\n\treturn isNonNullish(field) && \"longitude\" in field;\n};\n\n/**\n * Determines if an integration field is filled.\n *\n * @param field - Integration field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const integrationField = isNonNullish as <\n\tData extends Record<string, unknown>,\n>(\n\tfield: IntegrationField<Data> | null | undefined,\n) => field is IntegrationField<Data, \"filled\">;\n/**\n * @deprecated Renamed to `integrationField`.\n */\n// TODO: Remove when we remove support for deprecated `integrationFields` export.\nexport const integrationFields = integrationField;\n\n/**\n * Determines if a Group has at least one item.\n *\n * @param group - Group to check.\n *\n * @returns `true` if `group` contains at least one item, `false` otherwise.\n */\nexport const group = <Fields extends Record<string, AnyRegularField>>(\n\tgroup: GroupField<Fields> | null | undefined,\n): group is GroupField<Fields, \"filled\"> => {\n\treturn isNonNullish(group) && isNonEmptyArray(group);\n};\n\n/**\n * Determines if a Slice Zone has at least one Slice.\n *\n * @param slices - Slice Zone to check.\n *\n * @returns `true` if `slices` contains at least one Slice, `false` otherwise.\n */\nexport const sliceZone = <Slices extends Slice | SharedSlice>(\n\tslices: SliceZone<Slices> | null | undefined,\n): slices is SliceZone<Slices, \"filled\"> => {\n\treturn isNonNullish(slices) && isNonEmptyArray(slices);\n};\n"],"names":["group"],"mappings":"AA6BA,MAAM,eAAe,CAAI,UAAqC;AAC7D,SAAO,SAAS;AACjB;AAUA,MAAM,kBAAkB,CAAI,UAAoC;AACxD,SAAA,CAAC,CAAC,MAAM;AAChB;AASa,MAAA,WAAW,CACvB,UACqC;AACjC,MAAA,CAAC,aAAa,KAAK,GAAG;AAClB,WAAA;AAAA,EAAA,WACG,MAAM,WAAW,KAAK,UAAU,MAAM,CAAC,GAAG;AACpD,WAAO,CAAC,CAAC,MAAM,CAAC,EAAE;AAAA,EAAA,OACZ;AACC,WAAA,CAAC,CAAC,MAAM;AAAA,EACf;AACF;AASO,MAAM,QAAQ;AAWR,MAAA,iBAAiB,CAC7B,cAC2C;AAC3C,SAAO,aAAa,SAAS,KAAK,CAAC,CAAC,UAAU;AAC/C;AASO,MAAM,QAAQ;AAaR,MAAA,OAAO,CAOnB,UACoE;AACpE,SAAO,aAAa,KAAK,MAAM,QAAQ,SAAS,SAAS;AAC1D;AASO,MAAM,cAAc;AAWpB,MAAM,sBAAsB;AAyB5B,MAAM,OAAO;AAWb,MAAM,YAAY;AAWlB,MAAM,QAAQ;AAWd,MAAM,SAAS;AAWT,MAAA,UAAU,CACtB,UACoC;AACpC,SAAO,aAAa,OAAO,KAAK,CAAC,CAAC;AACnC;AASO,MAAM,SAAS;AAWT,MAAA,QAAQ,CACpB,UAC6D;AAC7D,SAAO,aAAa,KAAK,KAAK,CAAC,CAAC,MAAM;AACvC;AASa,MAAA,WAAW,CACvB,UACqC;AAC9B,SAAA,aAAa,KAAK,KAAK,eAAe;AAC9C;AASO,MAAM,mBAAmB;AASzB,MAAM,oBAAoB;AASpB,MAAA,QAAQ,CACpBA,WAC0C;AAC1C,SAAO,aAAaA,MAAK,KAAK,gBAAgBA,MAAK;AACpD;AASa,MAAA,YAAY,CACxB,WAC0C;AAC1C,SAAO,aAAa,MAAM,KAAK,gBAAgB,MAAM;AACtD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["// Use for deprecations.\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\";\n\nimport { filter } from \"./filter\";\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient, Client } from \"./createClient\";\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\";\nexport { getRepositoryName } from \"./getRepositoryName\";\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\";\nexport { isRepositoryName } from \"./isRepositoryName\";\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\";\nexport { buildQueryURL } from \"./buildQueryURL\";\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\";\n\n// Query filters API.\n/**\n * @deprecated Renamed to `filter`\n */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter;\nexport { filter, predicate };\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\";\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./createClient\";\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\";\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\";\nexport { asLink } from \"./helpers/asLink\";\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\";\nexport { asText } from \"./helpers/asText\";\nexport { asHTML } from \"./helpers/asHTML\";\nexport { asImageSrc } from \"./helpers/asImageSrc\";\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\";\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\";\nexport * as isFilled from \"./helpers/isFilled\";\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\";\n\n// RichText element types.\nexport { Element } from \"@prismicio/richtext\";\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\";\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\";\n\n/**\n * @deprecated Renamed to `HTMLRichTextMapSerializer`\n */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer;\n/**\n * @deprecated Renamed to `HTMLRichTextFunctionSerializer`\n */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n};\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\";\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\nexport { PrismicError } from \"./errors/PrismicError\";\nexport { ForbiddenError } from \"./errors/ForbiddenError\";\nexport { NotFoundError } from \"./errors/NotFoundError\";\nexport { ParsingError } from \"./errors/ParsingError\";\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\nexport { RichTextNodeType } from \"./types/value/richText\";\nexport { LinkType } from \"./types/value/link\";\nexport { OEmbedType } from \"./types/value/embed\";\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\";\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n} from \"./types/value/richText\";\nexport type { TitleField } from \"./types/value/title\";\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\";\n\nexport type {\n\tEmptyLinkField,\n\tLinkField,\n\tFilledLinkToWebField,\n} from \"./types/value/link\";\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\";\nexport type {\n\tLinkToMediaField,\n\tFilledLinkToMediaField,\n} from \"./types/value/linkToMedia\";\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\";\n\nexport type { BooleanField } from \"./types/value/boolean\";\nexport type { ColorField } from \"./types/value/color\";\nexport type { DateField } from \"./types/value/date\";\nexport type { KeyTextField } from \"./types/value/keyText\";\nexport type { NumberField } from \"./types/value/number\";\nexport type { SelectField } from \"./types/value/select\";\nexport type { TimestampField } from \"./types/value/timestamp\";\nexport type { GeoPointField } from \"./types/value/geoPoint\";\n\nexport type { IntegrationFields } from \"./types/value/integrationFields\";\n\nexport type { GroupField } from \"./types/value/group\";\n\nexport type { SliceZone } from \"./types/value/sliceZone\";\nexport type { Slice } from \"./types/value/slice\";\nexport type { SharedSlice } from \"./types/value/sharedSlice\";\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\";\n\nexport type { FieldState, AnyRegularField } from \"./types/value/types\";\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\";\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\";\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\";\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\";\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\";\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\";\nexport type { CustomTypeModelTitleField } from \"./types/model/title\";\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\";\n\nexport type { CustomTypeModelContentRelationshipField } from \"./types/model/contentRelationship\";\nexport type { CustomTypeModelLinkField } from \"./types/model/link\";\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\";\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\";\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\";\nexport type { CustomTypeModelColorField } from \"./types/model/color\";\nexport type { CustomTypeModelDateField } from \"./types/model/date\";\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\";\nexport type { CustomTypeModelNumberField } from \"./types/model/number\";\nexport type { CustomTypeModelSelectField } from \"./types/model/select\";\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\";\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\";\n\nexport type { CustomTypeModelIntegrationFieldsField } from \"./types/model/integrationFields\";\nexport type { CustomTypeModelGroupField } from \"./types/model/group\";\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\";\nexport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"./types/model/slice\";\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\";\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\";\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\";\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\";\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\";\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n} from \"./types/model/types\";\n\n// API - Types representing Prismic Rest API V2 responses.\nexport type { Query } from \"./types/api/query\";\n\nexport type { Ref } from \"./types/api/ref\";\n\nexport type { Release } from \"./types/api/release\";\n\nexport type {\n\tRepository,\n\tLanguage,\n\tForm,\n\tFormField,\n} from \"./types/api/repository\";\n\nexport type { Tags } from \"./types/api/tags\";\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\";\n\nexport type { WebhookBody } from \"./types/webhook/types\";\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\";\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\";\n"],"names":["filter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,YAAYA,OAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["// Imports are used for deprecations.\nimport type { CustomTypeModelIntegrationField } from \"./types/model/integration\";\nimport type { IntegrationField } from \"./types/value/integration\";\n\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\";\n\nimport { filter } from \"./filter\";\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient, Client } from \"./createClient\";\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\";\nexport { getRepositoryName } from \"./getRepositoryName\";\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\";\nexport { isRepositoryName } from \"./isRepositoryName\";\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\";\nexport { buildQueryURL } from \"./buildQueryURL\";\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\";\n\n// Query filters API.\n/**\n * @deprecated Renamed to `filter`\n */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter;\nexport { filter, predicate };\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\";\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tRequestInitLikeOrThunk,\n\tResponseLike,\n} from \"./createClient\";\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\";\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\";\nexport { asLink } from \"./helpers/asLink\";\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\";\nexport { asText } from \"./helpers/asText\";\nexport { asHTML } from \"./helpers/asHTML\";\nexport { asImageSrc } from \"./helpers/asImageSrc\";\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\";\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\";\nexport * as isFilled from \"./helpers/isFilled\";\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\";\n\n// RichText element types.\nexport { Element } from \"@prismicio/richtext\";\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\";\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\";\n\n/**\n * @deprecated Renamed to `HTMLRichTextMapSerializer`\n */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer;\n/**\n * @deprecated Renamed to `HTMLRichTextFunctionSerializer`\n */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n};\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\";\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\nexport { PrismicError } from \"./errors/PrismicError\";\nexport { ForbiddenError } from \"./errors/ForbiddenError\";\nexport { NotFoundError } from \"./errors/NotFoundError\";\nexport { ParsingError } from \"./errors/ParsingError\";\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\nexport { RichTextNodeType } from \"./types/value/richText\";\nexport { LinkType } from \"./types/value/link\";\nexport { OEmbedType } from \"./types/value/embed\";\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\";\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n} from \"./types/value/richText\";\nexport type { TitleField } from \"./types/value/title\";\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\";\n\nexport type {\n\tEmptyLinkField,\n\tLinkField,\n\tFilledLinkToWebField,\n} from \"./types/value/link\";\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\";\nexport type {\n\tLinkToMediaField,\n\tFilledLinkToMediaField,\n} from \"./types/value/linkToMedia\";\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\";\n\nexport type { BooleanField } from \"./types/value/boolean\";\nexport type { ColorField } from \"./types/value/color\";\nexport type { DateField } from \"./types/value/date\";\nexport type { KeyTextField } from \"./types/value/keyText\";\nexport type { NumberField } from \"./types/value/number\";\nexport type { SelectField } from \"./types/value/select\";\nexport type { TimestampField } from \"./types/value/timestamp\";\nexport type { GeoPointField } from \"./types/value/geoPoint\";\n\n/**\n * @deprecated Renamed to `IntegrationField`\n */\n// TODO: Remove when we remove support for deprecated `IntegrationFields` export.\ntype IntegrationFields = IntegrationField;\nexport { IntegrationField, IntegrationFields };\n\nexport type { GroupField } from \"./types/value/group\";\n\nexport type { SliceZone } from \"./types/value/sliceZone\";\nexport type { Slice } from \"./types/value/slice\";\nexport type { SharedSlice } from \"./types/value/sharedSlice\";\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\";\n\nexport type { FieldState, AnyRegularField } from \"./types/value/types\";\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\";\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\";\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\";\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\";\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\";\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\";\nexport type { CustomTypeModelTitleField } from \"./types/model/title\";\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\";\n\nexport type { CustomTypeModelContentRelationshipField } from \"./types/model/contentRelationship\";\nexport type { CustomTypeModelLinkField } from \"./types/model/link\";\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\";\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\";\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\";\nexport type { CustomTypeModelColorField } from \"./types/model/color\";\nexport type { CustomTypeModelDateField } from \"./types/model/date\";\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\";\nexport type { CustomTypeModelNumberField } from \"./types/model/number\";\nexport type { CustomTypeModelSelectField } from \"./types/model/select\";\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\";\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\";\n\n/**\n * @deprecated Renamed to `CustomTypeModelIntegrationField`.\n */\n// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export.\ntype CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField;\nexport {\n\tCustomTypeModelIntegrationField,\n\tCustomTypeModelIntegrationFieldsField,\n};\nexport type { CustomTypeModelGroupField } from \"./types/model/group\";\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\";\nexport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"./types/model/slice\";\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\";\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\";\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\";\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\";\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\";\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n} from \"./types/model/types\";\n\n// API - Types representing Prismic Rest API V2 responses.\nexport type { Query } from \"./types/api/query\";\n\nexport type { Ref } from \"./types/api/ref\";\n\nexport type { Release } from \"./types/api/release\";\n\nexport type {\n\tRepository,\n\tLanguage,\n\tForm,\n\tFormField,\n} from \"./types/api/repository\";\n\nexport type { Tags } from \"./types/api/tags\";\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\";\n\nexport type { WebhookBody } from \"./types/webhook/types\";\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\";\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\";\n"],"names":["filter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAM,YAAYA,OAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { CustomTypeModelIntegrationField } from "./types/model/integration";
2
+ import type { IntegrationField } from "./types/value/integration";
1
3
  import type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from "./helpers/asHTML";
2
4
  import { filter } from "./filter";
3
5
  export { createClient, Client } from "./createClient";
@@ -43,7 +45,7 @@ declare const predicate: {
43
45
  };
44
46
  export { filter, predicate };
45
47
  export * as cookie from "./cookie";
46
- export type { AbortSignalLike, ClientConfig, CreateClient, FetchLike, HttpRequestLike, RequestInitLike, ResponseLike, } from "./createClient";
48
+ export type { AbortSignalLike, ClientConfig, CreateClient, FetchLike, HttpRequestLike, RequestInitLike, RequestInitLikeOrThunk, ResponseLike, } from "./createClient";
47
49
  export type { BuildQueryURLArgs, Ordering, QueryParams, Route, } from "./buildQueryURL";
48
50
  export { asDate } from "./helpers/asDate";
49
51
  export { asLink } from "./helpers/asLink";
@@ -91,7 +93,11 @@ export type { NumberField } from "./types/value/number";
91
93
  export type { SelectField } from "./types/value/select";
92
94
  export type { TimestampField } from "./types/value/timestamp";
93
95
  export type { GeoPointField } from "./types/value/geoPoint";
94
- export type { IntegrationFields } from "./types/value/integrationFields";
96
+ /**
97
+ * @deprecated Renamed to `IntegrationField`
98
+ */
99
+ type IntegrationFields = IntegrationField;
100
+ export { IntegrationField, IntegrationFields };
95
101
  export type { GroupField } from "./types/value/group";
96
102
  export type { SliceZone } from "./types/value/sliceZone";
97
103
  export type { Slice } from "./types/value/slice";
@@ -118,7 +124,11 @@ export type { CustomTypeModelNumberField } from "./types/model/number";
118
124
  export type { CustomTypeModelSelectField } from "./types/model/select";
119
125
  export type { CustomTypeModelTimestampField } from "./types/model/timestamp";
120
126
  export type { CustomTypeModelGeoPointField } from "./types/model/geoPoint";
121
- export type { CustomTypeModelIntegrationFieldsField } from "./types/model/integrationFields";
127
+ /**
128
+ * @deprecated Renamed to `CustomTypeModelIntegrationField`.
129
+ */
130
+ type CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField;
131
+ export { CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField, };
122
132
  export type { CustomTypeModelGroupField } from "./types/model/group";
123
133
  export type { CustomTypeModelSliceZoneField, CustomTypeModelSliceLabel, CustomTypeModelSharedSlice, } from "./types/model/sliceZone";
124
134
  export type { CustomTypeModelSlice, CustomTypeModelLegacySlice, } from "./types/model/slice";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["// Use for deprecations.\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\";\n\nimport { filter } from \"./filter\";\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient, Client } from \"./createClient\";\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\";\nexport { getRepositoryName } from \"./getRepositoryName\";\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\";\nexport { isRepositoryName } from \"./isRepositoryName\";\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\";\nexport { buildQueryURL } from \"./buildQueryURL\";\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\";\n\n// Query filters API.\n/**\n * @deprecated Renamed to `filter`\n */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter;\nexport { filter, predicate };\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\";\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./createClient\";\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\";\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\";\nexport { asLink } from \"./helpers/asLink\";\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\";\nexport { asText } from \"./helpers/asText\";\nexport { asHTML } from \"./helpers/asHTML\";\nexport { asImageSrc } from \"./helpers/asImageSrc\";\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\";\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\";\nexport * as isFilled from \"./helpers/isFilled\";\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\";\n\n// RichText element types.\nexport { Element } from \"@prismicio/richtext\";\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\";\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\";\n\n/**\n * @deprecated Renamed to `HTMLRichTextMapSerializer`\n */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer;\n/**\n * @deprecated Renamed to `HTMLRichTextFunctionSerializer`\n */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n};\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\";\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\nexport { PrismicError } from \"./errors/PrismicError\";\nexport { ForbiddenError } from \"./errors/ForbiddenError\";\nexport { NotFoundError } from \"./errors/NotFoundError\";\nexport { ParsingError } from \"./errors/ParsingError\";\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\nexport { RichTextNodeType } from \"./types/value/richText\";\nexport { LinkType } from \"./types/value/link\";\nexport { OEmbedType } from \"./types/value/embed\";\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\";\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n} from \"./types/value/richText\";\nexport type { TitleField } from \"./types/value/title\";\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\";\n\nexport type {\n\tEmptyLinkField,\n\tLinkField,\n\tFilledLinkToWebField,\n} from \"./types/value/link\";\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\";\nexport type {\n\tLinkToMediaField,\n\tFilledLinkToMediaField,\n} from \"./types/value/linkToMedia\";\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\";\n\nexport type { BooleanField } from \"./types/value/boolean\";\nexport type { ColorField } from \"./types/value/color\";\nexport type { DateField } from \"./types/value/date\";\nexport type { KeyTextField } from \"./types/value/keyText\";\nexport type { NumberField } from \"./types/value/number\";\nexport type { SelectField } from \"./types/value/select\";\nexport type { TimestampField } from \"./types/value/timestamp\";\nexport type { GeoPointField } from \"./types/value/geoPoint\";\n\nexport type { IntegrationFields } from \"./types/value/integrationFields\";\n\nexport type { GroupField } from \"./types/value/group\";\n\nexport type { SliceZone } from \"./types/value/sliceZone\";\nexport type { Slice } from \"./types/value/slice\";\nexport type { SharedSlice } from \"./types/value/sharedSlice\";\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\";\n\nexport type { FieldState, AnyRegularField } from \"./types/value/types\";\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\";\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\";\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\";\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\";\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\";\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\";\nexport type { CustomTypeModelTitleField } from \"./types/model/title\";\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\";\n\nexport type { CustomTypeModelContentRelationshipField } from \"./types/model/contentRelationship\";\nexport type { CustomTypeModelLinkField } from \"./types/model/link\";\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\";\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\";\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\";\nexport type { CustomTypeModelColorField } from \"./types/model/color\";\nexport type { CustomTypeModelDateField } from \"./types/model/date\";\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\";\nexport type { CustomTypeModelNumberField } from \"./types/model/number\";\nexport type { CustomTypeModelSelectField } from \"./types/model/select\";\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\";\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\";\n\nexport type { CustomTypeModelIntegrationFieldsField } from \"./types/model/integrationFields\";\nexport type { CustomTypeModelGroupField } from \"./types/model/group\";\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\";\nexport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"./types/model/slice\";\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\";\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\";\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\";\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\";\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\";\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n} from \"./types/model/types\";\n\n// API - Types representing Prismic Rest API V2 responses.\nexport type { Query } from \"./types/api/query\";\n\nexport type { Ref } from \"./types/api/ref\";\n\nexport type { Release } from \"./types/api/release\";\n\nexport type {\n\tRepository,\n\tLanguage,\n\tForm,\n\tFormField,\n} from \"./types/api/repository\";\n\nexport type { Tags } from \"./types/api/tags\";\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\";\n\nexport type { WebhookBody } from \"./types/webhook/types\";\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\";\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,YAAY;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["// Imports are used for deprecations.\nimport type { CustomTypeModelIntegrationField } from \"./types/model/integration\";\nimport type { IntegrationField } from \"./types/value/integration\";\n\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\";\n\nimport { filter } from \"./filter\";\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient, Client } from \"./createClient\";\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\";\nexport { getRepositoryName } from \"./getRepositoryName\";\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\";\nexport { isRepositoryName } from \"./isRepositoryName\";\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\";\nexport { buildQueryURL } from \"./buildQueryURL\";\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\";\n\n// Query filters API.\n/**\n * @deprecated Renamed to `filter`\n */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter;\nexport { filter, predicate };\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\";\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tRequestInitLikeOrThunk,\n\tResponseLike,\n} from \"./createClient\";\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\";\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\";\nexport { asLink } from \"./helpers/asLink\";\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\";\nexport { asText } from \"./helpers/asText\";\nexport { asHTML } from \"./helpers/asHTML\";\nexport { asImageSrc } from \"./helpers/asImageSrc\";\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\";\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\";\nexport * as isFilled from \"./helpers/isFilled\";\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\";\n\n// RichText element types.\nexport { Element } from \"@prismicio/richtext\";\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\";\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\";\n\n/**\n * @deprecated Renamed to `HTMLRichTextMapSerializer`\n */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer;\n/**\n * @deprecated Renamed to `HTMLRichTextFunctionSerializer`\n */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n};\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\";\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\nexport { PrismicError } from \"./errors/PrismicError\";\nexport { ForbiddenError } from \"./errors/ForbiddenError\";\nexport { NotFoundError } from \"./errors/NotFoundError\";\nexport { ParsingError } from \"./errors/ParsingError\";\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\nexport { RichTextNodeType } from \"./types/value/richText\";\nexport { LinkType } from \"./types/value/link\";\nexport { OEmbedType } from \"./types/value/embed\";\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\";\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n} from \"./types/value/richText\";\nexport type { TitleField } from \"./types/value/title\";\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\";\n\nexport type {\n\tEmptyLinkField,\n\tLinkField,\n\tFilledLinkToWebField,\n} from \"./types/value/link\";\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\";\nexport type {\n\tLinkToMediaField,\n\tFilledLinkToMediaField,\n} from \"./types/value/linkToMedia\";\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\";\n\nexport type { BooleanField } from \"./types/value/boolean\";\nexport type { ColorField } from \"./types/value/color\";\nexport type { DateField } from \"./types/value/date\";\nexport type { KeyTextField } from \"./types/value/keyText\";\nexport type { NumberField } from \"./types/value/number\";\nexport type { SelectField } from \"./types/value/select\";\nexport type { TimestampField } from \"./types/value/timestamp\";\nexport type { GeoPointField } from \"./types/value/geoPoint\";\n\n/**\n * @deprecated Renamed to `IntegrationField`\n */\n// TODO: Remove when we remove support for deprecated `IntegrationFields` export.\ntype IntegrationFields = IntegrationField;\nexport { IntegrationField, IntegrationFields };\n\nexport type { GroupField } from \"./types/value/group\";\n\nexport type { SliceZone } from \"./types/value/sliceZone\";\nexport type { Slice } from \"./types/value/slice\";\nexport type { SharedSlice } from \"./types/value/sharedSlice\";\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\";\n\nexport type { FieldState, AnyRegularField } from \"./types/value/types\";\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\";\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\";\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\";\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\";\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\";\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\";\nexport type { CustomTypeModelTitleField } from \"./types/model/title\";\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\";\n\nexport type { CustomTypeModelContentRelationshipField } from \"./types/model/contentRelationship\";\nexport type { CustomTypeModelLinkField } from \"./types/model/link\";\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\";\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\";\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\";\nexport type { CustomTypeModelColorField } from \"./types/model/color\";\nexport type { CustomTypeModelDateField } from \"./types/model/date\";\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\";\nexport type { CustomTypeModelNumberField } from \"./types/model/number\";\nexport type { CustomTypeModelSelectField } from \"./types/model/select\";\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\";\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\";\n\n/**\n * @deprecated Renamed to `CustomTypeModelIntegrationField`.\n */\n// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export.\ntype CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField;\nexport {\n\tCustomTypeModelIntegrationField,\n\tCustomTypeModelIntegrationFieldsField,\n};\nexport type { CustomTypeModelGroupField } from \"./types/model/group\";\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\";\nexport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"./types/model/slice\";\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\";\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\";\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\";\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\";\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\";\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n} from \"./types/model/types\";\n\n// API - Types representing Prismic Rest API V2 responses.\nexport type { Query } from \"./types/api/query\";\n\nexport type { Ref } from \"./types/api/ref\";\n\nexport type { Release } from \"./types/api/release\";\n\nexport type {\n\tRepository,\n\tLanguage,\n\tForm,\n\tFormField,\n} from \"./types/api/repository\";\n\nexport type { Tags } from \"./types/api/tags\";\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\";\n\nexport type { WebhookBody } from \"./types/webhook/types\";\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\";\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAM,YAAY;"}
@@ -1 +1 @@
1
- {"version":3,"file":"appendFilters.cjs","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\";\n\ninterface WithFilters {\n\tfilters?: string | string[];\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property.\n * Appended filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n * @param objWithFilters - Object to append filters on the `filters`\n * property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t};\n};\n"],"names":["castArray"],"mappings":";;;AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,IACpB,YAC8B;AACvB,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAGA,UAAAA,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;;"}
1
+ {"version":3,"file":"appendFilters.cjs","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\";\n\ninterface WithFilters {\n\tfilters?: string | string[];\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property. Appended\n * filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n *\n * @param objWithFilters - Object to append filters on the `filters` property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t};\n};\n"],"names":["castArray"],"mappings":";;;AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,IACpB,YAC8B;AACvB,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAGA,UAAAA,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;;"}
@@ -2,12 +2,12 @@ interface WithFilters {
2
2
  filters?: string | string[];
3
3
  }
4
4
  /**
5
- * Adds one or more filters to an object with a `filters` property.
6
- * Appended filters are added to the end of the existing list.
5
+ * Adds one or more filters to an object with a `filters` property. Appended
6
+ * filters are added to the end of the existing list.
7
7
  *
8
8
  * @typeParam T - Object to which filters will be append.
9
- * @param objWithFilters - Object to append filters on the `filters`
10
- * property.
9
+ *
10
+ * @param objWithFilters - Object to append filters on the `filters` property.
11
11
  * @param filters - One or more filters to append.
12
12
  *
13
13
  * @returns The object with the appended filters.
@@ -1 +1 @@
1
- {"version":3,"file":"appendFilters.js","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\";\n\ninterface WithFilters {\n\tfilters?: string | string[];\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property.\n * Appended filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n * @param objWithFilters - Object to append filters on the `filters`\n * property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t};\n};\n"],"names":[],"mappings":";AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,IACpB,YAC8B;AACvB,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAG,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;"}
1
+ {"version":3,"file":"appendFilters.js","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\";\n\ninterface WithFilters {\n\tfilters?: string | string[];\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property. Appended\n * filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n *\n * @param objWithFilters - Object to append filters on the `filters` property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t};\n};\n"],"names":[],"mappings":";AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,IACpB,YAC8B;AACvB,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAG,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;"}
@@ -1 +1 @@
1
- {"version":3,"file":"castArray.cjs","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a];\n};\n"],"names":[],"mappings":";;AAUa,MAAA,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;;"}
1
+ {"version":3,"file":"castArray.cjs","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n *\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a];\n};\n"],"names":[],"mappings":";;AAWa,MAAA,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;;"}
@@ -4,6 +4,7 @@
4
4
  * only element.
5
5
  *
6
6
  * @typeParam A - Element of the array.
7
+ *
7
8
  * @param a - Value to ensure is an array.
8
9
  *
9
10
  * @returns `a` as an array.
@@ -1 +1 @@
1
- {"version":3,"file":"castArray.js","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a];\n};\n"],"names":[],"mappings":"AAUa,MAAA,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;"}
1
+ {"version":3,"file":"castArray.js","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n *\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a];\n};\n"],"names":[],"mappings":"AAWa,MAAA,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"castThunk.cjs","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a;\n};\n"],"names":[],"mappings":";;AASa,MAAA,YAAY,CAAI,MAA+B;AAC3D,SAAO,OAAO,MAAM,aAAc,IAAgB,MAAM;AACzD;;"}
1
+ {"version":3,"file":"castThunk.cjs","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n *\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <\n\tA,\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTArgs extends any[],\n>(\n\ta: A | ((...args: TArgs) => A),\n): ((...args: TArgs) => A) => {\n\treturn typeof a === \"function\" ? (a as (...args: TArgs) => A) : () => a;\n};\n"],"names":[],"mappings":";;AAUa,MAAA,YAAY,CAKxB,MAC4B;AAC5B,SAAO,OAAO,MAAM,aAAc,IAA8B,MAAM;AACvE;;"}
@@ -3,8 +3,9 @@
3
3
  * is. If it is not a thunk, it is converted to a thunk.
4
4
  *
5
5
  * @typeParam A - Value returned by the thunk.
6
+ *
6
7
  * @param a - Value to ensure is a thunk.
7
8
  *
8
9
  * @returns `a` as a a thunk.
9
10
  */
10
- export declare const castThunk: <A>(a: A | (() => A)) => () => A;
11
+ export declare const castThunk: <A, TArgs extends any[]>(a: A | ((...args: TArgs) => A)) => (...args: TArgs) => A;
@@ -1 +1 @@
1
- {"version":3,"file":"castThunk.js","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a;\n};\n"],"names":[],"mappings":"AASa,MAAA,YAAY,CAAI,MAA+B;AAC3D,SAAO,OAAO,MAAM,aAAc,IAAgB,MAAM;AACzD;"}
1
+ {"version":3,"file":"castThunk.js","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n *\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <\n\tA,\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTArgs extends any[],\n>(\n\ta: A | ((...args: TArgs) => A),\n): ((...args: TArgs) => A) => {\n\treturn typeof a === \"function\" ? (a as (...args: TArgs) => A) : () => a;\n};\n"],"names":[],"mappings":"AAUa,MAAA,YAAY,CAKxB,MAC4B;AAC5B,SAAO,OAAO,MAAM,aAAc,IAA8B,MAAM;AACvE;"}
@@ -1 +1 @@
1
- {"version":3,"file":"everyTagFilter.cjs","sources":["../../../src/lib/everyTagFilter.ts"],"sourcesContent":["import { filter } from \"../filter\";\n\nimport { castArray } from \"./castArray\";\n\n/**\n * Creates a filter to filter content by document tags. All tags are required\n * on the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const everyTagFilter = (tags: string | string[]): string => {\n\treturn filter.at(\"document.tags\", castArray(tags));\n};\n"],"names":["filter","castArray"],"mappings":";;;;AAYa,MAAA,iBAAiB,CAAC,SAAmC;AACjE,SAAOA,OAAAA,OAAO,GAAG,iBAAiBC,UAAAA,UAAU,IAAI,CAAC;AAClD;;"}
1
+ {"version":3,"file":"everyTagFilter.cjs","sources":["../../../src/lib/everyTagFilter.ts"],"sourcesContent":["import { filter } from \"../filter\";\n\nimport { castArray } from \"./castArray\";\n\n/**\n * Creates a filter to filter content by document tags. All tags are required on\n * the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const everyTagFilter = (tags: string | string[]): string => {\n\treturn filter.at(\"document.tags\", castArray(tags));\n};\n"],"names":["filter","castArray"],"mappings":";;;;AAYa,MAAA,iBAAiB,CAAC,SAAmC;AACjE,SAAOA,OAAAA,OAAO,GAAG,iBAAiBC,UAAAA,UAAU,IAAI,CAAC;AAClD;;"}
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Creates a filter to filter content by document tags. All tags are required
3
- * on the document.
2
+ * Creates a filter to filter content by document tags. All tags are required on
3
+ * the document.
4
4
  *
5
5
  * @param tags - Document tags to filter queried content.
6
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"everyTagFilter.js","sources":["../../../src/lib/everyTagFilter.ts"],"sourcesContent":["import { filter } from \"../filter\";\n\nimport { castArray } from \"./castArray\";\n\n/**\n * Creates a filter to filter content by document tags. All tags are required\n * on the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const everyTagFilter = (tags: string | string[]): string => {\n\treturn filter.at(\"document.tags\", castArray(tags));\n};\n"],"names":[],"mappings":";;AAYa,MAAA,iBAAiB,CAAC,SAAmC;AACjE,SAAO,OAAO,GAAG,iBAAiB,UAAU,IAAI,CAAC;AAClD;"}
1
+ {"version":3,"file":"everyTagFilter.js","sources":["../../../src/lib/everyTagFilter.ts"],"sourcesContent":["import { filter } from \"../filter\";\n\nimport { castArray } from \"./castArray\";\n\n/**\n * Creates a filter to filter content by document tags. All tags are required on\n * the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const everyTagFilter = (tags: string | string[]): string => {\n\treturn filter.at(\"document.tags\", castArray(tags));\n};\n"],"names":[],"mappings":";;AAYa,MAAA,iBAAiB,CAAC,SAAmC;AACjE,SAAO,OAAO,GAAG,iBAAiB,UAAU,IAAI,CAAC;AAClD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"findMasterRef.cjs","sources":["../../../src/lib/findMasterRef.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the master ref from a list of given refs.\n *\n * @param refs - A list of refs to search.\n *\n * @returns The master ref from the list.\n * @throws If a matching ref cannot be found.\n */\nexport const findMasterRef = (refs: Ref[]): Ref => {\n\treturn findRef(refs, (ref) => ref.isMasterRef);\n};\n"],"names":["findRef"],"mappings":";;;AAYa,MAAA,gBAAgB,CAAC,SAAoB;AACjD,SAAOA,QAAAA,QAAQ,MAAM,CAAC,QAAQ,IAAI,WAAW;AAC9C;;"}
1
+ {"version":3,"file":"findMasterRef.cjs","sources":["../../../src/lib/findMasterRef.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the master ref from a list of given refs.\n *\n * @param refs - A list of refs to search.\n *\n * @returns The master ref from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findMasterRef = (refs: Ref[]): Ref => {\n\treturn findRef(refs, (ref) => ref.isMasterRef);\n};\n"],"names":["findRef"],"mappings":";;;AAaa,MAAA,gBAAgB,CAAC,SAAoB;AACjD,SAAOA,QAAAA,QAAQ,MAAM,CAAC,QAAQ,IAAI,WAAW;AAC9C;;"}
@@ -5,6 +5,7 @@ import { Ref } from "../types/api/ref";
5
5
  * @param refs - A list of refs to search.
6
6
  *
7
7
  * @returns The master ref from the list.
8
+ *
8
9
  * @throws If a matching ref cannot be found.
9
10
  */
10
11
  export declare const findMasterRef: (refs: Ref[]) => Ref;
@@ -1 +1 @@
1
- {"version":3,"file":"findMasterRef.js","sources":["../../../src/lib/findMasterRef.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the master ref from a list of given refs.\n *\n * @param refs - A list of refs to search.\n *\n * @returns The master ref from the list.\n * @throws If a matching ref cannot be found.\n */\nexport const findMasterRef = (refs: Ref[]): Ref => {\n\treturn findRef(refs, (ref) => ref.isMasterRef);\n};\n"],"names":[],"mappings":";AAYa,MAAA,gBAAgB,CAAC,SAAoB;AACjD,SAAO,QAAQ,MAAM,CAAC,QAAQ,IAAI,WAAW;AAC9C;"}
1
+ {"version":3,"file":"findMasterRef.js","sources":["../../../src/lib/findMasterRef.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the master ref from a list of given refs.\n *\n * @param refs - A list of refs to search.\n *\n * @returns The master ref from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findMasterRef = (refs: Ref[]): Ref => {\n\treturn findRef(refs, (ref) => ref.isMasterRef);\n};\n"],"names":[],"mappings":";AAaa,MAAA,gBAAgB,CAAC,SAAoB;AACjD,SAAO,QAAQ,MAAM,CAAC,QAAQ,IAAI,WAAW;AAC9C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"findRef.cjs","sources":["../../../src/lib/findRef.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { PrismicError } from \"../errors/PrismicError\";\n\n/**\n * Returns the first ref from a list that passes a filter (a function that\n * returns true).\n *\n * @param refs - A list of refs to search.\n * @param filter - A function that determines if a ref from the list matches\n * the criteria.\n *\n * @returns The first matching ref.\n * @throws If a matching ref cannot be found.\n */\nexport const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {\n\tconst ref = refs.find((ref) => filter(ref));\n\n\tif (!ref) {\n\t\tthrow new PrismicError(\"Ref could not be found.\", undefined, undefined);\n\t}\n\n\treturn ref;\n};\n"],"names":["ref","PrismicError"],"mappings":";;;AAea,MAAA,UAAU,CAAC,MAAa,WAAsC;AAC1E,QAAM,MAAM,KAAK,KAAK,CAACA,SAAQ,OAAOA,IAAG,CAAC;AAE1C,MAAI,CAAC,KAAK;AACT,UAAM,IAAIC,aAAA,aAAa,2BAA2B,QAAW,MAAS;AAAA,EACtE;AAEM,SAAA;AACR;;"}
1
+ {"version":3,"file":"findRef.cjs","sources":["../../../src/lib/findRef.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { PrismicError } from \"../errors/PrismicError\";\n\n/**\n * Returns the first ref from a list that passes a filter (a function that\n * returns true).\n *\n * @param refs - A list of refs to search.\n * @param filter - A function that determines if a ref from the list matches the\n * criteria.\n *\n * @returns The first matching ref.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {\n\tconst ref = refs.find((ref) => filter(ref));\n\n\tif (!ref) {\n\t\tthrow new PrismicError(\"Ref could not be found.\", undefined, undefined);\n\t}\n\n\treturn ref;\n};\n"],"names":["ref","PrismicError"],"mappings":";;;AAgBa,MAAA,UAAU,CAAC,MAAa,WAAsC;AAC1E,QAAM,MAAM,KAAK,KAAK,CAACA,SAAQ,OAAOA,IAAG,CAAC;AAE1C,MAAI,CAAC,KAAK;AACT,UAAM,IAAIC,aAAA,aAAa,2BAA2B,QAAW,MAAS;AAAA,EACtE;AAEM,SAAA;AACR;;"}
@@ -4,10 +4,11 @@ import { Ref } from "../types/api/ref";
4
4
  * returns true).
5
5
  *
6
6
  * @param refs - A list of refs to search.
7
- * @param filter - A function that determines if a ref from the list matches
8
- * the criteria.
7
+ * @param filter - A function that determines if a ref from the list matches the
8
+ * criteria.
9
9
  *
10
10
  * @returns The first matching ref.
11
+ *
11
12
  * @throws If a matching ref cannot be found.
12
13
  */
13
14
  export declare const findRef: (refs: Ref[], filter: (ref: Ref) => boolean) => Ref;
@@ -1 +1 @@
1
- {"version":3,"file":"findRef.js","sources":["../../../src/lib/findRef.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { PrismicError } from \"../errors/PrismicError\";\n\n/**\n * Returns the first ref from a list that passes a filter (a function that\n * returns true).\n *\n * @param refs - A list of refs to search.\n * @param filter - A function that determines if a ref from the list matches\n * the criteria.\n *\n * @returns The first matching ref.\n * @throws If a matching ref cannot be found.\n */\nexport const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {\n\tconst ref = refs.find((ref) => filter(ref));\n\n\tif (!ref) {\n\t\tthrow new PrismicError(\"Ref could not be found.\", undefined, undefined);\n\t}\n\n\treturn ref;\n};\n"],"names":["ref"],"mappings":";AAea,MAAA,UAAU,CAAC,MAAa,WAAsC;AAC1E,QAAM,MAAM,KAAK,KAAK,CAACA,SAAQ,OAAOA,IAAG,CAAC;AAE1C,MAAI,CAAC,KAAK;AACT,UAAM,IAAI,aAAa,2BAA2B,QAAW,MAAS;AAAA,EACtE;AAEM,SAAA;AACR;"}
1
+ {"version":3,"file":"findRef.js","sources":["../../../src/lib/findRef.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { PrismicError } from \"../errors/PrismicError\";\n\n/**\n * Returns the first ref from a list that passes a filter (a function that\n * returns true).\n *\n * @param refs - A list of refs to search.\n * @param filter - A function that determines if a ref from the list matches the\n * criteria.\n *\n * @returns The first matching ref.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {\n\tconst ref = refs.find((ref) => filter(ref));\n\n\tif (!ref) {\n\t\tthrow new PrismicError(\"Ref could not be found.\", undefined, undefined);\n\t}\n\n\treturn ref;\n};\n"],"names":["ref"],"mappings":";AAgBa,MAAA,UAAU,CAAC,MAAa,WAAsC;AAC1E,QAAM,MAAM,KAAK,KAAK,CAACA,SAAQ,OAAOA,IAAG,CAAC;AAE1C,MAAI,CAAC,KAAK;AACT,UAAM,IAAI,aAAa,2BAA2B,QAAW,MAAS;AAAA,EACtE;AAEM,SAAA;AACR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"findRefByID.cjs","sources":["../../../src/lib/findRefByID.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the ref from a list of given refs with a matching ID.\n *\n * @param refs - A list of refs to search.\n * @param id - The ID of the ref to find.\n *\n * @returns The ref with a matching ID from the list.\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByID = (refs: Ref[], id: string): Ref => {\n\treturn findRef(refs, (ref) => ref.id === id);\n};\n"],"names":["findRef"],"mappings":";;;AAaa,MAAA,cAAc,CAAC,MAAa,OAAmB;AAC3D,SAAOA,QAAAA,QAAQ,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE;AAC5C;;"}
1
+ {"version":3,"file":"findRefByID.cjs","sources":["../../../src/lib/findRefByID.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the ref from a list of given refs with a matching ID.\n *\n * @param refs - A list of refs to search.\n * @param id - The ID of the ref to find.\n *\n * @returns The ref with a matching ID from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByID = (refs: Ref[], id: string): Ref => {\n\treturn findRef(refs, (ref) => ref.id === id);\n};\n"],"names":["findRef"],"mappings":";;;AAca,MAAA,cAAc,CAAC,MAAa,OAAmB;AAC3D,SAAOA,QAAAA,QAAQ,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE;AAC5C;;"}
@@ -6,6 +6,7 @@ import { Ref } from "../types/api/ref";
6
6
  * @param id - The ID of the ref to find.
7
7
  *
8
8
  * @returns The ref with a matching ID from the list.
9
+ *
9
10
  * @throws If a matching ref cannot be found.
10
11
  */
11
12
  export declare const findRefByID: (refs: Ref[], id: string) => Ref;
@@ -1 +1 @@
1
- {"version":3,"file":"findRefByID.js","sources":["../../../src/lib/findRefByID.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the ref from a list of given refs with a matching ID.\n *\n * @param refs - A list of refs to search.\n * @param id - The ID of the ref to find.\n *\n * @returns The ref with a matching ID from the list.\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByID = (refs: Ref[], id: string): Ref => {\n\treturn findRef(refs, (ref) => ref.id === id);\n};\n"],"names":[],"mappings":";AAaa,MAAA,cAAc,CAAC,MAAa,OAAmB;AAC3D,SAAO,QAAQ,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE;AAC5C;"}
1
+ {"version":3,"file":"findRefByID.js","sources":["../../../src/lib/findRefByID.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the ref from a list of given refs with a matching ID.\n *\n * @param refs - A list of refs to search.\n * @param id - The ID of the ref to find.\n *\n * @returns The ref with a matching ID from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByID = (refs: Ref[], id: string): Ref => {\n\treturn findRef(refs, (ref) => ref.id === id);\n};\n"],"names":[],"mappings":";AAca,MAAA,cAAc,CAAC,MAAa,OAAmB;AAC3D,SAAO,QAAQ,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE;AAC5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"findRefByLabel.cjs","sources":["../../../src/lib/findRefByLabel.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the ref from a list of given refs with a matching label.\n *\n * @param refs - A list of refs to search.\n * @param id - The label of the ref to find.\n *\n * @returns The ref with a matching label from the list.\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByLabel = (refs: Ref[], label: string): Ref => {\n\treturn findRef(refs, (ref) => ref.label === label);\n};\n"],"names":["findRef"],"mappings":";;;AAaa,MAAA,iBAAiB,CAAC,MAAa,UAAsB;AACjE,SAAOA,QAAAA,QAAQ,MAAM,CAAC,QAAQ,IAAI,UAAU,KAAK;AAClD;;"}
1
+ {"version":3,"file":"findRefByLabel.cjs","sources":["../../../src/lib/findRefByLabel.ts"],"sourcesContent":["import { Ref } from \"../types/api/ref\";\n\nimport { findRef } from \"./findRef\";\n\n/**\n * Returns the ref from a list of given refs with a matching label.\n *\n * @param refs - A list of refs to search.\n * @param id - The label of the ref to find.\n *\n * @returns The ref with a matching label from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByLabel = (refs: Ref[], label: string): Ref => {\n\treturn findRef(refs, (ref) => ref.label === label);\n};\n"],"names":["findRef"],"mappings":";;;AAca,MAAA,iBAAiB,CAAC,MAAa,UAAsB;AACjE,SAAOA,QAAAA,QAAQ,MAAM,CAAC,QAAQ,IAAI,UAAU,KAAK;AAClD;;"}
@@ -6,6 +6,7 @@ import { Ref } from "../types/api/ref";
6
6
  * @param id - The label of the ref to find.
7
7
  *
8
8
  * @returns The ref with a matching label from the list.
9
+ *
9
10
  * @throws If a matching ref cannot be found.
10
11
  */
11
12
  export declare const findRefByLabel: (refs: Ref[], label: string) => Ref;