bleam 0.0.5 → 0.0.6
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/ai.cjs +187 -0
- package/dist/ai.d.cts +52 -0
- package/dist/ai.d.ts +52 -0
- package/dist/ai.js +182 -0
- package/dist/animated.cjs +286 -0
- package/dist/animated.d.cts +47 -0
- package/dist/animated.d.ts +47 -0
- package/dist/animated.js +281 -0
- package/dist/app.d.cts +1 -2
- package/dist/app.d.ts +1 -2
- package/dist/app.js +1 -2
- package/dist/bundler.d.cts +1 -2
- package/dist/bundler.d.ts +1 -2
- package/dist/chrome.cjs +265 -0
- package/dist/chrome.d.cts +19 -0
- package/dist/chrome.d.ts +19 -0
- package/dist/chrome.js +262 -0
- package/dist/cli.cjs +768 -31
- package/dist/cli.js +767 -34
- package/dist/config-Bb6SULnR.cjs +46 -0
- package/dist/config-CfWa3q-k.js +28 -0
- package/dist/config-ClDGHNb3.d.ts +39 -0
- package/dist/config-D3gPaVMb.d.cts +39 -0
- package/dist/config.cjs +4 -25
- package/dist/config.d.cts +2 -28
- package/dist/config.d.ts +2 -28
- package/dist/config.js +2 -24
- package/dist/crypto-BB92-Upx.js +7 -0
- package/dist/crypto-CT3VZ7lF.cjs +13 -0
- package/dist/crypto.cjs +2 -2
- package/dist/crypto.d.cts +8 -1
- package/dist/crypto.d.ts +8 -1
- package/dist/crypto.js +2 -2
- package/dist/dev-protocol.d.cts +3 -3
- package/dist/dev-protocol.d.ts +3 -3
- package/dist/dev-protocol.js +1 -2
- package/dist/fs.cjs +12 -2
- package/dist/fs.d.cts +7 -1
- package/dist/fs.d.ts +7 -1
- package/dist/fs.js +10 -1
- package/dist/index.cjs +4 -5
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -4
- package/dist/native-macos-D6p2SmUj.js +20 -0
- package/dist/native-macos-DLwo_ii9.cjs +31 -0
- package/dist/native-runtime-C85Nuc4F.js +10 -0
- package/dist/native-runtime-CbPzrs8j.d.cts +33 -0
- package/dist/{native-runtime-CdeT0JyQ.cjs → native-runtime-CsXnXkQn.cjs} +1 -14
- package/dist/native-runtime-DxHSrsTX.d.ts +33 -0
- package/dist/native.cjs +35 -32
- package/dist/native.d.cts +4 -34
- package/dist/native.d.ts +3 -33
- package/dist/native.js +36 -34
- package/dist/runtime.d.cts +1 -2
- package/dist/runtime.d.ts +1 -2
- package/dist/schema-BOuUHcqo.d.cts +58 -0
- package/dist/schema-DVmoD9JL.js +90 -0
- package/dist/schema-bxeeCyLn.cjs +102 -0
- package/dist/schema-ipsECAso.d.ts +58 -0
- package/dist/schema.cjs +4 -0
- package/dist/schema.d.cts +2 -0
- package/dist/schema.d.ts +2 -0
- package/dist/schema.js +3 -0
- package/dist/state.cjs +765 -0
- package/dist/state.d.cts +129 -0
- package/dist/state.d.ts +129 -0
- package/dist/state.js +747 -0
- package/dist/styles.cjs +742 -0
- package/dist/styles.d.cts +701 -0
- package/dist/styles.d.ts +701 -0
- package/dist/styles.js +739 -0
- package/dist/ui.cjs +113 -0
- package/dist/ui.d.cts +30 -0
- package/dist/ui.d.ts +30 -0
- package/dist/ui.js +110 -0
- package/metro-config.cjs +18 -13
- package/package.json +47 -13
- package/templates/basic/app/index.tsx +130 -12
- package/templates/basic/app.config.ts +4 -2
- package/dist/app.d.cts.map +0 -1
- package/dist/app.d.ts.map +0 -1
- package/dist/app.js.map +0 -1
- package/dist/bundler.d.cts.map +0 -1
- package/dist/bundler.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/crypto-BNhWeXMj.cjs +0 -15
- package/dist/crypto-Bg8cD8wX.d.cts +0 -8
- package/dist/crypto-Bg8cD8wX.d.cts.map +0 -1
- package/dist/crypto-CCA_hvao.js +0 -11
- package/dist/crypto-CCA_hvao.js.map +0 -1
- package/dist/crypto-IOzbNoJD.d.ts +0 -8
- package/dist/crypto-IOzbNoJD.d.ts.map +0 -1
- package/dist/dev-protocol.d.cts.map +0 -1
- package/dist/dev-protocol.d.ts.map +0 -1
- package/dist/dev-protocol.js.map +0 -1
- package/dist/fs-BK7joD1g.js +0 -13
- package/dist/fs-BK7joD1g.js.map +0 -1
- package/dist/fs-CEhcjuN6.d.ts +0 -9
- package/dist/fs-CEhcjuN6.d.ts.map +0 -1
- package/dist/fs-CfE8CHf_.d.cts +0 -9
- package/dist/fs-CfE8CHf_.d.cts.map +0 -1
- package/dist/fs-DKHYTPua.cjs +0 -18
- package/dist/native-runtime-BoqybBBf.js +0 -18
- package/dist/native-runtime-BoqybBBf.js.map +0 -1
- package/dist/native.d.cts.map +0 -1
- package/dist/native.d.ts.map +0 -1
- package/dist/native.js.map +0 -1
- package/dist/runtime.d.cts.map +0 -1
- package/dist/runtime.d.ts.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//#region src/schema.d.ts
|
|
2
|
+
type FieldValue = string | number | boolean;
|
|
3
|
+
type FieldToken = 'string' | 'number' | 'boolean';
|
|
4
|
+
type FieldDefault<T extends FieldValue = FieldValue> = () => T;
|
|
5
|
+
type FieldSchema = FieldToken | FieldDefault;
|
|
6
|
+
type SchemaShape = Record<string, FieldSchema>;
|
|
7
|
+
interface SchemaIssue {
|
|
8
|
+
message: string;
|
|
9
|
+
path?: ReadonlyArray<PropertyKey | {
|
|
10
|
+
key: PropertyKey;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
type SchemaResult<Output> = {
|
|
14
|
+
value: Output;
|
|
15
|
+
issues?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
issues: ReadonlyArray<SchemaIssue>;
|
|
18
|
+
};
|
|
19
|
+
interface StandardSchema<Input = unknown, Output = Input> {
|
|
20
|
+
readonly '~standard': {
|
|
21
|
+
readonly version: 1;
|
|
22
|
+
readonly vendor: 'bleam';
|
|
23
|
+
readonly validate: (value: unknown) => SchemaResult<Output>;
|
|
24
|
+
readonly types?: {
|
|
25
|
+
readonly input: Input;
|
|
26
|
+
readonly output: Output;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
type TokenValue<T extends FieldToken> = T extends 'string' ? string : T extends 'number' ? number : boolean;
|
|
31
|
+
type DefaultValue<T> = T extends (() => infer Value) ? Value extends FieldValue ? Value : never : never;
|
|
32
|
+
type TokenKeys<Shape extends SchemaShape> = { [Key in keyof Shape]: Shape[Key] extends FieldToken ? Key : never }[keyof Shape];
|
|
33
|
+
type DefaultKeys<Shape extends SchemaShape> = { [Key in keyof Shape]: Shape[Key] extends FieldDefault ? Key : never }[keyof Shape];
|
|
34
|
+
type FieldInput<Field extends FieldSchema> = Field extends FieldToken ? TokenValue<Field> : Field extends FieldDefault ? DefaultValue<Field> : never;
|
|
35
|
+
type SchemaInput<Shape extends SchemaShape> = { [Key in keyof Shape]?: FieldInput<Shape[Key]> };
|
|
36
|
+
type SchemaOutput<Shape extends SchemaShape> = { [Key in TokenKeys<Shape>]?: Shape[Key] extends FieldToken ? TokenValue<Shape[Key]> : never } & { [Key in DefaultKeys<Shape>]: Shape[Key] extends FieldDefault ? DefaultValue<Shape[Key]> : never };
|
|
37
|
+
type InferInput<Value$1 extends StandardSchema> = NonNullable<Value$1['~standard']['types']>['input'];
|
|
38
|
+
type InferOutput<Value$1 extends StandardSchema> = NonNullable<Value$1['~standard']['types']>['output'];
|
|
39
|
+
declare class SchemaError extends Error {
|
|
40
|
+
readonly issues: ReadonlyArray<SchemaIssue>;
|
|
41
|
+
constructor(issues: ReadonlyArray<SchemaIssue>);
|
|
42
|
+
}
|
|
43
|
+
interface BleamSchema<Input, Output> extends StandardSchema<Input, Output> {
|
|
44
|
+
parse(value: unknown): Output;
|
|
45
|
+
safeParse(value: unknown): SchemaResult<Output>;
|
|
46
|
+
toJSONSchema(): SchemaJSONSchema;
|
|
47
|
+
transform<NextOutput>(transform: (value: Output) => NextOutput): BleamSchema<Input, NextOutput>;
|
|
48
|
+
}
|
|
49
|
+
type SchemaJSONSchema = {
|
|
50
|
+
type: 'object';
|
|
51
|
+
properties: Record<string, {
|
|
52
|
+
type: FieldToken;
|
|
53
|
+
}>;
|
|
54
|
+
required: string[];
|
|
55
|
+
};
|
|
56
|
+
declare function schema<Shape extends SchemaShape>(shape: Shape): BleamSchema<SchemaInput<Shape>, SchemaOutput<Shape>>;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { FieldValue as a, SchemaError as c, SchemaJSONSchema as d, SchemaOutput as f, schema as g, StandardSchema as h, FieldToken as i, SchemaInput as l, SchemaShape as m, FieldDefault as n, InferInput as o, SchemaResult as p, FieldSchema as r, InferOutput as s, BleamSchema as t, SchemaIssue as u };
|
package/dist/schema.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as FieldValue, c as SchemaError, d as SchemaJSONSchema, f as SchemaOutput, g as schema, h as StandardSchema, i as FieldToken, l as SchemaInput, m as SchemaShape, n as FieldDefault, o as InferInput, p as SchemaResult, r as FieldSchema, s as InferOutput, t as BleamSchema, u as SchemaIssue } from "./schema-BOuUHcqo.cjs";
|
|
2
|
+
export { BleamSchema, FieldDefault, FieldSchema, FieldToken, FieldValue, InferInput, InferOutput, SchemaError, SchemaInput, SchemaIssue, SchemaJSONSchema, SchemaOutput, SchemaResult, SchemaShape, StandardSchema, schema };
|
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as FieldValue, c as SchemaError, d as SchemaJSONSchema, f as SchemaOutput, g as schema, h as StandardSchema, i as FieldToken, l as SchemaInput, m as SchemaShape, n as FieldDefault, o as InferInput, p as SchemaResult, r as FieldSchema, s as InferOutput, t as BleamSchema, u as SchemaIssue } from "./schema-ipsECAso.js";
|
|
2
|
+
export { BleamSchema, FieldDefault, FieldSchema, FieldToken, FieldValue, InferInput, InferOutput, SchemaError, SchemaInput, SchemaIssue, SchemaJSONSchema, SchemaOutput, SchemaResult, SchemaShape, StandardSchema, schema };
|
package/dist/schema.js
ADDED