@valbuild/core 0.65.0 → 0.65.3

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.
@@ -21,8 +21,6 @@ export type ImageMetadata = {
21
21
  hotspot?: {
22
22
  x: number;
23
23
  y: number;
24
- height: number;
25
- width: number;
26
24
  };
27
25
  };
28
26
  export declare class ImageSchema<Src extends FileSource<ImageMetadata | undefined> | null> extends Schema<Src> {
@@ -2366,6 +2366,14 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
2366
2366
  }]);
2367
2367
  }
2368
2368
  if (src.metadata) {
2369
+ if (src.metadata.hotspot) {
2370
+ if (_typeof(src.metadata.hotspot) !== "object" || typeof src.metadata.hotspot.x !== "number" || typeof src.metadata.hotspot.y !== "number") {
2371
+ return _defineProperty({}, path, [{
2372
+ message: "Hotspot must be an object with x and y as numbers.",
2373
+ value: src
2374
+ }]);
2375
+ }
2376
+ }
2369
2377
  return _defineProperty({}, path, [{
2370
2378
  message: "Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and the mime type.",
2371
2379
  // These validation errors will have to be picked up by logic outside of this package and revalidated. Reasons: 1) we have to read files to verify the metadata, which is handled differently in different runtimes (Browser, QuickJS, Node.js); 2) we want to keep this package dependency free.
@@ -2366,6 +2366,14 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
2366
2366
  }]);
2367
2367
  }
2368
2368
  if (src.metadata) {
2369
+ if (src.metadata.hotspot) {
2370
+ if (_typeof(src.metadata.hotspot) !== "object" || typeof src.metadata.hotspot.x !== "number" || typeof src.metadata.hotspot.y !== "number") {
2371
+ return _defineProperty({}, path, [{
2372
+ message: "Hotspot must be an object with x and y as numbers.",
2373
+ value: src
2374
+ }]);
2375
+ }
2376
+ }
2369
2377
  return _defineProperty({}, path, [{
2370
2378
  message: "Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and the mime type.",
2371
2379
  // These validation errors will have to be picked up by logic outside of this package and revalidated. Reasons: 1) we have to read files to verify the metadata, which is handled differently in different runtimes (Browser, QuickJS, Node.js); 2) we want to keep this package dependency free.
@@ -2344,6 +2344,14 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
2344
2344
  }]);
2345
2345
  }
2346
2346
  if (src.metadata) {
2347
+ if (src.metadata.hotspot) {
2348
+ if (_typeof(src.metadata.hotspot) !== "object" || typeof src.metadata.hotspot.x !== "number" || typeof src.metadata.hotspot.y !== "number") {
2349
+ return _defineProperty({}, path, [{
2350
+ message: "Hotspot must be an object with x and y as numbers.",
2351
+ value: src
2352
+ }]);
2353
+ }
2354
+ }
2347
2355
  return _defineProperty({}, path, [{
2348
2356
  message: "Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and the mime type.",
2349
2357
  // These validation errors will have to be picked up by logic outside of this package and revalidated. Reasons: 1) we have to read files to verify the metadata, which is handled differently in different runtimes (Browser, QuickJS, Node.js); 2) we want to keep this package dependency free.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var expr_dist_valbuildCoreExpr = require('./index-48930c58.cjs.dev.js');
5
+ var expr_dist_valbuildCoreExpr = require('./index-4145963f.cjs.dev.js');
6
6
  require('./result-bb1f436e.cjs.dev.js');
7
7
  require('marked');
8
8
  require('@valbuild/core');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var expr_dist_valbuildCoreExpr = require('./index-f1a23e6c.cjs.prod.js');
5
+ var expr_dist_valbuildCoreExpr = require('./index-09f6e387.cjs.prod.js');
6
6
  require('./result-787e35f6.cjs.prod.js');
7
7
  require('marked');
8
8
  require('@valbuild/core');
@@ -1,4 +1,4 @@
1
- export { A as ArraySchema, B as BooleanSchema, D as DateSchema, F as FATAL_ERROR_TYPES, k as FILE_REF_PROP, l as FILE_REF_SUBTYPE_TAG, u as FileSchema, G as GenericSelector, t as ImageSchema, I as Internal, K as KeyOfSchema, L as LiteralSchema, M as ModuleFilePathSep, r as NumberSchema, O as ObjectSchema, R as RT_IMAGE_TAG, o as RecordSchema, v as RichTextSchema, j as Schema, q as StringSchema, U as UnionSchema, V as VAL_EXTENSION, n as derefPatch, w as deserializeSchema, i as expr, h as initVal, m as modules } from './index-65ec1d74.esm.js';
1
+ export { A as ArraySchema, B as BooleanSchema, D as DateSchema, F as FATAL_ERROR_TYPES, k as FILE_REF_PROP, l as FILE_REF_SUBTYPE_TAG, u as FileSchema, G as GenericSelector, t as ImageSchema, I as Internal, K as KeyOfSchema, L as LiteralSchema, M as ModuleFilePathSep, r as NumberSchema, O as ObjectSchema, R as RT_IMAGE_TAG, o as RecordSchema, v as RichTextSchema, j as Schema, q as StringSchema, U as UnionSchema, V as VAL_EXTENSION, n as derefPatch, w as deserializeSchema, i as expr, h as initVal, m as modules } from './index-e38a9dcf.esm.js';
2
2
  import './result-168dfc1d.esm.js';
3
3
  import 'marked';
4
4
  import '@valbuild/core';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var expr_dist_valbuildCoreExpr = require('../../dist/index-48930c58.cjs.dev.js');
5
+ var expr_dist_valbuildCoreExpr = require('../../dist/index-4145963f.cjs.dev.js');
6
6
  require('../../dist/result-bb1f436e.cjs.dev.js');
7
7
  require('marked');
8
8
  require('@valbuild/core');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var expr_dist_valbuildCoreExpr = require('../../dist/index-f1a23e6c.cjs.prod.js');
5
+ var expr_dist_valbuildCoreExpr = require('../../dist/index-09f6e387.cjs.prod.js');
6
6
  require('../../dist/result-787e35f6.cjs.prod.js');
7
7
  require('marked');
8
8
  require('@valbuild/core');
@@ -1,4 +1,4 @@
1
- export { C as Call, E as Expr, N as NilSym, S as StringLiteral, e as StringTemplate, f as Sym, g as evaluate, p as parse } from '../../dist/index-65ec1d74.esm.js';
1
+ export { C as Call, E as Expr, N as NilSym, S as StringLiteral, e as StringTemplate, f as Sym, g as evaluate, p as parse } from '../../dist/index-e38a9dcf.esm.js';
2
2
  import '../../dist/result-168dfc1d.esm.js';
3
3
  import 'marked';
4
4
  import '@valbuild/core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/core",
3
- "version": "0.65.0",
3
+ "version": "0.65.3",
4
4
  "private": false,
5
5
  "description": "Val - supercharged hard-coded content",
6
6
  "scripts": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var expr_dist_valbuildCoreExpr = require('../../dist/index-48930c58.cjs.dev.js');
5
+ var expr_dist_valbuildCoreExpr = require('../../dist/index-4145963f.cjs.dev.js');
6
6
  var result = require('../../dist/result-bb1f436e.cjs.dev.js');
7
7
  var util = require('../../dist/util-b213092b.cjs.dev.js');
8
8
  require('marked');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var expr_dist_valbuildCoreExpr = require('../../dist/index-f1a23e6c.cjs.prod.js');
5
+ var expr_dist_valbuildCoreExpr = require('../../dist/index-09f6e387.cjs.prod.js');
6
6
  var result = require('../../dist/result-787e35f6.cjs.prod.js');
7
7
  var util = require('../../dist/util-030d8a1f.cjs.prod.js');
8
8
  require('marked');
@@ -1,5 +1,5 @@
1
- import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-65ec1d74.esm.js';
2
- export { P as PatchError } from '../../dist/index-65ec1d74.esm.js';
1
+ import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-e38a9dcf.esm.js';
2
+ export { P as PatchError } from '../../dist/index-e38a9dcf.esm.js';
3
3
  import { f as isNonEmpty, e as err, o as ok, m as map, g as flatMap, i as isErr, h as flatMapReduce, j as filterOrElse, k as mapErr, l as map$1, n as all, p as flatten, q as allT } from '../../dist/result-168dfc1d.esm.js';
4
4
  import { p as pipe } from '../../dist/util-18613e99.esm.js';
5
5
  import 'marked';