meowslides 0.0.0-stage → 0.1.0-alpha.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/LICENSE +21 -0
- package/PRESENTATION-LAYOUTS.md +328 -0
- package/PRESENTATION.md +163 -0
- package/README.md +180 -2
- package/dist/src/build/compiler.d.ts +13 -0
- package/dist/src/build/compiler.js +378 -0
- package/dist/src/build/index.d.ts +40 -0
- package/dist/src/build/index.js +279 -0
- package/dist/src/cli.d.ts +8 -0
- package/dist/src/cli.js +51 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/mdx.d.ts +26 -0
- package/dist/src/mdx.js +22 -0
- package/dist/src/presentation/context.d.ts +12 -0
- package/dist/src/presentation/context.js +25 -0
- package/dist/src/presentation/diagnostics.d.ts +2 -0
- package/dist/src/presentation/diagnostics.js +96 -0
- package/dist/src/presentation/image.d.ts +21 -0
- package/dist/src/presentation/image.js +20 -0
- package/dist/src/presentation/index.d.ts +11 -0
- package/dist/src/presentation/index.js +9 -0
- package/dist/src/presentation/layout.d.ts +16 -0
- package/dist/src/presentation/layout.js +13 -0
- package/dist/src/presentation/list.d.ts +14 -0
- package/dist/src/presentation/list.js +13 -0
- package/dist/src/presentation/media.d.ts +32 -0
- package/dist/src/presentation/media.js +163 -0
- package/dist/src/presentation/presentation-text.d.ts +17 -0
- package/dist/src/presentation/presentation-text.js +15 -0
- package/dist/src/presentation/presentation-text.options.d.ts +3 -0
- package/dist/src/presentation/presentation-text.options.js +4 -0
- package/dist/src/presentation/presentation.d.ts +12 -0
- package/dist/src/presentation/presentation.js +394 -0
- package/dist/src/presentation/reveal.d.ts +20 -0
- package/dist/src/presentation/reveal.js +51 -0
- package/dist/src/presentation/transition.d.ts +16 -0
- package/dist/src/presentation/transition.js +84 -0
- package/dist/src/presentation/types.d.ts +51 -0
- package/dist/src/presentation/types.js +22 -0
- package/dist/src/registry.d.ts +51 -0
- package/dist/src/registry.js +32 -0
- package/dist/src/shared/layout-style.d.ts +4 -0
- package/dist/src/shared/layout-style.js +13 -0
- package/dist/src/theme/index.d.ts +233 -0
- package/dist/src/theme/index.js +33 -0
- package/dist/src/theme/mdx.styles.d.ts +2 -0
- package/dist/src/theme/mdx.styles.js +92 -0
- package/dist/src/theme/presentation/image.styles.d.ts +1 -0
- package/dist/src/theme/presentation/image.styles.js +68 -0
- package/dist/src/theme/presentation/layout.styles.d.ts +1 -0
- package/dist/src/theme/presentation/layout.styles.js +53 -0
- package/dist/src/theme/presentation/list.styles.d.ts +1 -0
- package/dist/src/theme/presentation/list.styles.js +25 -0
- package/dist/src/theme/presentation/presentation-text.styles.d.ts +1 -0
- package/dist/src/theme/presentation/presentation-text.styles.js +37 -0
- package/dist/src/theme/presentation/presentation.styles.d.ts +1 -0
- package/dist/src/theme/presentation/presentation.styles.js +346 -0
- package/dist/src/theme/presentation/presentation.tokens.d.ts +26 -0
- package/dist/src/theme/presentation/presentation.tokens.js +31 -0
- package/package.json +64 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lidessen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# Presentation content layout
|
|
2
|
+
|
|
3
|
+
Decide what the audience needs to read first, divide regions accordingly, then place content.
|
|
4
|
+
`PresentationLayout` is the generic page skeleton; titles, text-image, comparison, number, process and
|
|
5
|
+
summary continue to compose existing components. The runnable six-page composition is in Meowbook's
|
|
6
|
+
`presentation-layouts`, and does not change the existing image presentation or English courseware.
|
|
7
|
+
`presentation-foundations` separately uses three real presentation pages to show numeric column counts,
|
|
8
|
+
native lists, photo cropping and the complete display of a text diagram.
|
|
9
|
+
|
|
10
|
+
## Regions and proportions
|
|
11
|
+
|
|
12
|
+
Import `PresentationLayout` from `meowslides`; the root entry point re-exports the same implementation.
|
|
13
|
+
`header` and `footer` accept ordinary Child and keep natural height; `children` enter the body, which
|
|
14
|
+
takes the remaining height. Omitting any slot leaves no empty row or extra spacing. The skeleton adds
|
|
15
|
+
no extra edges and follows the Presentation canvas inset.
|
|
16
|
+
|
|
17
|
+
| Relationship | `columns` | Suitable content |
|
|
18
|
+
| --------------------------------- | ------------------------- | ------------------------------------------------------------------------- |
|
|
19
|
+
| Single reading axis | `single` (default) or `1` | Title, quote, summary, or a further Grid inside |
|
|
20
|
+
| Equal importance | `equal` or `2` | Two options, before/after comparison, two sets of evidence |
|
|
21
|
+
| Three equal regions | `3` | Three short groups of points, a few steps, or a comparison of three sides |
|
|
22
|
+
| Main content at the logical start | `wide-start` | A number or main image takes 2 parts and the side note 1 part |
|
|
23
|
+
| Main content at the logical end | `wide-end` | An explanation takes 1 part and the image or experiment 2 parts |
|
|
24
|
+
|
|
25
|
+
Numerical `1 | 2 | 3` means the number of equal-width logical columns, and the existing string usage
|
|
26
|
+
stays unchanged. Usually provide as many direct children as columns; more than the column count adds
|
|
27
|
+
rows as in an ordinary grid, and the amount of content on the finite canvas still needs checking. More
|
|
28
|
+
complex regions continue to compose Grid inside `single`; do not turn every composition into a new
|
|
29
|
+
template. `gap` uses none/compact/normal/relaxed, default normal; the theme's
|
|
30
|
+
`presentationTokens.spaceGroup`, `spaceSection` and `spacePanel` decide within-group, region and wider
|
|
31
|
+
spacing, independent of toolbar control spacing.
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { Stack } from "meowtail";
|
|
35
|
+
import { PresentationImage, PresentationLayout } from "meowslides";
|
|
36
|
+
|
|
37
|
+
<PresentationLayout
|
|
38
|
+
columns="wide-end"
|
|
39
|
+
header={<h2>One point, with an image that explains it</h2>}
|
|
40
|
+
footer={<small>Sources, conditions and necessary notes</small>}
|
|
41
|
+
>
|
|
42
|
+
<Stack justify="center">
|
|
43
|
+
<p>A short claim and its applicable conditions.</p>
|
|
44
|
+
</Stack>
|
|
45
|
+
<PresentationImage
|
|
46
|
+
src={image}
|
|
47
|
+
alt="Describe what the image expresses"
|
|
48
|
+
ratio="fill"
|
|
49
|
+
caption="Explain the relationship to observe in the image."
|
|
50
|
+
/>
|
|
51
|
+
</PresentationLayout>;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Here the body provides finite height, the image uses the remaining space, and the caption keeps
|
|
55
|
+
natural height. After replacing it with a real image, still check the aspect ratio and complete edges.
|
|
56
|
+
The skeleton does not download assets, does not crop by default, and does not treat text inside images
|
|
57
|
+
as accessible body content.
|
|
58
|
+
|
|
59
|
+
## Body lists
|
|
60
|
+
|
|
61
|
+
`PresentationList` accepts `items: readonly Child[]`, each item automatically forms a native li, using
|
|
62
|
+
ul by default. When order matters, specify `as="ol"`; native attributes such as `start` and `reversed`
|
|
63
|
+
still land on the list element; do not hand-write duplicate numbers.
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
<PresentationLayout columns={3} header={<h2>Three regions use the same reading scale</h2>}>
|
|
67
|
+
<PresentationList items={["Record observations.", "Keep the sources."]} />
|
|
68
|
+
<PresentationList
|
|
69
|
+
as="ol"
|
|
70
|
+
items={["Compare under the same conditions.", "Point out the differences."]}
|
|
71
|
+
/>
|
|
72
|
+
<PresentationList
|
|
73
|
+
as="ol"
|
|
74
|
+
start={3}
|
|
75
|
+
reversed
|
|
76
|
+
items={["Converge on the problem.", "Explain the conclusion.", "Propose the next step."]}
|
|
77
|
+
/>
|
|
78
|
+
</PresentationLayout>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Lists follow `presentationTokens.fontBody` (28px by default in the standard theme) and the
|
|
82
|
+
presentation line height and group spacing, adding no separate size/density. They do not auto-shrink
|
|
83
|
+
type based on content amount; three columns even less so can take unbounded long content. Keep a small
|
|
84
|
+
number of explainable points first; when too long, trim, split pages or adjust regions, and still
|
|
85
|
+
observe the overflow diagnostic and the actual reading result.
|
|
86
|
+
|
|
87
|
+
## Body images and captions
|
|
88
|
+
|
|
89
|
+
`PresentationImage` requires `src` and a meaningful `alt`, and reuses ImagePreview's loading, failure
|
|
90
|
+
feedback and events. The optional `caption` is an ordinary Child, rendered as a natural-height
|
|
91
|
+
figcaption inside the native figure; it is not decorative text floating over the image. Do not leave
|
|
92
|
+
key text inside an image only in pixels; still provide alternative text or a real body explanation.
|
|
93
|
+
|
|
94
|
+
`ratio` defaults to `16 / 9`, and a positive finite number can also be passed as the box's preferred
|
|
95
|
+
ratio; `ratio="fill"` uses the remaining height allocated by a finite parent. fill does not find
|
|
96
|
+
screen height on its own: put it directly in the PresentationLayout body, or in an existing finite
|
|
97
|
+
Stack's `LayoutItem grow basis={0}` region, then keep the natural height of other text. When the parent
|
|
98
|
+
height is uncertain, use a numeric ratio.
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
<PresentationImage
|
|
102
|
+
src={photo}
|
|
103
|
+
alt="Describe the subject and the observable environment"
|
|
104
|
+
ratio="fill"
|
|
105
|
+
fit="cover"
|
|
106
|
+
position="top right"
|
|
107
|
+
caption="A photo that allows cropping still needs the subject checked for completeness."
|
|
108
|
+
/>;
|
|
109
|
+
<PresentationImage
|
|
110
|
+
src={diagram}
|
|
111
|
+
alt="Use real text to explain the relationships in the image"
|
|
112
|
+
ratio={4 / 3}
|
|
113
|
+
caption="Text diagrams are fully shown by default."
|
|
114
|
+
/>;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`fit` defaults to contain, keeping the complete image; cover must be chosen explicitly and allows
|
|
118
|
+
cropping. When ratios differ, keeping all content and filling the region cannot both hold: text
|
|
119
|
+
diagrams, charts and evidence images prefer contain, and blank space is the normal result of a ratio
|
|
120
|
+
difference; choose cover for photos only when the edges can be discarded, and actually look at the
|
|
121
|
+
subject and the crop. `position` defaults to center, with top/bottom/left/right, top left/top
|
|
122
|
+
right/bottom left/bottom right available.
|
|
123
|
+
|
|
124
|
+
caption, page title and footer all take natural height, and media uses only the remainder. A long
|
|
125
|
+
caption reduces the picture space, and fill cannot guarantee that arbitrary content fits; numeric
|
|
126
|
+
ratios must also be checked together with the whole-page capacity. Do not let the image fill the body
|
|
127
|
+
first and then squeeze the caption into the footer. Complex media compositions can still use Stack +
|
|
128
|
+
LayoutItem; AspectRatio suits natural-ratio placeholders and does not replace the finite height budget.
|
|
129
|
+
|
|
130
|
+
## Choosing a composition
|
|
131
|
+
|
|
132
|
+
| Purpose | Minimal composition |
|
|
133
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
134
|
+
| Title and claim | single + Stack justify="center"; main title, subtitle and context |
|
|
135
|
+
| Text-image split | wide-start/wide-end + PresentationImage; choose primary and secondary by the importance of the evidence |
|
|
136
|
+
| Side-by-side comparison | equal; use the same heading hierarchy and comparison axis, and avoid greatly different content amounts |
|
|
137
|
+
| Key number | wide-start; number, unit and conditions form one region, explanations and sources go elsewhere, illustrative values are clearly marked |
|
|
138
|
+
| Process or timeline | single + native ol/li inside Grid/Stack; keep order semantics, compose Reveal when necessary |
|
|
139
|
+
| Quote or summary | single + blockquote/Stack; distinguish the quote, the author's conclusion, the source and the next step |
|
|
140
|
+
|
|
141
|
+
Reading font sizes come from the existing
|
|
142
|
+
`presentationTokens.fontTitle/fontSubtitle/fontBody/fontCaption`. Headings that truly need emphasis can
|
|
143
|
+
use `PresentationText` editorial or marker; body text is plain by default, and not every page needs
|
|
144
|
+
artistic treatment. It remains real text that can be selected, wrapped and copied; native
|
|
145
|
+
contenteditable is only a seam and does not constitute an editor. Print and forced-colors keep
|
|
146
|
+
ordinary text.
|
|
147
|
+
|
|
148
|
+
## Backgrounds and reading area
|
|
149
|
+
|
|
150
|
+
Presentation.background sets the deck default, and SlideDefinition.background can fully override per
|
|
151
|
+
page. Both accept `SlideBackground` or its Signal; when the page value is undefined it inherits the
|
|
152
|
+
deck, and when the deck is undefined it follows the theme. An explicit `"theme"` returns to the theme
|
|
153
|
+
background and text and does not inherit the deck's image, overlay or colors. Fields in the object do
|
|
154
|
+
not merge with the deck object; when fill is omitted, the theme paper color is used.
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
const slides: readonly SlideDefinition[] = [
|
|
158
|
+
{
|
|
159
|
+
id: "opening",
|
|
160
|
+
title: "Opening",
|
|
161
|
+
background: {
|
|
162
|
+
fill: "#173d36",
|
|
163
|
+
image: { src: coast, fit: "cover", position: "top right" },
|
|
164
|
+
overlay: "linear-gradient(90deg, rgba(12, 34, 31, .9), rgba(12, 34, 31, .15))",
|
|
165
|
+
foreground: "light",
|
|
166
|
+
},
|
|
167
|
+
render: () => (
|
|
168
|
+
<PresentationLayout>
|
|
169
|
+
<h1>Keep the reading area clear</h1>
|
|
170
|
+
</PresentationLayout>
|
|
171
|
+
),
|
|
172
|
+
},
|
|
173
|
+
];
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
fill and overlay use CSS colors or gradients. image.fit defaults to cover, with contain available;
|
|
177
|
+
position defaults to center, with top/bottom/left/right, top left/top right/bottom left/bottom right
|
|
178
|
+
available. cover allows cropping, while contain keeps the complete ratio and reveals the base color;
|
|
179
|
+
check the actual positions of image and text, and do not rely on background details to convey key
|
|
180
|
+
facts. foreground's light/dark refers to text color, and omitting it uses the theme text; it does not
|
|
181
|
+
detect the image or automatically judge contrast.
|
|
182
|
+
|
|
183
|
+
The background covers the whole 1280×720 canvas and crops its own decoration independently; the body
|
|
184
|
+
still uses the original inset and overflow diagnostic. After an image error, fill, overlay and
|
|
185
|
+
foreground are still kept, so actually check readability without the image and do not treat a
|
|
186
|
+
successful download as a prerequisite for readability. The background does not enter the accessibility
|
|
187
|
+
tree; images that carry content meaning keep body text, alt and explanation, and are not moved into the
|
|
188
|
+
decorative layer. A background Signal can update on the same page without remounting the draft, media
|
|
189
|
+
or content instance; video still uses the body media components and is not a background input.
|
|
190
|
+
Updating the background on the same page only replaces the decorative layer and does not trigger the
|
|
191
|
+
page-change entrance animation. The running scene `presentation-backgrounds` lets you observe the deck
|
|
192
|
+
gradient, per-page image, contain, theme reset, dark, failure and dynamic updates.
|
|
193
|
+
|
|
194
|
+
## Canvas and reflow boundaries
|
|
195
|
+
|
|
196
|
+
Presentation's logical canvas is 1280×720. Narrow or short windows scale as a whole with contain, and
|
|
197
|
+
two columns are not silently turned into a top-bottom arrangement; the named ratios of this skeleton
|
|
198
|
+
belong to the logical canvas. When a mobile-first reading page is needed, use Container/Stack/Grid
|
|
199
|
+
natural layout instead, and do not carry lots of body text through presentation scaling. `RegionLayout`
|
|
200
|
+
targets tool areas, named regions and scroll owners, and is not a presentation document schema.
|
|
201
|
+
|
|
202
|
+
The finite canvas cannot hold arbitrary long text. A long title takes natural height first, and the
|
|
203
|
+
body region may therefore be insufficient; by default it does not crop, auto-shrink text or add hidden
|
|
204
|
+
scrolling, and keeps Presentation's overflow diagnostic. Prefer trimming, splitting pages or
|
|
205
|
+
rearranging regions, then observe the target size; original-size mode cannot replace readability
|
|
206
|
+
acceptance. Reveal keeps region geometry while hidden, so progressive appearance does not suddenly push
|
|
207
|
+
adjacent content away. To repeatedly show and hide by local state, use `Reveal when={shown}`, one of the
|
|
208
|
+
two options with `at`, reusing the same placeholder, focus and activity permission contract. Authors
|
|
209
|
+
add a class to the content layer with `slideClassName`, avoiding extending content heading rules from
|
|
210
|
+
the Presentation root into the surrounding navigation. Body content that does not fit inside a named
|
|
211
|
+
region gets a diagnostic; explicit inner scroll areas are not counted as canvas overflow by all their
|
|
212
|
+
scrolled content.
|
|
213
|
+
|
|
214
|
+
Verify widescreen full pages, narrow screens, short windows, plus real images, the longest titles and
|
|
215
|
+
the final step. Meowbook ready and static screenshots do not prove interaction, media or animation
|
|
216
|
+
contracts; verify these separately according to the work's actual capabilities.
|
|
217
|
+
|
|
218
|
+
## Teaching segments and retractable scaffolds
|
|
219
|
+
|
|
220
|
+
First clarify the student task, observable output, basis and feedback, then choose a composition above.
|
|
221
|
+
The task and original material can be visible at the same time, while hints, reference expressions and
|
|
222
|
+
the teacher's basis marks appear separately. Do not treat page count, asset amount or animation count
|
|
223
|
+
as learning goals, and do not require finishing the lesson plan before previewing; try one segment
|
|
224
|
+
first, then adjust the content and state that most affect understanding.
|
|
225
|
+
|
|
226
|
+
Candidate answers or situations inside the canvas expand directly into clickable text, option blocks or
|
|
227
|
+
cards, and do not hide teaching options in a dropdown select. Buttons and writing areas use this
|
|
228
|
+
presentation's font, scale, color and shape; native button/input semantics, keyboard, focus and visible
|
|
229
|
+
selection feedback still need to be kept. Hint actions and answer areas keep a recognizable
|
|
230
|
+
relationship, and do not replace the slide composition with a set of ordinary application forms; the
|
|
231
|
+
surrounding player outline remains independent navigation. When supporting areas show and hide
|
|
232
|
+
repeatedly, keep natural layout slots and keep the reading area and button positions stable; hiding
|
|
233
|
+
still exits the keyboard and accessibility tree. Default, single-open and fully-open all need actual
|
|
234
|
+
viewing; do not judge usability only by whether the maximally expanded state overflows. Fixed reference
|
|
235
|
+
examples should clearly correspond to the segment and not pretend to be automatic scoring of the
|
|
236
|
+
current choice.
|
|
237
|
+
|
|
238
|
+
The running case is the user-specified "Grade 8, Volume 1, Unit 5 Wild animals — Reading: Protecting
|
|
239
|
+
pandas". The following activities, questions and sentence frames are all teaching adaptations, not
|
|
240
|
+
textbook quotations, and not a complete courseware or directly runnable story; do not infer edition or
|
|
241
|
+
page numbers from them. Following the organizational thread of the studied real 16-page PPT and seven
|
|
242
|
+
teaching materials, first try a key segment of about eight minutes, entering from one clue among the
|
|
243
|
+
verified growth information into the problem and protection, without requiring all of the Reading to be
|
|
244
|
+
covered in eight minutes. Specific original textbook sentences, growth points and problem details are
|
|
245
|
+
checked item by item before formal production; unverified places stay marked as pending verification,
|
|
246
|
+
and generated text is not used to fill in as textbook content. This case and Grade 8 Volume 2 Sunshine
|
|
247
|
+
for all / Welcome are different works; the latter's name, content and entry point are unchanged.
|
|
248
|
+
|
|
249
|
+
| Reading progression | Student task and observable output | Basis and feedback |
|
|
250
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
|
|
251
|
+
| Growth information | Find one growth change in the verified materials and form a short chronological record | Fill in age, food or survival conditions only with verified information; do not give protection conclusions in advance |
|
|
252
|
+
| Problem and consequences | Explain one problem and its corresponding consequence in your own words, and mark the original sentences that support the expression | Locate the problem and the consequence separately; do not fill in textbook facts from images or common sense |
|
|
253
|
+
| Conservation measures | Connect one measure to the problem it responds to and explain the basis | If the original text does not prove the measure's effect, do not treat a successful matching as an effectiveness assessment |
|
|
254
|
+
| Personal action | Each person proposes one action and explains how it relates to the problem; a partner checks the reason | Accept different reasonable expressions; distinguish textbook measures from actions proposed by students |
|
|
255
|
+
|
|
256
|
+
Each person first independently marks one basis, each pair organizes one "problem, consequence,
|
|
257
|
+
measure" relationship, then each forms a personal action expression with reasons. The growth record
|
|
258
|
+
serves understanding the problem; do not let timeline organization take up the whole sharing time.
|
|
259
|
+
Feedback looks at whether it points back to the original text, whether the relationship holds, and
|
|
260
|
+
whether the action reason responds to the problem; student suggestions are not original textbook
|
|
261
|
+
sentences and cannot pretend to be verified conservation results.
|
|
262
|
+
|
|
263
|
+
Use one reading axis with `single` for the selected material, or `equal` to place the original text and
|
|
264
|
+
the student's relationship record side by side; for the first round try only one composition. Keep the
|
|
265
|
+
original sentences; do not replace the original text with the annotated result. Necessary keywords,
|
|
266
|
+
highlights or relationship lines point to the corresponding text and have textual relationship
|
|
267
|
+
explanations, indicating growth order, problem/consequence or measure response separately; do not draw
|
|
268
|
+
decorative lines as data trends. Reference expressions use ordinary body text and do not convey
|
|
269
|
+
evidence through background images.
|
|
270
|
+
|
|
271
|
+
| Revisit state | What students see and do | Teacher feedback and scaffolding |
|
|
272
|
+
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
273
|
+
| First reading | Original text, questions, blank record; find the basis independently first | Do not show keywords, conclusion-style headings or reference sentences |
|
|
274
|
+
| Request a hint | The original text is unchanged; add the locating words for growth / problem / action as needed | Only help locate; do not classify the original sentences for the students directly |
|
|
275
|
+
| Compare explanations | First hear or view the student's expression, then place the original sentences for problem, consequence and measure side by side | Give a complete example when needed, then withdraw to keywords or sentence frames; no need to show everything |
|
|
276
|
+
| Withdraw scaffolding | Keep the original text and the student's draft available, hide examples and sentence frames, and rewrite independently | Students can still request hints again; asking for help does not clear the draft |
|
|
277
|
+
| Revisit or redo | Going back to revisit keeps the draft; only an explicit "answer again" clears this question's record | When switching to new material, explicitly reset this question's hints; do not silently clear other tasks |
|
|
278
|
+
|
|
279
|
+
When a complete example is needed, first form one example from the verified original-text basis and
|
|
280
|
+
classroom expression, then withdraw to growth / problem / result / action, or provide teaching-adapted
|
|
281
|
+
sentence frames such as "The text describes __. The suggested action is __." and "I could __ because
|
|
282
|
+
__.". Fill the blanks with verified reading information or student suggestions, and do not pre-fill
|
|
283
|
+
unverified textbook facts. The order and number of layers are decided by student needs; the final
|
|
284
|
+
expression need not reproduce the example word for word; after withdrawing scaffolding, locating words
|
|
285
|
+
or sentence frames can still be restored. "What could you do, and why?" is also a teaching-adapted
|
|
286
|
+
question; discuss different suggestions by the relationship between action and basis, without a
|
|
287
|
+
single-option score.
|
|
288
|
+
|
|
289
|
+
Time can initially be tried as one minute of independent reading, two minutes of partner expression,
|
|
290
|
+
two minutes of whole-class comparison, two minutes of independent rewriting and one minute of
|
|
291
|
+
feedback; adjust according to actual output. When sharing, listeners also need to check the basis or
|
|
292
|
+
revise one sentence, rather than only letting a few fluent speakers report repeatedly. The time budget
|
|
293
|
+
is used to preserve learning opportunities and does not drive automatic answer reveal; when materials
|
|
294
|
+
are too full, trim or split first.
|
|
295
|
+
|
|
296
|
+
### Wiring and acceptance boundaries
|
|
297
|
+
|
|
298
|
+
`Reveal at={n}` only appears cumulatively when `step >= n`, and hides after going back before the
|
|
299
|
+
threshold; it keeps geometry, and hidden content exits the keyboard and accessibility tree. Use it for
|
|
300
|
+
necessary sequencing; stable sentence frames for repetition can be presented statically and do not
|
|
301
|
+
need animation for every sentence. `transition` only decorates entrances, and background only decorates
|
|
302
|
+
the canvas; neither defines teaching feedback.
|
|
303
|
+
|
|
304
|
+
In the example above, the local hint toggle, scaffolding levels and draft are different work states,
|
|
305
|
+
held by the work's ordinary signals. The hint area is wired to `Reveal when={shown}` to keep the layout
|
|
306
|
+
slot; `at` and `when` are alternatives, and increasing the step does not automatically withdraw old
|
|
307
|
+
`at` content. Withdrawing scaffolding can also mean the next task no longer provides example
|
|
308
|
+
sentences, without turning every teaching choice into a button or runtime state. Do not hand-write
|
|
309
|
+
another visibility / inert / aria-hidden / focus fallback in the work to replace the shared Reveal.
|
|
310
|
+
Drafts persist across pages in the work session, while page DOM and media still unmount according to
|
|
311
|
+
the existing lifecycle, and re-entering does not autoplay sound. Showing and hiding belong to classroom
|
|
312
|
+
presentation, not permissions or anti-cheating; reference answers may still be inspectable after they
|
|
313
|
+
enter the audience bundle.
|
|
314
|
+
|
|
315
|
+
There is currently no dedicated word-selection cloze authoring tool, repeated show/hide-per-blank
|
|
316
|
+
component, evidence highlight-line editor, scaffolding level component or scoring engine. These are
|
|
317
|
+
needs to keep validating against real authoring difficulties; do not derive a new API from this example
|
|
318
|
+
or implement all capabilities at once. Ordinary signals can carry state, but that does not mean the
|
|
319
|
+
library already provides the structure, default visuals or accessibility guarantees for these teaching
|
|
320
|
+
interactions.
|
|
321
|
+
|
|
322
|
+
Preview coverage of all key states in the tables, especially the title/caption when no hint is shown,
|
|
323
|
+
whether the answer is still leaked after withdrawal, requesting help again, going back and redoing; the
|
|
324
|
+
longest student draft, the target projection size and narrow short windows also need actual viewing.
|
|
325
|
+
Keyboard operation needs readable names, visible focus and clear state; hidden answers should not
|
|
326
|
+
remain readable by assistive technology, and feedback cannot rely only on color or connecting lines. A
|
|
327
|
+
static fully-expanded screenshot cannot prove these behaviors, and without real classroom observation,
|
|
328
|
+
operational checks cannot be reported as learning outcomes.
|
package/PRESENTATION.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Player and lifecycle contract
|
|
2
|
+
|
|
3
|
+
`meowslides` provides `Presentation`, `Reveal`, `PresentationVideo`, `PresentationAudio` and
|
|
4
|
+
`usePresentationActivity`; the root entry point re-exports the same implementations, keeping the same
|
|
5
|
+
MeowJSX/Context/theme identity. The content area uses the replaceable header/footer of
|
|
6
|
+
`PresentationLayout`, `1 | 2 | 3` equal-width columns or the existing named column ratios; common
|
|
7
|
+
title, text-image, comparison, number, process and summary compositions are in
|
|
8
|
+
[Presentation content layout](PRESENTATION-LAYOUTS.md).
|
|
9
|
+
`PresentationList items={...}` renders a native ul/li, and `as="ol"` can still pass start/reversed; it
|
|
10
|
+
uses the presentation body token (28px by default in the standard theme), adds no separate
|
|
11
|
+
size/density, and does not automatically compress infinitely long content.
|
|
12
|
+
Body images use `PresentationImage src alt`, defaulting to 16:9, contain and center; the caption keeps
|
|
13
|
+
its natural height and reuses ImagePreview's loading/failure feedback.
|
|
14
|
+
A numeric ratio is the preferred box ratio; `ratio="fill"` must receive space from a finite parent;
|
|
15
|
+
captions also count against the content budget.
|
|
16
|
+
cover must be chosen explicitly, and position uses the same nine points as the background; when ratios
|
|
17
|
+
differ, showing the whole image and filling the area trade off — prefer contain for text images.
|
|
18
|
+
Meowbook's `presentation-foundations` lets you actually inspect two columns, three columns, a list, a
|
|
19
|
+
photo cover and a text diagram contain.
|
|
20
|
+
|
|
21
|
+
The whole deck and each page can receive `background`: `"theme"` or
|
|
22
|
+
`{ fill?, image?, overlay?, foreground? }`, and a Signal of the same type can also be passed. `image`
|
|
23
|
+
accepts src, a cover/contain fit (default cover) and a nine-point position (default center);
|
|
24
|
+
fill/overlay accept CSS colors or gradients. When a page omits it, it inherits the deck; when the deck
|
|
25
|
+
omits it, it follows the theme; an explicit theme returns to the theme; an object fully overrides and
|
|
26
|
+
does not merge with the deck; when fill is omitted, the theme paper color is used. foreground's
|
|
27
|
+
light/dark refers to text color, and omitting it follows the theme.
|
|
28
|
+
The decorative background fills the canvas and crops itself, and does not change content edges,
|
|
29
|
+
scaling or step lifecycle; updating the background Signal does not remount the current content.
|
|
30
|
+
Updating the background on the same page does not trigger the page-change entrance animation; it only
|
|
31
|
+
replaces the decorative layer.
|
|
32
|
+
After an image fails, the base color, overlay and text light/dark remain, and the author must ensure
|
|
33
|
+
the page is still readable without the image; images that need description and alternative text stay
|
|
34
|
+
in the body.
|
|
35
|
+
The host installs `createMeowUI({ components: meowUIComponents })` and `createMeowSlides()` in the same Runtime and loads the complete
|
|
36
|
+
`presentationTheme` from `meowslides/theme` to get the default presentation structure and visuals.
|
|
37
|
+
A local implementation does not mean published; the current public version and install acceptance
|
|
38
|
+
follow the root README and the receipt for that round.
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { h, signal } from "meowjsx";
|
|
42
|
+
import { Presentation, Reveal, type SlideDefinition, type SlidePosition } from "meowslides";
|
|
43
|
+
|
|
44
|
+
// Create these once per work instance, outside each slide's render callback.
|
|
45
|
+
const speed = signal(20);
|
|
46
|
+
const position = signal<SlidePosition>({ slideId: "experiment", step: 0 });
|
|
47
|
+
const slides: readonly SlideDefinition[] = [
|
|
48
|
+
{
|
|
49
|
+
id: "experiment",
|
|
50
|
+
title: "Transfer estimate",
|
|
51
|
+
steps: 1,
|
|
52
|
+
render: () => (
|
|
53
|
+
<div>
|
|
54
|
+
<h2>Change the connection speed</h2>
|
|
55
|
+
<input
|
|
56
|
+
type="range"
|
|
57
|
+
min="1"
|
|
58
|
+
max="100"
|
|
59
|
+
value={speed}
|
|
60
|
+
onInput={(event: Event) => {
|
|
61
|
+
speed.value = Number((event.currentTarget as HTMLInputElement).value);
|
|
62
|
+
}}
|
|
63
|
+
/>
|
|
64
|
+
<Reveal at={1}>
|
|
65
|
+
<p>The estimate changes with the same experiment input.</p>
|
|
66
|
+
</Reveal>
|
|
67
|
+
</div>
|
|
68
|
+
),
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
const view = (
|
|
72
|
+
<Presentation title="Image transfer" slides={slides} position={position} active={false} />
|
|
73
|
+
);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Actual works should create these values in a factory or top-level component, avoiding module-level
|
|
77
|
+
singletons that leak values across presentations. When `position` is provided it is the only position
|
|
78
|
+
source, and navigation and in-page jumps all write the same Signal as a whole; when omitted, the
|
|
79
|
+
component creates a local position starting at page one, step 0. Page ids must be unique and non-empty,
|
|
80
|
+
`steps` is the number of advances beyond step 0, and out-of-range positions and `Reveal at` fail
|
|
81
|
+
explicitly. Steps only update local bindings; changing pages is what unmounts the old page. Inputs,
|
|
82
|
+
calculation parameters and results that persist across pages are held by ordinary host signals, while
|
|
83
|
+
the old page's DOM, media, timers and listeners are cleaned up by their respective owners. Returning to
|
|
84
|
+
step 0 does not clear the experiment input.
|
|
85
|
+
|
|
86
|
+
The default logical canvas is 1280×720, fitted into the available area with contain; original-size
|
|
87
|
+
mode provides scrolling. Tool controls keep their own normal size. `presentationTokens` is exported
|
|
88
|
+
from `meowslides/theme` and can adjust presentation titles, body text, colors and page edges without
|
|
89
|
+
changing the work-interface control font size. Content that exceeds the canvas shows a diagnostic; you
|
|
90
|
+
must still actually observe the real text, fonts, media and target sizes.
|
|
91
|
+
|
|
92
|
+
The frame uses a permanently visible grouped control band: navigation and page order, the native
|
|
93
|
+
outline and the settings entry each have their own position. Low-frequency pause/size operations live
|
|
94
|
+
in the existing Popover, preserving state with native toggle buttons; after opening, focus the first
|
|
95
|
+
item, and Escape closes it and returns to the settings entry.
|
|
96
|
+
Arrangement and stretching reuse Inline/Stack/LayoutItem, and the outline moves to a full row according
|
|
97
|
+
to the control band's own narrow width, suiting narrow hosts in wide windows.
|
|
98
|
+
The `chrome*` values in `presentationTokens` control only the frame, page header and control band,
|
|
99
|
+
independent of the stage paper color/body font and the generic Button theme; no extra props or theme
|
|
100
|
+
installer are needed. Narrow screens reflow these groups, and controls keep roughly 44px touch height,
|
|
101
|
+
visible focus and native keyboard semantics without relying on hover.
|
|
102
|
+
|
|
103
|
+
`active` is the host runtime permission, defaulting to true, combined with document visibility, user
|
|
104
|
+
pause and ancestor Reveals. Review, background iframes and deterministic-state photography should pass
|
|
105
|
+
false from the first mount; the host then opens foreground interaction.
|
|
106
|
+
`usePresentationActivity()` captures a read-only Signal during synchronous component render; custom
|
|
107
|
+
animations respond to it through the existing `context.effect` and return a cleanup function. This
|
|
108
|
+
permission does not mean playing or content ready, and cannot automatically pause arbitrary child
|
|
109
|
+
components.
|
|
110
|
+
Reveal keeps geometry and local state, and hidden content is removed from the keyboard and the
|
|
111
|
+
accessibility tree; nested layers share the ancestor permission.
|
|
112
|
+
`Reveal` accepts either `at={n}` or `when={booleanOrSignal}`, not both and not neither.
|
|
113
|
+
`at` accumulates appearance along page steps; `when` is controlled by the work's local state and can
|
|
114
|
+
repeatedly show and hide without changing the slide/step.
|
|
115
|
+
Both entries share retained mount, geometry, focus fallback, hidden semantics, ancestor activity and
|
|
116
|
+
animation cleanup; they must still be used within a Presentation page.
|
|
117
|
+
Hints, answers and basis can each be wired to `when` through ordinary signals; works do not copy the
|
|
118
|
+
visibility / inert / ARIA wiring.
|
|
119
|
+
|
|
120
|
+
Work content styles use `slideClassName`: the class lands only on the current page article, so
|
|
121
|
+
descendant heading/form rules do not thereby select the surrounding player. `className` continues to
|
|
122
|
+
apply to the whole Presentation root, keeping the existing contract; neither adds a content wrapper or
|
|
123
|
+
isolates arbitrary global CSS. The fixed-canvas diagnostic also checks visible content and named
|
|
124
|
+
layout region allocation, avoiding a missed report when body text intrudes into the footer without
|
|
125
|
+
exceeding the whole canvas; an explicit scroll area still owns its own scrolling. The diagnostic
|
|
126
|
+
indicates over-capacity and does not auto-shrink type, hide body content or guarantee that arbitrary
|
|
127
|
+
content fits on one page.
|
|
128
|
+
|
|
129
|
+
Presentation and Reveal accept an optional `transition`: none (default), fade, slide, zoom, or
|
|
130
|
+
`{ effect, direction?, speed? }`. direction is left/right/up/down and means the movement direction;
|
|
131
|
+
slide advances to the left by default and reverses to the right by default, and Reveal defaults
|
|
132
|
+
upward; fade/zoom do not use direction. speed is fast/normal/slow. Page changes only bring the new page
|
|
133
|
+
in, and the old page unmounts immediately; Reveal only enters when already-mounted content changes from
|
|
134
|
+
hidden to shown, and a direct jump does not replay the entrance. Content is interactive as soon as it
|
|
135
|
+
appears, and hidden content is immediately inert and stops collaborative activity.
|
|
136
|
+
Inactivity, pause, document hidden or reduced motion cancel animations and land on the final state
|
|
137
|
+
without replay after recovery; without WAAPI, the final state is presented directly.
|
|
138
|
+
|
|
139
|
+
Media components require `src` and a readable `label`, with native controls, metadata preload and
|
|
140
|
+
user-initiated start by default. Shared actions provide Play / continue, Pause and Back to start; the
|
|
141
|
+
latter pauses and returns to the beginning, still waiting for the user to explicitly play.
|
|
142
|
+
Pausing or returning to the start invalidates an unfinished play request, and a late Promise does not
|
|
143
|
+
restart the media.
|
|
144
|
+
In a finite Stack the media picture can shrink while keeping contain, and status and actions keep
|
|
145
|
+
natural height; error feedback and the name are split into blocks, not squeezed into the same
|
|
146
|
+
paragraph. Image or video areas can use `LayoutItem grow basis={0}` to allocate the remaining space;
|
|
147
|
+
text must still respect the finite canvas capacity, and infinite content fitting is not promised.
|
|
148
|
+
Native seams such as `ref`, media events, poster and track children land on the real video/audio;
|
|
149
|
+
`className` is used for the outer status structure, and other native attributes land on the media
|
|
150
|
+
element. An explicit play button checks the asynchronous result of `play()`; the host calling play
|
|
151
|
+
through a native ref is equally responsible for checking the result.
|
|
152
|
+
Inactivity or unmount pauses, and restoring permission does not automatically unmute. The host can read
|
|
153
|
+
the last `currentTime` in ref cleanup and restore the seek after re-entering the metadata event; the
|
|
154
|
+
component first calls the host cleanup, then pauses and releases src. The host still decides the
|
|
155
|
+
time-invalidation rules when assets change versions.
|
|
156
|
+
The optional `soundtrack` slot reuses the same audio component, persists across pages, cleans up on
|
|
157
|
+
exit, does not mix, and does not automatically coordinate in-page media volume.
|
|
158
|
+
|
|
159
|
+
Meowbook is used for review and photography; default MDX works are generated into formal HTML, scripts
|
|
160
|
+
and assets by the new package CLI, and advanced consumers can also build hosts with the same JSX/theme.
|
|
161
|
+
This entry point has no PPT/PDF exporter, content editor or asset service. See
|
|
162
|
+
[authoring capability design](../../docs/designs/2026-10-17-presentation-authoring.md) for design
|
|
163
|
+
boundaries.
|