@vespercms/admin 0.0.0-stage → 0.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/README.md +119 -2
  2. package/dist/BodyEditor-_mkh0BSQ.js +3047 -0
  3. package/dist/a11y/FieldNotes.d.ts +23 -0
  4. package/dist/a11y/NotesDrawer.d.ts +23 -0
  5. package/dist/a11y/pdf.d.ts +3 -0
  6. package/dist/a11y/run.d.ts +3 -0
  7. package/dist/a11y/useNotes.d.ts +28 -0
  8. package/dist/app/App.d.ts +2 -0
  9. package/dist/app/Screen.d.ts +88 -0
  10. package/dist/app/UserMenu.d.ts +7 -0
  11. package/dist/app/api.d.ts +75 -0
  12. package/dist/app/appearance.d.ts +10 -0
  13. package/dist/app/browser-api.d.ts +17 -0
  14. package/dist/app/collection-icon.d.ts +12 -0
  15. package/dist/app/context.d.ts +23 -0
  16. package/dist/app/entries-changed.d.ts +11 -0
  17. package/dist/app/file-url.d.ts +13 -0
  18. package/dist/app/format.d.ts +4 -0
  19. package/dist/app/idb.d.ts +7 -0
  20. package/dist/app/load.d.ts +16 -0
  21. package/dist/app/media.d.ts +5 -0
  22. package/dist/app/navigation.d.ts +4 -0
  23. package/dist/app/pane-context.d.ts +19 -0
  24. package/dist/app/panes.d.ts +14 -0
  25. package/dist/app/router.d.ts +62 -0
  26. package/dist/body/BodyEditor.d.ts +42 -0
  27. package/dist/body/TableView.d.ts +2 -0
  28. package/dist/body/catalog.d.ts +47 -0
  29. package/dist/body/checks.d.ts +15 -0
  30. package/dist/body/chips.d.ts +31 -0
  31. package/dist/body/commands.d.ts +31 -0
  32. package/dist/body/document.d.ts +42 -0
  33. package/dist/body/insert.d.ts +69 -0
  34. package/dist/body/nodes.d.ts +38 -0
  35. package/dist/body/reveal.d.ts +13 -0
  36. package/dist/body/scroll.d.ts +16 -0
  37. package/dist/body/settings.d.ts +19 -0
  38. package/dist/body/shortcuts.d.ts +13 -0
  39. package/dist/body/table.d.ts +31 -0
  40. package/dist/body/ui.d.ts +30 -0
  41. package/dist/body/views.d.ts +9 -0
  42. package/dist/checks-C-0xDu-I.js +57 -0
  43. package/dist/cloud/CloudGate.d.ts +14 -0
  44. package/dist/cloud/access.d.ts +14 -0
  45. package/dist/cloud/changes.d.ts +26 -0
  46. package/dist/cloud/connection.d.ts +100 -0
  47. package/dist/cloud/editor.d.ts +44 -0
  48. package/dist/cloud/session.d.ts +62 -0
  49. package/dist/cloud/storage.d.ts +45 -0
  50. package/dist/editor/Field.d.ts +24 -0
  51. package/dist/editor/PagePicker.d.ts +20 -0
  52. package/dist/editor/arrange.d.ts +13 -0
  53. package/dist/editor/context.d.ts +23 -0
  54. package/dist/editor/copy.d.ts +9 -0
  55. package/dist/editor/reveal.d.ts +7 -0
  56. package/dist/editor/target.d.ts +21 -0
  57. package/dist/editor/values.d.ts +18 -0
  58. package/dist/geo-map-CT3OGD7O.js +110 -0
  59. package/dist/github/GitHubGate.d.ts +15 -0
  60. package/dist/github/api.d.ts +20 -0
  61. package/dist/github/cache.d.ts +2 -0
  62. package/dist/github/session.d.ts +35 -0
  63. package/dist/index.d.ts +3 -0
  64. package/dist/markdown-4fVeej3c.js +211 -0
  65. package/dist/media/MediaPicker.d.ts +28 -0
  66. package/dist/media/file-icon.d.ts +3 -0
  67. package/dist/media/formats.d.ts +23 -0
  68. package/dist/media/hygiene.d.ts +37 -0
  69. package/dist/media/upload.d.ts +31 -0
  70. package/dist/mount.d.ts +3 -0
  71. package/dist/pdf-m5s_uXJ3.js +24 -0
  72. package/dist/run-y4XRkg17.js +7 -0
  73. package/dist/schedule/ScheduleDialog.d.ts +28 -0
  74. package/dist/schedule/ScheduleSummary.d.ts +12 -0
  75. package/dist/schedule/ScheduledView.d.ts +8 -0
  76. package/dist/schedule/cloud.d.ts +21 -0
  77. package/dist/schedule/now.d.ts +5 -0
  78. package/dist/schedule/times.d.ts +35 -0
  79. package/dist/screens/EntryEditor.d.ts +13 -0
  80. package/dist/screens/EntryList.d.ts +16 -0
  81. package/dist/screens/Home.d.ts +6 -0
  82. package/dist/screens/ListPane.d.ts +6 -0
  83. package/dist/screens/MediaBrowser.d.ts +7 -0
  84. package/dist/screens/NotFound.d.ts +3 -0
  85. package/dist/screens/PageTree.d.ts +10 -0
  86. package/dist/screens/Redirects.d.ts +1 -0
  87. package/dist/screens/Unavailable.d.ts +8 -0
  88. package/dist/screens/status.d.ts +36 -0
  89. package/dist/shortcuts-CarKeDqp.js +4666 -0
  90. package/dist/studio.css +3 -0
  91. package/dist/studio.js +6449 -0
  92. package/dist/types.d.ts +76 -0
  93. package/dist/widgets/basic.d.ts +25 -0
  94. package/dist/widgets/blank-date.d.ts +8 -0
  95. package/dist/widgets/crops.d.ts +43 -0
  96. package/dist/widgets/focal-point.d.ts +15 -0
  97. package/dist/widgets/geo-map.d.ts +10 -0
  98. package/dist/widgets/geo.d.ts +16 -0
  99. package/dist/widgets/group.d.ts +41 -0
  100. package/dist/widgets/icon.d.ts +9 -0
  101. package/dist/widgets/image.d.ts +16 -0
  102. package/dist/widgets/markdown-lazy.d.ts +2 -0
  103. package/dist/widgets/markdown.d.ts +2 -0
  104. package/dist/widgets/reference.d.ts +12 -0
  105. package/dist/widgets/registry.d.ts +32 -0
  106. package/dist/widgets/special.d.ts +20 -0
  107. package/dist/widgets/union.d.ts +36 -0
  108. package/package.json +63 -4
  109. package/src/a11y/FieldNotes.tsx +56 -0
  110. package/src/a11y/NotesDrawer.tsx +81 -0
  111. package/src/a11y/pdf.ts +45 -0
  112. package/src/a11y/run.ts +12 -0
  113. package/src/a11y/useNotes.ts +139 -0
  114. package/src/app/App.tsx +156 -0
  115. package/src/app/Screen.tsx +416 -0
  116. package/src/app/UserMenu.tsx +95 -0
  117. package/src/app/api.ts +176 -0
  118. package/src/app/appearance.ts +54 -0
  119. package/src/app/browser-api.ts +173 -0
  120. package/src/app/collection-icon.ts +15 -0
  121. package/src/app/context.tsx +32 -0
  122. package/src/app/entries-changed.ts +48 -0
  123. package/src/app/file-url.tsx +44 -0
  124. package/src/app/format.ts +39 -0
  125. package/src/app/idb.ts +82 -0
  126. package/src/app/load.ts +40 -0
  127. package/src/app/media.ts +20 -0
  128. package/src/app/navigation.ts +4 -0
  129. package/src/app/pane-context.ts +25 -0
  130. package/src/app/panes.tsx +513 -0
  131. package/src/app/router.ts +158 -0
  132. package/src/body/BodyEditor.tsx +1139 -0
  133. package/src/body/TableView.tsx +700 -0
  134. package/src/body/catalog.ts +198 -0
  135. package/src/body/checks.ts +83 -0
  136. package/src/body/chips.ts +150 -0
  137. package/src/body/commands.ts +191 -0
  138. package/src/body/document.ts +388 -0
  139. package/src/body/insert.tsx +301 -0
  140. package/src/body/nodes.ts +287 -0
  141. package/src/body/reveal.ts +93 -0
  142. package/src/body/scroll.ts +53 -0
  143. package/src/body/settings.tsx +510 -0
  144. package/src/body/shortcuts.ts +31 -0
  145. package/src/body/table.ts +192 -0
  146. package/src/body/ui.ts +77 -0
  147. package/src/body/views.tsx +268 -0
  148. package/src/build.ts +6 -0
  149. package/src/cloud/CloudGate.tsx +245 -0
  150. package/src/cloud/access.ts +52 -0
  151. package/src/cloud/changes.tsx +474 -0
  152. package/src/cloud/connection.ts +281 -0
  153. package/src/cloud/editor.tsx +250 -0
  154. package/src/cloud/session.ts +289 -0
  155. package/src/cloud/storage.ts +212 -0
  156. package/src/editor/Field.tsx +182 -0
  157. package/src/editor/PagePicker.tsx +102 -0
  158. package/src/editor/arrange.ts +98 -0
  159. package/src/editor/context.tsx +31 -0
  160. package/src/editor/copy.ts +30 -0
  161. package/src/editor/reveal.ts +38 -0
  162. package/src/editor/target.ts +104 -0
  163. package/src/editor/values.ts +71 -0
  164. package/src/github/GitHubGate.tsx +298 -0
  165. package/src/github/api.ts +81 -0
  166. package/src/github/cache.ts +64 -0
  167. package/src/github/session.ts +146 -0
  168. package/src/index.ts +10 -0
  169. package/src/media/MediaPicker.tsx +302 -0
  170. package/src/media/file-icon.ts +17 -0
  171. package/src/media/formats.ts +262 -0
  172. package/src/media/hygiene.ts +220 -0
  173. package/src/media/upload.ts +47 -0
  174. package/src/mount.tsx +20 -0
  175. package/src/schedule/ScheduleDialog.tsx +303 -0
  176. package/src/schedule/ScheduleSummary.tsx +59 -0
  177. package/src/schedule/ScheduledView.tsx +294 -0
  178. package/src/schedule/cloud.ts +66 -0
  179. package/src/schedule/now.ts +18 -0
  180. package/src/schedule/times.ts +122 -0
  181. package/src/screens/EntryEditor.tsx +1817 -0
  182. package/src/screens/EntryList.tsx +272 -0
  183. package/src/screens/Home.tsx +131 -0
  184. package/src/screens/ListPane.tsx +477 -0
  185. package/src/screens/MediaBrowser.tsx +253 -0
  186. package/src/screens/NotFound.tsx +19 -0
  187. package/src/screens/PageTree.tsx +738 -0
  188. package/src/screens/Redirects.tsx +522 -0
  189. package/src/screens/Unavailable.tsx +27 -0
  190. package/src/screens/status.tsx +104 -0
  191. package/src/studio.css +168 -0
  192. package/src/types.ts +82 -0
  193. package/src/widgets/basic.tsx +315 -0
  194. package/src/widgets/blank-date.ts +32 -0
  195. package/src/widgets/crops.tsx +399 -0
  196. package/src/widgets/focal-point.tsx +240 -0
  197. package/src/widgets/geo-map.tsx +160 -0
  198. package/src/widgets/geo.tsx +170 -0
  199. package/src/widgets/group.tsx +827 -0
  200. package/src/widgets/icon.tsx +47 -0
  201. package/src/widgets/image.tsx +407 -0
  202. package/src/widgets/markdown-lazy.tsx +22 -0
  203. package/src/widgets/markdown.tsx +267 -0
  204. package/src/widgets/reference.tsx +196 -0
  205. package/src/widgets/registry.ts +104 -0
  206. package/src/widgets/special.tsx +290 -0
  207. package/src/widgets/union.tsx +233 -0
@@ -0,0 +1,37 @@
1
+ import { type DetectedType } from './formats.ts';
2
+ export type PreparedUpload = {
3
+ bytes: Uint8Array;
4
+ name: string;
5
+ type: DetectedType;
6
+ /** What hygiene did, in words, for the editor ("Removed location data"). */
7
+ notes: string[];
8
+ /** Larger than the warning size: the editor confirms before uploading. */
9
+ large: boolean;
10
+ width?: number;
11
+ height?: number;
12
+ };
13
+ export type PrepareResult = {
14
+ ok: true;
15
+ upload: PreparedUpload;
16
+ } | {
17
+ ok: false;
18
+ message: string;
19
+ };
20
+ export type HygieneOptions = {
21
+ maxEdge?: number;
22
+ /** Only images are accepted (an image field), or anything (a file field). */
23
+ accept?: 'image' | 'any';
24
+ };
25
+ export declare function prepareUpload(file: File, options?: HygieneOptions): Promise<PrepareResult>;
26
+ export declare function megabytes(n: number): string;
27
+ /** "812 bytes", "48 KB", "3.2 MB". */
28
+ export declare function fileSize(n: number): string;
29
+ /**
30
+ * Removes anything that can run or navigate: scripts, event handlers,
31
+ * javascript: and data: links, embedded HTML, and animations that rewrite
32
+ * links or handlers. Drawing content is kept as it was.
33
+ */
34
+ export declare function sanitizeSvg(svg: string): {
35
+ svg: string;
36
+ removed: boolean;
37
+ };
@@ -0,0 +1,31 @@
1
+ import { type MediaItem } from '@vespercms/core';
2
+ import type { StudioApi } from '../app/api.ts';
3
+ import { type HygieneOptions, type PreparedUpload } from './hygiene.ts';
4
+ export type UploadStep = {
5
+ step: 'refused';
6
+ message: string;
7
+ }
8
+ /** The same bytes are already in the site: reuse that file, or upload a copy. */
9
+ | {
10
+ step: 'duplicate';
11
+ upload: PreparedUpload;
12
+ existing: string;
13
+ }
14
+ /** Large after processing: the editor confirms first. */
15
+ | {
16
+ step: 'confirm-large';
17
+ upload: PreparedUpload;
18
+ } | {
19
+ step: 'ready';
20
+ upload: PreparedUpload;
21
+ };
22
+ export declare function checkUpload(file: File, media: readonly MediaItem[], options: HygieneOptions): Promise<UploadStep>;
23
+ export declare function sendUpload(api: StudioApi, upload: PreparedUpload, folder: string, options?: {
24
+ withNextSave?: boolean;
25
+ }): Promise<{
26
+ ok: true;
27
+ path: string;
28
+ } | {
29
+ ok: false;
30
+ message: string;
31
+ }>;
@@ -0,0 +1,3 @@
1
+ import type { StudioOptions } from './types.ts';
2
+ /** Renders the studio into `element`. Returns a function that unmounts it. */
3
+ export declare function mountStudio(element: Element, options: StudioOptions): () => void;
@@ -0,0 +1,24 @@
1
+ import { GlobalWorkerOptions as e, getDocument as t } from "pdfjs-dist/legacy/build/pdf.mjs";
2
+ import n from "pdfjs-dist/legacy/build/pdf.worker.min.mjs?url";
3
+ //#region src/a11y/pdf.ts
4
+ e.workerSrc = n;
5
+ async function r(e) {
6
+ let n = t({
7
+ data: e instanceof Uint8Array ? e : new Uint8Array(e),
8
+ enableXfa: !1,
9
+ disableFontFace: !0,
10
+ verbosity: 0
11
+ });
12
+ try {
13
+ let e = await n.promise, [t, r] = await Promise.all([e.getMarkInfo(), e.getMetadata()]), i = e.numPages > 0 ? await (await e.getPage(1)).getStructTree() : null, a = r.info, o = r.metadata?.get("dc:title"), s = (e) => typeof e == "string" && e.trim() !== "" ? e.trim() : null;
14
+ return {
15
+ tagged: (t instanceof Map ? t.get("Marked") : t?.Marked) === !0 && i !== null,
16
+ title: s(a.Title) ?? s(o),
17
+ language: s(a.Language)
18
+ };
19
+ } finally {
20
+ await n.destroy();
21
+ }
22
+ }
23
+ //#endregion
24
+ export { r as readPdfFacts };
@@ -0,0 +1,7 @@
1
+ import { entryChecker as e, pdfNotes as t } from "@vespercms/core";
2
+ //#region src/a11y/run.ts
3
+ function n(t) {
4
+ return e(t);
5
+ }
6
+ //#endregion
7
+ export { n as a11yChecker, t as pdfNotes };
@@ -0,0 +1,28 @@
1
+ import { type CollectionManifest } from '@vespercms/core';
2
+ import { type ScheduleTimes } from './times.ts';
3
+ export type ScheduleDialogProps = {
4
+ isOpen: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ collection: CollectionManifest;
7
+ initial: ScheduleTimes;
8
+ /** Already live: only when it comes down can be set (call 8). */
9
+ live: boolean;
10
+ /**
11
+ * `publish`: Schedule… from Publish ▾, which saves or publishes with the
12
+ * times. `set`: Change schedule… from Details, which only sets them.
13
+ */
14
+ purpose: 'publish' | 'set';
15
+ /** What going live without a time is called here: "Publish now", or "Save now" in local mode. */
16
+ nowLabel: string;
17
+ onSubmit: (times: ScheduleTimes) => void;
18
+ /** Goes live now instead, when the chosen time has passed. */
19
+ onNow?: () => void;
20
+ };
21
+ export declare function ScheduleDialog(props: ScheduleDialogProps): import("react").JSX.Element;
22
+ /**
23
+ * What a daylight-saving change does to a wall time: a skipped one moves
24
+ * forward ("2:30 AM doesn't happen on Sun, Mar 14; this is 3:30 AM."), and
25
+ * a repeated one is the first ("1:30 AM happens twice that night; this is
26
+ * the first, EDT.").
27
+ */
28
+ export declare function dstNote(wall: string, zone: string, now: Date): string | null;
@@ -0,0 +1,12 @@
1
+ import { type CollectionManifest, type DataObject } from '@vespercms/core';
2
+ /**
3
+ * The schedule in Details (spec §6.17), in place of its raw fields: "Goes
4
+ * live Sat, Oct 31, 8:00 AM · Comes down Sun, Nov 8, 12:00 AM", in the site's
5
+ * zone, and Change schedule… to set the times in the Schedule dialog.
6
+ */
7
+ export declare function ScheduleSummary({ collection, values, zone, onChange, }: {
8
+ collection: CollectionManifest;
9
+ values: DataObject;
10
+ zone: string;
11
+ onChange: () => void;
12
+ }): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export declare function ScheduledView(): import("react").JSX.Element;
2
+ /**
3
+ * "3 scheduled changes", linking to the Scheduled view: on Home, and among
4
+ * panes at the top of the collections. Absent when nothing is scheduled.
5
+ */
6
+ export declare function ScheduledLine({ className }: {
7
+ className?: string;
8
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,21 @@
1
+ import type { CloudScheduledEvent, ScheduleResponse } from '@vespercms/core';
2
+ /** The cloud's own word on a change in the files, matched by file, change and instant. */
3
+ export declare function cloudEventOf(schedule: ScheduleResponse | undefined, change: {
4
+ path: string;
5
+ change: 'publish' | 'unpublish';
6
+ at: string;
7
+ }): CloudScheduledEvent | undefined;
8
+ /**
9
+ * Where a change still to come stands, in words: "Waiting in Vesper until
10
+ * 8:00 AM" for held drafts, "Rebuild at 8:00 AM" with a trigger, and "Next
11
+ * build after 8:00 AM" without one.
12
+ */
13
+ export declare function cloudStateWords(schedule: ScheduleResponse, event: CloudScheduledEvent | undefined, at: Date, zone: string): string;
14
+ /**
15
+ * True when the cloud keeps the time exactly: it asks for a rebuild then,
16
+ * or it publishes held drafts then, which starts the host's build. Only the
17
+ * publish waits in the cloud; a time to come down is a plain field.
18
+ */
19
+ export declare function cloudKeepsTime(schedule: ScheduleResponse | undefined, change: 'publish' | 'unpublish'): boolean;
20
+ /** When the cloud should hold a draft rather than publish it: the site holds, and its time is still to come. */
21
+ export declare function holdUntil(schedule: ScheduleResponse | undefined, publishAt: Date | undefined, now?: Date): Date | null;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The time, again each minute, so words that depend on it ("Scheduled ·
3
+ * …") change on their own once a time passes, and a render stays pure.
4
+ */
5
+ export declare function useNow(): Date;
@@ -0,0 +1,35 @@
1
+ import { type CollectionManifest, type DataObject, type Manifest, type SchedulePresentation } from '@vespercms/core';
2
+ /** When an entry goes live and comes down, and where its page sends visitors after. */
3
+ export type ScheduleTimes = {
4
+ publishAt?: Date;
5
+ unpublishAt?: Date;
6
+ redirect?: string;
7
+ };
8
+ /** The site's zone, for showing and entering times, or the viewer's own when it has none. */
9
+ export declare function siteZone(manifest: Manifest): {
10
+ zone: string;
11
+ isSite: boolean;
12
+ };
13
+ /** The field that holds where visitors go after, when the collection's schema has one. */
14
+ export declare function redirectField(collection: CollectionManifest): string | null;
15
+ /** The schedule's field names, the redirect's when the schema has it. */
16
+ export declare function scheduleKeys(collection: CollectionManifest): string[];
17
+ export declare function timesOf(collection: CollectionManifest, values: DataObject): ScheduleTimes;
18
+ /**
19
+ * The values with these times in place of the old ones: a time left out is
20
+ * removed. A time stored as a quoted string stays a string, with its offset
21
+ * written out, as the date-time field keeps it.
22
+ */
23
+ export declare function withTimes(collection: CollectionManifest, values: DataObject, times: ScheduleTimes): DataObject;
24
+ /** An entry row's schedule (ISO times) as values under the schedule's field names. */
25
+ export declare function rowData(schedule: SchedulePresentation | undefined, times: {
26
+ publishAt?: string;
27
+ unpublishAt?: string;
28
+ } | undefined): DataObject;
29
+ /** Whether a row has a change still to come: it goes live or comes down later. */
30
+ export declare function hasUpcoming(times: {
31
+ publishAt?: string;
32
+ unpublishAt?: string;
33
+ } | undefined, now?: Date): boolean;
34
+ /** "every hour", "every 15 minutes", "every 2 hours". */
35
+ export declare function everyText(minutes: number): string;
@@ -0,0 +1,13 @@
1
+ import { type CollectionManifest } from '@vespercms/core';
2
+ /**
3
+ * Opens an entry (or starts a new one when `id` is null) and hands it to the
4
+ * form. A reload after a conflict remounts the form with the new version.
5
+ * With `copy`, the entry is the original of a new one (Duplicate).
6
+ */
7
+ export declare function EntryEditor({ collection, id, parent, copy, }: {
8
+ collection: CollectionManifest;
9
+ id: string | null;
10
+ /** New pages in a tree collection: the parent page's path (spec §6.15.2). */
11
+ parent?: string;
12
+ copy?: boolean;
13
+ }): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { type CollectionManifest, type EntrySummary } from '@vespercms/core';
2
+ import type { SortDescriptor } from 'react-aria-components';
3
+ /**
4
+ * A collection's entries (spec §10.3): one row per entry with its title,
5
+ * the collection's list fields, when it was edited, and its status in
6
+ * words. One search box and one status filter; sort by column header.
7
+ */
8
+ export declare function EntryList({ collection }: {
9
+ collection: CollectionManifest;
10
+ }): import("react").JSX.Element;
11
+ export declare const TITLE_KEYS: Set<string>;
12
+ /** A list field's value as short text. Dates at midnight UTC are calendar dates. */
13
+ export declare function formatListValue(encoded: unknown): string;
14
+ export declare function labelFor(collection: CollectionManifest, key: string): string;
15
+ export declare function defaultSort(collection: CollectionManifest): SortDescriptor;
16
+ export declare function compareBy(sort: SortDescriptor): (a: EntrySummary, b: EntrySummary) => number;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The home screen (spec §10.3): a plain list of collections and singletons,
3
+ * with entry counts and when each was last edited. Nothing else. One screen
4
+ * at a time only: among panes, the structure pane lists them (app/panes.tsx).
5
+ */
6
+ export declare function Home(): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { CollectionManifest } from '@vespercms/core';
2
+ export declare function ListPane({ collection, currentId, }: {
3
+ collection: CollectionManifest;
4
+ /** The entry open beside the list, or null. */
5
+ currentId: string | null;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The media browser (spec §6.6.6): every image and file in the site's
3
+ * assets folders, with where each is used. Search by name, filter by
4
+ * folder, and an "Unused" view for cleaning up. Deleting is confirmed, and
5
+ * only possible for files nothing uses.
6
+ */
7
+ export declare function MediaBrowser(): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function NotFound({ message, }: {
2
+ message?: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { CollectionManifest, MoveResult } from '@vespercms/core';
2
+ export declare function PageTree({ collection, currentId, }: {
3
+ collection: CollectionManifest;
4
+ /** The page open beside the outline, among panes. */
5
+ currentId?: string | null;
6
+ }): import("react").JSX.Element;
7
+ /** The confirmation's words (spec §6.15.4): what moves, what changes with it. */
8
+ export declare function planText(plan: Extract<MoveResult, {
9
+ ok: true;
10
+ }>): string;
@@ -0,0 +1 @@
1
+ export declare function Redirects(): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Shown when this build of the studio has no storage back end: a deployed
3
+ * site before GitHub mode (Phase 3) exists. It's outside the studio context,
4
+ * so it draws its own landmarks.
5
+ */
6
+ export declare function Unavailable({ siteName }: {
7
+ siteName: string;
8
+ }): import("react").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { type CollectionManifest, type DataValue, type Draft, type EntryStatus } from '@vespercms/core';
2
+ import { type StatusTone } from '@vespercms/ui';
3
+ export type EntryState = {
4
+ tone: StatusTone;
5
+ /** "Draft", "Scheduled", "Live" or "Unpublished". */
6
+ word: string;
7
+ /** What follows the word, its joiner included: " · Sat, Oct 31, 8:00 AM". */
8
+ rest: string;
9
+ };
10
+ /**
11
+ * What an entry is now. `times` is the entry's data with its schedule's
12
+ * fields, or null where they aren't known (a page tree's rows), which then
13
+ * never claims Live. Live is said only where an entry could be something
14
+ * else: a collection with a schedule or a `draft` field, or any in the cloud,
15
+ * where a new entry starts as a draft. Elsewhere every entry is live, and
16
+ * saying so on every row would only be noise.
17
+ */
18
+ export declare function entryState(collection: CollectionManifest, entry: {
19
+ draft: boolean;
20
+ times: DataValue | null;
21
+ newDraft?: boolean;
22
+ }, options: {
23
+ zone: string;
24
+ cloud: boolean;
25
+ now?: Date;
26
+ }): EntryState | null;
27
+ /** Whether a file is in a draft that would create it: in the cloud, an entry never published. */
28
+ export declare function isNewInDraft(drafts: readonly Draft[], path: string | undefined): boolean;
29
+ /** "Read only" or "Edit as YAML": what can be done with the entry, after its state. */
30
+ export declare function kindText(status: EntryStatus | undefined): string;
31
+ /** The state as plain words, for names and type-ahead. */
32
+ export declare function stateText(state: EntryState | null): string;
33
+ /** The state's word on its colour, then the words after it as text. */
34
+ export declare function StateWords({ state }: {
35
+ state: EntryState | null;
36
+ }): import("react").JSX.Element | null;