@valbuild/core 0.148.2 → 0.148.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @valbuild/core
2
2
 
3
+ ## 0.148.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#906](https://github.com/valbuild/val/pull/906) [`fb2eed8`](https://github.com/valbuild/val/commit/fb2eed8b51092cc2ad5c812bdf88b528913c824a) Thanks [@freekh](https://github.com/freekh)! - `val.attrs(post, "author")` tags an element with one field of what it shows. Use it for a value Val never encodes, like an `s.keyOf` key, a date or a colour. A byline that shows the author a post points at can carry the post's `author` field, so clicking it in the Studio opens the choice of author.
8
+
9
+ On a phone, a tour step about Pages, Media, Data or Settings points at the menu button, which is where they are when the rail is not drawn.
10
+
3
11
  ## 0.148.2
4
12
 
5
13
  ### Patch Changes
@@ -35,7 +35,7 @@ import { getSource, isValModule, splitModulePath, splitModuleFilePath, resolvePa
35
35
  declare const ModuleFilePathSep = "?p=";
36
36
  export { ModuleFilePathSep };
37
37
  import { SelectorSource, getSchema } from "./selector/index.js";
38
- import { ModulePath, SourcePath, getValPath, isVal } from "./val/index.js";
38
+ import { ModulePath, SourcePath, getValPath, isVal, setValPath } from "./val/index.js";
39
39
  import { createValPathOfItem } from "./selector/SelectorProxy.js";
40
40
  import { Operation } from "./patch/index.js";
41
41
  import { initSchema } from "./initSchema.js";
@@ -173,6 +173,7 @@ declare const Internal: {
173
173
  };
174
174
  getSchema: typeof getSchema;
175
175
  getValPath: typeof getValPath;
176
+ setValPath: typeof setValPath;
176
177
  getSource: typeof getSource;
177
178
  isValModule: typeof isValModule;
178
179
  resolvePath: typeof resolvePath;
@@ -60,4 +60,13 @@ export type ParentPatchId = string & {
60
60
  [brand]: "ParentPatchId";
61
61
  };
62
62
  export declare function getValPath(valOrSelector: Val<Json> | Selector<Source>): SourcePath | undefined;
63
+ /**
64
+ * Gives an object Val read the path it was read from, where `getValPath`
65
+ * finds it: the readers' (`stegaEncode`'s) half of `getValPath`, for objects,
66
+ * which have no text to carry a path in.
67
+ *
68
+ * Not enumerable, and a symbol: `Object.keys`, `JSON.stringify` and every walk
69
+ * that reads content as data still see only the content.
70
+ */
71
+ export declare function setValPath(target: object, path: SourcePath): void;
63
72
  export {};
@@ -914,6 +914,22 @@ function getValPath(valOrSelector) {
914
914
  return valOrSelector[Path];
915
915
  }
916
916
 
917
+ /**
918
+ * Gives an object Val read the path it was read from, where `getValPath`
919
+ * finds it: the readers' (`stegaEncode`'s) half of `getValPath`, for objects,
920
+ * which have no text to carry a path in.
921
+ *
922
+ * Not enumerable, and a symbol: `Object.keys`, `JSON.stringify` and every walk
923
+ * that reads content as data still see only the content.
924
+ */
925
+ function setValPath(target, path) {
926
+ Object.defineProperty(target, Path, {
927
+ value: path,
928
+ enumerable: false,
929
+ configurable: true
930
+ });
931
+ }
932
+
917
933
  function createValPathOfItem(
918
934
  /**
919
935
  * `ModuleFilePath` is accepted because the no-separator branch below is
@@ -16919,7 +16935,7 @@ function isInlineRender(container) {
16919
16935
 
16920
16936
  var corePackageJson = {
16921
16937
  name: "@valbuild/core",
16922
- version: "0.148.2",
16938
+ version: "0.148.7",
16923
16939
  "private": false,
16924
16940
  description: "Val - supercharged hard-coded content",
16925
16941
  repository: {
@@ -17038,6 +17054,7 @@ var Internal = {
17038
17054
  },
17039
17055
  getSchema: getSchema,
17040
17056
  getValPath: getValPath,
17057
+ setValPath: setValPath,
17041
17058
  getSource: getSource,
17042
17059
  isValModule: isValModule,
17043
17060
  resolvePath: resolvePath,
@@ -916,6 +916,22 @@ function getValPath(valOrSelector) {
916
916
  return valOrSelector[Path];
917
917
  }
918
918
 
919
+ /**
920
+ * Gives an object Val read the path it was read from, where `getValPath`
921
+ * finds it: the readers' (`stegaEncode`'s) half of `getValPath`, for objects,
922
+ * which have no text to carry a path in.
923
+ *
924
+ * Not enumerable, and a symbol: `Object.keys`, `JSON.stringify` and every walk
925
+ * that reads content as data still see only the content.
926
+ */
927
+ function setValPath(target, path) {
928
+ Object.defineProperty(target, Path, {
929
+ value: path,
930
+ enumerable: false,
931
+ configurable: true
932
+ });
933
+ }
934
+
919
935
  function createValPathOfItem(
920
936
  /**
921
937
  * `ModuleFilePath` is accepted because the no-separator branch below is
@@ -16921,7 +16937,7 @@ function isInlineRender(container) {
16921
16937
 
16922
16938
  var corePackageJson = {
16923
16939
  name: "@valbuild/core",
16924
- version: "0.148.2",
16940
+ version: "0.148.7",
16925
16941
  "private": false,
16926
16942
  description: "Val - supercharged hard-coded content",
16927
16943
  repository: {
@@ -17040,6 +17056,7 @@ var Internal = {
17040
17056
  },
17041
17057
  getSchema: getSchema,
17042
17058
  getValPath: getValPath,
17059
+ setValPath: setValPath,
17043
17060
  getSource: getSource,
17044
17061
  isValModule: isValModule,
17045
17062
  resolvePath: resolvePath,
@@ -916,6 +916,22 @@ function getValPath(valOrSelector) {
916
916
  return valOrSelector[Path];
917
917
  }
918
918
 
919
+ /**
920
+ * Gives an object Val read the path it was read from, where `getValPath`
921
+ * finds it: the readers' (`stegaEncode`'s) half of `getValPath`, for objects,
922
+ * which have no text to carry a path in.
923
+ *
924
+ * Not enumerable, and a symbol: `Object.keys`, `JSON.stringify` and every walk
925
+ * that reads content as data still see only the content.
926
+ */
927
+ function setValPath(target, path) {
928
+ Object.defineProperty(target, Path, {
929
+ value: path,
930
+ enumerable: false,
931
+ configurable: true
932
+ });
933
+ }
934
+
919
935
  function createValPathOfItem(
920
936
  /**
921
937
  * `ModuleFilePath` is accepted because the no-separator branch below is
@@ -16921,7 +16937,7 @@ function isInlineRender(container) {
16921
16937
 
16922
16938
  var corePackageJson = {
16923
16939
  name: "@valbuild/core",
16924
- version: "0.148.2",
16940
+ version: "0.148.7",
16925
16941
  "private": false,
16926
16942
  description: "Val - supercharged hard-coded content",
16927
16943
  repository: {
@@ -17040,6 +17056,7 @@ var Internal = {
17040
17056
  },
17041
17057
  getSchema: getSchema,
17042
17058
  getValPath: getValPath,
17059
+ setValPath: setValPath,
17043
17060
  getSource: getSource,
17044
17061
  isValModule: isValModule,
17045
17062
  resolvePath: resolvePath,
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-858ec9e8.cjs.dev.js');
5
+ var dist_valbuildCore = require('./index-66258256.cjs.dev.js');
6
6
  require('./result-bb1f436e.cjs.dev.js');
7
7
 
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-c21fa511.cjs.prod.js');
5
+ var dist_valbuildCore = require('./index-dfea75c9.cjs.prod.js');
6
6
  require('./result-787e35f6.cjs.prod.js');
7
7
 
8
8
 
@@ -1,2 +1,2 @@
1
- export { H as ASSISTANT_SETTINGS_MAX_LENGTH, A as ArraySchema, B as BooleanSchema, a4 as CODE_LANGUAGES, a5 as COLOR_FORMATS, a3 as CodeSchema, a2 as ColorSchema, e as DEFAULT_APP_HOST, a6 as DEFAULT_COLOR_FORMAT, D as DEFAULT_CONTENT_HOST, u as DEFAULT_FONT_ACCEPT, f as DEFAULT_STATIC_HOST, o as DEFAULT_VAL_REMOTE_HOST, x as DEFAULT_VIDEO_ACCEPT, y as DEFAULT_VIDEO_RENDITIONS, z as DEFAULT_VIDEO_SEGMENT_DURATION, C as DateSchema, a7 as DateTimeSchema, ad as DiscriminatedUnionSchema, ae as EnumSchema, F as FATAL_ERROR_TYPES, v as FONT_MIME_TYPES, t as FileSchema, G as GenericSelector, r as ImageSchema, I as Internal, a8 as KeyOfSchema, af as LiteralSchema, Z as LocaleSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, ac as RichTextSchema, ab as RouteSchema, Q as SETTINGS_MODULE_CONVENTION, S as Schema, E as SettingsSchema, q as StringSchema, T as THEME_LOGO_DIRECTORY, K as THEME_RADIUS_LENGTHS, J as THEME_RADIUS_STEPS, av as UNSAFE_URL_SCHEMES, V as VAL_EXTENSION, a9 as ValViewSchema, w as VideoSchema, L as assistantAvailability, k as computeSchemaSha, j as computeSourcesSha, h as computeValModuleShas, $ as declaredKeySetOf, p as derefPatch, ar as describeSchemeRejection, ag as deserializeSchema, a1 as discriminatedUnionBranchOf, g as extractValModules, ao as getSourcePathFromRoute, n as hasMediaSchema, l as hasRemoteFileSchema, i as initVal, as as isCheckableScheme, ai as isInlineRender, ap as isPageRouter, U as isRootModuleFilePath, aa as isValViewSource, Y as localeOfValue, X as localeTagError, an as matchRoutePattern, a0 as missingDeclaredKeys, m as modules, aj as parseNextJsRoutePattern, ak as parseTanStackRoutePattern, ah as previewScope, at as rejectScheme, W as resolveSettingsModule, aq as routePatternOf, au as schemeOf, al as tanStackSegmentsOfRoutePath, am as validateUrlAgainstPattern } from './index-a91ac6a3.esm.js';
1
+ export { H as ASSISTANT_SETTINGS_MAX_LENGTH, A as ArraySchema, B as BooleanSchema, a4 as CODE_LANGUAGES, a5 as COLOR_FORMATS, a3 as CodeSchema, a2 as ColorSchema, e as DEFAULT_APP_HOST, a6 as DEFAULT_COLOR_FORMAT, D as DEFAULT_CONTENT_HOST, u as DEFAULT_FONT_ACCEPT, f as DEFAULT_STATIC_HOST, o as DEFAULT_VAL_REMOTE_HOST, x as DEFAULT_VIDEO_ACCEPT, y as DEFAULT_VIDEO_RENDITIONS, z as DEFAULT_VIDEO_SEGMENT_DURATION, C as DateSchema, a7 as DateTimeSchema, ad as DiscriminatedUnionSchema, ae as EnumSchema, F as FATAL_ERROR_TYPES, v as FONT_MIME_TYPES, t as FileSchema, G as GenericSelector, r as ImageSchema, I as Internal, a8 as KeyOfSchema, af as LiteralSchema, Z as LocaleSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, ac as RichTextSchema, ab as RouteSchema, Q as SETTINGS_MODULE_CONVENTION, S as Schema, E as SettingsSchema, q as StringSchema, T as THEME_LOGO_DIRECTORY, K as THEME_RADIUS_LENGTHS, J as THEME_RADIUS_STEPS, av as UNSAFE_URL_SCHEMES, V as VAL_EXTENSION, a9 as ValViewSchema, w as VideoSchema, L as assistantAvailability, k as computeSchemaSha, j as computeSourcesSha, h as computeValModuleShas, $ as declaredKeySetOf, p as derefPatch, ar as describeSchemeRejection, ag as deserializeSchema, a1 as discriminatedUnionBranchOf, g as extractValModules, ao as getSourcePathFromRoute, n as hasMediaSchema, l as hasRemoteFileSchema, i as initVal, as as isCheckableScheme, ai as isInlineRender, ap as isPageRouter, U as isRootModuleFilePath, aa as isValViewSource, Y as localeOfValue, X as localeTagError, an as matchRoutePattern, a0 as missingDeclaredKeys, m as modules, aj as parseNextJsRoutePattern, ak as parseTanStackRoutePattern, ah as previewScope, at as rejectScheme, W as resolveSettingsModule, aq as routePatternOf, au as schemeOf, al as tanStackSegmentsOfRoutePath, am as validateUrlAgainstPattern } from './index-52c01907.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.148.2",
3
+ "version": "0.148.7",
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-858ec9e8.cjs.dev.js');
5
+ var dist_valbuildCore = require('../../dist/index-66258256.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-c21fa511.cjs.prod.js');
5
+ var dist_valbuildCore = require('../../dist/index-dfea75c9.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-a91ac6a3.esm.js';
2
- export { P as PatchError } from '../../dist/index-a91ac6a3.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-52c01907.esm.js';
2
+ export { P as PatchError } from '../../dist/index-52c01907.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