@valbuild/core 0.136.8 → 0.138.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.
@@ -5632,6 +5632,21 @@ function missingDeclaredKeys(declared, present) {
5632
5632
  });
5633
5633
  }
5634
5634
 
5635
+ /**
5636
+ * A router's scheme restriction, as a spreadable fragment.
5637
+ *
5638
+ * Spread rather than assigned so an unrestricted router adds no key at all:
5639
+ * `routerSchemes: undefined` would serialize as an explicit `undefined` and
5640
+ * show up in every schema diff for no reason.
5641
+ */
5642
+ function routerSchemes(router) {
5643
+ var _router$getUrlSchemeP;
5644
+ var schemes = router === null || router === void 0 || (_router$getUrlSchemeP = router.getUrlSchemePolicy) === null || _router$getUrlSchemeP === void 0 ? void 0 : _router$getUrlSchemeP.call(router).schemes;
5645
+ return schemes === undefined ? {} : {
5646
+ routerSchemes: _toConsumableArray(schemes)
5647
+ };
5648
+ }
5649
+
5635
5650
  /**
5636
5651
  * The source type of a `.jsonValues()` record: every entry value is EITHER a
5637
5652
  * lazily loaded {@link JsonSource} whose resolved content is the (loosened, see
@@ -6448,21 +6463,22 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
6448
6463
  key: "executeSerialize",
6449
6464
  value: function executeSerialize() {
6450
6465
  var _this$renderInput, _this$keySchema, _this$currentRouter, _this$customValidateF, _this$externalLabel;
6451
- var result = {
6466
+ var result = _objectSpread2(_objectSpread2({
6452
6467
  type: "record",
6453
6468
  render: (_this$renderInput = this.renderInput) !== null && _this$renderInput !== void 0 ? _this$renderInput : undefined,
6454
6469
  item: this.item["executeSerialize"](),
6455
6470
  key: (_this$keySchema = this.keySchema) === null || _this$keySchema === void 0 ? void 0 : _this$keySchema["executeSerialize"](),
6456
6471
  opt: this.opt,
6457
6472
  preview: this.previewInput ? true : undefined,
6458
- router: (_this$currentRouter = this.currentRouter) === null || _this$currentRouter === void 0 ? void 0 : _this$currentRouter.getRouterId(),
6473
+ router: (_this$currentRouter = this.currentRouter) === null || _this$currentRouter === void 0 ? void 0 : _this$currentRouter.getRouterId()
6474
+ }, routerSchemes(this.currentRouter)), {}, {
6459
6475
  customValidate: this.customValidateFunctions && ((_this$customValidateF = this.customValidateFunctions) === null || _this$customValidateF === void 0 ? void 0 : _this$customValidateF.length) > 0,
6460
6476
  jsonValues: this.isJsonValues ? true : undefined,
6461
6477
  external: (_this$externalLabel = this.externalLabel) !== null && _this$externalLabel !== void 0 ? _this$externalLabel : undefined,
6462
6478
  readonly: this.isReadonly,
6463
6479
  hidden: this.isHidden,
6464
6480
  description: this.description
6465
- };
6481
+ });
6466
6482
  if (this.mediaOptions) {
6467
6483
  result.mediaType = this.mediaOptions.type;
6468
6484
  result.accept = this.mediaOptions.accept;
@@ -8742,7 +8758,8 @@ function settings() {
8742
8758
  }).nullable().describe("The project's own mark, shown where Val's is in the Studio. A square-ish mark rather than a wordmark: the slot is 32px wide.")
8743
8759
  }),
8744
8760
  studio: new SettingsSchema({
8745
- tour: _boolean().nullable().describe("Whether editors are offered the guided tour of the Studio. Unset means yes. Off hides the offer for everyone on this project — the tour stays in Quick actions for anyone who wants it.")
8761
+ tour: _boolean().nullable().describe("Whether editors are offered the guided tour of the Studio. Unset means yes. Off hides the offer for everyone on this project — the tour stays in Quick actions for anyone who wants it."),
8762
+ commitMessage: enumSchema("automatic", "required").nullable().describe("Whether publishing asks for a commit message. Unset is the same as 'automatic': Publish publishes straight away, with a message the AI writes (or one listing what changed). 'required' asks every time, and will not publish an empty one.")
8746
8763
  }),
8747
8764
  locales: new SettingsSchema({
8748
8765
  // Nullable because the source type is, and because the Studio writes
@@ -10914,7 +10931,7 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
10914
10931
  }, {
10915
10932
  key: "executeValidate",
10916
10933
  value: function executeValidate(path, src) {
10917
- var _this$options, _this$options2, _this$options3, _this$options4;
10934
+ var _this$options, _this$options2, _this$options3, _this$options4, _this$options5, _this$options6;
10918
10935
  var errors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
10919
10936
  path: path
10920
10937
  });
@@ -10928,7 +10945,31 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
10928
10945
  });
10929
10946
  return _defineProperty({}, path, errors);
10930
10947
  }
10931
- if ((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.from && (_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.to) {
10948
+ // The bounds below are compared as strings, which only orders days when
10949
+ // every side is a real `YYYY-MM-DD`: "19f81-12-30" sorts between
10950
+ // "1900-01-01" and "2024-01-01" and would pass them.
10951
+ if (!isCalendarDay(src)) {
10952
+ errors.push({
10953
+ message: "Value '".concat(src, "' is not a valid date (expected YYYY-MM-DD)"),
10954
+ value: src
10955
+ });
10956
+ return _defineProperty({}, path, errors);
10957
+ }
10958
+ var bounds = [["From", (_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.from], ["To", (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.to]];
10959
+ for (var _i = 0, _bounds = bounds; _i < _bounds.length; _i++) {
10960
+ var _bounds$_i = _slicedToArray(_bounds[_i], 2),
10961
+ name = _bounds$_i[0],
10962
+ bound = _bounds$_i[1];
10963
+ if (bound !== undefined && !isCalendarDay(bound)) {
10964
+ errors.push({
10965
+ message: "".concat(name, " date '").concat(bound, "' is not a valid date (expected YYYY-MM-DD)"),
10966
+ value: src,
10967
+ typeError: true
10968
+ });
10969
+ return _defineProperty({}, path, errors);
10970
+ }
10971
+ }
10972
+ if ((_this$options3 = this.options) !== null && _this$options3 !== void 0 && _this$options3.from && (_this$options4 = this.options) !== null && _this$options4 !== void 0 && _this$options4.to) {
10932
10973
  if (this.options.from > this.options.to) {
10933
10974
  errors.push({
10934
10975
  message: "From date ".concat(this.options.from, " is after to date ").concat(this.options.to),
@@ -10941,14 +10982,14 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
10941
10982
  value: src
10942
10983
  });
10943
10984
  }
10944
- } else if ((_this$options3 = this.options) !== null && _this$options3 !== void 0 && _this$options3.from) {
10985
+ } else if ((_this$options5 = this.options) !== null && _this$options5 !== void 0 && _this$options5.from) {
10945
10986
  if (src < this.options.from) {
10946
10987
  errors.push({
10947
10988
  message: "Date is before the minimum date ".concat(this.options.from),
10948
10989
  value: src
10949
10990
  });
10950
10991
  }
10951
- } else if ((_this$options4 = this.options) !== null && _this$options4 !== void 0 && _this$options4.to) {
10992
+ } else if ((_this$options6 = this.options) !== null && _this$options6 !== void 0 && _this$options6.to) {
10952
10993
  if (src > this.options.to) {
10953
10994
  errors.push({
10954
10995
  message: "Date is after the maximum date ".concat(this.options.to),
@@ -11118,6 +11159,27 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
11118
11159
  }
11119
11160
  }]);
11120
11161
  }(Schema);
11162
+ var CALENDAR_DAY = /^(\d{4})-(\d{2})-(\d{2})$/;
11163
+
11164
+ /**
11165
+ * Whether `value` is a `YYYY-MM-DD` day that exists on the calendar — so
11166
+ * "2023-02-29" and "2024-13-01" are not, even though they have the shape.
11167
+ */
11168
+ function isCalendarDay(value) {
11169
+ var match = CALENDAR_DAY.exec(value);
11170
+ if (!match) {
11171
+ return false;
11172
+ }
11173
+ var year = Number(match[1]);
11174
+ var month = Number(match[2]);
11175
+ var day = Number(match[3]);
11176
+ // Out-of-range fields roll over (Feb 30 -> Mar 2) instead of failing, so a
11177
+ // day is real only if it survives the round trip. setUTCFullYear, not
11178
+ // Date.UTC: the latter maps years 0-99 to 1900-1999.
11179
+ var date = new Date(0);
11180
+ date.setUTCFullYear(year, month - 1, day);
11181
+ return date.getUTCFullYear() === year && date.getUTCMonth() === month - 1 && date.getUTCDate() === day;
11182
+ }
11121
11183
  var date = function date(options) {
11122
11184
  return new DateSchema(options);
11123
11185
  };
@@ -13767,35 +13829,165 @@ function isInlineRender(schema) {
13767
13829
  return false;
13768
13830
  }
13769
13831
 
13770
- var externalPageRouter = {
13771
- getRouterId: function getRouterId() {
13772
- return "external-url-router";
13773
- },
13774
- validate: function validate(_moduleFilePath, urlPaths) {
13775
- var errors = [];
13776
- var _iterator = result._createForOfIteratorHelper(urlPaths),
13777
- _step;
13778
- try {
13779
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
13780
- var urlPath = _step.value;
13781
- if (!(urlPath.startsWith("https://") || urlPath.startsWith("http://"))) {
13782
- errors.push({
13783
- error: {
13784
- message: "URL path \"".concat(urlPath, "\" does not start with \"https://\" or \"http://\""),
13785
- expectedPath: null,
13786
- urlPath: urlPath
13787
- }
13788
- });
13832
+ /**
13833
+ * Which URL schemes an external page key may use.
13834
+ *
13835
+ * External pages are the URLs a site links OUT to, and a link is not only a web
13836
+ * page: `mailto:` on a contact page and `tel:` on a phone number are the same
13837
+ * kind of thing to whoever maintains the list, and were refused outright.
13838
+ *
13839
+ * So the default is a deny list rather than an allow list — anything with a
13840
+ * scheme, except the handful that are not links at all. Listing every scheme
13841
+ * worth linking to is a list that is wrong the moment someone wants
13842
+ * `whatsapp:` or `msteams:`, and being wrong that way means an editor cannot
13843
+ * store a URL their site genuinely uses.
13844
+ *
13845
+ * A project that wants to be stricter says so:
13846
+ *
13847
+ * ```ts
13848
+ * s.router(externalPageRouter({ schemes: ["https", "mailto"] }), item)
13849
+ * ```
13850
+ */
13851
+
13852
+ /**
13853
+ * The schemes that are refused however wide the policy is.
13854
+ *
13855
+ * Not a style preference. An external page key ends up in an `href` in the
13856
+ * consuming site's own markup, so `javascript:` there is stored XSS on that
13857
+ * site, and `data:` is the same trick wearing a document. `vbscript:` is the
13858
+ * historical spelling of the first. `file:` and `blob:` address the visitor's
13859
+ * own machine rather than anywhere on the internet.
13860
+ *
13861
+ * These stay refused even when a project lists them in `schemes`: a config
13862
+ * option is not a good enough reason to let content inject script into the
13863
+ * page that renders it.
13864
+ */
13865
+ var UNSAFE_URL_SCHEMES = ["javascript", "data", "vbscript", "file", "blob"];
13866
+ /** The scheme of a URL, lowercased and without the colon, or null. */
13867
+ function schemeOf(url) {
13868
+ var match = /^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(url.trim());
13869
+ return match === null ? null : match[1].toLowerCase();
13870
+ }
13871
+ /** `null` when the URL's scheme is acceptable under `policy`. */
13872
+ function rejectScheme(url) {
13873
+ var policy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13874
+ var scheme = schemeOf(url);
13875
+ if (scheme === null) {
13876
+ return {
13877
+ reason: "no-scheme"
13878
+ };
13879
+ }
13880
+ if (UNSAFE_URL_SCHEMES.includes(scheme)) {
13881
+ return {
13882
+ reason: "unsafe",
13883
+ scheme: scheme
13884
+ };
13885
+ }
13886
+ if (policy.schemes !== undefined) {
13887
+ var allowed = policy.schemes.map(function (s) {
13888
+ return s.toLowerCase();
13889
+ });
13890
+ if (!allowed.includes(scheme)) {
13891
+ return {
13892
+ reason: "not-allowed",
13893
+ scheme: scheme,
13894
+ allowed: policy.schemes
13895
+ };
13896
+ }
13897
+ }
13898
+ return null;
13899
+ }
13900
+
13901
+ /** What to tell whoever wrote the key. */
13902
+ function describeSchemeRejection(rejection) {
13903
+ switch (rejection.reason) {
13904
+ case "no-scheme":
13905
+ return "Must start with a scheme, like https:// or mailto:.";
13906
+ case "unsafe":
13907
+ return "\"".concat(rejection.scheme, ":\" cannot be used in a link: it runs code or reads the visitor's own machine rather than pointing at somewhere on the internet.");
13908
+ case "not-allowed":
13909
+ return "\"".concat(rejection.scheme, ":\" is not one of the schemes this router allows (").concat(rejection.allowed.join(", "), ").");
13910
+ }
13911
+ }
13912
+
13913
+ /**
13914
+ * Whether a link check can open this URL.
13915
+ *
13916
+ * Separate from whether it is ALLOWED, and the two are not the same question:
13917
+ * `mailto:` is a perfectly good external page and there is no request to make
13918
+ * of it. A URL that cannot be opened is reported as not checked, never as
13919
+ * broken.
13920
+ */
13921
+ function isCheckableScheme(url) {
13922
+ var scheme = schemeOf(url);
13923
+ return scheme === "http" || scheme === "https";
13924
+ }
13925
+
13926
+ /**
13927
+ * The router whose keys are URLs to somewhere else.
13928
+ *
13929
+ * Used directly for the wide default, or called to narrow it:
13930
+ *
13931
+ * ```ts
13932
+ * s.router(externalPageRouter, item) // anything safe
13933
+ * s.router(externalPageRouter({ schemes: ["https"] }), item) // https only
13934
+ * ```
13935
+ *
13936
+ * Its one rule is that a key has a scheme, and that the scheme is not one of
13937
+ * the handful that are not links at all - see `externalUrlSchemes.ts`. That
13938
+ * rule was WRITTEN here from the start and never enforced: the errors were
13939
+ * collected into a list and then `return []` threw them away, so every key was
13940
+ * accepted however it was spelled.
13941
+ *
13942
+ * `expectedPath` is null because there is nothing to suggest: a key that is
13943
+ * not a URL could have been meant as any URL, and guessing `https://` in front
13944
+ * of it would propose a different site as often as the right one.
13945
+ */
13946
+ var externalPageRouter = Object.assign(function (policy) {
13947
+ return createExternalPageRouter(policy);
13948
+ }, createExternalPageRouter());
13949
+
13950
+ /**
13951
+ * Callable AND a router, so `externalPageRouter` keeps working unchanged
13952
+ * where nobody needs to configure it - which is almost everywhere.
13953
+ */
13954
+
13955
+ function createExternalPageRouter() {
13956
+ var policy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
13957
+ return {
13958
+ getRouterId: function getRouterId() {
13959
+ return "external-url-router";
13960
+ },
13961
+ getUrlSchemePolicy: function getUrlSchemePolicy() {
13962
+ return policy;
13963
+ },
13964
+ validate: function validate(_moduleFilePath, urlPaths) {
13965
+ var errors = [];
13966
+ var _iterator = result._createForOfIteratorHelper(urlPaths),
13967
+ _step;
13968
+ try {
13969
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
13970
+ var urlPath = _step.value;
13971
+ var rejection = rejectScheme(urlPath, policy);
13972
+ if (rejection !== null) {
13973
+ errors.push({
13974
+ error: {
13975
+ message: "URL \"".concat(urlPath, "\" cannot be used here. ").concat(describeSchemeRejection(rejection)),
13976
+ expectedPath: null,
13977
+ urlPath: urlPath
13978
+ }
13979
+ });
13980
+ }
13789
13981
  }
13982
+ } catch (err) {
13983
+ _iterator.e(err);
13984
+ } finally {
13985
+ _iterator.f();
13790
13986
  }
13791
- } catch (err) {
13792
- _iterator.e(err);
13793
- } finally {
13794
- _iterator.f();
13987
+ return errors;
13795
13988
  }
13796
- return [];
13797
- }
13798
- };
13989
+ };
13990
+ }
13799
13991
  // Helper function to validate a URL path against a route pattern
13800
13992
  function validateUrlAgainstPattern(urlPath, routePattern) {
13801
13993
  // Remove leading slash and split URL path
@@ -14195,7 +14387,7 @@ function isPageRouter(routerId) {
14195
14387
 
14196
14388
  var corePackageJson = {
14197
14389
  name: "@valbuild/core",
14198
- version: "0.136.8",
14390
+ version: "0.138.0",
14199
14391
  "private": false,
14200
14392
  description: "Val - supercharged hard-coded content",
14201
14393
  repository: {
@@ -14309,6 +14501,11 @@ var Internal = {
14309
14501
  nextAppRouter: nextAppRouter,
14310
14502
  tanstackRouter: tanstackRouter,
14311
14503
  externalPageRouter: externalPageRouter,
14504
+ describeSchemeRejection: describeSchemeRejection,
14505
+ isCheckableScheme: isCheckableScheme,
14506
+ rejectScheme: rejectScheme,
14507
+ schemeOf: schemeOf,
14508
+ UNSAFE_URL_SCHEMES: UNSAFE_URL_SCHEMES,
14312
14509
  color: {
14313
14510
  parseColor: parseColor,
14314
14511
  formatColor: formatColor,
@@ -14439,6 +14636,7 @@ exports.StringSchema = StringSchema;
14439
14636
  exports.THEME_LOGO_DIRECTORY = THEME_LOGO_DIRECTORY;
14440
14637
  exports.THEME_RADIUS_LENGTHS = THEME_RADIUS_LENGTHS;
14441
14638
  exports.THEME_RADIUS_STEPS = THEME_RADIUS_STEPS;
14639
+ exports.UNSAFE_URL_SCHEMES = UNSAFE_URL_SCHEMES;
14442
14640
  exports.VAL_EXTENSION = VAL_EXTENSION;
14443
14641
  exports.ValViewSchema = ValViewSchema;
14444
14642
  exports._classCallCheck = _classCallCheck;
@@ -14451,6 +14649,7 @@ exports.computeSourcesSha = computeSourcesSha;
14451
14649
  exports.computeValModuleShas = computeValModuleShas;
14452
14650
  exports.declaredKeySetOf = declaredKeySetOf;
14453
14651
  exports.derefPatch = derefPatch;
14652
+ exports.describeSchemeRejection = describeSchemeRejection;
14454
14653
  exports.deserializeSchema = deserializeSchema;
14455
14654
  exports.discriminatedUnionBranchOf = discriminatedUnionBranchOf;
14456
14655
  exports.extractValModules = extractValModules;
@@ -14458,6 +14657,7 @@ exports.getSourcePathFromRoute = getSourcePathFromRoute;
14458
14657
  exports.hasMediaSchema = hasMediaSchema;
14459
14658
  exports.hasRemoteFileSchema = hasRemoteFileSchema;
14460
14659
  exports.initVal = initVal;
14660
+ exports.isCheckableScheme = isCheckableScheme;
14461
14661
  exports.isInlineRender = isInlineRender;
14462
14662
  exports.isPageRouter = isPageRouter;
14463
14663
  exports.isRootModuleFilePath = isRootModuleFilePath;
@@ -14469,7 +14669,9 @@ exports.modules = modules;
14469
14669
  exports.parseNextJsRoutePattern = parseNextJsRoutePattern;
14470
14670
  exports.parseTanStackRoutePattern = parseTanStackRoutePattern;
14471
14671
  exports.previewScope = previewScope;
14672
+ exports.rejectScheme = rejectScheme;
14472
14673
  exports.resolveSettingsModule = resolveSettingsModule;
14674
+ exports.schemeOf = schemeOf;
14473
14675
  exports.splitModuleFilePathAndModulePath = splitModuleFilePathAndModulePath;
14474
14676
  exports.tanStackSegmentsOfRoutePath = tanStackSegmentsOfRoutePath;
14475
14677
  exports.validateUrlAgainstPattern = validateUrlAgainstPattern;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-afbcf0ca.cjs.dev.js');
5
+ var dist_valbuildCore = require('./index-d3c51a0d.cjs.dev.js');
6
6
  require('./result-bb1f436e.cjs.dev.js');
7
7
 
8
8
 
@@ -44,6 +44,7 @@ exports.StringSchema = dist_valbuildCore.StringSchema;
44
44
  exports.THEME_LOGO_DIRECTORY = dist_valbuildCore.THEME_LOGO_DIRECTORY;
45
45
  exports.THEME_RADIUS_LENGTHS = dist_valbuildCore.THEME_RADIUS_LENGTHS;
46
46
  exports.THEME_RADIUS_STEPS = dist_valbuildCore.THEME_RADIUS_STEPS;
47
+ exports.UNSAFE_URL_SCHEMES = dist_valbuildCore.UNSAFE_URL_SCHEMES;
47
48
  exports.VAL_EXTENSION = dist_valbuildCore.VAL_EXTENSION;
48
49
  exports.ValViewSchema = dist_valbuildCore.ValViewSchema;
49
50
  exports.assistantAvailability = dist_valbuildCore.assistantAvailability;
@@ -51,6 +52,7 @@ exports.computeSourcesSha = dist_valbuildCore.computeSourcesSha;
51
52
  exports.computeValModuleShas = dist_valbuildCore.computeValModuleShas;
52
53
  exports.declaredKeySetOf = dist_valbuildCore.declaredKeySetOf;
53
54
  exports.derefPatch = dist_valbuildCore.derefPatch;
55
+ exports.describeSchemeRejection = dist_valbuildCore.describeSchemeRejection;
54
56
  exports.deserializeSchema = dist_valbuildCore.deserializeSchema;
55
57
  exports.discriminatedUnionBranchOf = dist_valbuildCore.discriminatedUnionBranchOf;
56
58
  exports.extractValModules = dist_valbuildCore.extractValModules;
@@ -58,6 +60,7 @@ exports.getSourcePathFromRoute = dist_valbuildCore.getSourcePathFromRoute;
58
60
  exports.hasMediaSchema = dist_valbuildCore.hasMediaSchema;
59
61
  exports.hasRemoteFileSchema = dist_valbuildCore.hasRemoteFileSchema;
60
62
  exports.initVal = dist_valbuildCore.initVal;
63
+ exports.isCheckableScheme = dist_valbuildCore.isCheckableScheme;
61
64
  exports.isInlineRender = dist_valbuildCore.isInlineRender;
62
65
  exports.isPageRouter = dist_valbuildCore.isPageRouter;
63
66
  exports.isRootModuleFilePath = dist_valbuildCore.isRootModuleFilePath;
@@ -69,6 +72,8 @@ exports.modules = dist_valbuildCore.modules;
69
72
  exports.parseNextJsRoutePattern = dist_valbuildCore.parseNextJsRoutePattern;
70
73
  exports.parseTanStackRoutePattern = dist_valbuildCore.parseTanStackRoutePattern;
71
74
  exports.previewScope = dist_valbuildCore.previewScope;
75
+ exports.rejectScheme = dist_valbuildCore.rejectScheme;
72
76
  exports.resolveSettingsModule = dist_valbuildCore.resolveSettingsModule;
77
+ exports.schemeOf = dist_valbuildCore.schemeOf;
73
78
  exports.tanStackSegmentsOfRoutePath = dist_valbuildCore.tanStackSegmentsOfRoutePath;
74
79
  exports.validateUrlAgainstPattern = dist_valbuildCore.validateUrlAgainstPattern;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-2545d3b4.cjs.prod.js');
5
+ var dist_valbuildCore = require('./index-3296fc4f.cjs.prod.js');
6
6
  require('./result-787e35f6.cjs.prod.js');
7
7
 
8
8
 
@@ -44,6 +44,7 @@ exports.StringSchema = dist_valbuildCore.StringSchema;
44
44
  exports.THEME_LOGO_DIRECTORY = dist_valbuildCore.THEME_LOGO_DIRECTORY;
45
45
  exports.THEME_RADIUS_LENGTHS = dist_valbuildCore.THEME_RADIUS_LENGTHS;
46
46
  exports.THEME_RADIUS_STEPS = dist_valbuildCore.THEME_RADIUS_STEPS;
47
+ exports.UNSAFE_URL_SCHEMES = dist_valbuildCore.UNSAFE_URL_SCHEMES;
47
48
  exports.VAL_EXTENSION = dist_valbuildCore.VAL_EXTENSION;
48
49
  exports.ValViewSchema = dist_valbuildCore.ValViewSchema;
49
50
  exports.assistantAvailability = dist_valbuildCore.assistantAvailability;
@@ -51,6 +52,7 @@ exports.computeSourcesSha = dist_valbuildCore.computeSourcesSha;
51
52
  exports.computeValModuleShas = dist_valbuildCore.computeValModuleShas;
52
53
  exports.declaredKeySetOf = dist_valbuildCore.declaredKeySetOf;
53
54
  exports.derefPatch = dist_valbuildCore.derefPatch;
55
+ exports.describeSchemeRejection = dist_valbuildCore.describeSchemeRejection;
54
56
  exports.deserializeSchema = dist_valbuildCore.deserializeSchema;
55
57
  exports.discriminatedUnionBranchOf = dist_valbuildCore.discriminatedUnionBranchOf;
56
58
  exports.extractValModules = dist_valbuildCore.extractValModules;
@@ -58,6 +60,7 @@ exports.getSourcePathFromRoute = dist_valbuildCore.getSourcePathFromRoute;
58
60
  exports.hasMediaSchema = dist_valbuildCore.hasMediaSchema;
59
61
  exports.hasRemoteFileSchema = dist_valbuildCore.hasRemoteFileSchema;
60
62
  exports.initVal = dist_valbuildCore.initVal;
63
+ exports.isCheckableScheme = dist_valbuildCore.isCheckableScheme;
61
64
  exports.isInlineRender = dist_valbuildCore.isInlineRender;
62
65
  exports.isPageRouter = dist_valbuildCore.isPageRouter;
63
66
  exports.isRootModuleFilePath = dist_valbuildCore.isRootModuleFilePath;
@@ -69,6 +72,8 @@ exports.modules = dist_valbuildCore.modules;
69
72
  exports.parseNextJsRoutePattern = dist_valbuildCore.parseNextJsRoutePattern;
70
73
  exports.parseTanStackRoutePattern = dist_valbuildCore.parseTanStackRoutePattern;
71
74
  exports.previewScope = dist_valbuildCore.previewScope;
75
+ exports.rejectScheme = dist_valbuildCore.rejectScheme;
72
76
  exports.resolveSettingsModule = dist_valbuildCore.resolveSettingsModule;
77
+ exports.schemeOf = dist_valbuildCore.schemeOf;
73
78
  exports.tanStackSegmentsOfRoutePath = dist_valbuildCore.tanStackSegmentsOfRoutePath;
74
79
  exports.validateUrlAgainstPattern = dist_valbuildCore.validateUrlAgainstPattern;
@@ -1,2 +1,2 @@
1
- export { v as ASSISTANT_SETTINGS_MAX_LENGTH, A as ArraySchema, B as BooleanSchema, Y as CODE_LANGUAGES, Z as COLOR_FORMATS, X as CodeSchema, W as ColorSchema, e as DEFAULT_APP_HOST, $ as DEFAULT_COLOR_FORMAT, D as DEFAULT_CONTENT_HOST, f as DEFAULT_STATIC_HOST, n as DEFAULT_VAL_REMOTE_HOST, t as DateSchema, a0 as DateTimeSchema, a6 as DiscriminatedUnionSchema, a7 as EnumSchema, F as FATAL_ERROR_TYPES, r as FileSchema, G as GenericSelector, q as ImageSchema, I as Internal, a1 as KeyOfSchema, a8 as LiteralSchema, L as LocaleSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, a5 as RichTextSchema, a4 as RouteSchema, z as SETTINGS_MODULE_CONVENTION, S as Schema, u as SettingsSchema, p as StringSchema, T as THEME_LOGO_DIRECTORY, x as THEME_RADIUS_LENGTHS, w as THEME_RADIUS_STEPS, V as VAL_EXTENSION, a2 as ValViewSchema, y as assistantAvailability, j as computeSourcesSha, h as computeValModuleShas, K as declaredKeySetOf, o as derefPatch, a9 as deserializeSchema, U as discriminatedUnionBranchOf, g as extractValModules, ag as getSourcePathFromRoute, l as hasMediaSchema, k as hasRemoteFileSchema, i as initVal, ab as isInlineRender, ah as isPageRouter, C as isRootModuleFilePath, a3 as isValViewSource, J as localeOfValue, H as localeTagError, Q as missingDeclaredKeys, m as modules, ac as parseNextJsRoutePattern, ad as parseTanStackRoutePattern, aa as previewScope, E as resolveSettingsModule, ae as tanStackSegmentsOfRoutePath, af as validateUrlAgainstPattern } from './index-962a8ac3.esm.js';
1
+ export { v as ASSISTANT_SETTINGS_MAX_LENGTH, A as ArraySchema, B as BooleanSchema, Y as CODE_LANGUAGES, Z as COLOR_FORMATS, X as CodeSchema, W as ColorSchema, e as DEFAULT_APP_HOST, $ as DEFAULT_COLOR_FORMAT, D as DEFAULT_CONTENT_HOST, f as DEFAULT_STATIC_HOST, n as DEFAULT_VAL_REMOTE_HOST, t as DateSchema, a0 as DateTimeSchema, a6 as DiscriminatedUnionSchema, a7 as EnumSchema, F as FATAL_ERROR_TYPES, r as FileSchema, G as GenericSelector, q as ImageSchema, I as Internal, a1 as KeyOfSchema, a8 as LiteralSchema, L as LocaleSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, a5 as RichTextSchema, a4 as RouteSchema, z as SETTINGS_MODULE_CONVENTION, S as Schema, u as SettingsSchema, p as StringSchema, T as THEME_LOGO_DIRECTORY, x as THEME_RADIUS_LENGTHS, w as THEME_RADIUS_STEPS, am as UNSAFE_URL_SCHEMES, V as VAL_EXTENSION, a2 as ValViewSchema, y as assistantAvailability, j as computeSourcesSha, h as computeValModuleShas, K as declaredKeySetOf, o as derefPatch, ai as describeSchemeRejection, a9 as deserializeSchema, U as discriminatedUnionBranchOf, g as extractValModules, ag as getSourcePathFromRoute, l as hasMediaSchema, k as hasRemoteFileSchema, i as initVal, aj as isCheckableScheme, ab as isInlineRender, ah as isPageRouter, C as isRootModuleFilePath, a3 as isValViewSource, J as localeOfValue, H as localeTagError, Q as missingDeclaredKeys, m as modules, ac as parseNextJsRoutePattern, ad as parseTanStackRoutePattern, aa as previewScope, ak as rejectScheme, E as resolveSettingsModule, al as schemeOf, ae as tanStackSegmentsOfRoutePath, af as validateUrlAgainstPattern } from './index-a25822a3.esm.js';
2
2
  import './result-daff1cae.esm.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/core",
3
- "version": "0.136.8",
3
+ "version": "0.138.0",
4
4
  "private": false,
5
5
  "description": "Val - supercharged hard-coded content",
6
6
  "repository": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('../../dist/index-afbcf0ca.cjs.dev.js');
5
+ var dist_valbuildCore = require('../../dist/index-d3c51a0d.cjs.dev.js');
6
6
  var result = require('../../dist/result-bb1f436e.cjs.dev.js');
7
7
  var util = require('../../dist/util-b213092b.cjs.dev.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('../../dist/index-2545d3b4.cjs.prod.js');
5
+ var dist_valbuildCore = require('../../dist/index-3296fc4f.cjs.prod.js');
6
6
  var result = require('../../dist/result-787e35f6.cjs.prod.js');
7
7
  var util = require('../../dist/util-030d8a1f.cjs.prod.js');
8
8
 
@@ -1,5 +1,5 @@
1
- import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-962a8ac3.esm.js';
2
- export { P as PatchError } from '../../dist/index-962a8ac3.esm.js';
1
+ import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-a25822a3.esm.js';
2
+ export { P as PatchError } from '../../dist/index-a25822a3.esm.js';
3
3
  import { f as isNonEmpty, e as err, o as ok, m as map, g as flatMap, i as isErr, h as flatMapReduce, j as filterOrElse, k as mapErr, l as map$1, n as all, p as flatten, q as allT } from '../../dist/result-daff1cae.esm.js';
4
4
  import { p as pipe } from '../../dist/util-18613e99.esm.js';
5
5