canopycms 0.1.0 → 0.2.0-int.121

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 (136) hide show
  1. package/CHANGELOG.md +202 -43
  2. package/dist/api/assets.d.ts +27 -7
  3. package/dist/api/assets.js +118 -47
  4. package/dist/api/client.d.ts +5 -3
  5. package/dist/api/client.js +7 -3
  6. package/dist/api/index.d.ts +1 -1
  7. package/dist/assets/asset-prefixes.d.ts +4 -1
  8. package/dist/assets/asset-prefixes.js +3 -1
  9. package/dist/assets/editor-thumbnail-widths.d.ts +11 -0
  10. package/dist/assets/editor-thumbnail-widths.js +7 -0
  11. package/dist/assets/finalize.d.ts +7 -6
  12. package/dist/assets/finalize.js +29 -10
  13. package/dist/assets/keys.d.ts +4 -1
  14. package/dist/assets/keys.js +4 -1
  15. package/dist/assets/materialize.d.ts +17 -2
  16. package/dist/assets/materialize.js +57 -4
  17. package/dist/assets/store-local.d.ts +18 -9
  18. package/dist/assets/store-local.js +58 -26
  19. package/dist/assets/store-s3.d.ts +25 -6
  20. package/dist/assets/store-s3.js +81 -19
  21. package/dist/assets/types.d.ts +33 -4
  22. package/dist/cli/cli.js +151 -56
  23. package/dist/config/types.d.ts +3 -2
  24. package/dist/editor/BranchManager.js +2 -1
  25. package/dist/editor/CommentsPanel.js +67 -29
  26. package/dist/editor/Editor.d.ts +3 -0
  27. package/dist/editor/Editor.js +93 -39
  28. package/dist/editor/EntryNavigator.d.ts +17 -5
  29. package/dist/editor/EntryNavigator.js +66 -31
  30. package/dist/editor/FormHeader.d.ts +2 -1
  31. package/dist/editor/FormHeader.js +9 -5
  32. package/dist/editor/FormRenderer.d.ts +7 -2
  33. package/dist/editor/FormRenderer.js +51 -16
  34. package/dist/editor/PreviewFrame.d.ts +13 -2
  35. package/dist/editor/PreviewFrame.js +62 -5
  36. package/dist/editor/PreviewPane.d.ts +17 -1
  37. package/dist/editor/PreviewPane.js +55 -8
  38. package/dist/editor/PreviewToolbarTools.d.ts +8 -0
  39. package/dist/editor/PreviewToolbarTools.js +9 -1
  40. package/dist/editor/branch-status.d.ts +6 -0
  41. package/dist/editor/branch-status.js +10 -0
  42. package/dist/editor/comments/BranchComments.d.ts +2 -4
  43. package/dist/editor/comments/BranchComments.js +7 -11
  44. package/dist/editor/comments/ThreadCarousel.d.ts +2 -8
  45. package/dist/editor/comments/ThreadCarousel.js +4 -49
  46. package/dist/editor/comments/ThreadReplyControls.js +5 -2
  47. package/dist/editor/components/BranchLockBanner.d.ts +8 -7
  48. package/dist/editor/components/BranchLockBanner.js +30 -3
  49. package/dist/editor/components/BranchPill.d.ts +5 -4
  50. package/dist/editor/components/BranchPill.js +6 -8
  51. package/dist/editor/components/BranchRowLock.d.ts +12 -0
  52. package/dist/editor/components/BranchRowLock.js +19 -0
  53. package/dist/editor/components/BranchesDrawer.js +3 -3
  54. package/dist/editor/components/EditorHeader.d.ts +2 -6
  55. package/dist/editor/components/EditorHeader.js +14 -28
  56. package/dist/editor/components/EditorRail.d.ts +3 -4
  57. package/dist/editor/components/EditorRail.js +3 -4
  58. package/dist/editor/components/EntryBreadcrumb.d.ts +9 -10
  59. package/dist/editor/components/EntryBreadcrumb.js +8 -11
  60. package/dist/editor/components/PreviewLinkToast.d.ts +5 -0
  61. package/dist/editor/components/PreviewLinkToast.js +33 -0
  62. package/dist/editor/components/QuickOpenPalette.d.ts +7 -1
  63. package/dist/editor/components/QuickOpenPalette.js +6 -1
  64. package/dist/editor/components/RenameEntryModal.d.ts +6 -1
  65. package/dist/editor/components/RenameEntryModal.js +20 -5
  66. package/dist/editor/components/SaveSplitButton.d.ts +3 -2
  67. package/dist/editor/components/SaveSplitButton.js +25 -12
  68. package/dist/editor/components/StagedChangesDrawer.d.ts +0 -1
  69. package/dist/editor/components/StagedChangesDrawer.js +5 -4
  70. package/dist/editor/components/UndoToastMessage.d.ts +6 -5
  71. package/dist/editor/components/UndoToastMessage.js +6 -4
  72. package/dist/editor/components/UnsavedMark.d.ts +9 -0
  73. package/dist/editor/components/UnsavedMark.js +20 -0
  74. package/dist/editor/components/UserBadge.js +13 -11
  75. package/dist/editor/copy.d.ts +4 -0
  76. package/dist/editor/copy.js +4 -0
  77. package/dist/editor/editor-utils.d.ts +49 -9
  78. package/dist/editor/editor-utils.js +117 -16
  79. package/dist/editor/entry-search.d.ts +4 -2
  80. package/dist/editor/entry-search.js +2 -3
  81. package/dist/editor/fields/FieldLabel.d.ts +1 -1
  82. package/dist/editor/fields/FieldLabel.js +1 -1
  83. package/dist/editor/fields/ImageField.d.ts +1 -1
  84. package/dist/editor/fields/ImageField.js +36 -27
  85. package/dist/editor/fields/ObjectField.d.ts +13 -2
  86. package/dist/editor/fields/ObjectField.js +38 -9
  87. package/dist/editor/fields/entry-link/EntryLinkContext.d.ts +2 -0
  88. package/dist/editor/fields/entry-link/InsertEntryLink.js +3 -1
  89. package/dist/editor/group-manager/index.js +1 -1
  90. package/dist/editor/hooks/useBranchManager.d.ts +2 -0
  91. package/dist/editor/hooks/useBranchManager.js +1 -0
  92. package/dist/editor/hooks/useEditorLayout.d.ts +4 -0
  93. package/dist/editor/hooks/useEditorLayout.js +5 -0
  94. package/dist/editor/hooks/useEntryManager.d.ts +2 -0
  95. package/dist/editor/hooks/useEntryManager.js +10 -8
  96. package/dist/editor/media/AssetCard.d.ts +6 -3
  97. package/dist/editor/media/AssetCard.js +24 -9
  98. package/dist/editor/media/AssetListRow.d.ts +9 -4
  99. package/dist/editor/media/AssetListRow.js +18 -9
  100. package/dist/editor/media/CropStep.d.ts +8 -10
  101. package/dist/editor/media/CropStep.js +39 -27
  102. package/dist/editor/media/MediaLibrary.js +5 -4
  103. package/dist/editor/media/MediaLibraryBody.d.ts +1 -1
  104. package/dist/editor/media/MediaLibraryBody.js +65 -37
  105. package/dist/editor/media/crop-availability.d.ts +6 -0
  106. package/dist/editor/media/crop-availability.js +19 -0
  107. package/dist/editor/media/crop-math.d.ts +19 -13
  108. package/dist/editor/media/crop-math.js +50 -11
  109. package/dist/editor/media/useAssetLibrary.d.ts +6 -3
  110. package/dist/editor/media/useAssetLibrary.js +17 -10
  111. package/dist/editor/pane-header.d.ts +6 -0
  112. package/dist/editor/pane-header.js +6 -0
  113. package/dist/editor/permission-manager/index.js +1 -1
  114. package/dist/editor/preview-bridge.d.ts +23 -0
  115. package/dist/editor/preview-bridge.js +105 -4
  116. package/dist/editor/preview-path.d.ts +16 -4
  117. package/dist/editor/preview-path.js +80 -19
  118. package/dist/editor/shell/ActivityRail.d.ts +1 -3
  119. package/dist/editor/shell/ActivityRail.js +3 -3
  120. package/dist/editor/shell/EditorShell.d.ts +15 -0
  121. package/dist/editor/shell/EditorShell.js +17 -1
  122. package/dist/editor/shell/OverlayHeader.d.ts +19 -0
  123. package/dist/editor/shell/OverlayHeader.js +15 -0
  124. package/dist/editor/shell/PaneLayout.d.ts +6 -1
  125. package/dist/editor/shell/PaneLayout.js +68 -13
  126. package/dist/editor/shell/SidePanelHost.d.ts +8 -6
  127. package/dist/editor/shell/SidePanelHost.js +70 -33
  128. package/dist/editor/shell/TopBar.js +2 -1
  129. package/dist/editor/theme.d.ts +1 -0
  130. package/dist/editor/theme.js +19 -1
  131. package/dist/editor/undo-removal.d.ts +19 -10
  132. package/dist/editor/undo-removal.js +44 -16
  133. package/dist/server.d.ts +2 -0
  134. package/dist/version.d.ts +1 -1
  135. package/dist/version.js +1 -1
  136. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -5,9 +5,18 @@ packages release together, at one version.
5
5
 
6
6
  ## This build
7
7
 
8
- Version `0.1.0`, built from [`39a755c`](https://github.com/safeinsights/canopycms/tree/39a755c116a52b6d16e0b09e9dde03c67a081754).
8
+ Version `0.2.0-int.121`, built from [`0a53107`](https://github.com/safeinsights/canopycms/tree/0a53107eda329ce0499edad3544a16fb130b5beb).
9
9
 
10
- Its entries are [0.1.0](#010), under **Released**.
10
+ ### New since int.119
11
+
12
+ - [Media-library thumbnails are stored at upload and cached by the browser — behaviour change](#media-library-thumbnails-are-stored-at-upload-and-cached-by-the-browser--behaviour-change)
13
+ - [Image fields are bordered cards, and Crop explains itself and works without aspect](#image-fields-are-bordered-cards-and-crop-explains-itself-and-works-without-aspect)
14
+ - [A locked branch shows a lock where a row's "…" menu would be](#a-locked-branch-shows-a-lock-where-a-rows--menu-would-be)
15
+ - [Links clicked in the preview open their entry instead of leaving the editor — behaviour change](#links-clicked-in-the-preview-open-their-entry-instead-of-leaving-the-editor--behaviour-change)
16
+
17
+ ### Revised since int.119
18
+
19
+ - [Removing a file from the media library hides it, and an admin can restore it — breaking (assets.delete, AssetStore) / behaviour change; template first](#removing-a-file-from-the-media-library-hides-it-and-an-admin-can-restore-it--breaking-assetsdelete-assetstore--behaviour-change-template-first)
11
20
 
12
21
  If you upgraded from a build on another branch, compare the `<!-- changeset: … -->` slugs in your previous build's `CHANGELOG.md` (`npm pack canopycms@<old>` fetches it) with this one's: entries whose slug your old file lacks are new to you.
13
22
 
@@ -24,7 +33,7 @@ Each entry has up to three parts:
24
33
  `node_modules/canopycms/CHANGELOG.md`, assembled for that build: its **This build** section lists
25
34
  what is new since the previous int on the same branch, or on a stable release links its entries, and its links point at the commit the build
26
35
  came from. The copy in the repository holds released history and the entries from before changesets;
27
- every entry written since is a file in [`.changeset/`](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/.changeset/README.md) until a stable release
36
+ every entry written since is a file in [`.changeset/`](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/.changeset/README.md) until a stable release
28
37
  moves it here.
29
38
 
30
39
  **Find your starting point.** From a stable pin, start at the first version under **Released**
@@ -46,13 +55,163 @@ entry replaces an earlier one's advice, the earlier one points to it.
46
55
 
47
56
  **int** is the first int prerelease carrying an entry, and each part of the entry is labelled
48
57
  `(int.N)` the same way; a number in parentheses after a change is a later int that added a part.
49
- **Action** says who must act; **Template first** means that with `workerCode: { source: 'parameter' }`,
50
- you deploy the stack template before CI rolls that int's bundle.
58
+ **Action** says who must act. **Template first** means the int's CMS image or worker bundle needs
59
+ something only the stack template adds (a grant, an environment variable, a resource or a unit
60
+ setting): deploy the template, and any grant you write yourself for a bucket you bring, before CI
61
+ rolls that int's image or, with `workerCode: { source: 'parameter' }`, its bundle. The
62
+ worker-contract gate checks only the bundle, so for the image this label is the only signal. With
63
+ the default `workerCode` and an image the stack builds, one `cdk deploy` moves all three
64
+ together; an image or bundle that CI sets as a parameter keeps its value through `cdk deploy`.
51
65
 
52
66
  Nothing in this section is edited by hand: each entry is a `.changeset/` file, which a build
53
67
  assembles here and labels with the first int that carries it, and a stable release moves the
54
68
  entries under **Released**.
55
69
 
70
+ | int | Area | Change | Action |
71
+ | --- | --- | --- | --- |
72
+ | 119 | Assets | [Library removal hides the file; deploy grants before the image](#removing-a-file-from-the-media-library-hides-it-and-an-admin-can-restore-it--breaking-assetsdelete-assetstore--behaviour-change-template-first) | Template first |
73
+ | 119 | Editing | [Content panel docks when stacked; overlay slides; matched dividers](#stacked-layout-docks-the-content-panel-beside-the-form) | None |
74
+ | 119 | Editing | [Editor opens the home page; singletons named by type](#the-editor-opens-the-home-page-and-names-single-entry-types-by-their-type--behaviour-change) | None |
75
+ | 119 | Editing | [Drawers share the content panel's compact header](#compact-drawer-headers-jumpable-comment-headings-and-a-steadier-owner-chip) | None |
76
+ | 119 | Editing | [Object Clear in a "…" menu; Undo stays inline](#an-objects-clear-moves-into-its--menu-with-an-inline-undo) | Editor UI tests |
77
+ | 119 | Editing | [Top bar: one unsaved dot, no "Editing" label](#the-top-bar-shows-one-unsaved-mark-and-a-status-only-when-it-matters--behaviour-change) | None |
78
+ | 119 | Preview | [createPreviewPage takes a layout for the site header and footer](#previews-can-show-the-site-header-and-footer-and-the-preview-stays-put-between-entries) | Optional |
79
+ | 121 | Assets | [Editor thumbnails stored at upload; raw-route redirects cacheable](#media-library-thumbnails-are-stored-at-upload-and-cached-by-the-browser--behaviour-change) | None |
80
+ | 121 | Editing | [Image field card; Crop disabled with reason; free-form crop](#image-fields-are-bordered-cards-and-crop-explains-itself-and-works-without-aspect) | None |
81
+ | 121 | Editing | [Locked branch: tree rows show a lock](#a-locked-branch-shows-a-lock-where-a-rows--menu-would-be) | None |
82
+ | 121 | Preview | [Preview links open their entry; others open a new tab](#links-clicked-in-the-preview-open-their-entry-instead-of-leaving-the-editor--behaviour-change) | None |
83
+
84
+ ### Removing a file from the media library hides it, and an admin can restore it — **breaking (assets.delete, AssetStore) / behaviour change; template first**
85
+
86
+ <!-- changeset: ef-g-media -->
87
+
88
+ _First in int.119._
89
+
90
+ **What changed.** "Remove from library" no longer deletes the file's metadata, so every image
91
+ size and crop keeps working wherever the file is used, including `materialize-assets`. It writes
92
+ a marker under the new `asset-hidden/` prefix instead. Admins can turn on "Show removed files" in
93
+ the media library and restore a file, and uploading the same file again restores it too.
94
+
95
+ **To adopt.**
96
+
97
+ - `assets.delete` and `DELETE /assets` are removed (`DELETE /assets` answers 410); use
98
+ `assets.hide` / `POST /assets/hide` and `assets.restore` / `POST /assets/restore`.
99
+ - A custom `AssetStore` drops `deleteMeta` and must implement `hideAsset` and `unhideAsset`; a
100
+ custom `AssetPrefixes` must set `hidden`.
101
+ - `AssetSupport.grantUploadAccess()` and `CanopyCmsService`'s `assetBucket` grant `s3:PutObject`
102
+ and `s3:DeleteObject` on `asset-hidden/*` and no longer grant delete on `asset-meta/*`. If you
103
+ write the CMS role's bucket policy yourself, do the same (no `s3:GetObject` is needed), and if
104
+ it scopes `s3:ListBucket` by prefix, include `asset-hidden/`.
105
+ - Deploy those grants before CI rolls this release's CMS image: the stack template, built with
106
+ this release's `canopycms-cdk`, and your own bucket policy if you write one. On the old grants,
107
+ removing a file is denied, and a policy that scopes `s3:ListBucket` by prefix without
108
+ `asset-hidden/` fails every media library page. Between the deploy and the image roll,
109
+ removing a file is denied too.
110
+ - Files removed before this release lost their metadata. Uploading the same bytes again recreates
111
+ it, recorded under the re-uploader's name.
112
+
113
+ ### Stacked layout docks the content panel beside the form
114
+
115
+ <!-- changeset: ef-a-shell -->
116
+
117
+ _First in int.119._
118
+
119
+ **What changed.** In a wide window the content panel docks beside the form row in the stacked layout too, keeping the preview full width; in a narrow window it slides in over the form, unless the user prefers reduced motion. Both pane dividers share one width, and a branch banner has a line beneath it.
120
+
121
+ ### The editor opens the home page and names single-entry types by their type — **behaviour change**
122
+
123
+ <!-- changeset: ef-b-identity -->
124
+
125
+ _First in int.119._
126
+
127
+ **What changed.** With no entry in the URL, the editor opens the entry routed at `/`, else the first with a preview. An entry type limited to one entry (`maxItems: 1`) with a label is named by that label, though entry links and search still use its title. Content tree rows show the type on a second line, quick open shows type and route, "Rename…" is "Change URL…" ("Change slug…" for an entry with no page), and the "All content" crumb, the form header's title and the rail's site button are gone.
128
+
129
+ ### Compact drawer headers, jumpable comment headings and a steadier owner chip
130
+
131
+ <!-- changeset: ef-c-drawers -->
132
+
133
+ _First in int.119._
134
+
135
+ **What changed.** The Branches, Comments, Media and staged-changes drawers take the content panel's compact header with no subtitle. In the Comments drawer, each thread's heading is the one control that jumps to it. The Branches drawer no longer offers "New branch comment" or "+ New", since new branch comments start in the Comments drawer. A person's chip keeps its avatar and a long name on one line.
136
+
137
+ ### An object's Clear moves into its "…" menu, with an inline Undo
138
+
139
+ <!-- changeset: ef-d-clear -->
140
+
141
+ _First in int.119._
142
+
143
+ **What changed.** An optional object's Clear is now an item in a "…" menu on its label row, named
144
+ for the object ("Clear "SEO""). After a clear, the label row offers "Undo clear" in the menu's
145
+ place, with focus on it, until it can no longer put the object back where it was (the object was
146
+ filled in again, or the item holding it moved or went), another entry or branch opens, or the entry
147
+ is saved or its draft discarded. It has no timer, and Clear no longer raises a toast; list item and block removals keep
148
+ theirs. Their Undo, and the inline one, now survive edits to other items in an enclosing list.
149
+
150
+ **To adopt.** A UI test that clicked an object's "Clear" button now opens the object's
151
+ "Actions for …" menu and chooses the "Clear" item, then finds "Undo clear" in the label row instead of a toast.
152
+
153
+ ### The top bar shows one unsaved mark and a status only when it matters — **behaviour change**
154
+
155
+ <!-- changeset: ef-f-topbar -->
156
+
157
+ _First in int.119._
158
+
159
+ **What changed.** The branch pill's unsaved count is the same dot as the entry's, with a number, in the brand colour the content tree also uses. "Unsaved · kept on this device" moved into Save's tooltip and description; the bar shows it only as a warning when drafts could not be stored. The pill drops the default "Editing" status and shows In review, Approved, Archived or Protected. The "Read-only" chip no longer repeats a branch-wide lock the banner already explains; it stays for an entry read-only for its own reason.
160
+
161
+ ### Previews can show the site header and footer, and the preview stays put between entries
162
+
163
+ <!-- changeset: ef-e-preview -->
164
+
165
+ _First in int.119._
166
+
167
+ **What changed.** `createPreviewPage` takes an optional `layout`, a server component that wraps every view and receives `{ children, chrome }`. Given one, the preview toolbar offers a "Show site header and footer" toggle, remembered per device, which adds `?chrome=1` to the preview's URL and sets `chrome`. Without the toggle on, `chrome` is `false`. A page that never connects with them, such as one whose layout throws, is shown without them, and the toggle says so. Switching entries keeps the preview pane and its toolbar in place: the last page stays, dimmed, until the next entry's data arrives.
168
+
169
+ **To adopt.** Pass the component your public pages use for their header and footer:
170
+
171
+ ```tsx
172
+ export default createPreviewPage({
173
+ layout: ({ children, chrome }) =>
174
+ chrome ? <SiteChrome>{children}</SiteChrome> : <main>{children}</main>,
175
+ views: { post: PostPreview },
176
+ })
177
+ ```
178
+
179
+ A preview page built on `useCanopyPreview` alone can pass `siteChrome: true` when it renders the header and footer for `?chrome=1`.
180
+
181
+ ### Media-library thumbnails are stored at upload and cached by the browser — **behaviour change**
182
+
183
+ <!-- changeset: editor-thumbnails-cached -->
184
+
185
+ _First in int.121._
186
+
187
+ **What changed.** Finalizing a raster upload also stores the three widths the editor shows it at (`assets/t/w=80`, `w=160`, `w=320`), so the media library's first view reads stored objects instead of transforming in the request. Uploading a file that already exists stores any of those widths it lacks. Animated images are skipped, since re-encoding every frame would hold the upload too long; their first view transforms them as before. This adds roughly 0.1 s to a typical photo's upload and up to about 0.6 s for a 24-megapixel PNG, measured locally; a failure is logged and never fails the upload. On S3, the authenticated asset route's redirect to a presigned URL is now `private, max-age` until the end of the hour rather than `no-store`, and the URL stays the same for that hour, so reopening the media library fetches no thumbnails. A cached redirect can outlive a sign-out by at most that hour; it points only at a public-prefix object under an unguessable key.
188
+
189
+ ### Image fields are bordered cards, and Crop explains itself and works without `aspect`
190
+
191
+ <!-- changeset: image-field-cards -->
192
+
193
+ _First in int.121._
194
+
195
+ **What changed.** An image field is now a bordered card: the label row holds Replace, Crop and Remove, so each action sits with its image, and the thumbnail and alt text sit inside. Crop stays visible when it can't apply and says why on hover, focus and touch: a file outside the media library, or an SVG. A read-only form omits it. A field without `aspect` no longer hides Crop: a pick isn't cropped, and Crop afterwards is a free-form rectangle of any shape. A field with `aspect` still crops on pick, locked to that shape; a picked SVG now commits without a crop step. Applying a crop that covers the whole frame stores no crop, which is also how to take one off. The crop step uses `react-image-crop` (ISC) in place of `react-easy-crop`, so it has no zoom slider: resize the box instead. A field's label row now wraps its actions under the label on a narrow form, instead of squeezing the label. The stored `crop` and `width`/`height` are unchanged.
196
+
197
+ **To adopt.** Nothing. `canopycms/client` now imports `react-image-crop`'s stylesheet through the editor theme, so a bundler that handles the Mantine stylesheets handles it too.
198
+
199
+ ### A locked branch shows a lock where a row's "…" menu would be
200
+
201
+ <!-- changeset: locked-row-lock -->
202
+
203
+ _First in int.121._
204
+
205
+ **What changed.** On a protected, in-review or approved branch the content tree no longer drops a row's "…" menu without a trace. Each row that would have had a menu shows a lock of the same size, and its tooltip gives the branch's reason ("This branch is in review. Withdraw it to make changes."), on hover, keyboard focus and touch. An entry a path rule locks keeps its own lock beside its title and gets none in the menu slot.
206
+
207
+ ### Links clicked in the preview open their entry instead of leaving the editor — **behaviour change**
208
+
209
+ <!-- changeset: preview-links-stay-in-editor -->
210
+
211
+ _First in int.121._
212
+
213
+ **What changed.** A plain click on a link in the editor's preview no longer navigates the frame off its preview route to a public page, which could refuse to be framed. A link to another page of the site opens that page's entry in the editor, keeping the draft of the one left, and focus follows into its page. A page no entry has, such as a listing, opens in a new tab, and a note naming it says so; a link to another site opens in a new tab. Cmd/Ctrl/Shift/Alt and middle clicks, links with `download` or a `target` other than `_self`, links to the same page and `mailto:`/`tel:` links behave as they do outside the editor. A click that follows a link no longer also focuses the field it sits in, except while fields are highlighted, when a click on a marked link picks its field instead. The preview takes over links only once the editor has connected, so a public page embedded elsewhere keeps its links. Pages using `useCanopyPreview` or `withCanopyPreview` get this with no change.
214
+
56
215
  ---
57
216
 
58
217
  ## Released
@@ -108,7 +267,7 @@ URL.
108
267
  2. For a branch preview: wrap views with `withCanopyPreview` in a `'use client'` module, add
109
268
  `app/preview/[[...path]]/page.server.tsx`, set `editor.previewPrefix: '/preview'`, and serve that
110
269
  route with `frame-ancestors 'self'`, not `X-Frame-Options: DENY` (see
111
- [Live Preview](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#live-preview)).
270
+ [Live Preview](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#live-preview)).
112
271
  3. A test reading view content from the route's server HTML must load the page in a browser.
113
272
  Server output rendered during a preview request carries the signed-in asset prefix; keep it out
114
273
  of cross-request caches (`unstable_cache`, module memos).
@@ -123,7 +282,7 @@ kept site styles ahead of Mantine's in the preview.
123
282
  server components. A string path marks the form's spelling (`'a.0.b'` marks `a[0].b`), and an empty
124
283
  path marks nothing. The editor counts and logs marks naming no field. `createEntrySchemaRegistry`
125
284
  refuses a field name that is empty, all digits or contains `.`, `[` or `]`. See
126
- [Live Preview](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#live-preview).
285
+ [Live Preview](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#live-preview).
127
286
 
128
287
  **To adopt.** Fix each path that stops compiling; the error lists valid ones. Rewrite computed paths
129
288
  as literal segments, or type that component's prop as plain `FieldProps`. Pass `fieldProps` as
@@ -205,7 +364,7 @@ or a failed render) renders as its plain text, with no URL; any other form of th
205
364
  fields are nested or renamed, pass the AI config's `seo` the same object you pass
206
365
  `createNextCanopyContext({ seo })`, so the sitemap and AI content read the flag from the same
207
366
  place. A field that links to a hidden section by plain URL needs a field transform; the README
208
- shows [the recipe](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#ai-content-configuration).
367
+ shows [the recipe](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#ai-content-configuration).
209
368
 
210
369
  **Now deletable.** An `exclude.where` that re-read the `noindex` flag by hand.
211
370
 
@@ -227,7 +386,7 @@ A `markdown` field with `renderAs: 'mdx'` is checked as MDX, and `mdxAllow` narr
227
386
  field or site-wide. New: field options `renderAs`, `mdxAllow`; config key `mdxAllow`; type
228
387
  `MdxAllowlist`. (int.110) A component prop allowance can be `'string'` (or
229
388
  `{ type: 'string', maxLength }`): a quoted value only, never bare or `{…}`. See
230
- [MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#mdx-content-cannot-run-code).
389
+ [MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#mdx-content-cannot-run-code).
231
390
 
232
391
  **To adopt.** Set `renderAs: 'mdx'` on each `markdown` field your site compiles as MDX, and
233
392
  `mdxAllow` to what your renderer takes. Set `executable: true` only on a field whose editors you
@@ -364,7 +523,7 @@ a format check.
364
523
 
365
524
  - (int.93) Submit commits gain an `Edited-by: Name (id)` trailer; PR bodies gain a section that
366
525
  re-submits replace, keeping human text. Options: `gitEditedByTrailers`, `gitCoAuthoredByTrailers`
367
- ([reference](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#definecanopyconfig-options)).
526
+ ([reference](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#definecanopyconfig-options)).
368
527
  - (int.110) Submit-commit trailers name every user who saved since the last submit commit, and
369
528
  the PR-body section every user who edited the branch, not only the submitter; settings commits
370
529
  (permissions, groups) carry the acting user's trailer.
@@ -388,7 +547,7 @@ saves only push the branch, and no failing PR task lands in System health.
388
547
  that entry type goes unavailable: the editor says so, and its entries answer 503 with
389
548
  `code: 'SCHEMA_UNAVAILABLE'`. Builds, static deploys and `generate-ai-content` still fail. The
390
549
  worker holds the base branch for up to 30 minutes while that lasts; see
391
- [New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#new-schemas-wait-for-the-editor-deploy).
550
+ [New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#new-schemas-wait-for-the-editor-deploy).
392
551
  Public types gain optional `unavailable` on `EntryTypeConfig` and `FlatSchemaItem`, optional
393
552
  `ApiResponse.code`, and a required `SchemaResolutionResult.issues`.
394
553
 
@@ -426,7 +585,7 @@ hang until the drain heartbeat lets termination continue. Its in-flight task is
426
585
  new stack needs no steps.
427
586
 
428
587
  **What changed.** (int.109) Detailed in
429
- [The worker instance](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#the-worker-instance): IMDSv2 with a hop limit of 1; the
588
+ [The worker instance](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#the-worker-instance): IMDSv2 with a hop limit of 1; the
430
589
  bundle is one file whose sha256 user data checks, readable as that one object; a file-system policy
431
590
  refusing clients without TLS or IAM, replacing the worker's
432
591
  `AmazonElasticFileSystemClientReadWriteAccess`; an encrypted gp3 root volume; a boot-time upgrade to
@@ -480,10 +639,10 @@ failure and exits non-zero on `selfStopped`, with a code outside `RestartPrevent
480
639
  with its hash, as `worker/dist/index.js` and `index.js.sha256`. The default, `'asset'`, is
481
640
  unchanged.
482
641
  - `CanopyCmsService` alarms when the worker logs no git sync for 30 minutes. See
483
- [Worker-down alarm](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#worker-down-alarm).
642
+ [Worker-down alarm](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#worker-down-alarm).
484
643
 
485
644
  **To adopt.** Optional. For parameter-only change sets, see
486
- [Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#rolling-the-worker-from-ci). For the alarm, pass
645
+ [Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#rolling-the-worker-from-ci). For the alarm, pass
487
646
  `alarmTopic`.
488
647
 
489
648
  **Now deletable.** A manual `cdk deploy` after each canopycms bump whose only purpose is moving the
@@ -494,7 +653,7 @@ worker, and a hand-built alarm on the worker log group.
494
653
  **What changed.** (int.112) The boot's `dnf upgrade` could be OOM-killed on every retry. A 1 GiB
495
654
  swap file now goes on first; an upgrade that still fails starts the worker unpatched and notifies
496
655
  `alarmTopic` if set; a retried step names itself when it gives up. See
497
- [The worker instance](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#the-worker-instance).
656
+ [The worker instance](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#the-worker-instance).
498
657
 
499
658
  **To adopt.** Deploy, which replaces the worker instance. The bundle needs none of this, so it is
500
659
  not Template first and the worker contract stays at 1.
@@ -560,7 +719,7 @@ and operations may reuse GitHub fetches under 30 seconds old.
560
719
 
561
720
  **To adopt.** Nothing. Seeding `remote.git` stages a copy of the repository beside the gateway's
562
721
  mirror, so the root volume needs room for two
563
- ([details](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#the-worker-instance)).
722
+ ([details](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#the-worker-instance)).
564
723
 
565
724
  #### The worker follows a rebased or deleted GitHub branch
566
725
 
@@ -582,7 +741,7 @@ changes the template too (the fallback bundle's key and hash), so only the contr
582
741
  bundle-only roll is safe.
583
742
 
584
743
  **To adopt.** Parameter mode: gate bundle-only rolls on the contract
585
- ([recipe](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#rolling-the-worker-from-ci)). The gate refuses a stack without the
744
+ ([recipe](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#rolling-the-worker-from-ci)). The gate refuses a stack without the
586
745
  `WorkerContract` output, so `cdk deploy` the template once, which adds it. A hand-installed unit
587
746
  copies its `Environment=CANOPYCMS_WORKER_CONTRACT=` line from `worker/canopy-worker.service`.
588
747
 
@@ -599,8 +758,8 @@ units from the bundle's contract: 2 gets the split, an older bundle the single u
599
758
  template, then roll the bundle; on an older template it stops with `template too old for this
600
759
  bundle`. Inspect EFS only through `sudo /opt/canopy-worker/canopy-inspect <command>`, never from a root shell. A hand install
601
760
  takes `worker/`'s three units and `gateway.env.example`
602
- ([steps](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#installing-the-units-by-hand)). After the first deploy, run the
603
- [checklist](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#first-deploy-checklist).
761
+ ([steps](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#installing-the-units-by-hand)). After the first deploy, run the
762
+ [checklist](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#first-deploy-checklist).
604
763
 
605
764
  #### `canopycms-cdk`: `CanopyCmsService.attachTo`, and editor response headers — **behaviour change if you frame the CMS**
606
765
 
@@ -611,7 +770,7 @@ response headers policy. `CanopyCmsDistribution` sends the same headers: `frame-
611
770
  `X-Frame-Options: SAMEORIGIN`, `nosniff`, HSTS and `X-Robots-Tag: noindex`. Unless your app sends
612
771
  its own framing headers, no other origin can frame the editor or any page the CMS domain serves. Every such page is
613
772
  marked `noindex`. The editor's default preview is same-origin and unaffected. See
614
- [Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#serving-the-editor-from-a-distribution-you-already-own).
773
+ [Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#serving-the-editor-from-a-distribution-you-already-own).
615
774
 
616
775
  **To adopt.** If you wired the Function URL into your own distribution by hand, delete those
617
776
  behaviors and call `attachTo`, passing your CMS build's `assetPrefix` as `editorAssetPrefix` and a
@@ -787,7 +946,7 @@ one the exclusions leave out. A throw or any other return is logged and treated
787
946
  **To adopt.** If your site's routes, sitemap or bylines decide that some entries have no page,
788
947
  apply the same rule here, for example `referenceLink: (target, { body }) =>
789
948
  !body?.trim() ? false : undefined` in `defineAIContentConfig` from `canopycms/ai`. See
790
- [AI Content Configuration](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#ai-content-configuration).
949
+ [AI Content Configuration](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#ai-content-configuration).
791
950
 
792
951
  **Now deletable.** A `fieldTransforms` entry that re-renders a reference field only to drop or
793
952
  change its link.
@@ -862,7 +1021,7 @@ _First in int.115._
862
1021
  entry the base branch also changed, the "updated on the base branch" notice and the branch's
863
1022
  conflict count now stay until the branch merges, so a reviewer still sees which entries replaced a
864
1023
  base change. They used to clear on the next sync, about five minutes later. README's new [Drafts
865
- and Unpublishing](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#drafts-and-unpublishing) section covers long-lived branches and
1024
+ and Unpublishing](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#drafts-and-unpublishing) section covers long-lived branches and
866
1025
  unpublishing.
867
1026
 
868
1027
  #### The editor calls the content drawer "All content"
@@ -1174,7 +1333,7 @@ editor carries an unsaved draft of a stamped entry onto its stamped version.
1174
1333
  The flag is refused off a top-level `datetime`, on `list: true`, and with `required: true`.
1175
1334
 
1176
1335
  **To adopt.** Add `stampOnPublish: true` to the date field your site sorts or labels by, such as
1177
- `{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#stamping-a-publication-date).
1336
+ `{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#stamping-a-publication-date).
1178
1337
 
1179
1338
  **Now deletable.** A build step or hook that writes a missing publication date into new entries.
1180
1339
 
@@ -1221,7 +1380,7 @@ preview/form divider is now keyboard-resizable within the same 15–85% the spli
1221
1380
  stored at, and `react-split-pane` is no longer a dependency.
1222
1381
  `EditorPanes`, `EditorPanesProps`, the `PaneLayout` type and the `SPLIT_PERCENT_*` and `DEFAULT_*_SPLIT_PERCENT` constants are
1223
1382
  no longer exported from `canopycms/client`. See
1224
- [Your root layout](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#editor-customization).
1383
+ [Your root layout](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#editor-customization).
1225
1384
 
1226
1385
  **To adopt.** Nothing, unless you import `EditorPanes` or those constants: render `CanopyEditor`
1227
1386
  instead, which lays out its own panes. Hiding your site chrome on the editor route is now
@@ -1332,7 +1491,7 @@ never ended. `canopycms-auth-clerk` skips it while the editor is mounted, and ex
1332
1491
  **To adopt.** Nothing for the editor, if your edit page uses `useClerkAuthConfig()` or
1333
1492
  `ClerkSignIn`. If your CMS build renders `<SignIn>`, `UserButton` or `OrganizationSwitcher` on your
1334
1493
  own pages, mount the hook as in
1335
- [Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/packages/canopycms-auth-clerk/README.md#clerk-components-on-your-own-pages).
1494
+ [Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/packages/canopycms-auth-clerk/README.md#clerk-components-on-your-own-pages).
1336
1495
  Your own Server Actions in the CMS build still 403 behind OAC.
1337
1496
 
1338
1497
  **Now deletable.** Any local patch of `window.__internal_onBeforeSetActive` (or 6.x's
@@ -1373,12 +1532,12 @@ fast naming the ARN, the field and the keys present, never a value.
1373
1532
  **To adopt.** Nothing, unless one of those secrets holds a JSON document: then set the matching
1374
1533
  prop. The scaffolded stack fills them from the repository _variables_
1375
1534
  `CANOPY_GITHUB_TOKEN_SECRET_JSON_FIELD` and `CLERK_SECRET_KEY_SECRET_JSON_FIELD`
1376
- ([why the prefix](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#repository-secrets-and-variables)); a stack scaffolded earlier
1535
+ ([why the prefix](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#repository-secrets-and-variables)); a stack scaffolded earlier
1377
1536
  adds the props to `infrastructure/bin/app.ts` and `infrastructure/lib/cms-stack.ts` and the two `env`
1378
1537
  lines to `.github/workflows/deploy-cms.yml`, or re-runs the generator and diffs. `cdk synth` refuses a `…JsonField` prop without its `…SecretArn`, and an ARN carrying the ECS `:KEY::` suffix
1379
1538
  (also in `secretsArns`). Don't use CDK's `secretValueFromJson`: it resolves the plaintext into the deployed
1380
1539
  resource's configuration, readable by anyone who can describe it. Only `CLERK_SECRET_KEY` goes through Secrets Manager; `CLERK_JWT_KEY` and the publishable
1381
- key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#security-model)).
1540
+ key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#security-model)).
1382
1541
 
1383
1542
  **Now deletable.** A wrapper that fetches the secret, parses it and re-exports one field into the
1384
1543
  worker's environment, such as a `jq` step in user data or a wrapper entrypoint around
@@ -1390,7 +1549,7 @@ worker's environment, such as a `jq` step in user data or a wrapper entrypoint a
1390
1549
  `githubToken` is not deprecated and stays the documented default; `canopycms` neither depends on
1391
1550
  nor imports `@octokit/auth-app`. Register one App per site, not one shared across repositories:
1392
1551
  anyone holding an App's key can mint a token for any of its installations
1393
- ([why](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/ARCHITECTURE.md#why-one-github-app-per-site-not-one-shared-across-an-organisation)).
1552
+ ([why](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/ARCHITECTURE.md#why-one-github-app-per-site-not-one-shared-across-an-organisation)).
1394
1553
 
1395
1554
  **To adopt with `canopycms-cdk`** (existing stacks need no edit). `CanopyCmsServiceProps` takes
1396
1555
  `githubAppId`, `githubAppInstallationId`, `githubAppPrivateKeySecretArn` and
@@ -1403,7 +1562,7 @@ anyone holding an App's key can mint a token for any of its installations
1403
1562
  `verify` checks an existing installation's permissions: run it, since an App missing a
1404
1563
  permission only shows up later, as `sync-failed`. `create` needs an interactive terminal and
1405
1564
  never edits an existing JSON secret (create one and point the JSON-field prop at it)
1406
- ([details](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#register-it-with-canopycms-init-github-app)).
1565
+ ([details](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#register-it-with-canopycms-init-github-app)).
1407
1566
  2. Set the three props and **remove `githubTokenSecretArn`** (with its JSON field). A partial set
1408
1567
  of the three is refused at synth, and so is an App alongside a token.
1409
1568
  3. In the generated workflow, store them as `CANOPY_GITHUB_APP_ID`,
@@ -1414,7 +1573,7 @@ anyone holding an App's key can mint a token for any of its installations
1414
1573
 
1415
1574
  The private key is ARN-only; passing the key itself is refused at synth. Its ARN joins the worker's
1416
1575
  IAM policy automatically, so you need not add it to `secretsArns`. See
1417
- [Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#authenticating-as-a-github-app).
1576
+ [Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#authenticating-as-a-github-app).
1418
1577
 
1419
1578
  ```bash
1420
1579
  canopycms init-github-app create -- \
@@ -1462,7 +1621,7 @@ downloads the `.pem` from the App's settings page.
1462
1621
 
1463
1622
  **What changed.** The worker re-reads a Secrets Manager secret (the GitHub token or the Clerk secret
1464
1623
  key) when the operation using it fails. Timings, costs and the store-before-revoke order are in
1465
- [Rotating a secret](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#rotating-a-secret).
1624
+ [Rotating a secret](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#rotating-a-secret).
1466
1625
 
1467
1626
  **To adopt.** Nothing for credentials from `*_SECRET_ARN`, which is every scaffolded deployment. A
1468
1627
  GitHub App private key is still read only at boot: store the new key, replace the instance, and
@@ -1516,12 +1675,12 @@ also check the bucket policy for its grant.
1516
1675
  5. `withCanopy()` adds sharp's libvips to Next's file tracing (not for a static export) and, on
1517
1676
  Next 16 and later, sets `turbopack: {}` when your config has neither `turbopack` nor your own
1518
1677
  `webpack` and it can read your Next version. A webpack build still fails its image transforms
1519
- ([Dual Build Support](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#dual-build-support)).
1678
+ ([Dual Build Support](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#dual-build-support)).
1520
1679
 
1521
1680
  **Breaking:** a stack setting `platform` on `fromImageAsset` without `architecture` gets an arm64
1522
1681
  function while `platform` still decides the image, so `Platform.LINUX_AMD64` builds an image the
1523
1682
  function cannot run. A stack setting neither moves to arm64 with a matching image, built under QEMU
1524
- on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#where-the-image-is-built)).
1683
+ on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#where-the-image-is-built)).
1525
1684
 
1526
1685
  **To adopt.**
1527
1686
 
@@ -1550,7 +1709,7 @@ reason; `platform` on `fromImageAsset`; and, with `withCanopy()`, a hand-written
1550
1709
 
1551
1710
  **What changed.** `media.uploadUrl` (s3 adapter; an absolute http(s) URL or a site-relative path)
1552
1711
  replaces the `url` that `beginUpload()` returns, leaving the presign's `fields` untouched, so
1553
- uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#media-configuration) for the
1712
+ uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#media-configuration) for the
1554
1713
  CloudFront behavior it expects.
1555
1714
 
1556
1715
  **To adopt.** Optional. Set it from an environment variable: a site-relative value works only where
@@ -1575,7 +1734,7 @@ needs `lazyPublicTransforms: true`) let you pass a deterministically named role,
1575
1734
  bucket's stack computes `arn:aws:iam::<account>:role/<name>` from literals instead of a
1576
1735
  `Fn::GetStackOutput` reference only the CDK CLI resolves. The constructs re-attach
1577
1736
  `AWSLambdaBasicExecutionRole` (and the VPC policy) that `lambda.Function` drops from a role you
1578
- pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#cross-account-asset-bucket).
1737
+ pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#cross-account-asset-bucket).
1579
1738
 
1580
1739
  **To adopt.** Optional:
1581
1740
 
@@ -1685,7 +1844,7 @@ public JWKS PEM, used only to verify signatures.
1685
1844
  to variables (Settings → Secrets and variables → Actions → Variables); `bin/app.ts` refuses the
1686
1845
  deploy at synth while it is unset. Check that `bin/app.ts` passes `CLERK_SECRET_KEY` as
1687
1846
  `clerkSecretKeySecretArn` (read by the worker), never in the Lambda's `environment`, unless you keep
1688
- `clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/docs/deploying-to-aws.md#security-model)).
1847
+ `clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/docs/deploying-to-aws.md#security-model)).
1689
1848
 
1690
1849
  #### `readByUrlPath` answers only where `listEntries` publishes — **breaking (routing)**
1691
1850
 
@@ -1784,7 +1943,7 @@ basePath: process.env.NEXT_PUBLIC_BASE_PATH,
1784
1943
  Then pass `baseUrl` to `assetUrl` only if Next serves `/assets` (local adapter, `next dev`, S3 with
1785
1944
  no distribution): `assetUrl(image, { width: 960, baseUrl: BASE_PATH })`. Assets on CloudFront via
1786
1945
  `AssetSupport` stay at the distribution root; pass no `baseUrl` (mount table under "Where `/assets`
1787
- is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#media-configuration)). Two traps:
1946
+ is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#media-configuration)). Two traps:
1788
1947
 
1789
1948
  - Don't pass a deployment `basePath` to `contentStaticParams({ basePath })`; that option filters by
1790
1949
  a nested route prefix and emits zero params, building green.
@@ -1943,7 +2102,7 @@ Under `exactOptionalPropertyTypes: true`, omit keys instead of assigning `undefi
1943
2102
  `withTrailingSlash` and `isAbsoluteUrl` from `canopycms/server`; `defineSeoFieldGroup()` from
1944
2103
  `canopycms`; `generateContentSitemap` and `entryToMetadata` from `canopycms-next`, bound on
1945
2104
  `createNextCanopyContext`'s result. See
1946
- [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#sitemap-and-seo-metadata). Every routable entry type is in
2105
+ [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#sitemap-and-seo-metadata). Every routable entry type is in
1947
2106
  the sitemap unless `exclude`d or `noindex`; one `noindex` predicate drives both robots metadata and
1948
2107
  sitemap exclusion. `trailingSlash` is never inferred. `lastModified` defaults to `updatedAt`, a
1949
2108
  filesystem mtime. An empty SEO field counts as unset. `siteUrl` must be absolute, colliding URLs are
@@ -2000,7 +2159,7 @@ underscore-prefixed files are skipped.
2000
2159
 
2001
2160
  **What changed.** New scaffolds write `defaultBranchAccess: 'deny'` and
2002
2161
  `defaultPathAccess: { read: 'allow' }`
2003
- ([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#public-read-on-server-deployments)).
2162
+ ([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#public-read-on-server-deployments)).
2004
2163
 
2005
2164
  **To adopt.** An older scaffold's `defaultBranchAccess: 'allow'` is wider than recommended;
2006
2165
  consider `'deny'`. If you deleted `defaultPathAccess: { read: 'allow' }`, anonymous visitors get no content until you
@@ -2053,7 +2212,7 @@ re-checked an entry's type (a `switch` on `meta.entryType` can merge them into o
2053
2212
  **What changed.** `BlockComponentRegistry<Blocks>` (types only, from `canopycms`; `BlockValueOf<Blocks, 'hero'>`
2054
2213
  gives one template's value type) requires exactly
2055
2214
  one component per block template name when written as an object literal. See
2056
- [Block Component Registries](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#block-component-registries) and
2215
+ [Block Component Registries](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#block-component-registries) and
2057
2216
  `apps/example1/app/components/PostView.tsx`.
2058
2217
 
2059
2218
  ```ts
@@ -2075,7 +2234,7 @@ templates against the schema.
2075
2234
 
2076
2235
  **What changed.** Spreading a `const` field array into several schemas, and nesting
2077
2236
  `defineInlineFieldGroup()` inside a block template, are documented
2078
- ([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#reusable-field-fragments)); `defineFieldFragment()` is an
2237
+ ([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#reusable-field-fragments)); `defineFieldFragment()` is an
2079
2238
  identity helper for them.
2080
2239
 
2081
2240
  ```ts
@@ -2094,7 +2253,7 @@ field by composing from the same `const` field object.
2094
2253
  A block template holding a `reference` field is a shared block; `read()`/`readByUrlPath()` resolve
2095
2254
  it, and listings do with
2096
2255
  [`resolveReferences`](#listings-resolve-references-and-a-resolved-reference-carries-urlpath-and-optionally-its-body-16--breaking-type-level)
2097
- (0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#shared--referenced-blocks).
2256
+ (0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#shared--referenced-blocks).
2098
2257
 
2099
2258
  **Now deletable.** A second `read()` in page code to unwrap a shared block's reference.
2100
2259
 
@@ -2116,7 +2275,7 @@ Not retro-documented, apart from these:
2116
2275
 
2117
2276
  #### The registry is keyed by entry-type name (0.0.42)
2118
2277
 
2119
- **What changed.** `createEntrySchemaRegistry` keys are the entry-type names that `.collection.json` files name in `entry.schema`, and `EntryTypesFromRegistry` derives the typed entry-type map from them. Schema-variable keys (`{ postSchema }`) still work but derive nothing; [README's registry convention](https://github.com/safeinsights/canopycms/blob/39a755c116a52b6d16e0b09e9dde03c67a081754/README.md#convention-why-key-the-registry-by-entry-type-name) says when to keep them.
2278
+ **What changed.** `createEntrySchemaRegistry` keys are the entry-type names that `.collection.json` files name in `entry.schema`, and `EntryTypesFromRegistry` derives the typed entry-type map from them. Schema-variable keys (`{ postSchema }`) still work but derive nothing; [README's registry convention](https://github.com/safeinsights/canopycms/blob/0a53107eda329ce0499edad3544a16fb130b5beb/README.md#convention-why-key-the-registry-by-entry-type-name) says when to keep them.
2120
2279
 
2121
2280
  **To adopt.**
2122
2281
 
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import type { ApiResponse } from './types.js';
3
3
  import type { RouteDefinition } from '../http/router.js';
4
- import type { AssetMeta, StagedUploadTarget } from '../assets/types.js';
4
+ import type { ListedAssetMeta, StagedUploadTarget } from '../assets/types.js';
5
5
  /** An asset's persisted meta plus its computed, root-relative public URL. */
6
- export type AssetRecord = AssetMeta & {
6
+ export type AssetRecord = ListedAssetMeta & {
7
7
  src: string;
8
8
  };
9
9
  /** Response type for listing assets */
@@ -19,9 +19,9 @@ export type PresignAssetResponse = ApiResponse<{
19
19
  export type FinalizeAssetResponse = ApiResponse<{
20
20
  asset: AssetRecord;
21
21
  }>;
22
- /** Response type for deleting an asset */
23
- export type AssetDeleteResponse = ApiResponse<{
24
- deleted: boolean;
22
+ /** Response type for removing a file from the library or restoring it: whether it is now hidden */
23
+ export type AssetVisibilityResponse = ApiResponse<{
24
+ hidden: boolean;
25
25
  }>;
26
26
  declare const presignAssetBodySchema: z.ZodObject<{
27
27
  filename: z.ZodString;
@@ -48,6 +48,14 @@ declare const finalizeAssetBodySchema: z.ZodObject<{
48
48
  stagingKey: string;
49
49
  }>;
50
50
  export type FinalizeAssetBody = z.infer<typeof finalizeAssetBodySchema>;
51
+ declare const assetKeyBodySchema: z.ZodObject<{
52
+ key: z.ZodString;
53
+ }, "strip", z.ZodTypeAny, {
54
+ key: string;
55
+ }, {
56
+ key: string;
57
+ }>;
58
+ export type AssetKeyBody = z.infer<typeof assetKeyBodySchema>;
51
59
  /**
52
60
  * Exported routes for router registration and client codegen.
53
61
  */
@@ -79,20 +87,32 @@ export declare const ASSET_ROUTES: {
79
87
  readonly list: import("./route-builder.js").RouteDefinition<z.ZodObject<{
80
88
  cursor: z.ZodOptional<z.ZodString>;
81
89
  limit: z.ZodOptional<z.ZodNumber>;
90
+ /** Admin only: also list files removed from the library, each marked `hidden: true`. */
91
+ includeHidden: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
82
92
  }, "strip", z.ZodTypeAny, {
83
93
  cursor?: string | undefined;
84
94
  limit?: number | undefined;
95
+ includeHidden?: "true" | "false" | undefined;
85
96
  }, {
86
97
  cursor?: string | undefined;
87
98
  limit?: number | undefined;
99
+ includeHidden?: "true" | "false" | undefined;
88
100
  }>, undefined, AssetsListResponse>;
89
- readonly delete: import("./route-builder.js").RouteDefinition<z.ZodObject<{
101
+ readonly hide: import("./route-builder.js").RouteDefinition<undefined, z.ZodObject<{
102
+ key: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ key: string;
105
+ }, {
106
+ key: string;
107
+ }>, AssetVisibilityResponse>;
108
+ readonly restore: import("./route-builder.js").RouteDefinition<undefined, z.ZodObject<{
90
109
  key: z.ZodString;
91
110
  }, "strip", z.ZodTypeAny, {
92
111
  key: string;
93
112
  }, {
94
113
  key: string;
95
- }>, undefined, AssetDeleteResponse>;
114
+ }>, AssetVisibilityResponse>;
115
+ readonly deleteGone: RouteDefinition;
96
116
  };
97
117
  /**
98
118
  * GET /assets/raw/{key...} - see `rawAssetHandler` above for why this is