@esposter/shared 2.15.1 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +23 -23
  3. package/dist/index.d.ts +177 -99
  4. package/dist/index.js +14036 -3956
  5. package/package.json +4 -3
package/dist/index.d.ts CHANGED
@@ -1,12 +1,6 @@
1
1
  import { z } from "zod";
2
+ import { HTMLElement } from "node-html-parser";
2
3
 
3
- //#region src/models/environment/Environment.d.ts
4
- declare enum Environment {
5
- development = "development",
6
- production = "production",
7
- test = "test",
8
- }
9
- //#endregion
10
4
  //#region src/models/shared/Operation.d.ts
11
5
  declare enum Operation {
12
6
  Create = "Create",
@@ -23,16 +17,47 @@ declare class InvalidOperationError extends Error {
23
17
  }
24
18
  //#endregion
25
19
  //#region src/models/error/NotFoundError.d.ts
26
- declare class NotFoundError<T extends string = string> extends Error {
27
- constructor(name: T, id: string);
20
+ declare class NotFoundError<T$1 extends string = string> extends Error {
21
+ constructor(name: T$1, id: string);
28
22
  }
29
23
  //#endregion
30
24
  //#region src/models/error/NotInitializedError.d.ts
31
- declare class NotInitializedError<T extends string = string> extends Error {
32
- constructor(name: T);
25
+ declare class NotInitializedError<T$1 extends string = string> extends Error {
26
+ constructor(name: T$1);
33
27
  }
34
28
  //#endregion
35
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/primitive.d.ts
29
+ //#region src/models/router/RoutePath.d.ts
30
+ declare const RoutePath: {
31
+ readonly About: "/about";
32
+ readonly Anime: "/anime";
33
+ readonly Calendar: "/calendar";
34
+ readonly Clicker: "/clicker";
35
+ readonly Dashboard: "/dashboard";
36
+ readonly DashboardEditor: "/dashboard/editor";
37
+ readonly Docs: "/docs";
38
+ readonly Dungeons: "/dungeons";
39
+ readonly EmailEditor: "/email-editor";
40
+ readonly FlowchartEditor: "/flowchart-editor";
41
+ readonly Github: "https://github.com/Esposter/Esposter";
42
+ readonly Index: "/";
43
+ readonly Login: "/login";
44
+ readonly Messages: (id: string) => string;
45
+ readonly MessagesIndex: "/messages";
46
+ readonly MessagesInvite: (code: string) => string;
47
+ readonly MessagesMessage: (id: string, rowKey: string) => string;
48
+ readonly Post: (id: string) => string;
49
+ readonly PostCreate: "/post/create";
50
+ readonly PostUpdate: (id: string) => string;
51
+ readonly PrivacyPolicy: "/privacy-policy";
52
+ readonly Survey: (id: string) => string;
53
+ readonly Surveyer: "/surveyer";
54
+ readonly TableEditor: "/table-editor";
55
+ readonly UserSettings: "/user/settings";
56
+ readonly WebpageEditor: "/webpage-editor";
57
+ };
58
+ type RoutePath = typeof RoutePath;
59
+ //#endregion
60
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/primitive.d.ts
36
61
  /**
37
62
  Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
38
63
 
@@ -40,18 +65,18 @@ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/
40
65
  */
41
66
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
42
67
  //#endregion
43
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/basic.d.ts
68
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/basic.d.ts
44
69
  /**
45
70
  Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
46
71
 
47
72
  @category Class
48
73
  */
49
- type Class<T, Arguments extends unknown[] = any[]> = {
50
- prototype: Pick<T, keyof T>;
51
- new (...arguments_: Arguments): T;
74
+ type Class<T$1, Arguments extends unknown[] = any[]> = {
75
+ prototype: Pick<T$1, keyof T$1>;
76
+ new (...arguments_: Arguments): T$1;
52
77
  };
53
78
  //#endregion
54
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-any.d.ts
79
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-any.d.ts
55
80
  /**
56
81
  Returns a boolean for whether the given type is `any`.
57
82
 
@@ -80,9 +105,9 @@ const anyA = get(anyObject, 'a');
80
105
  @category Type Guard
81
106
  @category Utilities
82
107
  */
83
- type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
108
+ type IsAny<T$1> = 0 extends 1 & NoInfer<T$1> ? true : false;
84
109
  //#endregion
85
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-optional-key-of.d.ts
110
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-optional-key-of.d.ts
86
111
  /**
87
112
  Returns a boolean for whether the given key is an optional key of type.
88
113
 
@@ -123,9 +148,9 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
123
148
  @category Type Guard
124
149
  @category Utilities
125
150
  */
126
- type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
151
+ type IsOptionalKeyOf<Type extends object, Key$1 extends keyof Type> = IsAny<Type | Key$1> extends true ? never : Key$1 extends keyof Type ? Type extends Record<Key$1, Type[Key$1]> ? false : true : false;
127
152
  //#endregion
128
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/optional-keys-of.d.ts
153
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/optional-keys-of.d.ts
129
154
  /**
130
155
  Extract all optional keys from the given type.
131
156
 
@@ -163,7 +188,7 @@ type OptionalKeysOf<Type extends object> = Type extends unknown // For distribut
163
188
  ? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
164
189
  : never;
165
190
  //#endregion
166
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/required-keys-of.d.ts
191
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/required-keys-of.d.ts
167
192
  /**
168
193
  Extract all required keys from the given type.
169
194
 
@@ -191,7 +216,7 @@ const validator2 = createValidation<User>('surname', value => value.length < 25)
191
216
  type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
192
217
  ? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
193
218
  //#endregion
194
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-never.d.ts
219
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-never.d.ts
195
220
  /**
196
221
  Returns a boolean for whether the given type is `never`.
197
222
 
@@ -233,9 +258,9 @@ endIfEqual('abc', '123');
233
258
  @category Type Guard
234
259
  @category Utilities
235
260
  */
236
- type IsNever<T> = [T] extends [never] ? true : false;
261
+ type IsNever<T$1> = [T$1] extends [never] ? true : false;
237
262
  //#endregion
238
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/if.d.ts
263
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/if.d.ts
239
264
  /**
240
265
  An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
241
266
 
@@ -290,12 +315,47 @@ type B = IfEqual<string, number, 'equal', 'not equal'>;
290
315
  //=> 'not equal'
291
316
  ```
292
317
 
318
+ Note: Sometimes using the `If` type can make an implementation non–tail-recursive, which can impact performance. In such cases, it’s better to use a conditional directly. Refer to the following example:
319
+
320
+ @example
321
+ ```
322
+ import type {If, IsEqual, StringRepeat} from 'type-fest';
323
+
324
+ type HundredZeroes = StringRepeat<'0', 100>;
325
+
326
+ // The following implementation is not tail recursive
327
+ type Includes<S extends string, Char extends string> =
328
+ S extends `${infer First}${infer Rest}`
329
+ ? If<IsEqual<First, Char>,
330
+ 'found',
331
+ Includes<Rest, Char>>
332
+ : 'not found';
333
+
334
+ // Hence, instantiations with long strings will fail
335
+ // @ts-expect-error
336
+ type Fails = Includes<HundredZeroes, '1'>;
337
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
338
+ // Error: Type instantiation is excessively deep and possibly infinite.
339
+
340
+ // However, if we use a simple conditional instead of `If`, the implementation becomes tail-recursive
341
+ type IncludesWithoutIf<S extends string, Char extends string> =
342
+ S extends `${infer First}${infer Rest}`
343
+ ? IsEqual<First, Char> extends true
344
+ ? 'found'
345
+ : IncludesWithoutIf<Rest, Char>
346
+ : 'not found';
347
+
348
+ // Now, instantiations with long strings will work
349
+ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
350
+ //=> 'not found'
351
+ ```
352
+
293
353
  @category Type Guard
294
354
  @category Utilities
295
355
  */
296
356
  type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
297
357
  //#endregion
298
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/internal/type.d.ts
358
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/internal/type.d.ts
299
359
  /**
300
360
  Matches any primitive, `void`, `Date`, or `RegExp` value.
301
361
  */
@@ -308,41 +368,12 @@ Needed to handle the case of a single call signature with properties.
308
368
  Multiple call signatures cannot currently be supported due to a TypeScript limitation.
309
369
  @see https://github.com/microsoft/TypeScript/issues/29732
310
370
  */
311
- type HasMultipleCallSignatures<T extends (...arguments_: any[]) => unknown> = T extends {
371
+ type HasMultipleCallSignatures<T$1 extends (...arguments_: any[]) => unknown> = T$1 extends {
312
372
  (...arguments_: infer A): unknown;
313
373
  (...arguments_: infer B): unknown;
314
374
  } ? B extends A ? A extends B ? false : true : true : false;
315
375
  //#endregion
316
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/is-equal.d.ts
317
- /**
318
- Returns a boolean for whether the two given types are equal.
319
-
320
- @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
321
- @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
322
-
323
- Use-cases:
324
- - If you want to make a conditional branch based on the result of a comparison of two types.
325
-
326
- @example
327
- ```
328
- import type {IsEqual} from 'type-fest';
329
-
330
- // This type returns a boolean for whether the given array includes the given item.
331
- // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
332
- type Includes<Value extends readonly any[], Item> =
333
- Value extends readonly [Value[0], ...infer rest]
334
- ? IsEqual<Value[0], Item> extends true
335
- ? true
336
- : Includes<rest, Item>
337
- : false;
338
- ```
339
-
340
- @category Type Guard
341
- @category Utilities
342
- */
343
- type IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
344
- //#endregion
345
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/simplify.d.ts
376
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/simplify.d.ts
346
377
  /**
347
378
  Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
348
379
 
@@ -397,12 +428,43 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
397
428
  ```
398
429
 
399
430
  @link https://github.com/microsoft/TypeScript/issues/15300
400
- @see SimplifyDeep
431
+ @see {@link SimplifyDeep}
401
432
  @category Object
402
433
  */
403
- type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
434
+ type Simplify<T$1> = { [KeyType in keyof T$1]: T$1[KeyType] } & {};
435
+ //#endregion
436
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-equal.d.ts
437
+ /**
438
+ Returns a boolean for whether the two given types are equal.
439
+
440
+ @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
441
+ @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
442
+
443
+ Use-cases:
444
+ - If you want to make a conditional branch based on the result of a comparison of two types.
445
+
446
+ @example
447
+ ```
448
+ import type {IsEqual} from 'type-fest';
449
+
450
+ // This type returns a boolean for whether the given array includes the given item.
451
+ // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
452
+ type Includes<Value extends readonly any[], Item> =
453
+ Value extends readonly [Value[0], ...infer rest]
454
+ ? IsEqual<Value[0], Item> extends true
455
+ ? true
456
+ : Includes<rest, Item>
457
+ : false;
458
+ ```
459
+
460
+ @category Type Guard
461
+ @category Utilities
462
+ */
463
+ type IsEqual<A$1, B$1> = [A$1, B$1] extends [infer AA, infer BB] ? [AA] extends [never] ? [BB] extends [never] ? true : false : [BB] extends [never] ? false : _IsEqual<AA, BB> : false;
464
+ // This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
465
+ type _IsEqual<A$1, B$1> = (<G>() => G extends A$1 & G | G ? 1 : 2) extends (<G>() => G extends B$1 & G | G ? 1 : 2) ? true : false;
404
466
  //#endregion
405
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/omit-index-signature.d.ts
467
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/omit-index-signature.d.ts
406
468
  /**
407
469
  Omit any index signatures from the given object type, leaving only explicitly defined properties.
408
470
 
@@ -490,12 +552,12 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
490
552
  // => { foo: 'bar'; qux?: 'baz' | undefined; }
491
553
  ```
492
554
 
493
- @see PickIndexSignature
555
+ @see {@link PickIndexSignature}
494
556
  @category Object
495
557
  */
496
558
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
497
559
  //#endregion
498
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/pick-index-signature.d.ts
560
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/pick-index-signature.d.ts
499
561
  /**
500
562
  Pick only index signatures from the given object type, leaving out all explicitly defined properties.
501
563
 
@@ -538,12 +600,12 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
538
600
  // }
539
601
  ```
540
602
 
541
- @see OmitIndexSignature
603
+ @see {@link OmitIndexSignature}
542
604
  @category Object
543
605
  */
544
606
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
545
607
  //#endregion
546
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/merge.d.ts
608
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/merge.d.ts
547
609
  // Merges two objects without worrying about index signatures.
548
610
  type SimpleMerge<Destination, Source> = { [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source;
549
611
 
@@ -583,7 +645,7 @@ export type FooBar = Merge<Foo, Bar>;
583
645
  */
584
646
  type Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
585
647
  //#endregion
586
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/internal/object.d.ts
648
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/internal/object.d.ts
587
649
  /**
588
650
  Merges user specified options with default options.
589
651
 
@@ -638,7 +700,7 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
638
700
  */
639
701
  type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? undefined extends SpecifiedOptions[Key] ? never : Key : Key]: SpecifiedOptions[Key] }> & Required<Options>>>>;
640
702
  //#endregion
641
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/except.d.ts
703
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/except.d.ts
642
704
  /**
643
705
  Filter out keys from an object.
644
706
 
@@ -666,7 +728,7 @@ type Filtered = Filter<'bar', 'foo'>;
666
728
 
667
729
  @see {Except}
668
730
  */
669
- type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
731
+ type Filter<KeyType$1, ExcludeType> = IsEqual<KeyType$1, ExcludeType> extends true ? never : (KeyType$1 extends ExcludeType ? never : KeyType$1);
670
732
  type ExceptOptions = {
671
733
  /**
672
734
  Disallow assigning non-specified properties.
@@ -735,7 +797,7 @@ type PostPayload = Except<UserData, 'email'>;
735
797
  type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
736
798
  type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
737
799
  //#endregion
738
- //#region ../../node_modules/.pnpm/type-fest@5.0.1/node_modules/type-fest/source/required-deep.d.ts
800
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/required-deep.d.ts
739
801
  /**
740
802
  Create a type from another type with all keys and nested keys set to required.
741
803
 
@@ -777,19 +839,19 @@ Note that types containing overloaded functions are not made deeply required due
777
839
  @category Set
778
840
  @category Map
779
841
  */
780
- type RequiredDeep<T> = T extends BuiltIns ? T : T extends Map<infer KeyType, infer ValueType> ? Map<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T extends Set<infer ItemType> ? Set<RequiredDeep<ItemType>> : T extends ReadonlyMap<infer KeyType, infer ValueType> ? ReadonlyMap<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T extends ReadonlySet<infer ItemType> ? ReadonlySet<RequiredDeep<ItemType>> : T extends WeakMap<infer KeyType, infer ValueType> ? WeakMap<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T extends WeakSet<infer ItemType> ? WeakSet<RequiredDeep<ItemType>> : T extends Promise<infer ValueType> ? Promise<RequiredDeep<ValueType>> : T extends ((...arguments_: any[]) => unknown) ? {} extends RequiredObjectDeep<T> ? T : HasMultipleCallSignatures<T> extends true ? T : ((...arguments_: Parameters<T>) => ReturnType<T>) & RequiredObjectDeep<T> : T extends object ? RequiredObjectDeep<T> : unknown;
842
+ type RequiredDeep<T$1> = T$1 extends BuiltIns ? T$1 : T$1 extends Map<infer KeyType, infer ValueType> ? Map<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T$1 extends Set<infer ItemType> ? Set<RequiredDeep<ItemType>> : T$1 extends ReadonlyMap<infer KeyType, infer ValueType> ? ReadonlyMap<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T$1 extends ReadonlySet<infer ItemType> ? ReadonlySet<RequiredDeep<ItemType>> : T$1 extends WeakMap<infer KeyType, infer ValueType> ? WeakMap<RequiredDeep<KeyType>, RequiredDeep<ValueType>> : T$1 extends WeakSet<infer ItemType> ? WeakSet<RequiredDeep<ItemType>> : T$1 extends Promise<infer ValueType> ? Promise<RequiredDeep<ValueType>> : T$1 extends ((...arguments_: any[]) => unknown) ? IsNever<keyof T$1> extends true ? T$1 : HasMultipleCallSignatures<T$1> extends true ? T$1 : ((...arguments_: Parameters<T$1>) => ReturnType<T$1>) & RequiredObjectDeep<T$1> : T$1 extends object ? RequiredObjectDeep<T$1> : unknown;
781
843
  type RequiredObjectDeep<ObjectType extends object> = { [KeyType in keyof ObjectType]-?: RequiredDeep<ObjectType[KeyType]> };
782
844
  //#endregion
783
845
  //#region src/util/types/PropertyNames.d.ts
784
- type PropertyNames<T> = RequiredDeep<{ [P in keyof T]: P }>;
846
+ type PropertyNames<T$1> = RequiredDeep<{ [P in keyof T$1]: P }>;
785
847
  //#endregion
786
848
  //#region src/models/shared/ItemEntityType.d.ts
787
- interface ItemEntityType<T extends string> {
788
- type: T;
849
+ interface ItemEntityType<T$1 extends string> {
850
+ type: T$1;
789
851
  }
790
852
  declare const ItemEntityTypePropertyNames: PropertyNames<ItemEntityType<string>>;
791
- declare const createItemEntityTypeSchema: <T extends z.ZodType<string>>(schema: T) => z.ZodObject<{
792
- type: T;
853
+ declare const createItemEntityTypeSchema: <T$1 extends z.ZodType<string>>(schema: T$1) => z.ZodObject<{
854
+ type: T$1;
793
855
  }>;
794
856
  //#endregion
795
857
  //#region src/models/shared/ItemMetadata.d.ts
@@ -814,19 +876,19 @@ declare abstract class Serializable {
814
876
  type DeepOmitArray<TArray extends unknown[], TKey> = { [P in keyof TArray]: DeepOmit<TArray[P], TKey> };
815
877
  //#endregion
816
878
  //#region src/util/types/DeepOmit.d.ts
817
- type DeepOmit<T, TKey> = T extends Primitive ? T : { [P in Exclude<keyof T, TKey>]: T[P] extends infer TP ? TP extends Date | Function | Primitive ? TP : TP extends unknown[] ? DeepOmitArray<TP, TKey> : Record<string, unknown> extends TP ? TP : DeepOmit<TP, TKey> : never };
879
+ type DeepOmit<T$1, TKey> = T$1 extends Primitive ? T$1 : { [P in Exclude<keyof T$1, TKey>]: T$1[P] extends infer TP ? TP extends Date | Function | Primitive ? TP : TP extends unknown[] ? DeepOmitArray<TP, TKey> : Record<string, unknown> extends TP ? TP : DeepOmit<TP, TKey> : never };
818
880
  //#endregion
819
881
  //#region src/util/types/DeepOptionalProperties.d.ts
820
- type DeepOptionalProperties<T> = { [K in keyof T as undefined extends T[K] ? K : never]?: DeepOptionalProperties<T[K]> };
882
+ type DeepOptionalProperties<T$1> = { [K in keyof T$1 as undefined extends T$1[K] ? K : never]?: DeepOptionalProperties<T$1[K]> };
821
883
  //#endregion
822
884
  //#region src/util/types/DeepRequiredProperties.d.ts
823
- type DeepRequiredProperties<T> = { [K in keyof T as undefined extends T[K] ? never : K]: DeepRequiredProperties<T[K]> };
885
+ type DeepRequiredProperties<T$1> = { [K in keyof T$1 as undefined extends T$1[K] ? never : K]: DeepRequiredProperties<T$1[K]> };
824
886
  //#endregion
825
887
  //#region src/util/types/DeepOptionalUndefined.d.ts
826
- type DeepOptionalUndefined<T> = T extends ((...args: unknown[]) => unknown) ? T : T extends (infer U)[] ? DeepOptionalUndefined<U>[] : T extends readonly (infer U)[] ? readonly DeepOptionalUndefined<U>[] : T extends Date ? T : T extends object ? keyof T extends never ? never : DeepOptionalProperties<T> extends Record<never, unknown> ? DeepRequiredProperties<T> : DeepRequiredProperties<T> extends Record<never, unknown> ? DeepOptionalProperties<T> : DeepOptionalProperties<T> & DeepRequiredProperties<T> : T;
888
+ type DeepOptionalUndefined<T$1> = T$1 extends ((...args: unknown[]) => unknown) ? T$1 : T$1 extends (infer U)[] ? DeepOptionalUndefined<U>[] : T$1 extends readonly (infer U)[] ? readonly DeepOptionalUndefined<U>[] : T$1 extends Date ? T$1 : T$1 extends object ? keyof T$1 extends never ? never : DeepOptionalProperties<T$1> extends Record<never, unknown> ? DeepRequiredProperties<T$1> : DeepRequiredProperties<T$1> extends Record<never, unknown> ? DeepOptionalProperties<T$1> : DeepOptionalProperties<T$1> & DeepRequiredProperties<T$1> : T$1;
827
889
  //#endregion
828
890
  //#region src/models/shared/ToData.d.ts
829
- type ToData<T extends Serializable> = DeepOptionalUndefined<DeepOmit<T, "toJSON">>;
891
+ type ToData<T$1 extends Serializable> = DeepOptionalUndefined<DeepOmit<T$1, "toJSON">>;
830
892
  //#endregion
831
893
  //#region src/models/shared/WithMetadata.d.ts
832
894
  interface WithMetadata<TBase extends Class<NonNullable<unknown>>> {
@@ -834,6 +896,18 @@ interface WithMetadata<TBase extends Class<NonNullable<unknown>>> {
834
896
  prototype: InstanceType<TBase> & ItemMetadata;
835
897
  }
836
898
  //#endregion
899
+ //#region src/services/app/constants.d.ts
900
+ declare const SITE_NAME = "Esposter";
901
+ //#endregion
902
+ //#region src/services/message/constants.d.ts
903
+ declare const MENTION_ID_ATTRIBUTE = "data-id";
904
+ declare const MENTION_LABEL_ATTRIBUTE = "data-label";
905
+ declare const MENTION_TYPE_ATTRIBUTE = "data-type";
906
+ declare const MENTION_TYPE = "mention";
907
+ //#endregion
908
+ //#region src/services/message/getMentions.d.ts
909
+ declare const getMentions: (message: string) => HTMLElement[];
910
+ //#endregion
837
911
  //#region src/services/prettier/css.d.ts
838
912
  declare const css: typeof String.raw;
839
913
  //#endregion
@@ -843,10 +917,8 @@ declare const html: typeof String.raw;
843
917
  //#region src/services/shared/applyItemMetadataMixin.d.ts
844
918
  declare const applyItemMetadataMixin: <TBase extends Class<NonNullable<unknown>>>(Base: TBase) => WithMetadata<TBase>;
845
919
  //#endregion
846
- //#region src/util/environment/constants.d.ts
847
- declare const IS_PRODUCTION: boolean;
848
- declare const IS_TEST: boolean;
849
- declare const IS_DEVELOPMENT: boolean;
920
+ //#region src/services/survey/constants.d.ts
921
+ declare const SURVEY_DISPLAY_NAME = "Surveyer";
850
922
  //#endregion
851
923
  //#region src/util/environment/getIsServer.d.ts
852
924
  declare const getIsServer: () => boolean;
@@ -855,7 +927,7 @@ declare const getIsServer: () => boolean;
855
927
  declare const ID_SEPARATOR = "|";
856
928
  //#endregion
857
929
  //#region src/util/object/getPropertyNames.d.ts
858
- declare const getPropertyNames: <T>() => PropertyNames<T>;
930
+ declare const getPropertyNames: <T$1>() => PropertyNames<T$1>;
859
931
  //#endregion
860
932
  //#region src/util/object/isPlainObject.d.ts
861
933
  declare const isPlainObject: (data: unknown) => data is object;
@@ -864,16 +936,16 @@ declare const isPlainObject: (data: unknown) => data is object;
864
936
  declare const jsonDateParse: (text: string) => any;
865
937
  //#endregion
866
938
  //#region src/util/types/MergeObjectsStrict.d.ts
867
- type MergeObjectsStrict<T extends object[]> = T extends [infer TFirst, infer TSecond, ...infer TRemaining] ? TSecond extends { [K in keyof TSecond]: K extends keyof TFirst ? never : TSecond[K] } ? TRemaining extends object[] ? MergeObjectsStrict<[TSecond, ...TRemaining]> & TFirst : TFirst & TSecond : never : T extends [infer TFirst] ? TFirst : never;
939
+ type MergeObjectsStrict<T$1 extends object[]> = T$1 extends [infer TFirst, infer TSecond, ...infer TRemaining] ? TSecond extends { [K in keyof TSecond]: K extends keyof TFirst ? never : TSecond[K] } ? TRemaining extends object[] ? MergeObjectsStrict<[TSecond, ...TRemaining]> & TFirst : TFirst & TSecond : never : T$1 extends [infer TFirst] ? TFirst : never;
868
940
  //#endregion
869
941
  //#region src/util/object/mergeObjectsStrict.d.ts
870
- declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
942
+ declare const mergeObjectsStrict: <T$1 extends object[]>(...objects: T$1) => MergeObjectsStrict<T$1>;
871
943
  //#endregion
872
944
  //#region src/util/reactivity/getRawData.d.ts
873
- declare const getRawData: <T>(data: T) => T;
945
+ declare const getRawData: <T$1>(data: T$1) => T$1;
874
946
  //#endregion
875
947
  //#region src/util/reactivity/toRawDeep.d.ts
876
- declare const toRawDeep: <T extends object>(data: T) => T;
948
+ declare const toRawDeep: <T$1 extends object>(data: T$1) => T$1;
877
949
  //#endregion
878
950
  //#region src/util/regex/escapeRegExp.d.ts
879
951
  declare const escapeRegExp: (string: string) => string;
@@ -888,10 +960,13 @@ declare const streamToText: (readable: NodeJS.ReadableStream) => Promise<string>
888
960
  type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : S;
889
961
  //#endregion
890
962
  //#region src/util/text/toKebabCase.d.ts
891
- declare const toKebabCase: <T extends string>(string: T) => CamelToKebab<T>;
963
+ declare const toKebabCase: <T$1 extends string>(string: T$1) => CamelToKebab<T$1>;
964
+ //#endregion
965
+ //#region src/util/text/truncate.d.ts
966
+ declare const truncate: (string: string, length: number) => string;
892
967
  //#endregion
893
968
  //#region src/util/text/uncapitalize.d.ts
894
- declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
969
+ declare const uncapitalize: <T$1 extends string>(string: T$1) => Uncapitalize<T$1>;
895
970
  //#endregion
896
971
  //#region src/util/time/hrtime.d.ts
897
972
  declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
@@ -900,10 +975,10 @@ declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
900
975
  declare const now: () => string;
901
976
  //#endregion
902
977
  //#region src/util/types/FunctionProperties.d.ts
903
- type FunctionProperties<T> = { [K in keyof T]: T[K] extends Function ? K : never };
978
+ type FunctionProperties<T$1> = { [K in keyof T$1]: T$1[K] extends Function ? K : never };
904
979
  //#endregion
905
980
  //#region src/util/types/ExcludeFunctionProperties.d.ts
906
- type ExcludeFunctionProperties<T> = Except<T, FunctionProperties<T>[keyof T]>;
981
+ type ExcludeFunctionProperties<T$1> = Except<T$1, FunctionProperties<T$1>[keyof T$1]>;
907
982
  //#endregion
908
983
  //#region src/util/types/KebabToCamel.d.ts
909
984
  type KebabToCamel<S extends string> = S extends `${infer T}-${infer U}` ? `${T}${Capitalize<KebabToCamel<U>>}` : S;
@@ -911,23 +986,26 @@ type KebabToCamel<S extends string> = S extends `${infer T}-${infer U}` ? `${T}$
911
986
  //#region src/util/types/MapValue.d.ts
912
987
  type MapValue<BaseType> = BaseType extends Map<unknown, infer ValueType> ? ValueType : never;
913
988
  //#endregion
989
+ //#region src/util/types/PartialByKeys.d.ts
990
+ type PartialByKeys<T$1, K$1 extends keyof T$1 = keyof T$1> = Except<T$1, K$1> & Partial<Pick<T$1, Extract<keyof T$1, K$1>>>;
991
+ //#endregion
914
992
  //#region src/util/types/TupleSplitHead.d.ts
915
- type TupleSplitHead<T extends unknown[], N extends number> = T["length"] extends N ? T : T extends [...infer R, unknown] ? TupleSplitHead<R, N> : never;
993
+ type TupleSplitHead<T$1 extends unknown[], N extends number> = T$1["length"] extends N ? T$1 : T$1 extends [...infer R, unknown] ? TupleSplitHead<R, N> : never;
916
994
  //#endregion
917
995
  //#region src/util/types/TupleSplitTail.d.ts
918
- type TupleSplitTail<T, N extends number, O extends unknown[] = []> = O["length"] extends N ? T : T extends [infer F, ...infer R] ? TupleSplitTail<[...R], N, [...O, F]> : never;
996
+ type TupleSplitTail<T$1, N extends number, O extends unknown[] = []> = O["length"] extends N ? T$1 : T$1 extends [infer F, ...infer R] ? TupleSplitTail<[...R], N, [...O, F]> : never;
919
997
  //#endregion
920
998
  //#region src/util/types/TupleSplit.d.ts
921
- type TupleSplit<T extends unknown[], N extends number> = [TupleSplitHead<T, N>, TupleSplitTail<T, N>];
999
+ type TupleSplit<T$1 extends unknown[], N extends number> = [TupleSplitHead<T$1, N>, TupleSplitTail<T$1, N>];
922
1000
  //#endregion
923
1001
  //#region src/util/types/SkipFirst.d.ts
924
- type SkipFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[1];
1002
+ type SkipFirst<T$1 extends unknown[], N extends number> = TupleSplit<T$1, N>[1];
925
1003
  //#endregion
926
1004
  //#region src/util/types/TakeFirst.d.ts
927
- type TakeFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[0];
1005
+ type TakeFirst<T$1 extends unknown[], N extends number> = TupleSplit<T$1, N>[0];
928
1006
  //#endregion
929
1007
  //#region src/util/types/TupleSlice.d.ts
930
- type TupleSlice<T extends unknown[], S extends number, E extends number = T["length"]> = SkipFirst<TakeFirst<T, E>, S>;
1008
+ type TupleSlice<T$1 extends unknown[], S extends number, E extends number = T$1["length"]> = SkipFirst<TakeFirst<T$1, E>, S>;
931
1009
  //#endregion
932
1010
  //#region src/util/validation/exhaustiveGuard.d.ts
933
1011
  declare const exhaustiveGuard: (value: never) => never;
@@ -939,4 +1017,4 @@ declare const UUIDV4_REGEX: RegExp;
939
1017
  //#region src/util/id/uuid/uuidValidateV4.d.ts
940
1018
  declare const uuidValidateV4: (uuid: string) => boolean;
941
1019
  //#endregion
942
- export { CamelToKebab, DeepOmit, DeepOmitArray, DeepOptionalProperties, DeepOptionalUndefined, DeepRequiredProperties, Environment, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, IS_DEVELOPMENT, IS_PRODUCTION, IS_TEST, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KebabToCamel, MapValue, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PropertyNames, Serializable, SkipFirst, TakeFirst, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, WithMetadata, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getIsServer, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, toKebabCase, toRawDeep, uncapitalize, uuidValidateV4 };
1020
+ export { CamelToKebab, DeepOmit, DeepOmitArray, DeepOptionalProperties, DeepOptionalUndefined, DeepRequiredProperties, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KebabToCamel, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MapValue, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PartialByKeys, PropertyNames, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, SkipFirst, TakeFirst, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, WithMetadata, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };