@serene-pub/sdk 0.6.0-pr-7 → 0.6.0-pr-9
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/annexFields.d.ts +14 -0
- package/dist/annexFields.js +7 -0
- package/dist/announce.d.ts +62 -16
- package/dist/announce.js +90 -4
- package/dist/appletCard.d.ts +17 -0
- package/dist/appletCard.js +60 -0
- package/dist/attributes.d.ts +3 -3
- package/dist/attributes.js +1 -1
- package/dist/builder.d.ts +28 -13
- package/dist/builder.js +57 -5
- package/dist/cadences.d.ts +8 -1
- package/dist/cadences.js +27 -2
- package/dist/characterProfile.d.ts +137 -0
- package/dist/characterProfile.js +24 -0
- package/dist/component.d.ts +1 -1
- package/dist/componentImports.d.ts +1 -1
- package/dist/componentImports.js +2 -0
- package/dist/componentWire.js +28 -0
- package/dist/conditions.d.ts +5 -1
- package/dist/conditions.js +7 -0
- package/dist/declarations.d.ts +63 -1
- package/dist/declarations.js +176 -7
- package/dist/descriptors.d.ts +145 -6
- package/dist/descriptors.js +106 -5
- package/dist/document.d.ts +9 -1
- package/dist/document.js +44 -1
- package/dist/events.d.ts +82 -8
- package/dist/events.js +42 -5
- package/dist/executor.d.ts +27 -0
- package/dist/executor.js +32 -8
- package/dist/exposure.d.ts +35 -1
- package/dist/exposure.js +64 -2
- package/dist/extension.d.ts +30 -2
- package/dist/extension.js +3 -1
- package/dist/fit.d.ts +4 -1
- package/dist/fit.js +43 -1
- package/dist/functions.d.ts +7 -1
- package/dist/functions.js +3 -1
- package/dist/genres.d.ts +67 -2
- package/dist/genres.js +160 -8
- package/dist/hookGrants.js +10 -0
- package/dist/hostElements.d.ts +3 -3
- package/dist/hostElements.js +12 -4
- package/dist/index.d.ts +5 -0
- package/dist/index.js +10 -0
- package/dist/layout.d.ts +18 -0
- package/dist/libraryDraft.d.ts +2 -0
- package/dist/libraryDraft.js +5 -1
- package/dist/lorebookFile.d.ts +8 -0
- package/dist/lorebookFile.js +21 -0
- package/dist/participants.d.ts +83 -8
- package/dist/participants.js +9 -5
- package/dist/pluginPermissions.js +1 -1
- package/dist/promptBlocks.d.ts +5 -1
- package/dist/promptBlocks.js +23 -8
- package/dist/provisos.d.ts +92 -0
- package/dist/provisos.js +273 -0
- package/dist/receiverRules.js +1 -1
- package/dist/registrations.d.ts +154 -14
- package/dist/registrations.js +293 -23
- package/dist/registry.js +6 -3
- package/dist/repertoires.d.ts +13 -1
- package/dist/repertoires.js +5 -1
- package/dist/rulesetDocument.d.ts +11 -0
- package/dist/rulesetDocument.js +17 -0
- package/dist/rulesetSections.d.ts +12 -0
- package/dist/rulesetSections.js +8 -0
- package/dist/rulesets.js +6 -0
- package/dist/sceneSettings.d.ts +7 -1
- package/dist/sceneSettings.js +10 -5
- package/dist/sessionDossier.d.ts +159 -2
- package/dist/sessionLayout.d.ts +296 -85
- package/dist/sessionLayout.js +397 -133
- package/dist/sessionSettings.d.ts +18 -0
- package/dist/settings.d.ts +28 -1
- package/dist/settings.js +50 -2
- package/dist/shapes.d.ts +15 -1
- package/dist/shapes.js +15 -1
- package/dist/sheetLatitude.d.ts +148 -0
- package/dist/sheetLatitude.js +161 -0
- package/dist/speech.d.ts +14 -3
- package/dist/storyTime.d.ts +77 -1
- package/dist/storyTime.js +117 -8
- package/dist/surfaces.d.ts +49 -2
- package/dist/surfaces.js +3 -0
- package/dist/template.d.ts +38 -1
- package/dist/templateCheck.d.ts +24 -0
- package/dist/templateCheck.js +465 -10
- package/dist/templateFit.js +8 -1
- package/dist/templateIds.d.ts +6 -0
- package/dist/templateIds.js +9 -0
- package/dist/turnLock.d.ts +10 -1
- package/dist/turnLock.js +6 -1
- package/dist/turnOrder.d.ts +37 -4
- package/dist/turnOrder.js +49 -11
- package/dist/validate.d.ts +4 -2
- package/dist/validate.js +84 -11
- package/dist/variableLayouts.d.ts +160 -0
- package/dist/variableLayouts.js +202 -0
- package/dist/variables.d.ts +237 -20
- package/dist/variables.js +292 -33
- package/dist/widgetDecls.js +12 -0
- package/dist/widgets.d.ts +449 -47
- package/dist/widgets.js +31 -0
- package/host-elements.d.ts +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🚧 **Variable layouts by reference** — the name a context template, a
|
|
3
|
+
* preset and the pub use to point at one of a variable's layouts, and the
|
|
4
|
+
* typed builder a plugin ships one with.
|
|
5
|
+
*
|
|
6
|
+
* A variable is written out by one layout, chosen once for the whole pub; a
|
|
7
|
+
* preset may decide differently for its sessions, per variable; a context
|
|
8
|
+
* template that wants a different one names it in place:
|
|
9
|
+
*
|
|
10
|
+
* ```hbs
|
|
11
|
+
* {{{layout characters "core/json@1"}}}
|
|
12
|
+
* ```
|
|
13
|
+
* ```liquid
|
|
14
|
+
* {{ characters | layout: "core/json@1" }}
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* ## The layout reference
|
|
18
|
+
*
|
|
19
|
+
* `<owner>/<slug>@<major>`: the owner is a plugin slug (`acme.dice`) or
|
|
20
|
+
* `core`, the slug is kebab-case, the major a positive integer and always
|
|
21
|
+
* written. Unique within its variable, so `core/json@1` names one layout of
|
|
22
|
+
* `characters` and another of `personas`.
|
|
23
|
+
*
|
|
24
|
+
* ⚠ Not a **template id** (`acme:template/omens-prose@1`), the row's
|
|
25
|
+
* app-wide identity. ⚠ Not a session layout (a genre's `layouts`).
|
|
26
|
+
* @experimental
|
|
27
|
+
* @ruling PLAN-variable-layouts-2026-11-10 ★4, ★7
|
|
28
|
+
*/
|
|
29
|
+
import { templateSeedProblems } from './templateIds.js';
|
|
30
|
+
/**
|
|
31
|
+
* The slug half of a layout reference: kebab-case. Also what
|
|
32
|
+
* `TemplateSeed.slug` must read.
|
|
33
|
+
* @experimental
|
|
34
|
+
*/
|
|
35
|
+
export const VARIABLE_LAYOUT_SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
36
|
+
/** A plugin slug (`acme.dice`) or `core`. */
|
|
37
|
+
const OWNER = /^[a-z0-9]+(?:[.-][a-z0-9]+)*$/;
|
|
38
|
+
/**
|
|
39
|
+
* A layout reference: `<owner>/<slug>@<major>` — `core/json@1`,
|
|
40
|
+
* `acme.dice/prose@2`. Module-private: `parseVariableLayoutReference` is the
|
|
41
|
+
* one way to read one.
|
|
42
|
+
*/
|
|
43
|
+
const VARIABLE_LAYOUT_REFERENCE = /^([a-z0-9]+(?:[.-][a-z0-9]+)*)\/([a-z0-9]+(?:-[a-z0-9]+)*)@([1-9]\d*)$/;
|
|
44
|
+
/**
|
|
45
|
+
* Split a layout reference, or `null` when it is not one.
|
|
46
|
+
* @experimental
|
|
47
|
+
*/
|
|
48
|
+
export function parseVariableLayoutReference(value) {
|
|
49
|
+
if (typeof value !== 'string')
|
|
50
|
+
return null;
|
|
51
|
+
const m = VARIABLE_LAYOUT_REFERENCE.exec(value);
|
|
52
|
+
if (!m)
|
|
53
|
+
return null;
|
|
54
|
+
return { owner: m[1], slug: m[2], major: Number(m[3]) };
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Write a layout reference from its parts. Throws, in words, on a part
|
|
58
|
+
* outside the grammar — the one place a reference is spelled.
|
|
59
|
+
* @experimental
|
|
60
|
+
*/
|
|
61
|
+
export function formatVariableLayoutReference(parts) {
|
|
62
|
+
const { owner, slug, major } = parts ?? {};
|
|
63
|
+
if (typeof owner !== 'string' || !OWNER.test(owner))
|
|
64
|
+
throw new Error(`layout reference owner '${String(owner)}' is not a plugin slug or 'core' — ` +
|
|
65
|
+
`lowercase letters and digits, joined by '.' or '-' (acme.dice).`);
|
|
66
|
+
if (typeof slug !== 'string' || !VARIABLE_LAYOUT_SLUG.test(slug))
|
|
67
|
+
throw new Error(`layout reference slug '${String(slug)}' is not kebab-case — lowercase letters and ` +
|
|
68
|
+
`digits joined by '-' (titled-json).`);
|
|
69
|
+
if (typeof major !== 'number' || !Number.isInteger(major) || major < 1)
|
|
70
|
+
throw new Error(`layout reference major '${String(major)}' is not a positive whole number.`);
|
|
71
|
+
return `${owner}/${slug}@${major}`;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The helper (Handlebars) and filter (Liquid) a context template names a
|
|
75
|
+
* layout with: `{{{layout characters "core/json@1"}}}`,
|
|
76
|
+
* `{{ characters | layout: "core/json@1" }}`. Inside a template no session
|
|
77
|
+
* layout can appear, so the bare word is unambiguous there.
|
|
78
|
+
* @experimental
|
|
79
|
+
*/
|
|
80
|
+
export const VARIABLE_LAYOUT_HELPER = 'layout';
|
|
81
|
+
/**
|
|
82
|
+
* 🚧 The helper (Handlebars) and filter (Liquid) that print a date value:
|
|
83
|
+
* `{{formatDate date}}`, `{{ date | formatDate }}`. Prints from the value
|
|
84
|
+
* alone (the calendar's spelling when it carries names); prints nothing for
|
|
85
|
+
* null or a value of the wrong shape. Named apart from the `date` field
|
|
86
|
+
* because a Handlebars `{{date}}` inside a row would call a helper named
|
|
87
|
+
* `date`, and Liquid already has a `date` filter.
|
|
88
|
+
* @experimental
|
|
89
|
+
*/
|
|
90
|
+
export const FORMAT_DATE_HELPER = 'formatDate';
|
|
91
|
+
/**
|
|
92
|
+
* 🚧 The helper / filter that prints a date delta: `{{formatDateDelta dateDelta}}`,
|
|
93
|
+
* `{{ dateDelta | formatDateDelta }}`. Prints from the value alone (sign, then
|
|
94
|
+
* year, month, day, time); prints nothing for null or a value of the wrong
|
|
95
|
+
* shape. Named apart from the `dateDelta` field for the reason
|
|
96
|
+
* `FORMAT_DATE_HELPER` is.
|
|
97
|
+
* @experimental
|
|
98
|
+
*/
|
|
99
|
+
export const FORMAT_DATE_DELTA_HELPER = 'formatDateDelta';
|
|
100
|
+
/**
|
|
101
|
+
* A variable id split into owner, name and major, or `null` when it is not
|
|
102
|
+
* one — `core:var/characters@1`. A camelCase name is tolerated: the variable
|
|
103
|
+
* registry does not refuse one, and the app kebabs it when it names a layout row.
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
export function variableIdParts(id) {
|
|
107
|
+
if (typeof id !== 'string')
|
|
108
|
+
return null;
|
|
109
|
+
const m = /^([a-z0-9]+(?:[.-][a-z0-9]+)*):var\/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)@(\d+)$/.exec(id);
|
|
110
|
+
if (!m)
|
|
111
|
+
return null;
|
|
112
|
+
return { owner: m[1], name: m[2], major: Number(m[3]) };
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* A new scope in which every root key `renders` maps carries `laidOutBy` — the
|
|
116
|
+
* variable that writes it out. `renders` is what `rendersAt()` returns (key →
|
|
117
|
+
* variable id). This is how a host tells the template check and the editor
|
|
118
|
+
* which keys are laid out. A key that is not a root of `scope` is skipped: the
|
|
119
|
+
* scope is the authority on names. A laid-out value is a string, so an `'any'`
|
|
120
|
+
* or `string[]` root becomes an optional string. Never mutates its input.
|
|
121
|
+
* @experimental
|
|
122
|
+
*/
|
|
123
|
+
export function laidOutScope(scope, renders) {
|
|
124
|
+
const out = { ...scope };
|
|
125
|
+
for (const [key, laidOutBy] of Object.entries(renders ?? {})) {
|
|
126
|
+
if (!Object.prototype.hasOwnProperty.call(scope, key))
|
|
127
|
+
continue;
|
|
128
|
+
const decl = scope[key];
|
|
129
|
+
out[key] =
|
|
130
|
+
decl === 'any' || Array.isArray(decl)
|
|
131
|
+
? { type: 'string', optional: true, laidOutBy }
|
|
132
|
+
: { ...decl, laidOutBy };
|
|
133
|
+
}
|
|
134
|
+
return out;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The layouts offered by the variable that writes `key` out
|
|
138
|
+
* (`scope[key].laidOutBy`) — for completion inside `layout characters "` and
|
|
139
|
+
* for hover. `[]` when the key isn't laid out, the offers are absent, or the
|
|
140
|
+
* variable offers none.
|
|
141
|
+
* @experimental
|
|
142
|
+
*/
|
|
143
|
+
export function variableLayoutOffersFor(scope, key, offers) {
|
|
144
|
+
if (!offers || !Object.prototype.hasOwnProperty.call(scope, key))
|
|
145
|
+
return [];
|
|
146
|
+
const decl = scope[key];
|
|
147
|
+
if (!decl || decl === 'any' || Array.isArray(decl))
|
|
148
|
+
return [];
|
|
149
|
+
const by = decl.laidOutBy;
|
|
150
|
+
if (typeof by !== 'string' || !Object.prototype.hasOwnProperty.call(offers, by))
|
|
151
|
+
return [];
|
|
152
|
+
return offers[by] ?? [];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The typed builder of a variable layout's `TemplateSeed` — list the result in
|
|
156
|
+
* `defineExtension({ templates })`. `variable` is the value `defineVariable` /
|
|
157
|
+
* `definePluginVariable` returned, so a typo is a compile error; it may be
|
|
158
|
+
* another package's (a plugin may lay out `core:var/characters@1`).
|
|
159
|
+
*
|
|
160
|
+
* The seed's id is `<pluginId>:template/<variable name>-<slug>@<major>`. Throws,
|
|
161
|
+
* naming the plugin and the variable, on any part outside its grammar, and
|
|
162
|
+
* with the problems `templateSeedProblems` finds.
|
|
163
|
+
*
|
|
164
|
+
* ⚠ It does not check `source`: the template checker carries the engines and
|
|
165
|
+
* lives at `@serene-pub/sdk/template-check`, which this dependency-free module
|
|
166
|
+
* must not import. The packager (`variableSeedFindings`, `E_TEMPLATE_SCOPE`)
|
|
167
|
+
* and the instance's install check hold the source to the variable's scope.
|
|
168
|
+
* @experimental
|
|
169
|
+
*/
|
|
170
|
+
export function variableLayout(pluginId, variable, input) {
|
|
171
|
+
const who = `plugin '${pluginId}' variable layout for '${String(variable?.id)}'`;
|
|
172
|
+
const parts = variableIdParts(variable?.id);
|
|
173
|
+
if (!parts)
|
|
174
|
+
throw new Error(`${who}: '${String(variable?.id)}' is not a variable id — it must read ` +
|
|
175
|
+
`'<owner>:var/<name>@<major>' (core:var/characters@1).`);
|
|
176
|
+
const { slug, major, label, engine, source } = input ?? {};
|
|
177
|
+
if (typeof slug !== 'string' || !VARIABLE_LAYOUT_SLUG.test(slug))
|
|
178
|
+
throw new Error(`${who}: slug '${String(slug)}' is not kebab-case — lowercase letters and digits joined by '-' (titled-json).`);
|
|
179
|
+
if (typeof major !== 'number' || !Number.isInteger(major) || major < 1)
|
|
180
|
+
throw new Error(`${who}: major '${String(major)}' is not a positive whole number.`);
|
|
181
|
+
if (typeof label !== 'string' || !label.trim())
|
|
182
|
+
throw new Error(`${who}: label is the layout's display name — give a non-empty string.`);
|
|
183
|
+
if (typeof engine !== 'string' || !engine)
|
|
184
|
+
throw new Error(`${who}: engine is the registered engine the source is written in — give a non-empty engine id.`);
|
|
185
|
+
if (typeof source !== 'string')
|
|
186
|
+
throw new Error(`${who}: source is the template text — give a string.`);
|
|
187
|
+
const name = parts.name.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
|
188
|
+
const seed = {
|
|
189
|
+
id: `${pluginId}:template/${name}-${slug}@${major}`,
|
|
190
|
+
kind: 'variables',
|
|
191
|
+
variableId: variable.id,
|
|
192
|
+
slug,
|
|
193
|
+
engine,
|
|
194
|
+
body: source,
|
|
195
|
+
label,
|
|
196
|
+
};
|
|
197
|
+
const problems = templateSeedProblems(seed, pluginId);
|
|
198
|
+
if (problems.length)
|
|
199
|
+
throw new Error(`${who}: ${problems.join(' ')}`);
|
|
200
|
+
return seed;
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=variableLayouts.js.map
|
package/dist/variables.d.ts
CHANGED
|
@@ -247,13 +247,99 @@ export declare const varWorldLore: VariableDecl & {
|
|
|
247
247
|
};
|
|
248
248
|
};
|
|
249
249
|
};
|
|
250
|
+
/**
|
|
251
|
+
* 🚧 The date value every dated row and the current date carry (`StoryDateValue`).
|
|
252
|
+
* An object field constant, not a `VarType`. Names come only from the lorebook's
|
|
253
|
+
* calendar and are absent for a free-form book.
|
|
254
|
+
* @experimental
|
|
255
|
+
*/
|
|
256
|
+
export declare const STORY_DATE_FIELD: VarField;
|
|
257
|
+
/**
|
|
258
|
+
* 🚧 The date delta every dated row may carry (`StoryDateDelta`): the row's date
|
|
259
|
+
* minus the session's current date. An object field constant, not a `VarType`.
|
|
260
|
+
* @experimental
|
|
261
|
+
*/
|
|
262
|
+
export declare const STORY_DATE_DELTA_FIELD: VarField;
|
|
250
263
|
/** @experimental */
|
|
251
264
|
export declare const varHistory: VariableDecl & {
|
|
252
265
|
scope: {
|
|
253
266
|
history: {
|
|
254
|
-
type: "
|
|
267
|
+
type: "list";
|
|
255
268
|
of: {
|
|
256
|
-
type: "
|
|
269
|
+
type: "object";
|
|
270
|
+
fields: {
|
|
271
|
+
date: {
|
|
272
|
+
optional: true;
|
|
273
|
+
description: {
|
|
274
|
+
en: string;
|
|
275
|
+
};
|
|
276
|
+
type: import("./template.js").VarType;
|
|
277
|
+
fields?: Record<string, VarField>;
|
|
278
|
+
of?: VarField;
|
|
279
|
+
laidOutBy?: string;
|
|
280
|
+
};
|
|
281
|
+
dateDelta: {
|
|
282
|
+
optional: true;
|
|
283
|
+
description: {
|
|
284
|
+
en: string;
|
|
285
|
+
};
|
|
286
|
+
type: import("./template.js").VarType;
|
|
287
|
+
fields?: Record<string, VarField>;
|
|
288
|
+
of?: VarField;
|
|
289
|
+
laidOutBy?: string;
|
|
290
|
+
};
|
|
291
|
+
content: {
|
|
292
|
+
type: "string";
|
|
293
|
+
description: {
|
|
294
|
+
en: string;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
/** @experimental */
|
|
303
|
+
export declare const varEarlierScenes: VariableDecl & {
|
|
304
|
+
scope: {
|
|
305
|
+
earlierScenes: {
|
|
306
|
+
type: "list";
|
|
307
|
+
of: {
|
|
308
|
+
type: "object";
|
|
309
|
+
fields: {
|
|
310
|
+
name: {
|
|
311
|
+
type: "string";
|
|
312
|
+
description: {
|
|
313
|
+
en: string;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
summary: {
|
|
317
|
+
type: "string";
|
|
318
|
+
description: {
|
|
319
|
+
en: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
date: {
|
|
323
|
+
optional: true;
|
|
324
|
+
description: {
|
|
325
|
+
en: string;
|
|
326
|
+
};
|
|
327
|
+
type: import("./template.js").VarType;
|
|
328
|
+
fields?: Record<string, VarField>;
|
|
329
|
+
of?: VarField;
|
|
330
|
+
laidOutBy?: string;
|
|
331
|
+
};
|
|
332
|
+
dateDelta: {
|
|
333
|
+
optional: true;
|
|
334
|
+
description: {
|
|
335
|
+
en: string;
|
|
336
|
+
};
|
|
337
|
+
type: import("./template.js").VarType;
|
|
338
|
+
fields?: Record<string, VarField>;
|
|
339
|
+
of?: VarField;
|
|
340
|
+
laidOutBy?: string;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
257
343
|
};
|
|
258
344
|
};
|
|
259
345
|
};
|
|
@@ -383,13 +469,14 @@ export declare const varCharacterLore: VariableDecl & {
|
|
|
383
469
|
export declare const varRelationshipsPerspectives: VariableDecl & {
|
|
384
470
|
scope: {
|
|
385
471
|
relationshipsPerspectives: {
|
|
472
|
+
description: {
|
|
473
|
+
en: string;
|
|
474
|
+
};
|
|
386
475
|
type: import("./template.js").VarType;
|
|
387
476
|
fields?: Record<string, VarField>;
|
|
388
477
|
of?: VarField;
|
|
389
478
|
optional?: boolean;
|
|
390
|
-
|
|
391
|
-
en: string;
|
|
392
|
-
};
|
|
479
|
+
laidOutBy?: string;
|
|
393
480
|
};
|
|
394
481
|
};
|
|
395
482
|
};
|
|
@@ -412,13 +499,14 @@ export declare const varRelationshipsKnown: VariableDecl & {
|
|
|
412
499
|
type: "object";
|
|
413
500
|
fields: {
|
|
414
501
|
howOthersRegardYou: {
|
|
415
|
-
type: import("./template.js").VarType;
|
|
416
|
-
fields?: Record<string, VarField>;
|
|
417
|
-
of?: VarField;
|
|
418
502
|
optional: true;
|
|
419
503
|
description: {
|
|
420
504
|
en: string;
|
|
421
505
|
};
|
|
506
|
+
type: import("./template.js").VarType;
|
|
507
|
+
fields?: Record<string, VarField>;
|
|
508
|
+
of?: VarField;
|
|
509
|
+
laidOutBy?: string;
|
|
422
510
|
};
|
|
423
511
|
legendaryFigures: {
|
|
424
512
|
type: "record";
|
|
@@ -438,11 +526,12 @@ export declare const varRelationshipsKnown: VariableDecl & {
|
|
|
438
526
|
optional: true;
|
|
439
527
|
};
|
|
440
528
|
relationships: {
|
|
529
|
+
optional: true;
|
|
441
530
|
type: import("./template.js").VarType;
|
|
442
531
|
description?: I18n;
|
|
443
532
|
fields?: Record<string, VarField>;
|
|
444
533
|
of?: VarField;
|
|
445
|
-
|
|
534
|
+
laidOutBy?: string;
|
|
446
535
|
};
|
|
447
536
|
};
|
|
448
537
|
};
|
|
@@ -455,48 +544,176 @@ export declare const varRelationshipsKnown: VariableDecl & {
|
|
|
455
544
|
export declare const varCurrentDate: VariableDecl & {
|
|
456
545
|
scope: {
|
|
457
546
|
currentDate: {
|
|
547
|
+
description: {
|
|
548
|
+
en: string;
|
|
549
|
+
};
|
|
550
|
+
type: import("./template.js").VarType;
|
|
551
|
+
fields?: Record<string, VarField>;
|
|
552
|
+
of?: VarField;
|
|
553
|
+
optional?: boolean;
|
|
554
|
+
laidOutBy?: string;
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* 🚧 The session's lorebook calendar, for a template that wants to tell the
|
|
560
|
+
* model how the calendar runs. Absent for a free-form book. The day's periods
|
|
561
|
+
* and the seasons are not declared here: their labels are `I18n`, which a
|
|
562
|
+
* `VarField` cannot type.
|
|
563
|
+
* @experimental
|
|
564
|
+
*/
|
|
565
|
+
export declare const varStoryCalendar: VariableDecl & {
|
|
566
|
+
scope: {
|
|
567
|
+
storyCalendar: {
|
|
458
568
|
type: "object";
|
|
459
569
|
fields: {
|
|
460
|
-
|
|
461
|
-
type: "
|
|
570
|
+
months: {
|
|
571
|
+
type: "list";
|
|
462
572
|
description: {
|
|
463
573
|
en: string;
|
|
464
574
|
};
|
|
575
|
+
of: {
|
|
576
|
+
type: "object";
|
|
577
|
+
fields: {
|
|
578
|
+
name: {
|
|
579
|
+
type: "string";
|
|
580
|
+
description: {
|
|
581
|
+
en: string;
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
days: {
|
|
585
|
+
type: "number";
|
|
586
|
+
description: {
|
|
587
|
+
en: string;
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
};
|
|
465
592
|
};
|
|
466
|
-
|
|
467
|
-
type: "
|
|
593
|
+
weekdays: {
|
|
594
|
+
type: "list";
|
|
468
595
|
optional: true;
|
|
469
596
|
description: {
|
|
470
597
|
en: string;
|
|
471
598
|
};
|
|
599
|
+
of: {
|
|
600
|
+
type: "string";
|
|
601
|
+
};
|
|
472
602
|
};
|
|
473
|
-
|
|
603
|
+
firstWeekday: {
|
|
474
604
|
type: "number";
|
|
475
605
|
optional: true;
|
|
476
606
|
description: {
|
|
477
607
|
en: string;
|
|
478
608
|
};
|
|
479
609
|
};
|
|
480
|
-
|
|
481
|
-
type: "
|
|
610
|
+
yearLabel: {
|
|
611
|
+
type: "string";
|
|
482
612
|
optional: true;
|
|
483
613
|
description: {
|
|
484
614
|
en: string;
|
|
485
615
|
};
|
|
486
616
|
};
|
|
487
|
-
|
|
488
|
-
type: "
|
|
617
|
+
leap: {
|
|
618
|
+
type: "object";
|
|
489
619
|
optional: true;
|
|
490
620
|
description: {
|
|
491
621
|
en: string;
|
|
492
622
|
};
|
|
623
|
+
fields: {
|
|
624
|
+
every: {
|
|
625
|
+
type: "number";
|
|
626
|
+
description: {
|
|
627
|
+
en: string;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
month: {
|
|
631
|
+
type: "number";
|
|
632
|
+
description: {
|
|
633
|
+
en: string;
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
skipEvery: {
|
|
637
|
+
type: "number";
|
|
638
|
+
optional: true;
|
|
639
|
+
description: {
|
|
640
|
+
en: string;
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
keepEvery: {
|
|
644
|
+
type: "number";
|
|
645
|
+
optional: true;
|
|
646
|
+
description: {
|
|
647
|
+
en: string;
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
more: {
|
|
651
|
+
type: "list";
|
|
652
|
+
optional: true;
|
|
653
|
+
description: {
|
|
654
|
+
en: string;
|
|
655
|
+
};
|
|
656
|
+
of: {
|
|
657
|
+
type: "number";
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
furtherLevels: {
|
|
661
|
+
type: "list";
|
|
662
|
+
optional: true;
|
|
663
|
+
description: {
|
|
664
|
+
en: string;
|
|
665
|
+
};
|
|
666
|
+
of: {
|
|
667
|
+
type: "object";
|
|
668
|
+
fields: {
|
|
669
|
+
every: {
|
|
670
|
+
type: "number";
|
|
671
|
+
description: {
|
|
672
|
+
en: string;
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
addsLeapDay: {
|
|
676
|
+
type: "boolean";
|
|
677
|
+
description: {
|
|
678
|
+
en: string;
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
};
|
|
493
685
|
};
|
|
494
|
-
|
|
495
|
-
type: "
|
|
686
|
+
eras: {
|
|
687
|
+
type: "list";
|
|
496
688
|
optional: true;
|
|
497
689
|
description: {
|
|
498
690
|
en: string;
|
|
499
691
|
};
|
|
692
|
+
of: {
|
|
693
|
+
type: "object";
|
|
694
|
+
fields: {
|
|
695
|
+
name: {
|
|
696
|
+
type: "string";
|
|
697
|
+
description: {
|
|
698
|
+
en: string;
|
|
699
|
+
};
|
|
700
|
+
};
|
|
701
|
+
start: {
|
|
702
|
+
type: "number";
|
|
703
|
+
optional: true;
|
|
704
|
+
description: {
|
|
705
|
+
en: string;
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
backwards: {
|
|
709
|
+
type: "boolean";
|
|
710
|
+
optional: true;
|
|
711
|
+
description: {
|
|
712
|
+
en: string;
|
|
713
|
+
};
|
|
714
|
+
};
|
|
715
|
+
};
|
|
716
|
+
};
|
|
500
717
|
};
|
|
501
718
|
};
|
|
502
719
|
};
|