@glw907/cairn-cms 0.52.0 → 0.52.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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project are recorded here, most recent first.
4
4
 
5
+ ## 0.52.1
6
+
7
+ Two field reports from the first 0.52.0 session, both in-editor polish with no consumer action.
8
+ In Write mode the editor card now hugs the manuscript (the column caps at 48rem and centers), so
9
+ a wide window no longer frames empty space inside the card; Preview keeps the full column for
10
+ its device widths. The directive rails take a 4px gap between nested bars (twice the bar
11
+ weight, so two rails read as two lines), and directive text gains a matching step of gutter.
12
+
5
13
  ## 0.52.0
6
14
 
7
15
  The editor became a quiet writing surface. The manuscript renders in self-hosted iA Writer Mono
@@ -638,7 +638,12 @@ transient flashes, and the editor card's footer holds the word count and the Mar
638
638
  <CsrfField />
639
639
  {#if data.isNew}<input type="hidden" name="new" value="1" />{/if}
640
640
 
641
- <div class="lg:order-1">
641
+ <!-- In Write mode the card hugs the manuscript: the column caps near the 70ch measure and
642
+ centers, so the card frame never spans emptiness on a wide window. Preview keeps the full
643
+ column for its device frames. 48rem = the measure (70ch of the editor face at 1rem is
644
+ about 42rem) plus the surface padding and the card borders, with enough left over that
645
+ the toolbar keeps its single row. -->
646
+ <div class={mode === 'preview' ? 'lg:order-1' : 'lg:order-1 mx-auto w-full max-w-[48rem]'}>
642
647
  {#if titleField}
643
648
  <!-- The hoisted document title: large, borderless, in the display face, so the manuscript
644
649
  reads as the protagonist. It submits as name="title", the same field as before. The
@@ -75,9 +75,10 @@ through the adapter's render. Swapping the editor stays a one-file change.
75
75
  // tooltip above all) renders dark-on-dark instead of light-on-dark.
76
76
  const isDark = host.closest('[data-theme]')?.getAttribute('data-theme')?.includes('dark') ?? false;
77
77
  // The directive machinery treatment: rails, not bands. A row at depth N draws every rail
78
- // 1..N as literal nested brackets: 2px accent bars at x offsets 0-2, 4-6, and 8-10 with 2px
79
- // of surface between them, stacked as inset box shadows (top layer first, so each bar sits
80
- // over the spacer and deeper bar beneath it). The alphas step through the per-theme vars in
78
+ // 1..N as literal nested brackets: 2px accent bars at x offsets 0-2, 6-8, and 12-14 with 4px
79
+ // of surface between them (a gap of twice the bar weight, the floor for two parallel rules
80
+ // to read as separate lines rather than one thick one), stacked as inset box shadows (top
81
+ // layer first, so each bar sits over the spacer and deeper bar beneath it). The alphas step through the per-theme vars in
81
82
  // cairn-admin.css; the fallbacks are the light values, so the editor still renders sensibly
82
83
  // outside an admin theme wrapper. On a fence line the colon runs, brackets, and {attrs}
83
84
  // braces dim to the marker tone while the name and label keep a depth-stepped ink. Leaf and
@@ -91,7 +92,7 @@ through the adapter's render. Swapping the editor stays a one-file change.
91
92
  const rails = (depth: number, active = false): string => {
92
93
  const layers: string[] = [];
93
94
  for (let d = 1; d <= depth; d++) {
94
- const edge = 4 * d - 2;
95
+ const edge = 6 * d - 4;
95
96
  if (d > 1) layers.push(`inset ${edge - 2}px 0 0 0 var(--color-base-100, oklch(99% 0.004 75))`);
96
97
  const own = active && d === depth;
97
98
  layers.push(
@@ -145,9 +146,10 @@ through the adapter's render. Swapping the editor stays a one-file change.
145
146
  outlineOffset: '-1px',
146
147
  },
147
148
  '.cm-line': { padding: '0' },
148
- // The gutter: directive rows pad left so the text clears the deepest rail stack. It is
149
- // static structure (caret-independent), so caret movement shifts no layout.
150
- '.cm-cairn-directive-fence, .cm-cairn-directive-content': { paddingLeft: '1.25rem' },
149
+ // The gutter: directive rows pad left so the text clears the deepest rail stack (the
150
+ // depth-3 bar ends at 14px, the active one at 15px; 1.5rem keeps ~10px of air beyond
151
+ // it). Static structure (caret-independent), so caret movement shifts no layout.
152
+ '.cm-cairn-directive-fence, .cm-cairn-directive-content': { paddingLeft: '1.5rem' },
151
153
  ...railRules,
152
154
  '.cm-cairn-directive-mark': { color: 'var(--color-muted)' },
153
155
  '.cm-cairn-directive-label': { color: 'var(--color-accent)' },
@@ -4052,6 +4052,10 @@
4052
4052
  max-width: 30%;
4053
4053
  }
4054
4054
 
4055
+ :where([data-theme='cairn-admin'], [data-theme='cairn-admin-dark']) .max-w-\[48rem\] {
4056
+ max-width: 48rem;
4057
+ }
4058
+
4055
4059
  :where([data-theme='cairn-admin'], [data-theme='cairn-admin-dark']) .max-w-full {
4056
4060
  max-width: 100%;
4057
4061
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glw907/cairn-cms",
3
- "version": "0.52.0",
3
+ "version": "0.52.1",
4
4
  "description": "Embedded, magic-link, GitHub-committing CMS for SvelteKit/Cloudflare sites.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -638,7 +638,12 @@ transient flashes, and the editor card's footer holds the word count and the Mar
638
638
  <CsrfField />
639
639
  {#if data.isNew}<input type="hidden" name="new" value="1" />{/if}
640
640
 
641
- <div class="lg:order-1">
641
+ <!-- In Write mode the card hugs the manuscript: the column caps near the 70ch measure and
642
+ centers, so the card frame never spans emptiness on a wide window. Preview keeps the full
643
+ column for its device frames. 48rem = the measure (70ch of the editor face at 1rem is
644
+ about 42rem) plus the surface padding and the card borders, with enough left over that
645
+ the toolbar keeps its single row. -->
646
+ <div class={mode === 'preview' ? 'lg:order-1' : 'lg:order-1 mx-auto w-full max-w-[48rem]'}>
642
647
  {#if titleField}
643
648
  <!-- The hoisted document title: large, borderless, in the display face, so the manuscript
644
649
  reads as the protagonist. It submits as name="title", the same field as before. The
@@ -75,9 +75,10 @@ through the adapter's render. Swapping the editor stays a one-file change.
75
75
  // tooltip above all) renders dark-on-dark instead of light-on-dark.
76
76
  const isDark = host.closest('[data-theme]')?.getAttribute('data-theme')?.includes('dark') ?? false;
77
77
  // The directive machinery treatment: rails, not bands. A row at depth N draws every rail
78
- // 1..N as literal nested brackets: 2px accent bars at x offsets 0-2, 4-6, and 8-10 with 2px
79
- // of surface between them, stacked as inset box shadows (top layer first, so each bar sits
80
- // over the spacer and deeper bar beneath it). The alphas step through the per-theme vars in
78
+ // 1..N as literal nested brackets: 2px accent bars at x offsets 0-2, 6-8, and 12-14 with 4px
79
+ // of surface between them (a gap of twice the bar weight, the floor for two parallel rules
80
+ // to read as separate lines rather than one thick one), stacked as inset box shadows (top
81
+ // layer first, so each bar sits over the spacer and deeper bar beneath it). The alphas step through the per-theme vars in
81
82
  // cairn-admin.css; the fallbacks are the light values, so the editor still renders sensibly
82
83
  // outside an admin theme wrapper. On a fence line the colon runs, brackets, and {attrs}
83
84
  // braces dim to the marker tone while the name and label keep a depth-stepped ink. Leaf and
@@ -91,7 +92,7 @@ through the adapter's render. Swapping the editor stays a one-file change.
91
92
  const rails = (depth: number, active = false): string => {
92
93
  const layers: string[] = [];
93
94
  for (let d = 1; d <= depth; d++) {
94
- const edge = 4 * d - 2;
95
+ const edge = 6 * d - 4;
95
96
  if (d > 1) layers.push(`inset ${edge - 2}px 0 0 0 var(--color-base-100, oklch(99% 0.004 75))`);
96
97
  const own = active && d === depth;
97
98
  layers.push(
@@ -145,9 +146,10 @@ through the adapter's render. Swapping the editor stays a one-file change.
145
146
  outlineOffset: '-1px',
146
147
  },
147
148
  '.cm-line': { padding: '0' },
148
- // The gutter: directive rows pad left so the text clears the deepest rail stack. It is
149
- // static structure (caret-independent), so caret movement shifts no layout.
150
- '.cm-cairn-directive-fence, .cm-cairn-directive-content': { paddingLeft: '1.25rem' },
149
+ // The gutter: directive rows pad left so the text clears the deepest rail stack (the
150
+ // depth-3 bar ends at 14px, the active one at 15px; 1.5rem keeps ~10px of air beyond
151
+ // it). Static structure (caret-independent), so caret movement shifts no layout.
152
+ '.cm-cairn-directive-fence, .cm-cairn-directive-content': { paddingLeft: '1.5rem' },
151
153
  ...railRules,
152
154
  '.cm-cairn-directive-mark': { color: 'var(--color-muted)' },
153
155
  '.cm-cairn-directive-label': { color: 'var(--color-accent)' },