@valbuild/core 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/declarations/src/initSchema.d.ts +1 -1
- package/dist/declarations/src/schema/richtext.d.ts +1 -1
- package/dist/declarations/src/schema/string.d.ts +1 -1
- package/dist/{ops-7ef32b0a.esm.js → ops-22b624eb.esm.js} +1 -1
- package/dist/{ops-2d7e1742.cjs.dev.js → ops-b0a33248.cjs.dev.js} +1 -1
- package/dist/{ops-ae089ab2.cjs.prod.js → ops-def81fc3.cjs.prod.js} +1 -1
- package/dist/valbuild-core.cjs.dev.js +4 -2
- package/dist/valbuild-core.cjs.prod.js +4 -2
- package/dist/valbuild-core.esm.js +4 -2
- 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/src/schema/richtext.ts +2 -2
- package/src/schema/string.ts +1 -1
- package/src/source/richtext.ts +3 -3
@@ -47,7 +47,7 @@ export declare function initSchema(): {
|
|
47
47
|
val?: undefined;
|
48
48
|
valPath?: undefined;
|
49
49
|
} & { [k in Key]: string; }>[]>(key: Key, ...objects: T_1) => import("./schema/index.js").Schema<T_1 extends import("./schema/index.js").Schema<infer S_1 extends import("./selector/index.js").SelectorSource>[] ? S_1 extends import("./selector/index.js").SelectorSource ? S_1 : never : never>;
|
50
|
-
richtext: <O extends import("./index.js").RichTextOptions>(options
|
50
|
+
richtext: <O extends import("./index.js").RichTextOptions>(options?: O | undefined) => import("./schema/index.js").Schema<import("./index.js").RichTextSource<O>>;
|
51
51
|
image: (options?: import("./schema/image.js").ImageOptions | undefined) => import("./schema/index.js").Schema<import("./index.js").FileSource<import("./schema/image.js").ImageMetadata>>;
|
52
52
|
literal: <T_2 extends string>(value: T_2) => import("./schema/index.js").Schema<T_2>;
|
53
53
|
keyOf: <Src extends import("./selector/index.js").GenericSelector<import("./source/index.js").SourceObject | import("./source/index.js").SourceArray, undefined> & import("./module.js").ValModuleBrand>(valModule: Src) => import("./schema/index.js").Schema<Src extends import("./selector/index.js").GenericSelector<infer S_2 extends import("./source/index.js").Source, undefined> ? S_2 extends readonly any[] ? number : S_2 extends import("./source/index.js").SourceObject ? keyof S_2 : S_2 extends Record<string, any> ? string : never : never>;
|
@@ -15,4 +15,4 @@ export declare class RichTextSchema<O extends RichTextOptions, Src extends RichT
|
|
15
15
|
optional(): Schema<RichTextSource<O> | null>;
|
16
16
|
serialize(): SerializedSchema;
|
17
17
|
}
|
18
|
-
export declare const richtext: <O extends RichTextOptions>(options
|
18
|
+
export declare const richtext: <O extends RichTextOptions>(options?: O | undefined) => Schema<RichTextSource<O>>;
|
@@ -14,7 +14,7 @@ export type SerializedStringSchema = {
|
|
14
14
|
export declare class StringSchema<Src extends string | null> extends Schema<Src> {
|
15
15
|
readonly options?: StringOptions | undefined;
|
16
16
|
readonly opt: boolean;
|
17
|
-
readonly isRaw
|
17
|
+
private readonly isRaw;
|
18
18
|
constructor(options?: StringOptions | undefined, opt?: boolean, isRaw?: boolean);
|
19
19
|
validate(path: SourcePath, src: Src): ValidationErrors;
|
20
20
|
assert(src: Src): boolean;
|
@@ -416,7 +416,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
416
416
|
return RichTextSchema;
|
417
417
|
}(Schema);
|
418
418
|
var richtext = function richtext(options) {
|
419
|
-
return new RichTextSchema(options);
|
419
|
+
return new RichTextSchema(options !== null && options !== void 0 ? options : {});
|
420
420
|
};
|
421
421
|
|
422
422
|
var RecordSchema = /*#__PURE__*/function (_Schema) {
|
@@ -418,7 +418,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
418
418
|
return RichTextSchema;
|
419
419
|
}(index.Schema);
|
420
420
|
var richtext = function richtext(options) {
|
421
|
-
return new RichTextSchema(options);
|
421
|
+
return new RichTextSchema(options !== null && options !== void 0 ? options : {});
|
422
422
|
};
|
423
423
|
|
424
424
|
var RecordSchema = /*#__PURE__*/function (_Schema) {
|
@@ -418,7 +418,7 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
418
418
|
return RichTextSchema;
|
419
419
|
}(index.Schema);
|
420
420
|
var richtext = function richtext(options) {
|
421
|
-
return new RichTextSchema(options);
|
421
|
+
return new RichTextSchema(options !== null && options !== void 0 ? options : {});
|
422
422
|
};
|
423
423
|
|
424
424
|
var RecordSchema = /*#__PURE__*/function (_Schema) {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var index = require('./index-a6e642dd.cjs.dev.js');
|
6
|
-
var ops = require('./ops-
|
6
|
+
var ops = require('./ops-b0a33248.cjs.dev.js');
|
7
7
|
var marked = require('marked');
|
8
8
|
var expr_dist_valbuildCoreExpr = require('./index-486c7fbf.cjs.dev.js');
|
9
9
|
var result = require('./result-48320acd.cjs.dev.js');
|
@@ -480,7 +480,9 @@ function parseTokens(tokens) {
|
|
480
480
|
children: [token.text]
|
481
481
|
}];
|
482
482
|
}
|
483
|
-
console.error(
|
483
|
+
// console.error(
|
484
|
+
// `Could not parse markdown: unsupported token type: ${token.type}. Found: ${token.raw}`
|
485
|
+
// );
|
484
486
|
return [token.raw];
|
485
487
|
});
|
486
488
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var index = require('./index-8706c87e.cjs.prod.js');
|
6
|
-
var ops = require('./ops-
|
6
|
+
var ops = require('./ops-def81fc3.cjs.prod.js');
|
7
7
|
var marked = require('marked');
|
8
8
|
var expr_dist_valbuildCoreExpr = require('./index-601a7d73.cjs.prod.js');
|
9
9
|
var result = require('./result-26f67b40.cjs.prod.js');
|
@@ -480,7 +480,9 @@ function parseTokens(tokens) {
|
|
480
480
|
children: [token.text]
|
481
481
|
}];
|
482
482
|
}
|
483
|
-
console.error(
|
483
|
+
// console.error(
|
484
|
+
// `Could not parse markdown: unsupported token type: ${token.type}. Found: ${token.raw}`
|
485
|
+
// );
|
484
486
|
return [token.raw];
|
485
487
|
});
|
486
488
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { _ as _inherits, a as _createSuper, b as _classCallCheck, c as _createClass, d as _defineProperty, e as _typeof, S as Schema, G as GetSchema, g as getValPath, i as image, V as VAL_EXTENSION, f as convertFileSource, h as file, j as _objectSpread2, k as _slicedToArray, l as isFile, F as FILE_REF_PROP, P as Path, m as GetSource, n as isSerializedVal, o as getSchema, p as isVal } from './index-bccf1907.esm.js';
|
2
2
|
export { F as FILE_REF_PROP, q as GenericSelector, S as Schema, V as VAL_EXTENSION } from './index-bccf1907.esm.js';
|
3
|
-
import { a as array, o as object, u as union, r as richtext$1, b as record, c as content, P as PatchError, n as newSelectorProxy, d as createValPathOfItem, i as isSelector, g as getSource, e as resolvePath, s as splitModuleIdAndModulePath } from './ops-
|
3
|
+
import { a as array, o as object, u as union, r as richtext$1, b as record, c as content, P as PatchError, n as newSelectorProxy, d as createValPathOfItem, i as isSelector, g as getSource, e as resolvePath, s as splitModuleIdAndModulePath } from './ops-22b624eb.esm.js';
|
4
4
|
import * as marked from 'marked';
|
5
5
|
export { i as expr } from './index-5d1ab97c.esm.js';
|
6
6
|
import { _ as _createForOfIteratorHelper, i as isErr, a as isOk, e as err, o as ok, r as result } from './result-b96df128.esm.js';
|
@@ -457,7 +457,9 @@ function parseTokens(tokens) {
|
|
457
457
|
children: [token.text]
|
458
458
|
}];
|
459
459
|
}
|
460
|
-
console.error(
|
460
|
+
// console.error(
|
461
|
+
// `Could not parse markdown: unsupported token type: ${token.type}. Found: ${token.raw}`
|
462
|
+
// );
|
461
463
|
return [token.raw];
|
462
464
|
});
|
463
465
|
}
|
package/package.json
CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var index = require('../../dist/index-a6e642dd.cjs.dev.js');
|
6
6
|
var result = require('../../dist/result-48320acd.cjs.dev.js');
|
7
7
|
var util = require('../../dist/util-b213092b.cjs.dev.js');
|
8
|
-
var ops = require('../../dist/ops-
|
8
|
+
var ops = require('../../dist/ops-b0a33248.cjs.dev.js');
|
9
9
|
|
10
10
|
function isNotRoot(path) {
|
11
11
|
return result.isNonEmpty(path);
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var index = require('../../dist/index-8706c87e.cjs.prod.js');
|
6
6
|
var result = require('../../dist/result-26f67b40.cjs.prod.js');
|
7
7
|
var util = require('../../dist/util-030d8a1f.cjs.prod.js');
|
8
|
-
var ops = require('../../dist/ops-
|
8
|
+
var ops = require('../../dist/ops-def81fc3.cjs.prod.js');
|
9
9
|
|
10
10
|
function isNotRoot(path) {
|
11
11
|
return result.isNonEmpty(path);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { e as _typeof, k as _slicedToArray, c as _createClass, b as _classCallCheck, u as _toConsumableArray } from '../../dist/index-bccf1907.esm.js';
|
2
2
|
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-b96df128.esm.js';
|
3
3
|
import { p as pipe } from '../../dist/util-18613e99.esm.js';
|
4
|
-
import { P as PatchError, s as splitModuleIdAndModulePath } from '../../dist/ops-
|
5
|
-
export { P as PatchError } from '../../dist/ops-
|
4
|
+
import { P as PatchError, s as splitModuleIdAndModulePath } from '../../dist/ops-22b624eb.esm.js';
|
5
|
+
export { P as PatchError } from '../../dist/ops-22b624eb.esm.js';
|
6
6
|
|
7
7
|
function isNotRoot(path) {
|
8
8
|
return isNonEmpty(path);
|
package/src/schema/richtext.ts
CHANGED
@@ -38,7 +38,7 @@ export class RichTextSchema<
|
|
38
38
|
}
|
39
39
|
|
40
40
|
export const richtext = <O extends RichTextOptions>(
|
41
|
-
options
|
41
|
+
options?: O
|
42
42
|
): Schema<RichTextSource<O>> => {
|
43
|
-
return new RichTextSchema<O, RichTextSource<O>>(options);
|
43
|
+
return new RichTextSchema<O, RichTextSource<O>>(options ?? ({} as O));
|
44
44
|
};
|
package/src/schema/string.ts
CHANGED
@@ -19,7 +19,7 @@ export class StringSchema<Src extends string | null> extends Schema<Src> {
|
|
19
19
|
constructor(
|
20
20
|
readonly options?: StringOptions,
|
21
21
|
readonly opt: boolean = false,
|
22
|
-
readonly isRaw: boolean = false
|
22
|
+
private readonly isRaw: boolean = false
|
23
23
|
) {
|
24
24
|
super();
|
25
25
|
}
|
package/src/source/richtext.ts
CHANGED
@@ -261,9 +261,9 @@ function parseTokens<O extends RichTextOptions>(
|
|
261
261
|
},
|
262
262
|
];
|
263
263
|
}
|
264
|
-
console.error(
|
265
|
-
|
266
|
-
);
|
264
|
+
// console.error(
|
265
|
+
// `Could not parse markdown: unsupported token type: ${token.type}. Found: ${token.raw}`
|
266
|
+
// );
|
267
267
|
return [token.raw];
|
268
268
|
});
|
269
269
|
}
|