@valbuild/core 0.143.0 → 0.144.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/declarations/src/index.d.ts +8 -3
- package/dist/declarations/src/initSchema.d.ts +84 -25
- package/dist/declarations/src/initVal.d.ts +2 -2
- package/dist/declarations/src/mimeType/font.d.ts +2 -2
- package/dist/declarations/src/render.d.ts +1 -1
- package/dist/declarations/src/schema/file.d.ts +4 -4
- package/dist/declarations/src/schema/filedir.d.ts +83 -0
- package/dist/declarations/src/schema/font.d.ts +4 -4
- package/dist/declarations/src/schema/fontdir.d.ts +63 -0
- package/dist/declarations/src/schema/hasRemoteFileSchema.d.ts +3 -3
- package/dist/declarations/src/schema/image.d.ts +4 -4
- package/dist/declarations/src/schema/{imageset.d.ts → imagedir.d.ts} +63 -29
- package/dist/declarations/src/schema/record.d.ts +17 -6
- package/dist/declarations/src/schema/video.d.ts +7 -7
- package/dist/declarations/src/schema/{videoset.d.ts → videodir.d.ts} +55 -27
- package/dist/declarations/src/source/media.d.ts +26 -3
- package/dist/{index-46c72f01.cjs.prod.js → index-2d194c90.cjs.prod.js} +336 -91
- package/dist/{index-aac8c69c.cjs.dev.js → index-8b22b2c1.cjs.dev.js} +336 -91
- package/dist/{index-02a1ba06.esm.js → index-aa16dd90.esm.js} +336 -91
- package/dist/valbuild-core.cjs.dev.js +1 -1
- package/dist/valbuild-core.cjs.prod.js +1 -1
- package/dist/valbuild-core.esm.js +1 -1
- package/package.json +1 -1
- package/patch/dist/valbuild-core-patch.cjs.dev.js +1 -1
- package/patch/dist/valbuild-core-patch.cjs.prod.js +1 -1
- package/patch/dist/valbuild-core-patch.esm.js +2 -2
- package/dist/declarations/src/schema/fileset.d.ts +0 -57
- package/dist/declarations/src/schema/fontset.d.ts +0 -40
|
@@ -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, at 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, ap as describeSchemeRejection, ag as deserializeSchema, a1 as discriminatedUnionBranchOf, g as extractValModules, an as getSourcePathFromRoute, n as hasMediaSchema, l as hasRemoteFileSchema, i as initVal, aq as isCheckableScheme, ai as isInlineRender, ao as isPageRouter, U as isRootModuleFilePath, aa as isValViewSource, Y as localeOfValue, X as localeTagError, a0 as missingDeclaredKeys, m as modules, aj as parseNextJsRoutePattern, ak as parseTanStackRoutePattern, ah as previewScope, ar as rejectScheme, W as resolveSettingsModule, as as schemeOf, al as tanStackSegmentsOfRoutePath, am as validateUrlAgainstPattern } from './index-
|
|
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, at 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, ap as describeSchemeRejection, ag as deserializeSchema, a1 as discriminatedUnionBranchOf, g as extractValModules, an as getSourcePathFromRoute, n as hasMediaSchema, l as hasRemoteFileSchema, i as initVal, aq as isCheckableScheme, ai as isInlineRender, ao as isPageRouter, U as isRootModuleFilePath, aa as isValViewSource, Y as localeOfValue, X as localeTagError, a0 as missingDeclaredKeys, m as modules, aj as parseNextJsRoutePattern, ak as parseTanStackRoutePattern, ah as previewScope, ar as rejectScheme, W as resolveSettingsModule, as as schemeOf, al as tanStackSegmentsOfRoutePath, am as validateUrlAgainstPattern } from './index-aa16dd90.esm.js';
|
|
2
2
|
import './result-daff1cae.esm.js';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var dist_valbuildCore = require('../../dist/index-
|
|
5
|
+
var dist_valbuildCore = require('../../dist/index-8b22b2c1.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-
|
|
5
|
+
var dist_valbuildCore = require('../../dist/index-2d194c90.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-
|
|
2
|
-
export { P as PatchError } from '../../dist/index-
|
|
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-aa16dd90.esm.js';
|
|
2
|
+
export { P as PatchError } from '../../dist/index-aa16dd90.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
|
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Schema } from "./index.js";
|
|
2
|
-
import type { SerializedRecordSchema } from "./record.js";
|
|
3
|
-
import { RecordSchema } from "./record.js";
|
|
4
|
-
import { ObjectSchema } from "./object.js";
|
|
5
|
-
import { StringSchema } from "./string.js";
|
|
6
|
-
/**
|
|
7
|
-
* Options for s.fileset()
|
|
8
|
-
*/
|
|
9
|
-
export type FilesetOptions = {
|
|
10
|
-
/**
|
|
11
|
-
* The accepted mime type pattern (e.g., "application/pdf", "text/*", "*\/*")
|
|
12
|
-
*/
|
|
13
|
-
accept: string;
|
|
14
|
-
/**
|
|
15
|
-
* The directory where files should be stored.
|
|
16
|
-
* Must start with "/public" (e.g., "/public/val/files")
|
|
17
|
-
*
|
|
18
|
-
* Required, and deliberately so: it decides where every uploaded file in this
|
|
19
|
-
* collection lands, and it used to default to "/public/val" — which meant a
|
|
20
|
-
* collection that had simply not said where it wanted its files silently shared
|
|
21
|
-
* a directory with every other one.
|
|
22
|
-
*/
|
|
23
|
-
dir: "/public" | `/public/${string}`;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Metadata for a file entry in the files record
|
|
27
|
-
*/
|
|
28
|
-
export type FilesetEntryMetadata = {
|
|
29
|
-
mimeType: string;
|
|
30
|
-
};
|
|
31
|
-
export type SerializedFilesetSchema = SerializedRecordSchema;
|
|
32
|
-
type FilesetItemProps = {
|
|
33
|
-
mimeType: StringSchema<string>;
|
|
34
|
-
};
|
|
35
|
-
type FilesetItemSrc = {
|
|
36
|
-
mimeType: string;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Define a collection of files.
|
|
40
|
-
*
|
|
41
|
-
* Remote is off by default: call `.remote()` on the result to allow remote files.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```typescript
|
|
45
|
-
* const schema = s.fileset({
|
|
46
|
-
* accept: "application/pdf",
|
|
47
|
-
* dir: "/public/val/documents",
|
|
48
|
-
* });
|
|
49
|
-
* export default c.define("/content/documents.val.ts", schema, {
|
|
50
|
-
* "/public/val/documents/report.pdf": {
|
|
51
|
-
* mimeType: "application/pdf",
|
|
52
|
-
* },
|
|
53
|
-
* });
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
export declare const fileset: (options: FilesetOptions) => RecordSchema<ObjectSchema<FilesetItemProps, FilesetItemSrc>, Schema<string>, Record<string, FilesetEntryMetadata>>;
|
|
57
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { fileset, FilesetOptions } from "./fileset.js";
|
|
2
|
-
/**
|
|
3
|
-
* Options for s.fontset()
|
|
4
|
-
*/
|
|
5
|
-
export type FontsetOptions = {
|
|
6
|
-
/**
|
|
7
|
-
* The directory where fonts should be stored.
|
|
8
|
-
* Must start with "/public" (e.g., "/public/val/fonts")
|
|
9
|
-
*/
|
|
10
|
-
dir: FilesetOptions["dir"];
|
|
11
|
-
/**
|
|
12
|
-
* The accepted font types. Defaults to every web font format:
|
|
13
|
-
* `"font/woff2,font/woff,font/ttf,font/otf"`. Narrow it to `"font/woff2"` to
|
|
14
|
-
* keep the site's fonts to the one format every current browser reads and
|
|
15
|
-
* that is smallest on the wire.
|
|
16
|
-
*/
|
|
17
|
-
accept?: string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Define a collection of fonts.
|
|
21
|
-
*
|
|
22
|
-
* A fontset IS a fileset — the same source, the same `s.file(fontsVal)` field
|
|
23
|
-
* to pick from it, the same checks and fixes — with `accept` defaulting to the
|
|
24
|
-
* web font formats. What a font gets that any other file does not is decided
|
|
25
|
-
* by its mime type rather than by the set: the Studio previews any file it
|
|
26
|
-
* knows is a font, wherever it is shown.
|
|
27
|
-
*
|
|
28
|
-
* Remote is off by default: call `.remote()` on the result to allow remote files.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```typescript
|
|
32
|
-
* const schema = s.fontset({ dir: "/public/val/fonts" });
|
|
33
|
-
* export default c.define("/content/fonts.val.ts", schema, {
|
|
34
|
-
* "/public/val/fonts/inter_a1b2c.woff2": {
|
|
35
|
-
* mimeType: "font/woff2",
|
|
36
|
-
* },
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export declare const fontset: (options: FontsetOptions) => ReturnType<typeof fileset>;
|