@arisutalk/character-spec 0.0.10 → 0.0.12

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 (36) hide show
  1. package/dist/types/v0/Character/Assets.d.ts +21 -0
  2. package/dist/types/v0/Character/Assets.d.ts.map +1 -0
  3. package/dist/types/v0/Character/Character.d.ts +161 -0
  4. package/dist/types/v0/Character/Character.d.ts.map +1 -0
  5. package/dist/types/v0/Character/Chat.d.ts +37 -0
  6. package/dist/types/v0/Character/Chat.d.ts.map +1 -0
  7. package/dist/types/v0/Character/Lorebook.d.ts +101 -0
  8. package/dist/types/v0/Character/Lorebook.d.ts.map +1 -0
  9. package/dist/types/v0/Character/Message.d.ts +40 -0
  10. package/dist/types/v0/Character/Message.d.ts.map +1 -0
  11. package/dist/types/v0/Character/Meta.d.ts +9 -0
  12. package/dist/types/v0/Character/Meta.d.ts.map +1 -0
  13. package/dist/types/v0/Character/index.d.ts +12 -0
  14. package/dist/types/v0/Character/index.d.ts.map +1 -0
  15. package/dist/types/v0/Executables/Executable.d.ts +73 -0
  16. package/dist/types/v0/Executables/Executable.d.ts.map +1 -0
  17. package/dist/types/v0/Executables/ReplaceHook.d.ts +93 -0
  18. package/dist/types/v0/Executables/ReplaceHook.d.ts.map +1 -0
  19. package/dist/types/v0/Executables/index.d.ts +3 -0
  20. package/dist/types/v0/Executables/index.d.ts.map +1 -0
  21. package/dist/types/v0/index.d.ts +4 -0
  22. package/dist/types/v0/index.d.ts.map +1 -0
  23. package/dist/types/v0/utils.d.ts +38 -0
  24. package/dist/types/v0/utils.d.ts.map +1 -0
  25. package/dist/v0/Character/Assets.d.ts +19 -3
  26. package/dist/v0/Character/Character.d.ts +153 -3
  27. package/dist/v0/Character/Chat.d.ts +32 -2
  28. package/dist/v0/Character/Lorebook.d.ts +70 -4
  29. package/dist/v0/Character/Message.d.ts +35 -3
  30. package/dist/v0/Character/Meta.d.ts +9 -2
  31. package/dist/v0/Executables/Executable.d.ts +70 -2
  32. package/dist/v0/Executables/ReplaceHook.d.ts +93 -4
  33. package/dist/v0/utils.d.ts +21 -4
  34. package/dist/v0.js +30 -6
  35. package/dist/v0.js.map +1 -1
  36. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  // Auto-generated TypeScript declarations from Zod schemas. DO NOT EDIT.
2
2
  // Regenerate with: pnpm generate-types
3
3
 
4
- import type { ZodType } from "zod";
4
+ import { z, type ZodType } from "zod";
5
5
 
6
6
  /**
7
7
  * Represents a file, either as a URL or as binary data (Uint8Array).
@@ -13,7 +13,16 @@ export type FileType = string | Uint8Array;
13
13
  * Represents a file, either as a URL or as binary data (Uint8Array).
14
14
  * @type {string | Uint8Array}
15
15
  */
16
- export declare const FileSchema: ZodType<FileType>;
16
+ export declare const FileSchema: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
17
+ /**
18
+ * Custom validator to ensure all objects in the array have unique values for a specific key.
19
+ * @param key The key to check for uniqueness. It should be a string key of the object.
20
+ * @returns A predicate function for `z.refine`.
21
+ * @example
22
+ * ```ts
23
+ * const schema = z.array(z.object({ name: z.string() })).refine(unique("name"), { message: "Not unique" });
24
+ * ```
25
+ */;
17
26
 
18
27
  /**
19
28
  * URL of an image. `local:` for browser storage (OpFS), otherwise a fetchable URL. While it can be `data:` URL for base64 encoded images, it's not recommended.
@@ -23,7 +32,11 @@ export type ImageURL = string;
23
32
  /**
24
33
  * URL of an image. `local:` for browser storage (OpFS), otherwise a fetchable URL. While it can be `data:` URL for base64 encoded images, it's not recommended.
25
34
  */
26
- export declare const ImageURLSchema: ZodType<ImageURL>;
35
+ export declare const ImageURLSchema: z.ZodURL;
36
+ /**
37
+ * Binary data represented as Uint8Array.
38
+ * Useful for local file assets.
39
+ */;
27
40
 
28
41
  /**
29
42
  * The binary data of the file. Used for local assets.
@@ -33,4 +46,8 @@ export type Uint8ArrayType = Uint8Array;
33
46
  /**
34
47
  * The binary data of the file. Used for local assets.
35
48
  */
36
- export declare const Uint8ArraySchema: ZodType<Uint8ArrayType>;
49
+ export declare const Uint8ArraySchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
50
+ /**
51
+ * Represents a file, either as a URL or as binary data (Uint8Array).
52
+ * Used for file assets.
53
+ */;
package/dist/v0.js CHANGED
@@ -1,9 +1,33 @@
1
- import { FileSchema as i, ImageURLSchema as m, Uint8ArraySchema as r, positiveInteger as t, unique as c } from "./v0/utils.js";
1
+ import { AssetEntitySchema as a, AssetsSettingSchema as t } from "./v0/Character/Assets.js";
2
+ import { CharacterPromptDataSchema as m, CharacterSchema as c } from "./v0/Character/Character.js";
3
+ import { ChatSchema as S } from "./v0/Character/Chat.js";
4
+ import { LorebookConditionDetails as p, LorebookConditionSchema as n, LorebookDataSchema as f, LorebookEntrySchema as s } from "./v0/Character/Lorebook.js";
5
+ import { MessageSchema as k, RoleSchema as l } from "./v0/Character/Message.js";
6
+ import { MetaSchema as C } from "./v0/Character/Meta.js";
7
+ import { ScriptSettingSchema as R } from "./v0/Executables/Executable.js";
8
+ import { ReplaceHookEntitySchema as y, ReplaceHookMetaSchema as A, ReplaceHookSchema as D } from "./v0/Executables/ReplaceHook.js";
9
+ import { FileSchema as H, ImageURLSchema as M, Uint8ArraySchema as d, positiveInteger as u, unique as I } from "./v0/utils.js";
2
10
  export {
3
- i as FileSchema,
4
- m as ImageURLSchema,
5
- r as Uint8ArraySchema,
6
- t as positiveInteger,
7
- c as unique
11
+ a as AssetEntitySchema,
12
+ t as AssetsSettingSchema,
13
+ m as CharacterPromptDataSchema,
14
+ c as CharacterSchema,
15
+ S as ChatSchema,
16
+ H as FileSchema,
17
+ M as ImageURLSchema,
18
+ p as LorebookConditionDetails,
19
+ n as LorebookConditionSchema,
20
+ f as LorebookDataSchema,
21
+ s as LorebookEntrySchema,
22
+ k as MessageSchema,
23
+ C as MetaSchema,
24
+ y as ReplaceHookEntitySchema,
25
+ A as ReplaceHookMetaSchema,
26
+ D as ReplaceHookSchema,
27
+ l as RoleSchema,
28
+ R as ScriptSettingSchema,
29
+ d as Uint8ArraySchema,
30
+ u as positiveInteger,
31
+ I as unique
8
32
  };
9
33
  //# sourceMappingURL=v0.js.map
package/dist/v0.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"v0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arisutalk/character-spec",
3
3
  "description": "Character specification, schema & migration for ArisuTalk",
4
- "version": "0.0.10",
4
+ "version": "0.0.12",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "concertypin",