@duckmind/dm-darwin-x64 0.35.6 → 0.35.8

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/dm CHANGED
Binary file
@@ -4006,9 +4006,9 @@
4006
4006
  "license": "0BSD"
4007
4007
  },
4008
4008
  "node_modules/typebox": {
4009
- "version": "1.2.1",
4010
- "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.2.1.tgz",
4011
- "integrity": "sha512-0upGv6+mxJR7/Wc7yoxjc/U6SjOk2aNDNzbihYacSHh+JfOsf28IJ8ggW4/3tRlDKfbInvEDPVneEywjOWYCzw==",
4009
+ "version": "1.2.2",
4010
+ "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.2.2.tgz",
4011
+ "integrity": "sha512-0nqIJFL+baWoAEtwa0l/vfbfXg0+3gEhiWGnHuoIiivXjlk/TpxDddG0WER34CojKNpHi4ZXku8XGEz9H55b5Q==",
4012
4012
  "dev": true,
4013
4013
  "license": "MIT"
4014
4014
  },
@@ -5,9 +5,9 @@
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "node_modules/typebox": {
8
- "version": "1.2.1",
9
- "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.2.1.tgz",
10
- "integrity": "sha512-0upGv6+mxJR7/Wc7yoxjc/U6SjOk2aNDNzbihYacSHh+JfOsf28IJ8ggW4/3tRlDKfbInvEDPVneEywjOWYCzw==",
8
+ "version": "1.2.2",
9
+ "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.2.2.tgz",
10
+ "integrity": "sha512-0nqIJFL+baWoAEtwa0l/vfbfXg0+3gEhiWGnHuoIiivXjlk/TpxDddG0WER34CojKNpHi4ZXku8XGEz9H55b5Q==",
11
11
  "license": "MIT"
12
12
  }
13
13
  }
@@ -129,8 +129,14 @@ export type TKeywordVoidMapping<Input extends 'void'> = (T.TVoid);
129
129
  export declare function KeywordVoidMapping(input: 'void'): unknown;
130
130
  export type TKeywordThisMapping<Input extends 'this'> = (T.TThis);
131
131
  export declare function KeywordThisMapping(input: 'this'): unknown;
132
- export type TKeywordMapping<Input extends unknown> = Input;
133
- export declare function KeywordMapping(input: unknown): unknown;
132
+ export type TLiteralBigIntMapping<Input extends string> = (Input extends `${infer Value extends bigint}` ? T.TLiteral<Value> : never);
133
+ export declare function LiteralBigIntMapping(input: string): unknown;
134
+ export type TLiteralBooleanMapping<Input extends 'true' | 'false'> = (Input extends 'true' ? T.TLiteral<true> : T.TLiteral<false>);
135
+ export declare function LiteralBooleanMapping(input: 'true' | 'false'): unknown;
136
+ export type TLiteralNumberMapping<Input extends string> = (Input extends `${infer Value extends number}` ? T.TLiteral<Value> : never);
137
+ export declare function LiteralNumberMapping(input: string): unknown;
138
+ export type TLiteralStringMapping<Input extends string> = (Input extends T.TLiteralValue ? T.TLiteral<Input> : never);
139
+ export declare function LiteralStringMapping(input: string): unknown;
134
140
  export type TTemplateInterpolateMapping<Input extends [unknown, unknown, unknown]> = Input extends ['${', infer Type extends T.TSchema, '}'] ? Type : never;
135
141
  export declare function TemplateInterpolateMapping(input: [unknown, unknown, unknown]): unknown;
136
142
  export type TTemplateSpanMapping<Input extends string, Result extends T.TSchema = T.TLiteral<Input>> = Result;
@@ -142,16 +148,8 @@ export type TTemplateLiteralTypesMapping<Input extends [unknown, unknown, unknow
142
148
  export declare function TemplateLiteralTypesMapping(input: [unknown, unknown, unknown]): unknown;
143
149
  export type TTemplateLiteralMapping<Input extends unknown> = (Input extends infer Types extends T.TSchema[] ? T.TTemplateLiteralDeferred<Types> : never);
144
150
  export declare function TemplateLiteralMapping(input: unknown): unknown;
145
- export type TLiteralBigIntMapping<Input extends string> = (Input extends `${infer Value extends bigint}` ? T.TLiteral<Value> : never);
146
- export declare function LiteralBigIntMapping(input: string): unknown;
147
- export type TLiteralBooleanMapping<Input extends 'true' | 'false'> = (Input extends 'true' ? T.TLiteral<true> : T.TLiteral<false>);
148
- export declare function LiteralBooleanMapping(input: 'true' | 'false'): unknown;
149
- export type TLiteralNumberMapping<Input extends string> = (Input extends `${infer Value extends number}` ? T.TLiteral<Value> : never);
150
- export declare function LiteralNumberMapping(input: string): unknown;
151
- export type TLiteralStringMapping<Input extends string> = (Input extends T.TLiteralValue ? T.TLiteral<Input> : never);
152
- export declare function LiteralStringMapping(input: string): unknown;
153
- export type TLiteralMapping<Input extends unknown> = (Input);
154
- export declare function LiteralMapping(input: unknown): unknown;
151
+ export type TDependentMapping<Input extends [unknown, unknown, unknown, unknown, unknown, unknown] | [unknown, unknown, unknown, unknown]> = (Input extends ['if', infer If extends T.TSchema, 'then', infer Then extends T.TSchema, 'else', infer Else extends T.TSchema] ? T.TDependent<If, Then, Else> : Input extends ['if', infer If extends T.TSchema, 'then', infer Then extends T.TSchema] ? T.TDependent<If, Then, T.TUnknown> : never);
152
+ export declare function DependentMapping(input: [unknown, unknown, unknown, unknown, unknown, unknown] | [unknown, unknown, unknown, unknown]): unknown;
155
153
  export type TKeyOfMapping<Input extends [unknown] | []> = (Input extends [unknown] ? true : false);
156
154
  export declare function KeyOfMapping(input: [unknown] | []): unknown;
157
155
  type TIndexArrayMappingReduce<Input extends unknown[], Result extends unknown[] = []> = (Input extends [infer Left extends unknown, ...infer Right extends unknown[]] ? Left extends ['[', infer Type extends T.TSchema, ']'] ? TIndexArrayMappingReduce<Right, [...Result, [Type]]> : TIndexArrayMappingReduce<Right, [...Result, []]> : Result);
@@ -245,8 +243,8 @@ export type TElementMapping<Input extends [unknown, unknown] | [unknown]> = (Inp
245
243
  export declare function ElementMapping(input: [unknown, unknown] | [unknown]): unknown;
246
244
  export type TElementListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
247
245
  export declare function ElementListMapping(input: [unknown, unknown]): unknown;
248
- export type TTupleMapping<Input extends [unknown, unknown, unknown]> = (Input extends ['[', infer Types extends T.TSchema[], ']'] ? T.TTuple<Types> : never);
249
- export declare function TupleMapping(input: [unknown, unknown, unknown]): unknown;
246
+ export type T_Tuple_Mapping<Input extends [unknown, unknown, unknown]> = (Input extends ['[', infer Types extends T.TSchema[], ']'] ? T.TTuple<Types> : never);
247
+ export declare function _Tuple_Mapping(input: [unknown, unknown, unknown]): unknown;
250
248
  export type TParameterReadonlyOptionalMapping<Input extends [unknown, unknown, unknown, unknown, unknown]> = (Input extends [string, '?', ':', 'readonly', infer Type extends T.TSchema] ? T.TReadonlyAdd<T.TOptionalAdd<Type>> : never);
251
249
  export declare function ParameterReadonlyOptionalMapping(input: [unknown, unknown, unknown, unknown, unknown]): unknown;
252
250
  export type TParameterReadonlyMapping<Input extends [unknown, unknown, unknown, unknown]> = (Input extends [string, ':', 'readonly', infer Type extends T.TSchema] ? T.TReadonlyAdd<Type> : never);
@@ -263,8 +261,8 @@ export type TParameterListMapping<Input extends [unknown, unknown]> = (TDelimite
263
261
  export declare function ParameterListMapping(input: [unknown, unknown]): unknown;
264
262
  export type T_Function_Mapping<Input extends [unknown, unknown, unknown, unknown, unknown]> = (Input extends ['(', infer ParameterList extends T.TSchema[], ')', '=>', infer ReturnType extends T.TSchema] ? T.TFunction<ParameterList, ReturnType> : never);
265
263
  export declare function _Function_Mapping(input: [unknown, unknown, unknown, unknown, unknown]): unknown;
266
- export type TConstructorMapping<Input extends [unknown, unknown, unknown, unknown, unknown, unknown]> = (Input extends ['new', '(', infer ParameterList extends T.TSchema[], ')', '=>', infer InstanceType extends T.TSchema] ? T.TConstructor<ParameterList, InstanceType> : never);
267
- export declare function ConstructorMapping(input: [unknown, unknown, unknown, unknown, unknown, unknown]): unknown;
264
+ export type T_Constructor_Mapping<Input extends [unknown, unknown, unknown, unknown, unknown, unknown]> = (Input extends ['new', '(', infer ParameterList extends T.TSchema[], ')', '=>', infer InstanceType extends T.TSchema] ? T.TConstructor<ParameterList, InstanceType> : never);
265
+ export declare function _Constructor_Mapping(input: [unknown, unknown, unknown, unknown, unknown, unknown]): unknown;
268
266
  type TModifierOperation = 'add' | 'remove' | 'none';
269
267
  type TApplyReadonly<Readonly extends TModifierOperation, Type extends T.TSchema> = (Readonly extends 'remove' ? C.TReadonlyRemoveAction<Type> : Readonly extends 'add' ? C.TReadonlyAddAction<Type> : Type);
270
268
  export type TMappedReadonlyMapping<Input extends [unknown, unknown] | [unknown] | []> = (Input extends ['-', 'readonly'] ? 'remove' : Input extends ['+', 'readonly'] ? 'add' : Input extends ['readonly'] ? 'add' : 'none');
@@ -274,10 +272,8 @@ export type TMappedOptionalMapping<Input extends [unknown, unknown] | [unknown]
274
272
  export declare function MappedOptionalMapping(input: [unknown, unknown] | [unknown] | []): unknown;
275
273
  export type TMappedAsMapping<Input extends [unknown, unknown] | []> = (Input extends ['as', infer Type extends T.TSchema] ? [Type] : []);
276
274
  export declare function MappedAsMapping(input: [unknown, unknown] | []): unknown;
277
- export type TMappedMapping<Input extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]> = (Input extends ['{', infer Readonly extends TModifierOperation, '[', infer Key extends string, 'in', infer Type extends T.TSchema, infer As extends T.TSchema[], ']', infer Optional extends TModifierOperation, ':', infer Property extends T.TSchema, null, '}'] ? (As extends [infer As extends T.TSchema] ? C.TMappedDeferred<T.TIdentifier<Key>, Type, As, TApplyReadonly<Readonly, TApplyOptional<Optional, Property>>> : C.TMappedDeferred<T.TIdentifier<Key>, Type, T.TRef<Key>, TApplyReadonly<Readonly, TApplyOptional<Optional, Property>>>) : never);
278
- export declare function MappedMapping(input: [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]): unknown;
279
- export type TDependentMapping<Input extends [unknown, unknown, unknown, unknown, unknown, unknown] | [unknown, unknown, unknown, unknown]> = (Input extends ['if', infer If extends T.TSchema, 'then', infer Then extends T.TSchema, 'else', infer Else extends T.TSchema] ? T.TDependent<If, Then, Else> : Input extends ['if', infer If extends T.TSchema, 'then', infer Then extends T.TSchema] ? T.TDependent<If, Then, T.TUnknown> : never);
280
- export declare function DependentMapping(input: [unknown, unknown, unknown, unknown, unknown, unknown] | [unknown, unknown, unknown, unknown]): unknown;
275
+ export type T_Mapped_Mapping<Input extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]> = (Input extends ['{', infer Readonly extends TModifierOperation, '[', infer Key extends string, 'in', infer Type extends T.TSchema, infer As extends T.TSchema[], ']', infer Optional extends TModifierOperation, ':', infer Property extends T.TSchema, null, '}'] ? (As extends [infer As extends T.TSchema] ? C.TMappedDeferred<T.TIdentifier<Key>, Type, As, TApplyReadonly<Readonly, TApplyOptional<Optional, Property>>> : C.TMappedDeferred<T.TIdentifier<Key>, Type, T.TRef<Key>, TApplyReadonly<Readonly, TApplyOptional<Optional, Property>>>) : never);
276
+ export declare function _Mapped_Mapping(input: [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]): unknown;
281
277
  export type TReferenceMapping<Input extends string, Result extends T.TSchema = T.TRef<Input>> = Result;
282
278
  export declare function ReferenceMapping(input: string): unknown;
283
279
  export type TJsonNumberMapping<Input extends string> = (Input extends `${infer Value extends number}` ? Value : never);
@@ -129,8 +129,17 @@ export function KeywordVoidMapping(input) {
129
129
  export function KeywordThisMapping(input) {
130
130
  return T.This();
131
131
  }
132
- export function KeywordMapping(input) {
133
- return input;
132
+ export function LiteralBigIntMapping(input) {
133
+ return T.Literal(BigInt(input));
134
+ }
135
+ export function LiteralBooleanMapping(input) {
136
+ return T.Literal(Guard.IsEqual(input, 'true'));
137
+ }
138
+ export function LiteralNumberMapping(input) {
139
+ return T.Literal(parseFloat(input));
140
+ }
141
+ export function LiteralStringMapping(input) {
142
+ return T.Literal(input);
134
143
  }
135
144
  export function TemplateInterpolateMapping(input) {
136
145
  return input[1];
@@ -149,20 +158,9 @@ export function TemplateLiteralTypesMapping(input) {
149
158
  export function TemplateLiteralMapping(input) {
150
159
  return T.TemplateLiteralDeferred(input);
151
160
  }
152
- export function LiteralBigIntMapping(input) {
153
- return T.Literal(BigInt(input));
154
- }
155
- export function LiteralBooleanMapping(input) {
156
- return T.Literal(Guard.IsEqual(input, 'true'));
157
- }
158
- export function LiteralNumberMapping(input) {
159
- return T.Literal(parseFloat(input));
160
- }
161
- export function LiteralStringMapping(input) {
162
- return T.Literal(input);
163
- }
164
- export function LiteralMapping(input) {
165
- return input;
161
+ export function DependentMapping(input) {
162
+ return (Guard.IsEqual(input.length, 6) ? T.Dependent(input[1], input[3], input[5]) :
163
+ T.Dependent(input[1], input[3], T.Unknown()));
166
164
  }
167
165
  export function KeyOfMapping(input) {
168
166
  return input.length > 0;
@@ -349,7 +347,7 @@ export function ElementMapping(input) {
349
347
  export function ElementListMapping(input) {
350
348
  return Delimited(input);
351
349
  }
352
- export function TupleMapping(input) {
350
+ export function _Tuple_Mapping(input) {
353
351
  return T.Tuple(input[1]);
354
352
  }
355
353
  export function ParameterReadonlyOptionalMapping(input) {
@@ -379,7 +377,7 @@ export function ParameterListMapping(input) {
379
377
  export function _Function_Mapping(input) {
380
378
  return T._Function_(input[1], input[4]);
381
379
  }
382
- export function ConstructorMapping(input) {
380
+ export function _Constructor_Mapping(input) {
383
381
  return T.Constructor(input[2], input[5]);
384
382
  }
385
383
  function ApplyReadonly(state, type) {
@@ -407,15 +405,11 @@ export function MappedOptionalMapping(input) {
407
405
  export function MappedAsMapping(input) {
408
406
  return Guard.IsEqual(input.length, 2) ? [input[1]] : [];
409
407
  }
410
- export function MappedMapping(input) {
408
+ export function _Mapped_Mapping(input) {
411
409
  return (Guard.IsArray(input[6]) && Guard.IsEqual(input[6].length, 1)
412
410
  ? C.MappedDeferred(T.Identifier(input[3]), input[5], input[6][0], ApplyReadonly(input[1], ApplyOptional(input[8], input[10])))
413
411
  : C.MappedDeferred(T.Identifier(input[3]), input[5], T.Ref(input[3]), ApplyReadonly(input[1], ApplyOptional(input[8], input[10]))));
414
412
  }
415
- export function DependentMapping(input) {
416
- return (Guard.IsEqual(input.length, 6) ? T.Dependent(input[1], input[3], input[5]) :
417
- T.Dependent(input[1], input[3], T.Unknown()));
418
- }
419
413
  export function ReferenceMapping(input) {
420
414
  return T.Ref(input);
421
415
  }
@@ -27,22 +27,21 @@ export type TKeywordNever<Input extends string> = Token.TConst<'never', Input> e
27
27
  export type TKeywordSymbol<Input extends string> = Token.TConst<'symbol', Input> extends [infer _0 extends 'symbol', infer Input extends string] ? [S.TKeywordSymbolMapping<_0>, Input] : [];
28
28
  export type TKeywordVoid<Input extends string> = Token.TConst<'void', Input> extends [infer _0 extends 'void', infer Input extends string] ? [S.TKeywordVoidMapping<_0>, Input] : [];
29
29
  export type TKeywordThis<Input extends string> = Token.TConst<'this', Input> extends [infer _0 extends 'this', infer Input extends string] ? [S.TKeywordThisMapping<_0>, Input] : [];
30
- export type TKeyword<Input extends string> = (TKeywordString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUndefined<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNull<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordInteger<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUnknown<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordAny<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordObject<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNever<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordSymbol<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordVoid<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordThis<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends unknown, infer Input extends string] ? [S.TKeywordMapping<_0>, Input] : [];
31
30
  export type TTemplateInterpolate<Input extends string> = (Token.TConst<'${', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'}', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TTemplateInterpolateMapping<_0>, Input] : [];
32
31
  export type TTemplateSpan<Input extends string> = Token.TUntil<['${', '`'], Input> extends [infer _0 extends string, infer Input extends string] ? [S.TTemplateSpanMapping<_0>, Input] : [];
33
32
  export type TTemplateBody<Input extends string> = ((TTemplateSpan<Input> extends [infer _0, infer Input extends string] ? (TTemplateInterpolate<Input> extends [infer _1, infer Input extends string] ? (TTemplateBody<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (TTemplateSpan<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (TTemplateSpan<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [unknown], infer Input extends string] ? [S.TTemplateBodyMapping<_0>, Input] : [];
34
33
  export type TTemplateLiteralTypes<Input extends string> = (Token.TConst<'`', Input> extends [infer _0, infer Input extends string] ? (TTemplateBody<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'`', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TTemplateLiteralTypesMapping<_0>, Input] : [];
35
34
  export type TTemplateLiteral<Input extends string> = TTemplateLiteralTypes<Input> extends [infer _0 extends unknown, infer Input extends string] ? [S.TTemplateLiteralMapping<_0>, Input] : [];
35
+ export type TDependent<Input extends string> = ((Token.TConst<'if', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'then', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<'else', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Token.TConst<'if', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'then', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown] | [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TDependentMapping<_0>, Input] : [];
36
36
  export type TLiteralBigInt<Input extends string> = Token.TBigInt<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TLiteralBigIntMapping<_0>, Input] : [];
37
37
  export type TLiteralBoolean<Input extends string> = (Token.TConst<'true', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : Token.TConst<'false', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends 'true' | 'false', infer Input extends string] ? [S.TLiteralBooleanMapping<_0>, Input] : [];
38
38
  export type TLiteralNumber<Input extends string> = Token.TNumber<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TLiteralNumberMapping<_0>, Input] : [];
39
39
  export type TLiteralString<Input extends string> = Token.TString<['\'', '\"'], Input> extends [infer _0 extends string, infer Input extends string] ? [S.TLiteralStringMapping<_0>, Input] : [];
40
- export type TLiteral<Input extends string> = (TLiteralBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends unknown, infer Input extends string] ? [S.TLiteralMapping<_0>, Input] : [];
41
40
  export type TKeyOf<Input extends string> = ((Token.TConst<'keyof', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown] | [], infer Input extends string] ? [S.TKeyOfMapping<_0>, Input] : [];
42
41
  export type TIndexArray_0<Input extends string, Result extends unknown[] = []> = ((Token.TConst<'[', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Token.TConst<'[', Input> extends [infer _0, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0, infer Input extends string] ? TIndexArray_0<Input, [...Result, _0]> : [Result, Input];
43
42
  export type TIndexArray<Input extends string> = TIndexArray_0<Input> extends [infer _0 extends ([unknown, unknown, unknown] | [unknown, unknown])[], infer Input extends string] ? [S.TIndexArrayMapping<_0>, Input] : [];
44
43
  export type TExtends<Input extends string> = ((Token.TConst<'extends', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExtendsMapping<_0>, Input] : [];
45
- export type TBase<Input extends string> = ((Token.TConst<'(', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : TKeyword<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Object_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTuple<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTemplateLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TConstructor<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Function_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TMapped<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TDependent<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TGenericCall<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TReference<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | unknown, infer Input extends string] ? [S.TBaseMapping<_0>, Input] : [];
44
+ export type TBase<Input extends string> = ((Token.TConst<'(', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUndefined<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNull<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordInteger<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUnknown<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordAny<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordObject<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNever<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordSymbol<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordVoid<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordThis<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTemplateLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TDependent<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Object_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Tuple_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Constructor_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Function_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Mapped_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TGenericCall<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TReference<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | unknown, infer Input extends string] ? [S.TBaseMapping<_0>, Input] : [];
46
45
  export type TWith<Input extends string> = ((Token.TConst<'with', Input> extends [infer _0, infer Input extends string] ? (TJsonObject<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TWithMapping<_0>, Input] : [];
47
46
  export type TFactor<Input extends string> = (TKeyOf<Input> extends [infer _0, infer Input extends string] ? (TBase<Input> extends [infer _1, infer Input extends string] ? (TIndexArray<Input> extends [infer _2, infer Input extends string] ? (TExtends<Input> extends [infer _3, infer Input extends string] ? (TWith<Input> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0>, Input] : [];
48
47
  export type TExprTermTail<Input extends string> = ((Token.TConst<'&', Input> extends [infer _0, infer Input extends string] ? (TFactor<Input> extends [infer _1, infer Input extends string] ? (TExprTermTail<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTermTailMapping<_0>, Input] : [];
@@ -75,7 +74,7 @@ export type TElementBase<Input extends string> = (TElementNamed<Input> extends [
75
74
  export type TElement<Input extends string> = ((Token.TConst<'...', Input> extends [infer _0, infer Input extends string] ? (TElementBase<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (TElementBase<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [unknown], infer Input extends string] ? [S.TElementMapping<_0>, Input] : [];
76
75
  export type TElementList_0<Input extends string, Result extends unknown[] = []> = (TElement<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TElementList_0<Input, [...Result, _0]> : [Result, Input];
77
76
  export type TElementList<Input extends string> = (TElementList_0<Input> extends [infer _0, infer Input extends string] ? (((TElement<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TElementListMapping<_0>, Input] : [];
78
- export type TTuple<Input extends string> = (Token.TConst<'[', Input> extends [infer _0, infer Input extends string] ? (TElementList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TTupleMapping<_0>, Input] : [];
77
+ export type T_Tuple_<Input extends string> = (Token.TConst<'[', Input> extends [infer _0, infer Input extends string] ? (TElementList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.T_Tuple_Mapping<_0>, Input] : [];
79
78
  export type TParameterReadonlyOptional<Input extends string> = (Token.TIdent<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _1, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _2, infer Input extends string] ? (Token.TConst<'readonly', Input> extends [infer _3, infer Input extends string] ? (TType<Input> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TParameterReadonlyOptionalMapping<_0>, Input] : [];
80
79
  export type TParameterReadonly<Input extends string> = (Token.TIdent<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'readonly', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TParameterReadonlyMapping<_0>, Input] : [];
81
80
  export type TParameterOptional<Input extends string> = (Token.TIdent<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _1, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TParameterOptionalMapping<_0>, Input] : [];
@@ -85,12 +84,11 @@ export type TParameter<Input extends string> = ((Token.TConst<'...', Input> exte
85
84
  export type TParameterList_0<Input extends string, Result extends unknown[] = []> = (TParameter<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TParameterList_0<Input, [...Result, _0]> : [Result, Input];
86
85
  export type TParameterList<Input extends string> = (TParameterList_0<Input> extends [infer _0, infer Input extends string] ? (((TParameter<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TParameterListMapping<_0>, Input] : [];
87
86
  export type T_Function_<Input extends string> = (Token.TConst<'(', Input> extends [infer _0, infer Input extends string] ? (TParameterList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _2, infer Input extends string] ? (Token.TConst<'=>', Input> extends [infer _3, infer Input extends string] ? (TType<Input> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.T_Function_Mapping<_0>, Input] : [];
88
- export type TConstructor<Input extends string> = (Token.TConst<'new', Input> extends [infer _0, infer Input extends string] ? (Token.TConst<'(', Input> extends [infer _1, infer Input extends string] ? (TParameterList<Input> extends [infer _2, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _3, infer Input extends string] ? (Token.TConst<'=>', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TConstructorMapping<_0>, Input] : [];
87
+ export type T_Constructor_<Input extends string> = (Token.TConst<'new', Input> extends [infer _0, infer Input extends string] ? (Token.TConst<'(', Input> extends [infer _1, infer Input extends string] ? (TParameterList<Input> extends [infer _2, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _3, infer Input extends string] ? (Token.TConst<'=>', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.T_Constructor_Mapping<_0>, Input] : [];
89
88
  export type TMappedReadonly<Input extends string> = ((Token.TConst<'+', Input> extends [infer _0, infer Input extends string] ? (Token.TConst<'readonly', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Token.TConst<'-', Input> extends [infer _0, infer Input extends string] ? (Token.TConst<'readonly', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Token.TConst<'readonly', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [unknown] | [], infer Input extends string] ? [S.TMappedReadonlyMapping<_0>, Input] : [];
90
89
  export type TMappedOptional<Input extends string> = ((Token.TConst<'+', Input> extends [infer _0, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Token.TConst<'-', Input> extends [infer _0, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Token.TConst<'?', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [unknown] | [], infer Input extends string] ? [S.TMappedOptionalMapping<_0>, Input] : [];
91
90
  export type TMappedAs<Input extends string> = ((Token.TConst<'as', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TMappedAsMapping<_0>, Input] : [];
92
- export type TMapped<Input extends string> = (Token.TConst<'{', Input> extends [infer _0, infer Input extends string] ? (TMappedReadonly<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'[', Input> extends [infer _2, infer Input extends string] ? (Token.TIdent<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<'in', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? (TMappedAs<Input> extends [infer _6, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _7, infer Input extends string] ? (TMappedOptional<Input> extends [infer _8, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _9, infer Input extends string] ? (TType<Input> extends [infer _10, infer Input extends string] ? (TOptionalSemiColon<Input> extends [infer _11, infer Input extends string] ? (Token.TConst<'}', Input> extends [infer _12, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], Input] : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TMappedMapping<_0>, Input] : [];
93
- export type TDependent<Input extends string> = ((Token.TConst<'if', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'then', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<'else', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Token.TConst<'if', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'then', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown] | [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TDependentMapping<_0>, Input] : [];
91
+ export type T_Mapped_<Input extends string> = (Token.TConst<'{', Input> extends [infer _0, infer Input extends string] ? (TMappedReadonly<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'[', Input> extends [infer _2, infer Input extends string] ? (Token.TIdent<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<'in', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? (TMappedAs<Input> extends [infer _6, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _7, infer Input extends string] ? (TMappedOptional<Input> extends [infer _8, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _9, infer Input extends string] ? (TType<Input> extends [infer _10, infer Input extends string] ? (TOptionalSemiColon<Input> extends [infer _11, infer Input extends string] ? (Token.TConst<'}', Input> extends [infer _12, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], Input] : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.T_Mapped_Mapping<_0>, Input] : [];
94
92
  export type TReference<Input extends string> = Token.TIdent<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TReferenceMapping<_0>, Input] : [];
95
93
  export type TJsonNumber<Input extends string> = Token.TNumber<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TJsonNumberMapping<_0>, Input] : [];
96
94
  export type TJsonBoolean<Input extends string> = (Token.TConst<'true', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : Token.TConst<'false', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends 'true' | 'false', infer Input extends string] ? [S.TJsonBooleanMapping<_0>, Input] : [];
@@ -157,17 +155,16 @@ export declare const KeywordNever: (input: string) => [unknown, string] | [];
157
155
  export declare const KeywordSymbol: (input: string) => [unknown, string] | [];
158
156
  export declare const KeywordVoid: (input: string) => [unknown, string] | [];
159
157
  export declare const KeywordThis: (input: string) => [unknown, string] | [];
160
- export declare const Keyword: (input: string) => [unknown, string] | [];
161
158
  export declare const TemplateInterpolate: (input: string) => [unknown, string] | [];
162
159
  export declare const TemplateSpan: (input: string) => [unknown, string] | [];
163
160
  export declare const TemplateBody: (input: string) => [unknown, string] | [];
164
161
  export declare const TemplateLiteralTypes: (input: string) => [unknown, string] | [];
165
162
  export declare const TemplateLiteral: (input: string) => [unknown, string] | [];
163
+ export declare const Dependent: (input: string) => [unknown, string] | [];
166
164
  export declare const LiteralBigInt: (input: string) => [unknown, string] | [];
167
165
  export declare const LiteralBoolean: (input: string) => [unknown, string] | [];
168
166
  export declare const LiteralNumber: (input: string) => [unknown, string] | [];
169
167
  export declare const LiteralString: (input: string) => [unknown, string] | [];
170
- export declare const Literal: (input: string) => [unknown, string] | [];
171
168
  export declare const KeyOf: (input: string) => [unknown, string] | [];
172
169
  export declare const IndexArray_0: (input: string, result?: unknown[]) => [unknown[], string];
173
170
  export declare const IndexArray: (input: string) => [unknown, string] | [];
@@ -205,7 +202,7 @@ export declare const ElementBase: (input: string) => [unknown, string] | [];
205
202
  export declare const Element: (input: string) => [unknown, string] | [];
206
203
  export declare const ElementList_0: (input: string, result?: unknown[]) => [unknown[], string];
207
204
  export declare const ElementList: (input: string) => [unknown, string] | [];
208
- export declare const Tuple: (input: string) => [unknown, string] | [];
205
+ export declare const _Tuple_: (input: string) => [unknown, string] | [];
209
206
  export declare const ParameterReadonlyOptional: (input: string) => [unknown, string] | [];
210
207
  export declare const ParameterReadonly: (input: string) => [unknown, string] | [];
211
208
  export declare const ParameterOptional: (input: string) => [unknown, string] | [];
@@ -215,12 +212,11 @@ export declare const Parameter: (input: string) => [unknown, string] | [];
215
212
  export declare const ParameterList_0: (input: string, result?: unknown[]) => [unknown[], string];
216
213
  export declare const ParameterList: (input: string) => [unknown, string] | [];
217
214
  export declare const _Function_: (input: string) => [unknown, string] | [];
218
- export declare const Constructor: (input: string) => [unknown, string] | [];
215
+ export declare const _Constructor_: (input: string) => [unknown, string] | [];
219
216
  export declare const MappedReadonly: (input: string) => [unknown, string] | [];
220
217
  export declare const MappedOptional: (input: string) => [unknown, string] | [];
221
218
  export declare const MappedAs: (input: string) => [unknown, string] | [];
222
- export declare const Mapped: (input: string) => [unknown, string] | [];
223
- export declare const Dependent: (input: string) => [unknown, string] | [];
219
+ export declare const _Mapped_: (input: string) => [unknown, string] | [];
224
220
  export declare const Reference: (input: string) => [unknown, string] | [];
225
221
  export declare const JsonNumber: (input: string) => [unknown, string] | [];
226
222
  export declare const JsonBoolean: (input: string) => [unknown, string] | [];
@@ -31,22 +31,21 @@ export const KeywordNever = (input) => If(Token.Const('never', input), ([_0, inp
31
31
  export const KeywordSymbol = (input) => If(Token.Const('symbol', input), ([_0, input]) => [S.KeywordSymbolMapping(_0), input]);
32
32
  export const KeywordVoid = (input) => If(Token.Const('void', input), ([_0, input]) => [S.KeywordVoidMapping(_0), input]);
33
33
  export const KeywordThis = (input) => If(Token.Const('this', input), ([_0, input]) => [S.KeywordThisMapping(_0), input]);
34
- export const Keyword = (input) => If(If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input), ([_0, input]) => [_0, input], () => If(KeywordNull(input), ([_0, input]) => [_0, input], () => If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input), ([_0, input]) => [_0, input], () => If(KeywordAny(input), ([_0, input]) => [_0, input], () => If(KeywordObject(input), ([_0, input]) => [_0, input], () => If(KeywordNever(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => If(KeywordVoid(input), ([_0, input]) => [_0, input], () => If(KeywordThis(input), ([_0, input]) => [_0, input], () => [])))))))))))))), ([_0, input]) => [S.KeywordMapping(_0), input]);
35
34
  export const TemplateInterpolate = (input) => If(If(Token.Const('${', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TemplateInterpolateMapping(_0), input]);
36
35
  export const TemplateSpan = (input) => If(Token.Until(['${', '`'], input), ([_0, input]) => [S.TemplateSpanMapping(_0), input]);
37
36
  export const TemplateBody = (input) => If(If(If(TemplateSpan(input), ([_0, input]) => If(TemplateInterpolate(input), ([_1, input]) => If(TemplateBody(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(TemplateSpan(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(TemplateSpan(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.TemplateBodyMapping(_0), input]);
38
37
  export const TemplateLiteralTypes = (input) => If(If(Token.Const('`', input), ([_0, input]) => If(TemplateBody(input), ([_1, input]) => If(Token.Const('`', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TemplateLiteralTypesMapping(_0), input]);
39
38
  export const TemplateLiteral = (input) => If(TemplateLiteralTypes(input), ([_0, input]) => [S.TemplateLiteralMapping(_0), input]);
39
+ export const Dependent = (input) => If(If(If(Token.Const('if', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('then', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const('else', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If(If(Token.Const('if', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('then', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.DependentMapping(_0), input]);
40
40
  export const LiteralBigInt = (input) => If(Token.BigInt(input), ([_0, input]) => [S.LiteralBigIntMapping(_0), input]);
41
41
  export const LiteralBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.LiteralBooleanMapping(_0), input]);
42
42
  export const LiteralNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.LiteralNumberMapping(_0), input]);
43
43
  export const LiteralString = (input) => If(Token.String(['\'', '\"'], input), ([_0, input]) => [S.LiteralStringMapping(_0), input]);
44
- export const Literal = (input) => If(If(LiteralBigInt(input), ([_0, input]) => [_0, input], () => If(LiteralBoolean(input), ([_0, input]) => [_0, input], () => If(LiteralNumber(input), ([_0, input]) => [_0, input], () => If(LiteralString(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.LiteralMapping(_0), input]);
45
44
  export const KeyOf = (input) => If(If(If(Token.Const('keyof', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.KeyOfMapping(_0), input]);
46
45
  export const IndexArray_0 = (input, result = []) => If(If(If(Token.Const('[', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(Token.Const('[', input), ([_0, input]) => If(Token.Const(']', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => IndexArray_0(input, [...result, _0]), () => [result, input]);
47
46
  export const IndexArray = (input) => If(IndexArray_0(input), ([_0, input]) => [S.IndexArrayMapping(_0), input]);
48
47
  export const Extends = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('?', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const(':', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0), input]);
49
- export const Base = (input) => If(If(If(Token.Const('(', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(Keyword(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(Tuple(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral(input), ([_0, input]) => [_0, input], () => If(Literal(input), ([_0, input]) => [_0, input], () => If(Constructor(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(Mapped(input), ([_0, input]) => [_0, input], () => If(Dependent(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))), ([_0, input]) => [S.BaseMapping(_0), input]);
48
+ export const Base = (input) => If(If(If(Token.Const('(', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input), ([_0, input]) => [_0, input], () => If(KeywordNull(input), ([_0, input]) => [_0, input], () => If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input), ([_0, input]) => [_0, input], () => If(KeywordAny(input), ([_0, input]) => [_0, input], () => If(KeywordObject(input), ([_0, input]) => [_0, input], () => If(KeywordNever(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => If(KeywordVoid(input), ([_0, input]) => [_0, input], () => If(KeywordThis(input), ([_0, input]) => [_0, input], () => If(LiteralBigInt(input), ([_0, input]) => [_0, input], () => If(LiteralBoolean(input), ([_0, input]) => [_0, input], () => If(LiteralNumber(input), ([_0, input]) => [_0, input], () => If(LiteralString(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral(input), ([_0, input]) => [_0, input], () => If(Dependent(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(_Tuple_(input), ([_0, input]) => [_0, input], () => If(_Constructor_(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(_Mapped_(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))))))))))))))))))), ([_0, input]) => [S.BaseMapping(_0), input]);
50
49
  export const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(JsonObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithMapping(_0), input]);
51
50
  export const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => If(With(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FactorMapping(_0), input]);
52
51
  export const ExprTermTail = (input) => If(If(If(Token.Const('&', input), ([_0, input]) => If(Factor(input), ([_1, input]) => If(ExprTermTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0), input]);
@@ -79,7 +78,7 @@ export const ElementBase = (input) => If(If(ElementNamed(input), ([_0, input]) =
79
78
  export const Element = (input) => If(If(If(Token.Const('...', input), ([_0, input]) => If(ElementBase(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(ElementBase(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ElementMapping(_0), input]);
80
79
  export const ElementList_0 = (input, result = []) => If(If(Element(input), ([_0, input]) => If(Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ElementList_0(input, [...result, _0]), () => [result, input]);
81
80
  export const ElementList = (input) => If(If(ElementList_0(input), ([_0, input]) => If(If(If(Element(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ElementListMapping(_0), input]);
82
- export const Tuple = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(ElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TupleMapping(_0), input]);
81
+ export const _Tuple_ = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(ElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S._Tuple_Mapping(_0), input]);
83
82
  export const ParameterReadonlyOptional = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Token.Const('readonly', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.ParameterReadonlyOptionalMapping(_0), input]);
84
83
  export const ParameterReadonly = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Token.Const('readonly', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ParameterReadonlyMapping(_0), input]);
85
84
  export const ParameterOptional = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ParameterOptionalMapping(_0), input]);
@@ -89,12 +88,11 @@ export const Parameter = (input) => If(If(If(Token.Const('...', input), ([_0, in
89
88
  export const ParameterList_0 = (input, result = []) => If(If(Parameter(input), ([_0, input]) => If(Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ParameterList_0(input, [...result, _0]), () => [result, input]);
90
89
  export const ParameterList = (input) => If(If(ParameterList_0(input), ([_0, input]) => If(If(If(Parameter(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ParameterListMapping(_0), input]);
91
90
  export const _Function_ = (input) => If(If(Token.Const('(', input), ([_0, input]) => If(ParameterList(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => If(Token.Const('=>', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S._Function_Mapping(_0), input]);
92
- export const Constructor = (input) => If(If(Token.Const('new', input), ([_0, input]) => If(Token.Const('(', input), ([_1, input]) => If(ParameterList(input), ([_2, input]) => If(Token.Const(')', input), ([_3, input]) => If(Token.Const('=>', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.ConstructorMapping(_0), input]);
91
+ export const _Constructor_ = (input) => If(If(Token.Const('new', input), ([_0, input]) => If(Token.Const('(', input), ([_1, input]) => If(ParameterList(input), ([_2, input]) => If(Token.Const(')', input), ([_3, input]) => If(Token.Const('=>', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S._Constructor_Mapping(_0), input]);
93
92
  export const MappedReadonly = (input) => If(If(If(Token.Const('+', input), ([_0, input]) => If(Token.Const('readonly', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('-', input), ([_0, input]) => If(Token.Const('readonly', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('readonly', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.MappedReadonlyMapping(_0), input]);
94
93
  export const MappedOptional = (input) => If(If(If(Token.Const('+', input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('-', input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('?', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.MappedOptionalMapping(_0), input]);
95
94
  export const MappedAs = (input) => If(If(If(Token.Const('as', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.MappedAsMapping(_0), input]);
96
- export const Mapped = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(MappedReadonly(input), ([_1, input]) => If(Token.Const('[', input), ([_2, input]) => If(Token.Ident(input), ([_3, input]) => If(Token.Const('in', input), ([_4, input]) => If(Type(input), ([_5, input]) => If(MappedAs(input), ([_6, input]) => If(Token.Const(']', input), ([_7, input]) => If(MappedOptional(input), ([_8, input]) => If(Token.Const(':', input), ([_9, input]) => If(Type(input), ([_10, input]) => If(OptionalSemiColon(input), ([_11, input]) => If(Token.Const('}', input), ([_12, input]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input]))))))))))))), ([_0, input]) => [S.MappedMapping(_0), input]);
97
- export const Dependent = (input) => If(If(If(Token.Const('if', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('then', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const('else', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If(If(Token.Const('if', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('then', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.DependentMapping(_0), input]);
95
+ export const _Mapped_ = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(MappedReadonly(input), ([_1, input]) => If(Token.Const('[', input), ([_2, input]) => If(Token.Ident(input), ([_3, input]) => If(Token.Const('in', input), ([_4, input]) => If(Type(input), ([_5, input]) => If(MappedAs(input), ([_6, input]) => If(Token.Const(']', input), ([_7, input]) => If(MappedOptional(input), ([_8, input]) => If(Token.Const(':', input), ([_9, input]) => If(Type(input), ([_10, input]) => If(OptionalSemiColon(input), ([_11, input]) => If(Token.Const('}', input), ([_12, input]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input]))))))))))))), ([_0, input]) => [S._Mapped_Mapping(_0), input]);
98
96
  export const Reference = (input) => If(Token.Ident(input), ([_0, input]) => [S.ReferenceMapping(_0), input]);
99
97
  export const JsonNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.JsonNumberMapping(_0), input]);
100
98
  export const JsonBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.JsonBooleanMapping(_0), input]);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.2.1",
4
+ "version": "1.2.2",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
@@ -1256,9 +1256,9 @@
1256
1256
  "optional": true
1257
1257
  },
1258
1258
  "node_modules/typebox": {
1259
- "version": "1.2.1",
1260
- "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.2.1.tgz",
1261
- "integrity": "sha512-0upGv6+mxJR7/Wc7yoxjc/U6SjOk2aNDNzbihYacSHh+JfOsf28IJ8ggW4/3tRlDKfbInvEDPVneEywjOWYCzw==",
1259
+ "version": "1.2.2",
1260
+ "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.2.2.tgz",
1261
+ "integrity": "sha512-0nqIJFL+baWoAEtwa0l/vfbfXg0+3gEhiWGnHuoIiivXjlk/TpxDddG0WER34CojKNpHi4ZXku8XGEz9H55b5Q==",
1262
1262
  "license": "MIT"
1263
1263
  },
1264
1264
  "node_modules/typescript": {
@@ -77,6 +77,7 @@ interface GlobalSessionSpan {
77
77
  interface TimeFilteredStats {
78
78
  providers: Map<string, ProviderStats>;
79
79
  totals: TotalStats;
80
+ dailySpend: Map<string, number>;
80
81
  insights: PeriodInsights;
81
82
  }
82
83
 
@@ -335,6 +336,7 @@ function emptyTimeFilteredStats(): TimeFilteredStats {
335
336
  return {
336
337
  providers: new Map(),
337
338
  totals: { sessions: 0, messages: 0, cost: 0, tokens: emptyTokens() },
339
+ dailySpend: new Map(),
338
340
  insights: { insights: [] },
339
341
  };
340
342
  }
@@ -422,6 +424,10 @@ function addMessagesToUsageData(
422
424
  accumulateStats(providerStats, msg.cost, tokens);
423
425
 
424
426
  accumulateStats(stats.totals, msg.cost, tokens);
427
+ if (msg.cost > 0 && msg.timestamp > 0) {
428
+ const dayKey = new Date(msg.timestamp).toISOString().slice(0, 10);
429
+ stats.dailySpend.set(dayKey, (stats.dailySpend.get(dayKey) ?? 0) + msg.cost);
430
+ }
425
431
  sessionContributed[period] = true;
426
432
 
427
433
  const raw = rawByPeriod[period];
@@ -753,6 +759,61 @@ function getTableLayout(width: number): TableLayout {
753
759
  };
754
760
  }
755
761
 
762
+ // Visual shell inspired by robhowley/pi-userland packages/pi-openrouter
763
+ // overlay/chart helpers, kept local-session-only for dm-usage.
764
+ function renderPanel(title: string, rows: string[], width: number, theme: Theme): string[] {
765
+ const safeWidth = Math.max(Math.floor(width), 0);
766
+ if (safeWidth < 12) {
767
+ return clampLines([theme.fg("accent", theme.bold(title)), ...rows, ""], safeWidth);
768
+ }
769
+
770
+ const innerWidth = Math.max(safeWidth - 2, 1);
771
+ const titleText = ` ${title} `;
772
+ const visibleTitle = truncateToWidth(titleText, Math.max(innerWidth - 1, 1), "");
773
+ const titleWidth = visibleWidth(visibleTitle);
774
+ const topRight = Math.max(innerWidth - titleWidth, 0);
775
+ const top = `╭${visibleTitle}${"─".repeat(topRight)}╮`;
776
+ const bottom = `╰${"─".repeat(innerWidth)}╯`;
777
+ const body = rows.length > 0 ? rows : [theme.fg("dim", "No data")];
778
+
779
+ return [
780
+ theme.fg("border", top),
781
+ ...body.map((line) => panelRow(line, innerWidth, theme)),
782
+ theme.fg("border", bottom),
783
+ "",
784
+ ];
785
+ }
786
+
787
+ function panelRow(content: string, innerWidth: number, theme: Theme): string {
788
+ const fitted = truncateToWidth(content, innerWidth);
789
+ const padding = Math.max(innerWidth - visibleWidth(fitted), 0);
790
+ return `${theme.fg("border", "│")}${fitted}${" ".repeat(padding)}${theme.fg("border", "│")}`;
791
+ }
792
+
793
+ function renderSpendSparkline(dailySpend: Map<string, number>, maxWidth: number): string {
794
+ if (dailySpend.size === 0) return "No spend data";
795
+
796
+ const sortedDays = Array.from(dailySpend.keys()).sort();
797
+ const visibleDays = sortedDays.slice(-Math.max(1, Math.min(30, maxWidth)));
798
+ const values = visibleDays.map((day) => dailySpend.get(day) ?? 0);
799
+ const max = Math.max(...values);
800
+ if (max <= 0) return "No spend";
801
+
802
+ const blocks = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"];
803
+ return values
804
+ .map((value) => {
805
+ const idx = Math.max(0, Math.min(blocks.length - 1, Math.ceil((value / max) * blocks.length) - 1));
806
+ return blocks[idx];
807
+ })
808
+ .join("");
809
+ }
810
+
811
+ function formatDailyAverage(stats: TimeFilteredStats): string {
812
+ const days = stats.dailySpend.size;
813
+ if (days === 0) return "avg/day -";
814
+ return `avg/day ${formatCost(stats.totals.cost / days)}`;
815
+ }
816
+
756
817
  // =============================================================================
757
818
  // Component
758
819
  // =============================================================================
@@ -846,8 +907,9 @@ class UsageComponent {
846
907
  if (this.viewMode === "insights") {
847
908
  return clampLines(
848
909
  [
849
- ...this.renderTitle(),
910
+ ...this.renderTitle(width),
850
911
  ...this.renderTabs(width, getTableLayout(width)),
912
+ ...this.renderSpendChart(width),
851
913
  ...this.renderInsights(width),
852
914
  ...this.renderHelp(width),
853
915
  ],
@@ -858,7 +920,7 @@ class UsageComponent {
858
920
  const layout = getTableLayout(width);
859
921
  return clampLines(
860
922
  [
861
- ...this.renderTitle(),
923
+ ...this.renderTitle(width),
862
924
  ...this.renderTabs(width, layout),
863
925
  ...this.renderHeader(layout),
864
926
  ...this.renderRows(layout),
@@ -870,10 +932,34 @@ class UsageComponent {
870
932
  );
871
933
  }
872
934
 
873
- private renderTitle(): string[] {
935
+ private renderTitle(width: number): string[] {
874
936
  const th = this.theme;
937
+ const stats = this.data[this.activeTab];
875
938
  const label = this.viewMode === "insights" ? "Usage Insights" : "Usage Statistics";
876
- return [th.fg("accent", th.bold(label)), ""];
939
+ return renderPanel(
940
+ "DuckMind Usage",
941
+ [
942
+ `${th.fg("accent", th.bold(label))} · ${TAB_LABELS[this.activeTab]}`,
943
+ `Spend ${formatCost(stats.totals.cost)} · ${formatNumber(stats.totals.messages)} messages · ${formatTokens(stats.totals.tokens.total)} tokens`,
944
+ `Providers ${formatNumber(stats.providers.size)} · Sessions ${formatNumber(stats.totals.sessions)} · ${formatDailyAverage(stats)}`,
945
+ ],
946
+ width,
947
+ th
948
+ );
949
+ }
950
+
951
+ private renderSpendChart(width: number): string[] {
952
+ const th = this.theme;
953
+ const stats = this.data[this.activeTab];
954
+ return renderPanel(
955
+ "Daily Spend",
956
+ [
957
+ th.fg("accent", renderSpendSparkline(stats.dailySpend, Math.max(width - 4, 10))),
958
+ th.fg("dim", "Local session spend, last 30 active UTC days"),
959
+ ],
960
+ width,
961
+ th
962
+ );
877
963
  }
878
964
 
879
965
  private renderInsights(width: number): string[] {
@@ -569,9 +569,9 @@
569
569
  "license": "MIT"
570
570
  },
571
571
  "node_modules/nwsapi": {
572
- "version": "2.2.23",
573
- "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz",
574
- "integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==",
572
+ "version": "2.2.24",
573
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.24.tgz",
574
+ "integrity": "sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A==",
575
575
  "license": "MIT"
576
576
  },
577
577
  "node_modules/parse5": {
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007-2025 Diego Perini (http://www.iport.it/)
1
+ Copyright (c) 2007-2026 Diego Perini (http://www.iport.it/)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nwsapi",
3
- "version": "2.2.23",
3
+ "version": "2.2.24",
4
4
  "description": "Fast CSS Selectors API Engine",
5
5
  "homepage": "https://javascript.nwbox.com/nwsapi/",
6
6
  "main": "./src/nwsapi",
@@ -1,13 +1,13 @@
1
1
  /*
2
- * Copyright (C) 2007-2025 Diego Perini
2
+ * Copyright (C) 2007-2026 Diego Perini
3
3
  * All rights reserved.
4
4
  *
5
5
  * nwsapi.js - Fast CSS Selectors API Engine
6
6
  *
7
7
  * Author: Diego Perini <diego.perini at gmail com>
8
- * Version: 2.2.23
8
+ * Version: 2.2.24
9
9
  * Created: 20070722
10
- * Release: 20251205
10
+ * Release: 20260606
11
11
  *
12
12
  * License:
13
13
  * https://javascript.nwbox.com/nwsapi/MIT-LICENSE
@@ -30,15 +30,15 @@
30
30
 
31
31
  })(this, function Factory(global, Export) {
32
32
 
33
- var version = 'nwsapi-2.2.23',
33
+ var version = 'nwsapi-2.2.24',
34
34
 
35
35
  doc = global.document,
36
36
  root = doc.documentElement,
37
37
  slice = Array.prototype.slice,
38
38
 
39
- HSP = '[\\x20\\t]',
40
- VSP = '[\\r\\n\\f]',
41
- WSP = '[\\x20\\t\\r\\n\\f]',
39
+ HSP = '\\x20\\t',
40
+ VSP = '\\r\\n\\f',
41
+ WSP = '[' + HSP + VSP + ']',
42
42
 
43
43
  CFG = {
44
44
  // extensions
@@ -46,10 +46,6 @@
46
46
  combinators: '[\\x20\\t>+~](?=[^>+~])'
47
47
  },
48
48
 
49
- HAS = {
50
- nestedself: ':has\\x28(?::has\\x28|.*)\\x29)\\x29',
51
- },
52
-
53
49
  NOT = {
54
50
  // not enclosed in double/single/parens/square
55
51
  double_enc: '(?=(?:[^"]*["][^"]*["])*[^"]*$)',
@@ -81,9 +77,9 @@
81
77
 
82
78
  GROUPS = {
83
79
  // pseudo-classes requiring parameters
84
- linguistic: '(dir|lang)(?:\\x28\\s?([-\\w]{2,})\\s?\\x29)',
85
- logicalsel: '(is|where|matches|not|has)(?:\\x28\\s?(' + '[^()]*|.*' + ')\\s?\\x29)',
86
- treestruct: '(nth(?:-last)?(?:-child|-of\\-type))(?:\\x28\\s?(even|odd|(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)?)\\s?\\x29)',
80
+ linguistic: '(dir|lang)(?:\\x28\\s?([-\\w]{2,})\\s?(?:\\x29|$))',
81
+ logicalsel: '(is|where|matches|not|has)(?:\\x28\\s?(' + '[^()]*|.*' + ')\\s?(?:\\x29|$))',
82
+ treestruct: '(nth(?:-last)?(?:-child|-of\\-type))(?:\\x28\\s?(even|odd|(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)?)\\s?(?:\\x29|$))',
87
83
  // pseudo-classes not requiring parameters
88
84
  locationpc: '(any\\-link|link|visited|target|defined)\\b',
89
85
  useraction: '(hover|active|focus\\-within|focus\\-visible|focus)\\b',
@@ -336,7 +332,11 @@
336
332
 
337
333
  // convert escape sequence in a CSS string or identifier
338
334
  // to javascript string with javascript escape sequences
339
- convertEscapes =
335
+ escapeIdentifier =
336
+ // global.CSS && typeof global.CSS.escape == 'function' ?
337
+ // function(str) {
338
+ // return global.CSS.escape(str);
339
+ // } :
340
340
  function(str) {
341
341
  return REX.HasEscapes.test(str) ?
342
342
  str.replace(REX.FixEscapes,
@@ -708,15 +708,13 @@
708
708
 
709
709
  // non-ascii chars
710
710
  noascii = '[^\\x00-\\x9f]',
711
- // escaped chars
712
- escaped = '\\\\[^\\r\\n\\f0-9a-fA-F]',
713
711
  // unicode chars
714
- unicode = '\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|\\s)?',
712
+ unicode = '\\\\[0-9a-fA-F]{1,6}',
715
713
 
716
714
  // can start with single/double dash
717
715
  // but it can not start with a digit
718
- identifier = '-?(?:[a-zA-Z_-]|' + noascii + '|' + escaped + '|' + unicode + ')' +
719
- '(?:-{2}|[0-9]|[a-zA-Z_-]|' + noascii + '|' + escaped + '|' + unicode + ')*',
716
+ identifier = '(?:-|--|' + unicode + '[' + HSP + ']' +
717
+ '?|\\\\[^' + VSP + ']|' + noascii + '|[\\w-])+',
720
718
 
721
719
  pseudonames = '[-\\w]+',
722
720
  pseudoparms = '(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)',
@@ -902,7 +900,7 @@
902
900
  compileSelector =
903
901
  function(expression, source, mode, callback) {
904
902
 
905
- var a, b, n, f, name, NS, referenceElement,
903
+ var a, b, n, f, k = 0, name, NS, referenceElement,
906
904
  compat, expr, match, result, status, symbol, test,
907
905
  type, selector = expression, vars;
908
906
 
@@ -915,6 +913,8 @@
915
913
 
916
914
  while (selector) {
917
915
 
916
+ ++k;
917
+
918
918
  // get namespace prefix if present or get first char of selector
919
919
  symbol = STD.apimethods.test(selector) ? '|' : selector[0];
920
920
 
@@ -978,7 +978,7 @@
978
978
  // whitespace separated list but value contains space
979
979
  break;
980
980
  } else if (match[4]) {
981
- match[4] = convertEscapes(match[4]).replace(REX.RegExpChar, '\\$&');
981
+ match[4] = escapeIdentifier(match[4]).replace(REX.RegExpChar, '\\$&');
982
982
  }
983
983
  type = match[5] == 'i' || (HTML_DOCUMENT && HTML_TABLE[expr.toLowerCase()]) ? 'i' : '';
984
984
  source = 'if((' +
@@ -992,14 +992,14 @@
992
992
  // E ~ F (F relative sibling of E)
993
993
  case '~':
994
994
  match = selector.match(Patterns.relative);
995
- source = 'while(e&&(e=e.previousElementSibling)){' + source + '}';
995
+ source = 'var N' + k + '=e;while(e&&(e=e.previousElementSibling)){' + source + '}e=N' + k + ';';
996
996
  break;
997
997
 
998
998
  // *** Adjacent sibling combinator
999
999
  // E + F (F adiacent sibling of E)
1000
1000
  case '+':
1001
1001
  match = selector.match(Patterns.adjacent);
1002
- source = 'if(e&&(e=e.previousElementSibling)){' + source + '}';
1002
+ source = 'var N' + k + '=e;if(e&&(e=e.previousElementSibling)){' + source + '}e=N' + k + ';';
1003
1003
  break;
1004
1004
 
1005
1005
  // *** Descendant combinator
@@ -1007,14 +1007,14 @@
1007
1007
  case '\x09':
1008
1008
  case '\x20':
1009
1009
  match = selector.match(Patterns.ancestor);
1010
- source = 'while(e&&(e=e.parentElement)){' + source + '}';
1010
+ source = 'var N' + k + '=e;while(e&&(e=e.parentElement)){' + source + '}e=N' + k + ';';
1011
1011
  break;
1012
1012
 
1013
1013
  // *** Child combinator
1014
1014
  // E > F (F children of E)
1015
1015
  case '>':
1016
1016
  match = selector.match(Patterns.children);
1017
- source = 'if(e&&(e=e.parentElement)){' + source + '}';
1017
+ source = 'var N' + k + '=e;if(e&&(e=e.parentElement)){' + source + '}e=N' + k + ';';
1018
1018
  break;
1019
1019
 
1020
1020
  // *** user supplied combinators extensions
@@ -1160,8 +1160,7 @@
1160
1160
  '.querySelectorAll("*' + expr + '")' : '.children') +
1161
1161
  ').includes(e.nextElementSibling)){' + source + '}';
1162
1162
  } else {
1163
- source = 'if(e.querySelector(":scope ' + expr + '"))' +
1164
- '{' + source + '}';
1163
+ source = 'if(s.first(":scope ' + expr + '",e)){' + source + '}';
1165
1164
  }
1166
1165
  break;
1167
1166
  default:
@@ -1534,8 +1533,8 @@
1534
1533
  }
1535
1534
  return selectors.replace(/:scope/i,
1536
1535
  (element.localName) +
1537
- (element.id ? '#' + escape(element.id) : '') +
1538
- (element.className ? '.' + escape(element.classList[0]) : ''));
1536
+ (element.id ? '#' + escapeIdentifier(element.id) : '') +
1537
+ (element.className ? '.' + escapeIdentifier(element.classList[0]) : ''));
1539
1538
  },
1540
1539
 
1541
1540
  // equivalent of w3c 'closest' method
@@ -1578,6 +1577,9 @@
1578
1577
  } else if (arguments[0] === '') {
1579
1578
  emit('\'\'' + qsInvalid);
1580
1579
  return Config.VERBOSITY ? undefined : (type ? none : false);
1580
+ } else if (/^[.#]?\d/.test(selectors)) {
1581
+ emit('\'\'' + qsInvalid);
1582
+ return Config.VERBOSITY ? undefined : (type ? none : false);
1581
1583
  }
1582
1584
 
1583
1585
  // input NULL or UNDEFINED
@@ -1585,12 +1587,8 @@
1585
1587
  selectors = '' + selectors;
1586
1588
  }
1587
1589
 
1588
- if ((/:scope/i).test(selectors)) {
1589
- selectors = makeref(selectors, Snapshot.from);
1590
- }
1591
-
1592
1590
  // normalize input string
1593
- parsed = unescape(selectors).
1591
+ parsed = selectors.
1594
1592
  replace(/\x00|\\$/g, '\ufffd').
1595
1593
  replace(REX.CombineWSP, '\x20').
1596
1594
  replace(REX.PseudosWSP, '$1').
@@ -1741,7 +1739,7 @@
1741
1739
  }
1742
1740
 
1743
1741
  nodeset[i] = token[1] + token[2];
1744
- token[2] = unescapeIdentifier(token[2]);
1742
+ token[2] = unescapeIdentifier(token[2]);
1745
1743
  htmlset[i] = compat[token[1]](context, token[2]);
1746
1744
  factory[i] = compile(optimized[i], true, null);
1747
1745
 
@@ -1903,6 +1901,7 @@
1903
1901
 
1904
1902
  first: first,
1905
1903
  match: match,
1904
+ select: select,
1906
1905
 
1907
1906
  ancestor: ancestor,
1908
1907
 
@@ -1943,9 +1942,10 @@
1943
1942
  byTag: byTag,
1944
1943
  byClass: byClass,
1945
1944
 
1946
- match: match,
1947
1945
  first: first,
1946
+ match: match,
1948
1947
  select: select,
1948
+
1949
1949
  closest: ancestor,
1950
1950
 
1951
1951
  compile: compile,
@@ -584,9 +584,9 @@
584
584
  "license": "MIT"
585
585
  },
586
586
  "node_modules/nwsapi": {
587
- "version": "2.2.23",
588
- "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz",
589
- "integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==",
587
+ "version": "2.2.24",
588
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.24.tgz",
589
+ "integrity": "sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A==",
590
590
  "license": "MIT"
591
591
  },
592
592
  "node_modules/parse5": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckmind/dm-darwin-x64",
3
- "version": "0.35.6",
3
+ "version": "0.35.8",
4
4
  "description": "DuckMind (dm) binary payload for darwin x64",
5
5
  "license": "MIT",
6
6
  "os": [