@serene-pub/sdk 0.6.0-pr-1

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 (187) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +17 -0
  3. package/README.md +368 -0
  4. package/dist/actions.d.ts +572 -0
  5. package/dist/actions.js +829 -0
  6. package/dist/annexFields.d.ts +234 -0
  7. package/dist/annexFields.js +413 -0
  8. package/dist/announce.d.ts +464 -0
  9. package/dist/announce.js +426 -0
  10. package/dist/attributes.d.ts +670 -0
  11. package/dist/attributes.js +904 -0
  12. package/dist/bands.d.ts +125 -0
  13. package/dist/bands.js +256 -0
  14. package/dist/builder.d.ts +683 -0
  15. package/dist/builder.js +677 -0
  16. package/dist/candidates.d.ts +109 -0
  17. package/dist/candidates.js +118 -0
  18. package/dist/capabilities.d.ts +744 -0
  19. package/dist/capabilities.js +679 -0
  20. package/dist/channels.d.ts +106 -0
  21. package/dist/channels.js +129 -0
  22. package/dist/clauses.d.ts +40 -0
  23. package/dist/clauses.js +43 -0
  24. package/dist/component.d.ts +33 -0
  25. package/dist/component.js +27 -0
  26. package/dist/componentBuild.d.ts +48 -0
  27. package/dist/componentBuild.js +84 -0
  28. package/dist/componentClient.d.ts +100 -0
  29. package/dist/componentClient.js +13 -0
  30. package/dist/componentImports.d.ts +51 -0
  31. package/dist/componentImports.js +106 -0
  32. package/dist/componentModule.d.ts +8 -0
  33. package/dist/componentModule.js +270 -0
  34. package/dist/componentWire.d.ts +130 -0
  35. package/dist/componentWire.js +280 -0
  36. package/dist/config.d.ts +295 -0
  37. package/dist/config.js +231 -0
  38. package/dist/connections.d.ts +89 -0
  39. package/dist/connections.js +131 -0
  40. package/dist/declarations.d.ts +290 -0
  41. package/dist/declarations.js +794 -0
  42. package/dist/descriptors.d.ts +1774 -0
  43. package/dist/descriptors.js +1329 -0
  44. package/dist/dev.d.ts +136 -0
  45. package/dist/dev.js +161 -0
  46. package/dist/document.d.ts +202 -0
  47. package/dist/document.js +312 -0
  48. package/dist/engines.d.ts +117 -0
  49. package/dist/engines.js +203 -0
  50. package/dist/eventMapLaws.d.ts +63 -0
  51. package/dist/eventMapLaws.js +128 -0
  52. package/dist/events.d.ts +554 -0
  53. package/dist/events.js +633 -0
  54. package/dist/executor.d.ts +771 -0
  55. package/dist/executor.js +1829 -0
  56. package/dist/extension.d.ts +448 -0
  57. package/dist/extension.js +315 -0
  58. package/dist/facets.d.ts +53 -0
  59. package/dist/facets.js +60 -0
  60. package/dist/foldedSections.d.ts +74 -0
  61. package/dist/foldedSections.js +161 -0
  62. package/dist/genres.d.ts +507 -0
  63. package/dist/genres.js +633 -0
  64. package/dist/guardedConnection.d.ts +138 -0
  65. package/dist/guardedConnection.js +341 -0
  66. package/dist/handlebarsReach.d.ts +122 -0
  67. package/dist/handlebarsReach.js +222 -0
  68. package/dist/hash.d.ts +146 -0
  69. package/dist/hash.js +166 -0
  70. package/dist/hookGrants.d.ts +47 -0
  71. package/dist/hookGrants.js +68 -0
  72. package/dist/hooks.d.ts +290 -0
  73. package/dist/hooks.js +113 -0
  74. package/dist/hostElements.d.ts +447 -0
  75. package/dist/hostElements.js +702 -0
  76. package/dist/i18n.d.ts +94 -0
  77. package/dist/i18n.js +123 -0
  78. package/dist/identity.d.ts +93 -0
  79. package/dist/identity.js +135 -0
  80. package/dist/index.d.ts +85 -0
  81. package/dist/index.js +176 -0
  82. package/dist/layout.d.ts +194 -0
  83. package/dist/layout.js +40 -0
  84. package/dist/media.d.ts +202 -0
  85. package/dist/media.js +70 -0
  86. package/dist/messageBlocks.d.ts +487 -0
  87. package/dist/messageBlocks.js +683 -0
  88. package/dist/migration.d.ts +128 -0
  89. package/dist/migration.js +261 -0
  90. package/dist/names.d.ts +78 -0
  91. package/dist/names.js +136 -0
  92. package/dist/nodeInput.d.ts +399 -0
  93. package/dist/nodeInput.js +178 -0
  94. package/dist/participants.d.ts +291 -0
  95. package/dist/participants.js +252 -0
  96. package/dist/personGate.d.ts +62 -0
  97. package/dist/personGate.js +77 -0
  98. package/dist/pick.d.ts +84 -0
  99. package/dist/pick.js +103 -0
  100. package/dist/pluginHarness.d.ts +235 -0
  101. package/dist/pluginHarness.js +558 -0
  102. package/dist/pluginPermissions.d.ts +25 -0
  103. package/dist/pluginPermissions.js +97 -0
  104. package/dist/pluginRuleRef.d.ts +13 -0
  105. package/dist/pluginRuleRef.js +10 -0
  106. package/dist/predicates.d.ts +182 -0
  107. package/dist/predicates.js +249 -0
  108. package/dist/preview.d.ts +120 -0
  109. package/dist/preview.js +82 -0
  110. package/dist/promptBlocks.d.ts +130 -0
  111. package/dist/promptBlocks.js +197 -0
  112. package/dist/rankingDecisions.d.ts +60 -0
  113. package/dist/rankingDecisions.js +48 -0
  114. package/dist/receipt.d.ts +313 -0
  115. package/dist/receipt.js +60 -0
  116. package/dist/receiverRules.d.ts +24 -0
  117. package/dist/receiverRules.js +94 -0
  118. package/dist/refs.d.ts +117 -0
  119. package/dist/refs.js +137 -0
  120. package/dist/registry.d.ts +230 -0
  121. package/dist/registry.js +273 -0
  122. package/dist/review.d.ts +108 -0
  123. package/dist/review.js +97 -0
  124. package/dist/sampling.d.ts +152 -0
  125. package/dist/sampling.js +712 -0
  126. package/dist/scope.d.ts +65 -0
  127. package/dist/scope.js +128 -0
  128. package/dist/scripts.d.ts +243 -0
  129. package/dist/scripts.js +326 -0
  130. package/dist/sessionLayout.d.ts +339 -0
  131. package/dist/sessionLayout.js +503 -0
  132. package/dist/sessionSettings.d.ts +70 -0
  133. package/dist/sessionSettings.js +2 -0
  134. package/dist/settings.d.ts +501 -0
  135. package/dist/settings.js +604 -0
  136. package/dist/settingsSlot.d.ts +108 -0
  137. package/dist/settingsSlot.js +166 -0
  138. package/dist/shapes.d.ts +373 -0
  139. package/dist/shapes.js +408 -0
  140. package/dist/sheets.d.ts +165 -0
  141. package/dist/sheets.js +251 -0
  142. package/dist/statShapes.d.ts +96 -0
  143. package/dist/statShapes.js +112 -0
  144. package/dist/status.d.ts +103 -0
  145. package/dist/status.js +125 -0
  146. package/dist/storage.d.ts +145 -0
  147. package/dist/storage.js +33 -0
  148. package/dist/storyTime.d.ts +308 -0
  149. package/dist/storyTime.js +560 -0
  150. package/dist/surfaces.d.ts +501 -0
  151. package/dist/surfaces.js +292 -0
  152. package/dist/template.d.ts +312 -0
  153. package/dist/template.js +554 -0
  154. package/dist/templateCheck.d.ts +60 -0
  155. package/dist/templateCheck.js +516 -0
  156. package/dist/templateFit.d.ts +157 -0
  157. package/dist/templateFit.js +349 -0
  158. package/dist/templateIds.d.ts +138 -0
  159. package/dist/templateIds.js +144 -0
  160. package/dist/templateScopeAt.d.ts +131 -0
  161. package/dist/templateScopeAt.js +354 -0
  162. package/dist/testing.d.ts +177 -0
  163. package/dist/testing.js +383 -0
  164. package/dist/tokenizers.d.ts +113 -0
  165. package/dist/tokenizers.js +184 -0
  166. package/dist/turnLock.d.ts +96 -0
  167. package/dist/turnLock.js +79 -0
  168. package/dist/turnOrder.d.ts +143 -0
  169. package/dist/turnOrder.js +128 -0
  170. package/dist/validate.d.ts +74 -0
  171. package/dist/validate.js +1399 -0
  172. package/dist/values.d.ts +212 -0
  173. package/dist/values.js +390 -0
  174. package/dist/variables.d.ts +493 -0
  175. package/dist/variables.js +662 -0
  176. package/dist/verdicts.d.ts +275 -0
  177. package/dist/verdicts.js +348 -0
  178. package/dist/widgetDecls.d.ts +88 -0
  179. package/dist/widgetDecls.js +119 -0
  180. package/dist/widgets.d.ts +1527 -0
  181. package/dist/widgets.js +208 -0
  182. package/dist/wire.d.ts +126 -0
  183. package/dist/wire.js +140 -0
  184. package/dist/worldinfo.d.ts +150 -0
  185. package/dist/worldinfo.js +212 -0
  186. package/host-elements.d.ts +914 -0
  187. package/package.json +67 -0
@@ -0,0 +1,493 @@
1
+ /**
2
+ * Context variables as an open registry (F2 — ids namespaced, `core:` reserved).
3
+ *
4
+ * ## The inversion this exists to make
5
+ *
6
+ * A context template today writes `{{{characters}}}` and gets back a blob of
7
+ * JSON whose shape was decided in TypeScript — indentation and all. Which means
8
+ * "I want my characters rendered as prose instead of JSON" is not a
9
+ * configuration question at all; it is a code change. The template can decide
10
+ * *whether* characters appear and *where*, and has no say whatsoever in what
11
+ * they look like when they do.
12
+ *
13
+ * A variable declaration moves that decision into data. The producing node says
14
+ * "this slot renders `core:var/characters@1`", the registry says what is in
15
+ * scope when it renders and what a representative value looks like, and the
16
+ * actual presentation becomes a swappable row the same way a prompt is.
17
+ *
18
+ * ## Why `scope` is on the declaration and not inferred
19
+ *
20
+ * This is the same argument `SlotDecl.variables` makes for source templates and
21
+ * for the same reason (see descriptors.ts): the shape an author needs to write
22
+ * against lives *inside* a payload, not on a port. Typed ports can say a node
23
+ * emits `core:shape/json@1`; they cannot tell whoever is writing
24
+ * `{{#each characters}}{{ this.nickname }}` whether `nickname` is a field.
25
+ * Declaring it is what makes lint and autocomplete possible at all, and it is
26
+ * the "pass expected shapes down to the configuration" half of the feature.
27
+ *
28
+ * `sample` is the other half. A preview that renders against real chat data
29
+ * needs a chat; a preview that renders against a declared sample needs nothing,
30
+ * which is what lets the template editor show output while you type.
31
+ */
32
+ import type { I18n } from './descriptors.js';
33
+ import { type ScopeValues, type TemplateScope, type VarField, type VarValue } from './template.js';
34
+ /** `core:var/characters@1` — namespaced and versioned like every other id. @experimental */
35
+ export type VariableId = string;
36
+ /** @experimental */
37
+ export interface VariableDecl {
38
+ id: VariableId;
39
+ i18n?: {
40
+ name?: I18n;
41
+ description?: I18n;
42
+ };
43
+ /**
44
+ * What this variable is, shown where it is selected. Display text: stripped
45
+ * from any content hash for the same reason `i18n` is.
46
+ */
47
+ description?: I18n;
48
+ /**
49
+ * What is in the root of a template rendering this variable.
50
+ *
51
+ * Normally one entry named for the variable itself — `{ characters: 'any' }`
52
+ * — but nothing requires that, and a variable whose presentation depends on
53
+ * a second value declares both.
54
+ */
55
+ scope: TemplateScope;
56
+ /** A representative value, for previews and publish-time checking. */
57
+ sample: unknown;
58
+ }
59
+ type IsUnion<T, U = T> = T extends unknown ? ([U] extends [T] ? false : true) : never;
60
+ /**
61
+ * What a declaration's `sample` must be, from its `scope` (typed templates P1).
62
+ *
63
+ * One root — the usual case, `{ worldLore: … }` — and the sample is that
64
+ * root's value; several, and it is an object covering them (`sampleValues`).
65
+ * A scope the compiler cannot see into (`TemplateScope` itself, a widened
66
+ * `VarField`) leaves the sample `unknown`, exactly as before.
67
+ * @experimental
68
+ */
69
+ export type VariableSample<S extends TemplateScope> = string extends keyof S ? unknown : true extends IsUnion<keyof S> ? ScopeValues<S> : VarValue<S[keyof S]>;
70
+ /**
71
+ * A variable declaration whose `sample` is checked against its `scope` by the
72
+ * compiler — what `defineVariable` and `definePluginVariable` take.
73
+ * @experimental
74
+ */
75
+ export type TypedVariableDecl<S extends TemplateScope> = Omit<VariableDecl, 'scope' | 'sample'> & {
76
+ scope: S;
77
+ sample: VariableSample<S>;
78
+ };
79
+ /**
80
+ * Register a variable declaration.
81
+ *
82
+ * Two refusals, both the same rule the engine and renderer registries enforce:
83
+ * an id has exactly one owner, and `core:` is not for the taking. A plugin that
84
+ * could redefine `core:var/characters@1` would change how characters render in
85
+ * every pipeline on the instance without appearing in a single spec — invisible
86
+ * in exactly the way a prompt change is not.
87
+ * @experimental
88
+ */
89
+ export declare function defineVariable<S extends TemplateScope>(decl: TypedVariableDecl<S>): VariableDecl & {
90
+ scope: S;
91
+ };
92
+ /**
93
+ * The plugin-facing door. Same registration, minus the ability to claim core's
94
+ * namespace — checked here rather than in `defineVariable` so core's own
95
+ * declarations do not have to argue their way past their own guard.
96
+ * @experimental
97
+ */
98
+ export declare function definePluginVariable<S extends TemplateScope>(pluginId: string, decl: TypedVariableDecl<S>): VariableDecl & {
99
+ scope: S;
100
+ };
101
+ /** @internal */
102
+ export declare const getVariable: (id: VariableId) => VariableDecl | undefined;
103
+ /** @internal */
104
+ export declare const allVariables: () => VariableDecl[];
105
+ /** @internal */
106
+ export declare function _clearVariables(): void;
107
+ /**
108
+ * Take one variable back out of the registry — a HOST's door, for a plugin's
109
+ * variables it registered from a stored manifest and withdraws on uninstall
110
+ * (the way `_withdrawGenre` serves a plugin's genres). Refuses `core:` ids: core's
111
+ * variables are this build's, and nothing a plugin's lifecycle does removes them.
112
+ * @internal
113
+ */
114
+ export declare function _withdrawVariable(id: VariableId): boolean;
115
+ /**
116
+ * What is wrong with a package's variable list, one sentence each — the check
117
+ * `defineExtension`, the packager and a host's install share (typed templates,
118
+ * 2026-09-27). Every id sits under the package's own namespace: `core:` is
119
+ * reserved and another package's namespace is theirs (F2). A list naming one
120
+ * id twice with different content is refused — an id means one thing.
121
+ * @experimental
122
+ */
123
+ export declare function pluginVariableFindings(slug: string, raw: unknown, at?: string): string[];
124
+ /** @experimental */
125
+ export declare const varInstructions: VariableDecl & {
126
+ scope: {
127
+ instructions: {
128
+ type: "string";
129
+ };
130
+ };
131
+ };
132
+ /** @experimental */
133
+ export declare const varCharacters: VariableDecl & {
134
+ scope: {
135
+ characters: {
136
+ type: "list";
137
+ of: VarField;
138
+ };
139
+ };
140
+ };
141
+ /** @experimental */
142
+ export declare const varPersonas: VariableDecl & {
143
+ scope: {
144
+ personas: {
145
+ type: "list";
146
+ of: {
147
+ type: "object";
148
+ fields: {
149
+ name: {
150
+ type: "string";
151
+ };
152
+ description: {
153
+ type: "string";
154
+ optional: true;
155
+ };
156
+ };
157
+ };
158
+ };
159
+ };
160
+ };
161
+ /** @experimental */
162
+ export declare const varScenario: VariableDecl & {
163
+ scope: {
164
+ scenario: {
165
+ type: "string";
166
+ };
167
+ };
168
+ };
169
+ /** @experimental */
170
+ export declare const varExampleDialogue: VariableDecl & {
171
+ scope: {
172
+ exampleDialogue: {
173
+ type: "string";
174
+ };
175
+ };
176
+ };
177
+ /** @experimental */
178
+ export declare const varPostHistoryInstructions: VariableDecl & {
179
+ scope: {
180
+ postHistoryInstructions: {
181
+ type: "string";
182
+ };
183
+ };
184
+ };
185
+ /** @experimental */
186
+ export declare const varCharacterNames: VariableDecl & {
187
+ scope: {
188
+ characterNames: {
189
+ type: "string";
190
+ };
191
+ };
192
+ };
193
+ /** @experimental */
194
+ export declare const varPersonaNames: VariableDecl & {
195
+ scope: {
196
+ personaNames: {
197
+ type: "string";
198
+ };
199
+ };
200
+ };
201
+ /** @experimental */
202
+ export declare const varWorldLore: VariableDecl & {
203
+ scope: {
204
+ worldLore: {
205
+ type: "record";
206
+ of: {
207
+ type: "string";
208
+ };
209
+ };
210
+ };
211
+ };
212
+ /** @experimental */
213
+ export declare const varHistory: VariableDecl & {
214
+ scope: {
215
+ history: {
216
+ type: "record";
217
+ of: {
218
+ type: "string";
219
+ };
220
+ };
221
+ };
222
+ };
223
+ /**
224
+ * Documentation excerpts retrieved for the latest question — the band
225
+ * `core:query/docs-search@1` publishes (the guide genre's retrieval; declared
226
+ * 2026-09-27). Its own band, not `worldLore`: an excerpt is the app's manual,
227
+ * not a fact about a story's world, and a template has to be able to frame it
228
+ * as the one source of truth about the app — and to say so when it is empty.
229
+ *
230
+ * Keyed by "Page › Section"; each value begins with the page's path
231
+ * (`Path: /docs/<slug>#<anchor>`), so the address a reply cites is the one
232
+ * the compiled docs actually serve.
233
+ * @experimental
234
+ */
235
+ export declare const varDocsExcerpts: VariableDecl & {
236
+ scope: {
237
+ docsExcerpts: {
238
+ type: "record";
239
+ of: {
240
+ type: "string";
241
+ };
242
+ };
243
+ };
244
+ };
245
+ /**
246
+ * Recalled lines — older transcript lines found again because they name what
247
+ * the current context names: the band `core:query/entity-search@1` publishes
248
+ * on its `messages` out-port (declared 2026-09-27, owner ruling option b).
249
+ *
250
+ * Its own band, not `messages`: the transcript renders from the recent
251
+ * window (`sessionMessages`), so a recalled line in the transcript's band was
252
+ * budgeted and then rendered nowhere. As a declared band a template places it
253
+ * where it belongs — `{{{recalledLines}}}` — per genre; nothing places it
254
+ * automatically.
255
+ *
256
+ * One entry per line, oldest first. `turn` is the line's 1-based position in
257
+ * its channel's visible transcript, so "turn 12" is the twelfth message a
258
+ * reader of that channel would count; `speaker` is named by the same chain
259
+ * that names the transcript's own lines.
260
+ *
261
+ * Not *recall* the measurement (precision/recall): a **recalled line** is a
262
+ * line, and the qualifier is what keeps the two apart (R3).
263
+ * @experimental
264
+ */
265
+ export declare const varRecalledLines: VariableDecl & {
266
+ scope: {
267
+ recalledLines: {
268
+ type: "list";
269
+ of: {
270
+ type: "object";
271
+ fields: {
272
+ speaker: {
273
+ type: "string";
274
+ description: {
275
+ en: string;
276
+ };
277
+ };
278
+ turn: {
279
+ type: "number";
280
+ description: {
281
+ en: string;
282
+ };
283
+ };
284
+ text: {
285
+ type: "string";
286
+ description: {
287
+ en: string;
288
+ };
289
+ };
290
+ };
291
+ };
292
+ };
293
+ };
294
+ };
295
+ /**
296
+ * Lore bound to a cast member that fit the budget — Assemble's
297
+ * `characterLore`, one entry per admitted row in the order they were ranked.
298
+ *
299
+ * Privacy is decided before this: the lore read gives a speaker only the
300
+ * entries that speaker may see (`core:policy/binding-visibility@1`) — their
301
+ * own and the personas'; for the narrator, the background members' and the
302
+ * entries bound to nobody. A template renders it where it wants it,
303
+ * typically beside the character cards.
304
+ * @experimental
305
+ */
306
+ export declare const varCharacterLore: VariableDecl & {
307
+ scope: {
308
+ characterLore: {
309
+ type: "list";
310
+ of: VarField;
311
+ };
312
+ };
313
+ };
314
+ /**
315
+ * The speaker-centric relationship summary from the narrative graph.
316
+ *
317
+ * ⚠ This was declared `'any'` and carried a **pre-stringified string** —
318
+ * `buildGraphContext` called `JSON.stringify(graph, null, 1)` before the value
319
+ * ever reached a template, so the layout was a passthrough. That made it the
320
+ * one context value a layout could do nothing with: not prose, not a dropped
321
+ * section, not even a different indent, because the shape had already been
322
+ * flattened upstream. The node now emits the structure and the layout does the
323
+ * rendering, which is the same inversion `characters` got.
324
+ *
325
+ * All three sections are conditional. An install with no legendary figures has
326
+ * no `legendaryFigures` key at all rather than an empty object, and the shipped
327
+ * layout's guards are written against exactly that.
328
+ *
329
+ * Distinct from `narrativeGraph`, which the infill engines populated and which
330
+ * nothing renders any more: this one is speaker-centric and always-on wherever
331
+ * a chat has a lorebook and the speaker has a bound node.
332
+ */
333
+ /**
334
+ * How the speaking character regards everyone else.
335
+ *
336
+ * ⚠ Split, with its sibling below, out of `core:var/speaker-relationships@1`.
337
+ * That one variable held both directions and the legendary figures under a
338
+ * single "Your relationships:" heading — so a model was handed what the speaker
339
+ * thinks of Brannoc and what Rell thinks of the speaker as one undifferentiated
340
+ * list, and a user who wanted one and not the other had no setting for it. Two
341
+ * variables means two layouts, two priorities and two switches.
342
+ * @experimental
343
+ */
344
+ export declare const varRelationshipsPerspectives: VariableDecl & {
345
+ scope: {
346
+ relationshipsPerspectives: {
347
+ type: import("./template.js").VarType;
348
+ fields?: Record<string, VarField>;
349
+ of?: VarField;
350
+ optional?: boolean;
351
+ description: {
352
+ en: string;
353
+ };
354
+ };
355
+ };
356
+ };
357
+ /**
358
+ * How everyone else regards the speaking character, and who the world knows of.
359
+ *
360
+ * `legendaryFigures` sits here rather than in its own variable because it is
361
+ * the same kind of claim — what is publicly known — and the opposite kind from
362
+ * "what you think of them". A third variable would put a mostly-empty block in
363
+ * every prompt on every install that has never marked a node legendary.
364
+ *
365
+ * Both sections are conditional: an install with no legendary figures has no
366
+ * `legendaryFigures` key at all rather than an empty object, and the shipped
367
+ * layout's guards are written against exactly that.
368
+ * @experimental
369
+ */
370
+ export declare const varRelationshipsKnown: VariableDecl & {
371
+ scope: {
372
+ relationshipsKnown: {
373
+ type: "object";
374
+ fields: {
375
+ howOthersRegardYou: {
376
+ type: import("./template.js").VarType;
377
+ fields?: Record<string, VarField>;
378
+ of?: VarField;
379
+ optional: true;
380
+ description: {
381
+ en: string;
382
+ };
383
+ };
384
+ legendaryFigures: {
385
+ type: "record";
386
+ optional: true;
387
+ description: {
388
+ en: string;
389
+ };
390
+ of: {
391
+ type: "object";
392
+ fields: {
393
+ summary: {
394
+ type: "string";
395
+ optional: true;
396
+ };
397
+ state: {
398
+ type: "string";
399
+ optional: true;
400
+ };
401
+ relationships: {
402
+ type: import("./template.js").VarType;
403
+ description?: I18n;
404
+ fields?: Record<string, VarField>;
405
+ of?: VarField;
406
+ optional: true;
407
+ };
408
+ };
409
+ };
410
+ };
411
+ };
412
+ };
413
+ };
414
+ };
415
+ /** @experimental */
416
+ export declare const varCurrentDate: VariableDecl & {
417
+ scope: {
418
+ currentDate: {
419
+ type: "object";
420
+ fields: {
421
+ year: {
422
+ type: "number";
423
+ description: {
424
+ en: string;
425
+ };
426
+ };
427
+ month: {
428
+ type: "number";
429
+ optional: true;
430
+ description: {
431
+ en: string;
432
+ };
433
+ };
434
+ day: {
435
+ type: "number";
436
+ optional: true;
437
+ description: {
438
+ en: string;
439
+ };
440
+ };
441
+ hour: {
442
+ type: "number";
443
+ optional: true;
444
+ description: {
445
+ en: string;
446
+ };
447
+ };
448
+ minute: {
449
+ type: "number";
450
+ optional: true;
451
+ description: {
452
+ en: string;
453
+ };
454
+ };
455
+ label: {
456
+ type: "string";
457
+ optional: true;
458
+ description: {
459
+ en: string;
460
+ };
461
+ };
462
+ };
463
+ };
464
+ };
465
+ };
466
+ /**
467
+ * A declaration's `sample`, spread across the keys of its `scope`.
468
+ *
469
+ * Nearly every variable declares a single-key scope named for itself, and its
470
+ * `sample` is that key's value. A declaration with several keys has to supply
471
+ * an object covering them, which is the only reading that lets a variable whose
472
+ * presentation depends on a second value describe itself at all.
473
+ *
474
+ * This lives here rather than in the host because two things need it and they
475
+ * must agree: the preview that renders a layout against the sample, and the
476
+ * check that the sample matches the schema. A convention implemented twice is
477
+ * one that eventually holds in one place and not the other, and the failure
478
+ * would be a preview quietly rendering against `undefined`.
479
+ * @internal
480
+ */
481
+ export declare function sampleValues(decl: Pick<VariableDecl, 'scope' | 'sample'>): Record<string, unknown>;
482
+ /**
483
+ * Every declared variable whose sample does not match its own schema.
484
+ *
485
+ * Exported rather than left in the test because it is the same check a plugin's
486
+ * variable needs at publish time, and because "the sample is a lie" is a defect
487
+ * an installed plugin can carry just as easily as core can — as core did, in
488
+ * two fields of one declaration, for the entire life of this registry.
489
+ * @experimental
490
+ */
491
+ export declare function checkVariableSamples(decls?: readonly VariableDecl[]): string[];
492
+ export {};
493
+ //# sourceMappingURL=variables.d.ts.map