@valbuild/core 0.49.0 → 0.51.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 +2 -0
- package/dist/declarations/src/schema/richtext.d.ts +2 -1
- package/dist/declarations/src/selector/SelectorProxy.d.ts +2 -2
- package/dist/declarations/src/source/richtext.d.ts +1 -1
- package/dist/{index-af44930c.cjs.prod.js → index-0391a11a.cjs.prod.js} +50 -68
- package/dist/{index-4c303f7c.esm.js → index-14edbcc8.esm.js} +1 -1
- package/dist/{index-6cea0f23.esm.js → index-a038a0f3.esm.js} +50 -68
- package/dist/{index-e8fbff39.cjs.dev.js → index-b14b0d9c.cjs.dev.js} +50 -68
- package/dist/{index-686d8832.cjs.prod.js → index-df01e42d.cjs.prod.js} +1 -1
- package/dist/{index-690d965d.cjs.dev.js → index-f66c449e.cjs.dev.js} +1 -1
- package/dist/{ops-8387575e.esm.js → ops-2029f7c3.esm.js} +11 -17
- package/dist/{ops-ca9f0095.cjs.dev.js → ops-2b3f01fb.cjs.dev.js} +11 -17
- package/dist/{ops-7b8073b5.cjs.prod.js → ops-cff2b7c2.cjs.prod.js} +11 -17
- package/dist/valbuild-core.cjs.dev.js +15 -12
- package/dist/valbuild-core.cjs.prod.js +15 -12
- package/dist/valbuild-core.esm.js +17 -14
- 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
@@ -28,24 +28,24 @@ function _typeof(o) {
|
|
28
28
|
}, _typeof(o);
|
29
29
|
}
|
30
30
|
|
31
|
-
function
|
32
|
-
if (
|
33
|
-
var
|
34
|
-
if (
|
35
|
-
var
|
36
|
-
if (
|
31
|
+
function toPrimitive(t, r) {
|
32
|
+
if ("object" != typeof t || !t) return t;
|
33
|
+
var e = t[Symbol.toPrimitive];
|
34
|
+
if (void 0 !== e) {
|
35
|
+
var i = e.call(t, r || "default");
|
36
|
+
if ("object" != typeof i) return i;
|
37
37
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
38
38
|
}
|
39
|
-
return (
|
39
|
+
return ("string" === r ? String : Number)(t);
|
40
40
|
}
|
41
41
|
|
42
|
-
function
|
43
|
-
var
|
44
|
-
return
|
42
|
+
function toPropertyKey(t) {
|
43
|
+
var i = toPrimitive(t, "string");
|
44
|
+
return "symbol" == typeof i ? i : String(i);
|
45
45
|
}
|
46
46
|
|
47
47
|
function _defineProperty(obj, key, value) {
|
48
|
-
key =
|
48
|
+
key = toPropertyKey(key);
|
49
49
|
if (key in obj) {
|
50
50
|
Object.defineProperty(obj, key, {
|
51
51
|
value: value,
|
@@ -133,7 +133,7 @@ function _defineProperties(target, props) {
|
|
133
133
|
descriptor.enumerable = descriptor.enumerable || false;
|
134
134
|
descriptor.configurable = true;
|
135
135
|
if ("value" in descriptor) descriptor.writable = true;
|
136
|
-
Object.defineProperty(target,
|
136
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
137
137
|
}
|
138
138
|
}
|
139
139
|
function _createClass(Constructor, protoProps, staticProps) {
|
@@ -145,31 +145,6 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
145
145
|
return Constructor;
|
146
146
|
}
|
147
147
|
|
148
|
-
function _setPrototypeOf(o, p) {
|
149
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
150
|
-
o.__proto__ = p;
|
151
|
-
return o;
|
152
|
-
};
|
153
|
-
return _setPrototypeOf(o, p);
|
154
|
-
}
|
155
|
-
|
156
|
-
function _inherits(subClass, superClass) {
|
157
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
158
|
-
throw new TypeError("Super expression must either be null or a function");
|
159
|
-
}
|
160
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
161
|
-
constructor: {
|
162
|
-
value: subClass,
|
163
|
-
writable: true,
|
164
|
-
configurable: true
|
165
|
-
}
|
166
|
-
});
|
167
|
-
Object.defineProperty(subClass, "prototype", {
|
168
|
-
writable: false
|
169
|
-
});
|
170
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
171
|
-
}
|
172
|
-
|
173
148
|
function _getPrototypeOf(o) {
|
174
149
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
175
150
|
return o.__proto__ || Object.getPrototypeOf(o);
|
@@ -178,15 +153,12 @@ function _getPrototypeOf(o) {
|
|
178
153
|
}
|
179
154
|
|
180
155
|
function _isNativeReflectConstruct() {
|
181
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
182
|
-
if (Reflect.construct.sham) return false;
|
183
|
-
if (typeof Proxy === "function") return true;
|
184
156
|
try {
|
185
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
186
|
-
|
187
|
-
|
188
|
-
return
|
189
|
-
}
|
157
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
158
|
+
} catch (t) {}
|
159
|
+
return (_isNativeReflectConstruct = function () {
|
160
|
+
return !!t;
|
161
|
+
})();
|
190
162
|
}
|
191
163
|
|
192
164
|
function _assertThisInitialized(self) {
|
@@ -205,25 +177,40 @@ function _possibleConstructorReturn(self, call) {
|
|
205
177
|
return _assertThisInitialized(self);
|
206
178
|
}
|
207
179
|
|
208
|
-
function
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
} else {
|
217
|
-
result = Super.apply(this, arguments);
|
218
|
-
}
|
219
|
-
return _possibleConstructorReturn(this, result);
|
180
|
+
function _callSuper(t, o, e) {
|
181
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
182
|
+
}
|
183
|
+
|
184
|
+
function _setPrototypeOf(o, p) {
|
185
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
186
|
+
o.__proto__ = p;
|
187
|
+
return o;
|
220
188
|
};
|
189
|
+
return _setPrototypeOf(o, p);
|
190
|
+
}
|
191
|
+
|
192
|
+
function _inherits(subClass, superClass) {
|
193
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
194
|
+
throw new TypeError("Super expression must either be null or a function");
|
195
|
+
}
|
196
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
197
|
+
constructor: {
|
198
|
+
value: subClass,
|
199
|
+
writable: true,
|
200
|
+
configurable: true
|
201
|
+
}
|
202
|
+
});
|
203
|
+
Object.defineProperty(subClass, "prototype", {
|
204
|
+
writable: false
|
205
|
+
});
|
206
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
221
207
|
}
|
222
208
|
|
223
209
|
// import { RemoteCompatibleSource, RemoteSource } from "../source/remote";
|
224
210
|
|
225
211
|
// import { SerializedI18nSchema } from "./future/i18n";
|
226
212
|
// import { SerializedOneOfSchema } from "./future/oneOf";
|
213
|
+
|
227
214
|
var Schema = /*#__PURE__*/function () {
|
228
215
|
function Schema() {
|
229
216
|
_classCallCheck(this, Schema);
|
@@ -309,11 +296,10 @@ var Expr = /*#__PURE__*/_createClass(function Expr(span) {
|
|
309
296
|
});
|
310
297
|
var StringLiteral = /*#__PURE__*/function (_Expr) {
|
311
298
|
_inherits(StringLiteral, _Expr);
|
312
|
-
var _super = _createSuper(StringLiteral);
|
313
299
|
function StringLiteral(value, span) {
|
314
300
|
var _this;
|
315
301
|
_classCallCheck(this, StringLiteral);
|
316
|
-
_this =
|
302
|
+
_this = _callSuper(this, StringLiteral, [span]);
|
317
303
|
_defineProperty(_assertThisInitialized(_this), "type", "StringLiteral");
|
318
304
|
_this.value = value;
|
319
305
|
return _this;
|
@@ -328,11 +314,10 @@ var StringLiteral = /*#__PURE__*/function (_Expr) {
|
|
328
314
|
}(Expr);
|
329
315
|
var Sym = /*#__PURE__*/function (_Expr2) {
|
330
316
|
_inherits(Sym, _Expr2);
|
331
|
-
var _super2 = _createSuper(Sym);
|
332
317
|
function Sym(value, span) {
|
333
318
|
var _this2;
|
334
319
|
_classCallCheck(this, Sym);
|
335
|
-
_this2 =
|
320
|
+
_this2 = _callSuper(this, Sym, [span]);
|
336
321
|
_defineProperty(_assertThisInitialized(_this2), "type", "Sym");
|
337
322
|
_this2.value = value;
|
338
323
|
return _this2;
|
@@ -348,11 +333,10 @@ var Sym = /*#__PURE__*/function (_Expr2) {
|
|
348
333
|
var NilSym = new Sym("()");
|
349
334
|
var StringTemplate = /*#__PURE__*/function (_Expr3) {
|
350
335
|
_inherits(StringTemplate, _Expr3);
|
351
|
-
var _super3 = _createSuper(StringTemplate);
|
352
336
|
function StringTemplate(children, span) {
|
353
337
|
var _this3;
|
354
338
|
_classCallCheck(this, StringTemplate);
|
355
|
-
_this3 =
|
339
|
+
_this3 = _callSuper(this, StringTemplate, [span]);
|
356
340
|
_defineProperty(_assertThisInitialized(_this3), "type", "StringTemplate");
|
357
341
|
_this3.children = children;
|
358
342
|
return _this3;
|
@@ -373,11 +357,10 @@ var StringTemplate = /*#__PURE__*/function (_Expr3) {
|
|
373
357
|
}(Expr);
|
374
358
|
var Call = /*#__PURE__*/function (_Expr4) {
|
375
359
|
_inherits(Call, _Expr4);
|
376
|
-
var _super4 = _createSuper(Call);
|
377
360
|
function Call(children, isAnon, span) {
|
378
361
|
var _this4;
|
379
362
|
_classCallCheck(this, Call);
|
380
|
-
_this4 =
|
363
|
+
_this4 = _callSuper(this, Call, [span]);
|
381
364
|
_defineProperty(_assertThisInitialized(_this4), "type", "Call");
|
382
365
|
_this4.children = children;
|
383
366
|
_this4.isAnon = isAnon;
|
@@ -431,12 +414,11 @@ function isFile(obj) {
|
|
431
414
|
|
432
415
|
var FileSchema = /*#__PURE__*/function (_Schema) {
|
433
416
|
_inherits(FileSchema, _Schema);
|
434
|
-
var _super = _createSuper(FileSchema);
|
435
417
|
function FileSchema(options) {
|
436
418
|
var _this;
|
437
419
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
438
420
|
_classCallCheck(this, FileSchema);
|
439
|
-
_this =
|
421
|
+
_this = _callSuper(this, FileSchema);
|
440
422
|
_this.options = options;
|
441
423
|
_this.opt = opt;
|
442
424
|
return _this;
|
@@ -569,9 +551,9 @@ exports.StringLiteral = StringLiteral;
|
|
569
551
|
exports.StringTemplate = StringTemplate;
|
570
552
|
exports.Sym = Sym;
|
571
553
|
exports.VAL_EXTENSION = VAL_EXTENSION;
|
554
|
+
exports._callSuper = _callSuper;
|
572
555
|
exports._classCallCheck = _classCallCheck;
|
573
556
|
exports._createClass = _createClass;
|
574
|
-
exports._createSuper = _createSuper;
|
575
557
|
exports._defineProperty = _defineProperty;
|
576
558
|
exports._inherits = _inherits;
|
577
559
|
exports._objectSpread2 = _objectSpread2;
|
@@ -1,4 +1,4 @@
|
|
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
|
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
|
}
|