@bscotch/gcdata 0.14.2

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 (107) hide show
  1. package/LICENSE.md +29 -0
  2. package/README.md +36 -0
  3. package/dist/GameChanger.d.ts +209 -0
  4. package/dist/GameChanger.d.ts.map +1 -0
  5. package/dist/GameChanger.events.d.ts +13 -0
  6. package/dist/GameChanger.events.d.ts.map +1 -0
  7. package/dist/GameChanger.events.js +3 -0
  8. package/dist/GameChanger.events.js.map +1 -0
  9. package/dist/GameChanger.js +478 -0
  10. package/dist/GameChanger.js.map +1 -0
  11. package/dist/SpellChecker.d.ts +31 -0
  12. package/dist/SpellChecker.d.ts.map +1 -0
  13. package/dist/SpellChecker.js +92 -0
  14. package/dist/SpellChecker.js.map +1 -0
  15. package/dist/assert.d.ts +6 -0
  16. package/dist/assert.d.ts.map +1 -0
  17. package/dist/assert.js +22 -0
  18. package/dist/assert.js.map +1 -0
  19. package/dist/cl2.loc.d.ts +1 -0
  20. package/dist/cl2.loc.d.ts.map +1 -0
  21. package/dist/cl2.loc.js +2 -0
  22. package/dist/cl2.loc.js.map +1 -0
  23. package/dist/cl2.quest.d.ts +4 -0
  24. package/dist/cl2.quest.d.ts.map +1 -0
  25. package/dist/cl2.quest.js +4 -0
  26. package/dist/cl2.quest.js.map +1 -0
  27. package/dist/cl2.quest.parse.d.ts +7 -0
  28. package/dist/cl2.quest.parse.d.ts.map +1 -0
  29. package/dist/cl2.quest.parse.js +825 -0
  30. package/dist/cl2.quest.parse.js.map +1 -0
  31. package/dist/cl2.quest.pointers.d.ts +3 -0
  32. package/dist/cl2.quest.pointers.d.ts.map +1 -0
  33. package/dist/cl2.quest.pointers.js +2 -0
  34. package/dist/cl2.quest.pointers.js.map +1 -0
  35. package/dist/cl2.quest.stringify.d.ts +5 -0
  36. package/dist/cl2.quest.stringify.d.ts.map +1 -0
  37. package/dist/cl2.quest.stringify.js +148 -0
  38. package/dist/cl2.quest.stringify.js.map +1 -0
  39. package/dist/cl2.quest.types.d.ts +168 -0
  40. package/dist/cl2.quest.types.d.ts.map +1 -0
  41. package/dist/cl2.quest.types.js +116 -0
  42. package/dist/cl2.quest.types.js.map +1 -0
  43. package/dist/cl2.quest.utils.d.ts +16 -0
  44. package/dist/cl2.quest.utils.d.ts.map +1 -0
  45. package/dist/cl2.quest.utils.js +105 -0
  46. package/dist/cl2.quest.utils.js.map +1 -0
  47. package/dist/cl2.storyline.d.ts +4 -0
  48. package/dist/cl2.storyline.d.ts.map +1 -0
  49. package/dist/cl2.storyline.js +4 -0
  50. package/dist/cl2.storyline.js.map +1 -0
  51. package/dist/cl2.storyline.parse.d.ts +7 -0
  52. package/dist/cl2.storyline.parse.d.ts.map +1 -0
  53. package/dist/cl2.storyline.parse.js +208 -0
  54. package/dist/cl2.storyline.parse.js.map +1 -0
  55. package/dist/cl2.storyline.pointers.d.ts +3 -0
  56. package/dist/cl2.storyline.pointers.d.ts.map +1 -0
  57. package/dist/cl2.storyline.pointers.js +2 -0
  58. package/dist/cl2.storyline.pointers.js.map +1 -0
  59. package/dist/cl2.storyline.stringify.d.ts +4 -0
  60. package/dist/cl2.storyline.stringify.d.ts.map +1 -0
  61. package/dist/cl2.storyline.stringify.js +18 -0
  62. package/dist/cl2.storyline.stringify.js.map +1 -0
  63. package/dist/cl2.storyline.types.d.ts +24 -0
  64. package/dist/cl2.storyline.types.d.ts.map +1 -0
  65. package/dist/cl2.storyline.types.js +87 -0
  66. package/dist/cl2.storyline.types.js.map +1 -0
  67. package/dist/cl2.storyline.utils.d.ts +1 -0
  68. package/dist/cl2.storyline.utils.d.ts.map +1 -0
  69. package/dist/cl2.storyline.utils.js +2 -0
  70. package/dist/cl2.storyline.utils.js.map +1 -0
  71. package/dist/cl2.types.auto.d.ts +22682 -0
  72. package/dist/cl2.types.auto.d.ts.map +1 -0
  73. package/dist/cl2.types.auto.js +2 -0
  74. package/dist/cl2.types.auto.js.map +1 -0
  75. package/dist/cl2.types.editor.d.ts +31 -0
  76. package/dist/cl2.types.editor.d.ts.map +1 -0
  77. package/dist/cl2.types.editor.js +2 -0
  78. package/dist/cl2.types.editor.js.map +1 -0
  79. package/dist/dict.d.ts +3 -0
  80. package/dist/dict.d.ts.map +1 -0
  81. package/dist/dict.js +49777 -0
  82. package/dist/dict.js.map +1 -0
  83. package/dist/helpers.d.ts +44 -0
  84. package/dist/helpers.d.ts.map +1 -0
  85. package/dist/helpers.js +149 -0
  86. package/dist/helpers.js.map +1 -0
  87. package/dist/index.d.ts +9 -0
  88. package/dist/index.d.ts.map +1 -0
  89. package/dist/index.js +9 -0
  90. package/dist/index.js.map +1 -0
  91. package/dist/types.cl2.rumpus.d.ts +190 -0
  92. package/dist/types.cl2.rumpus.d.ts.map +1 -0
  93. package/dist/types.cl2.rumpus.js +30 -0
  94. package/dist/types.cl2.rumpus.js.map +1 -0
  95. package/dist/types.d.ts +586 -0
  96. package/dist/types.d.ts.map +1 -0
  97. package/dist/types.editor.d.ts +25 -0
  98. package/dist/types.editor.d.ts.map +1 -0
  99. package/dist/types.editor.js +2 -0
  100. package/dist/types.editor.js.map +1 -0
  101. package/dist/types.js +98 -0
  102. package/dist/types.js.map +1 -0
  103. package/dist/util.d.ts +42 -0
  104. package/dist/util.d.ts.map +1 -0
  105. package/dist/util.js +272 -0
  106. package/dist/util.js.map +1 -0
  107. package/package.json +32 -0
package/LICENSE.md ADDED
@@ -0,0 +1,29 @@
1
+ # License for the Stitch Monorepo
2
+
3
+ License information for the content of this git repository. The various packages in this repo are developed by [Butterscotch Shenanigans](https://www.bscotch.net) ("Bscotch").
4
+
5
+ ## License files
6
+
7
+ Whenever a `LICENSE` file is found in a folder, or a license is specified by a `package.json` or similar manifest file, that license takes precedence for all files in that folder and its subfolders.
8
+
9
+ This is the root-most `LICENSE` file, and therefore dictates the default licensing in this repository.
10
+
11
+ ## Stitch name and logo
12
+
13
+ ![Stitch Logo](images/stitch-logo.png The Stitch Logo, copyright and trademark Butterscotch Shenanigans, all rights reserved.)
14
+
15
+ Stitch™ and its logo are trademarks of Bscotch. Bscotch reserves all rights to Stitch and its logo.
16
+
17
+ Stitch Logo ©2022 by Bscotch. All rights reserved.
18
+
19
+ ## Other code and content
20
+
21
+ Everything found in this project, except for the Stitch name and logo as described above or unless otherwise specified by a more proximal LICENSE file, falls under the MIT license (https://opensource.org/license/mit/):
22
+
23
+ Copyright 2023 Butterscotch Shenanigans
24
+
25
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
26
+
27
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
28
+
29
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # GameChanger Data
2
+
3
+ Our games use a JSON-Schema-like format to describe game content. This is used by our internal "GameChanger" tool.
4
+
5
+ This project contains parsers and helpers for GameChanger data.
6
+
7
+ *⚠️ This project is visible to the public, but will not be of any use to anyone besides Bscotch since our GameChanger tool is internal! ⚠️*
8
+
9
+ ## Purpose
10
+
11
+ This project is intended to be used by other projects that need to read and write GameChanger data *outside* of the GameMaker context. For example, to create a VSCode extension for editing GameChanger data, or to create a web-based editor.
12
+
13
+ ## Features
14
+
15
+ ### Spell Check
16
+
17
+ Given a GameChanger project, we need to have spell-checking capabilities that take into account all of the made-up names and terms from the project, and that make it easy to modify allowed/disallowed terms.
18
+
19
+ The spellchecker starts with a base `en-US` dictionary, adds names of things found in the GameChanger data (when those names are localized), and then loads a final custom dictionary on top.
20
+
21
+ ## Definitions
22
+
23
+ ### "Packed" data
24
+
25
+ GameChanger data is bundled with the game as a "packed" JSON file that includes the motes, schemas, UUIds, and other data. This file is importable and exportable from the GameChanger, and represets the "truth" for a given game version.
26
+
27
+ ### Schemas
28
+
29
+ A "BSchema" (a.k.a. "Schema") is a JSON-Schema-like document that describes the structure of a JSON object. It is used to validate and generate data for a given type of object, and to dynamically create an appropriate editor interface in the GameChanger.
30
+
31
+ The most fundamental difference between JSON Schema and Bschema is that Bschema avoids arrays. This is to simplify the process of diffing and merging data, since JSON pointers are used as identifiers and we need these to *not* change (a pointer to an array value will change if the order is changed, for example).
32
+
33
+ ### Motes
34
+
35
+ A "Mote" is a JSON-compatible data structure whose "data" field is described by a Schema. Motes have additional metadata at the root level, for example to indicate their ID and matching Schema.
36
+
@@ -0,0 +1,209 @@
1
+ import { Pathy } from '@bscotch/pathy';
2
+ import { SpellChecker } from './SpellChecker.js';
3
+ import { GameChangerRumpusMetadata } from './types.cl2.rumpus.js';
4
+ import { Bschema, ChangeType, Changes, type Mote, type MoteId, type PackedData, type SchemaId } from './types.js';
5
+ interface MoteVisitorDataCtx {
6
+ /** The data at this point in the heirarchy */
7
+ data: any;
8
+ /** The key in the parent that points to this data. `undefined` at the data root */
9
+ key: string | undefined;
10
+ /** The full pointer, as a split array of strings, to the this data. Empty at the data root */
11
+ pointer: string[];
12
+ /** The subschema mapping onto this data */
13
+ subschema: Bschema;
14
+ }
15
+ export interface MoteVisitorCtx<T = undefined> {
16
+ mote: Mote;
17
+ schema: Bschema;
18
+ current: MoteVisitorDataCtx;
19
+ /** `undefined` at the root, otherwise the prior visitor context data */
20
+ parent: MoteVisitorDataCtx | undefined;
21
+ /** A place for your custom store to accumulate things during visits. Passed by reference. */
22
+ store: T;
23
+ }
24
+ export declare class Gcdata {
25
+ data: PackedData;
26
+ constructor(data: PackedData);
27
+ get motes(): PackedData['motes'];
28
+ get schemas(): PackedData['schemas'];
29
+ visitMoteData(moteId: string | Mote,
30
+ /** Function to call on every node in the mote data */
31
+ visitor: (ctx: MoteVisitorCtx) => void): void;
32
+ visitMoteData<Store>(moteId: string | Mote, visitor: (ctx: MoteVisitorCtx<Store>) => void, store: Store): void;
33
+ getAncestors(ofMoteId: Mote | string, options?: {
34
+ /** If true, circularity will cause an early return of the parents rather than throwing. */
35
+ ignoreCircularity: boolean;
36
+ }): Mote[];
37
+ getMoteNamePointer(mote: Mote | string | undefined): string | undefined;
38
+ getMoteName(moteId: Mote | string | undefined): string | undefined;
39
+ getMote<T = any>(moteId: Mote | string | MoteId | undefined): Mote<T> | undefined;
40
+ getSchema(schemaId: string | SchemaId | undefined): Bschema | undefined;
41
+ listMotes(): Mote[];
42
+ listMotesBySchema<D = unknown>(...schemaId: (string | SchemaId)[]): Mote<D>[];
43
+ static from(gcdataFile: Pathy): Promise<Gcdata>;
44
+ }
45
+ export declare class GameChanger {
46
+ #private;
47
+ readonly projectName: string;
48
+ base: Gcdata;
49
+ working: Gcdata;
50
+ protected changes: Changes;
51
+ protected constructor(projectName: string);
52
+ get spellChecker(): SpellChecker;
53
+ protected get workingData(): PackedData;
54
+ protected get baseData(): PackedData;
55
+ get projectSaveDir(): Pathy<unknown>;
56
+ clearMoteChanges(moteId: string): void;
57
+ updateMoteLocation(moteId: string, newParentId: string | undefined, newFolder: string | undefined): void;
58
+ updateMoteData(moteId: string, dataPath: string, value: any): void;
59
+ protected createChange(category: 'schemas' | 'motes', id: string, change: {
60
+ type: ChangeType;
61
+ pointer?: string;
62
+ newValue?: any;
63
+ }): void;
64
+ writeChanges(): Promise<void>;
65
+ /** Apply changes to the baseData to get the updated workingData */
66
+ protected applyChanges(): void;
67
+ protected loadChanges(): Promise<void>;
68
+ protected readCommitsMetadata(): Promise<GameChangerRumpusMetadata>;
69
+ load(): Promise<void>;
70
+ /**
71
+ * @param path Either the path to a .yyp file (to get the included packed file) or the direct path to a GameChanger snapshot (e.g. a packed file or a base file).
72
+ */
73
+ static from(projectName: string): Promise<GameChanger | undefined>;
74
+ static projectSaveDir(projectName: string): Pathy<unknown>;
75
+ static projectRumpusGameChangerDir(projectName: string): Pathy<unknown>;
76
+ static projectRumpusGameChangerMetadataFile(projectName: string): Pathy<unknown>;
77
+ static projectGameChangerChangesFile(projectName: string): Pathy<import("zod").objectOutputType<{
78
+ commitId: import("zod").ZodString;
79
+ changes: import("zod").ZodObject<{
80
+ message: import("zod").ZodString;
81
+ motes: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
82
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
83
+ schema_id: import("zod").ZodString;
84
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
85
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
86
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
87
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
88
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
89
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
90
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
91
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
92
+ schema_id: import("zod").ZodString;
93
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
94
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
95
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
96
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
97
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
98
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
99
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
100
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
101
+ schema_id: import("zod").ZodString;
102
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
103
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
104
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
105
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
106
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
107
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
108
+ }, import("zod").ZodTypeAny, "passthrough">>>>;
109
+ schemas: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
110
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
111
+ schema_id: import("zod").ZodString;
112
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
113
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
114
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
115
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
116
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
117
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
118
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
119
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
120
+ schema_id: import("zod").ZodString;
121
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
122
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
123
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
124
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
125
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
126
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
127
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
128
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
129
+ schema_id: import("zod").ZodString;
130
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
131
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
132
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
133
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
134
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
135
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
136
+ }, import("zod").ZodTypeAny, "passthrough">>>>;
137
+ conflicts: import("zod").ZodObject<{
138
+ motes: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
139
+ schemas: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
140
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
141
+ motes: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
142
+ schemas: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
143
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
144
+ motes: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
145
+ schemas: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
146
+ }, import("zod").ZodTypeAny, "passthrough">>;
147
+ }, "strip", import("zod").ZodTypeAny, {
148
+ motes: Record<string, import("zod").objectOutputType<{
149
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
150
+ schema_id: import("zod").ZodString;
151
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
152
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
153
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
154
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
155
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
156
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
157
+ }, import("zod").ZodTypeAny, "passthrough">>;
158
+ schemas: Record<string, import("zod").objectOutputType<{
159
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
160
+ schema_id: import("zod").ZodString;
161
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
162
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
163
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
164
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
165
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
166
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
167
+ }, import("zod").ZodTypeAny, "passthrough">>;
168
+ message: string;
169
+ conflicts: {
170
+ motes: Record<string, any>;
171
+ schemas: Record<string, any>;
172
+ } & {
173
+ [k: string]: unknown;
174
+ };
175
+ }, {
176
+ message: string;
177
+ conflicts: {
178
+ motes?: Record<string, any> | undefined;
179
+ schemas?: Record<string, any> | undefined;
180
+ } & {
181
+ [k: string]: unknown;
182
+ };
183
+ motes?: Record<string, import("zod").objectInputType<{
184
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
185
+ schema_id: import("zod").ZodString;
186
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
187
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
188
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
189
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
190
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
191
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
192
+ }, import("zod").ZodTypeAny, "passthrough">> | undefined;
193
+ schemas?: Record<string, import("zod").objectInputType<{
194
+ mote_id: import("zod").ZodOptional<import("zod").ZodString>;
195
+ schema_id: import("zod").ZodString;
196
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"added">, import("zod").ZodLiteral<"deleted">, import("zod").ZodLiteral<"changed">]>;
197
+ schema_title: import("zod").ZodOptional<import("zod").ZodString>;
198
+ mote_name: import("zod").ZodOptional<import("zod").ZodString>;
199
+ allowed: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
200
+ staged: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNumber]>>;
201
+ diffs: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodTuple<[import("zod").ZodAny, import("zod").ZodAny], null>>>;
202
+ }, import("zod").ZodTypeAny, "passthrough">> | undefined;
203
+ }>;
204
+ }, import("zod").ZodTypeAny, "passthrough">>;
205
+ static projectGameChangerChangesFolder(projectName: string): Pathy<unknown>;
206
+ static projectGameChangerChangesBackupFolder(projectName: string): Pathy<unknown>;
207
+ }
208
+ export {};
209
+ //# sourceMappingURL=GameChanger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GameChanger.d.ts","sourceRoot":"","sources":["../src/GameChanger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAS,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EACL,yBAAyB,EAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,OAAO,EACP,UAAU,EACV,OAAO,EASP,KAAK,IAAI,EACT,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AAQpB,UAAU,kBAAkB;IAC1B,8CAA8C;IAC9C,IAAI,EAAE,GAAG,CAAC;IACV,mFAAmF;IACnF,GAAG,EAAE,MAAM,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IAAI,OAAO,CAAC,yBAAyB,CAAC;IAyBnE,IAAI;IA4BV;;OAEG;WACU,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAWxE,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM;IAIzC,MAAM,CAAC,2BAA2B,CAAC,WAAW,EAAE,MAAM;IAMtD,MAAM,CAAC,oCAAoC,CAAC,WAAW,EAAE,MAAM;IAI/D,MAAM,CAAC,6BAA6B,CAAC,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMxD,MAAM,CAAC,+BAA+B,CAAC,WAAW,EAAE,MAAM;IAI1D,MAAM,CAAC,qCAAqC,CAAC,WAAW,EAAE,MAAM;CAKjE"}
@@ -0,0 +1,13 @@
1
+ import { Mote } from './types.js';
2
+ export declare namespace GameChangerEvents {
3
+ type All = [GameChangerWorkingUpdated, GameChangerChangesSaved];
4
+ interface GameChangerWorkingUpdated {
5
+ name: 'gamechanger-working-updated';
6
+ payload: [Mote];
7
+ }
8
+ interface GameChangerChangesSaved {
9
+ name: 'gamechanger-changes-saved';
10
+ }
11
+ }
12
+ export declare const gameChangerEvents: import("@bscotch/emitter").Emitter<GameChangerEvents.All, ".">;
13
+ //# sourceMappingURL=GameChanger.events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GameChanger.events.d.ts","sourceRoot":"","sources":["../src/GameChanger.events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,GAAG,GAAG,CAAC,yBAAyB,EAAE,uBAAuB,CAAC,CAAC;IACvE,UAAiB,yBAAyB;QACxC,IAAI,EAAE,6BAA6B,CAAC;QACpC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;KACjB;IACD,UAAiB,uBAAuB;QACtC,IAAI,EAAE,2BAA2B,CAAC;KACnC;CACF;AAED,eAAO,MAAM,iBAAiB,gEAA8C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createEventEmitter } from '@bscotch/emitter';
2
+ export const gameChangerEvents = createEventEmitter();
3
+ //# sourceMappingURL=GameChanger.events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GameChanger.events.js","sourceRoot":"","sources":["../src/GameChanger.events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AActD,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,EAAyB,CAAC"}