nextjs-cms 0.9.42 → 0.10.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.
- package/dist/api/actions/pages.d.ts +3 -3
- package/dist/api/trpc/root.d.ts +3 -3
- package/dist/api/trpc/routers/navigation.d.ts +3 -3
- package/dist/api/trpc/server.d.ts +9 -9
- package/dist/core/config/config-loader.d.ts +2 -2
- package/dist/core/fields/photo.d.ts +6 -6
- package/dist/core/fields/photo.d.ts.map +1 -1
- package/dist/core/fields/photo.js +1 -9
- package/dist/core/fields/richText.d.ts +170 -50
- package/dist/core/fields/richText.d.ts.map +1 -1
- package/dist/core/fields/richText.js +135 -35
- package/dist/core/helpers/background.d.ts +18 -0
- package/dist/core/helpers/background.d.ts.map +1 -0
- package/dist/core/helpers/background.js +18 -0
- package/dist/core/helpers/index.d.ts +3 -1
- package/dist/core/helpers/index.d.ts.map +1 -1
- package/dist/core/helpers/index.js +2 -1
- package/dist/core/sections/category.d.ts +4 -4
- package/dist/core/sections/hasItems.d.ts +10 -10
- package/dist/core/sections/section.d.ts +3 -3
- package/dist/core/sections/simple.d.ts +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Padding colour schema — shared by every field that resizes images, so the shape stays
|
|
4
|
+
* identical across them. Only meaningful alongside `fit: 'contain'`, where the image is padded
|
|
5
|
+
* out to the full box; fields fall back to `media.images.background` from the CMS config when
|
|
6
|
+
* it is omitted.
|
|
7
|
+
*
|
|
8
|
+
* `alpha: 0` only survives in formats with an alpha channel (webp, png). Encoding transparent
|
|
9
|
+
* padding to jpeg flattens it to black, so pick an opaque colour for jpeg output.
|
|
10
|
+
*/
|
|
11
|
+
export declare const backgroundSchema: z.ZodObject<{
|
|
12
|
+
r: z.ZodNumber;
|
|
13
|
+
g: z.ZodNumber;
|
|
14
|
+
b: z.ZodNumber;
|
|
15
|
+
alpha: z.ZodNumber;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export type Background = z.infer<typeof backgroundSchema>;
|
|
18
|
+
//# sourceMappingURL=background.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/background.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;kBAO+C,CAAA;AAE5E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Padding colour schema — shared by every field that resizes images, so the shape stays
|
|
4
|
+
* identical across them. Only meaningful alongside `fit: 'contain'`, where the image is padded
|
|
5
|
+
* out to the full box; fields fall back to `media.images.background` from the CMS config when
|
|
6
|
+
* it is omitted.
|
|
7
|
+
*
|
|
8
|
+
* `alpha: 0` only survives in formats with an alpha channel (webp, png). Encoding transparent
|
|
9
|
+
* padding to jpeg flattens it to black, so pick an opaque colour for jpeg output.
|
|
10
|
+
*/
|
|
11
|
+
export const backgroundSchema = z
|
|
12
|
+
.strictObject({
|
|
13
|
+
r: z.number().min(0).max(255).describe('Red channel (0-255)'),
|
|
14
|
+
g: z.number().min(0).max(255).describe('Green channel (0-255)'),
|
|
15
|
+
b: z.number().min(0).max(255).describe('Blue channel (0-255)'),
|
|
16
|
+
alpha: z.number().min(0).max(1).describe('Alpha channel (0-1)'),
|
|
17
|
+
})
|
|
18
|
+
.describe('Background color for image padding (used with fit: contain)');
|
|
@@ -2,7 +2,9 @@ export { is } from './entity.js';
|
|
|
2
2
|
export { entityKind } from './entity.js';
|
|
3
3
|
export type { LZEntity } from './entity.js';
|
|
4
4
|
export { hasOwnEntityKind } from './entity.js';
|
|
5
|
-
export { evaluateConditionalRule, evaluateConditionalRuleGroup, normalizeConditionalRules } from './conditional-rules.js';
|
|
5
|
+
export { evaluateConditionalRule, evaluateConditionalRuleGroup, normalizeConditionalRules, } from './conditional-rules.js';
|
|
6
|
+
export { backgroundSchema } from './background.js';
|
|
7
|
+
export type { Background } from './background.js';
|
|
6
8
|
export { watermarkPositionEnum, watermarkObjectSchema, watermarkConfigSchema, WATERMARK_DEFAULTS, resolveWatermark, } from './watermark.js';
|
|
7
9
|
export type { WatermarkPosition, WatermarkObject, WatermarkConfig, ResolvedWatermark } from './watermark.js';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAI9C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAI9C,OAAO,EACH,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,GAC5B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EACH,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -4,5 +4,6 @@ export { hasOwnEntityKind } from './entity.js';
|
|
|
4
4
|
// Note: the `and` / `or` authoring wrappers are re-exported from `core/fields` (alongside the field
|
|
5
5
|
// factories that section configs use), so they are intentionally not re-exported here to avoid a
|
|
6
6
|
// duplicate export when `core/index` merges both barrels.
|
|
7
|
-
export { evaluateConditionalRule, evaluateConditionalRuleGroup, normalizeConditionalRules } from './conditional-rules.js';
|
|
7
|
+
export { evaluateConditionalRule, evaluateConditionalRuleGroup, normalizeConditionalRules, } from './conditional-rules.js';
|
|
8
|
+
export { backgroundSchema } from './background.js';
|
|
8
9
|
export { watermarkPositionEnum, watermarkObjectSchema, watermarkConfigSchema, WATERMARK_DEFAULTS, resolveWatermark, } from './watermark.js';
|