@valbuild/core 0.138.0 → 0.139.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 (35) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/declarations/src/index.d.ts +2 -0
  3. package/dist/declarations/src/render.d.ts +36 -33
  4. package/dist/declarations/src/schema/array.d.ts +13 -8
  5. package/dist/declarations/src/schema/boolean.d.ts +1 -17
  6. package/dist/declarations/src/schema/code.d.ts +1 -21
  7. package/dist/declarations/src/schema/color.d.ts +1 -19
  8. package/dist/declarations/src/schema/date.d.ts +1 -17
  9. package/dist/declarations/src/schema/datetime.d.ts +1 -19
  10. package/dist/declarations/src/schema/discriminatedUnion.d.ts +1 -23
  11. package/dist/declarations/src/schema/enum.d.ts +1 -19
  12. package/dist/declarations/src/schema/file.d.ts +1 -19
  13. package/dist/declarations/src/schema/image.d.ts +1 -24
  14. package/dist/declarations/src/schema/keyOf.d.ts +14 -6
  15. package/dist/declarations/src/schema/literal.d.ts +1 -17
  16. package/dist/declarations/src/schema/locale.d.ts +1 -14
  17. package/dist/declarations/src/schema/number.d.ts +1 -17
  18. package/dist/declarations/src/schema/object.d.ts +1 -23
  19. package/dist/declarations/src/schema/record.d.ts +12 -6
  20. package/dist/declarations/src/schema/richtext.d.ts +1 -19
  21. package/dist/declarations/src/schema/route.d.ts +1 -17
  22. package/dist/declarations/src/schema/settings.d.ts +8 -12
  23. package/dist/declarations/src/schema/string.d.ts +1 -26
  24. package/dist/declarations/src/schema/view.d.ts +1 -20
  25. package/dist/declarations/src/source/filename.d.ts +37 -0
  26. package/dist/{index-3296fc4f.cjs.prod.js → index-8920ba3f.cjs.prod.js} +324 -625
  27. package/dist/{index-a25822a3.esm.js → index-d949d13b.esm.js} +324 -625
  28. package/dist/{index-d3c51a0d.cjs.dev.js → index-e13b725c.cjs.dev.js} +324 -625
  29. package/dist/valbuild-core.cjs.dev.js +1 -1
  30. package/dist/valbuild-core.cjs.prod.js +1 -1
  31. package/dist/valbuild-core.esm.js +1 -1
  32. package/package.json +1 -1
  33. package/patch/dist/valbuild-core-patch.cjs.dev.js +1 -1
  34. package/patch/dist/valbuild-core-patch.cjs.prod.js +1 -1
  35. package/patch/dist/valbuild-core-patch.esm.js +2 -2
@@ -946,19 +946,17 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
946
946
  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
947
947
  var isRaw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
948
948
  var customValidateFunctions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
949
- var renderInput = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
950
- var isReadonly = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
951
- var isHidden = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
952
- var description = arguments.length > 7 ? arguments[7] : undefined;
953
- var previewInput = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
954
- var isMultiline = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
949
+ var isReadonly = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
950
+ var isHidden = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
951
+ var description = arguments.length > 6 ? arguments[6] : undefined;
952
+ var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
953
+ var isMultiline = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : false;
955
954
  _classCallCheck(this, StringSchema);
956
955
  _this = _callSuper(this, StringSchema);
957
956
  _this.options = options;
958
957
  _this.opt = opt;
959
958
  _this.isRaw = isRaw;
960
959
  _this.customValidateFunctions = customValidateFunctions;
961
- _this.renderInput = renderInput;
962
960
  _this.isReadonly = isReadonly;
963
961
  _this.isHidden = isHidden;
964
962
  _this.description = description;
@@ -990,7 +988,7 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
990
988
  return _createClass(StringSchema, [{
991
989
  key: "describe",
992
990
  value: function describe(description) {
993
- return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.renderInput, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput, this.isMultiline);
991
+ return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput, this.isMultiline);
994
992
  }
995
993
 
996
994
  /**
@@ -1018,7 +1016,7 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1018
1016
  value: function minLength(_minLength) {
1019
1017
  return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
1020
1018
  minLength: _minLength
1021
- }), this.opt, this.isRaw, this.customValidateFunctions, this.renderInput, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1019
+ }), this.opt, this.isRaw, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1022
1020
  }
1023
1021
 
1024
1022
  /**
@@ -1046,7 +1044,7 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1046
1044
  value: function maxLength(_maxLength) {
1047
1045
  return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
1048
1046
  maxLength: _maxLength
1049
- }), this.opt, this.isRaw, this.customValidateFunctions, this.renderInput, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1047
+ }), this.opt, this.isRaw, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1050
1048
  }
1051
1049
 
1052
1050
  /**
@@ -1067,7 +1065,7 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1067
1065
  return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
1068
1066
  regexp: _regexp,
1069
1067
  regExpMessage: message
1070
- }), this.opt, this.isRaw, this.customValidateFunctions, this.renderInput, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1068
+ }), this.opt, this.isRaw, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1071
1069
  }
1072
1070
 
1073
1071
  /**
@@ -1093,7 +1091,7 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1093
1091
  }, {
1094
1092
  key: "validate",
1095
1093
  value: function validate(validationFunction) {
1096
- return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions.concat(validationFunction), this.renderInput, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1094
+ return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1097
1095
  }
1098
1096
  }, {
1099
1097
  key: "executeValidate",
@@ -1166,19 +1164,19 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1166
1164
  }, {
1167
1165
  key: "nullable",
1168
1166
  value: function nullable() {
1169
- return new StringSchema(this.options, true, this.isRaw, this.customValidateFunctions, this.renderInput, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1167
+ return new StringSchema(this.options, true, this.isRaw, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1170
1168
  }
1171
1169
  }, {
1172
1170
  key: "readonly",
1173
1171
  value: function readonly() {
1174
1172
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1175
- return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.renderInput, isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1173
+ return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1176
1174
  }
1177
1175
  }, {
1178
1176
  key: "hidden",
1179
1177
  value: function hidden() {
1180
1178
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1181
- return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.renderInput, this.isReadonly, isHidden, this.description, this.previewInput, this.isMultiline);
1179
+ return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput, this.isMultiline);
1182
1180
  }
1183
1181
 
1184
1182
  /**
@@ -1203,7 +1201,7 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1203
1201
  }, {
1204
1202
  key: "raw",
1205
1203
  value: function raw() {
1206
- return new StringSchema(this.options, this.opt, true, this.customValidateFunctions, this.renderInput, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1204
+ return new StringSchema(this.options, this.opt, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1207
1205
  }
1208
1206
  }, {
1209
1207
  key: "executeCustomValidateAt",
@@ -1215,10 +1213,9 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1215
1213
  }, {
1216
1214
  key: "executeSerialize",
1217
1215
  value: function executeSerialize() {
1218
- var _this$renderInput, _this$options4, _this$options5, _this$options6, _this$customValidateF, _this$customValidateF2;
1216
+ var _this$options4, _this$options5, _this$options6, _this$customValidateF, _this$customValidateF2;
1219
1217
  return {
1220
1218
  type: "string",
1221
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
1222
1219
  multiline: this.isMultiline ? true : undefined,
1223
1220
  preview: this.previewInput ? true : undefined,
1224
1221
  options: {
@@ -1255,25 +1252,7 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1255
1252
  }, {
1256
1253
  key: "multiline",
1257
1254
  value: function multiline() {
1258
- return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.renderInput, this.isReadonly, this.isHidden, this.description, this.previewInput, true);
1259
- }
1260
-
1261
- /**
1262
- * How this field is laid out in the editor when it is the item of an array or
1263
- * record: `{ as: "inline" }` renders the field itself inside each row,
1264
- * instead of a preview row that navigates to it.
1265
- *
1266
- * Static configuration, not a callback — see `render.ts`. What a CONTAINER
1267
- * shows for its items is a `preview`, which is a different thing entirely.
1268
- *
1269
- * @example
1270
- * const schema = s.array(s.string().render({ as: "inline" }));
1271
- * export default c.define("/example.val.ts", schema, ["First", "Second"]);
1272
- */
1273
- }, {
1274
- key: "render",
1275
- value: function render(input) {
1276
- return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, input, this.isReadonly, this.isHidden, this.description, this.previewInput, this.isMultiline);
1255
+ return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput, true);
1277
1256
  }
1278
1257
 
1279
1258
  /**
@@ -1290,7 +1269,7 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
1290
1269
  }, {
1291
1270
  key: "preview",
1292
1271
  value: function preview(select) {
1293
- return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.renderInput, this.isReadonly, this.isHidden, this.description, select, this.isMultiline);
1272
+ return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select, this.isMultiline);
1294
1273
  }
1295
1274
  }, {
1296
1275
  key: "executePreviewItem",
@@ -1327,8 +1306,7 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
1327
1306
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1328
1307
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
1329
1308
  var description = arguments.length > 5 ? arguments[5] : undefined;
1330
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
1331
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
1309
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
1332
1310
  _classCallCheck(this, ObjectSchema);
1333
1311
  _this = _callSuper(this, ObjectSchema);
1334
1312
  _this.items = items;
@@ -1337,7 +1315,6 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
1337
1315
  _this.isReadonly = isReadonly;
1338
1316
  _this.isHidden = isHidden;
1339
1317
  _this.description = description;
1340
- _this.renderInput = renderInput;
1341
1318
  _this.previewInput = previewInput;
1342
1319
  return _this;
1343
1320
  }
@@ -1368,7 +1345,7 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
1368
1345
  return _createClass(ObjectSchema, [{
1369
1346
  key: "describe",
1370
1347
  value: function describe(description) {
1371
- return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
1348
+ return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
1372
1349
  }
1373
1350
 
1374
1351
  /**
@@ -1400,7 +1377,7 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
1400
1377
  }, {
1401
1378
  key: "validate",
1402
1379
  value: function validate(validationFunction) {
1403
- return new ObjectSchema(this.items, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
1380
+ return new ObjectSchema(this.items, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
1404
1381
  }
1405
1382
  }, {
1406
1383
  key: "executeValidate",
@@ -1533,19 +1510,19 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
1533
1510
  key: "nullable",
1534
1511
  value: function nullable() {
1535
1512
  // Explicit type args: `previewInput` would otherwise pin inference to `Src`.
1536
- return new ObjectSchema(this.items, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
1513
+ return new ObjectSchema(this.items, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
1537
1514
  }
1538
1515
  }, {
1539
1516
  key: "readonly",
1540
1517
  value: function readonly() {
1541
1518
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1542
- return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
1519
+ return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
1543
1520
  }
1544
1521
  }, {
1545
1522
  key: "hidden",
1546
1523
  value: function hidden() {
1547
1524
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1548
- return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
1525
+ return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
1549
1526
  }
1550
1527
 
1551
1528
  /** The names of this object's `s.locale()` fields, in declaration order. */
@@ -1584,29 +1561,6 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
1584
1561
  });
1585
1562
  }
1586
1563
 
1587
- /**
1588
- * How this field is laid out in the editor when it is the item of an array
1589
- * or record: `{ as: "inline" }` renders the field itself inside each row,
1590
- * instead of a preview row that navigates to it.
1591
- *
1592
- * Static configuration, not a callback — see `render.ts`.
1593
- *
1594
- * @example
1595
- * // A page builder: each row edits the object in place, instead of
1596
- * // navigating to it.
1597
- * const block = s
1598
- * .object({ heading: s.string(), body: s.string() })
1599
- * .render({ as: "inline" });
1600
- * export default c.define("/example.val.ts", s.array(block), [
1601
- * { heading: "Hello", body: "World" },
1602
- * ]);
1603
- */
1604
- }, {
1605
- key: "render",
1606
- value: function render(input) {
1607
- return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
1608
- }
1609
-
1610
1564
  /**
1611
1565
  * How this VALUE is shown where a preview of it is needed — a row in a
1612
1566
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -1623,7 +1577,7 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
1623
1577
  }, {
1624
1578
  key: "preview",
1625
1579
  value: function preview(select) {
1626
- return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
1580
+ return new ObjectSchema(this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
1627
1581
  }
1628
1582
  }, {
1629
1583
  key: "executePreviewItem",
@@ -1643,10 +1597,9 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
1643
1597
  }, {
1644
1598
  key: "executeSerialize",
1645
1599
  value: function executeSerialize() {
1646
- var _this$renderInput, _this$customValidateF;
1600
+ var _this$customValidateF;
1647
1601
  return {
1648
1602
  type: "object",
1649
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
1650
1603
  preview: this.previewInput ? true : undefined,
1651
1604
  items: Object.fromEntries(Object.entries(this.items).map(function (_ref5) {
1652
1605
  var _ref6 = _slicedToArray(_ref5, 2),
@@ -2032,17 +1985,19 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
2032
1985
  }
2033
1986
 
2034
1987
  /**
2035
- * How this field is laid out in the editor when it is the item of an array
2036
- * or record: `{ as: "inline" }` renders the field itself inside each row,
2037
- * instead of a preview row that navigates to it.
1988
+ * How this array lays out its ITEMS in the editor: `{ as: "inline" }` draws
1989
+ * each item's own editor inside its (sortable) row, instead of a preview row
1990
+ * that navigates to it. It reaches the direct items only.
2038
1991
  *
2039
1992
  * Static configuration, not a callback — see `render.ts`.
2040
1993
  *
2041
1994
  * @example
2042
- * const schema = s.record(s.array(s.string()).render({ as: "inline" }));
2043
- * export default c.define("/example.val.ts", schema, {
2044
- * "a-post": ["news", "release"],
2045
- * });
1995
+ * const schema = s
1996
+ * .array(s.object({ title: s.string(), body: s.string() }))
1997
+ * .render({ as: "inline" });
1998
+ * export default c.define("/example.val.ts", schema, [
1999
+ * { title: "Hello", body: "World" },
2000
+ * ]);
2046
2001
  */
2047
2002
  }, {
2048
2003
  key: "render",
@@ -2065,8 +2020,7 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
2065
2020
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
2066
2021
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
2067
2022
  var description = arguments.length > 5 ? arguments[5] : undefined;
2068
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
2069
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
2023
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
2070
2024
  _classCallCheck(this, LiteralSchema);
2071
2025
  _this = _callSuper(this, LiteralSchema);
2072
2026
  _this.value = value;
@@ -2075,7 +2029,6 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
2075
2029
  _this.isReadonly = isReadonly;
2076
2030
  _this.isHidden = isHidden;
2077
2031
  _this.description = description;
2078
- _this.renderInput = renderInput;
2079
2032
  _this.previewInput = previewInput;
2080
2033
  return _this;
2081
2034
  }
@@ -2103,7 +2056,7 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
2103
2056
  return _createClass(LiteralSchema, [{
2104
2057
  key: "describe",
2105
2058
  value: function describe(description) {
2106
- return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
2059
+ return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
2107
2060
  }
2108
2061
 
2109
2062
  /**
@@ -2129,7 +2082,7 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
2129
2082
  }, {
2130
2083
  key: "validate",
2131
2084
  value: function validate(validationFunction) {
2132
- return new LiteralSchema(this.value, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
2085
+ return new LiteralSchema(this.value, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
2133
2086
  }
2134
2087
  }, {
2135
2088
  key: "executeValidate",
@@ -2192,19 +2145,19 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
2192
2145
  }, {
2193
2146
  key: "nullable",
2194
2147
  value: function nullable() {
2195
- return new LiteralSchema(this.value, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
2148
+ return new LiteralSchema(this.value, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
2196
2149
  }
2197
2150
  }, {
2198
2151
  key: "readonly",
2199
2152
  value: function readonly() {
2200
2153
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2201
- return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
2154
+ return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
2202
2155
  }
2203
2156
  }, {
2204
2157
  key: "hidden",
2205
2158
  value: function hidden() {
2206
2159
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2207
- return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
2160
+ return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
2208
2161
  }
2209
2162
  }, {
2210
2163
  key: "executeCustomValidateAt",
@@ -2214,23 +2167,6 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
2214
2167
  });
2215
2168
  }
2216
2169
 
2217
- /**
2218
- * How this field is laid out in the editor when it is the item of an array
2219
- * or record: `{ as: "inline" }` renders the field itself inside each row,
2220
- * instead of a preview row that navigates to it.
2221
- *
2222
- * Static configuration, not a callback — see `render.ts`.
2223
- *
2224
- * @example
2225
- * const schema = s.array(s.literal("hero").render({ as: "inline" }));
2226
- * export default c.define("/example.val.ts", schema, ["hero"]);
2227
- */
2228
- }, {
2229
- key: "render",
2230
- value: function render(input) {
2231
- return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
2232
- }
2233
-
2234
2170
  /**
2235
2171
  * How this VALUE is shown where a preview of it is needed — a row in a
2236
2172
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -2245,7 +2181,7 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
2245
2181
  }, {
2246
2182
  key: "preview",
2247
2183
  value: function preview(select) {
2248
- return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
2184
+ return new LiteralSchema(this.value, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
2249
2185
  }
2250
2186
  }, {
2251
2187
  key: "executePreviewItem",
@@ -2265,10 +2201,9 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
2265
2201
  }, {
2266
2202
  key: "executeSerialize",
2267
2203
  value: function executeSerialize() {
2268
- var _this$renderInput, _this$customValidateF;
2204
+ var _this$customValidateF;
2269
2205
  return {
2270
2206
  type: "literal",
2271
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
2272
2207
  preview: this.previewInput ? true : undefined,
2273
2208
  value: this.value,
2274
2209
  opt: this.opt,
@@ -2314,8 +2249,7 @@ var DiscriminatedUnionSchema = /*#__PURE__*/function (_Schema) {
2314
2249
  var isReadonly = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
2315
2250
  var isHidden = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
2316
2251
  var description = arguments.length > 6 ? arguments[6] : undefined;
2317
- var renderInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
2318
- var previewInput = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
2252
+ var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
2319
2253
  _classCallCheck(this, DiscriminatedUnionSchema);
2320
2254
  _this = _callSuper(this, DiscriminatedUnionSchema);
2321
2255
  _this.key = key;
@@ -2325,7 +2259,6 @@ var DiscriminatedUnionSchema = /*#__PURE__*/function (_Schema) {
2325
2259
  _this.isReadonly = isReadonly;
2326
2260
  _this.isHidden = isHidden;
2327
2261
  _this.description = description;
2328
- _this.renderInput = renderInput;
2329
2262
  _this.previewInput = previewInput;
2330
2263
  return _this;
2331
2264
  }
@@ -2358,7 +2291,7 @@ var DiscriminatedUnionSchema = /*#__PURE__*/function (_Schema) {
2358
2291
  return _createClass(DiscriminatedUnionSchema, [{
2359
2292
  key: "describe",
2360
2293
  value: function describe(description) {
2361
- return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
2294
+ return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
2362
2295
  }
2363
2296
 
2364
2297
  /**
@@ -2391,7 +2324,7 @@ var DiscriminatedUnionSchema = /*#__PURE__*/function (_Schema) {
2391
2324
  }, {
2392
2325
  key: "validate",
2393
2326
  value: function validate(validationFunction) {
2394
- return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
2327
+ return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.previewInput);
2395
2328
  }
2396
2329
  }, {
2397
2330
  key: "executeValidate",
@@ -2611,19 +2544,19 @@ var DiscriminatedUnionSchema = /*#__PURE__*/function (_Schema) {
2611
2544
  key: "nullable",
2612
2545
  value: function nullable() {
2613
2546
  // Explicit type args: `previewInput` would otherwise pin inference to `Src`.
2614
- return new DiscriminatedUnionSchema(this.key, this.items, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
2547
+ return new DiscriminatedUnionSchema(this.key, this.items, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
2615
2548
  }
2616
2549
  }, {
2617
2550
  key: "readonly",
2618
2551
  value: function readonly() {
2619
2552
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2620
- return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
2553
+ return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
2621
2554
  }
2622
2555
  }, {
2623
2556
  key: "hidden",
2624
2557
  value: function hidden() {
2625
2558
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2626
- return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
2559
+ return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
2627
2560
  }
2628
2561
  }, {
2629
2562
  key: "localeScopeChildren",
@@ -2696,29 +2629,6 @@ var DiscriminatedUnionSchema = /*#__PURE__*/function (_Schema) {
2696
2629
  return null;
2697
2630
  }
2698
2631
 
2699
- /**
2700
- * How this field is laid out in the editor when it is the item of an array
2701
- * or record: `{ as: "inline" }` renders the field itself inside each row,
2702
- * instead of a preview row that navigates to it.
2703
- *
2704
- * Static configuration, not a callback — see `render.ts`.
2705
- *
2706
- * @example
2707
- * // A page builder: the row draws the tag selector and the matched
2708
- * // variant's fields.
2709
- * const hero = s.object({ type: s.literal("hero"), title: s.string() });
2710
- * const text = s.object({ type: s.literal("text"), body: s.string() });
2711
- * const block = s.discriminatedUnion("type", hero, text).render({ as: "inline" });
2712
- * export default c.define("/example.val.ts", s.array(block), [
2713
- * { type: "hero", title: "Hello" },
2714
- * ]);
2715
- */
2716
- }, {
2717
- key: "render",
2718
- value: function render(input) {
2719
- return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
2720
- }
2721
-
2722
2632
  /**
2723
2633
  * How this VALUE is shown where a preview of it is needed — a row in a
2724
2634
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -2741,7 +2651,7 @@ var DiscriminatedUnionSchema = /*#__PURE__*/function (_Schema) {
2741
2651
  }, {
2742
2652
  key: "preview",
2743
2653
  value: function preview(select) {
2744
- return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
2654
+ return new DiscriminatedUnionSchema(this.key, this.items, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
2745
2655
  }
2746
2656
  }, {
2747
2657
  key: "executePreviewItem",
@@ -2772,10 +2682,9 @@ var DiscriminatedUnionSchema = /*#__PURE__*/function (_Schema) {
2772
2682
  }, {
2773
2683
  key: "executeSerialize",
2774
2684
  value: function executeSerialize() {
2775
- var _this$renderInput, _this$customValidateF;
2685
+ var _this$customValidateF;
2776
2686
  return {
2777
2687
  type: "discriminated-union",
2778
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
2779
2688
  preview: this.previewInput ? true : undefined,
2780
2689
  key: this.key,
2781
2690
  // Every item is an ObjectSchema — `executeValidate` reports a schema
@@ -3797,8 +3706,7 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
3797
3706
  var isReadonly = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
3798
3707
  var isHidden = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
3799
3708
  var description = arguments.length > 7 ? arguments[7] : undefined;
3800
- var renderInput = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
3801
- var previewInput = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : null;
3709
+ var previewInput = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
3802
3710
  _classCallCheck(this, ImageSchema);
3803
3711
  _this = _callSuper(this, ImageSchema);
3804
3712
  _this.options = options;
@@ -3809,7 +3717,6 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
3809
3717
  _this.isReadonly = isReadonly;
3810
3718
  _this.isHidden = isHidden;
3811
3719
  _this.description = description;
3812
- _this.renderInput = renderInput;
3813
3720
  _this.previewInput = previewInput;
3814
3721
  return _this;
3815
3722
  }
@@ -3842,7 +3749,7 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
3842
3749
  return _createClass(ImageSchema, [{
3843
3750
  key: "describe",
3844
3751
  value: function describe(description) {
3845
- return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
3752
+ return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
3846
3753
  }
3847
3754
 
3848
3755
  /**
@@ -3872,7 +3779,7 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
3872
3779
  }, {
3873
3780
  key: "remote",
3874
3781
  value: function remote() {
3875
- return new ImageSchema(this.options, this.opt, true, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
3782
+ return new ImageSchema(this.options, this.opt, true, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.previewInput);
3876
3783
  }
3877
3784
 
3878
3785
  /**
@@ -3907,7 +3814,7 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
3907
3814
  }, {
3908
3815
  key: "validate",
3909
3816
  value: function validate(validationFunction) {
3910
- return new ImageSchema(this.options, this.opt, this.isRemote, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
3817
+ return new ImageSchema(this.options, this.opt, this.isRemote, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.previewInput);
3911
3818
  }
3912
3819
  }, {
3913
3820
  key: "executeValidate",
@@ -4097,19 +4004,19 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
4097
4004
  }, {
4098
4005
  key: "nullable",
4099
4006
  value: function nullable() {
4100
- return new ImageSchema(this.options, true, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4007
+ return new ImageSchema(this.options, true, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.previewInput);
4101
4008
  }
4102
4009
  }, {
4103
4010
  key: "readonly",
4104
4011
  value: function readonly() {
4105
4012
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4106
- return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4013
+ return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, isReadonly, this.isHidden, this.description, this.previewInput);
4107
4014
  }
4108
4015
  }, {
4109
4016
  key: "hidden",
4110
4017
  value: function hidden() {
4111
4018
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4112
- return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
4019
+ return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, isHidden, this.description, this.previewInput);
4113
4020
  }
4114
4021
  }, {
4115
4022
  key: "executeCustomValidateAt",
@@ -4119,30 +4026,6 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
4119
4026
  });
4120
4027
  }
4121
4028
 
4122
- /**
4123
- * How this field is laid out in the editor when it is the item of an array
4124
- * or record: `{ as: "inline" }` renders the field itself inside each row,
4125
- * instead of a preview row that navigates to it.
4126
- *
4127
- * Static configuration, not a callback — see `render.ts`.
4128
- *
4129
- * @example
4130
- * const schema = s.array(s.image().render({ as: "inline" }));
4131
- * export default c.define("/example.val.ts", schema, [
4132
- * {
4133
- * path: "/public/val/example.png",
4134
- * width: 100,
4135
- * height: 100,
4136
- * mimeType: "image/png",
4137
- * },
4138
- * ]);
4139
- */
4140
- }, {
4141
- key: "render",
4142
- value: function render(input) {
4143
- return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
4144
- }
4145
-
4146
4029
  /**
4147
4030
  * How this VALUE is shown where a preview of it is needed — a row in a
4148
4031
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -4168,7 +4051,7 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
4168
4051
  }, {
4169
4052
  key: "preview",
4170
4053
  value: function preview(select) {
4171
- return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
4054
+ return new ImageSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, select);
4172
4055
  }
4173
4056
  }, {
4174
4057
  key: "executePreviewItem",
@@ -4188,11 +4071,10 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
4188
4071
  }, {
4189
4072
  key: "executeSerialize",
4190
4073
  value: function executeSerialize() {
4191
- var _this$renderInput, _this$customValidateF;
4074
+ var _this$customValidateF;
4192
4075
  var modulePaths = this.moduleMetadata ? Object.keys(this.moduleMetadata) : [];
4193
4076
  return {
4194
4077
  type: "image",
4195
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
4196
4078
  preview: this.previewInput ? true : undefined,
4197
4079
  options: this.options,
4198
4080
  opt: this.opt,
@@ -4241,8 +4123,7 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4241
4123
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
4242
4124
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
4243
4125
  var description = arguments.length > 5 ? arguments[5] : undefined;
4244
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
4245
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
4126
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
4246
4127
  _classCallCheck(this, RouteSchema);
4247
4128
  _this = _callSuper(this, RouteSchema);
4248
4129
  _this.options = options;
@@ -4251,7 +4132,6 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4251
4132
  _this.isReadonly = isReadonly;
4252
4133
  _this.isHidden = isHidden;
4253
4134
  _this.description = description;
4254
- _this.renderInput = renderInput;
4255
4135
  _this.previewInput = previewInput;
4256
4136
  return _this;
4257
4137
  }
@@ -4277,7 +4157,7 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4277
4157
  return _createClass(RouteSchema, [{
4278
4158
  key: "describe",
4279
4159
  value: function describe(description) {
4280
- return new RouteSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
4160
+ return new RouteSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
4281
4161
  }
4282
4162
 
4283
4163
  /**
@@ -4297,7 +4177,7 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4297
4177
  value: function include(pattern) {
4298
4178
  return new RouteSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
4299
4179
  include: pattern
4300
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4180
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
4301
4181
  }
4302
4182
 
4303
4183
  /**
@@ -4317,7 +4197,7 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4317
4197
  value: function exclude(pattern) {
4318
4198
  return new RouteSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
4319
4199
  exclude: pattern
4320
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4200
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
4321
4201
  }
4322
4202
 
4323
4203
  /**
@@ -4343,7 +4223,7 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4343
4223
  }, {
4344
4224
  key: "validate",
4345
4225
  value: function validate(validationFunction) {
4346
- return new RouteSchema(this.options, this.opt, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4226
+ return new RouteSchema(this.options, this.opt, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.previewInput);
4347
4227
  }
4348
4228
  }, {
4349
4229
  key: "executeValidate",
@@ -4398,19 +4278,19 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4398
4278
  }, {
4399
4279
  key: "nullable",
4400
4280
  value: function nullable() {
4401
- return new RouteSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4281
+ return new RouteSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
4402
4282
  }
4403
4283
  }, {
4404
4284
  key: "readonly",
4405
4285
  value: function readonly() {
4406
4286
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4407
- return new RouteSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4287
+ return new RouteSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
4408
4288
  }
4409
4289
  }, {
4410
4290
  key: "hidden",
4411
4291
  value: function hidden() {
4412
4292
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4413
- return new RouteSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
4293
+ return new RouteSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
4414
4294
  }
4415
4295
  }, {
4416
4296
  key: "executeCustomValidateAt",
@@ -4420,23 +4300,6 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4420
4300
  });
4421
4301
  }
4422
4302
 
4423
- /**
4424
- * How this field is laid out in the editor when it is the item of an array
4425
- * or record: `{ as: "inline" }` renders the field itself inside each row,
4426
- * instead of a preview row that navigates to it.
4427
- *
4428
- * Static configuration, not a callback — see `render.ts`.
4429
- *
4430
- * @example
4431
- * const schema = s.array(s.route().render({ as: "inline" }));
4432
- * export default c.define("/example.val.ts", schema, ["/a-page-slug"]);
4433
- */
4434
- }, {
4435
- key: "render",
4436
- value: function render(input) {
4437
- return new RouteSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
4438
- }
4439
-
4440
4303
  /**
4441
4304
  * How this VALUE is shown where a preview of it is needed — a row in a
4442
4305
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -4451,7 +4314,7 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4451
4314
  }, {
4452
4315
  key: "preview",
4453
4316
  value: function preview(select) {
4454
- return new RouteSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
4317
+ return new RouteSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
4455
4318
  }
4456
4319
  }, {
4457
4320
  key: "executePreviewItem",
@@ -4471,10 +4334,9 @@ var RouteSchema = /*#__PURE__*/function (_Schema) {
4471
4334
  }, {
4472
4335
  key: "executeSerialize",
4473
4336
  value: function executeSerialize() {
4474
- var _this$renderInput, _this$options3, _this$options4, _this$customValidateF, _this$customValidateF2;
4337
+ var _this$options3, _this$options4, _this$customValidateF, _this$customValidateF2;
4475
4338
  return {
4476
4339
  type: "route",
4477
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
4478
4340
  preview: this.previewInput ? true : undefined,
4479
4341
  options: {
4480
4342
  include: ((_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.include) && {
@@ -4508,8 +4370,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
4508
4370
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
4509
4371
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
4510
4372
  var description = arguments.length > 5 ? arguments[5] : undefined;
4511
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
4512
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
4373
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
4513
4374
  _classCallCheck(this, RichTextSchema);
4514
4375
  _this = _callSuper(this, RichTextSchema);
4515
4376
  _this.options = options;
@@ -4518,7 +4379,6 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
4518
4379
  _this.isReadonly = isReadonly;
4519
4380
  _this.isHidden = isHidden;
4520
4381
  _this.description = description;
4521
- _this.renderInput = renderInput;
4522
4382
  _this.previewInput = previewInput;
4523
4383
  return _this;
4524
4384
  }
@@ -4546,7 +4406,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
4546
4406
  return _createClass(RichTextSchema, [{
4547
4407
  key: "describe",
4548
4408
  value: function describe(description) {
4549
- return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
4409
+ return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
4550
4410
  }
4551
4411
 
4552
4412
  /**
@@ -4566,7 +4426,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
4566
4426
  value: function maxLength(max) {
4567
4427
  return new RichTextSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
4568
4428
  maxLength: max
4569
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4429
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
4570
4430
  }
4571
4431
 
4572
4432
  /**
@@ -4586,7 +4446,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
4586
4446
  value: function minLength(min) {
4587
4447
  return new RichTextSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
4588
4448
  minLength: min
4589
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4449
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
4590
4450
  }
4591
4451
 
4592
4452
  /**
@@ -4614,7 +4474,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
4614
4474
  }, {
4615
4475
  key: "validate",
4616
4476
  value: function validate(validationFunction) {
4617
- return new RichTextSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4477
+ return new RichTextSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
4618
4478
  }
4619
4479
  }, {
4620
4480
  key: "executeValidate",
@@ -5058,19 +4918,19 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
5058
4918
  }, {
5059
4919
  key: "nullable",
5060
4920
  value: function nullable() {
5061
- return new RichTextSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4921
+ return new RichTextSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
5062
4922
  }
5063
4923
  }, {
5064
4924
  key: "readonly",
5065
4925
  value: function readonly() {
5066
4926
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
5067
- return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
4927
+ return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
5068
4928
  }
5069
4929
  }, {
5070
4930
  key: "hidden",
5071
4931
  value: function hidden() {
5072
4932
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
5073
- return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
4933
+ return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
5074
4934
  }
5075
4935
  }, {
5076
4936
  key: "executeCustomValidateAt",
@@ -5080,25 +4940,6 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
5080
4940
  });
5081
4941
  }
5082
4942
 
5083
- /**
5084
- * How this field is laid out in the editor when it is the item of an array
5085
- * or record: `{ as: "inline" }` renders the field itself inside each row,
5086
- * instead of a preview row that navigates to it.
5087
- *
5088
- * Static configuration, not a callback — see `render.ts`.
5089
- *
5090
- * @example
5091
- * const schema = s.array(s.richtext().render({ as: "inline" }));
5092
- * export default c.define("/example.val.ts", schema, [
5093
- * [{ tag: "p", children: ["Hello"] }],
5094
- * ]);
5095
- */
5096
- }, {
5097
- key: "render",
5098
- value: function render(input) {
5099
- return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
5100
- }
5101
-
5102
4943
  /**
5103
4944
  * How this VALUE is shown where a preview of it is needed — a row in a
5104
4945
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -5117,7 +4958,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
5117
4958
  }, {
5118
4959
  key: "preview",
5119
4960
  value: function preview(select) {
5120
- return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
4961
+ return new RichTextSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
5121
4962
  }
5122
4963
  }, {
5123
4964
  key: "executePreviewItem",
@@ -5138,7 +4979,6 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
5138
4979
  key: "executeSerialize",
5139
4980
  value: function executeSerialize() {
5140
4981
  var _this3 = this,
5141
- _this$renderInput,
5142
4982
  _this$customValidateF;
5143
4983
  var serializeAnchorSchema = function serializeAnchorSchema() {
5144
4984
  if (_this3.options.a instanceof RouteSchema) {
@@ -5168,7 +5008,6 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
5168
5008
  };
5169
5009
  return {
5170
5010
  type: "richtext",
5171
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
5172
5011
  preview: this.previewInput ? true : undefined,
5173
5012
  opt: this.opt,
5174
5013
  options: serializedOptions,
@@ -5632,6 +5471,25 @@ function missingDeclaredKeys(declared, present) {
5632
5471
  });
5633
5472
  }
5634
5473
 
5474
+ /**
5475
+ * `.render(...)` is for records whose entries the generic record editor draws.
5476
+ * A router's entries are pages and a gallery's are media, and both have UIs of
5477
+ * their own that a render would not reach — so the combination is refused
5478
+ * rather than accepted and ignored. Called from both `render` and `router`,
5479
+ * because either can come first in the chain.
5480
+ */
5481
+ function assertRenderable(router, mediaOptions, render) {
5482
+ if (render === null) {
5483
+ return;
5484
+ }
5485
+ if (router) {
5486
+ throw new Error("`.render(...)` is not supported on `s.router(...)`: a router's entries are pages, which have their own UI.");
5487
+ }
5488
+ if (mediaOptions) {
5489
+ throw new Error("`.render(...)` is not supported on `s.".concat(mediaOptions.type === "images" ? "imageset" : "fileset", "(...)`: media galleries have their own UI."));
5490
+ }
5491
+ }
5492
+
5635
5493
  /**
5636
5494
  * A router's scheme restriction, as a spreadable fragment.
5637
5495
  *
@@ -6230,6 +6088,7 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
6230
6088
  }, {
6231
6089
  key: "router",
6232
6090
  value: function router(_router) {
6091
+ assertRenderable(_router, this.mediaOptions, this.renderInput);
6233
6092
  return new RecordSchema(this.item, this.opt, this.customValidateFunctions, _router, this.keySchema, this.mediaOptions, this.isReadonly, this.isHidden, this.description, this.isJsonValues, this.previewInput, this.renderInput, this.externalLabel);
6234
6093
  }
6235
6094
 
@@ -6649,19 +6508,23 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
6649
6508
  }
6650
6509
 
6651
6510
  /**
6652
- * How this field is laid out in the editor when it is the item of an array
6653
- * or record: `{ as: "inline" }` renders the field itself inside each row,
6654
- * instead of a preview row that navigates to it.
6511
+ * How this record lays out its ENTRIES in the editor: `{ as: "inline" }`
6512
+ * draws each entry's own editor in place, labelled by its key, instead of a
6513
+ * preview row that navigates to it. It reaches the direct entries only.
6514
+ *
6515
+ * Not for `s.router(...)`, `s.imageset(...)` or `s.fileset(...)`: pages and
6516
+ * media have UIs of their own, so this throws on them.
6655
6517
  *
6656
6518
  * Static configuration, not a callback — see `render.ts`.
6657
6519
  *
6658
6520
  * @example
6659
- * const schema = s.array(s.record(s.string()).render({ as: "inline" }));
6660
- * export default c.define("/example.val.ts", schema, [{ en: "Read more" }]);
6521
+ * const schema = s.record(s.string()).render({ as: "inline" });
6522
+ * export default c.define("/example.val.ts", schema, { en: "Read more" });
6661
6523
  */
6662
6524
  }, {
6663
6525
  key: "render",
6664
6526
  value: function render(input) {
6527
+ assertRenderable(this.currentRouter, this.mediaOptions, input);
6665
6528
  return new RecordSchema(this.item, this.opt, this.customValidateFunctions, this.currentRouter, this.keySchema, this.mediaOptions, this.isReadonly, this.isHidden, this.description, this.isJsonValues, this.previewInput, input, this.externalLabel);
6666
6529
  }
6667
6530
  }]);
@@ -6898,8 +6761,7 @@ var LocaleSchema = /*#__PURE__*/function (_Schema) {
6898
6761
  var isReadonly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
6899
6762
  var isHidden = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
6900
6763
  var description = arguments.length > 4 ? arguments[4] : undefined;
6901
- var renderInput = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
6902
- var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
6764
+ var previewInput = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
6903
6765
  _classCallCheck(this, LocaleSchema);
6904
6766
  _this = _callSuper(this, LocaleSchema);
6905
6767
  _this.opt = opt;
@@ -6907,7 +6769,6 @@ var LocaleSchema = /*#__PURE__*/function (_Schema) {
6907
6769
  _this.isReadonly = isReadonly;
6908
6770
  _this.isHidden = isHidden;
6909
6771
  _this.description = description;
6910
- _this.renderInput = renderInput;
6911
6772
  _this.previewInput = previewInput;
6912
6773
  return _this;
6913
6774
  }
@@ -6931,7 +6792,7 @@ var LocaleSchema = /*#__PURE__*/function (_Schema) {
6931
6792
  return _createClass(LocaleSchema, [{
6932
6793
  key: "describe",
6933
6794
  value: function describe(description) {
6934
- return new LocaleSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
6795
+ return new LocaleSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
6935
6796
  }
6936
6797
 
6937
6798
  /**
@@ -6957,7 +6818,7 @@ var LocaleSchema = /*#__PURE__*/function (_Schema) {
6957
6818
  }, {
6958
6819
  key: "validate",
6959
6820
  value: function validate(validationFunction) {
6960
- return new LocaleSchema(this.opt, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
6821
+ return new LocaleSchema(this.opt, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.previewInput);
6961
6822
  }
6962
6823
  }, {
6963
6824
  key: "executeValidate",
@@ -7015,17 +6876,17 @@ var LocaleSchema = /*#__PURE__*/function (_Schema) {
7015
6876
  // Asserted whole, exactly as `RouteSchema.nullable` does: the source type
7016
6877
  // widens by `null` while the caller's validators and preview stay typed
7017
6878
  // against the value, and `executeValidate` returns before either sees one.
7018
- return new LocaleSchema(true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
6879
+ return new LocaleSchema(true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
7019
6880
  }
7020
6881
  }, {
7021
6882
  key: "readonly",
7022
6883
  value: function readonly() {
7023
- return new LocaleSchema(this.opt, this.customValidateFunctions, true, this.isHidden, this.description, this.renderInput, this.previewInput);
6884
+ return new LocaleSchema(this.opt, this.customValidateFunctions, true, this.isHidden, this.description, this.previewInput);
7024
6885
  }
7025
6886
  }, {
7026
6887
  key: "hidden",
7027
6888
  value: function hidden() {
7028
- return new LocaleSchema(this.opt, this.customValidateFunctions, this.isReadonly, true, this.description, this.renderInput, this.previewInput);
6889
+ return new LocaleSchema(this.opt, this.customValidateFunctions, this.isReadonly, true, this.description, this.previewInput);
7029
6890
  }
7030
6891
  }, {
7031
6892
  key: "isLocaleField",
@@ -7040,20 +6901,6 @@ var LocaleSchema = /*#__PURE__*/function (_Schema) {
7040
6901
  });
7041
6902
  }
7042
6903
 
7043
- /**
7044
- * How this field is laid out where it is the item of an array or a record.
7045
- * Static configuration, not a callback — see `render.ts`.
7046
- *
7047
- * @example
7048
- * const schema = s.array(s.locale().render({ as: "inline" }));
7049
- * export default c.define("/example.val.ts", schema, ["nb-NO", "en-US"]);
7050
- */
7051
- }, {
7052
- key: "render",
7053
- value: function render(input) {
7054
- return new LocaleSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
7055
- }
7056
-
7057
6904
  /**
7058
6905
  * How this VALUE is shown where a preview of it is needed. Never how the field
7059
6906
  * itself is edited (that is `render`). See `preview.ts`.
@@ -7067,7 +6914,7 @@ var LocaleSchema = /*#__PURE__*/function (_Schema) {
7067
6914
  }, {
7068
6915
  key: "preview",
7069
6916
  value: function preview(select) {
7070
- return new LocaleSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
6917
+ return new LocaleSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
7071
6918
  }
7072
6919
  }, {
7073
6920
  key: "executePreviewItem",
@@ -7087,10 +6934,9 @@ var LocaleSchema = /*#__PURE__*/function (_Schema) {
7087
6934
  }, {
7088
6935
  key: "executeSerialize",
7089
6936
  value: function executeSerialize() {
7090
- var _this$renderInput, _this$customValidateF;
6937
+ var _this$customValidateF;
7091
6938
  return {
7092
6939
  type: "locale",
7093
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
7094
6940
  preview: this.previewInput ? true : undefined,
7095
6941
  opt: this.opt,
7096
6942
  customValidate: this.customValidateFunctions && ((_this$customValidateF = this.customValidateFunctions) === null || _this$customValidateF === void 0 ? void 0 : _this$customValidateF.length) > 0,
@@ -7126,8 +6972,7 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
7126
6972
  var isReadonly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7127
6973
  var isHidden = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
7128
6974
  var description = arguments.length > 4 ? arguments[4] : undefined;
7129
- var renderInput = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
7130
- var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
6975
+ var previewInput = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
7131
6976
  _classCallCheck(this, BooleanSchema);
7132
6977
  _this = _callSuper(this, BooleanSchema);
7133
6978
  _this.opt = opt;
@@ -7135,7 +6980,6 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
7135
6980
  _this.isReadonly = isReadonly;
7136
6981
  _this.isHidden = isHidden;
7137
6982
  _this.description = description;
7138
- _this.renderInput = renderInput;
7139
6983
  _this.previewInput = previewInput;
7140
6984
  return _this;
7141
6985
  }
@@ -7161,7 +7005,7 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
7161
7005
  return _createClass(BooleanSchema, [{
7162
7006
  key: "describe",
7163
7007
  value: function describe(description) {
7164
- return new BooleanSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
7008
+ return new BooleanSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
7165
7009
  }
7166
7010
 
7167
7011
  /**
@@ -7187,7 +7031,7 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
7187
7031
  }, {
7188
7032
  key: "validate",
7189
7033
  value: function validate(validationFunction) {
7190
- return new BooleanSchema(this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
7034
+ return new BooleanSchema(this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
7191
7035
  }
7192
7036
  }, {
7193
7037
  key: "executeValidate",
@@ -7238,19 +7082,19 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
7238
7082
  }, {
7239
7083
  key: "nullable",
7240
7084
  value: function nullable() {
7241
- return new BooleanSchema(true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
7085
+ return new BooleanSchema(true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
7242
7086
  }
7243
7087
  }, {
7244
7088
  key: "readonly",
7245
7089
  value: function readonly() {
7246
7090
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
7247
- return new BooleanSchema(this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
7091
+ return new BooleanSchema(this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
7248
7092
  }
7249
7093
  }, {
7250
7094
  key: "hidden",
7251
7095
  value: function hidden() {
7252
7096
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
7253
- return new BooleanSchema(this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
7097
+ return new BooleanSchema(this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
7254
7098
  }
7255
7099
  }, {
7256
7100
  key: "executeCustomValidateAt",
@@ -7260,23 +7104,6 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
7260
7104
  });
7261
7105
  }
7262
7106
 
7263
- /**
7264
- * How this field is laid out in the editor when it is the item of an array
7265
- * or record: `{ as: "inline" }` renders the field itself inside each row,
7266
- * instead of a preview row that navigates to it.
7267
- *
7268
- * Static configuration, not a callback — see `render.ts`.
7269
- *
7270
- * @example
7271
- * const schema = s.array(s.boolean().render({ as: "inline" }));
7272
- * export default c.define("/example.val.ts", schema, [true, false]);
7273
- */
7274
- }, {
7275
- key: "render",
7276
- value: function render(input) {
7277
- return new BooleanSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
7278
- }
7279
-
7280
7107
  /**
7281
7108
  * How this VALUE is shown where a preview of it is needed — a row in a
7282
7109
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -7291,7 +7118,7 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
7291
7118
  }, {
7292
7119
  key: "preview",
7293
7120
  value: function preview(select) {
7294
- return new BooleanSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
7121
+ return new BooleanSchema(this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
7295
7122
  }
7296
7123
  }, {
7297
7124
  key: "executePreviewItem",
@@ -7311,10 +7138,9 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
7311
7138
  }, {
7312
7139
  key: "executeSerialize",
7313
7140
  value: function executeSerialize() {
7314
- var _this$renderInput, _this$customValidateF;
7141
+ var _this$customValidateF;
7315
7142
  return {
7316
7143
  type: "boolean",
7317
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
7318
7144
  preview: this.previewInput ? true : undefined,
7319
7145
  opt: this.opt,
7320
7146
  customValidate: this.customValidateFunctions && ((_this$customValidateF = this.customValidateFunctions) === null || _this$customValidateF === void 0 ? void 0 : _this$customValidateF.length) > 0,
@@ -7817,8 +7643,7 @@ var ColorSchema = /*#__PURE__*/function (_Schema) {
7817
7643
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
7818
7644
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
7819
7645
  var description = arguments.length > 5 ? arguments[5] : undefined;
7820
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
7821
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
7646
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
7822
7647
  _classCallCheck(this, ColorSchema);
7823
7648
  _this = _callSuper(this, ColorSchema);
7824
7649
  _this.options = options;
@@ -7827,7 +7652,6 @@ var ColorSchema = /*#__PURE__*/function (_Schema) {
7827
7652
  _this.isReadonly = isReadonly;
7828
7653
  _this.isHidden = isHidden;
7829
7654
  _this.description = description;
7830
- _this.renderInput = renderInput;
7831
7655
  _this.previewInput = previewInput;
7832
7656
  return _this;
7833
7657
  }
@@ -7857,7 +7681,7 @@ var ColorSchema = /*#__PURE__*/function (_Schema) {
7857
7681
  return _createClass(ColorSchema, [{
7858
7682
  key: "describe",
7859
7683
  value: function describe(description) {
7860
- return new ColorSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
7684
+ return new ColorSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
7861
7685
  }
7862
7686
 
7863
7687
  /**
@@ -7885,7 +7709,7 @@ var ColorSchema = /*#__PURE__*/function (_Schema) {
7885
7709
  }, {
7886
7710
  key: "validate",
7887
7711
  value: function validate(validationFunction) {
7888
- return new ColorSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
7712
+ return new ColorSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
7889
7713
  }
7890
7714
  }, {
7891
7715
  key: "executeCustomValidateAt",
@@ -7982,38 +7806,19 @@ var ColorSchema = /*#__PURE__*/function (_Schema) {
7982
7806
  }, {
7983
7807
  key: "nullable",
7984
7808
  value: function nullable() {
7985
- return new ColorSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
7809
+ return new ColorSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
7986
7810
  }
7987
7811
  }, {
7988
7812
  key: "readonly",
7989
7813
  value: function readonly() {
7990
7814
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
7991
- return new ColorSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
7815
+ return new ColorSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
7992
7816
  }
7993
7817
  }, {
7994
7818
  key: "hidden",
7995
7819
  value: function hidden() {
7996
7820
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
7997
- return new ColorSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
7998
- }
7999
-
8000
- /**
8001
- * How this field is laid out in the editor when it is the item of an array
8002
- * or record: `{ as: "inline" }` renders the field itself inside each row,
8003
- * instead of a preview row that navigates to it.
8004
- *
8005
- * Static configuration, not a callback — see `render.ts`.
8006
- *
8007
- * @example
8008
- * const schema = s.array(s.color().render({ as: "inline" }));
8009
- * export default c.define("/example.val.ts", schema, [
8010
- * "hsl(217.22 91.22% 59.8%)",
8011
- * ]);
8012
- */
8013
- }, {
8014
- key: "render",
8015
- value: function render(input) {
8016
- return new ColorSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
7821
+ return new ColorSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
8017
7822
  }
8018
7823
 
8019
7824
  /**
@@ -8032,7 +7837,7 @@ var ColorSchema = /*#__PURE__*/function (_Schema) {
8032
7837
  }, {
8033
7838
  key: "preview",
8034
7839
  value: function preview(select) {
8035
- return new ColorSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
7840
+ return new ColorSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
8036
7841
  }
8037
7842
  }, {
8038
7843
  key: "executePreviewItem",
@@ -8052,10 +7857,9 @@ var ColorSchema = /*#__PURE__*/function (_Schema) {
8052
7857
  }, {
8053
7858
  key: "executeSerialize",
8054
7859
  value: function executeSerialize() {
8055
- var _this$renderInput, _this$customValidateF;
7860
+ var _this$customValidateF;
8056
7861
  return {
8057
7862
  type: "color",
8058
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
8059
7863
  preview: this.previewInput ? true : undefined,
8060
7864
  opt: this.opt,
8061
7865
  options: this.options,
@@ -8097,8 +7901,7 @@ var EnumSchema = /*#__PURE__*/function (_Schema) {
8097
7901
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
8098
7902
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
8099
7903
  var description = arguments.length > 5 ? arguments[5] : undefined;
8100
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
8101
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
7904
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
8102
7905
  _classCallCheck(this, EnumSchema);
8103
7906
  _this = _callSuper(this, EnumSchema);
8104
7907
  _this.values = values;
@@ -8107,7 +7910,6 @@ var EnumSchema = /*#__PURE__*/function (_Schema) {
8107
7910
  _this.isReadonly = isReadonly;
8108
7911
  _this.isHidden = isHidden;
8109
7912
  _this.description = description;
8110
- _this.renderInput = renderInput;
8111
7913
  _this.previewInput = previewInput;
8112
7914
  return _this;
8113
7915
  }
@@ -8135,7 +7937,7 @@ var EnumSchema = /*#__PURE__*/function (_Schema) {
8135
7937
  return _createClass(EnumSchema, [{
8136
7938
  key: "describe",
8137
7939
  value: function describe(description) {
8138
- return new EnumSchema(this.values, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
7940
+ return new EnumSchema(this.values, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
8139
7941
  }
8140
7942
 
8141
7943
  /**
@@ -8160,7 +7962,7 @@ var EnumSchema = /*#__PURE__*/function (_Schema) {
8160
7962
  }, {
8161
7963
  key: "validate",
8162
7964
  value: function validate(validationFunction) {
8163
- return new EnumSchema(this.values, this.opt, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
7965
+ return new EnumSchema(this.values, this.opt, this.customValidateFunctions.concat(validationFunction), this.isReadonly, this.isHidden, this.description, this.previewInput);
8164
7966
  }
8165
7967
  }, {
8166
7968
  key: "executeValidate",
@@ -8246,19 +8048,19 @@ var EnumSchema = /*#__PURE__*/function (_Schema) {
8246
8048
  key: "nullable",
8247
8049
  value: function nullable() {
8248
8050
  // Explicit type args: `previewInput` would otherwise pin inference to `Src`.
8249
- return new EnumSchema(this.values, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
8051
+ return new EnumSchema(this.values, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
8250
8052
  }
8251
8053
  }, {
8252
8054
  key: "readonly",
8253
8055
  value: function readonly() {
8254
8056
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
8255
- return new EnumSchema(this.values, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
8057
+ return new EnumSchema(this.values, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
8256
8058
  }
8257
8059
  }, {
8258
8060
  key: "hidden",
8259
8061
  value: function hidden() {
8260
8062
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
8261
- return new EnumSchema(this.values, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
8063
+ return new EnumSchema(this.values, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
8262
8064
  }
8263
8065
  }, {
8264
8066
  key: "executeCustomValidateAt",
@@ -8268,25 +8070,6 @@ var EnumSchema = /*#__PURE__*/function (_Schema) {
8268
8070
  });
8269
8071
  }
8270
8072
 
8271
- /**
8272
- * How this field is laid out in the editor when it is the item of an array
8273
- * or record: `{ as: "inline" }` renders the field itself inside each row,
8274
- * instead of a preview row that navigates to it.
8275
- *
8276
- * Static configuration, not a callback — see `render.ts`.
8277
- *
8278
- * @example
8279
- * const schema = s.array(
8280
- * s.enum("draft", "published").render({ as: "inline" }),
8281
- * );
8282
- * export default c.define("/example.val.ts", schema, ["draft"]);
8283
- */
8284
- }, {
8285
- key: "render",
8286
- value: function render(input) {
8287
- return new EnumSchema(this.values, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
8288
- }
8289
-
8290
8073
  /**
8291
8074
  * How this VALUE is shown where a preview of it is needed — a row in a
8292
8075
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -8301,7 +8084,7 @@ var EnumSchema = /*#__PURE__*/function (_Schema) {
8301
8084
  }, {
8302
8085
  key: "preview",
8303
8086
  value: function preview(select) {
8304
- return new EnumSchema(this.values, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
8087
+ return new EnumSchema(this.values, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
8305
8088
  }
8306
8089
  }, {
8307
8090
  key: "executePreviewItem",
@@ -8321,10 +8104,9 @@ var EnumSchema = /*#__PURE__*/function (_Schema) {
8321
8104
  }, {
8322
8105
  key: "executeSerialize",
8323
8106
  value: function executeSerialize() {
8324
- var _this$renderInput, _this$customValidateF;
8107
+ var _this$customValidateF;
8325
8108
  return {
8326
8109
  type: "enum",
8327
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
8328
8110
  preview: this.previewInput ? true : undefined,
8329
8111
  values: _toConsumableArray(this.values),
8330
8112
  opt: this.opt,
@@ -8876,7 +8658,6 @@ var ValViewSchema = /*#__PURE__*/function (_Schema) {
8876
8658
  var isReadonly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
8877
8659
  var isHidden = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
8878
8660
  var description = arguments.length > 4 ? arguments[4] : undefined;
8879
- var renderInput = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
8880
8661
  _classCallCheck(this, ValViewSchema);
8881
8662
  _this = _callSuper(this, ValViewSchema);
8882
8663
  _this.moduleFilePath = moduleFilePath;
@@ -8884,7 +8665,6 @@ var ValViewSchema = /*#__PURE__*/function (_Schema) {
8884
8665
  _this.isReadonly = isReadonly;
8885
8666
  _this.isHidden = isHidden;
8886
8667
  _this.description = description;
8887
- _this.renderInput = renderInput;
8888
8668
  return _this;
8889
8669
  }
8890
8670
 
@@ -8910,7 +8690,7 @@ var ValViewSchema = /*#__PURE__*/function (_Schema) {
8910
8690
  return _createClass(ValViewSchema, [{
8911
8691
  key: "describe",
8912
8692
  value: function describe(description) {
8913
- return new ValViewSchema(this.moduleFilePath, this.valModule, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput);
8693
+ return new ValViewSchema(this.moduleFilePath, this.valModule, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined);
8914
8694
  }
8915
8695
 
8916
8696
  /**
@@ -9005,7 +8785,7 @@ var ValViewSchema = /*#__PURE__*/function (_Schema) {
9005
8785
  key: "readonly",
9006
8786
  value: function readonly() {
9007
8787
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
9008
- return new ValViewSchema(this.moduleFilePath, this.valModule, isReadonly, this.isHidden, this.description, this.renderInput);
8788
+ return new ValViewSchema(this.moduleFilePath, this.valModule, isReadonly, this.isHidden, this.description);
9009
8789
  }
9010
8790
 
9011
8791
  /**
@@ -9032,36 +8812,13 @@ var ValViewSchema = /*#__PURE__*/function (_Schema) {
9032
8812
  key: "hidden",
9033
8813
  value: function hidden() {
9034
8814
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
9035
- return new ValViewSchema(this.moduleFilePath, this.valModule, this.isReadonly, isHidden, this.description, this.renderInput);
9036
- }
9037
-
9038
- /**
9039
- * How this field is laid out in the editor. Static configuration, not a
9040
- * callback — see `render.ts`.
9041
- *
9042
- * @example
9043
- * import otherVal from "./other.val"; // another module
9044
- * const schema = s.object({
9045
- * shared: s.view(otherVal).render({ as: "inline" }),
9046
- * title: s.string(),
9047
- * });
9048
- * export default c.define("/example.val.ts", schema, {
9049
- * shared: { view: "/other.val.ts" },
9050
- * title: "Hello",
9051
- * });
9052
- */
9053
- }, {
9054
- key: "render",
9055
- value: function render(input) {
9056
- return new ValViewSchema(this.moduleFilePath, this.valModule, this.isReadonly, this.isHidden, this.description, input);
8815
+ return new ValViewSchema(this.moduleFilePath, this.valModule, this.isReadonly, isHidden, this.description);
9057
8816
  }
9058
8817
  }, {
9059
8818
  key: "executeSerialize",
9060
8819
  value: function executeSerialize() {
9061
- var _this$renderInput;
9062
8820
  return {
9063
8821
  type: "view",
9064
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
9065
8822
  opt: false,
9066
8823
  moduleFilePath: this.moduleFilePath,
9067
8824
  readonly: this.isReadonly,
@@ -9739,8 +9496,7 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9739
9496
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
9740
9497
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
9741
9498
  var description = arguments.length > 5 ? arguments[5] : undefined;
9742
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
9743
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
9499
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
9744
9500
  _classCallCheck(this, NumberSchema);
9745
9501
  _this = _callSuper(this, NumberSchema);
9746
9502
  _this.options = options;
@@ -9749,7 +9505,6 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9749
9505
  _this.isReadonly = isReadonly;
9750
9506
  _this.isHidden = isHidden;
9751
9507
  _this.description = description;
9752
- _this.renderInput = renderInput;
9753
9508
  _this.previewInput = previewInput;
9754
9509
  return _this;
9755
9510
  }
@@ -9775,7 +9530,7 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9775
9530
  return _createClass(NumberSchema, [{
9776
9531
  key: "describe",
9777
9532
  value: function describe(description) {
9778
- return new NumberSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
9533
+ return new NumberSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
9779
9534
  }
9780
9535
 
9781
9536
  /**
@@ -9801,7 +9556,7 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9801
9556
  }, {
9802
9557
  key: "validate",
9803
9558
  value: function validate(validationFunction) {
9804
- return new NumberSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
9559
+ return new NumberSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
9805
9560
  }
9806
9561
  }, {
9807
9562
  key: "executeValidate",
@@ -9871,19 +9626,19 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9871
9626
  }, {
9872
9627
  key: "nullable",
9873
9628
  value: function nullable() {
9874
- return new NumberSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
9629
+ return new NumberSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
9875
9630
  }
9876
9631
  }, {
9877
9632
  key: "readonly",
9878
9633
  value: function readonly() {
9879
9634
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
9880
- return new NumberSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
9635
+ return new NumberSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
9881
9636
  }
9882
9637
  }, {
9883
9638
  key: "hidden",
9884
9639
  value: function hidden() {
9885
9640
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
9886
- return new NumberSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
9641
+ return new NumberSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
9887
9642
  }
9888
9643
 
9889
9644
  /**
@@ -9898,7 +9653,7 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9898
9653
  value: function max(_max) {
9899
9654
  return new NumberSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
9900
9655
  max: _max
9901
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
9656
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
9902
9657
  }
9903
9658
 
9904
9659
  /**
@@ -9913,7 +9668,7 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9913
9668
  value: function min(_min) {
9914
9669
  return new NumberSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
9915
9670
  min: _min
9916
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
9671
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
9917
9672
  }
9918
9673
  }, {
9919
9674
  key: "executeCustomValidateAt",
@@ -9923,23 +9678,6 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9923
9678
  });
9924
9679
  }
9925
9680
 
9926
- /**
9927
- * How this field is laid out in the editor when it is the item of an array
9928
- * or record: `{ as: "inline" }` renders the field itself inside each row,
9929
- * instead of a preview row that navigates to it.
9930
- *
9931
- * Static configuration, not a callback — see `render.ts`.
9932
- *
9933
- * @example
9934
- * const schema = s.array(s.number().render({ as: "inline" }));
9935
- * export default c.define("/example.val.ts", schema, [1, 2]);
9936
- */
9937
- }, {
9938
- key: "render",
9939
- value: function render(input) {
9940
- return new NumberSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
9941
- }
9942
-
9943
9681
  /**
9944
9682
  * How this VALUE is shown where a preview of it is needed — a row in a
9945
9683
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -9954,7 +9692,7 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9954
9692
  }, {
9955
9693
  key: "preview",
9956
9694
  value: function preview(select) {
9957
- return new NumberSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
9695
+ return new NumberSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
9958
9696
  }
9959
9697
  }, {
9960
9698
  key: "executePreviewItem",
@@ -9974,10 +9712,9 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
9974
9712
  }, {
9975
9713
  key: "executeSerialize",
9976
9714
  value: function executeSerialize() {
9977
- var _this$renderInput, _this$customValidateF;
9715
+ var _this$customValidateF;
9978
9716
  return {
9979
9717
  type: "number",
9980
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
9981
9718
  preview: this.previewInput ? true : undefined,
9982
9719
  options: this.options,
9983
9720
  opt: this.opt,
@@ -10300,16 +10037,21 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
10300
10037
  }
10301
10038
 
10302
10039
  /**
10303
- * How this field is laid out in the editor when it is the item of an array
10304
- * or record: `{ as: "inline" }` renders the field itself inside each row,
10305
- * instead of a preview row that navigates to it.
10040
+ * How this reference is laid out in the editor: `{ as: "inline" }` shows the
10041
+ * selected entry's content below the selector, so it can be read (and
10042
+ * reached) without leaving the field.
10043
+ *
10044
+ * This is about the keyOf field alone. Whether a LIST of references draws
10045
+ * its rows inline is the list's own `.render(...)` — see `render.ts`.
10306
10046
  *
10307
10047
  * Static configuration, not a callback — see `render.ts`.
10308
10048
  *
10309
10049
  * @example
10310
10050
  * import authorsVal from "./authors.val"; // a record module
10311
- * const schema = s.array(s.keyOf(authorsVal).render({ as: "inline" }));
10312
- * export default c.define("/example.val.ts", schema, ["ada"]);
10051
+ * const schema = s.object({
10052
+ * author: s.keyOf(authorsVal).render({ as: "inline" }),
10053
+ * });
10054
+ * export default c.define("/example.val.ts", schema, { author: "ada" });
10313
10055
  */
10314
10056
  }, {
10315
10057
  key: "render",
@@ -10423,8 +10165,7 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10423
10165
  var isReadonly = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
10424
10166
  var isHidden = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
10425
10167
  var description = arguments.length > 7 ? arguments[7] : undefined;
10426
- var renderInput = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
10427
- var previewInput = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : null;
10168
+ var previewInput = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
10428
10169
  _classCallCheck(this, FileSchema);
10429
10170
  _this = _callSuper(this, FileSchema);
10430
10171
  _this.options = options;
@@ -10435,7 +10176,6 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10435
10176
  _this.isReadonly = isReadonly;
10436
10177
  _this.isHidden = isHidden;
10437
10178
  _this.description = description;
10438
- _this.renderInput = renderInput;
10439
10179
  _this.previewInput = previewInput;
10440
10180
  return _this;
10441
10181
  }
@@ -10464,7 +10204,7 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10464
10204
  return _createClass(FileSchema, [{
10465
10205
  key: "describe",
10466
10206
  value: function describe(description) {
10467
- return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
10207
+ return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
10468
10208
  }
10469
10209
 
10470
10210
  /**
@@ -10490,7 +10230,7 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10490
10230
  }, {
10491
10231
  key: "remote",
10492
10232
  value: function remote() {
10493
- return new FileSchema(this.options, this.opt, true, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10233
+ return new FileSchema(this.options, this.opt, true, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.previewInput);
10494
10234
  }
10495
10235
 
10496
10236
  /**
@@ -10522,7 +10262,7 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10522
10262
  }, {
10523
10263
  key: "validate",
10524
10264
  value: function validate(validationFunction) {
10525
- return new FileSchema(this.options, this.opt, this.isRemote, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10265
+ return new FileSchema(this.options, this.opt, this.isRemote, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.previewInput);
10526
10266
  }
10527
10267
  }, {
10528
10268
  key: "executeValidate",
@@ -10697,19 +10437,19 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10697
10437
  }, {
10698
10438
  key: "nullable",
10699
10439
  value: function nullable() {
10700
- return new FileSchema(this.options, true, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10440
+ return new FileSchema(this.options, true, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.previewInput);
10701
10441
  }
10702
10442
  }, {
10703
10443
  key: "readonly",
10704
10444
  value: function readonly() {
10705
10445
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
10706
- return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10446
+ return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, isReadonly, this.isHidden, this.description, this.previewInput);
10707
10447
  }
10708
10448
  }, {
10709
10449
  key: "hidden",
10710
10450
  value: function hidden() {
10711
10451
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
10712
- return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
10452
+ return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, isHidden, this.description, this.previewInput);
10713
10453
  }
10714
10454
  }, {
10715
10455
  key: "executeCustomValidateAt",
@@ -10719,25 +10459,6 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10719
10459
  });
10720
10460
  }
10721
10461
 
10722
- /**
10723
- * How this field is laid out in the editor when it is the item of an array
10724
- * or record: `{ as: "inline" }` renders the field itself inside each row,
10725
- * instead of a preview row that navigates to it.
10726
- *
10727
- * Static configuration, not a callback — see `render.ts`.
10728
- *
10729
- * @example
10730
- * const schema = s.array(s.file().render({ as: "inline" }));
10731
- * export default c.define("/example.val.ts", schema, [
10732
- * { path: "/public/val/example.pdf", mimeType: "application/pdf" },
10733
- * ]);
10734
- */
10735
- }, {
10736
- key: "render",
10737
- value: function render(input) {
10738
- return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
10739
- }
10740
-
10741
10462
  /**
10742
10463
  * How this VALUE is shown where a preview of it is needed — a row in a
10743
10464
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -10754,7 +10475,7 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10754
10475
  }, {
10755
10476
  key: "preview",
10756
10477
  value: function preview(select) {
10757
- return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
10478
+ return new FileSchema(this.options, this.opt, this.isRemote, this.customValidateFunctions, this.moduleMetadata, this.isReadonly, this.isHidden, this.description, select);
10758
10479
  }
10759
10480
  }, {
10760
10481
  key: "executePreviewItem",
@@ -10774,11 +10495,10 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
10774
10495
  }, {
10775
10496
  key: "executeSerialize",
10776
10497
  value: function executeSerialize() {
10777
- var _this$renderInput, _this$customValidateF;
10498
+ var _this$customValidateF;
10778
10499
  var modulePaths = this.moduleMetadata ? Object.keys(this.moduleMetadata) : [];
10779
10500
  return {
10780
10501
  type: "file",
10781
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
10782
10502
  preview: this.previewInput ? true : undefined,
10783
10503
  options: this.options,
10784
10504
  opt: this.opt,
@@ -10864,8 +10584,7 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
10864
10584
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
10865
10585
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
10866
10586
  var description = arguments.length > 5 ? arguments[5] : undefined;
10867
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
10868
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
10587
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
10869
10588
  _classCallCheck(this, DateSchema);
10870
10589
  _this = _callSuper(this, DateSchema);
10871
10590
  _this.options = options;
@@ -10874,7 +10593,6 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
10874
10593
  _this.isReadonly = isReadonly;
10875
10594
  _this.isHidden = isHidden;
10876
10595
  _this.description = description;
10877
- _this.renderInput = renderInput;
10878
10596
  _this.previewInput = previewInput;
10879
10597
  return _this;
10880
10598
  }
@@ -10900,7 +10618,7 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
10900
10618
  return _createClass(DateSchema, [{
10901
10619
  key: "describe",
10902
10620
  value: function describe(description) {
10903
- return new DateSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
10621
+ return new DateSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
10904
10622
  }
10905
10623
 
10906
10624
  /**
@@ -10926,7 +10644,7 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
10926
10644
  }, {
10927
10645
  key: "validate",
10928
10646
  value: function validate(validationFunction) {
10929
- return new DateSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10647
+ return new DateSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
10930
10648
  }
10931
10649
  }, {
10932
10650
  key: "executeValidate",
@@ -11049,7 +10767,7 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
11049
10767
  value: function from(_from) {
11050
10768
  return new DateSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
11051
10769
  from: _from
11052
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10770
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
11053
10771
  }
11054
10772
 
11055
10773
  /**
@@ -11066,24 +10784,24 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
11066
10784
  value: function to(_to) {
11067
10785
  return new DateSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
11068
10786
  to: _to
11069
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10787
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
11070
10788
  }
11071
10789
  }, {
11072
10790
  key: "nullable",
11073
10791
  value: function nullable() {
11074
- return new DateSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10792
+ return new DateSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
11075
10793
  }
11076
10794
  }, {
11077
10795
  key: "readonly",
11078
10796
  value: function readonly() {
11079
10797
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
11080
- return new DateSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10798
+ return new DateSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
11081
10799
  }
11082
10800
  }, {
11083
10801
  key: "hidden",
11084
10802
  value: function hidden() {
11085
10803
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
11086
- return new DateSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
10804
+ return new DateSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
11087
10805
  }
11088
10806
  }, {
11089
10807
  key: "executeCustomValidateAt",
@@ -11093,23 +10811,6 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
11093
10811
  });
11094
10812
  }
11095
10813
 
11096
- /**
11097
- * How this field is laid out in the editor when it is the item of an array
11098
- * or record: `{ as: "inline" }` renders the field itself inside each row,
11099
- * instead of a preview row that navigates to it.
11100
- *
11101
- * Static configuration, not a callback — see `render.ts`.
11102
- *
11103
- * @example
11104
- * const schema = s.array(s.date().render({ as: "inline" }));
11105
- * export default c.define("/example.val.ts", schema, ["2025-06-01"]);
11106
- */
11107
- }, {
11108
- key: "render",
11109
- value: function render(input) {
11110
- return new DateSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
11111
- }
11112
-
11113
10814
  /**
11114
10815
  * How this VALUE is shown where a preview of it is needed — a row in a
11115
10816
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -11124,7 +10825,7 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
11124
10825
  }, {
11125
10826
  key: "preview",
11126
10827
  value: function preview(select) {
11127
- return new DateSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
10828
+ return new DateSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
11128
10829
  }
11129
10830
  }, {
11130
10831
  key: "executePreviewItem",
@@ -11144,10 +10845,9 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
11144
10845
  }, {
11145
10846
  key: "executeSerialize",
11146
10847
  value: function executeSerialize() {
11147
- var _this$renderInput, _this$customValidateF;
10848
+ var _this$customValidateF;
11148
10849
  return {
11149
10850
  type: "date",
11150
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
11151
10851
  preview: this.previewInput ? true : undefined,
11152
10852
  opt: this.opt,
11153
10853
  options: this.options,
@@ -11192,8 +10892,7 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11192
10892
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
11193
10893
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
11194
10894
  var description = arguments.length > 5 ? arguments[5] : undefined;
11195
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
11196
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
10895
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
11197
10896
  _classCallCheck(this, DateTimeSchema);
11198
10897
  _this = _callSuper(this, DateTimeSchema);
11199
10898
  _this.options = options;
@@ -11202,7 +10901,6 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11202
10901
  _this.isReadonly = isReadonly;
11203
10902
  _this.isHidden = isHidden;
11204
10903
  _this.description = description;
11205
- _this.renderInput = renderInput;
11206
10904
  _this.previewInput = previewInput;
11207
10905
  return _this;
11208
10906
  }
@@ -11232,7 +10930,7 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11232
10930
  return _createClass(DateTimeSchema, [{
11233
10931
  key: "describe",
11234
10932
  value: function describe(description) {
11235
- return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
10933
+ return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
11236
10934
  }
11237
10935
 
11238
10936
  /**
@@ -11262,7 +10960,7 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11262
10960
  }, {
11263
10961
  key: "validate",
11264
10962
  value: function validate(validationFunction) {
11265
- return new DateTimeSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
10963
+ return new DateTimeSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
11266
10964
  }
11267
10965
  }, {
11268
10966
  key: "executeValidate",
@@ -11397,7 +11095,7 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11397
11095
  value: function from(_from) {
11398
11096
  return new DateTimeSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
11399
11097
  from: _from
11400
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
11098
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
11401
11099
  }
11402
11100
 
11403
11101
  /**
@@ -11421,24 +11119,24 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11421
11119
  value: function to(_to) {
11422
11120
  return new DateTimeSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
11423
11121
  to: _to
11424
- }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
11122
+ }), this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
11425
11123
  }
11426
11124
  }, {
11427
11125
  key: "nullable",
11428
11126
  value: function nullable() {
11429
- return new DateTimeSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
11127
+ return new DateTimeSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
11430
11128
  }
11431
11129
  }, {
11432
11130
  key: "readonly",
11433
11131
  value: function readonly() {
11434
11132
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
11435
- return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
11133
+ return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
11436
11134
  }
11437
11135
  }, {
11438
11136
  key: "hidden",
11439
11137
  value: function hidden() {
11440
11138
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
11441
- return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
11139
+ return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
11442
11140
  }
11443
11141
  }, {
11444
11142
  key: "executeCustomValidateAt",
@@ -11448,25 +11146,6 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11448
11146
  });
11449
11147
  }
11450
11148
 
11451
- /**
11452
- * How this field is laid out in the editor when it is the item of an array
11453
- * or record: `{ as: "inline" }` renders the field itself inside each row,
11454
- * instead of a preview row that navigates to it.
11455
- *
11456
- * Static configuration, not a callback — see `render.ts`.
11457
- *
11458
- * @example
11459
- * const schema = s.array(s.datetime().render({ as: "inline" }));
11460
- * export default c.define("/example.val.ts", schema, [
11461
- * "2025-06-01T09:00:00.000Z",
11462
- * ]);
11463
- */
11464
- }, {
11465
- key: "render",
11466
- value: function render(input) {
11467
- return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
11468
- }
11469
-
11470
11149
  /**
11471
11150
  * How this VALUE is shown where a preview of it is needed — a row in a
11472
11151
  * sortable list, a reference dropdown, a search hit. Never how the field
@@ -11483,7 +11162,7 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11483
11162
  }, {
11484
11163
  key: "preview",
11485
11164
  value: function preview(select) {
11486
- return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
11165
+ return new DateTimeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
11487
11166
  }
11488
11167
  }, {
11489
11168
  key: "executePreviewItem",
@@ -11503,10 +11182,9 @@ var DateTimeSchema = /*#__PURE__*/function (_Schema) {
11503
11182
  }, {
11504
11183
  key: "executeSerialize",
11505
11184
  value: function executeSerialize() {
11506
- var _this$renderInput, _this$customValidateF;
11185
+ var _this$customValidateF;
11507
11186
  return {
11508
11187
  type: "dateTime",
11509
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
11510
11188
  preview: this.previewInput ? true : undefined,
11511
11189
  opt: this.opt,
11512
11190
  options: this.options,
@@ -11544,8 +11222,7 @@ var CodeSchema = /*#__PURE__*/function (_Schema) {
11544
11222
  var isReadonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
11545
11223
  var isHidden = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
11546
11224
  var description = arguments.length > 5 ? arguments[5] : undefined;
11547
- var renderInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
11548
- var previewInput = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
11225
+ var previewInput = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
11549
11226
  _classCallCheck(this, CodeSchema);
11550
11227
  _this = _callSuper(this, CodeSchema);
11551
11228
  _this.options = options;
@@ -11554,7 +11231,6 @@ var CodeSchema = /*#__PURE__*/function (_Schema) {
11554
11231
  _this.isReadonly = isReadonly;
11555
11232
  _this.isHidden = isHidden;
11556
11233
  _this.description = description;
11557
- _this.renderInput = renderInput;
11558
11234
  _this.previewInput = previewInput;
11559
11235
  return _this;
11560
11236
  }
@@ -11586,7 +11262,7 @@ var CodeSchema = /*#__PURE__*/function (_Schema) {
11586
11262
  return _createClass(CodeSchema, [{
11587
11263
  key: "describe",
11588
11264
  value: function describe(description) {
11589
- return new CodeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.renderInput, this.previewInput);
11265
+ return new CodeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, description !== null && description !== void 0 ? description : undefined, this.previewInput);
11590
11266
  }
11591
11267
 
11592
11268
  /**
@@ -11617,7 +11293,7 @@ var CodeSchema = /*#__PURE__*/function (_Schema) {
11617
11293
  }, {
11618
11294
  key: "validate",
11619
11295
  value: function validate(validationFunction) {
11620
- return new CodeSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
11296
+ return new CodeSchema(this.options, this.opt, [].concat(_toConsumableArray(this.customValidateFunctions), [validationFunction]), this.isReadonly, this.isHidden, this.description, this.previewInput);
11621
11297
  }
11622
11298
  }, {
11623
11299
  key: "executeCustomValidateAt",
@@ -11672,40 +11348,19 @@ var CodeSchema = /*#__PURE__*/function (_Schema) {
11672
11348
  }, {
11673
11349
  key: "nullable",
11674
11350
  value: function nullable() {
11675
- return new CodeSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
11351
+ return new CodeSchema(this.options, true, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.previewInput);
11676
11352
  }
11677
11353
  }, {
11678
11354
  key: "readonly",
11679
11355
  value: function readonly() {
11680
11356
  var isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
11681
- return new CodeSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.renderInput, this.previewInput);
11357
+ return new CodeSchema(this.options, this.opt, this.customValidateFunctions, isReadonly, this.isHidden, this.description, this.previewInput);
11682
11358
  }
11683
11359
  }, {
11684
11360
  key: "hidden",
11685
11361
  value: function hidden() {
11686
11362
  var isHidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
11687
- return new CodeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.renderInput, this.previewInput);
11688
- }
11689
-
11690
- /**
11691
- * How this field is laid out in the editor when it is the item of an array
11692
- * or record: `{ as: "inline" }` renders the field itself inside each row,
11693
- * instead of a preview row that navigates to it.
11694
- *
11695
- * Static configuration, not a callback — see `render.ts`.
11696
- *
11697
- * @example
11698
- * const schema = s.array(
11699
- * s.code({ language: "css" }).render({ as: "inline" }),
11700
- * );
11701
- * export default c.define("/example.val.ts", schema, [
11702
- * ".hero { color: red; }",
11703
- * ]);
11704
- */
11705
- }, {
11706
- key: "render",
11707
- value: function render(input) {
11708
- return new CodeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, input, this.previewInput);
11363
+ return new CodeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, isHidden, this.description, this.previewInput);
11709
11364
  }
11710
11365
 
11711
11366
  /**
@@ -11726,7 +11381,7 @@ var CodeSchema = /*#__PURE__*/function (_Schema) {
11726
11381
  }, {
11727
11382
  key: "preview",
11728
11383
  value: function preview(select) {
11729
- return new CodeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, this.renderInput, select);
11384
+ return new CodeSchema(this.options, this.opt, this.customValidateFunctions, this.isReadonly, this.isHidden, this.description, select);
11730
11385
  }
11731
11386
  }, {
11732
11387
  key: "executePreviewItem",
@@ -11746,10 +11401,9 @@ var CodeSchema = /*#__PURE__*/function (_Schema) {
11746
11401
  }, {
11747
11402
  key: "executeSerialize",
11748
11403
  value: function executeSerialize() {
11749
- var _this$renderInput, _this$customValidateF;
11404
+ var _this$customValidateF;
11750
11405
  return {
11751
11406
  type: "code",
11752
- render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
11753
11407
  preview: this.previewInput ? true : undefined,
11754
11408
  options: this.options,
11755
11409
  opt: this.opt,
@@ -13359,6 +13013,63 @@ function createRemoteRef(remoteHost, _ref) {
13359
13013
  return "".concat(remoteHost, "/file/p/").concat(publicProjectId, "/b/").concat(bucket, "/v/").concat(coreVersion, "/h/").concat(validationHash, "/f/").concat(fileHash, "/p/").concat(filePath);
13360
13014
  }
13361
13015
 
13016
+ /**
13017
+ * How Val names a media file: a cleaned-up base name, the first five hex of the
13018
+ * content's SHA-256, and the extension — `hero-mountains_a1b2c.jpg`.
13019
+ *
13020
+ * Two producers need this and must agree: an upload (`createFilename`, which
13021
+ * has the bytes) and a rename (`createRenamedFilename`, which keeps the bytes
13022
+ * and only changes what is in front of the hash). If they disagreed, renaming a
13023
+ * file to the name it was uploaded with would give it a different name.
13024
+ */
13025
+
13026
+ /** The `_a1b2c` a Val filename ends in, before the extension. */
13027
+ var FILENAME_HASH_SUFFIX_LENGTH = 5;
13028
+
13029
+ /**
13030
+ * The part of a filename a person chose, made safe for a URL path.
13031
+ *
13032
+ * Lower case, with everything `encodeURIComponent` would escape dropped rather
13033
+ * than escaped — a path segment that needs decoding is a path segment that gets
13034
+ * decoded twice somewhere. Can return the empty string, for a name made only of
13035
+ * such characters; a caller that needs a name has to refuse that.
13036
+ */
13037
+ function sanitizeFilenameBase(base) {
13038
+ return encodeURIComponent(base).replace(/%[0-9A-Fa-f]{2}/g, "").toLowerCase();
13039
+ }
13040
+
13041
+ /**
13042
+ * `base` with a trailing `_<hashPrefix>` removed, so a name that already carries
13043
+ * the hash does not get it twice (`photo_a1b2c` + `a1b2c` → `photo_a1b2c`, not
13044
+ * `photo_a1b2c_a1b2c`).
13045
+ */
13046
+ function stripHashSuffix(base, hashPrefix) {
13047
+ var pos = base.lastIndexOf("_");
13048
+ if (pos !== -1 && base.slice(pos + 1) === hashPrefix) {
13049
+ return base.slice(0, pos);
13050
+ }
13051
+ return base;
13052
+ }
13053
+
13054
+ /**
13055
+ * The name a file gets when it is renamed to `newBase`.
13056
+ *
13057
+ * The hash and the extension are not the editor's to change: the hash keeps two
13058
+ * different files from ever sharing a name, and the extension is part of a
13059
+ * remote file's validation hash and of how its bytes are served. So they are
13060
+ * passed in, and only the base comes from the person.
13061
+ *
13062
+ * Returns `null` when nothing usable is left of `newBase` after cleaning it.
13063
+ */
13064
+ function createRenamedFilename(newBase, sha256, ext) {
13065
+ var hashPrefix = sha256.slice(0, FILENAME_HASH_SUFFIX_LENGTH);
13066
+ var cleaned = sanitizeFilenameBase(stripHashSuffix(newBase.trim(), hashPrefix));
13067
+ if (cleaned === "") {
13068
+ return null;
13069
+ }
13070
+ return ext === "" ? "".concat(cleaned, "_").concat(hashPrefix) : "".concat(cleaned, "_").concat(hashPrefix, ".").concat(ext);
13071
+ }
13072
+
13362
13073
  /**
13363
13074
  * The validation basis is used in remote refs to determine if the remote content needs to be re-validated.
13364
13075
  *
@@ -13600,29 +13311,26 @@ function deserializeSchema(serialized) {
13600
13311
  return schema;
13601
13312
  }
13602
13313
  function deserializeSchemaImpl(serialized) {
13603
- var _serialized$options, _serialized$options2, _serialized$render, _serialized$multiline, _serialized$render2, _serialized$render3, _serialized$render4, _serialized$render5, _serialized$render6, _serialized$render7, _serialized$render8, _serialized$accept, _serialized$dir, _serialized$remote, _serialized$jsonValue, _serialized$render0, _serialized$external, _serialized$render1, _serialized$render12, _serialized$render13, _serialized$render14, _serialized$render15, _serialized$render16, _serialized$render17, _serialized$readonly, _serialized$hidden, _serialized$render18;
13314
+ var _serialized$options, _serialized$options2, _serialized$multiline, _serialized$render, _serialized$accept, _serialized$dir, _serialized$remote, _serialized$jsonValue, _serialized$render2, _serialized$external, _serialized$render3, _serialized$readonly, _serialized$hidden;
13604
13315
  switch (serialized.type) {
13605
13316
  case "string":
13606
13317
  return new StringSchema(_objectSpread2(_objectSpread2({}, serialized.options), {}, {
13607
13318
  regexp: ((_serialized$options = serialized.options) === null || _serialized$options === void 0 ? void 0 : _serialized$options.regexp) && new RegExp(serialized.options.regexp.source, serialized.options.regexp.flags),
13608
13319
  regExpMessage: (_serialized$options2 = serialized.options) === null || _serialized$options2 === void 0 || (_serialized$options2 = _serialized$options2.regexp) === null || _serialized$options2 === void 0 ? void 0 : _serialized$options2.message
13609
- }), serialized.opt, serialized.raw, [], // A render is static data, so it survives serialization and must be
13610
- // carried back: it is the schema's own configuration now, not something
13611
- // recomputed from an instance.
13612
- (_serialized$render = serialized.render) !== null && _serialized$render !== void 0 ? _serialized$render : null, false, false, serialized.description, null, (_serialized$multiline = serialized.multiline) !== null && _serialized$multiline !== void 0 ? _serialized$multiline : false);
13320
+ }), serialized.opt, serialized.raw, [], false, false, serialized.description, null, (_serialized$multiline = serialized.multiline) !== null && _serialized$multiline !== void 0 ? _serialized$multiline : false);
13613
13321
  case "literal":
13614
- return new LiteralSchema(serialized.value, serialized.opt, [], false, false, serialized.description, (_serialized$render2 = serialized.render) !== null && _serialized$render2 !== void 0 ? _serialized$render2 : null);
13322
+ return new LiteralSchema(serialized.value, serialized.opt, [], false, false, serialized.description);
13615
13323
  case "boolean":
13616
- return new BooleanSchema(serialized.opt, [], false, false, serialized.description, (_serialized$render3 = serialized.render) !== null && _serialized$render3 !== void 0 ? _serialized$render3 : null);
13324
+ return new BooleanSchema(serialized.opt, [], false, false, serialized.description);
13617
13325
  case "number":
13618
- return new NumberSchema(serialized.options, serialized.opt, [], false, false, serialized.description, (_serialized$render4 = serialized.render) !== null && _serialized$render4 !== void 0 ? _serialized$render4 : null);
13326
+ return new NumberSchema(serialized.options, serialized.opt, [], false, false, serialized.description);
13619
13327
  case "object":
13620
13328
  return new ObjectSchema(Object.fromEntries(Object.entries(serialized.items).map(function (_ref) {
13621
13329
  var _ref2 = _slicedToArray(_ref, 2),
13622
13330
  key = _ref2[0],
13623
13331
  item = _ref2[1];
13624
13332
  return [key, deserializeSchema(item)];
13625
- })), serialized.opt, [], false, false, serialized.description, (_serialized$render5 = serialized.render) !== null && _serialized$render5 !== void 0 ? _serialized$render5 : null);
13333
+ })), serialized.opt, [], false, false, serialized.description);
13626
13334
  case "settings":
13627
13335
  return new SettingsSchema(Object.fromEntries(Object.entries(serialized.items).map(function (_ref3) {
13628
13336
  var _ref4 = _slicedToArray(_ref3, 2),
@@ -13638,23 +13346,23 @@ function deserializeSchemaImpl(serialized) {
13638
13346
  case "array":
13639
13347
  return new ArraySchema(deserializeSchema(serialized.item), serialized.opt, [], false, false, serialized.description,
13640
13348
  // The preview closure cannot survive serialization; the render can.
13641
- null, (_serialized$render6 = serialized.render) !== null && _serialized$render6 !== void 0 ? _serialized$render6 : null);
13349
+ null, (_serialized$render = serialized.render) !== null && _serialized$render !== void 0 ? _serialized$render : null);
13642
13350
  case "discriminated-union":
13643
13351
  return new DiscriminatedUnionSchema(serialized.key,
13644
13352
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13645
13353
  serialized.items.map(deserializeSchema),
13646
13354
  // TODO: we do not really need any here - right?
13647
- serialized.opt, [], false, false, serialized.description, (_serialized$render7 = serialized.render) !== null && _serialized$render7 !== void 0 ? _serialized$render7 : null);
13355
+ serialized.opt, [], false, false, serialized.description);
13648
13356
  case "enum":
13649
- return new EnumSchema(serialized.values, serialized.opt, [], false, false, serialized.description, (_serialized$render8 = serialized.render) !== null && _serialized$render8 !== void 0 ? _serialized$render8 : null);
13357
+ return new EnumSchema(serialized.values, serialized.opt, [], false, false, serialized.description);
13650
13358
  case "richtext":
13651
13359
  {
13652
- var _serialized$options3, _serialized$options4, _serialized$options5, _serialized$options6, _serialized$render9;
13360
+ var _serialized$options3, _serialized$options4, _serialized$options5, _serialized$options6;
13653
13361
  var deserializedOptions = _objectSpread2(_objectSpread2({}, serialized.options || {}), {}, {
13654
13362
  a: _typeof((_serialized$options3 = serialized.options) === null || _serialized$options3 === void 0 ? void 0 : _serialized$options3.a) === "object" ? deserializeSchema(serialized.options.a) : (_serialized$options4 = serialized.options) === null || _serialized$options4 === void 0 ? void 0 : _serialized$options4.a,
13655
13363
  img: _typeof((_serialized$options5 = serialized.options) === null || _serialized$options5 === void 0 ? void 0 : _serialized$options5.img) === "object" ? deserializeSchema(serialized.options.img) : (_serialized$options6 = serialized.options) === null || _serialized$options6 === void 0 ? void 0 : _serialized$options6.img
13656
13364
  });
13657
- return new RichTextSchema(deserializedOptions, serialized.opt, [], false, false, serialized.description, (_serialized$render9 = serialized.render) !== null && _serialized$render9 !== void 0 ? _serialized$render9 : null);
13365
+ return new RichTextSchema(deserializedOptions, serialized.opt, [], false, false, serialized.description);
13658
13366
  }
13659
13367
  case "record":
13660
13368
  return new RecordSchema(deserializeSchema(serialized.item), serialized.opt, [], null, serialized.key ? deserializeSchema(serialized.key) : null, serialized.mediaType ? {
@@ -13665,43 +13373,41 @@ function deserializeSchemaImpl(serialized) {
13665
13373
  altSchema: serialized.alt ? deserializeSchema(serialized.alt) : undefined
13666
13374
  } : undefined, false, false, serialized.description, (_serialized$jsonValue = serialized.jsonValues) !== null && _serialized$jsonValue !== void 0 ? _serialized$jsonValue : false,
13667
13375
  // The preview closure cannot survive serialization; the render can.
13668
- null, (_serialized$render0 = serialized.render) !== null && _serialized$render0 !== void 0 ? _serialized$render0 : null, // The external label is static data, so it survives serialization and
13376
+ null, (_serialized$render2 = serialized.render) !== null && _serialized$render2 !== void 0 ? _serialized$render2 : null, // The external label is static data, so it survives serialization and
13669
13377
  // must be carried back: a deserialized schema that forgot it would walk
13670
13378
  // an external record as if its entries were local.
13671
13379
  (_serialized$external = serialized.external) !== null && _serialized$external !== void 0 ? _serialized$external : null);
13672
13380
  case "keyOf":
13673
- return new KeyOfSchema(serialized.schema, serialized.path, serialized.opt, [], false, false, serialized.description, (_serialized$render1 = serialized.render) !== null && _serialized$render1 !== void 0 ? _serialized$render1 : null);
13381
+ return new KeyOfSchema(serialized.schema, serialized.path, serialized.opt, [], false, false, serialized.description, (_serialized$render3 = serialized.render) !== null && _serialized$render3 !== void 0 ? _serialized$render3 : null);
13674
13382
  case "locale":
13675
13383
  {
13676
- var _serialized$render10;
13677
- return new LocaleSchema(serialized.opt, [], false, false, serialized.description, (_serialized$render10 = serialized.render) !== null && _serialized$render10 !== void 0 ? _serialized$render10 : null);
13384
+ return new LocaleSchema(serialized.opt, [], false, false, serialized.description);
13678
13385
  }
13679
13386
  case "route":
13680
13387
  {
13681
- var _serialized$render11;
13682
13388
  var routeOptions = serialized.options ? {
13683
13389
  include: serialized.options.include ? new RegExp(serialized.options.include.source, serialized.options.include.flags) : undefined,
13684
13390
  exclude: serialized.options.exclude ? new RegExp(serialized.options.exclude.source, serialized.options.exclude.flags) : undefined
13685
13391
  } : undefined;
13686
- return new RouteSchema(routeOptions, serialized.opt, [], false, false, serialized.description, (_serialized$render11 = serialized.render) !== null && _serialized$render11 !== void 0 ? _serialized$render11 : null);
13392
+ return new RouteSchema(routeOptions, serialized.opt, [], false, false, serialized.description);
13687
13393
  }
13688
13394
  case "file":
13689
- return new FileSchema(serialized.options, serialized.opt, serialized.remote, [], {}, false, false, serialized.description, (_serialized$render12 = serialized.render) !== null && _serialized$render12 !== void 0 ? _serialized$render12 : null);
13395
+ return new FileSchema(serialized.options, serialized.opt, serialized.remote, [], {}, false, false, serialized.description);
13690
13396
  case "image":
13691
- return new ImageSchema(serialized.options, serialized.opt, serialized.remote, [], {}, false, false, serialized.description, (_serialized$render13 = serialized.render) !== null && _serialized$render13 !== void 0 ? _serialized$render13 : null);
13397
+ return new ImageSchema(serialized.options, serialized.opt, serialized.remote, [], {}, false, false, serialized.description);
13692
13398
  case "date":
13693
- return new DateSchema(serialized.options, serialized.opt, [], false, false, serialized.description, (_serialized$render14 = serialized.render) !== null && _serialized$render14 !== void 0 ? _serialized$render14 : null);
13399
+ return new DateSchema(serialized.options, serialized.opt, [], false, false, serialized.description);
13694
13400
  case "dateTime":
13695
- return new DateTimeSchema(serialized.options, serialized.opt, [], false, false, serialized.description, (_serialized$render15 = serialized.render) !== null && _serialized$render15 !== void 0 ? _serialized$render15 : null);
13401
+ return new DateTimeSchema(serialized.options, serialized.opt, [], false, false, serialized.description);
13696
13402
  case "color":
13697
- return new ColorSchema(serialized.options, serialized.opt, [], false, false, serialized.description, (_serialized$render16 = serialized.render) !== null && _serialized$render16 !== void 0 ? _serialized$render16 : null);
13403
+ return new ColorSchema(serialized.options, serialized.opt, [], false, false, serialized.description);
13698
13404
  case "code":
13699
- return new CodeSchema(serialized.options, serialized.opt, [], false, false, serialized.description, (_serialized$render17 = serialized.render) !== null && _serialized$render17 !== void 0 ? _serialized$render17 : null);
13405
+ return new CodeSchema(serialized.options, serialized.opt, [], false, false, serialized.description);
13700
13406
  case "view":
13701
13407
  return new ValViewSchema(serialized.moduleFilePath,
13702
13408
  // No module: this schema came off the wire. The Studio navigates to a
13703
13409
  // view rather than resolving one, so nothing here needs it.
13704
- undefined, (_serialized$readonly = serialized.readonly) !== null && _serialized$readonly !== void 0 ? _serialized$readonly : false, (_serialized$hidden = serialized.hidden) !== null && _serialized$hidden !== void 0 ? _serialized$hidden : false, serialized.description, (_serialized$render18 = serialized.render) !== null && _serialized$render18 !== void 0 ? _serialized$render18 : null);
13410
+ undefined, (_serialized$readonly = serialized.readonly) !== null && _serialized$readonly !== void 0 ? _serialized$readonly : false, (_serialized$hidden = serialized.hidden) !== null && _serialized$hidden !== void 0 ? _serialized$hidden : false, serialized.description);
13705
13411
  default:
13706
13412
  {
13707
13413
  var exhaustiveCheck = serialized;
@@ -13742,9 +13448,19 @@ function deserializeSchemaImpl(serialized) {
13742
13448
  * description still previews as `#3` until someone writes the preview.
13743
13449
  */
13744
13450
  /**
13745
- * A RENDER is how the FIELD ITSELF is laid out in the editor, and it applies
13746
- * only when you are looking at the field: `.render({ as: "inline" })` on an
13747
- * array/record item.
13451
+ * A RENDER is how a field is laid out in the editor, and it applies only when
13452
+ * you are looking at the field. It is declared by a CONTAINER about its
13453
+ * children, never by a child about itself: `s.array(item).render({ as: "inline" })`
13454
+ * and `s.record(item).render({ as: "inline" })`. The one other schema that takes
13455
+ * a render is `s.keyOf(...)`, where it means something of its own (see
13456
+ * `KeyOfSchema.render`).
13457
+ *
13458
+ * Why the container: inline is a property of the LIST — "my items are edited in
13459
+ * their rows" — and the item schema is the wrong place to say it. An item can be
13460
+ * reused in a list that wants preview rows and one that wants forms; a tagged
13461
+ * union had to be declared inline on every variant (or on any one of them,
13462
+ * which was worse); and a schema that was not an item carried a setting that
13463
+ * did nothing. Putting it on the container makes all three go away.
13748
13464
  *
13749
13465
  * It is deliberately the ONE thing a render can say. What a string looks like
13750
13466
  * when it holds more than a line is the schema's own business — `.multiline()`
@@ -13761,7 +13477,7 @@ function deserializeSchemaImpl(serialized) {
13761
13477
  *
13762
13478
  * A render is static configuration - plain data, with no closure behind it and
13763
13479
  * no dependency on source - which is why it lives in the SERIALIZED schema
13764
- * (`SerializedStringSchema.render`) and is read straight off it where the field
13480
+ * (`SerializedArraySchema.render`) and is read straight off it where the field
13765
13481
  * is drawn. There is no render pipeline, no store and no host round-trip.
13766
13482
  *
13767
13483
  * That "static" is an ASSUMPTION we are taking deliberately, for simplicity,
@@ -13772,61 +13488,48 @@ function deserializeSchemaImpl(serialized) {
13772
13488
  * conflating them is what this file was split up to undo.
13773
13489
  */
13774
13490
  /**
13775
- * `{ as: "inline" }` on a field that is the ITEM of an array or record: the
13776
- * container renders the field itself inside each (sortable) row, instead of a
13777
- * clickable preview row that navigates to it. This is what a page-builder list
13778
- * is made of: `s.array(s.object({...}).render({ as: "inline" }))`.
13491
+ * `{ as: "inline" }` on an array or record: the container renders each of its
13492
+ * DIRECT items' own editor inside its (sortable) row, instead of a clickable
13493
+ * preview row that navigates to it. This is what a page-builder list is made
13494
+ * of: `s.array(s.discriminatedUnion("type", hero, text)).render({ as: "inline" })`.
13779
13495
  *
13780
- * On a field that is not directly under an array or record it is inert — an
13781
- * object's fields are already laid out in place.
13496
+ * It reaches one level down and no further: in
13497
+ * `s.array(s.object({ tags: s.array(s.string()) })).render({ as: "inline" })`
13498
+ * the objects are inline and `tags` keeps its own default.
13782
13499
  *
13783
- * Like every render it is static configuration (see the top of this file): it
13784
- * travels whole in the serialized schema and the editor reads it straight off
13785
- * the item schema it already has.
13500
+ * Not available on `s.router(...)`, `s.imageset(...)` or `s.fileset(...)`:
13501
+ * pages and media have UIs of their own, and `RecordSchema.render` throws there.
13502
+ *
13503
+ * On `s.keyOf(...)` the same value means something else: the selected entry's
13504
+ * content is shown below the selector. That is the keyOf field's own layout,
13505
+ * and is not read by any list.
13786
13506
  */
13787
13507
 
13788
13508
  /**
13789
- * What `.render(...)` takes on every field, and what the serialized schema
13790
- * carries verbatim.
13509
+ * What `.render(...)` takes, and what the serialized schema carries verbatim.
13791
13510
  */
13792
13511
 
13793
13512
  /**
13794
- * Is this item schema edited INSIDE its list row, rather than behind a
13795
- * clickable preview row that navigates to it?
13513
+ * Does this CONTAINER edit its items inside their list rows, rather than behind
13514
+ * clickable preview rows that navigate to them?
13515
+ *
13516
+ * Pass the array or record — never the item. Anything else answers `false`,
13517
+ * `s.keyOf` included: its render is about the keyOf field, not about a list.
13796
13518
  *
13797
13519
  * The one answer, so that the list rows, the nav-stop rule (`getNavPath`) and
13798
13520
  * the add buttons cannot drift apart — they are three readings of the same
13799
13521
  * question, and a disagreement between them is a row you can edit in place but
13800
13522
  * that "add" navigates away from.
13801
13523
  *
13802
- * A discriminated union counts as inline when the union itself declares it OR
13803
- * when ANY of its variants does. A page-builder list is
13804
- * `s.array(s.discriminatedUnion("type", block, block, ...))` and the natural
13805
- * place to write the render is on the blocks, one per block type — the union
13806
- * is a dispatch, not something the
13807
- * author thinks of as the field. `some` rather than `every` because the row
13808
- * draws the union's own editor (the tag selector plus the matched variant's
13809
- * fields), which handles every variant either way: with `every`, adding one
13810
- * variant and forgetting its `.render` would silently turn the whole list back
13811
- * into preview rows.
13812
- *
13813
- * This is the ONLY place a render is allowed to be read from anywhere but the
13814
- * schema it was declared on. It stays static (see the top of this file): the
13815
- * answer is a function of the serialized schema alone, never of the value the
13816
- * row happens to hold.
13817
- */
13818
- function isInlineRender(schema) {
13819
- var _schema$render;
13820
- if (((_schema$render = schema.render) === null || _schema$render === void 0 ? void 0 : _schema$render.as) === "inline") {
13821
- return true;
13822
- }
13823
- if (schema.type === "discriminated-union") {
13824
- return schema.items.some(function (item) {
13825
- var _item$render;
13826
- return ((_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.as) === "inline";
13827
- });
13524
+ * It stays static (see the top of this file): the answer is a function of the
13525
+ * serialized schema alone, never of the value the row happens to hold.
13526
+ */
13527
+ function isInlineRender(container) {
13528
+ var _container$render;
13529
+ if (container.type !== "array" && container.type !== "record") {
13530
+ return false;
13828
13531
  }
13829
- return false;
13532
+ return ((_container$render = container.render) === null || _container$render === void 0 ? void 0 : _container$render.as) === "inline";
13830
13533
  }
13831
13534
 
13832
13535
  /**
@@ -14387,7 +14090,7 @@ function isPageRouter(routerId) {
14387
14090
 
14388
14091
  var corePackageJson = {
14389
14092
  name: "@valbuild/core",
14390
- version: "0.138.0",
14093
+ version: "0.139.0",
14391
14094
  "private": false,
14392
14095
  description: "Val - supercharged hard-coded content",
14393
14096
  repository: {
@@ -14574,21 +14277,17 @@ var Internal = {
14574
14277
  if (!data) {
14575
14278
  return filename;
14576
14279
  }
14577
- var shaSuffix = sha256.slice(0, 5);
14280
+ var shaSuffix = sha256.slice(0, FILENAME_HASH_SUFFIX_LENGTH);
14578
14281
  var mimeType = (_Internal$getMimeType = Internal.getMimeType(data)) !== null && _Internal$getMimeType !== void 0 ? _Internal$getMimeType : "unknown";
14579
14282
  var newExt = (_Internal$mimeTypeToF = Internal.mimeTypeToFileExt(mimeType)) !== null && _Internal$mimeTypeToF !== void 0 ? _Internal$mimeTypeToF : "unknown"; // Don't trust the file extension
14580
14283
  if (filename) {
14581
14284
  var cleanFilename = filename.split(".").slice(0, -1).join(".") || filename; // remove extension if it exists
14582
- var maybeShaSuffixPos = cleanFilename.lastIndexOf("_");
14583
- var currentShaSuffix = cleanFilename.slice(maybeShaSuffixPos + 1, cleanFilename.length);
14584
- if (currentShaSuffix === shaSuffix) {
14585
- cleanFilename = cleanFilename.slice(0, maybeShaSuffixPos);
14586
- }
14587
- var escapedFilename = encodeURIComponent(cleanFilename).replace(/%[0-9A-Fa-f]{2}/g, "").toLowerCase();
14285
+ var escapedFilename = sanitizeFilenameBase(stripHashSuffix(cleanFilename, shaSuffix));
14588
14286
  return "".concat(escapedFilename, "_").concat(shaSuffix, ".").concat(newExt);
14589
14287
  }
14590
14288
  return "".concat(sha256, ".").concat(newExt);
14591
- }
14289
+ },
14290
+ createRenamedFilename: createRenamedFilename
14592
14291
  };
14593
14292
  function tryJsonParse(str) {
14594
14293
  try {