@valbuild/core 0.48.1 → 0.50.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/declarations/src/index.d.ts +4 -0
- package/dist/declarations/src/initSchema.d.ts +3 -0
- package/dist/declarations/src/schema/file.d.ts +23 -0
- package/dist/declarations/src/schema/index.d.ts +2 -1
- package/dist/declarations/src/schema/richtext.d.ts +2 -1
- package/dist/declarations/src/schema/validation/ValidationFix.d.ts +1 -1
- package/dist/declarations/src/selector/SelectorProxy.d.ts +2 -2
- package/dist/declarations/src/source/richtext.d.ts +1 -1
- package/dist/{index-7b467ee6.cjs.prod.js → index-0391a11a.cjs.prod.js} +133 -71
- package/dist/{index-799bcf49.esm.js → index-14edbcc8.esm.js} +1 -1
- package/dist/{index-5750c299.esm.js → index-a038a0f3.esm.js} +131 -71
- package/dist/{index-d23e237a.cjs.dev.js → index-b14b0d9c.cjs.dev.js} +133 -71
- package/dist/{index-db60fc1d.cjs.prod.js → index-df01e42d.cjs.prod.js} +1 -1
- package/dist/{index-00276955.cjs.dev.js → index-f66c449e.cjs.dev.js} +1 -1
- package/dist/{ops-ffed3406.esm.js → ops-2029f7c3.esm.js} +11 -17
- package/dist/{ops-74e62ffe.cjs.dev.js → ops-2b3f01fb.cjs.dev.js} +11 -17
- package/dist/{ops-c0e7e3a8.cjs.prod.js → ops-cff2b7c2.cjs.prod.js} +11 -17
- package/dist/valbuild-core.cjs.dev.js +18 -13
- package/dist/valbuild-core.cjs.prod.js +18 -13
- package/dist/valbuild-core.esm.js +19 -15
- package/expr/dist/valbuild-core-expr.cjs.dev.js +2 -2
- package/expr/dist/valbuild-core-expr.cjs.prod.js +2 -2
- package/expr/dist/valbuild-core-expr.esm.js +2 -2
- package/package.json +1 -1
- package/patch/dist/valbuild-core-patch.cjs.dev.js +2 -2
- package/patch/dist/valbuild-core-patch.cjs.prod.js +2 -2
- package/patch/dist/valbuild-core-patch.esm.js +3 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
import { e as _typeof,
|
1
|
+
import { e as _typeof, l as isSerializedVal, F as FILE_REF_PROP, V as VAL_EXTENSION, m as convertFileSource, d as _defineProperty, G as GetSchema, k as GetSource, E as Expr, P as Path, S as Schema, _ as _inherits, a as _classCallCheck, b as _callSuper, c as _createClass, i as _slicedToArray, r as _objectSpread2, v as _toConsumableArray } from './index-a038a0f3.esm.js';
|
2
2
|
import { _ as _createForOfIteratorHelper } from './result-b96df128.esm.js';
|
3
3
|
|
4
4
|
function hasOwn(obj, prop) {
|
@@ -146,12 +146,11 @@ function unValify(valueOrSelector) {
|
|
146
146
|
|
147
147
|
var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
148
148
|
_inherits(ObjectSchema, _Schema);
|
149
|
-
var _super = _createSuper(ObjectSchema);
|
150
149
|
function ObjectSchema(items) {
|
151
150
|
var _this;
|
152
151
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
153
152
|
_classCallCheck(this, ObjectSchema);
|
154
|
-
_this =
|
153
|
+
_this = _callSuper(this, ObjectSchema);
|
155
154
|
_this.items = items;
|
156
155
|
_this.opt = opt;
|
157
156
|
return _this;
|
@@ -242,12 +241,11 @@ var object = function object(schema) {
|
|
242
241
|
|
243
242
|
var ArraySchema = /*#__PURE__*/function (_Schema) {
|
244
243
|
_inherits(ArraySchema, _Schema);
|
245
|
-
var _super = _createSuper(ArraySchema);
|
246
244
|
function ArraySchema(item) {
|
247
245
|
var _this;
|
248
246
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
249
247
|
_classCallCheck(this, ArraySchema);
|
250
|
-
_this =
|
248
|
+
_this = _callSuper(this, ArraySchema);
|
251
249
|
_this.item = item;
|
252
250
|
_this.opt = opt;
|
253
251
|
return _this;
|
@@ -330,12 +328,11 @@ var array = function array(schema) {
|
|
330
328
|
|
331
329
|
var LiteralSchema = /*#__PURE__*/function (_Schema) {
|
332
330
|
_inherits(LiteralSchema, _Schema);
|
333
|
-
var _super = _createSuper(LiteralSchema);
|
334
331
|
function LiteralSchema(value) {
|
335
332
|
var _this;
|
336
333
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
337
334
|
_classCallCheck(this, LiteralSchema);
|
338
|
-
_this =
|
335
|
+
_this = _callSuper(this, LiteralSchema);
|
339
336
|
_this.value = value;
|
340
337
|
_this.opt = opt;
|
341
338
|
return _this;
|
@@ -391,12 +388,11 @@ var literal = function literal(value) {
|
|
391
388
|
|
392
389
|
var UnionSchema = /*#__PURE__*/function (_Schema) {
|
393
390
|
_inherits(UnionSchema, _Schema);
|
394
|
-
var _super = _createSuper(UnionSchema);
|
395
391
|
function UnionSchema(key, items) {
|
396
392
|
var _this;
|
397
393
|
var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
398
394
|
_classCallCheck(this, UnionSchema);
|
399
|
-
_this =
|
395
|
+
_this = _callSuper(this, UnionSchema);
|
400
396
|
_this.key = key;
|
401
397
|
_this.items = items;
|
402
398
|
_this.opt = opt;
|
@@ -586,12 +582,11 @@ var union = function union(key) {
|
|
586
582
|
|
587
583
|
var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
588
584
|
_inherits(RichTextSchema, _Schema);
|
589
|
-
var _super = _createSuper(RichTextSchema);
|
590
585
|
function RichTextSchema(options) {
|
591
586
|
var _this;
|
592
587
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
593
588
|
_classCallCheck(this, RichTextSchema);
|
594
|
-
_this =
|
589
|
+
_this = _callSuper(this, RichTextSchema);
|
595
590
|
_this.options = options;
|
596
591
|
_this.opt = opt;
|
597
592
|
return _this;
|
@@ -616,7 +611,8 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
616
611
|
value: function serialize() {
|
617
612
|
return {
|
618
613
|
type: "richtext",
|
619
|
-
opt: this.opt
|
614
|
+
opt: this.opt,
|
615
|
+
options: this.options
|
620
616
|
};
|
621
617
|
}
|
622
618
|
}]);
|
@@ -628,12 +624,11 @@ var richtext = function richtext(options) {
|
|
628
624
|
|
629
625
|
var ImageSchema = /*#__PURE__*/function (_Schema) {
|
630
626
|
_inherits(ImageSchema, _Schema);
|
631
|
-
var _super = _createSuper(ImageSchema);
|
632
627
|
function ImageSchema(options) {
|
633
628
|
var _this;
|
634
629
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
635
630
|
_classCallCheck(this, ImageSchema);
|
636
|
-
_this =
|
631
|
+
_this = _callSuper(this, ImageSchema);
|
637
632
|
_this.options = options;
|
638
633
|
_this.opt = opt;
|
639
634
|
return _this;
|
@@ -707,12 +702,11 @@ var image = function image(options) {
|
|
707
702
|
|
708
703
|
var RecordSchema = /*#__PURE__*/function (_Schema) {
|
709
704
|
_inherits(RecordSchema, _Schema);
|
710
|
-
var _super = _createSuper(RecordSchema);
|
711
705
|
function RecordSchema(item) {
|
712
706
|
var _this;
|
713
707
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
714
708
|
_classCallCheck(this, RecordSchema);
|
715
|
-
_this =
|
709
|
+
_this = _callSuper(this, RecordSchema);
|
716
710
|
_this.item = item;
|
717
711
|
_this.opt = opt;
|
718
712
|
return _this;
|
@@ -875,7 +869,7 @@ function resolvePath(path, valModule, schema) {
|
|
875
869
|
if (_typeof(resolvedSource) !== "object" && !Array.isArray(resolvedSource)) {
|
876
870
|
throw Error("Schema type error: expected source to be type of array, but got ".concat(_typeof(resolvedSource)));
|
877
871
|
}
|
878
|
-
if (
|
872
|
+
if (resolvedSource[part] === undefined) {
|
879
873
|
var _resolvedSource;
|
880
874
|
throw Error("Invalid path: array source (length: ".concat((_resolvedSource = resolvedSource) === null || _resolvedSource === void 0 ? void 0 : _resolvedSource.length, ") did not have index ").concat(part, " from path: ").concat(path));
|
881
875
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var index = require('./index-
|
3
|
+
var index = require('./index-b14b0d9c.cjs.dev.js');
|
4
4
|
var result = require('./result-48320acd.cjs.dev.js');
|
5
5
|
|
6
6
|
function hasOwn(obj, prop) {
|
@@ -148,12 +148,11 @@ function unValify(valueOrSelector) {
|
|
148
148
|
|
149
149
|
var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
150
150
|
index._inherits(ObjectSchema, _Schema);
|
151
|
-
var _super = index._createSuper(ObjectSchema);
|
152
151
|
function ObjectSchema(items) {
|
153
152
|
var _this;
|
154
153
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
155
154
|
index._classCallCheck(this, ObjectSchema);
|
156
|
-
_this =
|
155
|
+
_this = index._callSuper(this, ObjectSchema);
|
157
156
|
_this.items = items;
|
158
157
|
_this.opt = opt;
|
159
158
|
return _this;
|
@@ -244,12 +243,11 @@ var object = function object(schema) {
|
|
244
243
|
|
245
244
|
var ArraySchema = /*#__PURE__*/function (_Schema) {
|
246
245
|
index._inherits(ArraySchema, _Schema);
|
247
|
-
var _super = index._createSuper(ArraySchema);
|
248
246
|
function ArraySchema(item) {
|
249
247
|
var _this;
|
250
248
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
251
249
|
index._classCallCheck(this, ArraySchema);
|
252
|
-
_this =
|
250
|
+
_this = index._callSuper(this, ArraySchema);
|
253
251
|
_this.item = item;
|
254
252
|
_this.opt = opt;
|
255
253
|
return _this;
|
@@ -332,12 +330,11 @@ var array = function array(schema) {
|
|
332
330
|
|
333
331
|
var LiteralSchema = /*#__PURE__*/function (_Schema) {
|
334
332
|
index._inherits(LiteralSchema, _Schema);
|
335
|
-
var _super = index._createSuper(LiteralSchema);
|
336
333
|
function LiteralSchema(value) {
|
337
334
|
var _this;
|
338
335
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
339
336
|
index._classCallCheck(this, LiteralSchema);
|
340
|
-
_this =
|
337
|
+
_this = index._callSuper(this, LiteralSchema);
|
341
338
|
_this.value = value;
|
342
339
|
_this.opt = opt;
|
343
340
|
return _this;
|
@@ -393,12 +390,11 @@ var literal = function literal(value) {
|
|
393
390
|
|
394
391
|
var UnionSchema = /*#__PURE__*/function (_Schema) {
|
395
392
|
index._inherits(UnionSchema, _Schema);
|
396
|
-
var _super = index._createSuper(UnionSchema);
|
397
393
|
function UnionSchema(key, items) {
|
398
394
|
var _this;
|
399
395
|
var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
400
396
|
index._classCallCheck(this, UnionSchema);
|
401
|
-
_this =
|
397
|
+
_this = index._callSuper(this, UnionSchema);
|
402
398
|
_this.key = key;
|
403
399
|
_this.items = items;
|
404
400
|
_this.opt = opt;
|
@@ -588,12 +584,11 @@ var union = function union(key) {
|
|
588
584
|
|
589
585
|
var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
590
586
|
index._inherits(RichTextSchema, _Schema);
|
591
|
-
var _super = index._createSuper(RichTextSchema);
|
592
587
|
function RichTextSchema(options) {
|
593
588
|
var _this;
|
594
589
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
595
590
|
index._classCallCheck(this, RichTextSchema);
|
596
|
-
_this =
|
591
|
+
_this = index._callSuper(this, RichTextSchema);
|
597
592
|
_this.options = options;
|
598
593
|
_this.opt = opt;
|
599
594
|
return _this;
|
@@ -618,7 +613,8 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
618
613
|
value: function serialize() {
|
619
614
|
return {
|
620
615
|
type: "richtext",
|
621
|
-
opt: this.opt
|
616
|
+
opt: this.opt,
|
617
|
+
options: this.options
|
622
618
|
};
|
623
619
|
}
|
624
620
|
}]);
|
@@ -630,12 +626,11 @@ var richtext = function richtext(options) {
|
|
630
626
|
|
631
627
|
var ImageSchema = /*#__PURE__*/function (_Schema) {
|
632
628
|
index._inherits(ImageSchema, _Schema);
|
633
|
-
var _super = index._createSuper(ImageSchema);
|
634
629
|
function ImageSchema(options) {
|
635
630
|
var _this;
|
636
631
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
637
632
|
index._classCallCheck(this, ImageSchema);
|
638
|
-
_this =
|
633
|
+
_this = index._callSuper(this, ImageSchema);
|
639
634
|
_this.options = options;
|
640
635
|
_this.opt = opt;
|
641
636
|
return _this;
|
@@ -709,12 +704,11 @@ var image = function image(options) {
|
|
709
704
|
|
710
705
|
var RecordSchema = /*#__PURE__*/function (_Schema) {
|
711
706
|
index._inherits(RecordSchema, _Schema);
|
712
|
-
var _super = index._createSuper(RecordSchema);
|
713
707
|
function RecordSchema(item) {
|
714
708
|
var _this;
|
715
709
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
716
710
|
index._classCallCheck(this, RecordSchema);
|
717
|
-
_this =
|
711
|
+
_this = index._callSuper(this, RecordSchema);
|
718
712
|
_this.item = item;
|
719
713
|
_this.opt = opt;
|
720
714
|
return _this;
|
@@ -877,7 +871,7 @@ function resolvePath(path, valModule, schema) {
|
|
877
871
|
if (index._typeof(resolvedSource) !== "object" && !Array.isArray(resolvedSource)) {
|
878
872
|
throw Error("Schema type error: expected source to be type of array, but got ".concat(index._typeof(resolvedSource)));
|
879
873
|
}
|
880
|
-
if (
|
874
|
+
if (resolvedSource[part] === undefined) {
|
881
875
|
var _resolvedSource;
|
882
876
|
throw Error("Invalid path: array source (length: ".concat((_resolvedSource = resolvedSource) === null || _resolvedSource === void 0 ? void 0 : _resolvedSource.length, ") did not have index ").concat(part, " from path: ").concat(path));
|
883
877
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var index = require('./index-
|
3
|
+
var index = require('./index-0391a11a.cjs.prod.js');
|
4
4
|
var result = require('./result-26f67b40.cjs.prod.js');
|
5
5
|
|
6
6
|
function hasOwn(obj, prop) {
|
@@ -148,12 +148,11 @@ function unValify(valueOrSelector) {
|
|
148
148
|
|
149
149
|
var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
150
150
|
index._inherits(ObjectSchema, _Schema);
|
151
|
-
var _super = index._createSuper(ObjectSchema);
|
152
151
|
function ObjectSchema(items) {
|
153
152
|
var _this;
|
154
153
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
155
154
|
index._classCallCheck(this, ObjectSchema);
|
156
|
-
_this =
|
155
|
+
_this = index._callSuper(this, ObjectSchema);
|
157
156
|
_this.items = items;
|
158
157
|
_this.opt = opt;
|
159
158
|
return _this;
|
@@ -244,12 +243,11 @@ var object = function object(schema) {
|
|
244
243
|
|
245
244
|
var ArraySchema = /*#__PURE__*/function (_Schema) {
|
246
245
|
index._inherits(ArraySchema, _Schema);
|
247
|
-
var _super = index._createSuper(ArraySchema);
|
248
246
|
function ArraySchema(item) {
|
249
247
|
var _this;
|
250
248
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
251
249
|
index._classCallCheck(this, ArraySchema);
|
252
|
-
_this =
|
250
|
+
_this = index._callSuper(this, ArraySchema);
|
253
251
|
_this.item = item;
|
254
252
|
_this.opt = opt;
|
255
253
|
return _this;
|
@@ -332,12 +330,11 @@ var array = function array(schema) {
|
|
332
330
|
|
333
331
|
var LiteralSchema = /*#__PURE__*/function (_Schema) {
|
334
332
|
index._inherits(LiteralSchema, _Schema);
|
335
|
-
var _super = index._createSuper(LiteralSchema);
|
336
333
|
function LiteralSchema(value) {
|
337
334
|
var _this;
|
338
335
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
339
336
|
index._classCallCheck(this, LiteralSchema);
|
340
|
-
_this =
|
337
|
+
_this = index._callSuper(this, LiteralSchema);
|
341
338
|
_this.value = value;
|
342
339
|
_this.opt = opt;
|
343
340
|
return _this;
|
@@ -393,12 +390,11 @@ var literal = function literal(value) {
|
|
393
390
|
|
394
391
|
var UnionSchema = /*#__PURE__*/function (_Schema) {
|
395
392
|
index._inherits(UnionSchema, _Schema);
|
396
|
-
var _super = index._createSuper(UnionSchema);
|
397
393
|
function UnionSchema(key, items) {
|
398
394
|
var _this;
|
399
395
|
var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
400
396
|
index._classCallCheck(this, UnionSchema);
|
401
|
-
_this =
|
397
|
+
_this = index._callSuper(this, UnionSchema);
|
402
398
|
_this.key = key;
|
403
399
|
_this.items = items;
|
404
400
|
_this.opt = opt;
|
@@ -588,12 +584,11 @@ var union = function union(key) {
|
|
588
584
|
|
589
585
|
var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
590
586
|
index._inherits(RichTextSchema, _Schema);
|
591
|
-
var _super = index._createSuper(RichTextSchema);
|
592
587
|
function RichTextSchema(options) {
|
593
588
|
var _this;
|
594
589
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
595
590
|
index._classCallCheck(this, RichTextSchema);
|
596
|
-
_this =
|
591
|
+
_this = index._callSuper(this, RichTextSchema);
|
597
592
|
_this.options = options;
|
598
593
|
_this.opt = opt;
|
599
594
|
return _this;
|
@@ -618,7 +613,8 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
618
613
|
value: function serialize() {
|
619
614
|
return {
|
620
615
|
type: "richtext",
|
621
|
-
opt: this.opt
|
616
|
+
opt: this.opt,
|
617
|
+
options: this.options
|
622
618
|
};
|
623
619
|
}
|
624
620
|
}]);
|
@@ -630,12 +626,11 @@ var richtext = function richtext(options) {
|
|
630
626
|
|
631
627
|
var ImageSchema = /*#__PURE__*/function (_Schema) {
|
632
628
|
index._inherits(ImageSchema, _Schema);
|
633
|
-
var _super = index._createSuper(ImageSchema);
|
634
629
|
function ImageSchema(options) {
|
635
630
|
var _this;
|
636
631
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
637
632
|
index._classCallCheck(this, ImageSchema);
|
638
|
-
_this =
|
633
|
+
_this = index._callSuper(this, ImageSchema);
|
639
634
|
_this.options = options;
|
640
635
|
_this.opt = opt;
|
641
636
|
return _this;
|
@@ -709,12 +704,11 @@ var image = function image(options) {
|
|
709
704
|
|
710
705
|
var RecordSchema = /*#__PURE__*/function (_Schema) {
|
711
706
|
index._inherits(RecordSchema, _Schema);
|
712
|
-
var _super = index._createSuper(RecordSchema);
|
713
707
|
function RecordSchema(item) {
|
714
708
|
var _this;
|
715
709
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
716
710
|
index._classCallCheck(this, RecordSchema);
|
717
|
-
_this =
|
711
|
+
_this = index._callSuper(this, RecordSchema);
|
718
712
|
_this.item = item;
|
719
713
|
_this.opt = opt;
|
720
714
|
return _this;
|
@@ -877,7 +871,7 @@ function resolvePath(path, valModule, schema) {
|
|
877
871
|
if (index._typeof(resolvedSource) !== "object" && !Array.isArray(resolvedSource)) {
|
878
872
|
throw Error("Schema type error: expected source to be type of array, but got ".concat(index._typeof(resolvedSource)));
|
879
873
|
}
|
880
|
-
if (
|
874
|
+
if (resolvedSource[part] === undefined) {
|
881
875
|
var _resolvedSource;
|
882
876
|
throw Error("Invalid path: array source (length: ".concat((_resolvedSource = resolvedSource) === null || _resolvedSource === void 0 ? void 0 : _resolvedSource.length, ") did not have index ").concat(part, " from path: ").concat(path));
|
883
877
|
}
|
@@ -2,19 +2,18 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var ops = require('./ops-
|
6
|
-
var index = require('./index-
|
7
|
-
var expr_dist_valbuildCoreExpr = require('./index-
|
5
|
+
var ops = require('./ops-2b3f01fb.cjs.dev.js');
|
6
|
+
var index = require('./index-b14b0d9c.cjs.dev.js');
|
7
|
+
var expr_dist_valbuildCoreExpr = require('./index-f66c449e.cjs.dev.js');
|
8
8
|
var result = require('./result-48320acd.cjs.dev.js');
|
9
9
|
|
10
10
|
var NumberSchema = /*#__PURE__*/function (_Schema) {
|
11
11
|
index._inherits(NumberSchema, _Schema);
|
12
|
-
var _super = index._createSuper(NumberSchema);
|
13
12
|
function NumberSchema(options) {
|
14
13
|
var _this;
|
15
14
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
16
15
|
index._classCallCheck(this, NumberSchema);
|
17
|
-
_this =
|
16
|
+
_this = index._callSuper(this, NumberSchema);
|
18
17
|
_this.options = options;
|
19
18
|
_this.opt = opt;
|
20
19
|
return _this;
|
@@ -64,13 +63,12 @@ var number = function number(options) {
|
|
64
63
|
|
65
64
|
var StringSchema = /*#__PURE__*/function (_Schema) {
|
66
65
|
index._inherits(StringSchema, _Schema);
|
67
|
-
var _super = index._createSuper(StringSchema);
|
68
66
|
function StringSchema(options) {
|
69
67
|
var _this;
|
70
68
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
71
69
|
var isRaw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
72
70
|
index._classCallCheck(this, StringSchema);
|
73
|
-
_this =
|
71
|
+
_this = index._callSuper(this, StringSchema);
|
74
72
|
_this.options = options;
|
75
73
|
_this.opt = opt;
|
76
74
|
_this.isRaw = isRaw;
|
@@ -158,12 +156,11 @@ var string = function string(options) {
|
|
158
156
|
|
159
157
|
var BooleanSchema = /*#__PURE__*/function (_Schema) {
|
160
158
|
index._inherits(BooleanSchema, _Schema);
|
161
|
-
var _super = index._createSuper(BooleanSchema);
|
162
159
|
function BooleanSchema() {
|
163
160
|
var _this;
|
164
161
|
var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
165
162
|
index._classCallCheck(this, BooleanSchema);
|
166
|
-
_this =
|
163
|
+
_this = index._callSuper(this, BooleanSchema);
|
167
164
|
_this.opt = opt;
|
168
165
|
return _this;
|
169
166
|
}
|
@@ -211,12 +208,11 @@ var _boolean = function _boolean() {
|
|
211
208
|
|
212
209
|
var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
213
210
|
index._inherits(KeyOfSchema, _Schema);
|
214
|
-
var _super = index._createSuper(KeyOfSchema);
|
215
211
|
function KeyOfSchema(selector) {
|
216
212
|
var _this;
|
217
213
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
218
214
|
index._classCallCheck(this, KeyOfSchema);
|
219
|
-
_this =
|
215
|
+
_this = index._callSuper(this, KeyOfSchema);
|
220
216
|
_this.selector = selector;
|
221
217
|
_this.opt = opt;
|
222
218
|
return _this;
|
@@ -341,6 +337,7 @@ var keyOf = function keyOf(valModule) {
|
|
341
337
|
// import type { F } from "ts-toolbelt";
|
342
338
|
// import { i18n, I18n } from "./schema/future/i18n";
|
343
339
|
// import { oneOf } from "./schema/future/oneOf";
|
340
|
+
|
344
341
|
// export type InitSchemaLocalized<Locales extends readonly string[]> = {
|
345
342
|
// readonly i18n: I18n<Locales>;
|
346
343
|
// };
|
@@ -358,7 +355,8 @@ function initSchema() {
|
|
358
355
|
image: ops.image,
|
359
356
|
literal: ops.literal,
|
360
357
|
keyOf: keyOf,
|
361
|
-
record: ops.record
|
358
|
+
record: ops.record,
|
359
|
+
file: index.file
|
362
360
|
// i18n: i18n(locales),
|
363
361
|
};
|
364
362
|
}
|
@@ -382,13 +380,16 @@ function initSchema() {
|
|
382
380
|
/// Root and nodes
|
383
381
|
|
384
382
|
/// Main types
|
383
|
+
|
385
384
|
/**
|
386
385
|
* RichTextSource is defined in ValModules
|
387
386
|
**/
|
387
|
+
|
388
388
|
/**
|
389
389
|
* RichText is accessible by users (after conversion via useVal / fetchVal)
|
390
390
|
* Internally it is a Selector
|
391
391
|
**/
|
392
|
+
|
392
393
|
function richtext(templateStrings) {
|
393
394
|
for (var _len = arguments.length, nodes = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
394
395
|
nodes[_key - 1] = arguments[_key];
|
@@ -404,12 +405,14 @@ function link(text, _ref) {
|
|
404
405
|
/* eslint-disable @typescript-eslint/ban-types */
|
405
406
|
// import { i18n, I18n } from "./source/future/i18n";
|
406
407
|
// import { remote } from "./source/future/remote";
|
408
|
+
|
407
409
|
// type NarrowStrings<A> =
|
408
410
|
// | (A extends [] ? [] : never)
|
409
411
|
// | (A extends string ? A : never)
|
410
412
|
// | {
|
411
413
|
// [K in keyof A]: NarrowStrings<A[K]>;
|
412
414
|
// };
|
415
|
+
|
413
416
|
// TODO: Rename to createValSystem (only to be used by internal things), we can then export * from '@valbuild/core' in the next package then.
|
414
417
|
var initVal = function initVal() {
|
415
418
|
// const locales = options?.locales;
|
@@ -435,7 +438,7 @@ var initVal = function initVal() {
|
|
435
438
|
content: ops.content,
|
436
439
|
// remote,
|
437
440
|
getPath: index.getValPath,
|
438
|
-
file: index.file,
|
441
|
+
file: index.file$1,
|
439
442
|
richtext: richtext,
|
440
443
|
link: link
|
441
444
|
},
|
@@ -1559,6 +1562,7 @@ var Internal = {
|
|
1559
1562
|
isVal: index.isVal,
|
1560
1563
|
createValPathOfItem: ops.createValPathOfItem,
|
1561
1564
|
getSHA256Hash: getSHA256Hash,
|
1565
|
+
initSchema: initSchema,
|
1562
1566
|
createPatchJSONPath: function createPatchJSONPath(modulePath) {
|
1563
1567
|
return "/".concat(modulePath.split(".").map(function (segment) {
|
1564
1568
|
return segment && tryJsonParse(segment);
|
@@ -1584,6 +1588,7 @@ exports.RecordSchema = ops.RecordSchema;
|
|
1584
1588
|
exports.RichTextSchema = ops.RichTextSchema;
|
1585
1589
|
exports.UnionSchema = ops.UnionSchema;
|
1586
1590
|
exports.FILE_REF_PROP = index.FILE_REF_PROP;
|
1591
|
+
exports.FileSchema = index.FileSchema;
|
1587
1592
|
exports.GenericSelector = index.GenericSelector;
|
1588
1593
|
exports.Schema = index.Schema;
|
1589
1594
|
exports.VAL_EXTENSION = index.VAL_EXTENSION;
|
@@ -2,19 +2,18 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var ops = require('./ops-
|
6
|
-
var index = require('./index-
|
7
|
-
var expr_dist_valbuildCoreExpr = require('./index-
|
5
|
+
var ops = require('./ops-cff2b7c2.cjs.prod.js');
|
6
|
+
var index = require('./index-0391a11a.cjs.prod.js');
|
7
|
+
var expr_dist_valbuildCoreExpr = require('./index-df01e42d.cjs.prod.js');
|
8
8
|
var result = require('./result-26f67b40.cjs.prod.js');
|
9
9
|
|
10
10
|
var NumberSchema = /*#__PURE__*/function (_Schema) {
|
11
11
|
index._inherits(NumberSchema, _Schema);
|
12
|
-
var _super = index._createSuper(NumberSchema);
|
13
12
|
function NumberSchema(options) {
|
14
13
|
var _this;
|
15
14
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
16
15
|
index._classCallCheck(this, NumberSchema);
|
17
|
-
_this =
|
16
|
+
_this = index._callSuper(this, NumberSchema);
|
18
17
|
_this.options = options;
|
19
18
|
_this.opt = opt;
|
20
19
|
return _this;
|
@@ -64,13 +63,12 @@ var number = function number(options) {
|
|
64
63
|
|
65
64
|
var StringSchema = /*#__PURE__*/function (_Schema) {
|
66
65
|
index._inherits(StringSchema, _Schema);
|
67
|
-
var _super = index._createSuper(StringSchema);
|
68
66
|
function StringSchema(options) {
|
69
67
|
var _this;
|
70
68
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
71
69
|
var isRaw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
72
70
|
index._classCallCheck(this, StringSchema);
|
73
|
-
_this =
|
71
|
+
_this = index._callSuper(this, StringSchema);
|
74
72
|
_this.options = options;
|
75
73
|
_this.opt = opt;
|
76
74
|
_this.isRaw = isRaw;
|
@@ -158,12 +156,11 @@ var string = function string(options) {
|
|
158
156
|
|
159
157
|
var BooleanSchema = /*#__PURE__*/function (_Schema) {
|
160
158
|
index._inherits(BooleanSchema, _Schema);
|
161
|
-
var _super = index._createSuper(BooleanSchema);
|
162
159
|
function BooleanSchema() {
|
163
160
|
var _this;
|
164
161
|
var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
165
162
|
index._classCallCheck(this, BooleanSchema);
|
166
|
-
_this =
|
163
|
+
_this = index._callSuper(this, BooleanSchema);
|
167
164
|
_this.opt = opt;
|
168
165
|
return _this;
|
169
166
|
}
|
@@ -211,12 +208,11 @@ var _boolean = function _boolean() {
|
|
211
208
|
|
212
209
|
var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
213
210
|
index._inherits(KeyOfSchema, _Schema);
|
214
|
-
var _super = index._createSuper(KeyOfSchema);
|
215
211
|
function KeyOfSchema(selector) {
|
216
212
|
var _this;
|
217
213
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
218
214
|
index._classCallCheck(this, KeyOfSchema);
|
219
|
-
_this =
|
215
|
+
_this = index._callSuper(this, KeyOfSchema);
|
220
216
|
_this.selector = selector;
|
221
217
|
_this.opt = opt;
|
222
218
|
return _this;
|
@@ -341,6 +337,7 @@ var keyOf = function keyOf(valModule) {
|
|
341
337
|
// import type { F } from "ts-toolbelt";
|
342
338
|
// import { i18n, I18n } from "./schema/future/i18n";
|
343
339
|
// import { oneOf } from "./schema/future/oneOf";
|
340
|
+
|
344
341
|
// export type InitSchemaLocalized<Locales extends readonly string[]> = {
|
345
342
|
// readonly i18n: I18n<Locales>;
|
346
343
|
// };
|
@@ -358,7 +355,8 @@ function initSchema() {
|
|
358
355
|
image: ops.image,
|
359
356
|
literal: ops.literal,
|
360
357
|
keyOf: keyOf,
|
361
|
-
record: ops.record
|
358
|
+
record: ops.record,
|
359
|
+
file: index.file
|
362
360
|
// i18n: i18n(locales),
|
363
361
|
};
|
364
362
|
}
|
@@ -382,13 +380,16 @@ function initSchema() {
|
|
382
380
|
/// Root and nodes
|
383
381
|
|
384
382
|
/// Main types
|
383
|
+
|
385
384
|
/**
|
386
385
|
* RichTextSource is defined in ValModules
|
387
386
|
**/
|
387
|
+
|
388
388
|
/**
|
389
389
|
* RichText is accessible by users (after conversion via useVal / fetchVal)
|
390
390
|
* Internally it is a Selector
|
391
391
|
**/
|
392
|
+
|
392
393
|
function richtext(templateStrings) {
|
393
394
|
for (var _len = arguments.length, nodes = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
394
395
|
nodes[_key - 1] = arguments[_key];
|
@@ -404,12 +405,14 @@ function link(text, _ref) {
|
|
404
405
|
/* eslint-disable @typescript-eslint/ban-types */
|
405
406
|
// import { i18n, I18n } from "./source/future/i18n";
|
406
407
|
// import { remote } from "./source/future/remote";
|
408
|
+
|
407
409
|
// type NarrowStrings<A> =
|
408
410
|
// | (A extends [] ? [] : never)
|
409
411
|
// | (A extends string ? A : never)
|
410
412
|
// | {
|
411
413
|
// [K in keyof A]: NarrowStrings<A[K]>;
|
412
414
|
// };
|
415
|
+
|
413
416
|
// TODO: Rename to createValSystem (only to be used by internal things), we can then export * from '@valbuild/core' in the next package then.
|
414
417
|
var initVal = function initVal() {
|
415
418
|
// const locales = options?.locales;
|
@@ -435,7 +438,7 @@ var initVal = function initVal() {
|
|
435
438
|
content: ops.content,
|
436
439
|
// remote,
|
437
440
|
getPath: index.getValPath,
|
438
|
-
file: index.file,
|
441
|
+
file: index.file$1,
|
439
442
|
richtext: richtext,
|
440
443
|
link: link
|
441
444
|
},
|
@@ -1559,6 +1562,7 @@ var Internal = {
|
|
1559
1562
|
isVal: index.isVal,
|
1560
1563
|
createValPathOfItem: ops.createValPathOfItem,
|
1561
1564
|
getSHA256Hash: getSHA256Hash,
|
1565
|
+
initSchema: initSchema,
|
1562
1566
|
createPatchJSONPath: function createPatchJSONPath(modulePath) {
|
1563
1567
|
return "/".concat(modulePath.split(".").map(function (segment) {
|
1564
1568
|
return segment && tryJsonParse(segment);
|
@@ -1584,6 +1588,7 @@ exports.RecordSchema = ops.RecordSchema;
|
|
1584
1588
|
exports.RichTextSchema = ops.RichTextSchema;
|
1585
1589
|
exports.UnionSchema = ops.UnionSchema;
|
1586
1590
|
exports.FILE_REF_PROP = index.FILE_REF_PROP;
|
1591
|
+
exports.FileSchema = index.FileSchema;
|
1587
1592
|
exports.GenericSelector = index.GenericSelector;
|
1588
1593
|
exports.Schema = index.Schema;
|
1589
1594
|
exports.VAL_EXTENSION = index.VAL_EXTENSION;
|