@dryvcode/author 0.0.1
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/README.md +341 -0
- package/dist/behavior/duration.d.ts +7 -0
- package/dist/behavior/duration.d.ts.map +1 -0
- package/dist/behavior/duration.js +20 -0
- package/dist/behavior/duration.js.map +1 -0
- package/dist/behavior/event.d.ts +23 -0
- package/dist/behavior/event.d.ts.map +1 -0
- package/dist/behavior/event.js +57 -0
- package/dist/behavior/event.js.map +1 -0
- package/dist/behavior/failure.d.ts +19 -0
- package/dist/behavior/failure.d.ts.map +1 -0
- package/dist/behavior/failure.js +48 -0
- package/dist/behavior/failure.js.map +1 -0
- package/dist/behavior/index.d.ts +6 -0
- package/dist/behavior/index.d.ts.map +1 -0
- package/dist/behavior/index.js +6 -0
- package/dist/behavior/index.js.map +1 -0
- package/dist/behavior/operation.d.ts +72 -0
- package/dist/behavior/operation.d.ts.map +1 -0
- package/dist/behavior/operation.js +193 -0
- package/dist/behavior/operation.js.map +1 -0
- package/dist/behavior/policy.d.ts +29 -0
- package/dist/behavior/policy.d.ts.map +1 -0
- package/dist/behavior/policy.js +80 -0
- package/dist/behavior/policy.js.map +1 -0
- package/dist/composition/application.d.ts +28 -0
- package/dist/composition/application.d.ts.map +1 -0
- package/dist/composition/application.js +64 -0
- package/dist/composition/application.js.map +1 -0
- package/dist/composition/feature.d.ts +37 -0
- package/dist/composition/feature.d.ts.map +1 -0
- package/dist/composition/feature.js +82 -0
- package/dist/composition/feature.js.map +1 -0
- package/dist/composition/index.d.ts +3 -0
- package/dist/composition/index.d.ts.map +1 -0
- package/dist/composition/index.js +3 -0
- package/dist/composition/index.js.map +1 -0
- package/dist/contracts/behavior.d.ts +106 -0
- package/dist/contracts/behavior.d.ts.map +1 -0
- package/dist/contracts/behavior.js +2 -0
- package/dist/contracts/behavior.js.map +1 -0
- package/dist/contracts/composition.d.ts +20 -0
- package/dist/contracts/composition.d.ts.map +1 -0
- package/dist/contracts/composition.js +2 -0
- package/dist/contracts/composition.js.map +1 -0
- package/dist/contracts/definitions.d.ts +286 -0
- package/dist/contracts/definitions.d.ts.map +1 -0
- package/dist/contracts/definitions.js +35 -0
- package/dist/contracts/definitions.js.map +1 -0
- package/dist/contracts/expressions.d.ts +44 -0
- package/dist/contracts/expressions.d.ts.map +1 -0
- package/dist/contracts/expressions.js +2 -0
- package/dist/contracts/expressions.js.map +1 -0
- package/dist/contracts/foundation.d.ts +141 -0
- package/dist/contracts/foundation.d.ts.map +1 -0
- package/dist/contracts/foundation.js +2 -0
- package/dist/contracts/foundation.js.map +1 -0
- package/dist/contracts/index.d.ts +10 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +10 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/interaction.d.ts +52 -0
- package/dist/contracts/interaction.d.ts.map +1 -0
- package/dist/contracts/interaction.js +2 -0
- package/dist/contracts/interaction.js.map +1 -0
- package/dist/contracts/interfaces.d.ts +73 -0
- package/dist/contracts/interfaces.d.ts.map +1 -0
- package/dist/contracts/interfaces.js +2 -0
- package/dist/contracts/interfaces.js.map +1 -0
- package/dist/contracts/orchestration.d.ts +56 -0
- package/dist/contracts/orchestration.d.ts.map +1 -0
- package/dist/contracts/orchestration.js +2 -0
- package/dist/contracts/orchestration.js.map +1 -0
- package/dist/contracts/project.d.ts +70 -0
- package/dist/contracts/project.d.ts.map +1 -0
- package/dist/contracts/project.js +2 -0
- package/dist/contracts/project.js.map +1 -0
- package/dist/data/index.d.ts +2 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/storage.d.ts +23 -0
- package/dist/data/storage.d.ts.map +1 -0
- package/dist/data/storage.js +93 -0
- package/dist/data/storage.js.map +1 -0
- package/dist/definitions/expressions/expression.d.ts +49 -0
- package/dist/definitions/expressions/expression.d.ts.map +1 -0
- package/dist/definitions/expressions/expression.js +181 -0
- package/dist/definitions/expressions/expression.js.map +1 -0
- package/dist/definitions/expressions/index.d.ts +2 -0
- package/dist/definitions/expressions/index.d.ts.map +1 -0
- package/dist/definitions/expressions/index.js +2 -0
- package/dist/definitions/expressions/index.js.map +1 -0
- package/dist/definitions/index.d.ts +7 -0
- package/dist/definitions/index.d.ts.map +1 -0
- package/dist/definitions/index.js +7 -0
- package/dist/definitions/index.js.map +1 -0
- package/dist/definitions/properties/advanced.d.ts +27 -0
- package/dist/definitions/properties/advanced.d.ts.map +1 -0
- package/dist/definitions/properties/advanced.js +95 -0
- package/dist/definitions/properties/advanced.js.map +1 -0
- package/dist/definitions/properties/base.d.ts +29 -0
- package/dist/definitions/properties/base.d.ts.map +1 -0
- package/dist/definitions/properties/base.js +60 -0
- package/dist/definitions/properties/base.js.map +1 -0
- package/dist/definitions/properties/composite.d.ts +14 -0
- package/dist/definitions/properties/composite.d.ts.map +1 -0
- package/dist/definitions/properties/composite.js +41 -0
- package/dist/definitions/properties/composite.js.map +1 -0
- package/dist/definitions/properties/enumeration.d.ts +17 -0
- package/dist/definitions/properties/enumeration.d.ts.map +1 -0
- package/dist/definitions/properties/enumeration.js +48 -0
- package/dist/definitions/properties/enumeration.js.map +1 -0
- package/dist/definitions/properties/generic.d.ts +22 -0
- package/dist/definitions/properties/generic.d.ts.map +1 -0
- package/dist/definitions/properties/generic.js +61 -0
- package/dist/definitions/properties/generic.js.map +1 -0
- package/dist/definitions/properties/index.d.ts +12 -0
- package/dist/definitions/properties/index.d.ts.map +1 -0
- package/dist/definitions/properties/index.js +3 -0
- package/dist/definitions/properties/index.js.map +1 -0
- package/dist/definitions/properties/metadata.d.ts +6 -0
- package/dist/definitions/properties/metadata.d.ts.map +1 -0
- package/dist/definitions/properties/metadata.js +4 -0
- package/dist/definitions/properties/metadata.js.map +1 -0
- package/dist/definitions/properties/primitive.d.ts +66 -0
- package/dist/definitions/properties/primitive.d.ts.map +1 -0
- package/dist/definitions/properties/primitive.js +266 -0
- package/dist/definitions/properties/primitive.js.map +1 -0
- package/dist/definitions/properties/property.d.ts +171 -0
- package/dist/definitions/properties/property.d.ts.map +1 -0
- package/dist/definitions/properties/property.js +211 -0
- package/dist/definitions/properties/property.js.map +1 -0
- package/dist/definitions/properties/temporal.d.ts +37 -0
- package/dist/definitions/properties/temporal.d.ts.map +1 -0
- package/dist/definitions/properties/temporal.js +115 -0
- package/dist/definitions/properties/temporal.js.map +1 -0
- package/dist/definitions/schemas/field.d.ts +123 -0
- package/dist/definitions/schemas/field.d.ts.map +1 -0
- package/dist/definitions/schemas/field.js +329 -0
- package/dist/definitions/schemas/field.js.map +1 -0
- package/dist/definitions/schemas/index.d.ts +6 -0
- package/dist/definitions/schemas/index.d.ts.map +1 -0
- package/dist/definitions/schemas/index.js +6 -0
- package/dist/definitions/schemas/index.js.map +1 -0
- package/dist/definitions/schemas/projection.d.ts +90 -0
- package/dist/definitions/schemas/projection.d.ts.map +1 -0
- package/dist/definitions/schemas/projection.js +146 -0
- package/dist/definitions/schemas/projection.js.map +1 -0
- package/dist/definitions/schemas/relation.d.ts +12 -0
- package/dist/definitions/schemas/relation.d.ts.map +1 -0
- package/dist/definitions/schemas/relation.js +27 -0
- package/dist/definitions/schemas/relation.js.map +1 -0
- package/dist/definitions/schemas/schema.d.ts +46 -0
- package/dist/definitions/schemas/schema.d.ts.map +1 -0
- package/dist/definitions/schemas/schema.js +134 -0
- package/dist/definitions/schemas/schema.js.map +1 -0
- package/dist/definitions/schemas/source.d.ts +30 -0
- package/dist/definitions/schemas/source.d.ts.map +1 -0
- package/dist/definitions/schemas/source.js +73 -0
- package/dist/definitions/schemas/source.js.map +1 -0
- package/dist/definitions/types/expressions.d.ts +28 -0
- package/dist/definitions/types/expressions.d.ts.map +1 -0
- package/dist/definitions/types/expressions.js +81 -0
- package/dist/definitions/types/expressions.js.map +1 -0
- package/dist/definitions/types/index.d.ts +4 -0
- package/dist/definitions/types/index.d.ts.map +1 -0
- package/dist/definitions/types/index.js +4 -0
- package/dist/definitions/types/index.js.map +1 -0
- package/dist/definitions/types/parameter.d.ts +9 -0
- package/dist/definitions/types/parameter.d.ts.map +1 -0
- package/dist/definitions/types/parameter.js +24 -0
- package/dist/definitions/types/parameter.js.map +1 -0
- package/dist/definitions/types/spec.d.ts +26 -0
- package/dist/definitions/types/spec.d.ts.map +1 -0
- package/dist/definitions/types/spec.js +74 -0
- package/dist/definitions/types/spec.js.map +1 -0
- package/dist/foundation/declaration.d.ts +24 -0
- package/dist/foundation/declaration.d.ts.map +1 -0
- package/dist/foundation/declaration.js +43 -0
- package/dist/foundation/declaration.js.map +1 -0
- package/dist/foundation/group.d.ts +55 -0
- package/dist/foundation/group.d.ts.map +1 -0
- package/dist/foundation/group.js +199 -0
- package/dist/foundation/group.js.map +1 -0
- package/dist/foundation/index.d.ts +7 -0
- package/dist/foundation/index.d.ts.map +1 -0
- package/dist/foundation/index.js +7 -0
- package/dist/foundation/index.js.map +1 -0
- package/dist/foundation/metadata.d.ts +22 -0
- package/dist/foundation/metadata.d.ts.map +1 -0
- package/dist/foundation/metadata.js +43 -0
- package/dist/foundation/metadata.js.map +1 -0
- package/dist/foundation/ref.d.ts +200 -0
- package/dist/foundation/ref.d.ts.map +1 -0
- package/dist/foundation/ref.js +230 -0
- package/dist/foundation/ref.js.map +1 -0
- package/dist/foundation/scope.d.ts +13 -0
- package/dist/foundation/scope.d.ts.map +1 -0
- package/dist/foundation/scope.js +63 -0
- package/dist/foundation/scope.js.map +1 -0
- package/dist/foundation/value-declaration.d.ts +9 -0
- package/dist/foundation/value-declaration.d.ts.map +1 -0
- package/dist/foundation/value-declaration.js +2 -0
- package/dist/foundation/value-declaration.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/index.d.ts +3 -0
- package/dist/interaction/index.d.ts.map +1 -0
- package/dist/interaction/index.js +3 -0
- package/dist/interaction/index.js.map +1 -0
- package/dist/interaction/part.d.ts +58 -0
- package/dist/interaction/part.d.ts.map +1 -0
- package/dist/interaction/part.js +178 -0
- package/dist/interaction/part.js.map +1 -0
- package/dist/interaction/view.d.ts +34 -0
- package/dist/interaction/view.d.ts.map +1 -0
- package/dist/interaction/view.js +109 -0
- package/dist/interaction/view.js.map +1 -0
- package/dist/interfaces/facet.d.ts +6 -0
- package/dist/interfaces/facet.d.ts.map +1 -0
- package/dist/interfaces/facet.js +2 -0
- package/dist/interfaces/facet.js.map +1 -0
- package/dist/interfaces/http.d.ts +39 -0
- package/dist/interfaces/http.d.ts.map +1 -0
- package/dist/interfaces/http.js +109 -0
- package/dist/interfaces/http.js.map +1 -0
- package/dist/interfaces/index.d.ts +7 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +7 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/representation.d.ts +14 -0
- package/dist/interfaces/representation.d.ts.map +1 -0
- package/dist/interfaces/representation.js +25 -0
- package/dist/interfaces/representation.js.map +1 -0
- package/dist/interfaces/schedule.d.ts +14 -0
- package/dist/interfaces/schedule.d.ts.map +1 -0
- package/dist/interfaces/schedule.js +46 -0
- package/dist/interfaces/schedule.js.map +1 -0
- package/dist/interfaces/surface.d.ts +22 -0
- package/dist/interfaces/surface.d.ts.map +1 -0
- package/dist/interfaces/surface.js +44 -0
- package/dist/interfaces/surface.js.map +1 -0
- package/dist/interfaces/websocket.d.ts +11 -0
- package/dist/interfaces/websocket.d.ts.map +1 -0
- package/dist/interfaces/websocket.js +25 -0
- package/dist/interfaces/websocket.js.map +1 -0
- package/dist/orchestration/index.d.ts +4 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +4 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/steps.d.ts +41 -0
- package/dist/orchestration/steps.d.ts.map +1 -0
- package/dist/orchestration/steps.js +105 -0
- package/dist/orchestration/steps.js.map +1 -0
- package/dist/orchestration/value-source.d.ts +8 -0
- package/dist/orchestration/value-source.d.ts.map +1 -0
- package/dist/orchestration/value-source.js +10 -0
- package/dist/orchestration/value-source.js.map +1 -0
- package/dist/orchestration/workflow.d.ts +38 -0
- package/dist/orchestration/workflow.d.ts.map +1 -0
- package/dist/orchestration/workflow.js +116 -0
- package/dist/orchestration/workflow.js.map +1 -0
- package/dist/project/index.d.ts +2 -0
- package/dist/project/index.d.ts.map +1 -0
- package/dist/project/index.js +2 -0
- package/dist/project/index.js.map +1 -0
- package/dist/project/project.d.ts +27 -0
- package/dist/project/project.d.ts.map +1 -0
- package/dist/project/project.js +161 -0
- package/dist/project/project.js.map +1 -0
- package/dist/project/registry.d.ts +33 -0
- package/dist/project/registry.d.ts.map +1 -0
- package/dist/project/registry.js +58 -0
- package/dist/project/registry.js.map +1 -0
- package/dist/project/snapshot.d.ts +4 -0
- package/dist/project/snapshot.d.ts.map +1 -0
- package/dist/project/snapshot.js +15 -0
- package/dist/project/snapshot.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { CanonicalScalar, EnumMemberState, NumberKindState, PropertyDeclarationKind, QueryDomain, StringFormatState } from "../../contracts/index.js";
|
|
2
|
+
import type { InferRefFields, PropertyRef, RefFieldMap, SchemaRef } from "../../foundation/ref.js";
|
|
3
|
+
import type { ValueDeclaration } from "../../foundation/value-declaration.js";
|
|
4
|
+
import type { SchemaFieldMap } from "../schemas/field.js";
|
|
5
|
+
import { TypeParameter } from "../types/parameter.js";
|
|
6
|
+
import { LiteralPropertyDeclaration, RecordPropertyDeclaration, TuplePropertyDeclaration, UnionPropertyDeclaration } from "./advanced.js";
|
|
7
|
+
import { CompositePropertyDeclaration } from "./composite.js";
|
|
8
|
+
import { EnumPropertyDeclaration } from "./enumeration.js";
|
|
9
|
+
import { GenericApplicationPropertyDeclaration, GenericDefinitionPropertyDeclaration } from "./generic.js";
|
|
10
|
+
import { BooleanPropertyDeclaration, NumberPropertyDeclaration, StringPropertyDeclaration, type NumberPropertyOptions, type RangeConstraintInput } from "./primitive.js";
|
|
11
|
+
import { TemporalPropertyDeclaration, type TemporalPropertyOptions } from "./temporal.js";
|
|
12
|
+
export type PropertyInput<T = unknown> = PropertyRef<PropertyDeclarationKind, T, QueryDomain> | SchemaRef<RefFieldMap> | TypeParameter;
|
|
13
|
+
export type InferPropertyInput<T> = T extends PropertyRef<PropertyDeclarationKind, infer V, QueryDomain> ? V : T extends SchemaRef<infer F> ? InferRefFields<F> : unknown;
|
|
14
|
+
type EnumInput = string | number | boolean | EnumMemberState;
|
|
15
|
+
type EnumValue<T extends Readonly<Record<string, EnumInput>>> = T[keyof T] extends EnumMemberState ? T[keyof T]["value"] : Extract<T[keyof T], string | number | boolean>;
|
|
16
|
+
type UnionMemberInput = Readonly<Record<string, PropertyInput>>;
|
|
17
|
+
type IntegerOptions = Omit<NumberPropertyOptions, "precision" | "scale">;
|
|
18
|
+
type FloatOptions = Omit<NumberPropertyOptions, "bits" | "unsigned" | "precision" | "scale">;
|
|
19
|
+
export interface UnionPropertyInput<T extends UnionMemberInput> {
|
|
20
|
+
readonly discriminant: string;
|
|
21
|
+
readonly members: T;
|
|
22
|
+
}
|
|
23
|
+
export interface DecimalPropertyOptions extends Omit<NumberPropertyOptions, "precision" | "scale"> {
|
|
24
|
+
readonly precision: number;
|
|
25
|
+
readonly scale: number;
|
|
26
|
+
}
|
|
27
|
+
export interface NumberFormatOptions extends NumberPropertyOptions {
|
|
28
|
+
readonly kind?: NumberKindState;
|
|
29
|
+
}
|
|
30
|
+
/** Money in minor units (cents) is an integer amount. */
|
|
31
|
+
interface MinorUnitMoneyOptions {
|
|
32
|
+
readonly minorUnits: true;
|
|
33
|
+
readonly currency?: string;
|
|
34
|
+
readonly range?: RangeConstraintInput;
|
|
35
|
+
readonly multipleOf?: number;
|
|
36
|
+
}
|
|
37
|
+
interface MoneyOptions {
|
|
38
|
+
readonly precision: number;
|
|
39
|
+
readonly scale: number;
|
|
40
|
+
readonly currency?: string;
|
|
41
|
+
readonly range?: RangeConstraintInput;
|
|
42
|
+
readonly multipleOf?: number;
|
|
43
|
+
}
|
|
44
|
+
interface BoundedHelperOptions {
|
|
45
|
+
readonly min?: number;
|
|
46
|
+
readonly max?: number;
|
|
47
|
+
}
|
|
48
|
+
declare function integer(options?: IntegerOptions): NumberPropertyDeclaration;
|
|
49
|
+
declare function decimal(options: DecimalPropertyOptions): NumberPropertyDeclaration;
|
|
50
|
+
declare function float(options?: FloatOptions): NumberPropertyDeclaration;
|
|
51
|
+
declare function double(options?: FloatOptions): NumberPropertyDeclaration;
|
|
52
|
+
declare function formattedNumber(format: string, options?: NumberFormatOptions): NumberPropertyDeclaration;
|
|
53
|
+
declare function intervalProperty(point: PropertyRef<"temporal", unknown, "temporal">, options?: TemporalPropertyOptions): TemporalPropertyDeclaration<{
|
|
54
|
+
readonly start: string;
|
|
55
|
+
readonly end: string;
|
|
56
|
+
}>;
|
|
57
|
+
declare function literalProperty<const T extends CanonicalScalar | null>(value: T): LiteralPropertyDeclaration<T>;
|
|
58
|
+
declare function enumProperty<const T extends Readonly<Record<string, EnumInput>>>(values: T): EnumPropertyDeclaration<EnumValue<T>>;
|
|
59
|
+
declare function compositeProperty<const T extends SchemaFieldMap>(fields: T): CompositePropertyDeclaration<T>;
|
|
60
|
+
declare function unionProperty<const T extends UnionMemberInput>(value: UnionPropertyInput<T>): UnionPropertyDeclaration<InferPropertyInput<T[keyof T]>>;
|
|
61
|
+
declare function recordProperty<V>(keys: PropertyRef<"primitive", string | number, QueryDomain>, values: PropertyInput<V>): RecordPropertyDeclaration<V>;
|
|
62
|
+
declare function tupleProperty<const T extends readonly [PropertyInput, ...PropertyInput[]]>(...items: T): TuplePropertyDeclaration<{
|
|
63
|
+
readonly [K in keyof T]: InferPropertyInput<T[K]>;
|
|
64
|
+
}>;
|
|
65
|
+
declare function defineGenericProperty<T>(factory: (...parameters: TypeParameter[]) => ValueDeclaration<T, QueryDomain>): GenericDefinitionPropertyDeclaration<T>;
|
|
66
|
+
declare function applyGenericProperty(target: PropertyRef<"generic", unknown, "complex">, arguments_: readonly PropertyInput[]): GenericApplicationPropertyDeclaration<unknown>;
|
|
67
|
+
export declare const property: Readonly<{
|
|
68
|
+
string: (() => StringPropertyDeclaration) & {
|
|
69
|
+
text: () => StringPropertyDeclaration;
|
|
70
|
+
format: (format: StringFormatState) => StringPropertyDeclaration;
|
|
71
|
+
email: () => StringPropertyDeclaration;
|
|
72
|
+
url: () => StringPropertyDeclaration;
|
|
73
|
+
uri: () => StringPropertyDeclaration;
|
|
74
|
+
slug: () => StringPropertyDeclaration;
|
|
75
|
+
hostname: () => StringPropertyDeclaration;
|
|
76
|
+
ipv4: () => StringPropertyDeclaration;
|
|
77
|
+
ipv6: () => StringPropertyDeclaration;
|
|
78
|
+
uuid: () => StringPropertyDeclaration;
|
|
79
|
+
ulid: () => StringPropertyDeclaration;
|
|
80
|
+
base64: () => StringPropertyDeclaration;
|
|
81
|
+
hex: () => StringPropertyDeclaration;
|
|
82
|
+
jwt: () => StringPropertyDeclaration;
|
|
83
|
+
html: () => StringPropertyDeclaration;
|
|
84
|
+
markdown: () => StringPropertyDeclaration;
|
|
85
|
+
md: () => StringPropertyDeclaration;
|
|
86
|
+
json: () => StringPropertyDeclaration;
|
|
87
|
+
yaml: () => StringPropertyDeclaration;
|
|
88
|
+
xml: () => StringPropertyDeclaration;
|
|
89
|
+
csv: () => StringPropertyDeclaration;
|
|
90
|
+
phone: () => StringPropertyDeclaration;
|
|
91
|
+
e164: () => StringPropertyDeclaration;
|
|
92
|
+
semver: () => StringPropertyDeclaration;
|
|
93
|
+
mimeType: () => StringPropertyDeclaration;
|
|
94
|
+
locale: () => StringPropertyDeclaration;
|
|
95
|
+
languageTag: () => StringPropertyDeclaration;
|
|
96
|
+
countryCode: () => StringPropertyDeclaration;
|
|
97
|
+
currencyCode: () => StringPropertyDeclaration;
|
|
98
|
+
path: () => StringPropertyDeclaration;
|
|
99
|
+
filePath: () => StringPropertyDeclaration;
|
|
100
|
+
fileName: () => StringPropertyDeclaration;
|
|
101
|
+
regex: () => StringPropertyDeclaration;
|
|
102
|
+
hexColor: () => StringPropertyDeclaration;
|
|
103
|
+
};
|
|
104
|
+
number: (() => NumberPropertyDeclaration) & {
|
|
105
|
+
format: typeof formattedNumber;
|
|
106
|
+
integer: typeof integer;
|
|
107
|
+
decimal: typeof decimal;
|
|
108
|
+
float: typeof float;
|
|
109
|
+
double: typeof double;
|
|
110
|
+
int8: () => NumberPropertyDeclaration;
|
|
111
|
+
int16: () => NumberPropertyDeclaration;
|
|
112
|
+
int32: () => NumberPropertyDeclaration;
|
|
113
|
+
int64: () => NumberPropertyDeclaration;
|
|
114
|
+
uint8: () => NumberPropertyDeclaration;
|
|
115
|
+
uint16: () => NumberPropertyDeclaration;
|
|
116
|
+
uint32: () => NumberPropertyDeclaration;
|
|
117
|
+
uint64: () => NumberPropertyDeclaration;
|
|
118
|
+
float32: () => NumberPropertyDeclaration;
|
|
119
|
+
float64: () => NumberPropertyDeclaration;
|
|
120
|
+
positive: () => NumberPropertyDeclaration;
|
|
121
|
+
nonNegative: () => NumberPropertyDeclaration;
|
|
122
|
+
negative: () => NumberPropertyDeclaration;
|
|
123
|
+
nonPositive: () => NumberPropertyDeclaration;
|
|
124
|
+
positiveInteger: () => NumberPropertyDeclaration;
|
|
125
|
+
nonNegativeInteger: () => NumberPropertyDeclaration;
|
|
126
|
+
negativeInteger: () => NumberPropertyDeclaration;
|
|
127
|
+
nonPositiveInteger: () => NumberPropertyDeclaration;
|
|
128
|
+
percentage: () => NumberPropertyDeclaration;
|
|
129
|
+
probability: () => NumberPropertyDeclaration;
|
|
130
|
+
ratio: () => NumberPropertyDeclaration;
|
|
131
|
+
latitude: () => NumberPropertyDeclaration;
|
|
132
|
+
longitude: () => NumberPropertyDeclaration;
|
|
133
|
+
port: () => NumberPropertyDeclaration;
|
|
134
|
+
httpStatus: () => NumberPropertyDeclaration;
|
|
135
|
+
counter: () => NumberPropertyDeclaration;
|
|
136
|
+
quantity: () => NumberPropertyDeclaration;
|
|
137
|
+
money: (options: MoneyOptions | MinorUnitMoneyOptions) => NumberPropertyDeclaration;
|
|
138
|
+
rating: (options?: BoundedHelperOptions) => NumberPropertyDeclaration;
|
|
139
|
+
score: (options?: BoundedHelperOptions) => NumberPropertyDeclaration;
|
|
140
|
+
year: () => NumberPropertyDeclaration;
|
|
141
|
+
month: () => NumberPropertyDeclaration;
|
|
142
|
+
day: () => NumberPropertyDeclaration;
|
|
143
|
+
hour: () => NumberPropertyDeclaration;
|
|
144
|
+
minute: () => NumberPropertyDeclaration;
|
|
145
|
+
second: () => NumberPropertyDeclaration;
|
|
146
|
+
};
|
|
147
|
+
boolean: () => BooleanPropertyDeclaration;
|
|
148
|
+
temporal: Readonly<{
|
|
149
|
+
date: (options?: TemporalPropertyOptions) => TemporalPropertyDeclaration<string>;
|
|
150
|
+
time: (options?: TemporalPropertyOptions) => TemporalPropertyDeclaration<string>;
|
|
151
|
+
datetime: (options?: TemporalPropertyOptions) => TemporalPropertyDeclaration<string>;
|
|
152
|
+
instant: (options?: TemporalPropertyOptions) => TemporalPropertyDeclaration<string>;
|
|
153
|
+
zonedDatetime: (options?: TemporalPropertyOptions) => TemporalPropertyDeclaration<string>;
|
|
154
|
+
duration: (options?: TemporalPropertyOptions) => TemporalPropertyDeclaration<string>;
|
|
155
|
+
interval: typeof intervalProperty;
|
|
156
|
+
yearMonth: (options?: TemporalPropertyOptions) => TemporalPropertyDeclaration<string>;
|
|
157
|
+
monthDay: (options?: TemporalPropertyOptions) => TemporalPropertyDeclaration<string>;
|
|
158
|
+
}>;
|
|
159
|
+
literal: typeof literalProperty;
|
|
160
|
+
enum: typeof enumProperty;
|
|
161
|
+
composite: typeof compositeProperty;
|
|
162
|
+
union: typeof unionProperty;
|
|
163
|
+
record: typeof recordProperty;
|
|
164
|
+
tuple: typeof tupleProperty;
|
|
165
|
+
generic: Readonly<{
|
|
166
|
+
define: typeof defineGenericProperty;
|
|
167
|
+
apply: typeof applyGenericProperty;
|
|
168
|
+
}>;
|
|
169
|
+
}>;
|
|
170
|
+
export {};
|
|
171
|
+
//# sourceMappingURL=property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../../src/definitions/properties/property.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,WAAW,EACX,iBAAiB,EAGlB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,WAAW,EACX,SAAS,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,4BAA4B,EAE7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,uBAAuB,EAExB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,qCAAqC,EACrC,oCAAoC,EACrC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EAKzB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,2BAA2B,EAE3B,KAAK,uBAAuB,EAC7B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IACjC,WAAW,CAAC,uBAAuB,EAAE,CA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BAAyB;qBAE/B,yBAAyB;wBACtB,yBAAyB;yBAExB,yBAAyB;oBAE9B,yBAAyB;0BAEnB,yBAAyB;uBAE5B,yBAAyB;wBAExB,yBAAyB;yBAG5B,YAAY,GAAG,qBAAqB,KAC5C,yBAAyB;2BAIV,oBAAoB,KAAQ,yBAAyB;0BAKtD,oBAAoB,KAAQ,yBAAyB;oBAK5D,yBAAyB;qBAExB,yBAAyB;mBAE3B,yBAAyB;oBAExB,yBAAyB;sBAEvB,yBAAyB;sBAEzB,yBAAyB;;mBAgI1B,0BAA0B;;yBAzGvB,uBAAuB;yBAEvB,uBAAuB;6BAEnB,uBAAuB;4BAExB,uBAAuB;kCAEjB,uBAAuB;6BAE5B,uBAAuB;;8BAGtB,uBAAuB;6BAExB,uBAAuB;;;;;;;;;;;;EAmG3C,CAAC"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { TypeParameter } from "../types/parameter.js";
|
|
2
|
+
import { LiteralPropertyDeclaration, RecordPropertyDeclaration, TuplePropertyDeclaration, UnionPropertyDeclaration, } from "./advanced.js";
|
|
3
|
+
import { CompositePropertyDeclaration, composite, } from "./composite.js";
|
|
4
|
+
import { EnumPropertyDeclaration, enumeration, } from "./enumeration.js";
|
|
5
|
+
import { GenericApplicationPropertyDeclaration, GenericDefinitionPropertyDeclaration, } from "./generic.js";
|
|
6
|
+
import { BooleanPropertyDeclaration, NumberPropertyDeclaration, StringPropertyDeclaration, booleanProperty, formattedStringProperty, numberProperty, textProperty, } from "./primitive.js";
|
|
7
|
+
import { TemporalPropertyDeclaration, temporalProperty, } from "./temporal.js";
|
|
8
|
+
function inputExpression(value) {
|
|
9
|
+
if (!("ref" in value)) {
|
|
10
|
+
return { kind: "parameter", parameter: value.toState() };
|
|
11
|
+
}
|
|
12
|
+
return { kind: "reference", target: value.ref() };
|
|
13
|
+
}
|
|
14
|
+
function bodyExpression(value) {
|
|
15
|
+
if (!("ref" in value)) {
|
|
16
|
+
return { kind: "parameter", parameter: value.toState() };
|
|
17
|
+
}
|
|
18
|
+
if ("toInlineTypeState" in value &&
|
|
19
|
+
typeof value.toInlineTypeState === "function") {
|
|
20
|
+
const composite = value;
|
|
21
|
+
return composite.toInlineTypeState();
|
|
22
|
+
}
|
|
23
|
+
if ("expressionState" in value &&
|
|
24
|
+
typeof value.expressionState === "function") {
|
|
25
|
+
const advanced = value;
|
|
26
|
+
return advanced.expressionState();
|
|
27
|
+
}
|
|
28
|
+
return { kind: "reference", target: value.ref() };
|
|
29
|
+
}
|
|
30
|
+
function genericParameterName(index) {
|
|
31
|
+
const names = ["T", "X", "Y", "Z", "A", "B", "C", "D"];
|
|
32
|
+
return names[index] ?? `P${index + 1}`;
|
|
33
|
+
}
|
|
34
|
+
function formatted(format) {
|
|
35
|
+
return formattedStringProperty(format);
|
|
36
|
+
}
|
|
37
|
+
const stringProperty = Object.assign(() => textProperty(), {
|
|
38
|
+
text: () => textProperty(),
|
|
39
|
+
format: (format) => formatted(format),
|
|
40
|
+
email: () => formatted("email"),
|
|
41
|
+
url: () => formatted("url"),
|
|
42
|
+
uri: () => formatted("uri"),
|
|
43
|
+
slug: () => formatted("slug"),
|
|
44
|
+
hostname: () => formatted("hostname"),
|
|
45
|
+
ipv4: () => formatted("ipv4"),
|
|
46
|
+
ipv6: () => formatted("ipv6"),
|
|
47
|
+
uuid: () => formatted("uuid"),
|
|
48
|
+
ulid: () => formatted("ulid"),
|
|
49
|
+
base64: () => formatted("base64"),
|
|
50
|
+
hex: () => formatted("hex"),
|
|
51
|
+
jwt: () => formatted("jwt"),
|
|
52
|
+
html: () => formatted("html"),
|
|
53
|
+
markdown: () => formatted("markdown"),
|
|
54
|
+
md: () => formatted("markdown"),
|
|
55
|
+
json: () => formatted("json"),
|
|
56
|
+
yaml: () => formatted("yaml"),
|
|
57
|
+
xml: () => formatted("xml"),
|
|
58
|
+
csv: () => formatted("csv"),
|
|
59
|
+
phone: () => formatted("phone"),
|
|
60
|
+
e164: () => formatted("e164"),
|
|
61
|
+
semver: () => formatted("semver"),
|
|
62
|
+
mimeType: () => formatted("mime-type"),
|
|
63
|
+
locale: () => formatted("locale"),
|
|
64
|
+
languageTag: () => formatted("language-tag"),
|
|
65
|
+
countryCode: () => formatted("country-code"),
|
|
66
|
+
currencyCode: () => formatted("currency-code"),
|
|
67
|
+
path: () => formatted("path"),
|
|
68
|
+
filePath: () => formatted("file-path"),
|
|
69
|
+
fileName: () => formatted("file-name"),
|
|
70
|
+
regex: () => formatted("regex"),
|
|
71
|
+
hexColor: () => formatted("hex-color"),
|
|
72
|
+
});
|
|
73
|
+
function integer(options = {}) {
|
|
74
|
+
return numberProperty("integer", options);
|
|
75
|
+
}
|
|
76
|
+
function decimal(options) {
|
|
77
|
+
return numberProperty("decimal", options);
|
|
78
|
+
}
|
|
79
|
+
function float(options = {}) {
|
|
80
|
+
return numberProperty("float", options);
|
|
81
|
+
}
|
|
82
|
+
function double(options = {}) {
|
|
83
|
+
return numberProperty("double", options);
|
|
84
|
+
}
|
|
85
|
+
function formattedNumber(format, options = {}) {
|
|
86
|
+
const { kind = "number", ...rest } = options;
|
|
87
|
+
return numberProperty(kind, { ...rest, format });
|
|
88
|
+
}
|
|
89
|
+
function boundedNumber(format, range, kind = "number") {
|
|
90
|
+
return formattedNumber(format, { kind, range });
|
|
91
|
+
}
|
|
92
|
+
const numberApi = Object.assign(() => numberProperty("number"), {
|
|
93
|
+
format: formattedNumber,
|
|
94
|
+
integer,
|
|
95
|
+
decimal,
|
|
96
|
+
float,
|
|
97
|
+
double,
|
|
98
|
+
int8: () => integer({ format: "int8", bits: 8, unsigned: false }),
|
|
99
|
+
int16: () => integer({ format: "int16", bits: 16, unsigned: false }),
|
|
100
|
+
int32: () => integer({ format: "int32", bits: 32, unsigned: false }),
|
|
101
|
+
int64: () => integer({ format: "int64", bits: 64, unsigned: false }),
|
|
102
|
+
uint8: () => integer({ format: "uint8", bits: 8, unsigned: true }),
|
|
103
|
+
uint16: () => integer({ format: "uint16", bits: 16, unsigned: true }),
|
|
104
|
+
uint32: () => integer({ format: "uint32", bits: 32, unsigned: true }),
|
|
105
|
+
uint64: () => integer({ format: "uint64", bits: 64, unsigned: true }),
|
|
106
|
+
float32: () => float({ format: "float32" }),
|
|
107
|
+
float64: () => double({ format: "float64" }),
|
|
108
|
+
positive: () => formattedNumber("positive"),
|
|
109
|
+
nonNegative: () => boundedNumber("non-negative", { min: 0 }),
|
|
110
|
+
negative: () => formattedNumber("negative"),
|
|
111
|
+
nonPositive: () => boundedNumber("non-positive", { max: 0 }),
|
|
112
|
+
positiveInteger: () => boundedNumber("positive-integer", { min: 1 }, "integer"),
|
|
113
|
+
nonNegativeInteger: () => boundedNumber("non-negative-integer", { min: 0 }, "integer"),
|
|
114
|
+
negativeInteger: () => boundedNumber("negative-integer", { max: -1 }, "integer"),
|
|
115
|
+
nonPositiveInteger: () => boundedNumber("non-positive-integer", { max: 0 }, "integer"),
|
|
116
|
+
percentage: () => boundedNumber("percentage", { min: 0, max: 100 }),
|
|
117
|
+
probability: () => boundedNumber("probability", { min: 0, max: 1 }),
|
|
118
|
+
ratio: () => formattedNumber("ratio"),
|
|
119
|
+
latitude: () => boundedNumber("latitude", { min: -90, max: 90 }),
|
|
120
|
+
longitude: () => boundedNumber("longitude", { min: -180, max: 180 }),
|
|
121
|
+
port: () => boundedNumber("port", { min: 0, max: 65535 }, "integer"),
|
|
122
|
+
httpStatus: () => boundedNumber("http-status", { min: 100, max: 599 }, "integer"),
|
|
123
|
+
counter: () => boundedNumber("counter", { min: 0 }, "integer"),
|
|
124
|
+
quantity: () => boundedNumber("quantity", { min: 0 }),
|
|
125
|
+
money: (options) => "minorUnits" in options
|
|
126
|
+
? numberProperty("integer", { ...options, format: "money" })
|
|
127
|
+
: decimal({ ...options, format: "money" }),
|
|
128
|
+
rating: (options = {}) => boundedNumber("rating", {
|
|
129
|
+
min: options.min ?? 0,
|
|
130
|
+
max: options.max ?? 5,
|
|
131
|
+
}),
|
|
132
|
+
score: (options = {}) => boundedNumber("score", {
|
|
133
|
+
min: options.min ?? 0,
|
|
134
|
+
max: options.max ?? 100,
|
|
135
|
+
}),
|
|
136
|
+
year: () => boundedNumber("year", { min: 1, max: 9999 }, "integer"),
|
|
137
|
+
month: () => boundedNumber("month", { min: 1, max: 12 }, "integer"),
|
|
138
|
+
day: () => boundedNumber("day", { min: 1, max: 31 }, "integer"),
|
|
139
|
+
hour: () => boundedNumber("hour", { min: 0, max: 23 }, "integer"),
|
|
140
|
+
minute: () => boundedNumber("minute", { min: 0, max: 59 }, "integer"),
|
|
141
|
+
second: () => boundedNumber("second", { min: 0, max: 59 }, "integer"),
|
|
142
|
+
});
|
|
143
|
+
function temporalScalar(kind, options = {}) {
|
|
144
|
+
return temporalProperty(kind, options);
|
|
145
|
+
}
|
|
146
|
+
function intervalProperty(point, options = {}) {
|
|
147
|
+
return temporalProperty("interval", options, point);
|
|
148
|
+
}
|
|
149
|
+
const temporalApi = Object.freeze({
|
|
150
|
+
date: (options = {}) => temporalScalar("date", options),
|
|
151
|
+
time: (options = {}) => temporalScalar("time", options),
|
|
152
|
+
datetime: (options = {}) => temporalScalar("date-time", options),
|
|
153
|
+
instant: (options = {}) => temporalScalar("instant", options),
|
|
154
|
+
zonedDatetime: (options = {}) => temporalScalar("zoned-date-time", options),
|
|
155
|
+
duration: (options = {}) => temporalScalar("duration", options),
|
|
156
|
+
interval: intervalProperty,
|
|
157
|
+
yearMonth: (options = {}) => temporalScalar("year-month", options),
|
|
158
|
+
monthDay: (options = {}) => temporalScalar("month-day", options),
|
|
159
|
+
});
|
|
160
|
+
function literalProperty(value) {
|
|
161
|
+
return new LiteralPropertyDeclaration(value);
|
|
162
|
+
}
|
|
163
|
+
function enumProperty(values) {
|
|
164
|
+
return enumeration(values);
|
|
165
|
+
}
|
|
166
|
+
function compositeProperty(fields) {
|
|
167
|
+
return composite(fields);
|
|
168
|
+
}
|
|
169
|
+
function unionProperty(value) {
|
|
170
|
+
const members = {};
|
|
171
|
+
for (const key of Object.keys(value.members).sort()) {
|
|
172
|
+
members[key] = inputExpression(value.members[key]);
|
|
173
|
+
}
|
|
174
|
+
return new UnionPropertyDeclaration(value.discriminant, members);
|
|
175
|
+
}
|
|
176
|
+
function recordProperty(keys, values) {
|
|
177
|
+
return new RecordPropertyDeclaration(inputExpression(keys), inputExpression(values));
|
|
178
|
+
}
|
|
179
|
+
function tupleProperty(...items) {
|
|
180
|
+
return new TuplePropertyDeclaration(items.map(inputExpression));
|
|
181
|
+
}
|
|
182
|
+
function defineGenericProperty(factory) {
|
|
183
|
+
const arity = factory.length;
|
|
184
|
+
if (arity < 1) {
|
|
185
|
+
throw new TypeError("property.generic.define requires explicit positional callback parameters");
|
|
186
|
+
}
|
|
187
|
+
const parameters = Array.from({ length: arity }, (_, index) => new TypeParameter(genericParameterName(index)));
|
|
188
|
+
const body = factory(...parameters);
|
|
189
|
+
return new GenericDefinitionPropertyDeclaration(parameters, bodyExpression(body));
|
|
190
|
+
}
|
|
191
|
+
function applyGenericProperty(target, arguments_) {
|
|
192
|
+
return new GenericApplicationPropertyDeclaration(target, arguments_.map(inputExpression));
|
|
193
|
+
}
|
|
194
|
+
const genericProperty = Object.freeze({
|
|
195
|
+
define: defineGenericProperty,
|
|
196
|
+
apply: applyGenericProperty,
|
|
197
|
+
});
|
|
198
|
+
export const property = Object.freeze({
|
|
199
|
+
string: stringProperty,
|
|
200
|
+
number: numberApi,
|
|
201
|
+
boolean: () => booleanProperty(),
|
|
202
|
+
temporal: temporalApi,
|
|
203
|
+
literal: literalProperty,
|
|
204
|
+
enum: enumProperty,
|
|
205
|
+
composite: compositeProperty,
|
|
206
|
+
union: unionProperty,
|
|
207
|
+
record: recordProperty,
|
|
208
|
+
tuple: tupleProperty,
|
|
209
|
+
generic: genericProperty,
|
|
210
|
+
});
|
|
211
|
+
//# sourceMappingURL=property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property.js","sourceRoot":"","sources":["../../../src/definitions/properties/property.ts"],"names":[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,CAChC,CAAC;AACJ,CAAC;AAED,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,qBAAqB;IAC7B,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,GAA+B,EAAE,CAAC,eAAe,EAAE;IAC5D,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,iBAAiB;IAC5B,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,eAAe;CACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { TemporalDirectionRuleState, TemporalDurationState, TemporalKindState, TemporalPrecisionState, TemporalPropertyState, TemporalValueState } from "../../contracts/index.js";
|
|
2
|
+
import { ExpressionRef, type PropertyRef } from "../../foundation/ref.js";
|
|
3
|
+
import { PropertyDeclarationBase } from "./base.js";
|
|
4
|
+
export interface TemporalIntervalValue {
|
|
5
|
+
readonly start: string;
|
|
6
|
+
readonly end: string;
|
|
7
|
+
}
|
|
8
|
+
export type TemporalBoundInput = string | TemporalValueState | TemporalDurationState | ExpressionRef;
|
|
9
|
+
export interface TemporalRangeInput {
|
|
10
|
+
readonly min?: TemporalBoundInput;
|
|
11
|
+
readonly max?: TemporalBoundInput;
|
|
12
|
+
}
|
|
13
|
+
export interface TemporalPropertyOptions {
|
|
14
|
+
readonly precision?: TemporalPrecisionState;
|
|
15
|
+
readonly range?: TemporalRangeInput;
|
|
16
|
+
readonly past?: TemporalDirectionRuleState;
|
|
17
|
+
readonly future?: TemporalDirectionRuleState;
|
|
18
|
+
readonly timeZone?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class TemporalPropertyDeclaration<T = string> extends PropertyDeclarationBase<"temporal", T, "temporal"> {
|
|
21
|
+
#private;
|
|
22
|
+
private _precision?;
|
|
23
|
+
private _range?;
|
|
24
|
+
private _past?;
|
|
25
|
+
private _future?;
|
|
26
|
+
private _timeZone?;
|
|
27
|
+
constructor(kind: TemporalKindState, options?: TemporalPropertyOptions, point?: PropertyRef<"temporal", unknown, "temporal">);
|
|
28
|
+
temporalKind(): TemporalKindState;
|
|
29
|
+
precision(value: TemporalPrecisionState): this;
|
|
30
|
+
range(value: TemporalRangeInput): this;
|
|
31
|
+
past(value?: TemporalDirectionRuleState): this;
|
|
32
|
+
future(value?: TemporalDirectionRuleState): this;
|
|
33
|
+
timeZone(value: string): this;
|
|
34
|
+
toState(): TemporalPropertyState;
|
|
35
|
+
}
|
|
36
|
+
export declare function temporalProperty<T = string>(kind: TemporalKindState, options?: TemporalPropertyOptions, point?: PropertyRef<"temporal", unknown, "temporal">): TemporalPropertyDeclaration<T>;
|
|
37
|
+
//# sourceMappingURL=temporal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal.d.ts","sourceRoot":"","sources":["../../../src/definitions/properties/temporal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,0BAA0B,EAC1B,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EAErB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,kBAAkB,GAClB,qBAAqB,GACrB,aAAa,CAAC;AAElB,MAAM,WAAW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C,CAAC,GAAG,MAAM,EACzC,IAAI,EAAE,iBAAiB,EACvB,OAAO,GAAE,uBAA4B,EACrC,KAAK,CAAC,EAAE,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,GACnD,2BAA2B,CAAC,CAAC,CAAC,CAEhC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { requireText } from "../../foundation/metadata.js";
|
|
2
|
+
import { ExpressionRef } from "../../foundation/ref.js";
|
|
3
|
+
import { PropertyDeclarationBase } from "./base.js";
|
|
4
|
+
function boundState(value) {
|
|
5
|
+
if (value instanceof ExpressionRef)
|
|
6
|
+
return value.ref();
|
|
7
|
+
if (typeof value === "string")
|
|
8
|
+
return value;
|
|
9
|
+
return { ...value };
|
|
10
|
+
}
|
|
11
|
+
function cloneRange(value) {
|
|
12
|
+
return {
|
|
13
|
+
...(value.min === undefined ? {} : { min: boundState(value.min) }),
|
|
14
|
+
...(value.max === undefined ? {} : { max: boundState(value.max) }),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function cloneDirection(value) {
|
|
18
|
+
return value === true ? true : { ...value };
|
|
19
|
+
}
|
|
20
|
+
export class TemporalPropertyDeclaration extends PropertyDeclarationBase {
|
|
21
|
+
#temporalKind;
|
|
22
|
+
#point;
|
|
23
|
+
_precision;
|
|
24
|
+
_range;
|
|
25
|
+
_past;
|
|
26
|
+
_future;
|
|
27
|
+
_timeZone;
|
|
28
|
+
constructor(kind, options = {}, point) {
|
|
29
|
+
super("temporal");
|
|
30
|
+
this.#temporalKind = kind;
|
|
31
|
+
this.#point = point;
|
|
32
|
+
if (options.precision !== undefined)
|
|
33
|
+
this.precision(options.precision);
|
|
34
|
+
if (options.range !== undefined)
|
|
35
|
+
this.range(options.range);
|
|
36
|
+
if (options.past !== undefined)
|
|
37
|
+
this.past(options.past);
|
|
38
|
+
if (options.future !== undefined)
|
|
39
|
+
this.future(options.future);
|
|
40
|
+
if (options.timeZone !== undefined)
|
|
41
|
+
this.timeZone(options.timeZone);
|
|
42
|
+
}
|
|
43
|
+
temporalKind() {
|
|
44
|
+
return this.#temporalKind;
|
|
45
|
+
}
|
|
46
|
+
precision(value) {
|
|
47
|
+
if (this.#temporalKind !== "instant" &&
|
|
48
|
+
this.#temporalKind !== "zoned-date-time") {
|
|
49
|
+
throw new TypeError(`precision is not valid for temporal kind ${JSON.stringify(this.#temporalKind)}`);
|
|
50
|
+
}
|
|
51
|
+
this._precision = value;
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
range(value) {
|
|
55
|
+
if (value.min === undefined && value.max === undefined) {
|
|
56
|
+
throw new TypeError("temporal range requires at least one of min/max");
|
|
57
|
+
}
|
|
58
|
+
this._range = cloneRange(value);
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
past(value = true) {
|
|
62
|
+
if (this._future !== undefined) {
|
|
63
|
+
throw new TypeError("temporal properties cannot require both past and future");
|
|
64
|
+
}
|
|
65
|
+
this._past = cloneDirection(value);
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
future(value = true) {
|
|
69
|
+
if (this._past !== undefined) {
|
|
70
|
+
throw new TypeError("temporal properties cannot require both past and future");
|
|
71
|
+
}
|
|
72
|
+
this._future = cloneDirection(value);
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
timeZone(value) {
|
|
76
|
+
this._timeZone = requireText(value, "temporal time zone");
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
toState() {
|
|
80
|
+
if ((this.#temporalKind === "instant" ||
|
|
81
|
+
this.#temporalKind === "zoned-date-time") &&
|
|
82
|
+
this._precision === undefined) {
|
|
83
|
+
throw new TypeError(`${this.#temporalKind} temporal properties require precision`);
|
|
84
|
+
}
|
|
85
|
+
if (this.#temporalKind !== "instant" &&
|
|
86
|
+
this.#temporalKind !== "zoned-date-time" &&
|
|
87
|
+
this._precision !== undefined) {
|
|
88
|
+
throw new TypeError(`precision is not valid for temporal kind ${JSON.stringify(this.#temporalKind)}`);
|
|
89
|
+
}
|
|
90
|
+
if (this.#temporalKind === "interval" && this.#point === undefined) {
|
|
91
|
+
throw new TypeError("interval temporal properties require a point property");
|
|
92
|
+
}
|
|
93
|
+
if (this.#temporalKind !== "interval" && this.#point !== undefined) {
|
|
94
|
+
throw new TypeError("point is only valid for interval temporal properties");
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
identity: this.identity,
|
|
98
|
+
kind: "temporal",
|
|
99
|
+
temporalKind: this.#temporalKind,
|
|
100
|
+
...(this._precision === undefined ? {} : { precision: this._precision }),
|
|
101
|
+
...(this.#point === undefined ? {} : { point: this.#point.ref() }),
|
|
102
|
+
...(this._range === undefined ? {} : { range: this._range }),
|
|
103
|
+
...(this._past === undefined ? {} : { past: cloneDirection(this._past) }),
|
|
104
|
+
...(this._future === undefined
|
|
105
|
+
? {}
|
|
106
|
+
: { future: cloneDirection(this._future) }),
|
|
107
|
+
...(this._timeZone === undefined ? {} : { timeZone: this._timeZone }),
|
|
108
|
+
...this.propertyMetadataState(),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export function temporalProperty(kind, options = {}, point) {
|
|
113
|
+
return new TemporalPropertyDeclaration(kind, options, point);
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=temporal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal.js","sourceRoot":"","sources":["../../../src/definitions/properties/temporal.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAoB,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AA0BxE,SAAS,UAAU,CAAC,KAAyB;IAC3C,IAAI,KAAK,YAAY,aAAa;QAAE,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;IACvD,IAAI,OAAO,KAAK,KAAK,QAA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