bloggie 0.4.3 → 0.4.5
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/AGENTS.md +4 -0
- package/README.md +5 -0
- package/astro.config.js +2 -1
- package/components/Embed.astro +35 -0
- package/components/YouTube.astro +15 -0
- package/components/slides/Slide.astro +14 -4
- package/e2e/editor.js +41 -6
- package/e2e/run.js +29 -7
- package/editor/client.js +56 -24
- package/layouts/Post.astro +17 -11
- package/lib/math-punctuation.js +44 -0
- package/lib/pages.js +29 -0
- package/lib/slides.js +10 -0
- package/package.json +1 -1
- package/pages/index.astro +90 -38
- package/scripts/export/agent.js +2 -2
- package/scripts/export/common.js +10 -4
- package/scripts/export/dev.js +7 -5
- package/scripts/export/index.js +14 -10
- package/scripts/export/page.js +4 -3
- package/scripts/export-posts.js +26 -11
- package/skills/bloggie-slides/SKILL.md +14 -3
- package/styles/site.css +164 -11
- package/styles/slides.css +37 -0
- package/template/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -19,6 +19,10 @@ and figures. `template/` is the starter blog that `scripts/create.js` copies (`n
|
|
|
19
19
|
- A release goes to npm: raise the last number of `version` in `package.json`, 0.4.0 to 0.4.1 (the middle number goes
|
|
20
20
|
up once others contribute), and the template's `bloggie` dependency with it; then `npm publish` here. Publish
|
|
21
21
|
`create/` (`create-bloggie`) only when its `index.js` changes.
|
|
22
|
+
- An agent never runs `npm publish`: it needs the maintainer's npm login and a one-time password. When asked to
|
|
23
|
+
publish, an agent prepares the release (the version numbers, the commits) and then prints the commands for the
|
|
24
|
+
maintainer to run, with full paths: `cd <this folder> && npm publish`, and the same in `create/` when it changes.
|
|
25
|
+
After the maintainer says it is done, the agent checks the release with `npm view bloggie version`.
|
|
22
26
|
- From a blog, `npm run bloggie:push -- -m "…" --yes` (`scripts/publish.js`) publishes `bloggie/` as one new commit on
|
|
23
27
|
top of the engine's main and opens a pull request: to a branch of the engine's repository if you may push there,
|
|
24
28
|
else of your fork (`gh` makes it; without `gh`, `--remote <fork>`). `--main` pushes to main. None of the blog's
|
package/README.md
CHANGED
|
@@ -98,9 +98,13 @@ src/pages/posts/<slug>/
|
|
|
98
98
|
index.mdx the post: Markdown, math and figure tags
|
|
99
99
|
slides.mdx its deck (optional)
|
|
100
100
|
data/ media/ the numbers and pictures it shows
|
|
101
|
+
<name>.mdx a subpage, at /posts/<slug>/<name>/ (optional)
|
|
102
|
+
<name>/ a subpage that is a folder: its own index.mdx, and slides.mdx if it has a deck
|
|
101
103
|
```
|
|
102
104
|
|
|
103
105
|
The blog's home page is an index that lists every post, newest first.
|
|
106
|
+
A subpage, such as an appendix or a long table, uses the post layout but is not listed on the home page; link to it from its post.
|
|
107
|
+
It can sit at any depth under the post, so a post can also hold earlier posts as an archive.
|
|
104
108
|
You can ask an agent to write a post or its slides, or edit it yourself in Markdown and HTML.
|
|
105
109
|
|
|
106
110
|
## One style, written down for your agent
|
|
@@ -125,6 +129,7 @@ A note written as `((…))` anywhere in a file asks the agent to address it and
|
|
|
125
129
|
The <img src=".github/readme/download.svg" height="14" alt="download"> in each post's byline downloads the post as one HTML file, with its styles, figures and deck inside.
|
|
126
130
|
It opens from disk with no internet, so you can present from a laptop offline or send the post by email.
|
|
127
131
|
The menu beside it also offers the post as text for an AI agent.
|
|
132
|
+
A subpage has no downloads unless its front matter sets `downloads: true`, since each download adds to the build's time; a post can turn them off with `downloads: false`.
|
|
128
133
|
|
|
129
134
|
## Publish
|
|
130
135
|
|
package/astro.config.js
CHANGED
|
@@ -16,6 +16,7 @@ import { root } from './lib/blog.js'
|
|
|
16
16
|
import { katexMacros, remarkRoles } from './lib/roles.js'
|
|
17
17
|
import remarkPostTables from './lib/post-tables.js'
|
|
18
18
|
import remarkSlideHeadings, { rehypeSlideBoxes } from './lib/slide-headings.js'
|
|
19
|
+
import rehypeMathPunctuation from './lib/math-punctuation.js'
|
|
19
20
|
import postDownloads from './scripts/export/dev.js'
|
|
20
21
|
import slideEditor from './editor/integration.js'
|
|
21
22
|
import liveUpdate from './live/integration.js'
|
|
@@ -126,7 +127,7 @@ export default defineConfig({
|
|
|
126
127
|
macros: katexMacros,
|
|
127
128
|
trust: (context) => context.command === '\\htmlClass',
|
|
128
129
|
strict: (code) => (code === 'htmlExtension' ? 'ignore' : 'warn'),
|
|
129
|
-
}], rehypeSlideBoxes, rehypeSourcePositions], // slide-boxes: a <Box style> in slides.mdx styles the element it holds; source-positions: dev only, last (jump/annotate.js)
|
|
130
|
+
}], rehypeMathPunctuation, rehypeSlideBoxes, rehypeSourcePositions], // math-punctuation: no line break between inline math and its punctuation; slide-boxes: a <Box style> in slides.mdx styles the element it holds; source-positions: dev only, last (jump/annotate.js)
|
|
130
131
|
}),
|
|
131
132
|
},
|
|
132
133
|
})
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A live web page inside the post or the deck, for an interactive article or a demo that lives on another site. In a
|
|
3
|
+
// post it fills the column at 16:9 and loads when the reader scrolls to it. On an `embed` slide it fills the stage, and
|
|
4
|
+
// it loads only when its slide or the one before it is shown (components/slides/Slide.astro, lib/slides.js), so the
|
|
5
|
+
// pages of a deck do not all run at once. The site must allow framing (no X-Frame-Options or frame-ancestors block).
|
|
6
|
+
//
|
|
7
|
+
// <Embed src="https://distill.pub/2020/growing-ca/" title="Growing Neural Cellular Automata" />
|
|
8
|
+
//
|
|
9
|
+
// With `crop`, only one rectangle of the page shows, such as the demo of an article that has no page of its own: the
|
|
10
|
+
// page is laid out `layout` CSS pixels wide, does not scroll, and the rectangle is scaled to fill the frame.
|
|
11
|
+
//
|
|
12
|
+
// <Embed src="https://distill.pub/2020/growing-ca/" title="Growing NCA, the demo" crop="260 236 920 650" />
|
|
13
|
+
//
|
|
14
|
+
// src the page's URL
|
|
15
|
+
// title the page's title, for screen readers
|
|
16
|
+
// crop optional: "x y width height", the rectangle to show, in CSS pixels of the page laid out `layout` wide
|
|
17
|
+
// layout optional, with crop: the width the page is laid out at (default 1440)
|
|
18
|
+
const { src, title, crop, layout = 1440 } = Astro.props
|
|
19
|
+
const allow = 'fullscreen; clipboard-write; accelerometer; gyroscope'
|
|
20
|
+
const [x, y, w, h] = crop ? crop.trim().split(/\s+/).map(Number) : []
|
|
21
|
+
---
|
|
22
|
+
{crop ? (
|
|
23
|
+
<div class="embed-crop" data-crop-width={w} style={`aspect-ratio: ${w} / ${h}`}>
|
|
24
|
+
<iframe class="embed" src={src} title={title} loading="lazy" allow={allow} allowfullscreen referrerpolicy="strict-origin-when-cross-origin" scrolling="no" style={`width: ${layout}px; height: ${y + h}px; transform: scale(var(--crop-scale, 1)) translate(${-x}px, ${-y}px)`}></iframe>
|
|
25
|
+
</div>
|
|
26
|
+
) : (
|
|
27
|
+
<iframe class="embed" src={src} title={title} loading="lazy" allow={allow} allowfullscreen referrerpolicy="strict-origin-when-cross-origin"></iframe>
|
|
28
|
+
)}
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
// A cropped page is scaled so that its rectangle fills the frame's width, in a post or on a slide.
|
|
32
|
+
const fit = (frame: HTMLElement) => frame.style.setProperty('--crop-scale', String(frame.clientWidth / Number(frame.dataset.cropWidth)))
|
|
33
|
+
const observer = new ResizeObserver((entries) => entries.forEach((entry) => fit(entry.target as HTMLElement)))
|
|
34
|
+
document.querySelectorAll<HTMLElement>('.embed-crop').forEach((frame) => { fit(frame); observer.observe(frame) })
|
|
35
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A YouTube video in YouTube's own player, for a talk or a demo that lives on YouTube rather than in the post's
|
|
3
|
+
// media/. In a post it fills the text column at 16:9; on a `video` slide it fills the stage. The player loads from
|
|
4
|
+
// youtube-nocookie.com, which sets no cookie until the reader plays the video. Its JavaScript API is on
|
|
5
|
+
// (enablejsapi=1) so that the deck can pause it when its slide is left (lib/slides.js).
|
|
6
|
+
//
|
|
7
|
+
// <YouTube id="dQw4w9WgXcQ" title="The video's title" />
|
|
8
|
+
//
|
|
9
|
+
// id the video's id: the v= of its watch URL
|
|
10
|
+
// title the video's title, for screen readers
|
|
11
|
+
// start optional: the second to start at
|
|
12
|
+
const { id, title, start } = Astro.props
|
|
13
|
+
const src = `https://www.youtube-nocookie.com/embed/${id}?enablejsapi=1&rel=0${start ? `&start=${start}` : ''}`
|
|
14
|
+
---
|
|
15
|
+
<iframe class="youtube" src={src} title={title} allow="autoplay; encrypted-media; fullscreen; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin"></iframe>
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
// description placed over the figure's empty region (`noteTop`, from the top
|
|
24
24
|
// of the figure area, in stage pixels; default 440px)
|
|
25
25
|
// table a title over a table from the post: <PostTable id="tbl-…" /> (bloggie/lib/post-tables.js)
|
|
26
|
-
// video only the video, full bleed, on `bg` (the video's own background color)
|
|
26
|
+
// video only the video (a <video>, or a <YouTube id=…> player), full bleed, on `bg` (the video's own background color)
|
|
27
|
+
// embed only a live web page (<Embed src=…>), the full width of the stage, on `bg` (default white); a
|
|
28
|
+
// thin band at the bottom stays the deck's, so the pointer there shows the nav in full screen and a
|
|
29
|
+
// click there gives the keys back to the deck. The page loads when its slide or the one before it is shown.
|
|
27
30
|
// title the slide's title, as HTML (a `title` slot, from a heading, may also hold Markdown math)
|
|
28
31
|
// label the name the speaker view shows for this slide; defaults to the title, untagged
|
|
29
32
|
// zoom demo: figure zoom so its labels read from the back of the room (default 1.6)
|
|
@@ -33,14 +36,15 @@
|
|
|
33
36
|
// size divider: the phrase's font size in px, for a long phrase (default 112); a paragraph under a
|
|
34
37
|
// divider's heading is a one-line subtitle; table: the table's font size in px for a short table (default
|
|
35
38
|
// 34, with headers at 0.8 of it); with a size, the headers take the same size
|
|
39
|
+
// build reveal the slide's list items one at a time, one per click (lib/slides.js); `## [text build=true] Title`
|
|
36
40
|
// eyebrow a small line over the title that names the part of the talk, e.g. "What's next"
|
|
37
41
|
// titleStyle CSS for the title, e.g. "font-size: 60px" (the slide editor writes it)
|
|
38
42
|
// edit set under `npm run dev` only: the slide's index, for the slide editor (bloggie/editor/)
|
|
39
|
-
const { kind = 'text', title: titleProp = '', byline, label, zoom, svgMax, eqSize, size, noteTop, bg, titleStyle, edit, cols, eyebrow } = Astro.props
|
|
43
|
+
const { kind = 'text', title: titleProp = '', byline, label, zoom, svgMax, eqSize, size, noteTop, bg, titleStyle, edit, cols, eyebrow, build } = Astro.props
|
|
40
44
|
const titleEdit = edit == null ? undefined : `${edit}/t`
|
|
41
45
|
const title = Astro.slots.has('title') ? await Astro.slots.render('title') : titleProp
|
|
42
46
|
|
|
43
|
-
const kindClass = { title: 'title-slide', divider: 'divider', text: 'text', reasons: 'text reasons', equation: 'equation', problem: 'problem', demo: 'demo-slide', table: 'table-slide', video: 'video-slide' }[kind]
|
|
47
|
+
const kindClass = { title: 'title-slide', divider: 'divider', text: 'text', reasons: 'text reasons', equation: 'equation', problem: 'problem', demo: 'demo-slide', table: 'table-slide', video: 'video-slide', embed: 'embed-slide' }[kind]
|
|
44
48
|
if (!kindClass) throw new Error(`Slide: unknown kind "${kind}"`)
|
|
45
49
|
const plainTitle = label ?? title.replace(/<br\s*\/?>/g, ' ').replace(/<[^>]+>/g, '').replace(/\$/g, '')
|
|
46
50
|
const style = [
|
|
@@ -53,6 +57,11 @@ const style = [
|
|
|
53
57
|
].filter(Boolean).join('; ') || undefined
|
|
54
58
|
const hasNote = Astro.slots.has('note')
|
|
55
59
|
|
|
60
|
+
// An embed slide's page waits in data-src until lib/slides.js loads it, a slide before it is shown.
|
|
61
|
+
const embedBody = kind === 'embed' && Astro.slots.has('default')
|
|
62
|
+
? (await Astro.slots.render('default')).replace(/<iframe class="embed" src=/g, '<iframe class="embed" data-src=')
|
|
63
|
+
: ''
|
|
64
|
+
|
|
56
65
|
// Body kinds render their Markdown here so a list item that *starts* with $math$ or **bold** can be
|
|
57
66
|
// tagged: `sym` (an equation legend's symbol column) and `lead` (a reason's main idea). CSS alone
|
|
58
67
|
// cannot tell "starts with" from "contains": :first-child ignores the text before an element.
|
|
@@ -63,7 +72,7 @@ const body = bodyKinds.includes(kind) && Astro.slots.has('default')
|
|
|
63
72
|
.replace(/<li>(\s*)<strong>/g, '<li>$1<strong class="lead">')
|
|
64
73
|
: ''
|
|
65
74
|
---
|
|
66
|
-
<section class={`slide ${kindClass}${cols ? ' cols' : ''}`} data-title={plainTitle} style={style} data-edit-slide={edit}>
|
|
75
|
+
<section class={`slide ${kindClass}${cols ? ' cols' : ''}`} data-title={plainTitle} style={style} data-edit-slide={edit} data-build={build && build !== 'false' ? '' : undefined}>
|
|
67
76
|
{kind === 'title' && (
|
|
68
77
|
<>
|
|
69
78
|
<h1 set:html={title} style={titleStyle} data-edit={titleEdit} />
|
|
@@ -78,6 +87,7 @@ const body = bodyKinds.includes(kind) && Astro.slots.has('default')
|
|
|
78
87
|
</>
|
|
79
88
|
)}
|
|
80
89
|
{kind === 'video' && <slot />}
|
|
90
|
+
{kind === 'embed' && <Fragment set:html={embedBody} />}
|
|
81
91
|
{kind === 'demo' && (
|
|
82
92
|
<>
|
|
83
93
|
{eyebrow && <p class="slide-eyebrow">{eyebrow}</p>}
|
package/e2e/editor.js
CHANGED
|
@@ -76,11 +76,12 @@ function inputs(page) {
|
|
|
76
76
|
await mouse('mouseReleased', x, y, { clickCount })
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
-
async drag(x0, y0, x1, y1) {
|
|
80
|
-
|
|
81
|
-
await mouse('
|
|
82
|
-
|
|
83
|
-
await mouse('
|
|
79
|
+
async drag(x0, y0, x1, y1, mods = []) {
|
|
80
|
+
const modifiers = bits(mods)
|
|
81
|
+
await mouse('mouseMoved', x0, y0, { button: 'none', modifiers })
|
|
82
|
+
await mouse('mousePressed', x0, y0, { buttons: 1, modifiers })
|
|
83
|
+
for (let i = 1; i <= 10; i++) await mouse('mouseMoved', x0 + ((x1 - x0) * i) / 10, y0 + ((y1 - y0) * i) / 10, { buttons: 1, modifiers })
|
|
84
|
+
await mouse('mouseReleased', x1, y1, { modifiers })
|
|
84
85
|
},
|
|
85
86
|
// A key by its name ('e', 'Enter', 'ArrowDown') or, with `code`, by its place on the keyboard
|
|
86
87
|
// (⌥A types "å", but its code is KeyA).
|
|
@@ -212,7 +213,7 @@ export async function editorChecks({ check, launch, root }) {
|
|
|
212
213
|
const state = await ev(`({ blocked: document.querySelector('.se-toolbar').classList.contains('se-blocked'), status: document.querySelector('.se-status').textContent, blocks: document.querySelectorAll('.deck [data-edit]').length })`)
|
|
213
214
|
if (state.blocked) throw new Error(`${slug}: ${state.status}`)
|
|
214
215
|
observed[slug] = `${state.blocks} blocks and titles`
|
|
215
|
-
await key('
|
|
216
|
+
await key('Escape')
|
|
216
217
|
}
|
|
217
218
|
if (page.problems.length) throw new Error(page.problems.join('\n'))
|
|
218
219
|
return observed
|
|
@@ -251,6 +252,40 @@ export async function editorChecks({ check, launch, root }) {
|
|
|
251
252
|
return `translate: ${found[1]}px ${found[2]}px, in the file and the page`
|
|
252
253
|
})
|
|
253
254
|
|
|
255
|
+
await step('Shift keeps a drag on a straight line: horizontal, then 45°', async () => {
|
|
256
|
+
const at = async () => (await ev(`document.querySelector(${JSON.stringify(paragraph)}).style.translate`)).split(' ').map(parseFloat)
|
|
257
|
+
const [x0, y0] = await at()
|
|
258
|
+
let p = await center(paragraph)
|
|
259
|
+
await drag(p.x, p.y, p.x + 90, p.y + 25, ['shift'])
|
|
260
|
+
await saved()
|
|
261
|
+
const [x1, y1] = await at()
|
|
262
|
+
if (y1 !== y0 || x1 === x0) throw new Error(`a Shift-drag right and a little down moved it from ${x0}, ${y0} to ${x1}, ${y1}: it should move right only`)
|
|
263
|
+
p = await center(paragraph)
|
|
264
|
+
await drag(p.x, p.y, p.x + 40, p.y + 30, ['shift'])
|
|
265
|
+
await saved()
|
|
266
|
+
const [x2, y2] = await at()
|
|
267
|
+
if (Math.abs(Math.abs(x2 - x1) - Math.abs(y2 - y1)) > 1 || y2 === y1) throw new Error(`a Shift-drag down and right moved it by ${x2 - x1}, ${y2 - y1}: it should move as far across as down`)
|
|
268
|
+
return `right only (${x0} -> ${x1}), then 45° (${x2 - x1}, ${y2 - y1})`
|
|
269
|
+
})
|
|
270
|
+
|
|
271
|
+
await step('E while editing leaves editing on; a letter typed with a paragraph selected opens its Markdown', async () => {
|
|
272
|
+
let p = await center(paragraph)
|
|
273
|
+
await click(p.x, p.y)
|
|
274
|
+
await key('Escape') // the paragraph selected: Esc selects nothing, and editing stays on
|
|
275
|
+
await key('e')
|
|
276
|
+
await sleep(300)
|
|
277
|
+
if (!(await ev(`document.body.classList.contains('se-on')`))) throw new Error('E turned editing off')
|
|
278
|
+
p = await center(paragraph)
|
|
279
|
+
await click(p.x, p.y)
|
|
280
|
+
await key('e')
|
|
281
|
+
// The editor opens once the dev server has sent the block's Markdown.
|
|
282
|
+
for (let i = 0; i < 40 && !(await ev(`!!document.querySelector('.se-source textarea')`)); i++) await sleep(100)
|
|
283
|
+
const open = await ev(`({ source: !!document.querySelector('.se-source textarea'), on: document.body.classList.contains('se-on') })`)
|
|
284
|
+
if (!open.source || !open.on) throw new Error(`after E on a selected paragraph: ${JSON.stringify(open)}`)
|
|
285
|
+
await key('Escape') // closes the Markdown editor, unchanged
|
|
286
|
+
return 'editing stays on; E on the paragraph opened its Markdown'
|
|
287
|
+
})
|
|
288
|
+
|
|
254
289
|
await step('⌘⇧> twice and ⌘B are written to the Box; undo brings slides.mdx back byte for byte', async () => {
|
|
255
290
|
const size = await ev(`parseFloat(getComputedStyle(document.querySelector(${JSON.stringify(paragraph)})).fontSize)`)
|
|
256
291
|
await key('.', ['meta', 'shift'])
|
package/e2e/run.js
CHANGED
|
@@ -25,6 +25,7 @@ import { editorChecks } from './editor.js'
|
|
|
25
25
|
import { liveChecks } from './live.js'
|
|
26
26
|
import { jumpChecks } from './jump.js'
|
|
27
27
|
import { tocList, tocUse, tocSpace } from './toc.js'
|
|
28
|
+
import { downloadNames } from '../lib/pages.js'
|
|
28
29
|
|
|
29
30
|
const root = process.cwd() // the blog (lib/blog.js)
|
|
30
31
|
const dist = join(root, 'dist')
|
|
@@ -64,6 +65,8 @@ const htmlPages = (dir) => readdirSync(dir, { withFileTypes: true }).flatMap((en
|
|
|
64
65
|
})
|
|
65
66
|
|
|
66
67
|
const hasDeck = (post) => existsSync(join(dist, 'posts', post, 'slides', 'index.html'))
|
|
68
|
+
// A post or a subpage, at any depth under posts/ (lib/pages.js), as its path there; null for a deck or another page.
|
|
69
|
+
const postPath = (path) => (/^posts\/.+\/$/.test(path) && !path.endsWith('/slides/') ? path.slice('posts/'.length, -1) : null)
|
|
67
70
|
const siteUrl = (await import('../lib/blog.js')).site.url
|
|
68
71
|
|
|
69
72
|
const browser = await launch()
|
|
@@ -144,7 +147,20 @@ for (const file of htmlPages(dist)) {
|
|
|
144
147
|
return `${media.length} figures, medium="${want}"`
|
|
145
148
|
})
|
|
146
149
|
}
|
|
147
|
-
if (
|
|
150
|
+
if (postPath(path)) {
|
|
151
|
+
// The byline's links (layouts/Post.astro) go to pages and files the build made: the deck, when there is a Slides
|
|
152
|
+
// link, and the two downloads, when there is a download control. A subpage beside its post's deck has no Slides link.
|
|
153
|
+
await check(label, "the byline's Slides and download links lead to built files", async () => {
|
|
154
|
+
const links = await page.evaluate(`[...document.querySelectorAll('.byline a[href]')].map((a) => a.getAttribute('href'))`)
|
|
155
|
+
const local = links.filter((href) => !/^[a-z]+:/i.test(href) && !href.startsWith('#'))
|
|
156
|
+
const base = process.env.BASE_PATH || '/'
|
|
157
|
+
const missing = local.filter((href) => {
|
|
158
|
+
const file = join(dist, new URL(href, new URL(path, 'http://x/')).pathname.slice(base.length))
|
|
159
|
+
return !existsSync(file) && !existsSync(join(file, 'index.html'))
|
|
160
|
+
})
|
|
161
|
+
if (missing.length) throw new Error(`no built file for ${missing.join(', ')}`)
|
|
162
|
+
return local.length ? local.join(', ') : 'no Slides or download links'
|
|
163
|
+
})
|
|
148
164
|
// Every section heading ends in a faint # that links to it (Post.astro), for sharing a section.
|
|
149
165
|
await check(label, 'every section heading has an anchor that links to it', async () => {
|
|
150
166
|
const headings = await page.evaluate(`[...document.querySelectorAll('.wrap :is(h2, h3, h4)')].filter((h) => !h.closest('astro-island, .references, .post-list')).map((h) => ({ id: h.id, text: h.textContent.trim(), href: h.querySelector('.heading-anchor')?.getAttribute('href') }))`)
|
|
@@ -276,7 +292,7 @@ for (const file of htmlPages(dist)) {
|
|
|
276
292
|
}
|
|
277
293
|
})
|
|
278
294
|
}
|
|
279
|
-
const post = path
|
|
295
|
+
const post = postPath(path)
|
|
280
296
|
if (!post) continue
|
|
281
297
|
|
|
282
298
|
// The table of contents (bloggie/lib/toc.js): every post lists its sections; the example post is used as a reader would.
|
|
@@ -297,11 +313,16 @@ for (const file of htmlPages(dist)) {
|
|
|
297
313
|
await figures(label, { screenshots: true })
|
|
298
314
|
await check(label, 'no errors while the figures were used', noProblems)
|
|
299
315
|
|
|
316
|
+
// A subpage offers no downloads unless its front matter asks for them (lib/pages.js); then there is nothing more to check.
|
|
317
|
+
if (!(await page.evaluate(`!!document.querySelector('[data-download]')`))) continue
|
|
318
|
+
|
|
300
319
|
// The interactive download, opened from disk.
|
|
301
|
-
const
|
|
302
|
-
const
|
|
320
|
+
const names = downloadNames(post)
|
|
321
|
+
const folder = post.includes('/') ? post.slice(0, post.lastIndexOf('/') + 1) : '' // labels: 'slug.html' for a post
|
|
322
|
+
const download = join(dist, 'posts', post, names.page)
|
|
323
|
+
const agentFile = join(dist, 'posts', post, names.agent)
|
|
303
324
|
for (const f of [download, agentFile]) if (existsSync(f)) files[relative(dist, f)] = { bytes: statSync(f).size, sha256: createHash('sha256').update(readFileSync(f)).digest('hex') }
|
|
304
|
-
const offline = `${
|
|
325
|
+
const offline = `${folder}${names.page} (from disk)`
|
|
305
326
|
await check(offline, 'opens from file://, and every figure hydrates, with no errors', async () => {
|
|
306
327
|
if (!existsSync(download)) throw new Error(`${download} is missing`)
|
|
307
328
|
const islands = await open(pathToFileURL(download).href)
|
|
@@ -327,7 +348,8 @@ for (const file of htmlPages(dist)) {
|
|
|
327
348
|
const frame = `document.querySelector('#slides iframe')`
|
|
328
349
|
await page.evaluate(`document.dispatchEvent(new KeyboardEvent('keydown', { key: 's', bubbles: true }))`)
|
|
329
350
|
await page.waitFor(`${frame} && !document.getElementById('slides').hidden`, { timeout: 5000, what: 'the deck frame to open' })
|
|
330
|
-
|
|
351
|
+
// A deck with no figures passes once its frame has loaded.
|
|
352
|
+
await page.waitFor(`(() => { const d = ${frame}.contentDocument; const islands = d && d.readyState === 'complete' && d.querySelector('.deck') && [...d.querySelectorAll('astro-island')]; return islands && islands.every((el) => !el.hasAttribute('ssr')) })()`, { timeout: 30000, what: 'the deck figures to hydrate' })
|
|
331
353
|
const figures = await page.evaluate(`${frame}.contentDocument.querySelectorAll('astro-island').length`)
|
|
332
354
|
const video = await page.waitFor(`(() => { const v = ${frame}.contentDocument.querySelector('video'); return !v ? 'no video' : v.readyState >= 1 && !v.error ? 'duration ' + v.duration.toFixed(1) + ' s' : '' })()`, { timeout: 20000, what: 'the deck video to load' })
|
|
333
355
|
await page.evaluate(`${frame}.contentDocument.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }))`)
|
|
@@ -338,7 +360,7 @@ for (const file of htmlPages(dist)) {
|
|
|
338
360
|
}
|
|
339
361
|
|
|
340
362
|
// The agent download: text only, one description per figure, every equation with its TeX.
|
|
341
|
-
await check(`${
|
|
363
|
+
await check(`${folder}${names.agent}`, 'has no scripts, describes every figure, and keeps the TeX of every equation', () => {
|
|
342
364
|
const agent = readFileSync(agentFile, 'utf8')
|
|
343
365
|
const html = readFileSync(file, 'utf8')
|
|
344
366
|
const count = (s, pattern) => (s.match(pattern) ?? []).length
|
package/editor/client.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// change into its slides.mdx. Slides.astro loads this file only when import.meta.env.DEV is set,
|
|
3
3
|
// so a built deck has no trace of it. The keys follow Figma's where they can.
|
|
4
4
|
//
|
|
5
|
-
// E, or Edit in the deck's nav turn editing on; Esc with nothing selected turns it off
|
|
5
|
+
// E, or Edit in the deck's nav turn editing on; Esc with nothing selected (or ✕, or Edit) turns it off.
|
|
6
|
+
// While editing, E does not turn it off: in selected text, a letter
|
|
7
|
+
// opens the block's Markdown, as Enter does
|
|
6
8
|
// click, Shift+click, drag select a block (the title, a paragraph, a list, an equation, code,
|
|
7
9
|
// a figure, a demo note), add one to the selection, draw a box
|
|
8
10
|
// around several on the slide's background
|
|
@@ -11,7 +13,8 @@
|
|
|
11
13
|
// its source, as ⌘⇧+click does (bloggie/jump/)
|
|
12
14
|
// Option+click use the figure under the pointer as a reader does
|
|
13
15
|
// drag move; it snaps to where it started and to the stage's center
|
|
14
|
-
// lines (hold ⌘ to place it freely
|
|
16
|
+
// lines (hold ⌘ to place it freely, Shift to keep it on a horizontal,
|
|
17
|
+
// vertical or 45° line, as in Figma)
|
|
15
18
|
// side / corner handle width; text size and width together
|
|
16
19
|
// ←↑→↓, Shift+←↑→↓ move 1 px, 10 px
|
|
17
20
|
// ⌘B, ⌘I, ⌘⇧> ⌘⇧< bold, italic, larger, smaller text
|
|
@@ -76,12 +79,12 @@ const RECENT_KEY = 'slide-editor:colors'
|
|
|
76
79
|
const RECENT = 10
|
|
77
80
|
|
|
78
81
|
const KEYS = [
|
|
79
|
-
['E, Esc', 'edit on; off (with nothing selected)'],
|
|
82
|
+
['E, Esc', 'edit on; off (Esc, with nothing selected)'],
|
|
80
83
|
['click, Shift+click', 'select, add to the selection'],
|
|
81
84
|
['drag the background', 'select the blocks in a box'],
|
|
82
85
|
['⌘+click, double-click', 'an element inside a block or figure'],
|
|
83
86
|
['Option+click', 'use the figure as a reader does'],
|
|
84
|
-
['drag (⌘: free)', 'move, snapping to guides'],
|
|
87
|
+
['drag (⌘: free, Shift: straight)', 'move, snapping to guides'],
|
|
85
88
|
['side / corner handle', 'width / scale'],
|
|
86
89
|
['← ↑ → ↓ (Shift)', 'move 1 px (10 px)'],
|
|
87
90
|
['⌘B, ⌘I, ⌘⇧> ⌘⇧<', 'bold, italic, text size'],
|
|
@@ -740,7 +743,7 @@ export function initEditor(deck) {
|
|
|
740
743
|
|
|
741
744
|
// Move the selected blocks together (or the element inside a block) by the pointer's travel. The
|
|
742
745
|
// one under the pointer snaps to where it started and to the stage's center lines.
|
|
743
|
-
function startMove(event, lead) {
|
|
746
|
+
function startMove(event, lead, onClick) {
|
|
744
747
|
const movers = targets().map((el) => {
|
|
745
748
|
const [x, y] = readTranslate(el)
|
|
746
749
|
return { el, unit: unitOf(el), x, y, initial: el.style.getPropertyValue('translate') || null }
|
|
@@ -752,15 +755,27 @@ export function initEditor(deck) {
|
|
|
752
755
|
const start = { x: event.clientX, y: event.clientY }
|
|
753
756
|
const within = inner
|
|
754
757
|
let moved = false
|
|
755
|
-
|
|
758
|
+
let last = null // the last pointer event, to move again when Shift goes down or up mid-drag
|
|
759
|
+
const move = (ev) => {
|
|
760
|
+
last = { clientX: ev.clientX, clientY: ev.clientY, shiftKey: ev.shiftKey, metaKey: ev.metaKey, ctrlKey: ev.ctrlKey }
|
|
756
761
|
if (!moved && Math.hypot(ev.clientX - start.x, ev.clientY - start.y) < 3) return
|
|
757
762
|
moved = true
|
|
758
763
|
dragging = true
|
|
759
|
-
let
|
|
760
|
-
let
|
|
764
|
+
let tx = ev.clientX - start.x
|
|
765
|
+
let ty = ev.clientY - start.y
|
|
766
|
+
// Shift keeps the move on a straight line: horizontal, vertical or 45°, whichever is nearest (as in Figma).
|
|
767
|
+
let diagonal = false
|
|
768
|
+
if (ev.shiftKey) {
|
|
769
|
+
const [ax, ay] = [Math.abs(tx), Math.abs(ty)]
|
|
770
|
+
if (ax > ay * Math.tan(Math.PI * 3 / 8)) ty = 0
|
|
771
|
+
else if (ay > ax * Math.tan(Math.PI * 3 / 8)) tx = 0
|
|
772
|
+
else { const d = (ax + ay) / 2; tx = Math.sign(tx) * d; ty = Math.sign(ty) * d; diagonal = true }
|
|
773
|
+
}
|
|
774
|
+
let dx = leader.x * leader.unit + tx
|
|
775
|
+
let dy = leader.y * leader.unit + ty
|
|
761
776
|
let gx = null
|
|
762
777
|
let gy = null
|
|
763
|
-
if (!(ev.metaKey || ev.ctrlKey)) {
|
|
778
|
+
if (!(ev.metaKey || ev.ctrlKey) && !diagonal) {
|
|
764
779
|
const d = deck.getBoundingClientRect()
|
|
765
780
|
const scale = stageScale()
|
|
766
781
|
const near = SNAP * scale
|
|
@@ -768,22 +783,32 @@ export function initEditor(deck) {
|
|
|
768
783
|
const centerY = d.top + (STAGE.height / 2) * scale
|
|
769
784
|
const toCenterX = centerX - home.left - home.width / 2
|
|
770
785
|
const toCenterY = centerY - home.top - home.height / 2
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
786
|
+
// A locked axis stays where it is; only the axis that moves snaps.
|
|
787
|
+
const lockX = ev.shiftKey && tx === 0
|
|
788
|
+
const lockY = ev.shiftKey && ty === 0
|
|
789
|
+
if (!lockX && Math.abs(dx) < near && Math.abs(dx) <= Math.abs(dx - toCenterX)) { dx = 0; gx = home.left }
|
|
790
|
+
else if (!lockX && Math.abs(dx - toCenterX) < near) { dx = toCenterX; gx = centerX }
|
|
791
|
+
if (!lockY && Math.abs(dy) < near && Math.abs(dy) <= Math.abs(dy - toCenterY)) { dy = 0; gy = home.top }
|
|
792
|
+
else if (!lockY && Math.abs(dy - toCenterY) < near) { dy = toCenterY; gy = centerY }
|
|
775
793
|
}
|
|
776
794
|
showGuide(guideV, gx)
|
|
777
795
|
showGuide(guideH, gy)
|
|
778
796
|
// Every element moves by the leader's travel on screen, in its own CSS px.
|
|
779
|
-
const
|
|
780
|
-
const
|
|
781
|
-
for (const m of movers) m.el.style.setProperty('translate', `${round(m.x +
|
|
782
|
-
}
|
|
797
|
+
const ox = dx - leader.x * leader.unit
|
|
798
|
+
const oy = dy - leader.y * leader.unit
|
|
799
|
+
for (const m of movers) m.el.style.setProperty('translate', `${round(m.x + ox / m.unit)}px ${round(m.y + oy / m.unit)}px`)
|
|
800
|
+
}
|
|
801
|
+
// Shift pressed or released without moving the pointer: move again with the new constraint.
|
|
802
|
+
const shift = (ev) => { if (ev.key === 'Shift' && last) move({ ...last, shiftKey: ev.type === 'keydown' }) }
|
|
803
|
+
window.addEventListener('keydown', shift, true)
|
|
804
|
+
window.addEventListener('keyup', shift, true)
|
|
805
|
+
listen(move, () => {
|
|
806
|
+
window.removeEventListener('keydown', shift, true)
|
|
807
|
+
window.removeEventListener('keyup', shift, true)
|
|
783
808
|
showGuide(guideV, null)
|
|
784
809
|
showGuide(guideH, null)
|
|
785
810
|
dragging = false
|
|
786
|
-
if (!moved) return
|
|
811
|
+
if (!moved) return onClick?.()
|
|
787
812
|
for (const m of movers) {
|
|
788
813
|
const translate = translateValue(...readTranslate(m.el))
|
|
789
814
|
applyStyle(m.el, { translate: m.initial }) // so that stage() records the value from before the drag
|
|
@@ -1430,10 +1455,11 @@ export function initEditor(deck) {
|
|
|
1430
1455
|
selectInner(block, target)
|
|
1431
1456
|
return startMove(event, inner?.el)
|
|
1432
1457
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1458
|
+
// Shift adds a block to the selection when pressed; a selected one leaves it only on a click, not a drag, so
|
|
1459
|
+
// that Shift can also keep the drag of a selection straight (startMove).
|
|
1460
|
+
if (event.shiftKey && selection.includes(block)) return startMove(event, block, () => select(selection.filter((el) => el !== block)))
|
|
1461
|
+
if (event.shiftKey) select([...selection, block])
|
|
1462
|
+
else if (!selection.includes(block) || inner) select([block])
|
|
1437
1463
|
startMove(event, block)
|
|
1438
1464
|
}, true)
|
|
1439
1465
|
|
|
@@ -1474,13 +1500,19 @@ export function initEditor(deck) {
|
|
|
1474
1500
|
if (picking || editor || typing(event.target)) return
|
|
1475
1501
|
// The palette's opacity slider keeps its arrow keys; Esc still closes the palette.
|
|
1476
1502
|
if (event.target instanceof Element && event.target.closest('.se-palette') && event.key !== 'Escape') return
|
|
1477
|
-
if (code === 'KeyE' && !mod && !alt) {
|
|
1503
|
+
if (code === 'KeyE' && !mod && !alt && !on) {
|
|
1478
1504
|
event.preventDefault()
|
|
1479
1505
|
event.stopPropagation()
|
|
1480
|
-
return
|
|
1506
|
+
return turnOn()
|
|
1481
1507
|
}
|
|
1482
1508
|
if (!on) return
|
|
1483
1509
|
const handled = () => { event.preventDefault(); event.stopPropagation() }
|
|
1510
|
+
// A letter typed into selected text edits it, as in a text box: in selected words, or with one text block
|
|
1511
|
+
// selected, it opens the block's Markdown (the letter itself is not typed, so a stray key changes nothing).
|
|
1512
|
+
const letter = key.length === 1 && /\p{L}/u.test(key) && !mod && !alt
|
|
1513
|
+
const textBlock = words ?? (!inner && selection.length === 1 && !isFigure(selection[0]) ? selection[0] : null)
|
|
1514
|
+
if (letter && textBlock) { handled(); const el = textBlock; exitWords(); return openEditor(el) }
|
|
1515
|
+
if (code === 'KeyE' && !mod && !alt) return handled() // editing stays on: Esc turns it off
|
|
1484
1516
|
// Esc goes out one level: from an element inside a block to the block, from the selection to
|
|
1485
1517
|
// nothing, and from nothing out of editing. It never leaves the deck while editing.
|
|
1486
1518
|
if (key === 'Escape') {
|
package/layouts/Post.astro
CHANGED
|
@@ -1,34 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
// Layout of a post: src/pages/posts/<slug>/index.mdx sets `layout: ../../../layouts/Post.astro`.
|
|
3
|
+
// A subpage (lib/pages.js: any other .mdx page under src/pages/posts/) uses the same layout.
|
|
3
4
|
// Front matter: title, date, edited (the date of the last edit, shown after the date when it is later),
|
|
4
5
|
// description, eyebrow, lede, author, slides (false hides a deck that exists),
|
|
6
|
+
// downloads (whether the byline offers the two downloads; true for a post, false for a subpage, by default),
|
|
5
7
|
// equationNumbers (false turns numbering off), toc (false hides the table of contents),
|
|
6
8
|
// agentSummary (a short statement of the post's question, placed at the top of the agent download).
|
|
7
9
|
// `roles` is set by remarkRoles (bloggie/lib/roles.js): the symbol roles the post's math uses, shown as a key.
|
|
8
10
|
import { existsSync } from 'node:fs'
|
|
9
|
-
import { dirname, join } from 'node:path'
|
|
11
|
+
import { basename, dirname, join } from 'node:path'
|
|
10
12
|
import { createMarkdownProcessor } from '@astrojs/markdown-remark'
|
|
11
13
|
import Base from './Base.astro'
|
|
12
14
|
import { site, longDate, isoDate } from '@/site.js'
|
|
13
15
|
import { siteUrl } from '../lib/site-url.js'
|
|
14
16
|
import { roles } from '../lib/roles.js'
|
|
17
|
+
import { pagePath, offersDownloads, downloadNames } from '../lib/pages.js'
|
|
15
18
|
|
|
16
19
|
const { frontmatter, file } = Astro.props
|
|
17
20
|
// The lede is Markdown (links, emphasis, code): front matter is plain data, so render it here, and
|
|
18
21
|
// strip the <p> the processor wraps it in.
|
|
19
22
|
const markdown = await createMarkdownProcessor()
|
|
20
23
|
const lede = frontmatter.lede && (await markdown.render(frontmatter.lede)).code.replace(/^\s*<p>|<\/p>\s*$/g, '')
|
|
21
|
-
// A
|
|
22
|
-
// the S key opens it. Without one, neither appears.
|
|
23
|
-
|
|
24
|
+
// A page has a deck when it is an index.mdx with slides.mdx beside it, at any depth; the byline then links to it
|
|
25
|
+
// and the S key opens it. Without one, neither appears. A file subpage (<name>.mdx) shares its folder with its post's
|
|
26
|
+
// index.mdx, so slides.mdx there is the post's deck, not the subpage's; a subpage with a deck is a folder,
|
|
27
|
+
// <name>/index.mdx and <name>/slides.mdx.
|
|
28
|
+
const hasSlides = frontmatter.slides !== false && !!file && basename(file) === 'index.mdx' && existsSync(join(dirname(file), 'slides.mdx'))
|
|
24
29
|
// Absolute, so the link works whether or not the post's URL ends in a slash.
|
|
25
30
|
const postHref = Astro.url.pathname.replace(/\/?$/, '/')
|
|
26
31
|
const slidesHref = `${postHref}slides/`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
const path = pagePath(postHref, import.meta.env.BASE_URL) ?? postHref.split('/').filter(Boolean).at(-1)
|
|
33
|
+
// bloggie/scripts/export-posts.js writes both files beside the page after `astro build`, for each page whose byline
|
|
34
|
+
// offers them (the [data-download] control).
|
|
35
|
+
const downloads = offersDownloads(frontmatter, path) ? downloadNames(path) : null
|
|
36
|
+
// A heading's anchor copies a link to the deployed page, even from a downloaded copy.
|
|
37
|
+
const shareUrl = new URL(`posts/${path}/`, siteUrl).href
|
|
32
38
|
const keyRoles = roles.filter((role) => frontmatter.roles?.includes(role.name))
|
|
33
39
|
---
|
|
34
40
|
<Base title={frontmatter.title} description={frontmatter.description}>
|
|
@@ -45,7 +51,7 @@ const keyRoles = roles.filter((role) => frontmatter.roles?.includes(role.name))
|
|
|
45
51
|
<time datetime={isoDate(frontmatter.date)}>{longDate(frontmatter.date)}</time>
|
|
46
52
|
{frontmatter.edited && isoDate(frontmatter.edited) > isoDate(frontmatter.date) && <>{' '}(edited <time datetime={isoDate(frontmatter.edited)}>{longDate(frontmatter.edited)}</time>)</>}
|
|
47
53
|
{hasSlides && <><span aria-hidden="true">/</span> <a href={slidesHref} data-slides-link title="Slides (S)">Slides</a></>}
|
|
48
|
-
|
|
54
|
+
{downloads && <><span aria-hidden="true">/</span>
|
|
49
55
|
<span class="download" data-download>
|
|
50
56
|
<a class="download-main" href={`${postHref}${downloads.page}`} download={downloads.page}
|
|
51
57
|
title="Download this post as one HTML file with working figures" aria-label="Download this post as one HTML file with working figures">
|
|
@@ -64,7 +70,7 @@ const keyRoles = roles.filter((role) => frontmatter.roles?.includes(role.name))
|
|
|
64
70
|
</a>
|
|
65
71
|
</div>
|
|
66
72
|
</details>
|
|
67
|
-
</span
|
|
73
|
+
</span></>}
|
|
68
74
|
</div>
|
|
69
75
|
{keyRoles.length > 0 && (
|
|
70
76
|
<p class="role-key">
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// rehype plugin, after KaTeX: keep inline math on one line with the punctuation that touches it.
|
|
2
|
+
//
|
|
3
|
+
// KaTeX draws inline math as inline-block boxes, and a browser may break the line between the last box and a "." or ","
|
|
4
|
+
// that follows it, so the punctuation starts the next line. This wraps the math, the closing punctuation right after it
|
|
5
|
+
// and an opening bracket right before it in <span class="math-nowrap">, an inline-block (site.css), so that no line breaks between them.
|
|
6
|
+
// `white-space: nowrap` on the following text, or a word joiner (U+2060), does not stop Chrome from breaking there.
|
|
7
|
+
// Display math is left alone.
|
|
8
|
+
|
|
9
|
+
const CLOSING = /^[.,;:!?)\]}’”…]+/
|
|
10
|
+
const OPENING = /[([{‘“]$/
|
|
11
|
+
|
|
12
|
+
const isInlineMath = (node) => node?.type === 'element' && node.properties?.className?.includes?.('katex')
|
|
13
|
+
|
|
14
|
+
function visit(node) {
|
|
15
|
+
if (!node.children) return
|
|
16
|
+
if (node.properties?.className?.includes?.('katex-display')) return
|
|
17
|
+
for (let i = 0; i < node.children.length; i++) {
|
|
18
|
+
const math = node.children[i]
|
|
19
|
+
if (!isInlineMath(math)) {
|
|
20
|
+
visit(math)
|
|
21
|
+
continue
|
|
22
|
+
}
|
|
23
|
+
const before = node.children[i - 1]
|
|
24
|
+
const after = node.children[i + 1]
|
|
25
|
+
const closing = after?.type === 'text' ? after.value.match(CLOSING)?.[0] : null
|
|
26
|
+
const opening = before?.type === 'text' ? before.value.match(OPENING)?.[0] : null
|
|
27
|
+
if (!closing && !opening) continue
|
|
28
|
+
const held = [math]
|
|
29
|
+
if (closing) {
|
|
30
|
+
held.push({ type: 'text', value: closing })
|
|
31
|
+
after.value = after.value.slice(closing.length)
|
|
32
|
+
}
|
|
33
|
+
if (opening) {
|
|
34
|
+
held.unshift({ type: 'text', value: opening })
|
|
35
|
+
before.value = before.value.slice(0, -opening.length)
|
|
36
|
+
}
|
|
37
|
+
node.children[i] = { type: 'element', tagName: 'span', properties: { className: ['math-nowrap'] }, children: held }
|
|
38
|
+
}
|
|
39
|
+
node.children = node.children.filter((child) => child.type !== 'text' || child.value !== '')
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default function rehypeMathPunctuation() {
|
|
43
|
+
return (tree) => visit(tree)
|
|
44
|
+
}
|