@bscotch/gcdata 0.18.0 → 0.19.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.
- package/dist/cl2.quest.parse.d.ts.map +1 -1
- package/dist/cl2.quest.parse.js +0 -48
- package/dist/cl2.quest.parse.js.map +1 -1
- package/dist/cl2.quest.pointers.d.ts +1 -1
- package/dist/cl2.quest.pointers.d.ts.map +1 -1
- package/dist/cl2.quest.stringify.d.ts.map +1 -1
- package/dist/cl2.quest.stringify.js +0 -8
- package/dist/cl2.quest.stringify.js.map +1 -1
- package/dist/cl2.quest.types.d.ts +1 -3
- package/dist/cl2.quest.types.d.ts.map +1 -1
- package/dist/cl2.quest.types.js +1 -3
- package/dist/cl2.quest.types.js.map +1 -1
- package/dist/cl2.quest.utils.d.ts +1 -1
- package/dist/cl2.storyline.parse.d.ts.map +1 -1
- package/dist/cl2.storyline.parse.js +4 -56
- package/dist/cl2.storyline.parse.js.map +1 -1
- package/dist/cl2.storyline.pointers.d.ts +1 -1
- package/dist/cl2.storyline.pointers.d.ts.map +1 -1
- package/dist/cl2.storyline.stringify.d.ts.map +1 -1
- package/dist/cl2.storyline.stringify.js +0 -9
- package/dist/cl2.storyline.stringify.js.map +1 -1
- package/dist/cl2.types.auto.d.ts +14541 -13989
- package/dist/cl2.types.auto.d.ts.map +1 -1
- package/dist/cl2.types.editor.d.ts +0 -7
- package/dist/cl2.types.editor.d.ts.map +1 -1
- package/package.json +1 -5
|
@@ -5,7 +5,7 @@ export declare function getMoteLists(packed: Gcdata): {
|
|
|
5
5
|
allowedGivers: import("./types.js").Mote<unknown, string>[];
|
|
6
6
|
storylines: import("./types.js").Mote<Crashlands2.Storyline1, string>[];
|
|
7
7
|
quests: import("./types.js").Mote<Crashlands2.Quest, string>[];
|
|
8
|
-
emojis: import("./types.js").Mote<Crashlands2.
|
|
8
|
+
emojis: import("./types.js").Mote<Crashlands2.Emoji11, string>[];
|
|
9
9
|
};
|
|
10
10
|
export declare function getReuirementQuestStatuses(packed: Gcdata): string[];
|
|
11
11
|
export declare function getRequirementStyleNames(packed: Gcdata): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cl2.storyline.parse.d.ts","sourceRoot":"","sources":["../src/cl2.storyline.parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,OAAO,
|
|
1
|
+
{"version":3,"file":"cl2.storyline.parse.d.ts","sourceRoot":"","sources":["../src/cl2.storyline.parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,OAAO,EAOL,KAAK,qBAAqB,EAC3B,MAAM,0BAA0B,CAAC;AAIlC,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE;IACP,aAAa,CAAC,EAAE,OAAO,CAAC;CACpB,GACL,qBAAqB,CA+IvB;AAED,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAAC,EACvC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { assert } from './assert.js';
|
|
2
|
-
import { arrayTagPattern,
|
|
3
|
-
import {
|
|
2
|
+
import { arrayTagPattern, getStorylineSchema, lineIsArrayItem, linePatterns, parseIfMatch, storylineSchemaId, } from './cl2.storyline.types.js';
|
|
3
|
+
import { createBsArrayKey } from './helpers.js';
|
|
4
4
|
import { checkWords } from './util.js';
|
|
5
5
|
export function parseStringifiedStoryline(text, packed, options = {}) {
|
|
6
6
|
const result = {
|
|
@@ -9,9 +9,7 @@ export function parseStringifiedStoryline(text, packed, options = {}) {
|
|
|
9
9
|
edits: [],
|
|
10
10
|
completions: [],
|
|
11
11
|
words: [],
|
|
12
|
-
parsed: {
|
|
13
|
-
comments: [],
|
|
14
|
-
},
|
|
12
|
+
parsed: {},
|
|
15
13
|
};
|
|
16
14
|
/** Terms from the glossary for use in autocompletes */
|
|
17
15
|
const glossaryTerms = (packed.glossary?.relevantTerms() || []).map((t) => t.text);
|
|
@@ -105,16 +103,7 @@ export function parseStringifiedStoryline(text, packed, options = {}) {
|
|
|
105
103
|
}
|
|
106
104
|
// Work through each line type to add diagnostics and completions
|
|
107
105
|
const labelLower = parsedLine.label?.value?.toLowerCase();
|
|
108
|
-
|
|
109
|
-
if (indicator === '//') {
|
|
110
|
-
// Then this is a comment/note
|
|
111
|
-
result.parsed.comments.push({
|
|
112
|
-
id: parsedLine.arrayTag?.value?.trim(),
|
|
113
|
-
text: parsedLine.text?.value?.trim(),
|
|
114
|
-
});
|
|
115
|
-
checkSpelling(parsedLine.text);
|
|
116
|
-
}
|
|
117
|
-
else if (labelLower === 'name') {
|
|
106
|
+
if (labelLower === 'name') {
|
|
118
107
|
result.parsed.name = parsedLine.text?.value?.trim();
|
|
119
108
|
if (!result.parsed.name) {
|
|
120
109
|
result.diagnostics.push({
|
|
@@ -127,9 +116,6 @@ export function parseStringifiedStoryline(text, packed, options = {}) {
|
|
|
127
116
|
result.parsed.description = parsedLine.text?.value?.trim();
|
|
128
117
|
checkSpelling(parsedLine.text);
|
|
129
118
|
}
|
|
130
|
-
else if (labelLower === 'draft') {
|
|
131
|
-
result.parsed.draft = parsedLine.text?.value?.trim() === 'true';
|
|
132
|
-
}
|
|
133
119
|
else {
|
|
134
120
|
// Then we're in an error state on this line!
|
|
135
121
|
result.diagnostics.push({
|
|
@@ -156,8 +142,6 @@ export async function updateChangesFromParsedStoryline(parsed, moteId, packed) {
|
|
|
156
142
|
// We're always going to be computing ALL changes, so clear whatever
|
|
157
143
|
// we previously had.
|
|
158
144
|
packed.clearMoteChanges(moteId);
|
|
159
|
-
const storylineMoteBase = getStorylineMote(packed.base, moteId);
|
|
160
|
-
const storylineMoteWorking = getStorylineMote(packed.working, moteId);
|
|
161
145
|
const schema = getStorylineSchema(packed.working);
|
|
162
146
|
assert(schema, `${storylineSchemaId} schema not found in working copy`);
|
|
163
147
|
assert(schema.name, 'Quest mote must have a name pointer');
|
|
@@ -166,42 +150,6 @@ export async function updateChangesFromParsedStoryline(parsed, moteId, packed) {
|
|
|
166
150
|
};
|
|
167
151
|
updateMote('data/name/text', parsed.name);
|
|
168
152
|
updateMote('data/description/text', parsed.description);
|
|
169
|
-
updateMote('data/wip/draft', parsed.draft);
|
|
170
|
-
const parsedComments = parsed.comments.filter((c) => !!c.text);
|
|
171
|
-
//#region COMMENTS
|
|
172
|
-
// Add/Update COMMENTS
|
|
173
|
-
trace(`Updating comments`);
|
|
174
|
-
for (const comment of parsedComments) {
|
|
175
|
-
trace(`Updating comment ${comment.id} with text "${comment.text}"`);
|
|
176
|
-
updateMote(`data/wip/comments/${comment.id}/element`, comment.text);
|
|
177
|
-
}
|
|
178
|
-
// Remove deleted comments
|
|
179
|
-
for (const existingComment of bsArrayToArray(storylineMoteBase?.data.wip?.comments || {})) {
|
|
180
|
-
if (!parsedComments.find((c) => c.id === existingComment.id)) {
|
|
181
|
-
trace(`Deleting comment ${existingComment.id}`);
|
|
182
|
-
updateMote(`data/wip/comments/${existingComment.id}`, null);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
// Get the BASE order of the comments (if any) and use those
|
|
186
|
-
// as the starting point for an up to date order.
|
|
187
|
-
const comments = parsedComments.map((c) => {
|
|
188
|
-
// Look up the base comment
|
|
189
|
-
let comment = storylineMoteBase?.data.wip?.comments?.[c.id];
|
|
190
|
-
if (!comment) {
|
|
191
|
-
comment = storylineMoteWorking?.data.wip?.comments?.[c.id];
|
|
192
|
-
// @ts-expect-error - order is a required field, but it'll be re-added
|
|
193
|
-
delete comment?.order;
|
|
194
|
-
}
|
|
195
|
-
assert(comment, `Comment ${c.id} not found in base or working mote`);
|
|
196
|
-
return { ...comment, id: c.id };
|
|
197
|
-
});
|
|
198
|
-
trace('Updating comment order');
|
|
199
|
-
updateBsArrayOrder(comments);
|
|
200
|
-
comments.forEach((comment) => {
|
|
201
|
-
trace(`Updating comment ${comment.id} order to ${comment.order}`);
|
|
202
|
-
updateMote(`data/wip/comments/${comment.id}/order`, comment.order);
|
|
203
|
-
});
|
|
204
|
-
//#endregion
|
|
205
153
|
trace(`Writing changes`);
|
|
206
154
|
await packed.writeChanges();
|
|
207
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cl2.storyline.parse.js","sourceRoot":"","sources":["../src/cl2.storyline.parse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EACL,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"cl2.storyline.parse.js","sourceRoot":"","sources":["../src/cl2.storyline.parse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,iBAAiB,GAElB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,UAAU,yBAAyB,CACvC,IAAY,EACZ,MAAmB,EACnB,UAEI,EAAE;IAEN,MAAM,MAAM,GAA0B;QACpC,WAAW,EAAE,EAAE;QACf,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,EAAE;QACf,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;KACX,CAAC;IAEF,uDAAuD;IACvD,MAAM,aAAa,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAChE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CACd,C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GAAQ,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,KAAK,CAAC,iBAAiB,MAAM,EAAE,CAAC,CAAC;IACjC,IAAI;QACF,oEAAoE;QACpE,qBAAqB;QACrB,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,MAAM,GAAG,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClD,MAAM,CAAC,MAAM,EAAE,GAAG,iBAAiB,mCAAmC,CAAC,CAAC;QACxE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,qCAAqC,CAAC,CAAC;QAC3D,MAAM,UAAU,GAAG,CAAC,IAA8B,EAAE,KAAU,EAAE,EAAE;YAChE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC,CAAC;QACF,UAAU,CAAC,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAC1C,UAAU,CAAC,uBAAuB,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QAExD,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACzB,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;KAC7B;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1B,IAAI,GAAG,YAAY,KAAK,EAAE;YACxB,GAAG,CAAC,KAAK,GAAG,UAAU,CAAC;SACxB;QACD,MAAM,GAAG,CAAC;KACX;AACH,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type StorylineMoteDataPointer = `data/${StorylineMotePointer}`;
|
|
2
|
-
export type StorylineMotePointer = `` | `description/description` | `description/text` | `description` | `icon` | `name/description` | `name/text` | `name` | `order` | `wip/audio` | `wip/balance` | `wip/comments/${string}/element` | `wip/comments/${string}/order` | `wip/comments/${string}` | `wip/comments` | `wip/draft` | `wip/integration` | `wip/mechanics` | `wip/text` | `wip/visuals` | `wip`;
|
|
2
|
+
export type StorylineMotePointer = `` | `description/description` | `description/skip` | `description/text` | `description` | `icon` | `name/description` | `name/skip` | `name/text` | `name` | `order` | `wip/audio` | `wip/balance` | `wip/comments/${string}/element` | `wip/comments/${string}/order` | `wip/comments/${string}` | `wip/comments` | `wip/draft` | `wip/integration` | `wip/mechanics` | `wip/text` | `wip/visuals` | `wip`;
|
|
3
3
|
//# sourceMappingURL=cl2.storyline.pointers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cl2.storyline.pointers.d.ts","sourceRoot":"","sources":["../src/cl2.storyline.pointers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG,QAAQ,oBAAoB,EAAE,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,EAAE,GACjC,yBAAyB,GACzB,kBAAkB,GAClB,aAAa,GACb,MAAM,GACN,kBAAkB,GAClB,WAAW,GACX,MAAM,GACN,OAAO,GACP,WAAW,GACX,aAAa,GACb,gBAAgB,MAAM,UAAU,GAChC,gBAAgB,MAAM,QAAQ,GAC9B,gBAAgB,MAAM,EAAE,GACxB,cAAc,GACd,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,UAAU,GACV,aAAa,GACb,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"cl2.storyline.pointers.d.ts","sourceRoot":"","sources":["../src/cl2.storyline.pointers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG,QAAQ,oBAAoB,EAAE,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,EAAE,GACjC,yBAAyB,GACzB,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,GACb,MAAM,GACN,kBAAkB,GAClB,WAAW,GACX,WAAW,GACX,MAAM,GACN,OAAO,GACP,WAAW,GACX,aAAa,GACb,gBAAgB,MAAM,UAAU,GAChC,gBAAgB,MAAM,QAAQ,GAC9B,gBAAgB,MAAM,EAAE,GACxB,cAAc,GACd,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,UAAU,GACV,aAAa,GACb,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cl2.storyline.stringify.d.ts","sourceRoot":"","sources":["../src/cl2.storyline.stringify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"cl2.storyline.stringify.d.ts","sourceRoot":"","sources":["../src/cl2.storyline.stringify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,WAAW,GAClB,MAAM,CAOR"}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import { bsArrayToArray, toArrayTag } from './helpers.js';
|
|
2
1
|
export function stringifyStoryline(mote, packed) {
|
|
3
2
|
// METADATA
|
|
4
3
|
const blocks = [
|
|
5
4
|
`Name: ${packed.working.getMoteName(mote)}`,
|
|
6
5
|
`Description: ${mote.data.description?.text || ''}\n`,
|
|
7
|
-
`Draft: ${mote.data.wip?.draft ? 'true' : 'false'}\n`,
|
|
8
6
|
];
|
|
9
|
-
// NOTES
|
|
10
|
-
if (mote.data.wip?.comments) {
|
|
11
|
-
const comments = bsArrayToArray(mote.data.wip.comments);
|
|
12
|
-
if (comments.length) {
|
|
13
|
-
blocks.push(...bsArrayToArray(mote.data.wip.comments).map((c) => `//${toArrayTag(c.id)} ${c.element}`), '');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
7
|
return blocks.join('\n');
|
|
17
8
|
}
|
|
18
9
|
//# sourceMappingURL=cl2.storyline.stringify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cl2.storyline.stringify.js","sourceRoot":"","sources":["../src/cl2.storyline.stringify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cl2.storyline.stringify.js","sourceRoot":"","sources":["../src/cl2.storyline.stringify.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,kBAAkB,CAChC,IAAmB,EACnB,MAAmB;IAEnB,WAAW;IACX,MAAM,MAAM,GAAa;QACvB,SAAS,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;QAC3C,gBAAgB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE,IAAI;KACtD,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
|