@crombolo/backoffice-host 0.42.1 → 0.43.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.
@@ -0,0 +1,436 @@
1
+ /**
2
+ * Settings, laid out as Crombolo's (story 234): a landing page of cards, each
3
+ * tool on its own without a tab bar, and the Structure or Code tree only beside
4
+ * the editors it opens. Built from the pieces Umbraco's `umb-section-default`
5
+ * uses, and drawn in its place through the `Crombolo.SectionLayout.Settings`
6
+ * manifest.
7
+ */
8
+
9
+ import {
10
+ createExtensionApi,
11
+ createExtensionElement,
12
+ UmbExtensionsElementInitializer,
13
+ UmbExtensionsManifestInitializer,
14
+ } from '@umbraco-cms/backoffice/extension-api'
15
+ import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'
16
+ import { css, html, nothing } from '@umbraco-cms/backoffice/external/lit'
17
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'
18
+ import { UmbRouteNotFoundElement } from '@umbraco-cms/backoffice/router'
19
+ import { UmbTextStyles } from '@umbraco-cms/backoffice/style'
20
+ import { aliasToPath, pathFolderName } from '@umbraco-cms/backoffice/utils'
21
+ import { UmbViewController } from '@umbraco-cms/backoffice/view'
22
+ import {
23
+ ADVANCED_MENU,
24
+ advancedToolTitle,
25
+ CODE_MENU,
26
+ crumbsFor,
27
+ SIDEBAR_APPS,
28
+ STRUCTURE_MENU,
29
+ settingsCards,
30
+ treeFor,
31
+ } from './settings-cards.js'
32
+ import './breadcrumb.js'
33
+
34
+ const base = () =>
35
+ (document.querySelector('base')?.getAttribute('href') ?? '/umbraco/').replace(/\/$/, '')
36
+
37
+ /** Whether this site can send e-mail; the server answers with the reason. */
38
+ const emailStatus = async () => {
39
+ const response = await fetch(`${base()}/crombolo/api/email`, {
40
+ credentials: 'include',
41
+ headers: { accept: 'application/json' },
42
+ })
43
+ if (!response.ok) throw new Error(`email responded ${response.status}`)
44
+ return response.json()
45
+ }
46
+
47
+ const menuOf = (manifest, menu) => manifest.meta?.menus?.includes(menu) === true
48
+
49
+ export class CromboloSettingsSectionElement extends UmbLitElement {
50
+ static properties = {
51
+ _routes: { state: true },
52
+ _sidebarApps: { state: true },
53
+ _tree: { state: true },
54
+ _crumbs: { state: true },
55
+ }
56
+
57
+ #dashboards = []
58
+ #menuItems = []
59
+ #sectionRoutes = []
60
+ #landing
61
+ #viewContexts = new Map()
62
+ #providedView
63
+
64
+ constructor() {
65
+ super()
66
+ new UmbExtensionsElementInitializer(
67
+ this,
68
+ umbExtensionsRegistry,
69
+ 'sectionSidebarApp',
70
+ null,
71
+ (apps) => {
72
+ // Marked as Umbraco's section marks them, which tests and tours find them by.
73
+ for (const app of apps)
74
+ app.component?.setAttribute('data-mark', `section-sidebar:${app.manifest.alias}`)
75
+ this._sidebarApps = apps.filter((a) => Object.values(SIDEBAR_APPS).includes(a.alias))
76
+ },
77
+ )
78
+ new UmbExtensionsManifestInitializer(
79
+ this,
80
+ umbExtensionsRegistry,
81
+ 'dashboard',
82
+ null,
83
+ (dashboards) => {
84
+ this.#dashboards = dashboards.map((d) => d.manifest)
85
+ this.#createRoutes()
86
+ },
87
+ )
88
+ new UmbExtensionsManifestInitializer(
89
+ this,
90
+ umbExtensionsRegistry,
91
+ 'menuItem',
92
+ (m) => menuOf(m, STRUCTURE_MENU) || menuOf(m, CODE_MENU) || menuOf(m, ADVANCED_MENU),
93
+ (items) => {
94
+ this.#menuItems = items.map((i) => i.manifest)
95
+ this.#refreshLanding()
96
+ },
97
+ )
98
+ new UmbExtensionsManifestInitializer(
99
+ this,
100
+ umbExtensionsRegistry,
101
+ 'sectionRoute',
102
+ null,
103
+ async (extensions) => {
104
+ this.#sectionRoutes = await Promise.all(
105
+ extensions
106
+ .filter((extension) => extension.manifest.element)
107
+ .map(async (extension) => {
108
+ const api = await createExtensionApi(this, extension.manifest)
109
+ if (api) api.manifest = extension.manifest
110
+ return {
111
+ path:
112
+ api?.getPath?.() ||
113
+ extension.manifest.meta?.path ||
114
+ aliasToPath(extension.manifest.alias),
115
+ component: () => createExtensionElement(extension.manifest),
116
+ setup: (element, info) => {
117
+ api?.setup?.(element, info)
118
+ const entityType = info?.match?.params?.entityType
119
+ const tree = treeFor(entityType)
120
+ this.#showing(tree, {
121
+ title: tree ? undefined : advancedToolTitle(this.#advanced(), entityType),
122
+ })
123
+ },
124
+ }
125
+ }),
126
+ )
127
+ this.#createRoutes()
128
+ },
129
+ )
130
+ }
131
+
132
+ #label(manifest) {
133
+ const label = manifest.meta?.label ?? manifest.name ?? manifest.alias
134
+ return this.localize.string(label)
135
+ }
136
+
137
+ #dashboardPath(manifest) {
138
+ return `dashboard/${manifest.meta?.pathname || pathFolderName(manifest.meta?.label ?? manifest.name ?? manifest.alias)}`
139
+ }
140
+
141
+ #cards() {
142
+ return settingsCards({
143
+ dashboards: this.#dashboards.map((d) => ({
144
+ alias: d.alias,
145
+ label: this.#label(d),
146
+ path: this.#dashboardPath(d),
147
+ })),
148
+ advanced: this.#advanced(),
149
+ structure: this.#menuItems.some((m) => menuOf(m, STRUCTURE_MENU)),
150
+ code: this.#menuItems.some((m) => menuOf(m, CODE_MENU)),
151
+ })
152
+ }
153
+
154
+ #refreshLanding() {
155
+ if (this.#landing) this.#landing.groups = this.#cards()
156
+ }
157
+
158
+ /** Which tree shows, and the trail that heads the page. */
159
+ #showing(tree, { title } = {}) {
160
+ this._tree = tree
161
+ this._crumbs = crumbsFor({ tree, title })
162
+ }
163
+
164
+ #advanced() {
165
+ return this.#menuItems
166
+ .filter((m) => menuOf(m, ADVANCED_MENU))
167
+ .map((m) => ({ alias: m.alias, label: this.#label(m), entityType: m.meta?.entityType }))
168
+ }
169
+
170
+ #viewContext(manifest) {
171
+ let context = this.#viewContexts.get(manifest.alias)
172
+ if (!context) {
173
+ context = new UmbViewController(this, manifest.alias)
174
+ context.inherit()
175
+ this.#viewContexts.set(manifest.alias, context)
176
+ }
177
+ context.setTitle(this.#label(manifest))
178
+ return context
179
+ }
180
+
181
+ #createRoutes() {
182
+ const landing = {
183
+ component: () => document.createElement('crombolo-settings-landing'),
184
+ setup: (element) => {
185
+ this.#landing = element
186
+ this.#refreshLanding()
187
+ this.#showing(undefined)
188
+ },
189
+ }
190
+ const tree = (name) => ({
191
+ path: name,
192
+ component: () => document.createElement('crombolo-settings-tree-start'),
193
+ setup: (element) => {
194
+ element.tree = name
195
+ this.#showing(name)
196
+ },
197
+ })
198
+ const dashboards = this.#dashboards.map((manifest) => ({
199
+ path: this.#dashboardPath(manifest),
200
+ component: () => createExtensionElement(manifest),
201
+ setup: (component) => {
202
+ const context = this.#viewContext(manifest)
203
+ if (this.#providedView !== context) this.#providedView?.unprovide()
204
+ if (component) {
205
+ this.#providedView = context
206
+ context.provideAt(component)
207
+ component.manifest = manifest
208
+ }
209
+ this.#showing(undefined, { title: this.#label(manifest) })
210
+ },
211
+ }))
212
+ this._routes = [
213
+ tree('structure'),
214
+ tree('code'),
215
+ // Umbraco's welcome, which this page replaces: an address people have.
216
+ { path: 'dashboard/welcome', ...landing },
217
+ ...dashboards,
218
+ ...this.#sectionRoutes,
219
+ { path: '', pathMatch: 'full', ...landing },
220
+ { path: '**', component: UmbRouteNotFoundElement },
221
+ ]
222
+ }
223
+
224
+ #sectionPath() {
225
+ return `section/${this.manifest?.meta?.pathname ?? 'settings'}`
226
+ }
227
+
228
+ render() {
229
+ const shown = this._tree ? SIDEBAR_APPS[this._tree] : undefined
230
+ const section = this.#sectionPath()
231
+ const crumbs = (this._crumbs ?? []).map((c) => ({
232
+ label: c.label,
233
+ href: c.path === undefined ? undefined : c.path ? `${section}/${c.path}` : section,
234
+ }))
235
+ const main = html`<umb-section-main>
236
+ ${
237
+ crumbs.length > 0
238
+ ? html`<crombolo-breadcrumb class="crumbs" .items=${crumbs}></crombolo-breadcrumb>`
239
+ : nothing
240
+ }
241
+ ${this._routes ? html`<umb-router-slot .routes=${this._routes}></umb-router-slot>` : nothing}
242
+ </umb-section-main>`
243
+ // Both trees stay in the page, the one not in use hidden, as Umbraco's own
244
+ // Settings keeps its menus. A tree taken out and put back breaks: the trees
245
+ // share the section's expansion state, and a detached one still answers it.
246
+ return html`<umb-section-sidebar ?hidden=${!shown}>
247
+ ${(this._sidebarApps ?? []).map(
248
+ (app) => html`<div class="tree" ?hidden=${app.alias !== shown}>${app.component}</div>`,
249
+ )}
250
+ </umb-section-sidebar>
251
+ ${main}`
252
+ }
253
+
254
+ static styles = [
255
+ UmbTextStyles,
256
+ css`
257
+ :host {
258
+ flex: 1 1 auto;
259
+ height: 100%;
260
+ display: flex;
261
+ }
262
+ umb-section-sidebar {
263
+ --umb-section-sidebar-width: 300px;
264
+ }
265
+ umb-section-sidebar[hidden],
266
+ .tree[hidden] {
267
+ display: none;
268
+ }
269
+ umb-section-main {
270
+ flex: 1 1 auto;
271
+ }
272
+ .crumbs {
273
+ display: block;
274
+ padding: var(--uui-size-space-4) var(--uui-size-layout-1) 0;
275
+ }
276
+ `,
277
+ ]
278
+ }
279
+
280
+ /** The landing page: a box of cards per group, and e-mail when it is not set up. */
281
+ export class CromboloSettingsLandingElement extends UmbLitElement {
282
+ static properties = { groups: { attribute: false }, _email: { state: true } }
283
+
284
+ connectedCallback() {
285
+ super.connectedCallback()
286
+ // An explanation, not a control: a failure leaves it out.
287
+ emailStatus().then(
288
+ (status) => {
289
+ this._email = status
290
+ },
291
+ () => {},
292
+ )
293
+ }
294
+
295
+ #email() {
296
+ const status = this._email
297
+ if (!status || status.available) return nothing
298
+ return html`<div class="banner" role="status">
299
+ <uui-icon name="icon-alert"></uui-icon>
300
+ <p>
301
+ <strong>E-mail is not set up.</strong>
302
+ ${status.reason}
303
+ ${
304
+ status.affects?.length > 0
305
+ ? html`Until it is, these are unavailable: ${status.affects.join(', ')}.`
306
+ : nothing
307
+ }
308
+ </p>
309
+ </div>`
310
+ }
311
+
312
+ render() {
313
+ return html`
314
+ ${this.#email()}
315
+ ${(this.groups ?? []).map(
316
+ ({ group, cards }) => html`<section>
317
+ <h2>${group}</h2>
318
+ <div class="cards">
319
+ ${cards.map(
320
+ (card) => html`<a class="card" href=${`section/settings/${card.path}`}>
321
+ <strong>${card.title}</strong>
322
+ ${card.description ? html`<span>${card.description}</span>` : nothing}
323
+ </a>`,
324
+ )}
325
+ </div>
326
+ </section>`,
327
+ )}
328
+ `
329
+ }
330
+
331
+ static styles = [
332
+ UmbTextStyles,
333
+ css`
334
+ :host {
335
+ display: block;
336
+ padding: var(--uui-size-layout-1);
337
+ max-width: 72rem;
338
+ }
339
+ section + section {
340
+ margin-top: var(--uui-size-layout-2);
341
+ }
342
+ h2 {
343
+ font-size: var(--uui-type-h5-size);
344
+ font-weight: 800;
345
+ letter-spacing: -0.01em;
346
+ margin: 0 0 var(--uui-size-space-4);
347
+ }
348
+ .cards {
349
+ display: grid;
350
+ grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
351
+ gap: var(--uui-size-space-5);
352
+ }
353
+ .card {
354
+ display: flex;
355
+ flex-direction: column;
356
+ gap: var(--uui-size-space-2);
357
+ padding: var(--uui-size-space-5);
358
+ background: var(--uui-color-surface);
359
+ border: 1px solid var(--uui-color-border);
360
+ border-radius: 12px;
361
+ box-shadow: var(--crombolo-card-shadow, none);
362
+ color: var(--uui-color-text);
363
+ text-decoration: none;
364
+ }
365
+ .card:hover,
366
+ .card:focus-visible {
367
+ border-color: var(--uui-color-interactive-emphasis);
368
+ }
369
+ .card span {
370
+ color: var(--uui-color-text-alt);
371
+ font-size: var(--uui-type-small-size);
372
+ }
373
+ .banner {
374
+ display: flex;
375
+ gap: var(--uui-size-space-4);
376
+ align-items: flex-start;
377
+ margin-bottom: var(--uui-size-layout-1);
378
+ padding: var(--uui-size-space-4) var(--uui-size-space-5);
379
+ border: 1px solid color-mix(in srgb, var(--uui-color-warning) 45%, transparent);
380
+ border-left-width: 4px;
381
+ border-radius: 8px;
382
+ background: color-mix(in srgb, var(--uui-color-warning) 12%, var(--uui-color-surface));
383
+ color: var(--uui-color-text);
384
+ }
385
+ .banner uui-icon {
386
+ flex: none;
387
+ margin-top: 0.15em;
388
+ color: var(--uui-color-warning-standalone, var(--uui-color-warning));
389
+ }
390
+ .banner p {
391
+ margin: 0;
392
+ line-height: 1.5;
393
+ }
394
+ `,
395
+ ]
396
+ }
397
+
398
+ const TREE_HELP = {
399
+ structure: html`<p>
400
+ Choose a type, data type or language in the tree to edit it.
401
+ </p>
402
+ <p>
403
+ Content types, data types and languages are <strong>files</strong>, in
404
+ <code>schema/</code>, written as TOML. What you change here is written to the file, and the
405
+ file is what a deploy and every other server reads, so a change can be reviewed like code.
406
+ </p>`,
407
+ code: html`<p>Choose a component, stylesheet or script in the tree to edit it.</p>`,
408
+ }
409
+
410
+ /** What Structure or Code shows until something in its tree is chosen. */
411
+ export class CromboloSettingsTreeStartElement extends UmbLitElement {
412
+ static properties = { tree: { attribute: false } }
413
+
414
+ render() {
415
+ return html`<uui-box headline=${this.tree === 'code' ? 'Code' : 'Structure'}
416
+ >${TREE_HELP[this.tree] ?? nothing}</uui-box
417
+ >`
418
+ }
419
+
420
+ static styles = [
421
+ UmbTextStyles,
422
+ css`
423
+ :host {
424
+ display: block;
425
+ padding: var(--uui-size-layout-1);
426
+ max-width: 48rem;
427
+ }
428
+ `,
429
+ ]
430
+ }
431
+
432
+ customElements.define('crombolo-settings-section', CromboloSettingsSectionElement)
433
+ customElements.define('crombolo-settings-landing', CromboloSettingsLandingElement)
434
+ customElements.define('crombolo-settings-tree-start', CromboloSettingsTreeStartElement)
435
+
436
+ export default CromboloSettingsSectionElement
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo Sign-in Dialog",
4
4
  "id": "Crombolo.SignInDialog",
5
- "version": "0.42.1",
5
+ "version": "0.43.1",
6
6
  "allowPublicAccess": true,
7
7
  "extensions": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo",
4
4
  "id": "Crombolo.Core",
5
- "version": "0.42.1",
5
+ "version": "0.43.1",
6
6
  "allowPublicAccess": false,
7
7
  "extensions": [
8
8
  {
@@ -413,14 +413,14 @@
413
413
  },
414
414
  {
415
415
  "type": "dashboard",
416
- "alias": "Crombolo.Dashboard.Welcome",
417
- "name": "Crombolo Welcome Dashboard",
418
- "element": "/crombolo-plugin/welcome-dashboard.js",
416
+ "alias": "Crombolo.Dashboard.Overview",
417
+ "name": "Crombolo Overview Dashboard",
418
+ "element": "/crombolo-plugin/overview-dashboard.js",
419
419
  "weight": 20,
420
420
  "overwrites": ["Umb.Dashboard.UmbracoNews"],
421
421
  "meta": {
422
- "label": "Welcome",
423
- "pathname": "welcome"
422
+ "label": "Overview",
423
+ "pathname": "overview"
424
424
  },
425
425
  "conditions": [
426
426
  {
@@ -430,22 +430,11 @@
430
430
  ]
431
431
  },
432
432
  {
433
- "type": "dashboard",
434
- "alias": "Crombolo.Dashboard.Settings",
435
- "name": "Crombolo Settings Dashboard",
436
- "element": "/crombolo-plugin/settings-dashboard.js",
437
- "weight": 500,
438
- "overwrites": ["Umb.Dashboard.SettingsWelcome"],
439
- "meta": {
440
- "label": "Welcome",
441
- "pathname": "welcome"
442
- },
443
- "conditions": [
444
- {
445
- "alias": "Umb.Condition.SectionAlias",
446
- "match": "Umb.Section.Settings"
447
- }
448
- ]
433
+ "type": "sectionLayout",
434
+ "alias": "Crombolo.SectionLayout.Settings",
435
+ "name": "Crombolo Settings Layout",
436
+ "forSection": "Umb.Section.Settings",
437
+ "element": "/crombolo-plugin/settings-section.js"
449
438
  },
450
439
  {
451
440
  "type": "backofficeEntryPoint",
@@ -613,15 +602,22 @@
613
602
  "overwrites": ["Umb.GlobalContext.Icons"],
614
603
  "api": "/crombolo-plugin/branding/icon-registry.js"
615
604
  },
605
+ {
606
+ "type": "condition",
607
+ "alias": "Crombolo.Condition.ApprovalsActive",
608
+ "name": "Crombolo Approvals Active Condition",
609
+ "api": "/crombolo-plugin/approvals-active.js"
610
+ },
616
611
  {
617
612
  "type": "section",
618
613
  "alias": "Crombolo.Section.Workflow",
619
614
  "name": "Crombolo Workflow Section",
620
615
  "weight": 40,
621
616
  "meta": {
622
- "label": "Workflows",
617
+ "label": "Approvals",
623
618
  "pathname": "workflow"
624
- }
619
+ },
620
+ "conditions": [{ "alias": "Crombolo.Condition.ApprovalsActive" }]
625
621
  },
626
622
  {
627
623
  "type": "sectionView",
@@ -681,20 +677,18 @@
681
677
  ]
682
678
  },
683
679
  {
684
- "type": "sectionView",
685
- "alias": "Crombolo.SectionView.Workflow.Designer",
680
+ "type": "dashboard",
681
+ "alias": "Crombolo.Dashboard.Workflows",
686
682
  "name": "Crombolo Workflow Designer",
687
683
  "element": "/crombolo-plugin/workflow-designer.js",
688
- "weight": 500,
689
684
  "meta": {
690
685
  "label": "Workflows",
691
- "pathname": "workflows",
692
- "icon": "icon-mindmap"
686
+ "pathname": "workflows"
693
687
  },
694
688
  "conditions": [
695
689
  {
696
690
  "alias": "Umb.Condition.SectionAlias",
697
- "match": "Crombolo.Section.Workflow"
691
+ "match": "Umb.Section.Settings"
698
692
  },
699
693
  {
700
694
  "alias": "Umb.Condition.CurrentUser.IsAdmin"
@@ -716,7 +710,8 @@
716
710
  {
717
711
  "alias": "Umb.Condition.WorkspaceAlias",
718
712
  "match": "Umb.Workspace.Document"
719
- }
713
+ },
714
+ { "alias": "Crombolo.Condition.ApprovalsActive" }
720
715
  ]
721
716
  }
722
717
  ]
@@ -38,3 +38,6 @@ export const saveWorkflow = (alias, workflow) =>
38
38
  })
39
39
  export const deleteWorkflow = (alias) =>
40
40
  call(`workflows/${encodeURIComponent(alias)}`, { method: 'DELETE' })
41
+ export const previewDelete = (alias) =>
42
+ call(`workflows/${encodeURIComponent(alias)}/preview`, { method: 'DELETE' })
43
+ export const approvalsActive = () => call('active')
@@ -12,7 +12,14 @@ import '@umbraco-cms/backoffice/document'
12
12
  import { css, html, nothing, unsafeCSS } from '@umbraco-cms/backoffice/external/lit'
13
13
  import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'
14
14
  import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification'
15
- import { deleteWorkflow, listWorkflows, previewWorkflow, saveWorkflow } from './workflow-client.js'
15
+ import { approvalsChanged } from './approvals-active.js'
16
+ import {
17
+ deleteWorkflow,
18
+ listWorkflows,
19
+ previewDelete,
20
+ previewWorkflow,
21
+ saveWorkflow,
22
+ } from './workflow-client.js'
16
23
  import { ancestors, BOX, drawGraph, GRAPH_STYLES, layout, wouldLoop } from './workflow-graph.js'
17
24
 
18
25
  const ON_EDIT = {
@@ -273,14 +280,21 @@ export default class CromboloWorkflowDesignerElement extends UmbLitElement {
273
280
  // The green toast every workspace shows on a save.
274
281
  this.#notifications?.peek('positive', { data: { message: 'Workflow saved' } })
275
282
  this._originalAlias = this._editing.alias
283
+ approvalsChanged()
276
284
  await this.#load()
277
285
  }
278
286
 
279
287
  /** From the list or the editor: the workflow by its name and the alias its file has. */
280
288
  async #delete(name, alias) {
289
+ const preview = await previewDelete(alias)
290
+ const waiting = preview.ok ? preview.affected : []
291
+ const withdrawn =
292
+ waiting.length > 0
293
+ ? `\n\nThe requests for these pages, waiting for approval, are withdrawn:\n${waiting.map((a) => `- ${a.page}`).join('\n')}`
294
+ : ''
281
295
  if (
282
296
  !window.confirm(
283
- `Delete the workflow "${name}"? Pages it covers will publish without approval.`,
297
+ `Delete the workflow "${name}"? Pages it covers will publish without approval.${withdrawn}`,
284
298
  )
285
299
  )
286
300
  return
@@ -290,6 +304,7 @@ export default class CromboloWorkflowDesignerElement extends UmbLitElement {
290
304
  return
291
305
  }
292
306
  this._editing = undefined
307
+ approvalsChanged()
293
308
  await this.#load()
294
309
  }
295
310
 
package/src/branding.ts CHANGED
@@ -15,11 +15,15 @@
15
15
  /// <reference path="./text-imports.d.ts" />
16
16
  import faviconText from '../plugin/branding/favicon.svg' with { type: 'text' }
17
17
  import logoText from '../plugin/branding/logo-header.svg' with { type: 'text' }
18
+ import logoDarkText from '../plugin/branding/logo-header-dark.svg' with { type: 'text' }
18
19
  import themeText from '../plugin/branding/theme.css' with { type: 'text' }
19
20
 
20
21
  /** The mark and wordmark, for a header or a sign-in card. */
21
22
  export const logoSvg: string = logoText.trim()
22
23
 
24
+ /** The same logo with cream lettering, for a dark ground. */
25
+ export const logoDarkSvg: string = logoDarkText.trim()
26
+
23
27
  /** The mark alone, square, for a tab icon. */
24
28
  export const faviconSvg: string = faviconText.trim()
25
29