@tideworthy/tidysites-platform 0.6.0 → 0.6.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.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/editor/TidyEditor.astro +7 -3
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
- Editor: EmDash's toolbar is hidden while editing is off, so the Edit pill is the one control on the page. It still shows on article pages in edit mode, where EmDash's inline editing needs it.
|
|
6
|
+
|
|
3
7
|
## 0.6.0
|
|
4
8
|
|
|
5
9
|
- `GET /_tidy/edit?on=1|0&to=/path`: switches on-site editing on or off for the signed-in editor (the `emdash-edit-mode` cookie) and returns to the page. No bearer; a visitor without a session is sent back unchanged.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tideworthy/tidysites-platform",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "The Tidysites platform integration for EmDash sites: bootstrap, sessions, maintenance, health, and publish hooks under /_tidy/*.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* A record region (`data-tidy-record`, `data-tidy-record-id`,
|
|
11
11
|
* `data-tidy-record-label`) gets an "Edit details" chip whose form comes
|
|
12
12
|
* from EmDash's manifest. A page without blocks (an article) gets the pill
|
|
13
|
-
* only; EmDash's inline editing handles its prose in edit mode.
|
|
13
|
+
* only; EmDash's inline editing handles its prose in edit mode. EmDash's own
|
|
14
|
+
* toolbar shows only there: while editing is off the pill is the one control.
|
|
14
15
|
*/
|
|
15
16
|
import type { Block, BlockSchema } from "./ops";
|
|
16
17
|
|
|
@@ -32,7 +33,10 @@ const editable = active && Boolean(collection && id && blocks && value);
|
|
|
32
33
|
const config = editable ? JSON.stringify({ collection, id, field, blocks, value, records, done: toggle(false) }) : null;
|
|
33
34
|
---
|
|
34
35
|
{signedIn && !active && (
|
|
35
|
-
|
|
36
|
+
<>
|
|
37
|
+
<div class="tidy-status tidy-status-idle"><a class="tidy-btn tidy-btn-primary" href={toggle(true)}>Edit</a></div>
|
|
38
|
+
<script is:inline>document.documentElement.classList.add("tidy-idle");</script>
|
|
39
|
+
</>
|
|
36
40
|
)}
|
|
37
41
|
{signedIn && active && !editable && (
|
|
38
42
|
<div class="tidy-status"><span>Editing</span><a class="tidy-btn" href={toggle(false)}>Done</a></div>
|
|
@@ -44,7 +48,7 @@ const config = editable ? JSON.stringify({ collection, id, field, blocks, value,
|
|
|
44
48
|
</>
|
|
45
49
|
)}
|
|
46
50
|
<style is:global>
|
|
47
|
-
.tidy-editing #emdash-toolbar { display: none !important; }
|
|
51
|
+
.tidy-editing #emdash-toolbar, .tidy-idle #emdash-toolbar { display: none !important; }
|
|
48
52
|
[data-tidy-record] { outline: 2px dashed transparent; outline-offset: 4px; transition: outline-color 120ms; cursor: pointer; }
|
|
49
53
|
[data-tidy-record]:hover, [data-tidy-record].tidy-active { outline-color: #2b7fd1; }
|
|
50
54
|
.tidy-image-preview { display: grid; place-items: center; min-height: 96px; border: 1px solid #d3dcd6; border-radius: 6px; background: #f6f7f5; overflow: hidden; }
|
package/src/version.ts
CHANGED