@goodfellow-cms/admin 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +12 -2
- package/dist/dev.d.ts +8 -0
- package/dist/dev.js +57 -0
- package/dist/google-fonts-C1DHu6V8.js +1956 -0
- package/dist/index.d.ts +453 -0
- package/dist/index.js +6703 -0
- package/package.json +79 -3
- package/styles.css +1228 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import { ContentStore, GitHost, GoodfellowConfig, SignInError } from "@goodfellow-cms/core";
|
|
2
|
+
import "react";
|
|
3
|
+
import "@puckeditor/core";
|
|
4
|
+
//#region src/admin-context.d.ts
|
|
5
|
+
/** How previews load the site's styles. Provided by the dev server or build that serves the admin panel. */
|
|
6
|
+
interface PreviewOptions {
|
|
7
|
+
/** The site's compiled stylesheets. */
|
|
8
|
+
stylesheets: string[];
|
|
9
|
+
/** `@goodfellow-cms/react/theme.css`, so Tailwind in the preview knows the theme's classes. */
|
|
10
|
+
themeCss: string;
|
|
11
|
+
/** URL of `@tailwindcss/browser`, which styles classes typed in the editor before the site is rebuilt. */
|
|
12
|
+
tailwindBrowserUrl?: string;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/strings.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Every piece of text the admin panel shows, so it can be reworded or
|
|
18
|
+
* translated. `{name}` placeholders are filled in when the text is used.
|
|
19
|
+
* Puck's own editor text is translated separately, with its `dictionary`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const defaultStrings: {
|
|
22
|
+
readonly "app.title": "Site admin";
|
|
23
|
+
readonly "app.viewSite": "View site";
|
|
24
|
+
readonly "nav.pages": "Pages";
|
|
25
|
+
readonly "nav.collections": "Collections";
|
|
26
|
+
readonly "nav.media": "Media";
|
|
27
|
+
readonly "nav.blocks": "Blocks";
|
|
28
|
+
readonly "nav.layout": "Header & footer";
|
|
29
|
+
readonly "nav.settings": "Site settings";
|
|
30
|
+
readonly loading: "Loading…";
|
|
31
|
+
readonly "setup.noBackend": "This site's settings don't say where the site is stored, so the admin panel can't open it. A developer needs to add a backend to goodfellow.config.tsx.";
|
|
32
|
+
readonly "signIn.title": "Sign in to edit this site";
|
|
33
|
+
readonly "signIn.intro": "The site is stored on {host}. Sign in with a {host} account that's allowed to change it.";
|
|
34
|
+
readonly "signIn.redirect": "Sign in with {host}";
|
|
35
|
+
readonly "signIn.orToken": "Or sign in with an access token";
|
|
36
|
+
readonly "signIn.token.title": "Sign in with an access token";
|
|
37
|
+
readonly "signIn.token.step1": "Create an access token on {host}. This link opens {host} with the right settings already chosen:";
|
|
38
|
+
readonly "signIn.token.create": "Create a token on {host}";
|
|
39
|
+
readonly "signIn.token.createBroad": "Create a broader token instead";
|
|
40
|
+
readonly "signIn.token.createBroadHint": "Use this if the site belongs to someone else and the first link doesn't let you choose it. This kind of token can change everything your account can.";
|
|
41
|
+
readonly "signIn.token.chooseSite": "If {host} asks what the token can access, choose this site.";
|
|
42
|
+
readonly "signIn.token.step2": "Copy the token and paste it here:";
|
|
43
|
+
readonly "signIn.token.label": "Access token";
|
|
44
|
+
readonly "signIn.remember": "Stay signed in on this device";
|
|
45
|
+
readonly "signIn.rememberHint": "Leave this off on shared or public computers.";
|
|
46
|
+
readonly "signIn.submit": "Sign in";
|
|
47
|
+
readonly "signIn.checking": "Signing in…";
|
|
48
|
+
readonly "signIn.error.invalid": "That sign-in didn't work. Check that the whole token was copied and that it hasn't expired.";
|
|
49
|
+
readonly "signIn.error.no-access": "That account can't see this site. Make sure the token was given access to it.";
|
|
50
|
+
readonly "signIn.error.cant-publish": "That account can see the site but isn't allowed to change it. Ask the site's owner to give it permission.";
|
|
51
|
+
readonly "signIn.error.redirect-failed": "Signing in didn't finish. Try again.";
|
|
52
|
+
readonly "signIn.error.expired": "You were signed out because your sign-in expired. Sign in again to keep editing.";
|
|
53
|
+
readonly "signIn.error.other": "Couldn't reach {host}. Check your connection and try again.";
|
|
54
|
+
readonly "account.signedInAs": "Signed in as {name}";
|
|
55
|
+
readonly "account.signOut": "Sign out";
|
|
56
|
+
readonly "deploy.building": "Updating the live site…";
|
|
57
|
+
readonly "deploy.live": "The live site is up to date";
|
|
58
|
+
readonly "deploy.failed": "The live site couldn't be updated";
|
|
59
|
+
readonly "deploy.details": "Details";
|
|
60
|
+
readonly "loadError.title": "The admin panel couldn't open this site";
|
|
61
|
+
readonly "loadError.contentProblems": "Some of the site's files have problems, so they can't be edited until they're fixed.";
|
|
62
|
+
readonly "loadError.other": "Something went wrong while loading the site. Check your connection and try again.";
|
|
63
|
+
readonly "action.tryAgain": "Try again";
|
|
64
|
+
readonly "action.cancel": "Cancel";
|
|
65
|
+
readonly "action.close": "Close";
|
|
66
|
+
readonly "action.reload": "Reload";
|
|
67
|
+
readonly "action.undo": "Undo";
|
|
68
|
+
readonly "action.redo": "Redo";
|
|
69
|
+
readonly "action.undoHint": "Undo the last change (Ctrl+Z, or ⌘Z on a Mac)";
|
|
70
|
+
readonly "action.redoHint": "Redo what you undid (Ctrl+Shift+Z, or ⇧⌘Z on a Mac)";
|
|
71
|
+
readonly "details.show": "Details";
|
|
72
|
+
readonly "publish.button": "Publish";
|
|
73
|
+
readonly "publish.publishing": "Publishing…";
|
|
74
|
+
readonly "publish.done": "Published.";
|
|
75
|
+
readonly "publish.conflict": "Someone else changed the site since you opened this page, so your changes weren't published. Reload to see their changes, then make yours again.";
|
|
76
|
+
readonly "publish.error": "Your changes couldn't be published. Check your connection and try again.";
|
|
77
|
+
readonly "publish.invalid": "Fix the highlighted problems before publishing.";
|
|
78
|
+
readonly "unsaved.confirm": "You have changes that aren't published yet. Leave anyway and lose them?";
|
|
79
|
+
readonly "unsaved.label": "Unpublished changes";
|
|
80
|
+
readonly "pages.title": "Pages";
|
|
81
|
+
readonly "pages.new": "New page";
|
|
82
|
+
readonly "pages.empty": "This site has no pages yet.";
|
|
83
|
+
readonly "pages.column.title": "Title";
|
|
84
|
+
readonly "pages.column.address": "Address";
|
|
85
|
+
readonly "pages.edit": "Edit";
|
|
86
|
+
readonly "pages.move": "Change address";
|
|
87
|
+
readonly "pages.delete": "Delete";
|
|
88
|
+
readonly "pages.view": "View";
|
|
89
|
+
readonly "pages.homeCantDelete": "The home page can't be deleted.";
|
|
90
|
+
readonly "newPage.title": "New page";
|
|
91
|
+
readonly "newPage.pageTitle": "Page title";
|
|
92
|
+
readonly "newPage.address": "Address";
|
|
93
|
+
readonly "newPage.addressHint": "The part of the web address after the site's name, such as /about or /events/picnic.";
|
|
94
|
+
readonly "newPage.create": "Create page";
|
|
95
|
+
readonly "newPage.message": 'Add page "{title}"';
|
|
96
|
+
readonly "movePage.title": "Change the address of {title}";
|
|
97
|
+
readonly "movePage.address": "New address";
|
|
98
|
+
readonly "movePage.updateLinks": "Update menu links to this page";
|
|
99
|
+
readonly "movePage.warning": "Links to the old address elsewhere, such as in page text or on other websites, will stop working.";
|
|
100
|
+
readonly "movePage.submit": "Change address";
|
|
101
|
+
readonly "movePage.message": 'Move page "{title}" from {from} to {to}';
|
|
102
|
+
readonly "deletePage.title": "Delete {title}?";
|
|
103
|
+
readonly "deletePage.body": "The page at {path} will be removed from the site. Menu links to it will stop working.";
|
|
104
|
+
readonly "deletePage.submit": "Delete page";
|
|
105
|
+
readonly "deletePage.message": 'Delete page "{title}"';
|
|
106
|
+
readonly "address.invalid": "Use lowercase letters, numbers and hyphens, with / between parts, such as /about-us.";
|
|
107
|
+
readonly "address.reserved": "This address is used by the admin panel. Choose another.";
|
|
108
|
+
readonly "address.taken": "Another page already uses this address.";
|
|
109
|
+
readonly "field.required": "This can't be empty.";
|
|
110
|
+
readonly "editPage.message": 'Update page "{title}"';
|
|
111
|
+
readonly "editPage.notFound": "This page doesn't exist. It may have been moved or deleted.";
|
|
112
|
+
readonly "editPage.backToPages": "Back to pages";
|
|
113
|
+
readonly "layout.header": "Header";
|
|
114
|
+
readonly "layout.footer": "Footer";
|
|
115
|
+
readonly "layout.headerMessage": "Update the header";
|
|
116
|
+
readonly "layout.footerMessage": "Update the footer";
|
|
117
|
+
readonly "collections.title": "Collections";
|
|
118
|
+
readonly "collections.intro": "Collections are groups of similar items, such as videos, events or staff. Each collection has its own fields, and can give every item a page that shares one design.";
|
|
119
|
+
readonly "collections.new": "New collection";
|
|
120
|
+
readonly "collections.empty": "There are no collections yet.";
|
|
121
|
+
readonly "collections.column.name": "Name";
|
|
122
|
+
readonly "collections.column.count": "Items";
|
|
123
|
+
readonly "collections.column.address": "Pages";
|
|
124
|
+
readonly "collections.noPages": "No pages of their own";
|
|
125
|
+
readonly "newCollection.title": "New collection";
|
|
126
|
+
readonly "newCollection.name": "Name";
|
|
127
|
+
readonly "newCollection.nameHint": "What the whole collection is called, such as Videos or Events.";
|
|
128
|
+
readonly "newCollection.nameTaken": "Another collection already has a name like this. Choose another.";
|
|
129
|
+
readonly "newCollection.entryName": "One item is called";
|
|
130
|
+
readonly "newCollection.entryNameHint": "Such as Video or Event.";
|
|
131
|
+
readonly "newCollection.pages": "Give each item its own page";
|
|
132
|
+
readonly "newCollection.address": "Address of the pages";
|
|
133
|
+
readonly "newCollection.addressHint": "Each item's page goes inside this address, such as /videos/easter-vigil.";
|
|
134
|
+
readonly "newCollection.create": "Create collection";
|
|
135
|
+
readonly "newCollection.message": 'Add collection "{name}"';
|
|
136
|
+
readonly "collection.tab.entries": "Items";
|
|
137
|
+
readonly "collection.tab.template": "Page design";
|
|
138
|
+
readonly "collection.tab.settings": "Settings";
|
|
139
|
+
readonly "collection.notFound": "This collection doesn't exist. It may have been deleted.";
|
|
140
|
+
readonly "collection.back": "Back to collections";
|
|
141
|
+
readonly "entries.add": "Add {entry}";
|
|
142
|
+
readonly "entries.empty": "There's nothing in {name} yet.";
|
|
143
|
+
readonly "entries.column.title": "Title";
|
|
144
|
+
readonly "entries.column.address": "Address";
|
|
145
|
+
readonly "newEntry.title": "Add {entry}";
|
|
146
|
+
readonly "newEntry.entryTitle": "Title";
|
|
147
|
+
readonly "newEntry.address": "Address";
|
|
148
|
+
readonly "newEntry.addressHint": "The last part of the page's address, as in {example}.";
|
|
149
|
+
readonly "newEntry.message": 'Add {entry} "{title}"';
|
|
150
|
+
readonly "entryName.invalid": "Use lowercase letters, numbers and hyphens only, such as easter-vigil.";
|
|
151
|
+
readonly "entryName.reserved": "This address is used by the admin panel. Choose another.";
|
|
152
|
+
readonly "entryName.taken": "Something else on the site already uses this address.";
|
|
153
|
+
readonly "moveEntry.message": 'Move {entry} "{title}" from {from} to {to}';
|
|
154
|
+
readonly "deleteEntry.body": "{title} will be removed from {name}.";
|
|
155
|
+
readonly "deleteEntry.bodyPage": "{title} will be removed from {name}, and its page at {path} from the site. Menu links to it will stop working.";
|
|
156
|
+
readonly "deleteEntry.message": 'Delete {entry} "{title}"';
|
|
157
|
+
readonly "editEntry.message": 'Update {entry} "{title}"';
|
|
158
|
+
readonly "editEntry.notFound": "This item doesn't exist. It may have been renamed or deleted.";
|
|
159
|
+
readonly "editEntry.back": "Back to {name}";
|
|
160
|
+
readonly "editEntry.required": "Fill in {fields} before publishing.";
|
|
161
|
+
readonly "editEntry.noPage": "Items in {name} don't have pages of their own. They appear wherever a Collection list block shows {name}.";
|
|
162
|
+
readonly "template.help": "Every item's page uses this design. To show an item's information, add an Entry field block, or type a field's name in braces in any text:";
|
|
163
|
+
readonly "template.message": "Update the page design for {name}";
|
|
164
|
+
readonly "template.noPages": "Items in {name} don't have pages of their own, so there's no page design. To give them pages, turn that on in Settings.";
|
|
165
|
+
readonly "collectionSettings.markdown": "Store items as Markdown files";
|
|
166
|
+
readonly "collectionSettings.markdownHint": "Each item's text is saved as Markdown, a plain-text format that developers can also edit in their own tools. It's edited here as before.";
|
|
167
|
+
readonly "collectionSettings.markdownNeedsText": "To store items as Markdown files, add a formatted-text field first.";
|
|
168
|
+
readonly "collectionSettings.markdownBody": "Field saved as the Markdown text";
|
|
169
|
+
readonly "collectionSettings.markdownConverts": "Every item will be converted when you publish.";
|
|
170
|
+
readonly "collectionSettings.general": "General";
|
|
171
|
+
readonly "collectionSettings.path": "Address of each item's page";
|
|
172
|
+
readonly "collectionSettings.pathHint": "{slug} stands for each item's own address, as in /videos/{slug}.";
|
|
173
|
+
readonly "collectionSettings.pathWarning": "Changing this changes the address of every item's page. Links to the old addresses elsewhere will stop working.";
|
|
174
|
+
readonly "collectionSettings.sortField": "Order items by";
|
|
175
|
+
readonly "collectionSettings.sortOrder": "Direction";
|
|
176
|
+
readonly "collectionSettings.ascending": "A to Z, oldest or smallest first";
|
|
177
|
+
readonly "collectionSettings.descending": "Z to A, newest or largest first";
|
|
178
|
+
readonly "collectionSettings.message": "Update the settings for {name}";
|
|
179
|
+
readonly "collectionSettings.addressClash": "With this address, {title} would have the same address as another page.";
|
|
180
|
+
readonly "collectionSettings.delete": "Delete collection";
|
|
181
|
+
readonly "collectionSettings.deleteTitle": "Delete {name}?";
|
|
182
|
+
readonly "collectionSettings.deleteBody": "{name} and everything in it ({count} items) will be removed from the site, along with their pages. Collection lists showing it will be empty.";
|
|
183
|
+
readonly "collectionSettings.deleteMessage": 'Delete collection "{name}"';
|
|
184
|
+
readonly "fields.title": "Fields";
|
|
185
|
+
readonly "fields.intro": "The information each item has. Every item has a title. A field's kind can't be changed once it's published, but you can add a new field instead.";
|
|
186
|
+
readonly "fields.add": "Add field";
|
|
187
|
+
readonly "fields.label": "Label";
|
|
188
|
+
readonly "fields.type": "Kind of information";
|
|
189
|
+
readonly "fields.required": "Must be filled in";
|
|
190
|
+
readonly "fields.hint": "Help text";
|
|
191
|
+
readonly "fields.options": "Choices";
|
|
192
|
+
readonly "fields.option": "Choice {number}";
|
|
193
|
+
readonly "fields.addOption": "Add choice";
|
|
194
|
+
readonly "fields.optionsRequired": "Add at least one choice.";
|
|
195
|
+
readonly "fields.placeholder": "Show it on the page design with {placeholder}";
|
|
196
|
+
readonly "fields.remove": "Remove field";
|
|
197
|
+
readonly "fields.removed": "Removed fields are also removed from every item when you publish.";
|
|
198
|
+
readonly "fields.newLabel": "New field";
|
|
199
|
+
readonly "fields.type.text": "Short text";
|
|
200
|
+
readonly "fields.type.textarea": "Long text";
|
|
201
|
+
readonly "fields.type.richtext": "Formatted text";
|
|
202
|
+
readonly "fields.type.number": "Number";
|
|
203
|
+
readonly "fields.type.date": "Date";
|
|
204
|
+
readonly "fields.type.link": "Link";
|
|
205
|
+
readonly "fields.type.image": "Image (URL)";
|
|
206
|
+
readonly "fields.type.select": "Choice from a list";
|
|
207
|
+
readonly "demo.banner": "This is a demo. Try anything you like: changes are saved in this browser only, and the live site never changes.";
|
|
208
|
+
readonly "demo.published": "Saved in this browser.";
|
|
209
|
+
readonly "demo.startOver": "Start over";
|
|
210
|
+
readonly "demo.startOverTitle": "Start over?";
|
|
211
|
+
readonly "demo.startOverBody": "Everything you've changed in this demo, including uploads, will be undone.";
|
|
212
|
+
readonly "blocks.demo": "In this demo you can see which blocks there are, but not add or remove them: a block is added to a real site by updating its code.";
|
|
213
|
+
readonly "markdown.formatted": "Formatted";
|
|
214
|
+
readonly "markdown.source": "Markdown";
|
|
215
|
+
readonly "markdown.sourceOnly": "This text uses things the formatted view can't show, such as tables or pictures, so it can only be edited as Markdown.";
|
|
216
|
+
readonly "blocks.title": "Blocks";
|
|
217
|
+
readonly "blocks.intro": "Add blocks to the editor, or remove ones you don't use. A change shows in the editor once the site has been updated, usually within a few minutes.";
|
|
218
|
+
readonly "blocks.installed": "Added to this site";
|
|
219
|
+
readonly "blocks.noneInstalled": "No blocks have been added yet. The editor offers the built-in ones.";
|
|
220
|
+
readonly "blocks.loading": "Loading the blocks you can add…";
|
|
221
|
+
readonly "blocks.recommended": "Recommended";
|
|
222
|
+
readonly "blocks.add": "Add";
|
|
223
|
+
readonly "blocks.addLabel": "Add {name}";
|
|
224
|
+
readonly "blocks.added": "Added";
|
|
225
|
+
readonly "blocks.remove": "Remove";
|
|
226
|
+
readonly "blocks.removeLabel": "Remove {name}";
|
|
227
|
+
readonly "blocks.undo": "Undo";
|
|
228
|
+
readonly "blocks.undoAddLabel": "Don't add {name}";
|
|
229
|
+
readonly "blocks.undoRemoveLabel": "Don't remove {name}";
|
|
230
|
+
readonly "blocks.willAdd": "Will be added";
|
|
231
|
+
readonly "blocks.willRemove": "Will be removed";
|
|
232
|
+
readonly "blocks.pendingTitle": "Changes to publish";
|
|
233
|
+
readonly "blocks.pendingAdd": "Add {name}";
|
|
234
|
+
readonly "blocks.pendingRemove": "Remove {name}";
|
|
235
|
+
readonly "blocks.discard": "Discard changes";
|
|
236
|
+
readonly "blocks.publish": "Publish";
|
|
237
|
+
readonly "blocks.publishedNotice": "Published. Added blocks will be in the editor's list of blocks, and removed ones gone from it, once the site has been updated.";
|
|
238
|
+
readonly "blocks.addMessage": "Add the {name} block";
|
|
239
|
+
readonly "blocks.removeMessage": "Remove the {name} block";
|
|
240
|
+
readonly "blocks.changeMessage": "Change blocks: {changes}";
|
|
241
|
+
readonly "blocks.addPart": "add {names}";
|
|
242
|
+
readonly "blocks.removePart": "remove {names}";
|
|
243
|
+
readonly "blocks.inUseTitle": "{name} can't be removed yet";
|
|
244
|
+
readonly "blocks.inUse": "{name} is used in: {places}. Take it out of those first, then remove it.";
|
|
245
|
+
readonly "blocks.usedTemplate": "the page design of {name}";
|
|
246
|
+
readonly "blocks.error.record": "The list of blocks added to this site couldn't be read. Tell whoever looks after the site.";
|
|
247
|
+
readonly "blocks.error.unreachable": "The blocks you can add couldn't be loaded. Check your internet connection and try again.";
|
|
248
|
+
readonly "blocks.error.invalid": "The list of blocks you can add has a problem, so it couldn't be read. Try again later.";
|
|
249
|
+
readonly "blocks.error.untrusted": "This block comes from somewhere this site doesn't trust, so it can't be added.";
|
|
250
|
+
readonly "blocks.error.not-a-block": "This can't be added to the editor as a block.";
|
|
251
|
+
readonly "blocks.error.already-installed": "{name} has already been added.";
|
|
252
|
+
readonly "blocks.error.name-taken": "The site already has a block with the same name as {name}, so it can't be added.";
|
|
253
|
+
readonly "blocks.error.packages": "This block needs software the site doesn't have ({packages}). Ask whoever looks after the site to add it.";
|
|
254
|
+
readonly "blocks.error.unsupported-file": "This block includes a file that can't be added from here ({path}). Ask whoever looks after the site to add it.";
|
|
255
|
+
readonly "blocks.error.file-exists": "The site already has a different file where this block goes ({path}). Ask whoever looks after the site to add it.";
|
|
256
|
+
readonly "blocks.error.not-installed": "{name} hasn't been added, so there's nothing to remove.";
|
|
257
|
+
readonly "blocks.error.in-use": "{name} is still used on the site. Take it out first, then remove it.";
|
|
258
|
+
readonly "media.title": "Media";
|
|
259
|
+
readonly "media.intro": "Images and files for the site. Upload them here, or while editing a page. Large photos are made smaller, and details hidden in photos, such as where they were taken, are removed.";
|
|
260
|
+
readonly "media.upload": "Upload files";
|
|
261
|
+
readonly "media.uploading": "Uploading…";
|
|
262
|
+
readonly "media.drop": "Drop files here to upload them";
|
|
263
|
+
readonly "media.empty": "There are no images or files yet.";
|
|
264
|
+
readonly "media.search": "Find a file";
|
|
265
|
+
readonly "media.noMatches": "No files match.";
|
|
266
|
+
readonly "media.copy": "Copy address";
|
|
267
|
+
readonly "media.copied": "Copied";
|
|
268
|
+
readonly "media.replace": "Replace";
|
|
269
|
+
readonly "media.delete": "Delete";
|
|
270
|
+
readonly "media.uploaded": "Uploaded. Visitors see new files once the live site is updated.";
|
|
271
|
+
readonly "media.uploadMessage": "Add {names}";
|
|
272
|
+
readonly "media.replaceMessage": "Replace {name}";
|
|
273
|
+
readonly "media.deleteMessage": "Delete {name}";
|
|
274
|
+
readonly "media.deleteTitle": "Delete {name}?";
|
|
275
|
+
readonly "media.deleteBody": "{name} will be removed from the site.";
|
|
276
|
+
readonly "media.deleteUsed": "It's used in: {places}. Those places will show a missing image or a broken link.";
|
|
277
|
+
readonly "media.notUsed": "Nothing on the site uses it.";
|
|
278
|
+
readonly "media.error.type": "{name} can't be uploaded. The site can use images (JPEG, PNG, GIF, WebP, AVIF and SVG), PDFs, office documents, MP3 audio and MP4 video.";
|
|
279
|
+
readonly "media.error.size": "{name} is too large: files can be up to 25 MB. For long videos, upload them to YouTube or Vimeo and link to them instead.";
|
|
280
|
+
readonly "media.error.unreadable": "{name} couldn't be read. It may be damaged, or in a format browsers can't open, such as HEIC. Save it as a JPEG and try again.";
|
|
281
|
+
readonly "media.choose": "Choose image";
|
|
282
|
+
readonly "media.chooseFile": "Choose file";
|
|
283
|
+
readonly "media.pickerTitle": "Choose an image";
|
|
284
|
+
readonly "media.pickerTitleFile": "Choose a file";
|
|
285
|
+
readonly "media.pickerEmpty": "Nothing has been uploaded yet. Upload a file to use it here.";
|
|
286
|
+
readonly "media.clear": "Remove";
|
|
287
|
+
readonly "ai.label": "AI";
|
|
288
|
+
readonly "ai.title": "Write with AI";
|
|
289
|
+
readonly "ai.mode.add": "Describe what to add to this page, and AI will write it at the end of the page.";
|
|
290
|
+
readonly "ai.mode.edit": "Describe how to change the selected {block}.";
|
|
291
|
+
readonly "ai.mode.fill": "Describe this {item}, or paste your notes, and AI will fill in its fields.";
|
|
292
|
+
readonly "ai.instruction": "What should it write?";
|
|
293
|
+
readonly "ai.placeholder.add": "For example: a section about our Christmas Mass schedule, with a heading, a short welcome and a button to the contact page.";
|
|
294
|
+
readonly "ai.placeholder.edit": "For example: make it shorter and friendlier, or translate it into Spanish.";
|
|
295
|
+
readonly "ai.placeholder.fill": "For example: Fr. Smith's homily from Sunday, about hope. Paste any notes here.";
|
|
296
|
+
readonly "ai.write": "Write it";
|
|
297
|
+
readonly "ai.change": "Change it";
|
|
298
|
+
readonly "ai.fill": "Fill it in";
|
|
299
|
+
readonly "ai.stop": "Stop";
|
|
300
|
+
readonly "ai.working": "Writing…";
|
|
301
|
+
readonly "ai.progress": "Writing… {count} characters so far";
|
|
302
|
+
readonly "ai.done": "Done. Check it over, then publish when you're happy. Undo takes it back.";
|
|
303
|
+
readonly "ai.check": "AI can get things wrong, so read what it writes before publishing. It won't make up times, names or prices: it leaves [placeholders] for you to fill in.";
|
|
304
|
+
readonly "ai.needsKey": "To use {service}, add an API key under the AI service settings below, or choose another service.";
|
|
305
|
+
readonly "ai.settings": "AI service: {service}";
|
|
306
|
+
readonly "ai.provider": "AI service";
|
|
307
|
+
readonly "ai.provider.manual": "Copy and paste into a chat app (free)";
|
|
308
|
+
readonly "ai.provider.custom": "Another service (OpenAI-compatible)";
|
|
309
|
+
readonly "ai.noKey": "(free, no key needed)";
|
|
310
|
+
readonly "ai.baseUrl": "Address of the service's API";
|
|
311
|
+
readonly "ai.baseUrlHint": "Such as https://example.org/v1.";
|
|
312
|
+
readonly "ai.key": "API key";
|
|
313
|
+
readonly "ai.keyHint": "Your key stays in this browser and is only ever sent to {service}.";
|
|
314
|
+
readonly "ai.getKey": "Get a key from {service}";
|
|
315
|
+
readonly "ai.remember": "Remember the key on this device";
|
|
316
|
+
readonly "ai.forget": "Forget the key";
|
|
317
|
+
readonly "ai.costHint": "{service} may charge the account the key belongs to for each request. Setting a spending limit there is a good idea.";
|
|
318
|
+
readonly "ai.model": "Model";
|
|
319
|
+
readonly "ai.modelHint": "Choose one from the list, or type its name.";
|
|
320
|
+
readonly "ai.model.claude-opus-5-5": "Claude Opus 5.5 (best results)";
|
|
321
|
+
readonly "ai.model.claude-sonnet-5-5": "Claude Sonnet 5.5 (faster, costs less)";
|
|
322
|
+
readonly "ai.model.claude-haiku-4-5": "Claude Haiku 4.5 (fastest, costs least)";
|
|
323
|
+
readonly "ai.manual.step1": "Copy this request into Claude.ai, ChatGPT or another chat app:";
|
|
324
|
+
readonly "ai.manual.copy": "Copy the request";
|
|
325
|
+
readonly "ai.manual.copied": "Copied";
|
|
326
|
+
readonly "ai.manual.step2": "Then paste the chat app's whole answer here:";
|
|
327
|
+
readonly "ai.manual.use": "Use this answer";
|
|
328
|
+
readonly "ai.error.key": "{service} didn't accept the API key. Check that it was copied in full, that it hasn't been deleted, and that it can use this model.";
|
|
329
|
+
readonly "ai.error.limit": "{service} is limiting requests right now, or the account is out of credit. Wait a minute and try again, or choose another service.";
|
|
330
|
+
readonly "ai.error.network": "Couldn't reach {service}. Check your connection and try again.";
|
|
331
|
+
readonly "ai.error.refused": "{service} declined to write this. Try asking a different way.";
|
|
332
|
+
readonly "ai.error.answer": "The answer couldn't be used. Try again, or try a different model or service.";
|
|
333
|
+
readonly "ai.error.service": "{service} reported a problem. Try again in a moment.";
|
|
334
|
+
readonly "settings.title": "Site settings";
|
|
335
|
+
readonly "appearance.choice": "Colors of the admin panel";
|
|
336
|
+
readonly "appearance.system": "Match my computer";
|
|
337
|
+
readonly "appearance.light": "Light";
|
|
338
|
+
readonly "appearance.dark": "Dark";
|
|
339
|
+
readonly "settings.tab.general": "General";
|
|
340
|
+
readonly "settings.tab.theme": "Colors & fonts";
|
|
341
|
+
readonly "settings.tab.menus": "Menus";
|
|
342
|
+
readonly "settings.tab.css": "Custom CSS";
|
|
343
|
+
readonly "settings.tab.code": "Code";
|
|
344
|
+
readonly "settings.message": "Update site settings";
|
|
345
|
+
readonly "settings.preview": "Preview of the home page";
|
|
346
|
+
readonly "settings.previewEmpty": "Add a home page to see a preview here.";
|
|
347
|
+
readonly "general.siteTitle": "Site name";
|
|
348
|
+
readonly "general.description": "Description";
|
|
349
|
+
readonly "general.descriptionHint": "Shown by search engines when a page doesn't have its own description.";
|
|
350
|
+
readonly "general.url": "Site address";
|
|
351
|
+
readonly "general.urlHint": "The full public address, such as https://example.org. Used for search engines and link previews.";
|
|
352
|
+
readonly "general.language": "Language code";
|
|
353
|
+
readonly "general.languageHint": "Such as en, es or fr.";
|
|
354
|
+
readonly "general.titleTemplate": "Browser tab title";
|
|
355
|
+
readonly "general.titleTemplateHint": '%s is replaced by the page title, so "%s | My site" shows "About | My site".';
|
|
356
|
+
readonly "general.favicon": "Browser tab icon";
|
|
357
|
+
readonly "general.logo": "Logo";
|
|
358
|
+
readonly "general.logoAlt": "Logo description";
|
|
359
|
+
readonly "general.socialImage": "Image when shared on social media";
|
|
360
|
+
readonly "general.contact": "Contact details";
|
|
361
|
+
readonly "general.contactHint": "Shown wherever a Contact details block is placed, such as the footer.";
|
|
362
|
+
readonly "general.address": "Address";
|
|
363
|
+
readonly "general.phone": "Phone";
|
|
364
|
+
readonly "general.email": "Email";
|
|
365
|
+
readonly "theme.colors": "Colors";
|
|
366
|
+
readonly "theme.fonts": "Fonts";
|
|
367
|
+
readonly "theme.fontsHint": "Choose from Google Fonts. Site default uses each visitor's standard font.";
|
|
368
|
+
readonly "font.default": "Site default";
|
|
369
|
+
readonly "font.defaultHint": "Visitor's standard font";
|
|
370
|
+
readonly "font.search": "Search fonts";
|
|
371
|
+
readonly "font.searchHint": "Type to search Google Fonts, then use the arrow keys and Enter to choose.";
|
|
372
|
+
readonly "font.loading": "Loading fonts…";
|
|
373
|
+
readonly "font.noMatch": "No fonts match “{query}”.";
|
|
374
|
+
readonly "font.category.sans-serif": "Sans serif";
|
|
375
|
+
readonly "font.category.serif": "Serif";
|
|
376
|
+
readonly "font.category.display": "Display";
|
|
377
|
+
readonly "font.category.handwriting": "Handwriting";
|
|
378
|
+
readonly "font.category.monospace": "Monospace";
|
|
379
|
+
readonly "theme.headingFont": "Headings";
|
|
380
|
+
readonly "theme.bodyFont": "Text";
|
|
381
|
+
readonly "theme.radius": "Corner rounding";
|
|
382
|
+
readonly "theme.radiusHint": "Such as 0.5rem, or 0 for square corners.";
|
|
383
|
+
readonly "theme.color.background": "Background";
|
|
384
|
+
readonly "theme.color.foreground": "Text";
|
|
385
|
+
readonly "theme.color.primary": "Main color";
|
|
386
|
+
readonly "theme.color.primaryForeground": "Text on main color";
|
|
387
|
+
readonly "theme.color.secondary": "Second color";
|
|
388
|
+
readonly "theme.color.secondaryForeground": "Text on second color";
|
|
389
|
+
readonly "theme.color.muted": "Subtle background";
|
|
390
|
+
readonly "theme.color.mutedForeground": "Subtle text";
|
|
391
|
+
readonly "theme.color.accent": "Highlight";
|
|
392
|
+
readonly "theme.color.accentForeground": "Text on highlight";
|
|
393
|
+
readonly "theme.color.border": "Borders";
|
|
394
|
+
readonly "theme.default": "Default";
|
|
395
|
+
readonly "theme.pickColor": "Choose a color for {name}";
|
|
396
|
+
readonly "menus.intro": "Menus are lists of links. Show one anywhere with the Menu block, using its name.";
|
|
397
|
+
readonly "menus.empty": "There are no menus yet.";
|
|
398
|
+
readonly "menus.add": "Add menu";
|
|
399
|
+
readonly "menus.newName": "New menu name";
|
|
400
|
+
readonly "menus.nameInvalid": "Use lowercase letters, numbers and hyphens, and a name no other menu uses.";
|
|
401
|
+
readonly "menus.deleteMenu": "Delete menu";
|
|
402
|
+
readonly "menus.addLink": "Add link";
|
|
403
|
+
readonly "menus.addSublink": "Add link below this one";
|
|
404
|
+
readonly "menus.label": "Label";
|
|
405
|
+
readonly "menus.href": "Link to";
|
|
406
|
+
readonly "menus.moveUp": "Move up";
|
|
407
|
+
readonly "menus.moveDown": "Move down";
|
|
408
|
+
readonly "menus.remove": "Remove";
|
|
409
|
+
readonly "menus.newLink": "New link";
|
|
410
|
+
readonly "css.intro": "CSS here applies to every page and overrides the blocks' own styles. Tailwind's @apply works too.";
|
|
411
|
+
readonly "css.label": "Custom CSS";
|
|
412
|
+
readonly "code.editorHint": "Tab indents, and suggestions appear as you type. Press Escape, then Tab, to leave the editor. Ctrl+F finds and replaces.";
|
|
413
|
+
readonly "code.intro": "Code from services such as analytics or site verification, added to every page of the site. It never runs in the admin panel, so check it on the site once it's published. Paste only code you trust: it can change anything on the site.";
|
|
414
|
+
readonly "code.head": "In the page head";
|
|
415
|
+
readonly "code.headHint": "Script, style, link, meta and noscript tags, such as the ones Google Analytics gives you.";
|
|
416
|
+
readonly "code.body": "At the end of the page";
|
|
417
|
+
readonly "code.bodyHint": "Any HTML, such as a chat widget, added just before the end of every page.";
|
|
418
|
+
readonly "code.error.text": 'The code in the page head has text outside a tag: "{text}". Only tags such as <script> and <meta> can go there.';
|
|
419
|
+
readonly "code.error.tag": 'A <{tag}> tag can\'t go in the page head. Put it in "At the end of the page" instead.';
|
|
420
|
+
readonly "code.error.unclosed": "A {tag} tag in the page head isn't closed.";
|
|
421
|
+
};
|
|
422
|
+
type StringKey = keyof typeof defaultStrings;
|
|
423
|
+
type Strings = Record<StringKey, string>;
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/admin.d.ts
|
|
426
|
+
interface AdminProps {
|
|
427
|
+
/** The site's `goodfellow.config.tsx`. */
|
|
428
|
+
config: GoodfellowConfig;
|
|
429
|
+
/**
|
|
430
|
+
* Where the site's files are read from and published to, without signing in.
|
|
431
|
+
* Used by `goodfellow dev`. Otherwise the admin panel signs in to `host`. In a
|
|
432
|
+
* demo (the config's `demo`), it's only read from, and changes stay in the browser.
|
|
433
|
+
*/
|
|
434
|
+
store?: ContentStore;
|
|
435
|
+
/** The git host the site is stored on. Defaults to the config's `backend`. */
|
|
436
|
+
host?: GitHost;
|
|
437
|
+
preview: PreviewOptions;
|
|
438
|
+
/** The live site's address, for "View" links. Defaults to `/`. */
|
|
439
|
+
siteUrl?: string;
|
|
440
|
+
/** Replaces any of the admin panel's text, for rewording or translation. */
|
|
441
|
+
strings?: Partial<Strings>;
|
|
442
|
+
/**
|
|
443
|
+
* Where Goodfellow's block registry is, as `https://…/{name}.json`. Defaults to the
|
|
444
|
+
* release this admin panel was built with; the development servers serve their own copy.
|
|
445
|
+
*/
|
|
446
|
+
registry?: string;
|
|
447
|
+
}
|
|
448
|
+
/** The admin panel. Render it on its own page, such as `/admin`. */
|
|
449
|
+
export declare function Admin({ config, store, host, preview, siteUrl, strings, registry }: AdminProps): import("react").JSX.Element;
|
|
450
|
+
/** Renders the admin panel into an element. */
|
|
451
|
+
export declare function mountAdmin(element: Element, props: AdminProps): void;
|
|
452
|
+
//#endregion
|
|
453
|
+
export type { AdminProps, PreviewOptions, StringKey, Strings };
|