@valbuild/core 0.14.0 → 0.16.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 (66) hide show
  1. package/dist/SelectorProxy-2af1b2b8.cjs.prod.js +756 -0
  2. package/dist/SelectorProxy-63c2d0e2.esm.js +722 -0
  3. package/dist/SelectorProxy-873782a5.cjs.dev.js +756 -0
  4. package/dist/declarations/src/index.d.ts +2 -0
  5. package/dist/declarations/src/initVal.d.ts +1 -1
  6. package/dist/declarations/src/patch/index.d.ts +1 -1
  7. package/dist/declarations/src/patch/util.d.ts +2 -0
  8. package/dist/declarations/src/schema/array.d.ts +3 -2
  9. package/dist/declarations/src/schema/boolean.d.ts +3 -2
  10. package/dist/declarations/src/schema/i18n.d.ts +3 -2
  11. package/dist/declarations/src/schema/image.d.ts +3 -2
  12. package/dist/declarations/src/schema/index.d.ts +5 -2
  13. package/dist/declarations/src/schema/literal.d.ts +3 -2
  14. package/dist/declarations/src/schema/number.d.ts +3 -2
  15. package/dist/declarations/src/schema/object.d.ts +3 -2
  16. package/dist/declarations/src/schema/oneOf.d.ts +3 -2
  17. package/dist/declarations/src/schema/richtext.d.ts +3 -2
  18. package/dist/declarations/src/schema/string.d.ts +3 -2
  19. package/dist/declarations/src/schema/union.d.ts +3 -2
  20. package/dist/declarations/src/schema/validation/ValidationError.d.ts +14 -0
  21. package/dist/declarations/src/schema/validation/ValidationFix.d.ts +2 -0
  22. package/dist/index-2fff5ca8.cjs.dev.js +456 -0
  23. package/dist/{index-06df0a5b.esm.js → index-af761363.esm.js} +2 -555
  24. package/dist/index-cac9ecbd.cjs.prod.js +456 -0
  25. package/dist/ops-1b6e0e35.cjs.prod.js +552 -0
  26. package/dist/ops-74661336.esm.js +541 -0
  27. package/dist/ops-ea4827fc.cjs.dev.js +552 -0
  28. package/dist/valbuild-core.cjs.dev.js +151 -531
  29. package/dist/valbuild-core.cjs.prod.js +151 -531
  30. package/dist/valbuild-core.esm.js +65 -445
  31. package/expr/dist/valbuild-core-expr.cjs.dev.js +8 -8
  32. package/expr/dist/valbuild-core-expr.cjs.prod.js +8 -8
  33. package/expr/dist/valbuild-core-expr.esm.js +2 -2
  34. package/package.json +2 -1
  35. package/patch/dist/valbuild-core-patch.cjs.dev.js +30 -21
  36. package/patch/dist/valbuild-core-patch.cjs.prod.js +30 -21
  37. package/patch/dist/valbuild-core-patch.esm.js +12 -4
  38. package/src/expr/repl.ts +2 -2
  39. package/src/index.ts +5 -0
  40. package/src/initVal.ts +1 -1
  41. package/src/patch/index.ts +1 -0
  42. package/src/patch/util.ts +7 -0
  43. package/src/schema/array.ts +45 -4
  44. package/src/schema/boolean.ts +14 -3
  45. package/src/schema/i18n.ts +4 -2
  46. package/src/schema/image.ts +65 -5
  47. package/src/schema/index.ts +23 -2
  48. package/src/schema/literal.ts +24 -3
  49. package/src/schema/number.ts +14 -3
  50. package/src/schema/object.ts +50 -7
  51. package/src/schema/oneOf.ts +3 -2
  52. package/src/schema/richtext.ts +63 -3
  53. package/src/schema/string.ts +14 -3
  54. package/src/schema/union.ts +3 -2
  55. package/src/schema/validation/ValidationError.ts +16 -0
  56. package/src/schema/validation/ValidationFix.ts +6 -0
  57. package/src/schema/validation.test.ts +226 -0
  58. package/src/selector/SelectorProxy.ts +1 -1
  59. package/dist/createClass-012eebbf.esm.js +0 -109
  60. package/dist/createClass-a436dbfe.cjs.dev.js +0 -116
  61. package/dist/createClass-de7426aa.cjs.prod.js +0 -116
  62. package/dist/index-9663f28a.cjs.dev.js +0 -1037
  63. package/dist/index-b2270f8f.cjs.prod.js +0 -1037
  64. package/dist/ops-6fae92a1.esm.js +0 -12
  65. package/dist/ops-87cdbafc.cjs.dev.js +0 -14
  66. package/dist/ops-ae4d1bc2.cjs.prod.js +0 -14
@@ -1,559 +1,6 @@
1
- import { e as _toPropertyKey, a as _createClass, _ as _classCallCheck, b as _typeof, c as _slicedToArray, d as _toConsumableArray } from './createClass-012eebbf.esm.js';
1
+ import { d as _objectSpread2, j as _slicedToArray, c as _createClass, b as _classCallCheck, t as Sym, C as Call, u as StringLiteral, v as StringTemplate, n as newSelectorProxy, m as SourceOrExpr, P as Path, p as isSerializedVal, f as _typeof, w as _toConsumableArray, E as Expr, N as NilSym } from './SelectorProxy-63c2d0e2.esm.js';
2
2
  import { i as isErr, e as err, o as ok, a as isOk } from './result-b96df128.esm.js';
3
3
 
4
- function _defineProperty(obj, key, value) {
5
- key = _toPropertyKey(key);
6
- if (key in obj) {
7
- Object.defineProperty(obj, key, {
8
- value: value,
9
- enumerable: true,
10
- configurable: true,
11
- writable: true
12
- });
13
- } else {
14
- obj[key] = value;
15
- }
16
- return obj;
17
- }
18
-
19
- function ownKeys(object, enumerableOnly) {
20
- var keys = Object.keys(object);
21
- if (Object.getOwnPropertySymbols) {
22
- var symbols = Object.getOwnPropertySymbols(object);
23
- enumerableOnly && (symbols = symbols.filter(function (sym) {
24
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
25
- })), keys.push.apply(keys, symbols);
26
- }
27
- return keys;
28
- }
29
- function _objectSpread2(target) {
30
- for (var i = 1; i < arguments.length; i++) {
31
- var source = null != arguments[i] ? arguments[i] : {};
32
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
33
- _defineProperty(target, key, source[key]);
34
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
35
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
36
- });
37
- }
38
- return target;
39
- }
40
-
41
- function _setPrototypeOf(o, p) {
42
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
43
- o.__proto__ = p;
44
- return o;
45
- };
46
- return _setPrototypeOf(o, p);
47
- }
48
-
49
- function _inherits(subClass, superClass) {
50
- if (typeof superClass !== "function" && superClass !== null) {
51
- throw new TypeError("Super expression must either be null or a function");
52
- }
53
- subClass.prototype = Object.create(superClass && superClass.prototype, {
54
- constructor: {
55
- value: subClass,
56
- writable: true,
57
- configurable: true
58
- }
59
- });
60
- Object.defineProperty(subClass, "prototype", {
61
- writable: false
62
- });
63
- if (superClass) _setPrototypeOf(subClass, superClass);
64
- }
65
-
66
- function _getPrototypeOf(o) {
67
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
68
- return o.__proto__ || Object.getPrototypeOf(o);
69
- };
70
- return _getPrototypeOf(o);
71
- }
72
-
73
- function _isNativeReflectConstruct() {
74
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
75
- if (Reflect.construct.sham) return false;
76
- if (typeof Proxy === "function") return true;
77
- try {
78
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
79
- return true;
80
- } catch (e) {
81
- return false;
82
- }
83
- }
84
-
85
- function _assertThisInitialized(self) {
86
- if (self === void 0) {
87
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
88
- }
89
- return self;
90
- }
91
-
92
- function _possibleConstructorReturn(self, call) {
93
- if (call && (typeof call === "object" || typeof call === "function")) {
94
- return call;
95
- } else if (call !== void 0) {
96
- throw new TypeError("Derived constructors may only return object or undefined");
97
- }
98
- return _assertThisInitialized(self);
99
- }
100
-
101
- function _createSuper(Derived) {
102
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
103
- return function _createSuperInternal() {
104
- var Super = _getPrototypeOf(Derived),
105
- result;
106
- if (hasNativeReflectConstruct) {
107
- var NewTarget = _getPrototypeOf(this).constructor;
108
- result = Reflect.construct(Super, arguments, NewTarget);
109
- } else {
110
- result = Super.apply(this, arguments);
111
- }
112
- return _possibleConstructorReturn(this, result);
113
- };
114
- }
115
-
116
- var Schema = /*#__PURE__*/function () {
117
- function Schema() {
118
- _classCallCheck(this, Schema);
119
- }
120
- _createClass(Schema, [{
121
- key: "remote",
122
- value: function remote() {
123
- // TODO: Schema<never, "Cannot create remote schema from non-remote source.">
124
- throw new Error("You need Val Ultra to use .remote()");
125
- }
126
- }]);
127
- return Schema;
128
- }();
129
-
130
- // TODO: SourceError<"Could not determine type of Schema">
131
-
132
- /* eslint-disable @typescript-eslint/no-unused-vars */
133
-
134
- /**
135
- * Selectors can be used to select parts of a Val module.
136
- * Unlike queries, joins, aggregates etc is and will not be supported.
137
- *
138
- * They are designed to be be used as if they were "normal" JSON data,
139
- * though some concessions had to be made because of TypeScript limitations.
140
- *
141
- * Selectors works equally on source content, defined in code, and remote content.
142
- *
143
- * @example
144
- * // Select the title of a document
145
- * const titles = useVal(docsVal.map((doc) => doc.title));
146
- *
147
- * @example
148
- * // Match on a union type
149
- * const titles = useVal(docsVal.map((doc) => doc.fold("type")({
150
- * newsletter: (newsletter) => newsletter.title,
151
- * email: (email) => email.subject,
152
- * }));
153
- *
154
- */
155
-
156
- /**
157
- * @internal
158
- */
159
- var GetSchema = Symbol("GetSchema");
160
- /**
161
- /**
162
- * @internal
163
- */
164
- var Path = Symbol("Path");
165
- /**
166
- * @internal
167
- */
168
- var SourceOrExpr = Symbol("SourceOrExpr");
169
- /**
170
- * @internal
171
- */
172
- var ValError = Symbol("ValError");
173
- var GenericSelector = /*#__PURE__*/function () {
174
- function GenericSelector(valOrExpr, path, schema, error) {
175
- _classCallCheck(this, GenericSelector);
176
- this[Path] = path;
177
- this[SourceOrExpr] = valOrExpr;
178
- this[ValError] = error;
179
- this[GetSchema] = schema;
180
- }
181
- _createClass(GenericSelector, [{
182
- key: "assert",
183
- value: function assert(schema, other) {
184
- throw new Error("Not implemented");
185
- }
186
- }]);
187
- return GenericSelector;
188
- }();
189
-
190
- /**
191
- * Use this type to convert types that accepts both Source and Selectors
192
- *
193
- * An example would be where literals are supported like in most higher order functions (e.g. map in array)
194
- **/
195
-
196
- function getSchema(selector) {
197
- return selector[GetSchema];
198
- }
199
-
200
- /* eslint-disable @typescript-eslint/no-unused-vars */
201
-
202
- var Expr = /*#__PURE__*/_createClass(function Expr(span) {
203
- _classCallCheck(this, Expr);
204
- this.span = span;
205
- });
206
- var StringLiteral = /*#__PURE__*/function (_Expr) {
207
- _inherits(StringLiteral, _Expr);
208
- var _super = _createSuper(StringLiteral);
209
- function StringLiteral(value, span) {
210
- var _this;
211
- _classCallCheck(this, StringLiteral);
212
- _this = _super.call(this, span);
213
- _defineProperty(_assertThisInitialized(_this), "type", "StringLiteral");
214
- _this.value = value;
215
- return _this;
216
- }
217
- _createClass(StringLiteral, [{
218
- key: "transpile",
219
- value: function transpile() {
220
- return "'".concat(this.value, "'");
221
- }
222
- }]);
223
- return StringLiteral;
224
- }(Expr);
225
- var Sym = /*#__PURE__*/function (_Expr2) {
226
- _inherits(Sym, _Expr2);
227
- var _super2 = _createSuper(Sym);
228
- function Sym(value, span) {
229
- var _this2;
230
- _classCallCheck(this, Sym);
231
- _this2 = _super2.call(this, span);
232
- _defineProperty(_assertThisInitialized(_this2), "type", "Sym");
233
- _this2.value = value;
234
- return _this2;
235
- }
236
- _createClass(Sym, [{
237
- key: "transpile",
238
- value: function transpile() {
239
- return this.value;
240
- }
241
- }]);
242
- return Sym;
243
- }(Expr);
244
- var NilSym = new Sym("()");
245
- var StringTemplate = /*#__PURE__*/function (_Expr3) {
246
- _inherits(StringTemplate, _Expr3);
247
- var _super3 = _createSuper(StringTemplate);
248
- function StringTemplate(children, span) {
249
- var _this3;
250
- _classCallCheck(this, StringTemplate);
251
- _this3 = _super3.call(this, span);
252
- _defineProperty(_assertThisInitialized(_this3), "type", "StringTemplate");
253
- _this3.children = children;
254
- return _this3;
255
- }
256
- _createClass(StringTemplate, [{
257
- key: "transpile",
258
- value: function transpile() {
259
- return "'".concat(this.children.map(function (child) {
260
- if (child instanceof StringLiteral) {
261
- return child.value;
262
- } else {
263
- return "${".concat(child.transpile(), "}");
264
- }
265
- }).join(""), "'");
266
- }
267
- }]);
268
- return StringTemplate;
269
- }(Expr);
270
- var Call = /*#__PURE__*/function (_Expr4) {
271
- _inherits(Call, _Expr4);
272
- var _super4 = _createSuper(Call);
273
- function Call(children, isAnon, span) {
274
- var _this4;
275
- _classCallCheck(this, Call);
276
- _this4 = _super4.call(this, span);
277
- _defineProperty(_assertThisInitialized(_this4), "type", "Call");
278
- _this4.children = children;
279
- _this4.isAnon = isAnon;
280
- return _this4;
281
- }
282
- _createClass(Call, [{
283
- key: "transpile",
284
- value: function transpile() {
285
- if (this.isAnon) {
286
- return "!(".concat(this.children.map(function (child) {
287
- return child.transpile();
288
- }).join(" "), ")");
289
- }
290
- return "(".concat(this.children.map(function (child) {
291
- return child.transpile();
292
- }).join(" "), ")");
293
- }
294
- }]);
295
- return Call;
296
- }(Expr);
297
-
298
- /* Branded extension types: file, remote, i18n */
299
- var VAL_EXTENSION = "_type";
300
-
301
- /**
302
- * A phantom type parameter is one that doesn't show up at runtime, but is checked statically (and only) at compile time.
303
- *
304
- * An example where this is useful is remote types, where the type of the remote source is known at compile time,
305
- * but the value is not there before it is fetched.
306
- *
307
- * @example
308
- * type Example<T> = string & PhantomType<T>;
309
- *
310
- **/
311
-
312
- var FILE_REF_PROP = "_ref";
313
-
314
- /**
315
- * A file source represents the path to a (local) file.
316
- *
317
- * It will be resolved into a Asset object.
318
- *
319
- */
320
-
321
- function file(ref, metadata) {
322
- var _ref;
323
- return _ref = {}, _defineProperty(_ref, FILE_REF_PROP, ref), _defineProperty(_ref, VAL_EXTENSION, "file"), _defineProperty(_ref, "metadata", metadata), _ref;
324
- }
325
- function isFile(obj) {
326
- return _typeof(obj) === "object" && obj !== null && VAL_EXTENSION in obj && obj[VAL_EXTENSION] === "file" && FILE_REF_PROP in obj && typeof obj[FILE_REF_PROP] === "string";
327
- }
328
-
329
- var ImageSchema = /*#__PURE__*/function (_Schema) {
330
- _inherits(ImageSchema, _Schema);
331
- var _super = _createSuper(ImageSchema);
332
- function ImageSchema(options) {
333
- var _this;
334
- var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
335
- _classCallCheck(this, ImageSchema);
336
- _this = _super.call(this);
337
- _this.options = options;
338
- _this.opt = opt;
339
- return _this;
340
- }
341
- _createClass(ImageSchema, [{
342
- key: "validate",
343
- value: function validate(src) {
344
- throw new Error("Method not implemented.");
345
- }
346
- }, {
347
- key: "match",
348
- value: function match(src) {
349
- // TODO:
350
- return true;
351
- }
352
- }, {
353
- key: "optional",
354
- value: function optional() {
355
- return new ImageSchema(this.options, true);
356
- }
357
- }, {
358
- key: "serialize",
359
- value: function serialize() {
360
- return {
361
- type: "image",
362
- options: this.options,
363
- opt: this.opt
364
- };
365
- }
366
- }]);
367
- return ImageSchema;
368
- }(Schema);
369
- var image = function image(options) {
370
- return new ImageSchema(options);
371
- };
372
- var convertImageSource = function convertImageSource(src) {
373
- var _src$metadata;
374
- // TODO: /public should be configurable
375
- return {
376
- url: src[FILE_REF_PROP].slice("/public".length) + "?sha256=".concat((_src$metadata = src.metadata) === null || _src$metadata === void 0 ? void 0 : _src$metadata.sha256),
377
- metadata: src.metadata
378
- };
379
- };
380
-
381
- function isSerializedVal(val) {
382
- return _typeof(val) === "object" && val !== null && val !== undefined && ("val" in val || "valPath" in val);
383
- }
384
- function isVal(val) {
385
- return _typeof(val) === "object" && val !== null && val !== undefined && Path in val && "val" in val;
386
- }
387
-
388
- /**
389
- * The path of the source value.
390
- *
391
- * @example
392
- * '/app/blogs.0.text' // the text property of the first element of the /app/blogs module
393
- */
394
-
395
- /**
396
- * The path inside the module.
397
- *
398
- * @example
399
- * '0."text"' // the text property of the first element of the module
400
- */
401
-
402
- /**
403
- * The id of the module.
404
- *
405
- * @example
406
- * '/app/blogs' // the /app/blogs module
407
- */
408
-
409
- function getValPath(valOrSelector) {
410
- return valOrSelector[Path];
411
- }
412
-
413
- function hasOwn(obj, prop) {
414
- return Object.prototype.hasOwnProperty.call(obj, prop);
415
- }
416
- function _andThen(f, source, path) {
417
- if (source) {
418
- return newSelectorProxy(f(newSelectorProxy(source, path)));
419
- }
420
- return newSelectorProxy(source, path);
421
- }
422
- function isSelector(source) {
423
- return _typeof(source) === "object" && source !== null && (SourceOrExpr in source || Path in source);
424
- }
425
- function newSelectorProxy(source, path, moduleSchema) {
426
- var _ref;
427
- if (_typeof(source) === "object") {
428
- if (isSelector(source)) {
429
- return source;
430
- } else if (isSerializedVal(source)) {
431
- return newSelectorProxy(source.val, source.valPath);
432
- }
433
- }
434
- if (source && source[FILE_REF_PROP] && source[VAL_EXTENSION] === "file") {
435
- var fileRef = source[FILE_REF_PROP];
436
- if (typeof fileRef !== "string") {
437
- throw Error("Invalid file ref: " + fileRef);
438
- }
439
- return newSelectorProxy(convertImageSource(source), path, moduleSchema);
440
- }
441
- switch (_typeof(source)) {
442
- case "function":
443
- case "symbol":
444
- throw Error("Invalid selector type: ".concat(_typeof(source), ": ").concat(source));
445
- case "object":
446
- // Handles both objects and arrays!
447
- if (source !== null) {
448
- return new Proxy(source, {
449
- // TODO: see proxy docs if we want more traps
450
- has: function has(target, prop) {
451
- if (prop === SourceOrExpr) {
452
- return true;
453
- }
454
- if (prop === Path) {
455
- return true;
456
- }
457
- if (prop === "andThen") {
458
- return true;
459
- }
460
- if (prop === GetSchema) {
461
- return true;
462
- }
463
- return prop in target;
464
- },
465
- get: function get(target, prop) {
466
- if (prop === SourceOrExpr) {
467
- return source;
468
- }
469
- if (prop === Path) {
470
- return path;
471
- }
472
- if (prop === GetSchema) {
473
- return moduleSchema;
474
- }
475
- if (prop === "andThen") {
476
- return function (f) {
477
- return _andThen(f, source, path);
478
- };
479
- }
480
- if (Array.isArray(target)) {
481
- if (prop === "filter") {
482
- return function (f) {
483
- var filtered = target.map(function (a, i) {
484
- return newSelectorProxy(a, createValPathOfItem(path, i), moduleSchema === null || moduleSchema === void 0 ? void 0 : moduleSchema.item);
485
- }).filter(function (a) {
486
- if (f && f instanceof Schema) {
487
- return f.match(unValify(a));
488
- } else {
489
- return unValify(f(a));
490
- }
491
- });
492
- return newSelectorProxy(filtered, path, moduleSchema);
493
- };
494
- } else if (prop === "map") {
495
- return function (f) {
496
- var filtered = target.map(function (a, i) {
497
- var valueOrSelector = f(newSelectorProxy(a, createValPathOfItem(path, i), moduleSchema === null || moduleSchema === void 0 ? void 0 : moduleSchema.item), newSelectorProxy(i));
498
- if (isSelector(valueOrSelector)) {
499
- return valueOrSelector;
500
- }
501
- return newSelectorProxy(valueOrSelector);
502
- });
503
- return newSelectorProxy(filtered, path, moduleSchema);
504
- };
505
- }
506
- }
507
- if (Array.isArray(target) && prop === "length") {
508
- return newSelectorProxy(target.length);
509
- }
510
- var reflectedValue = Reflect.get(target, prop);
511
- if (hasOwn(source, prop)) {
512
- if (!Number.isNaN(Number(prop))) {
513
- return newSelectorProxy(reflectedValue, createValPathOfItem(path, Number(prop)), moduleSchema === null || moduleSchema === void 0 ? void 0 : moduleSchema.item);
514
- }
515
- return newSelectorProxy(reflectedValue, createValPathOfItem(path, prop), moduleSchema === null || moduleSchema === void 0 ? void 0 : moduleSchema.items[prop]);
516
- }
517
- return reflectedValue;
518
- }
519
- });
520
- }
521
- // intentional fallthrough
522
- // eslint-disable-next-line no-fallthrough
523
- default:
524
- return _ref = {
525
- eq: function eq(other) {
526
- var otherValue = other;
527
- if (isSelector(other)) {
528
- otherValue = other[SourceOrExpr];
529
- if (otherValue instanceof Expr) {
530
- throw Error("TODO: Cannot evaluate equality with an Expr");
531
- }
532
- }
533
- return newSelectorProxy(source === otherValue, undefined);
534
- },
535
- andThen: function andThen(f) {
536
- return _andThen(f, source === undefined ? null : source, path);
537
- }
538
- }, _defineProperty(_ref, SourceOrExpr, source === undefined ? null : source), _defineProperty(_ref, Path, path), _defineProperty(_ref, GetSchema, moduleSchema), _ref;
539
- }
540
- }
541
- function createValPathOfItem(arrayPath, prop) {
542
- if (_typeof(prop) === "symbol") {
543
- throw Error("Cannot create val path of array item with symbol prop: ".concat(prop.toString()));
544
- }
545
- return arrayPath && "".concat(arrayPath, ".").concat(JSON.stringify(prop));
546
- }
547
-
548
- // TODO: could we do .val on the objects instead?
549
- function unValify(valueOrSelector) {
550
- if (_typeof(valueOrSelector) === "object" && (SourceOrExpr in valueOrSelector || Path in valueOrSelector)) {
551
- var selectorValue = valueOrSelector[SourceOrExpr];
552
- return selectorValue;
553
- }
554
- return valueOrSelector;
555
- }
556
-
557
4
  var WHITE_SPACE = ["\n", "\r", "\t", " "];
558
5
  function tokenize(input) {
559
6
  var tokens = [];
@@ -1002,4 +449,4 @@ var index = /*#__PURE__*/Object.freeze({
1002
449
  evaluate: evaluate
1003
450
  });
1004
451
 
1005
- export { Call as C, Expr as E, FILE_REF_PROP as F, GenericSelector as G, ImageSchema as I, NilSym as N, Path as P, Schema as S, VAL_EXTENSION as V, _inherits as _, _createSuper as a, SourceOrExpr as b, _objectSpread2 as c, _defineProperty as d, isFile as e, file as f, getValPath as g, createValPathOfItem as h, image as i, isSelector as j, isSerializedVal as k, convertImageSource as l, getSchema as m, newSelectorProxy as n, isVal as o, index as p, parse as q, StringLiteral as r, StringTemplate as s, Sym as t, evaluate as u };
452
+ export { evaluate as e, index as i, parse as p };