@contentful/experiences-core 3.2.0 → 3.2.1-dev-20250818T1739-df3d95e.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.
|
@@ -52,7 +52,7 @@ declare class EntityStore extends EntityStoreBase {
|
|
|
52
52
|
get schemaVersion(): "2023-09-28" | undefined;
|
|
53
53
|
get breakpoints(): {
|
|
54
54
|
id: string;
|
|
55
|
-
query:
|
|
55
|
+
query: "*" | `>${number}px` | `<${number}px`;
|
|
56
56
|
previewSize: string;
|
|
57
57
|
displayName: string;
|
|
58
58
|
displayIcon?: "desktop" | "tablet" | "mobile" | undefined;
|
package/dist/index.js
CHANGED
|
@@ -993,10 +993,12 @@ const ParameterSchema = z.object({
|
|
|
993
993
|
path: z.string(),
|
|
994
994
|
});
|
|
995
995
|
const ParametersSchema = z.record(propertyKeySchema, ParameterSchema);
|
|
996
|
+
const BREAKPOINT_QUERY_REGEX = /^\*$|^[<>][0-9]+px$/;
|
|
996
997
|
const BreakpointSchema = z
|
|
997
998
|
.object({
|
|
998
999
|
id: propertyKeySchema,
|
|
999
|
-
|
|
1000
|
+
// Can be replace with z.templateLiteral when upgrading to zod v4
|
|
1001
|
+
query: z.string().refine((s) => BREAKPOINT_QUERY_REGEX.test(s)),
|
|
1000
1002
|
previewSize: z.string(),
|
|
1001
1003
|
displayName: z.string(),
|
|
1002
1004
|
displayIcon: z.enum(['desktop', 'tablet', 'mobile']).optional(),
|