rpg-engine 0.20.0 → 0.21.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/adventures/index.d.ts +1 -1
- package/dist/adventures/index.js +1 -1
- package/dist/adventures/source.d.ts +3 -0
- package/dist/adventures/source.js +11 -49
- package/dist/campaign/create-campaign.d.ts +1 -1
- package/dist/campaign/create-campaign.js +3 -2
- package/dist/campaign/find-campaign.d.ts +2 -0
- package/dist/campaign/find-campaign.js +2 -0
- package/dist/campaign/index.d.ts +1 -1
- package/dist/campaign/index.js +1 -1
- package/dist/campaign/settings.js +2 -2
- package/dist/commands/book.d.ts +16 -35
- package/dist/commands/book.js +86 -62
- package/dist/commands/config/config.js +1 -1
- package/dist/commands/config/dashboard.d.ts +2 -2
- package/dist/commands/config/dashboard.js +9 -3
- package/dist/commands/config/words.js +1 -1
- package/dist/commands/image.d.ts +5 -0
- package/dist/commands/image.js +6 -3
- package/dist/commands/package/data.d.ts +35 -0
- package/dist/commands/package/data.js +117 -0
- package/dist/commands/package/here.d.ts +7 -2
- package/dist/commands/package/here.js +23 -11
- package/dist/commands/package/install.js +14 -15
- package/dist/commands/package/language.d.ts +15 -0
- package/dist/commands/package/language.js +109 -0
- package/dist/commands/package/package.js +20 -10
- package/dist/commands/package/result.d.ts +19 -0
- package/dist/commands/package/theme.d.ts +13 -0
- package/dist/commands/package/theme.js +66 -0
- package/dist/commands/package/uninstall.d.ts +4 -1
- package/dist/commands/package/uninstall.js +29 -9
- package/dist/commands/scene/close.d.ts +1 -1
- package/dist/commands/scene/close.js +15 -8
- package/dist/commands/shared/books/adventures.d.ts +0 -4
- package/dist/commands/shared/books/adventures.js +2 -31
- package/dist/commands/shared/books/words.js +3 -2
- package/dist/commands/shared/campaign/book.d.ts +21 -8
- package/dist/commands/shared/campaign/book.js +65 -42
- package/dist/commands/shared/campaign/saves.js +2 -2
- package/dist/commands/shared/campaign/world.js +2 -1
- package/dist/commands/shared/packages/catalog.d.ts +3 -3
- package/dist/commands/shared/packages/catalog.js +98 -42
- package/dist/commands/shared/packages/unpacked.d.ts +50 -0
- package/dist/commands/shared/packages/unpacked.js +146 -0
- package/dist/core/archive.d.ts +13 -0
- package/dist/core/archive.js +76 -0
- package/dist/core/context.d.ts +2 -0
- package/dist/core/context.js +1 -0
- package/dist/core/store.d.ts +5 -1
- package/dist/core/store.js +15 -2
- package/dist/dashboard/api.js +24 -1
- package/dist/dashboard/app.js +7 -2
- package/dist/dashboard/guide/ar.md +8 -8
- package/dist/dashboard/guide/cs.md +8 -8
- package/dist/dashboard/guide/da.md +9 -9
- package/dist/dashboard/guide/de.md +8 -8
- package/dist/dashboard/guide/el.md +8 -8
- package/dist/dashboard/guide/en.md +7 -7
- package/dist/dashboard/guide/es.md +8 -8
- package/dist/dashboard/guide/fi.md +8 -8
- package/dist/dashboard/guide/fr.md +8 -8
- package/dist/dashboard/guide/he.md +8 -8
- package/dist/dashboard/guide/hi.md +8 -8
- package/dist/dashboard/guide/hu.md +8 -8
- package/dist/dashboard/guide/is.md +8 -8
- package/dist/dashboard/guide/it.md +8 -8
- package/dist/dashboard/guide/ja.md +8 -8
- package/dist/dashboard/guide/ko.md +8 -8
- package/dist/dashboard/guide/nb.md +9 -9
- package/dist/dashboard/guide/nl.md +8 -8
- package/dist/dashboard/guide/pl.md +8 -8
- package/dist/dashboard/guide/pt.md +8 -8
- package/dist/dashboard/guide/ro.md +8 -8
- package/dist/dashboard/guide/ru.md +9 -9
- package/dist/dashboard/guide/sv.md +8 -8
- package/dist/dashboard/guide/tr.md +8 -8
- package/dist/dashboard/guide/uk.md +9 -9
- package/dist/dashboard/guide/zh.md +8 -8
- package/dist/dashboard/i18n/ar.json +33 -5
- package/dist/dashboard/i18n/cs.json +33 -5
- package/dist/dashboard/i18n/da.json +33 -5
- package/dist/dashboard/i18n/de.json +33 -5
- package/dist/dashboard/i18n/el.json +33 -5
- package/dist/dashboard/i18n/es.json +33 -5
- package/dist/dashboard/i18n/fi.json +33 -5
- package/dist/dashboard/i18n/fr.json +33 -5
- package/dist/dashboard/i18n/he.json +33 -5
- package/dist/dashboard/i18n/hi.json +33 -5
- package/dist/dashboard/i18n/hu.json +33 -5
- package/dist/dashboard/i18n/is.json +33 -5
- package/dist/dashboard/i18n/it.json +33 -5
- package/dist/dashboard/i18n/ja.json +33 -5
- package/dist/dashboard/i18n/ko.json +33 -5
- package/dist/dashboard/i18n/nb.json +33 -5
- package/dist/dashboard/i18n/nl.json +33 -5
- package/dist/dashboard/i18n/pl.json +33 -5
- package/dist/dashboard/i18n/pt.json +33 -5
- package/dist/dashboard/i18n/ro.json +33 -5
- package/dist/dashboard/i18n/ru.json +33 -5
- package/dist/dashboard/i18n/sv.json +33 -5
- package/dist/dashboard/i18n/tr.json +33 -5
- package/dist/dashboard/i18n/uk.json +33 -5
- package/dist/dashboard/i18n/zh.json +33 -5
- package/dist/dashboard/journal/book.js +3 -2
- package/dist/dashboard/journal/journal.js +8 -5
- package/dist/dashboard/kit.js +1 -1
- package/dist/dashboard/packages/catalog.js +31 -14
- package/dist/dashboard/packages/engine.js +46 -2
- package/dist/dashboard/packages/installed.js +13 -0
- package/dist/dashboard/packages/outcomes.js +21 -0
- package/dist/dashboard/packages/packages.js +41 -18
- package/dist/dashboard/packages/rows.js +3 -1
- package/dist/dashboard/parts/icons.js +3 -0
- package/dist/dashboard/parts/picture.js +89 -0
- package/dist/dashboard/parts/refusals.js +8 -1
- package/dist/dashboard/parts/widgets.js +2 -1
- package/dist/dashboard/play/scene.js +8 -5
- package/dist/dashboard/settings/settings.js +23 -13
- package/dist/dashboard/sheet/party.js +5 -2
- package/dist/dashboard/sheet/sheet.js +2 -1
- package/dist/dashboard/shell/notices.js +2 -2
- package/dist/dashboard/shell/system-style.js +45 -12
- package/dist/dashboard/shell/tooltip.js +223 -0
- package/dist/dashboard/style.css +283 -132
- package/dist/dashboard/world/lore.js +4 -3
- package/dist/dashboard/world/place-card.js +2 -1
- package/dist/languages/index.d.ts +1 -1
- package/dist/languages/index.js +1 -1
- package/dist/languages/pack.d.ts +4 -1
- package/dist/languages/pack.js +16 -5
- package/dist/packages/engine.d.ts +7 -0
- package/dist/packages/engine.js +32 -1
- package/dist/packages/index.d.ts +1 -1
- package/dist/packages/index.js +1 -1
- package/dist/server/dashboard/engine.d.ts +18 -0
- package/dist/server/dashboard/engine.js +31 -0
- package/dist/server/dashboard/files.d.ts +8 -1
- package/dist/server/dashboard/files.js +30 -10
- package/dist/server/dashboard/index.d.ts +3 -0
- package/dist/server/dashboard/index.js +10 -1
- package/dist/server/dashboard/pictures.d.ts +7 -0
- package/dist/server/dashboard/pictures.js +62 -0
- package/dist/server/dashboard/writes.d.ts +5 -3
- package/dist/server/dashboard/writes.js +45 -14
- package/dist/testing/index.js +1 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +4 -2
- package/dist/themes/installed.d.ts +14 -0
- package/dist/themes/installed.js +28 -0
- package/dist/themes/theme.d.ts +7 -0
- package/dist/themes/theme.js +22 -0
- package/instructions/core.md +3 -3
- package/instructions/dashboard-guide.md +1 -0
- package/instructions/mentor-hints.md +1 -1
- package/instructions/mentor-tutorial.md +1 -1
- package/instructions/party.md +1 -1
- package/instructions/play.md +2 -2
- package/package.json +1 -1
- package/systems/free/instructions/outcomes-told.md +1 -1
package/dist/dashboard/style.css
CHANGED
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
outline-offset: 2px !important;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
/* A clip or a mask on a control would cut its focus ring
|
|
149
|
+
/* A clip or a mask on a control would cut its focus ring (D-528). */
|
|
150
150
|
:is(button, a, summary, input, select, textarea, label, [role="tab"], [role="button"], [role="radio"], [tabindex], [data-tip]) {
|
|
151
151
|
clip-path: none !important;
|
|
152
152
|
mask: none !important;
|
|
@@ -160,19 +160,6 @@
|
|
|
160
160
|
outline-offset: -2px !important;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
/* The last tab's mark is near the page's edge: its tip ends at the mark, else on a phone the page grows wider. */
|
|
164
|
-
.page-tabs > [role="tab"]:last-child .tab-mark[data-tip]::before {
|
|
165
|
-
left: auto !important;
|
|
166
|
-
inset-inline-end: 0 !important;
|
|
167
|
-
translate: 0 4px !important;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@media (hover: hover) {
|
|
171
|
-
.page-tabs > [role="tab"]:last-child .tab-mark[data-tip]:hover::before {
|
|
172
|
-
translate: 0 0 !important;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
163
|
.quest-cover-top :focus-visible {
|
|
177
164
|
outline-color: var(--on-veil) !important;
|
|
178
165
|
}
|
|
@@ -200,65 +187,10 @@
|
|
|
200
187
|
outline-offset: 4px !important;
|
|
201
188
|
}
|
|
202
189
|
|
|
203
|
-
/* Its tooltip from the pip toward the name, where there is room, in lines when it is long. */
|
|
204
|
-
.token .status-pip[data-tip]::before {
|
|
205
|
-
left: auto !important;
|
|
206
|
-
inset-inline-start: 0 !important;
|
|
207
|
-
width: max-content !important;
|
|
208
|
-
max-width: 240px !important;
|
|
209
|
-
white-space: normal !important;
|
|
210
|
-
translate: 0 4px !important;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
@media (hover: hover) {
|
|
214
|
-
.token .status-pip[data-tip]:hover::before {
|
|
215
|
-
translate: 0 0 !important;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/* Over the pip, its tooltip alone: not the one of the class of whom it is on. */
|
|
220
|
-
.token-holder:has(.status-pip:hover)::before {
|
|
221
|
-
opacity: 0 !important;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
190
|
.row:focus-visible {
|
|
225
191
|
outline-offset: -2px !important;
|
|
226
192
|
}
|
|
227
193
|
|
|
228
|
-
:is(.effect.icon-only, .effect.more)[data-tip]::before {
|
|
229
|
-
left: auto !important;
|
|
230
|
-
inset-inline-start: 0 !important;
|
|
231
|
-
width: max-content !important;
|
|
232
|
-
max-width: 240px !important;
|
|
233
|
-
white-space: normal !important;
|
|
234
|
-
translate: 0 4px !important;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
@media (hover: hover) {
|
|
238
|
-
:is(.effect.icon-only, .effect.more)[data-tip]:hover::before {
|
|
239
|
-
translate: 0 0 !important;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
:is(.effect.icon-only, .effect.more)[data-tip]:focus-visible::before {
|
|
244
|
-
translate: 0 0 !important;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/* The asterisk of a changed page stands in narrow cards: its tooltip in lines, never wider than its card. */
|
|
248
|
-
.changed-mark[data-tip]::before {
|
|
249
|
-
width: max-content !important;
|
|
250
|
-
max-width: 200px !important;
|
|
251
|
-
white-space: normal !important;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/* How a number is made, in its tooltip (FOR-8): lines that wrap, its free roll on the last. */
|
|
255
|
-
[data-tip].tip-wide::before {
|
|
256
|
-
width: max-content !important;
|
|
257
|
-
max-width: 260px !important;
|
|
258
|
-
text-align: start !important;
|
|
259
|
-
white-space: pre-line !important;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
194
|
.asked.folded .asked-fold:focus-visible {
|
|
263
195
|
outline: none !important;
|
|
264
196
|
}
|
|
@@ -293,79 +225,62 @@
|
|
|
293
225
|
outline-offset: 1px !important;
|
|
294
226
|
}
|
|
295
227
|
|
|
296
|
-
/*
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
position:
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
228
|
+
/* The page's one tooltip (T-228), what a control's data-tip says: in the top layer, over every card, list and dialog, nothing cuts it; shell/tooltip.ts
|
|
229
|
+
shows it after a moment under a pointer or at once by the keyboard, never at a touch, and places it beside its control inside the window. Its lines
|
|
230
|
+
wrap, a name of several things a line for each. It comes from its control's side. */
|
|
231
|
+
.page-tip {
|
|
232
|
+
position: fixed !important;
|
|
233
|
+
inset: var(--tip-top, 0) auto auto var(--tip-left, 0) !important;
|
|
234
|
+
box-sizing: border-box !important;
|
|
235
|
+
width: max-content !important;
|
|
236
|
+
max-width: min(20rem, calc(100vw - 16px)) !important;
|
|
237
|
+
height: auto !important;
|
|
238
|
+
margin: 0 !important;
|
|
304
239
|
padding: 5px 8px !important;
|
|
240
|
+
border: 0 !important;
|
|
305
241
|
border-radius: var(--radius-xs) !important;
|
|
242
|
+
overflow: visible !important;
|
|
306
243
|
background: var(--ink) !important;
|
|
307
244
|
color: var(--paper) !important;
|
|
308
245
|
font: 400 0.8rem/1.2 system-ui, -apple-system, "Segoe UI", sans-serif !important;
|
|
309
246
|
letter-spacing: 0 !important;
|
|
247
|
+
text-align: start !important;
|
|
310
248
|
text-transform: none !important;
|
|
311
|
-
white-space: pre !important;
|
|
312
|
-
|
|
313
|
-
translate: -50% 4px !important;
|
|
249
|
+
white-space: pre-line !important;
|
|
250
|
+
overflow-wrap: break-word !important;
|
|
314
251
|
pointer-events: none !important;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
[data-tip].tip-left::before {
|
|
319
|
-
inset-inline-start: auto !important;
|
|
320
|
-
inset-inline-end: calc(100% + 8px) !important;
|
|
321
|
-
bottom: 50% !important;
|
|
322
|
-
translate: 4px 50% !important;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
/* Under the control, where one over it would cover what is above, as the chips of the head over the row's icons (D-409). */
|
|
326
|
-
[data-tip].tip-below::before {
|
|
327
|
-
top: calc(100% + 8px) !important;
|
|
328
|
-
bottom: auto !important;
|
|
329
|
-
translate: -50% -4px !important;
|
|
252
|
+
opacity: 1 !important;
|
|
253
|
+
transition: opacity var(--quick) linear !important;
|
|
330
254
|
}
|
|
331
255
|
|
|
332
|
-
@
|
|
333
|
-
|
|
334
|
-
opacity:
|
|
335
|
-
translate: -50% 0 !important;
|
|
336
|
-
transition-delay: var(--wait) !important;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
[data-tip].tip-left:hover::before {
|
|
340
|
-
translate: 0 50% !important;
|
|
256
|
+
@starting-style {
|
|
257
|
+
.page-tip.shown {
|
|
258
|
+
opacity: 0 !important;
|
|
341
259
|
}
|
|
342
260
|
}
|
|
343
261
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
262
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
263
|
+
.page-tip {
|
|
264
|
+
translate: 0 0 !important;
|
|
265
|
+
transition: opacity var(--quick) linear, translate var(--quick) var(--ease) !important;
|
|
266
|
+
}
|
|
348
267
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
268
|
+
@starting-style {
|
|
269
|
+
.page-tip.shown[data-side="above"] {
|
|
270
|
+
translate: 0 4px !important;
|
|
271
|
+
}
|
|
352
272
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
display: none !important;
|
|
357
|
-
}
|
|
273
|
+
.page-tip.shown[data-side="below"] {
|
|
274
|
+
translate: 0 -4px !important;
|
|
275
|
+
}
|
|
358
276
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
white-space: pre-line !important;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
277
|
+
.page-tip.shown[data-side="start"] {
|
|
278
|
+
translate: 4px 0 !important;
|
|
279
|
+
}
|
|
365
280
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
281
|
+
.page-tip.shown[data-side="start"][dir="rtl"] {
|
|
282
|
+
translate: -4px 0 !important;
|
|
283
|
+
}
|
|
369
284
|
}
|
|
370
285
|
}
|
|
371
286
|
|
|
@@ -2049,11 +1964,6 @@
|
|
|
2049
1964
|
height: 16px;
|
|
2050
1965
|
}
|
|
2051
1966
|
|
|
2052
|
-
/* Their tooltip over the chip, from its start toward the name, inside the party's strip, which scrolls and so cuts what leaves it. */
|
|
2053
|
-
:is(.effect.icon-only, .effect.more) {
|
|
2054
|
-
position: relative;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
1967
|
/* A package's small card among the values under a name (D-516): a lead's words and value on one line. */
|
|
2058
1968
|
.person-box-lead {
|
|
2059
1969
|
display: inline-flex;
|
|
@@ -2832,6 +2742,32 @@
|
|
|
2832
2742
|
.notice.away {
|
|
2833
2743
|
--tone: var(--warn);
|
|
2834
2744
|
}
|
|
2745
|
+
|
|
2746
|
+
/* A notice with somewhere to go, as a newer RPG Engine's (T-219): its link after its words, its cross at the end, which hides it. */
|
|
2747
|
+
.notice:has(.notice-hide) {
|
|
2748
|
+
padding-block: 4px;
|
|
2749
|
+
padding-inline-end: 4px;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
.notice-words {
|
|
2753
|
+
display: flex;
|
|
2754
|
+
flex-wrap: wrap;
|
|
2755
|
+
column-gap: 8px;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
.notice-link {
|
|
2759
|
+
color: var(--accent);
|
|
2760
|
+
font-weight: 650;
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
.notice-hide {
|
|
2764
|
+
flex: none;
|
|
2765
|
+
margin-inline-start: auto;
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
.notice-hide svg.icon {
|
|
2769
|
+
color: var(--muted);
|
|
2770
|
+
}
|
|
2835
2771
|
}
|
|
2836
2772
|
/* Tokens: a picture of someone as a coin under glass, with the pips of its side and state. */
|
|
2837
2773
|
@layer parts {
|
|
@@ -7638,6 +7574,203 @@
|
|
|
7638
7574
|
}
|
|
7639
7575
|
}
|
|
7640
7576
|
}
|
|
7577
|
+
/* A picture of the player's own for a page (D-572 (3)): over a picture's corner a small square on the veil, seen under the pointer and with the keyboard, always
|
|
7578
|
+
on touch; as words in the open page of the World; the picture darkened while it is sent, and why the game did not take it under the control. */
|
|
7579
|
+
@layer parts {
|
|
7580
|
+
.picture-give {
|
|
7581
|
+
position: relative;
|
|
7582
|
+
display: inline-flex;
|
|
7583
|
+
flex-wrap: wrap;
|
|
7584
|
+
align-items: center;
|
|
7585
|
+
gap: 8px;
|
|
7586
|
+
}
|
|
7587
|
+
|
|
7588
|
+
.picture-host {
|
|
7589
|
+
position: relative;
|
|
7590
|
+
}
|
|
7591
|
+
|
|
7592
|
+
/* A coin keeps its own box, no line's room under a picture: the control sits on its rim. */
|
|
7593
|
+
.picture-spot {
|
|
7594
|
+
position: relative;
|
|
7595
|
+
display: inline-flex;
|
|
7596
|
+
flex: none;
|
|
7597
|
+
}
|
|
7598
|
+
|
|
7599
|
+
/* Over a picture that fills its box, at its lower corner at the end; on the Scene's band at its upper one, as the lower has the place's name. */
|
|
7600
|
+
:is(.picture-spot, .picture-host) > .picture-give {
|
|
7601
|
+
position: absolute;
|
|
7602
|
+
inset-block-end: 8px;
|
|
7603
|
+
inset-inline-end: 8px;
|
|
7604
|
+
z-index: 3;
|
|
7605
|
+
}
|
|
7606
|
+
|
|
7607
|
+
.place-shot.picture-host > .picture-give {
|
|
7608
|
+
inset-block: 8px auto;
|
|
7609
|
+
}
|
|
7610
|
+
|
|
7611
|
+
/* The button is what is hit, the plate what is seen: one size under a pointer, the plate within 44 px on touch. */
|
|
7612
|
+
.picture-give.icon .icon-button {
|
|
7613
|
+
--plate: 32px;
|
|
7614
|
+
width: var(--plate);
|
|
7615
|
+
height: var(--plate);
|
|
7616
|
+
border-radius: var(--radius-m);
|
|
7617
|
+
color: var(--on-veil);
|
|
7618
|
+
}
|
|
7619
|
+
|
|
7620
|
+
.picture-plate {
|
|
7621
|
+
display: grid;
|
|
7622
|
+
flex: none;
|
|
7623
|
+
place-items: center;
|
|
7624
|
+
width: var(--plate);
|
|
7625
|
+
height: var(--plate);
|
|
7626
|
+
border: 1px solid color-mix(in srgb, var(--on-veil) 22%, transparent);
|
|
7627
|
+
border-radius: var(--radius-m);
|
|
7628
|
+
background: color-mix(in srgb, var(--veil) 72%, transparent);
|
|
7629
|
+
backdrop-filter: blur(3px);
|
|
7630
|
+
}
|
|
7631
|
+
|
|
7632
|
+
.picture-plate svg.icon {
|
|
7633
|
+
width: 18px;
|
|
7634
|
+
height: 18px;
|
|
7635
|
+
}
|
|
7636
|
+
|
|
7637
|
+
/* On a coin, smaller, on its rim at the upper end, across from the pip of its side, as the lower end has the pip of its state; ringed by the panel to stand
|
|
7638
|
+
apart from the picture. */
|
|
7639
|
+
.picture-spot > .picture-give {
|
|
7640
|
+
inset-block: -3px auto;
|
|
7641
|
+
inset-inline-end: -3px;
|
|
7642
|
+
}
|
|
7643
|
+
|
|
7644
|
+
:is(.picture-spot, li.picture-host) > .picture-give .icon-button {
|
|
7645
|
+
--plate: 24px;
|
|
7646
|
+
border-radius: var(--radius-s);
|
|
7647
|
+
}
|
|
7648
|
+
|
|
7649
|
+
:is(.picture-spot, li.picture-host) > .picture-give .picture-plate {
|
|
7650
|
+
border: 2px solid var(--panel);
|
|
7651
|
+
border-radius: var(--radius-s);
|
|
7652
|
+
}
|
|
7653
|
+
|
|
7654
|
+
:is(.picture-spot, li.picture-host) > .picture-give .picture-plate svg.icon {
|
|
7655
|
+
width: 13px;
|
|
7656
|
+
height: 13px;
|
|
7657
|
+
}
|
|
7658
|
+
|
|
7659
|
+
.picture-spot:has(.token.large) > .picture-give .icon-button {
|
|
7660
|
+
--plate: 30px;
|
|
7661
|
+
}
|
|
7662
|
+
|
|
7663
|
+
.picture-spot:has(.token.large) > .picture-give .picture-plate svg.icon {
|
|
7664
|
+
width: 17px;
|
|
7665
|
+
height: 17px;
|
|
7666
|
+
}
|
|
7667
|
+
|
|
7668
|
+
/* In a row of a list, on the rim of its thumb as on a coin: the thumb is 44 px at the row's start past its padding, in the row's middle. */
|
|
7669
|
+
li.picture-host > .picture-give {
|
|
7670
|
+
inset-block: calc(50% - 25px) auto;
|
|
7671
|
+
inset-inline: 33px auto;
|
|
7672
|
+
}
|
|
7673
|
+
|
|
7674
|
+
/* Under a pointer: seen over the picture or the row under it, with the keyboard, while it sends and after a refusal. */
|
|
7675
|
+
@media (hover: hover) {
|
|
7676
|
+
:is(.picture-spot, .picture-host) > .picture-give:not(.sending, .refused, :has(:focus-visible)) {
|
|
7677
|
+
opacity: 0;
|
|
7678
|
+
}
|
|
7679
|
+
|
|
7680
|
+
:is(.picture-spot, .picture-host):hover > .picture-give {
|
|
7681
|
+
opacity: 1;
|
|
7682
|
+
}
|
|
7683
|
+
}
|
|
7684
|
+
|
|
7685
|
+
/* On touch: always there, the plate as it is and the target 44 px around it; none on a list's rows, as the page they open has the button. */
|
|
7686
|
+
@media (pointer: coarse) {
|
|
7687
|
+
.picture-give.icon .icon-button {
|
|
7688
|
+
width: 44px;
|
|
7689
|
+
height: 44px;
|
|
7690
|
+
margin: calc((var(--plate) - 44px) / 2);
|
|
7691
|
+
}
|
|
7692
|
+
}
|
|
7693
|
+
|
|
7694
|
+
@media (hover: none) {
|
|
7695
|
+
li.picture-host > .picture-give {
|
|
7696
|
+
display: none;
|
|
7697
|
+
}
|
|
7698
|
+
}
|
|
7699
|
+
|
|
7700
|
+
/* While it sends: the picture darkened, a turning ring in the plate, gold over the veil, in the accent in the words; the new picture clears in. */
|
|
7701
|
+
:is(.picture-spot, .picture-host):has(> .picture-give.sending) :is(img, .initials) {
|
|
7702
|
+
filter: brightness(0.55) saturate(0.6);
|
|
7703
|
+
}
|
|
7704
|
+
|
|
7705
|
+
.picture-wait {
|
|
7706
|
+
width: 16px;
|
|
7707
|
+
height: 16px;
|
|
7708
|
+
border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
|
|
7709
|
+
border-block-start-color: var(--accent);
|
|
7710
|
+
border-radius: 50%;
|
|
7711
|
+
}
|
|
7712
|
+
|
|
7713
|
+
.picture-plate .picture-wait {
|
|
7714
|
+
border-block-start-color: var(--gold);
|
|
7715
|
+
}
|
|
7716
|
+
|
|
7717
|
+
.picture-spot .picture-plate .picture-wait {
|
|
7718
|
+
width: 12px;
|
|
7719
|
+
height: 12px;
|
|
7720
|
+
}
|
|
7721
|
+
|
|
7722
|
+
/* Refused: the plate ringed in the colour of what went wrong, why under it, until the next try. */
|
|
7723
|
+
.picture-give.refused .picture-plate {
|
|
7724
|
+
box-shadow: 0 0 0 2px var(--low);
|
|
7725
|
+
}
|
|
7726
|
+
|
|
7727
|
+
.picture-problem {
|
|
7728
|
+
color: var(--low);
|
|
7729
|
+
font-size: 0.85rem;
|
|
7730
|
+
font-weight: 600;
|
|
7731
|
+
}
|
|
7732
|
+
|
|
7733
|
+
.picture-give.icon .picture-problem {
|
|
7734
|
+
position: absolute;
|
|
7735
|
+
inset-block-start: calc(100% + 6px);
|
|
7736
|
+
inset-inline-end: 0;
|
|
7737
|
+
z-index: 5;
|
|
7738
|
+
width: max-content;
|
|
7739
|
+
max-width: min(280px, 80vw);
|
|
7740
|
+
padding: 8px 10px;
|
|
7741
|
+
border: 1px solid color-mix(in srgb, var(--low) 45%, var(--rule));
|
|
7742
|
+
border-radius: var(--radius-m);
|
|
7743
|
+
background: var(--panel);
|
|
7744
|
+
box-shadow: var(--overlay);
|
|
7745
|
+
line-height: 1.35;
|
|
7746
|
+
white-space: normal;
|
|
7747
|
+
}
|
|
7748
|
+
|
|
7749
|
+
/* From a coin or a row's thumb the words run into the page, at the start of the control. */
|
|
7750
|
+
:is(.picture-spot, li.picture-host) > .picture-give .picture-problem {
|
|
7751
|
+
inset-inline: 0 auto;
|
|
7752
|
+
}
|
|
7753
|
+
|
|
7754
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
7755
|
+
:is(.picture-spot, .picture-host) > .picture-give {
|
|
7756
|
+
transition: opacity var(--quick) var(--ease);
|
|
7757
|
+
}
|
|
7758
|
+
|
|
7759
|
+
:is(.picture-spot, .picture-host) :is(img, .initials) {
|
|
7760
|
+
transition: filter var(--short) var(--ease);
|
|
7761
|
+
}
|
|
7762
|
+
|
|
7763
|
+
.picture-wait {
|
|
7764
|
+
animation: picture-turn 0.8s linear infinite;
|
|
7765
|
+
}
|
|
7766
|
+
}
|
|
7767
|
+
|
|
7768
|
+
@keyframes picture-turn {
|
|
7769
|
+
to {
|
|
7770
|
+
rotate: 1turn;
|
|
7771
|
+
}
|
|
7772
|
+
}
|
|
7773
|
+
}
|
|
7641
7774
|
/* Settings. */
|
|
7642
7775
|
@layer pages {
|
|
7643
7776
|
/* The Settings section (D-341): the player's settings of the campaign in groups, each with what it is and its values, the chosen one in gold and what it
|
|
@@ -8684,13 +8817,19 @@
|
|
|
8684
8817
|
margin-inline-start: auto;
|
|
8685
8818
|
}
|
|
8686
8819
|
|
|
8820
|
+
/* Why the cover's picture was refused floats over its control, as the cover clips what is under it. */
|
|
8821
|
+
.quest-cover > .picture-give .picture-problem {
|
|
8822
|
+
inset-block: auto calc(100% + 6px);
|
|
8823
|
+
}
|
|
8824
|
+
|
|
8687
8825
|
.quest-cover .quest-name {
|
|
8688
8826
|
position: relative;
|
|
8689
8827
|
z-index: 2;
|
|
8690
8828
|
display: -webkit-box;
|
|
8691
8829
|
grid-row: 3;
|
|
8692
8830
|
margin: 0 0 12px;
|
|
8693
|
-
padding: 0
|
|
8831
|
+
padding-block: 0;
|
|
8832
|
+
padding-inline: 16px 56px;
|
|
8694
8833
|
overflow: hidden;
|
|
8695
8834
|
color: var(--on-veil);
|
|
8696
8835
|
font-size: 1.3rem;
|
|
@@ -9736,6 +9875,18 @@
|
|
|
9736
9875
|
line-height: 0.82;
|
|
9737
9876
|
}
|
|
9738
9877
|
|
|
9878
|
+
/* Where the browser sets a capital by the lines it drops, three of them: its top on the first line's capitals, its foot on the third's baseline. */
|
|
9879
|
+
@supports (initial-letter: 3) {
|
|
9880
|
+
.book-text p:first-child:not(:lang(ar), :lang(hi), :lang(ja), :lang(zh), :lang(ko))::first-letter {
|
|
9881
|
+
float: none;
|
|
9882
|
+
margin-inline-end: 0.22em;
|
|
9883
|
+
padding: 0;
|
|
9884
|
+
font-size: 1em;
|
|
9885
|
+
line-height: inherit;
|
|
9886
|
+
initial-letter: 3;
|
|
9887
|
+
}
|
|
9888
|
+
}
|
|
9889
|
+
|
|
9739
9890
|
.book-text .book-break {
|
|
9740
9891
|
margin: 0.9rem 0;
|
|
9741
9892
|
color: var(--doc-rule);
|
|
@@ -11415,7 +11566,7 @@
|
|
|
11415
11566
|
display: contents;
|
|
11416
11567
|
}
|
|
11417
11568
|
|
|
11418
|
-
.place-band.compact .place-disc {
|
|
11569
|
+
.place-band.compact .place-disc-spot {
|
|
11419
11570
|
grid-row: 1 / span 2;
|
|
11420
11571
|
}
|
|
11421
11572
|
|
|
@@ -7,6 +7,7 @@ import { ChangedLine } from "../parts/changed.js";
|
|
|
7
7
|
import { Icon } from "../parts/icons.js";
|
|
8
8
|
import { placeKindLabel, placeKinds } from "../parts/map-symbols.js";
|
|
9
9
|
import { knowersOf, Markdown, plainLine } from "../parts/markdown.js";
|
|
10
|
+
import { PictureButton, PictureSpot } from "../parts/picture.js";
|
|
10
11
|
import { Token } from "../sheet/party.js";
|
|
11
12
|
import { arrowStep, capitalized, foldedText, t } from "../text.js";
|
|
12
13
|
import { documentLook, foundLore, groupedLore, knownTo, loreGroupOf } from "./known.js";
|
|
@@ -38,7 +39,7 @@ export function LoreTab({ world, version, open, onMap, players = [], kinds = new
|
|
|
38
39
|
return (_jsxs(Browse, { open: entry?.name, explicit: asked !== undefined, back: sectionAddress("world", "lore"), backLabel: t("All you know"), children: [_jsxs("div", { class: "browse-list", children: [open !== undefined && asked === undefined && _jsx("p", { class: "browse-none", role: "status", children: t("Your character knows nothing called “{name}”.", { name: open }) }), _jsx("div", { class: "browse-find", children: _jsxs("span", { class: "search", children: [_jsx(Icon, { name: "search" }), _jsx("input", { type: "search", value: search, placeholder: t("Search"), "aria-label": t("Search what your character knows"), onInput: (event) => setSearch(event.currentTarget.value) })] }) }), (groupedLore(world.known).length > 1 || each.length > 0) && (_jsx(FilterChips, { label: t("Kinds"), chosen: shownFilter, onChoose: setFilter, all: found.length, options: [
|
|
39
40
|
...groupedLore(found).map((part) => ({ key: part.group, name: groupLabel(part.group), count: part.entries.length })),
|
|
40
41
|
...each.map((member) => ({ key: `@${member.name}`, name: member.name, count: found.filter((entry) => knownTo(entry, member.name)).length, member })),
|
|
41
|
-
] })), found.length === 0 && (_jsxs("p", { class: "browse-none", role: "status", children: [t("Nothing your character knows matches “{search}”.", { search }), " ", _jsx("button", { type: "button", class: "button quiet", onClick: () => setSearch(""), children: t("Clear the search") })] })), groups.map((part) => (_jsxs("section", { class: "browse-group", "aria-labelledby": `lore-${part.group}`, children: [_jsxs("h3", { class: "eyebrow", id: `lore-${part.group}`, children: [groupLabel(part.group), _jsx("span", { class: "browse-count num", children: part.entries.length })] }), _jsx("ul", { class: "browse-rows", children: part.entries.map((one, index) => (
|
|
42
|
+
] })), found.length === 0 && (_jsxs("p", { class: "browse-none", role: "status", children: [t("Nothing your character knows matches “{search}”.", { search }), " ", _jsx("button", { type: "button", class: "button quiet", onClick: () => setSearch(""), children: t("Clear the search") })] })), groups.map((part) => (_jsxs("section", { class: "browse-group", "aria-labelledby": `lore-${part.group}`, children: [_jsxs("h3", { class: "eyebrow", id: `lore-${part.group}`, children: [groupLabel(part.group), _jsx("span", { class: "browse-count num", children: part.entries.length })] }), _jsx("ul", { class: "browse-rows", children: part.entries.map((one, index) => (_jsxs("li", { class: "picture-host", children: [_jsxs("a", { class: "browse-row", href: sectionAddress("world", "lore", one.name), "aria-current": one.name === entry?.name ? "true" : undefined, "aria-labelledby": `lore-name-${part.group}-${index}`, "aria-describedby": `lore-${part.group}-${index}`, "data-name": one.name, children: [_jsx(LoreThumb, { entry: one }), _jsxs("span", { class: "browse-words", children: [_jsx("span", { class: "browse-name", id: `lore-name-${part.group}-${index}`, children: one.name }), _jsx("span", { class: "browse-meta", id: `lore-${part.group}-${index}`, children: _jsx(MetaLine, { kind: entryKind(one, kinds), text: plainLine(one.summary) ?? one.within?.[0] }) })] })] }), _jsx(PictureButton, { page: one.name, has: one.picture !== undefined, icon: true, row: true })] }, one.name))) })] }, part.group)))] }), entry !== undefined && (_jsx(LoreReader, { entry: entry, version: version, link: link, several: each.length > 0, kinds: kinds, onMap: entry.type === "place" ? onMap([entry.name, ...entry.within ?? []]) : undefined, focus: asked !== undefined }, entry.name))] }));
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
44
45
|
* The documents the character has or read: those it carries, then the others; the one open on its paper, as what it is. With more than one player character
|
|
@@ -133,14 +134,14 @@ function LoreReader({ entry, version, link, onMap, focus, several, kinds }) {
|
|
|
133
134
|
useOpened(title, focus);
|
|
134
135
|
const person = entry.type === "character" || entry.type === "creature";
|
|
135
136
|
const banner = entry.picture !== undefined && !person;
|
|
136
|
-
return (_jsxs("article", { class: "browse-reader", "aria-labelledby": "reader-title", children: [banner && _jsx("img", { class: "reader-banner", src: pictureAddress(entry.picture), alt: "" }), _jsxs("header", { class: "reader-head", children: [person && _jsx(Token, { member: { name: entry.name, image: entry.picture, role: entry.companion ? "companion" : "other" }, large: true, ...(entry.companion ? { side: "ally" } : {}) }), _jsxs("div", { children: [_jsx("p", { class: "eyebrow", children: entryKind(entry, kinds) }), _jsx("h3", { id: "reader-title", tabIndex: -1, ref: title, children: entry.name }), entry.within !== undefined && (_jsxs("p", { class: "reader-where", children: [_jsx(Icon, { name: "place" }), _jsx("span", { class: "reader-path", children: entry.within.toReversed().map((place, index) => (_jsxs("span", { children: [index > 0 && _jsx("span", { class: "reader-step", "aria-hidden": "true" }), _jsx("a", { class: "md-link", href: sectionAddress("world", "lore", place), children: place })] }, place))) })] })), changed && _jsx(ChangedLine, {})] })] }),
|
|
137
|
+
return (_jsxs("article", { class: "browse-reader", "aria-labelledby": "reader-title", children: [banner && (_jsxs("div", { class: "picture-host", children: [_jsx("img", { class: "reader-banner", src: pictureAddress(entry.picture), alt: "" }), _jsx(PictureButton, { page: entry.name, has: true, icon: true })] })), _jsxs("header", { class: "reader-head", children: [person && (_jsx(PictureSpot, { page: entry.name, has: entry.picture !== undefined, children: _jsx(Token, { member: { name: entry.name, image: entry.picture, role: entry.companion ? "companion" : "other" }, large: true, ...(entry.companion ? { side: "ally" } : {}) }) })), _jsxs("div", { children: [_jsx("p", { class: "eyebrow", children: entryKind(entry, kinds) }), _jsx("h3", { id: "reader-title", tabIndex: -1, ref: title, children: entry.name }), entry.within !== undefined && (_jsxs("p", { class: "reader-where", children: [_jsx(Icon, { name: "place" }), _jsx("span", { class: "reader-path", children: entry.within.toReversed().map((place, index) => (_jsxs("span", { children: [index > 0 && _jsx("span", { class: "reader-step", "aria-hidden": "true" }), _jsx("a", { class: "md-link", href: sectionAddress("world", "lore", place), children: place })] }, place))) })] })), changed && _jsx(ChangedLine, {})] })] }), _jsxs("p", { class: "reader-actions", children: [onMap !== undefined && (_jsxs("a", { class: "button package-button", href: onMap, children: [_jsx(Icon, { name: "world" }), t("Show on the map")] })), entry.companion && (_jsxs("a", { class: "button package-button", href: `#/party/${encodeURIComponent(entry.name)}`, children: [_jsx(Icon, { name: "party" }), t("Open the sheet")] })), _jsx(PictureButton, { page: entry.name, has: entry.picture !== undefined })] }), _jsxs("div", { class: "reader-text", children: [text === undefined && !problem && entry.summary !== "" && _jsx(Markdown, { text: entry.summary, link: link }), text !== undefined && text.trim() !== "" && _jsx(Markdown, { text: text, link: link, secretKnowers: several ? knowersOf(knowers) : undefined }), ((text !== undefined && text.trim() === "") || (text === undefined && entry.summary === "")) && !problem && (_jsx("p", { class: "browse-none", children: text === undefined ? t("Reading…") : t("Your character knows its name, and nothing more yet.") })), problem && _jsx("p", { class: "browse-none", children: t("This page could not be read now: try again in a moment.") })] })] }));
|
|
137
138
|
}
|
|
138
139
|
/** A document on its paper, as what it is: a letter, a notice, a torn page; its picture first, larger at a click, for a map above all. */
|
|
139
140
|
function DocumentReader({ document, link, focus, several }) {
|
|
140
141
|
const title = useRef(null);
|
|
141
142
|
const look = documentLook(document.document);
|
|
142
143
|
useOpened(title, focus);
|
|
143
|
-
return (_jsxs("article", { class: "browse-reader", "aria-labelledby": "reader-title", children: [_jsx("header", { class: "reader-head", children: _jsxs("div", { children: [_jsx("p", { class: "eyebrow", children: [documentLabel(document.document), carriedWords(document, several)].filter((part) => part !== undefined).join(" · ") }), _jsx("h3", { id: "reader-title", tabIndex: -1, ref: title, children: document.name })] }) }), _jsxs("div", { class: `paper look-${look}`, children: [_jsx("span", { class: "paper-mark", "aria-hidden": "true" }), document.picture !== undefined && (_jsx("a", { class: "paper-picture", href: pictureAddress(document.picture), target: "_blank", rel: "noreferrer", children: _jsx("img", { src: pictureAddress(document.picture), alt: t("{name}, as drawn", { name: document.name }) }) })), document.text.trim() !== "" && _jsx(Markdown, { text: document.text, link: link })] })] }));
|
|
144
|
+
return (_jsxs("article", { class: "browse-reader", "aria-labelledby": "reader-title", children: [_jsx("header", { class: "reader-head", children: _jsxs("div", { children: [_jsx("p", { class: "eyebrow", children: [documentLabel(document.document), carriedWords(document, several)].filter((part) => part !== undefined).join(" · ") }), _jsx("h3", { id: "reader-title", tabIndex: -1, ref: title, children: document.name })] }) }), _jsx("p", { class: "reader-actions", children: _jsx(PictureButton, { page: document.name, has: document.picture !== undefined }) }), _jsxs("div", { class: `paper look-${look}`, children: [_jsx("span", { class: "paper-mark", "aria-hidden": "true" }), document.picture !== undefined && (_jsxs("div", { class: "picture-host", children: [_jsx("a", { class: "paper-picture", href: pictureAddress(document.picture), target: "_blank", rel: "noreferrer", children: _jsx("img", { src: pictureAddress(document.picture), alt: t("{name}, as drawn", { name: document.name }) }) }), _jsx(PictureButton, { page: document.name, has: true, icon: true })] })), document.text.trim() !== "" && _jsx(Markdown, { text: document.text, link: link })] })] }));
|
|
144
145
|
}
|
|
145
146
|
/** A row of filter chips: All, then each option with its count; one stop of Tab, the arrows along it. */
|
|
146
147
|
function FilterChips({ label, options, chosen, all, onChoose }) {
|
|
@@ -7,6 +7,7 @@ import { fromLabel } from "../parts/game-words.js";
|
|
|
7
7
|
import { Icon } from "../parts/icons.js";
|
|
8
8
|
import { placeKindLabel } from "../parts/map-symbols.js";
|
|
9
9
|
import { plainLine } from "../parts/markdown.js";
|
|
10
|
+
import { PictureButton } from "../parts/picture.js";
|
|
10
11
|
import { t } from "../text.js";
|
|
11
12
|
import { lengthText, waysOf } from "./map.js";
|
|
12
13
|
/** The card of a place: its picture, what it is and where, its text as the character knows it, what it holds, its ways, the scene when the party is there. */
|
|
@@ -29,7 +30,7 @@ export function PlaceCard({ place, map, layout, narrow, onClose, onGo, readMore
|
|
|
29
30
|
};
|
|
30
31
|
}, [place.name]);
|
|
31
32
|
const eyebrow = [placeKindLabel(place.kind) ?? t("Place"), region?.name, here || place.from?.direction === undefined ? undefined : t("{distance} from you", { distance: fromLabel(place.from, (km) => lengthText(km, map.unit)) })].filter((part) => part !== undefined);
|
|
32
|
-
return (_jsxs("div", { class: narrow ? "place-card sheet" : "place-card", role: "dialog", "aria-labelledby": "place-card-title", onPointerDown: (event) => event.stopPropagation(), onPointerUp: (event) => event.stopPropagation(), children: [place.image !== undefined && _jsx("img", { class: "pc-image", src: pictureAddress(place.image), alt: "" }), _jsx("button", { ref: closer, type: "button", class: "pc-close icon-button", "aria-label": t("Close"), onClick: onClose, children: _jsx(Icon, { name: "close" }) }), _jsxs("div", { class: "pc-body", children: [_jsx("p", { class: "eyebrow pc-eyebrow", children: eyebrow.join(" · ") }), _jsx("h3", { id: "place-card-title", children: place.name }), here && (_jsxs("p", { class: "pc-here", children: [_jsx("span", { class: "here-dot", "aria-hidden": "true" }), t("Your party is here")] })), text !== undefined && _jsx("p", { class: "pc-text", children: text }), readMore !== undefined && _jsx("a", { class: "pc-more md-link", href: readMore, children: t("Read all you know") }), inside.length > 0 && (_jsxs(_Fragment, { children: [_jsx("h4", { class: "eyebrow pc-sub", children: t("Inside") }), _jsx("ul", { class: "in-chips", children: inside.flatMap((child) => [
|
|
33
|
+
return (_jsxs("div", { class: narrow ? "place-card sheet" : "place-card", role: "dialog", "aria-labelledby": "place-card-title", onPointerDown: (event) => event.stopPropagation(), onPointerUp: (event) => event.stopPropagation(), children: [place.image !== undefined && (_jsxs("div", { class: "picture-host", children: [_jsx("img", { class: "pc-image", src: pictureAddress(place.image), alt: "" }), _jsx(PictureButton, { page: place.name, has: true, icon: true })] })), _jsx("button", { ref: closer, type: "button", class: "pc-close icon-button", "aria-label": t("Close"), onClick: onClose, children: _jsx(Icon, { name: "close" }) }), _jsxs("div", { class: "pc-body", children: [_jsx("p", { class: "eyebrow pc-eyebrow", children: eyebrow.join(" · ") }), _jsx("h3", { id: "place-card-title", children: place.name }), here && (_jsxs("p", { class: "pc-here", children: [_jsx("span", { class: "here-dot", "aria-hidden": "true" }), t("Your party is here")] })), text !== undefined && _jsx("p", { class: "pc-text", children: text }), readMore !== undefined && _jsx("a", { class: "pc-more md-link", href: readMore, children: t("Read all you know") }), inside.length > 0 && (_jsxs(_Fragment, { children: [_jsx("h4", { class: "eyebrow pc-sub", children: t("Inside") }), _jsx("ul", { class: "in-chips", children: inside.flatMap((child) => [
|
|
33
34
|
_jsx("li", { class: "in-chip", children: child.name }, child.name),
|
|
34
35
|
...layout.inside(child.name).map((grandchild) => (_jsxs("li", { class: "in-chip", children: [_jsx("span", { class: "in-path", children: "\u203A" }), " ", grandchild.name] }, grandchild.name))),
|
|
35
36
|
]) })] })), ways.length > 0 && (_jsxs(_Fragment, { children: [_jsx("h4", { class: "eyebrow pc-sub", children: t("Ways") }), _jsx("ul", { class: "pc-ways", children: ways.map((way, index) => (_jsxs("li", { children: [_jsx(Icon, { name: wayIcon(way.kind) }), _jsxs("span", { children: [_jsx("b", { children: way.road }), ` ${t("to")} `, way.map === undefined || way.to === undefined ? way.to ?? t("somewhere you do not know") : (_jsx("button", { type: "button", class: "way-to-map", onClick: () => onGo(way.map, way.to), children: t("{place}, on {map}", { place: way.to, map: way.map }) })), way.km !== undefined && " · ", way.km !== undefined && _jsx("span", { class: "way-km num", children: lengthText(way.km, map.unit) })] })] }, index))) })] })), here && (_jsxs("a", { class: "pc-scene", href: sectionAddress("scene"), children: [_jsx(Icon, { name: "scene" }), _jsx("span", { children: t("Scene") })] }))] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { installedLanguages, type LanguagePack, languagePackFor, languagePackProblems, packGuide, packPhrases, packSystemFolder, readLanguagePack } from "./pack.ts";
|
|
1
|
+
export { installedLanguages, languageFileName, type LanguagePack, languagePackFor, languagePackProblems, packGuide, packPhrases, packSystemFolder, readLanguagePack } from "./pack.ts";
|
package/dist/languages/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Languages as packages (D-485 (3)): a translation made by hand of the dashboard's phrases, its Guide and a game system's words, which comes before the
|
|
2
2
|
// translation on the fly. Depends on nothing else in rpg-engine but the core.
|
|
3
|
-
export { installedLanguages, languagePackFor, languagePackProblems, packGuide, packPhrases, packSystemFolder, readLanguagePack } from "./pack.js";
|
|
3
|
+
export { installedLanguages, languageFileName, languagePackFor, languagePackProblems, packGuide, packPhrases, packSystemFolder, readLanguagePack } from "./pack.js";
|
package/dist/languages/pack.d.ts
CHANGED
|
@@ -14,7 +14,10 @@ export interface LanguagePack {
|
|
|
14
14
|
export declare function installedLanguages(folders: string[]): LanguagePack[];
|
|
15
15
|
/** The package for a language: its own code, else its base language's (pt for pt-BR); undefined when none is installed. */
|
|
16
16
|
export declare function languagePackFor(folders: string[], code: string): LanguagePack | undefined;
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* A language package from its folder; it throws, saying what is wrong, when it does not read. One of data alone, without a package.json, is named by its
|
|
19
|
+
* code, language-de, with the version its language.yaml gives.
|
|
20
|
+
*/
|
|
18
21
|
export declare function readLanguagePack(folder: string): LanguagePack;
|
|
19
22
|
/** The dashboard's phrases the package translates, by their English; none when it has none that reads. */
|
|
20
23
|
export declare function packPhrases(pack: LanguagePack): Record<string, string>;
|