@renko_1055/slidev-addon-studio 0.3.1-renko.1 → 0.4.0-renko.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/README.md +332 -444
- package/client/actions.ts +77 -18
- package/client/component-fields.ts +31 -0
- package/client/composables/useCatalog.ts +1 -1
- package/client/composables/useDeckActions.ts +31 -0
- package/client/composables/useDeckApi.ts +15 -5
- package/client/composables/useEditorMode.ts +75 -0
- package/client/composables/useElementProperties.ts +22 -0
- package/client/composables/useImageInsertion.ts +119 -0
- package/client/composables/useObjectClipboard.ts +71 -0
- package/client/composables/usePageBackground.ts +42 -0
- package/client/composables/useProject.ts +57 -0
- package/client/composables/useSelection.ts +117 -313
- package/client/composables/useSelectionRebind.ts +187 -0
- package/client/composables/useShapeTools.ts +161 -0
- package/client/composables/useSlideSource.ts +18 -2
- package/client/composables/useTextEditor.ts +206 -0
- package/client/composables/useTransformGizmo.ts +111 -18
- package/client/context.ts +11 -1
- package/client/dom.ts +6 -1
- package/client/editor-view.ts +12 -0
- package/client/i18n/en.ts +304 -10
- package/client/i18n/errors.ts +3 -0
- package/client/i18n/index.ts +5 -0
- package/client/i18n/zh-CN.ts +304 -10
- package/client/layers.ts +57 -0
- package/client/md/background.ts +45 -0
- package/client/md/batch.ts +67 -0
- package/client/md/clipboard.ts +77 -0
- package/client/md/component-fields.ts +50 -0
- package/client/md/drag.ts +8 -0
- package/client/md/elements.ts +140 -0
- package/client/md/inline.ts +0 -84
- package/client/md/insert.ts +2 -2
- package/client/md/interactions.ts +253 -0
- package/client/md/layers.ts +41 -0
- package/client/md/shapes.ts +56 -0
- package/client/page-presets.ts +70 -0
- package/client/project-host.ts +15 -0
- package/client/project-save.ts +53 -0
- package/client/selection-geometry.ts +38 -0
- package/client/selection-target.ts +188 -0
- package/client/source-label.ts +7 -0
- package/client/state.ts +34 -4
- package/client/text/editor.ts +311 -0
- package/client/text/source.ts +166 -0
- package/client/types.ts +11 -46
- package/client/ui/InlineEditor.vue +228 -587
- package/client/ui/QuestionRelations.vue +48 -0
- package/client/ui/SelectionLayer.vue +33 -3
- package/client/ui/ShapeDrawingLayer.vue +23 -0
- package/client/ui/StudioDock.vue +21 -29
- package/client/ui/StudioFile.vue +76 -0
- package/client/ui/StudioLibrary.vue +32 -0
- package/client/ui/StudioNotes.vue +23 -0
- package/client/ui/StudioRoot.vue +126 -34
- package/client/ui/StudioToolbar.vue +207 -77
- package/client/ui/panels/PanelAnimate.vue +0 -23
- package/client/ui/panels/PanelAssets.vue +37 -22
- package/client/ui/panels/PanelComponents.vue +6 -1
- package/client/ui/panels/PanelInspect.vue +84 -66
- package/client/ui/panels/PanelLayers.vue +85 -0
- package/client/ui/panels/PanelLayout.vue +39 -132
- package/client/ui/panels/PanelPagePresets.vue +42 -0
- package/client/ui/panels/PanelSlides.vue +45 -99
- package/client/ui/panels/PanelTransition.vue +32 -0
- package/client/ui/parts/ArrangeSelection.vue +31 -0
- package/client/ui/parts/ColorSwatch.vue +2 -2
- package/client/ui/parts/ComponentPreview.vue +6 -1
- package/client/ui/parts/ImageElementFields.vue +37 -0
- package/client/ui/parts/InteractionFields.vue +128 -0
- package/client/ui/parts/MediaFields.vue +41 -0
- package/client/ui/parts/ProjectTree.vue +22 -0
- package/client/ui/parts/PropField.vue +22 -2
- package/client/ui/parts/ShapeFields.vue +28 -0
- package/client/ui/parts/ShapePicker.vue +30 -0
- package/client/ui/parts/SlideThumbnail.vue +6 -1
- package/client/ui/parts/StudioIcon.vue +18 -0
- package/client/ui/parts/TextElementFields.vue +99 -0
- package/components/StudioButton.vue +104 -0
- package/components/StudioCorrectCount.vue +31 -0
- package/components/StudioFeedback.vue +45 -0
- package/components/StudioMedia.vue +125 -0
- package/components/StudioQuestion.vue +44 -0
- package/components/StudioShape.vue +53 -0
- package/docs/custom-code/agent-guide.md +61 -0
- package/docs/custom-code/components.md +158 -0
- package/docs/custom-code/conventions.md +119 -0
- package/docs/custom-code/media.md +28 -0
- package/docs/releases/0.4.0-renko.1.md +35 -0
- package/examples/human-agent/AGENTS.md +20 -0
- package/examples/human-agent/README.md +16 -0
- package/examples/human-agent/components/GuestSpotlight.vue +59 -0
- package/examples/human-agent/package.json +18 -0
- package/examples/human-agent/public/chime.wav +0 -0
- package/examples/human-agent/public/intro.mp4 +0 -0
- package/examples/human-agent/public/portrait.svg +5 -0
- package/examples/human-agent/slides.md +56 -0
- package/global-top.vue +6 -2
- package/node/assets.ts +28 -20
- package/node/catalog.ts +47 -72
- package/node/markdown-source.ts +1 -1
- package/node/metadata.ts +3 -35
- package/node/plugin.ts +16 -1
- package/node/presentation-drag.ts +25 -0
- package/node/project.ts +97 -0
- package/package.json +19 -3
- package/runtime/app.ts +99 -0
- package/runtime/composables/useInteractionPage.ts +33 -0
- package/runtime/composables/useQuiz.ts +16 -0
- package/runtime/composables/useStudioContext.ts +41 -0
- package/runtime/index.ts +6 -0
- package/runtime/interactions.ts +51 -0
- package/runtime/preview.ts +28 -0
- package/runtime/stores/quiz.ts +55 -0
- package/runtime/types.ts +28 -0
- package/setup/context-menu.ts +26 -47
- package/setup/main.ts +6 -0
- package/setup/root.ts +32 -0
- package/setup/shortcuts.ts +5 -5
- package/setup/vite-plugins.ts +2 -1
- package/shared/assets.ts +15 -0
- package/shared/catalog.ts +79 -0
- package/shared/editor-mode.ts +10 -0
- package/shared/errors.ts +3 -0
- package/shared/project.ts +15 -0
- package/shared/quiz.ts +50 -0
- package/shared/shapes.ts +120 -0
- package/skills/studio-authoring/SKILL.md +61 -0
- package/styles/layers.css +4 -0
- package/styles/studio.css +259 -244
- package/types/slidev-client.d.ts +36 -2
- package/client/ui/parts/LayoutPreview.vue +0 -111
- /package/{node → shared}/html-scan.ts +0 -0
package/README.md
CHANGED
|
@@ -1,36 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Slidev Studio — Renko fork
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
A visual editor for [Slidev](https://sli.dev), with a persistent slide filmstrip,
|
|
4
|
+
a grouped ribbon, a real slide canvas and an inspector. Create text boxes, insert
|
|
5
|
+
and replace pictures, edit component properties, configure animations and copy
|
|
6
|
+
objects between slides. Single- and multiple-choice question templates add
|
|
7
|
+
repeatable answers and feedback. Changes are written back to your Markdown and local assets.
|
|
7
8
|
|
|
8
|
-

|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Studio is an ordinary Slidev addon. It works with a local project and has no
|
|
12
|
+
account, Git service or workbench dependency. The editor is available in the dev
|
|
13
|
+
server; authored content also renders in presentations and static builds.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
[中文使用指南](docs/usage.zh-CN.md) | [Documentation](docs/README.md) | [Current status](docs/status.md)
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
edit to your `.md` file. There is no project format, no database and no lock-in.
|
|
18
|
-
Close the editor and the diff is something you could have typed by hand. That
|
|
19
|
-
constraint is the point: it is what lets a visual editor coexist with version
|
|
20
|
-
control, code review and hand editing.
|
|
17
|
+
## Version and installation
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
The current fork version is **0.4.0-renko.1**. It includes the current editor,
|
|
20
|
+
component fields and runtime, the bundled human–agent authoring skill and example,
|
|
21
|
+
and native audio/video assets. Publication status and validation are recorded in
|
|
22
|
+
[the release notes](docs/releases/0.4.0-renko.1.md). Existing projects keep their
|
|
23
|
+
installed versions until explicitly upgraded.
|
|
24
|
+
|
|
25
|
+
To try the current source:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/Renko6626/slidev-addon-studio.git
|
|
29
|
+
cd slidev-addon-studio
|
|
30
|
+
pnpm install --frozen-lockfile
|
|
31
|
+
pnpm play
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
To use this checkout in another local Slidev project, run from that project:
|
|
23
35
|
|
|
24
36
|
```bash
|
|
25
|
-
pnpm add -D slidev-addon-studio
|
|
37
|
+
pnpm add -D "link:../slidev-addon-studio"
|
|
26
38
|
```
|
|
27
39
|
|
|
28
|
-
|
|
29
|
-
The workbench activity template pins the same npm alias and records the package
|
|
30
|
-
integrity in `pnpm-lock.yaml`. Installing `slidev-addon-studio` without the alias
|
|
31
|
-
still installs upstream.
|
|
40
|
+
Install the fork from npm:
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
```bash
|
|
43
|
+
pnpm add -D slidev-addon-studio@npm:@renko_1055/slidev-addon-studio@0.4.0-renko.1
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The alias keeps the addon name `slidev-addon-studio`. Installing that name without
|
|
47
|
+
the alias installs upstream. Enable the addon in your deck's headmatter:
|
|
34
48
|
|
|
35
49
|
```yaml
|
|
36
50
|
---
|
|
@@ -39,7 +53,7 @@ addons:
|
|
|
39
53
|
---
|
|
40
54
|
```
|
|
41
55
|
|
|
42
|
-
|
|
56
|
+
Or enable it for every deck in your project's `package.json`:
|
|
43
57
|
|
|
44
58
|
```json
|
|
45
59
|
{
|
|
@@ -49,434 +63,308 @@ or in `package.json`, which applies it to every deck in the project:
|
|
|
49
63
|
}
|
|
50
64
|
```
|
|
51
65
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Click anything on the slide. Studio traces the rendered element back to the
|
|
99
|
-
exact lines of Markdown it came from and shows them in the Element panel.
|
|
100
|
-
|
|
101
|
-
Drag the selection and the block leaves the document flow: Studio wraps it in
|
|
102
|
-
Slidev's own `v-drag`, so the position is written into the Markdown as
|
|
103
|
-
`pos="x,y,w,h"` in slide canvas units. Handles resize, the top handle rotates,
|
|
104
|
-
and <kbd>Backspace</kbd> deletes. "Return to flow" in the Element panel undoes
|
|
105
|
-
the free positioning.
|
|
106
|
-
|
|
107
|
-
Elements snap to the canvas edges, its centre and thirds, and to the edges and
|
|
108
|
-
centres of everything else on the slide. Hold <kbd>Alt</kbd> to place something
|
|
109
|
-
exactly where you want it instead.
|
|
110
|
-
|
|
111
|
-

|
|
112
|
-
|
|
113
|
-
A move of an element that is already free is written straight into its `pos`,
|
|
114
|
-
without rebuilding the slide, so dragging stays as smooth as Slidev's own
|
|
115
|
-
handles. Only the first drag of a block in the document flow re-renders it,
|
|
116
|
-
because that one changes the Markdown's shape rather than four numbers in it.
|
|
117
|
-
|
|
118
|
-
### Editing text
|
|
119
|
-
|
|
120
|
-
Double-click any block and it becomes editable where it sits, with a toolbar for
|
|
121
|
-
bold, italic, code, strikethrough, links, headings, lists and quotes.
|
|
122
|
-
|
|
123
|
-
What is edited is the block's Markdown, not its rendered HTML, which is why a
|
|
124
|
-
table or a fenced code block is editable too: to this editor they are text like
|
|
125
|
-
everything else. It is also why the toolbar can be trusted. Round-tripping
|
|
126
|
-
rendered HTML back into Markdown is where visual editors lose components,
|
|
127
|
-
directives and formatting, and a Slidev deck is full of all three.
|
|
128
|
-
|
|
129
|
-

|
|
130
|
-
|
|
131
|
-
<kbd>Ctrl</kbd> + <kbd>Enter</kbd> applies, <kbd>Esc</kbd> cancels,
|
|
132
|
-
<kbd>Ctrl</kbd> + <kbd>B</kbd> and <kbd>Ctrl</kbd> + <kbd>I</kbd> do what you
|
|
133
|
-
expect.
|
|
134
|
-
|
|
135
|
-
### Editing props
|
|
136
|
-
|
|
137
|
-
Select a component and the Element panel becomes a form for it, built from the
|
|
138
|
-
component's own props. Numbers are written bound (`:size="140"`), enumerated
|
|
139
|
-
strings plainly (`color="red"`), and options backed by image files get a picker
|
|
140
|
-
that shows the images.
|
|
141
|
-
|
|
142
|
-
A prop that holds records is edited as one row per entry with a field per key,
|
|
143
|
-
typed from the element type the component declares, so an empty list still knows
|
|
144
|
-
what fields it wants. A prop that holds a colour offers the deck's own palette,
|
|
145
|
-
read from the custom properties in your theme's stylesheets, so picking one
|
|
146
|
-
keeps the slide pointing at `var(--accent)` rather than freezing a hex.
|
|
147
|
-
|
|
148
|
-

|
|
149
|
-
|
|
150
|
-
### Animating
|
|
151
|
-
|
|
152
|
-
Slidev's animation model is a sequence of click steps per slide, so the Animate
|
|
153
|
-
panel leads with that sequence and lets you scrub it.
|
|
154
|
-
|
|
155
|
-

|
|
156
|
-
|
|
157
|
-
Studio writes whichever form fits the block:
|
|
158
|
-
|
|
159
|
-
```md
|
|
160
|
-
<!-- an element or component takes the directive -->
|
|
161
|
-
<Pill v-click.fade="2">Later</Pill>
|
|
162
|
-
|
|
163
|
-
<!-- a Markdown block gets a wrapper, which renders no extra element -->
|
|
164
|
-
<v-click>
|
|
165
|
-
|
|
166
|
-
# A heading that appears on click
|
|
167
|
-
|
|
168
|
-
</v-click>
|
|
169
|
-
|
|
170
|
-
<!-- a list can reveal one item at a time -->
|
|
171
|
-
<v-clicks every="2">
|
|
172
|
-
|
|
173
|
-
- One
|
|
174
|
-
- Two
|
|
175
|
-
|
|
176
|
-
</v-clicks>
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### Choosing a layout
|
|
180
|
-
|
|
181
|
-
A layout is picked from thumbnails rather than from a list of names. Each one
|
|
182
|
-
renders the layout at full slide size with this slide's own frontmatter, title
|
|
183
|
-
and lead line, then scales it down, so what you compare is the composition you
|
|
184
|
-
would get.
|
|
185
|
-
|
|
186
|
-

|
|
187
|
-
|
|
188
|
-
A layout's props are the frontmatter keys it reads, and they are edited in the
|
|
189
|
-
same panel. On a slide like `layout: fact`, whose entire visible text lives in
|
|
190
|
-
`value:` and `label:`, that panel is the only place to edit it: none of that
|
|
191
|
-
text ever passed through Markdown, so there is nothing on the canvas to click.
|
|
192
|
-
|
|
193
|
-
### Working with slides
|
|
194
|
-
|
|
195
|
-

|
|
196
|
-
|
|
197
|
-
Thumbnails are the real slide components rendered small, not captures, so they
|
|
198
|
-
are never out of date. Drag one to reorder, and add, duplicate or delete from
|
|
199
|
-
the same panel.
|
|
200
|
-
|
|
201
|
-
### Inserting
|
|
202
|
-
|
|
203
|
-

|
|
204
|
-
|
|
205
|
-
The palette starts with the plain Markdown blocks, because most of what goes on
|
|
206
|
-
a slide is a heading, a paragraph or a list. Below those sit every component the
|
|
207
|
-
deck can actually use: Slidev's builtins, the active theme, each addon, and your
|
|
208
|
-
own `components/` directory.
|
|
209
|
-
|
|
210
|
-
### Keyboard
|
|
211
|
-
|
|
212
|
-
| Key | Action |
|
|
66
|
+
## Enter, preview and present
|
|
67
|
+
|
|
68
|
+
Press **E**, use the pencil button in Slidev's navigation, or open the Studio item
|
|
69
|
+
in the context menu. Add `?studio=1` to a slide URL to enter directly, for example
|
|
70
|
+
`http://localhost:3030/1?studio=1`. `?studio=0` explicitly opens without the editor;
|
|
71
|
+
ordinary URLs follow the previous editor preference. Vite base paths are supported.
|
|
72
|
+
|
|
73
|
+
- **Preview** restores normal Slidev interaction and shows Return to editor.
|
|
74
|
+
- **Present** starts fullscreen from the current slide. Leaving a fullscreen
|
|
75
|
+
session started by Studio returns to the editor.
|
|
76
|
+
- Closing Studio in development retains its pencil, context-menu and E entry
|
|
77
|
+
points. Static builds have no Studio editing UI or entry points.
|
|
78
|
+
|
|
79
|
+
Apply the current text edit before switching modes. Applied edits write to the
|
|
80
|
+
Markdown file automatically. **File → Save**, the title-bar save button, and
|
|
81
|
+
**Ctrl/Cmd+S** also apply the active text edit and speaker notes, then wait for
|
|
82
|
+
the writes to finish. The status bar reports pending edits and failed writes.
|
|
83
|
+
|
|
84
|
+
## Projects and File
|
|
85
|
+
|
|
86
|
+
**File** opens the current project's name, directory, slide entry, save status
|
|
87
|
+
and a read-only directory tree. A project is an ordinary Slidev directory; Git,
|
|
88
|
+
a workbench account and `project.yaml` are not required. For nested slide entries,
|
|
89
|
+
the nearest parent `package.json` determines the project directory; without one,
|
|
90
|
+
Studio uses the entry's directory. In a web workspace this is a server directory.
|
|
91
|
+
|
|
92
|
+
**Download project ZIP** applies active edits first and archives the current
|
|
93
|
+
files, including new and uncommitted content, local assets, components, lockfiles
|
|
94
|
+
and patches. Dependencies, Git history, build output, caches, `.env` values and
|
|
95
|
+
local credential configuration such as `.npmrc` are excluded; `.env.example`,
|
|
96
|
+
`.env.sample` and `.env.template` remain. The file tree uses the same exclusions.
|
|
97
|
+
Unzip the archive to continue with the project's usual Slidev commands; install
|
|
98
|
+
its dependencies first if necessary. The ZIP does not fetch external assets,
|
|
99
|
+
copy outside dependencies, or replace machine-specific `link:` dependencies.
|
|
100
|
+
|
|
101
|
+
Linked source files and imported Markdown outside the project must be moved
|
|
102
|
+
inside before export; Studio reports the path rather than silently omitting it.
|
|
103
|
+
New/open/save-copy operations belong to the workspace or desktop application and
|
|
104
|
+
are not supplied by this standalone addon. The companion [Windows desktop preview](desktop/README.md)
|
|
105
|
+
provides these operations through the same File page and native menus. This File page exports editable
|
|
106
|
+
projects; PDF, PowerPoint and built presentation exports are not included.
|
|
107
|
+
|
|
108
|
+
## Workspace
|
|
109
|
+
|
|
110
|
+
| Area | Purpose |
|
|
213
111
|
| --- | --- |
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
217
|
-
|
|
|
218
|
-
|
|
|
219
|
-
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
112
|
+
| Left filmstrip | Browse, add, duplicate, delete and reorder slides |
|
|
113
|
+
| Ribbon | Home, Insert, Design, Transitions, Animate, View and contextual Object commands |
|
|
114
|
+
| Canvas | Select, move, resize, rotate and edit the real slide |
|
|
115
|
+
| Inspector | Current object or slide settings, with source and classes under Advanced |
|
|
116
|
+
| Component and asset libraries | Insert existing project content without replacing the filmstrip |
|
|
117
|
+
| Notes and status bar | Speaker notes, current page, view scale and Fit to window |
|
|
118
|
+
|
|
119
|
+
The canvas fits the space left by the panels. Its display percentage does not
|
|
120
|
+
change the slide's frontmatter `zoom`. The properties pane collapses on narrow
|
|
121
|
+
windows and can be reopened from View.
|
|
122
|
+
|
|
123
|
+
## New slides and layouts
|
|
124
|
+
|
|
125
|
+
**Home → New slide** and the filmstrip's **New slide** open the same gallery:
|
|
126
|
+
Blank, Title slide, Title and text, Two columns, Picture on the left, Picture on
|
|
127
|
+
the right, and Full-page picture. Choosing one inserts a page after the current
|
|
128
|
+
slide. Previews and inserted pages share object geometry and placeholder text.
|
|
129
|
+
Text uses editable Studio text boxes; select a picture placeholder and use
|
|
130
|
+
**Replace picture** in its properties. Placeholders are embedded images and need
|
|
131
|
+
no external files. **Design → Page settings** edits the page name and parameters
|
|
132
|
+
used by its existing layout. The layout gallery and switcher have been removed;
|
|
133
|
+
existing layouts keep rendering unchanged. Layout selection and generic Slidev
|
|
134
|
+
configuration remain available in Markdown source.
|
|
135
|
+
|
|
136
|
+
**Insert → Heading** creates a larger text box. Use paragraph formatting for
|
|
137
|
+
lists and the dedicated picture/shape tools for visual objects. The component
|
|
138
|
+
library keeps quotes, dividers and code under **More content**.
|
|
139
|
+
|
|
140
|
+
## Text boxes and pictures
|
|
141
|
+
|
|
142
|
+
**Insert → Text box** creates a positioned box with its placeholder selected.
|
|
143
|
+
Double-click or press F2 to edit; use the side handles to change its width.
|
|
144
|
+
Height follows the text. Home keeps its Font and Paragraph groups visible, with
|
|
145
|
+
font, size (canvas CSS pixels), colour, bold/italic/underline/strike, alignment,
|
|
146
|
+
list, indent and line spacing controls. They are disabled when no supported
|
|
147
|
+
heading, paragraph or Studio text box is selected. Entering text editing opens Home; the inspector
|
|
148
|
+
retains position, dimensions and other detailed properties. A text selection changes only those characters; a caret sets
|
|
149
|
+
the format of subsequent typing; selecting the box applies formatting to all its
|
|
150
|
+
text. Mixed values are shown as Mixed. Font names use fonts available in the
|
|
151
|
+
browser, with normal CSS fallback; fonts are not installed or downloaded.
|
|
152
|
+
|
|
153
|
+
Format controls keep the active text selection. Enter starts a paragraph,
|
|
154
|
+
Shift+Enter inserts a line break, and Tab/Shift+Tab changes list levels. During
|
|
155
|
+
text editing, undo/redo handles typing and formatting in the current session.
|
|
156
|
+
After applying, the deck history treats that session as one edit. Clear character
|
|
157
|
+
formatting restores the box's defaults. Supported formatting is retained on
|
|
158
|
+
paste; use the browser's plain-text paste shortcut when needed.
|
|
159
|
+
|
|
160
|
+
Studio text boxes use Tiptap/ProseMirror internally and still save native HTML
|
|
161
|
+
inside the existing positioned box. Opening and closing without changes does
|
|
162
|
+
not rewrite it. Custom markup outside the supported text schema opens as source
|
|
163
|
+
to preserve it. Ordinary Markdown ATX headings (`#` through `######`), paragraphs
|
|
164
|
+
and standalone HTML headings/paragraphs share the same rich-text controls.
|
|
165
|
+
Simple marks keep Markdown; fonts, sizes and colours save standard HTML while
|
|
166
|
+
preserving the heading level, document flow and existing root attributes.
|
|
167
|
+
Enter adds sibling paragraphs; list controls can convert the selected block
|
|
168
|
+
to a standard HTML list, which remains editable. Other Markdown structures and complex HTML open as source. Frontmatter text and
|
|
169
|
+
question labels use plain-text editing. Properties and the context menu offer
|
|
170
|
+
Edit HTML, Edit Markdown and Edit component tag; source editing preserves the
|
|
171
|
+
authored markup and provides Apply and Cancel. Mixed containers are no longer
|
|
172
|
+
edited visually across existing blocks.
|
|
173
|
+
|
|
174
|
+
Press and drag a movable object directly, without selecting it first. A light
|
|
175
|
+
click only selects it. Clicking another canvas object while editing text applies
|
|
176
|
+
the text and selects that object in the same click; clicking blank slide space
|
|
177
|
+
applies the text and clears the selection. This also works from source editing.
|
|
178
|
+
Dragging is disabled while a write is in progress.
|
|
179
|
+
|
|
180
|
+
**Insert → Picture** offers a file picker and the asset library. The image is
|
|
181
|
+
inserted and selected immediately, at a size that keeps its original proportions
|
|
182
|
+
and fits the slide. Pictures lock their frame ratio by default. The inspector
|
|
183
|
+
supports alternative text, replacement, and two display modes:
|
|
184
|
+
|
|
185
|
+
| Mode | Result |
|
|
273
186
|
| --- | --- |
|
|
274
|
-
|
|
|
275
|
-
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
187
|
+
| Show entire image | Preserves the whole image, with empty space when frame ratios differ |
|
|
188
|
+
| Fill frame | Fills the frame, hiding the excess; adjust horizontal and vertical position to keep the subject visible |
|
|
189
|
+
|
|
190
|
+
Replacement keeps position, frame dimensions, rotation, alternative text,
|
|
191
|
+
display mode and image position. Image positioning saves standard CSS
|
|
192
|
+
`object-position` percentages and leaves the frame unchanged. In Fill frame mode,
|
|
193
|
+
set horizontal and vertical position from 0 to 100: 0 aligns the left or top edge,
|
|
194
|
+
100 the right or bottom edge. **Centre image** resets both to 50%. These controls
|
|
195
|
+
adjust the visible part of the image; there is no draggable crop tool. Deleting
|
|
196
|
+
an object or undoing replacement changes the Markdown reference; it does not delete the asset file.
|
|
197
|
+
|
|
198
|
+

|
|
199
|
+
|
|
200
|
+
New text boxes and pictures are native HTML with `v-drag` and readable
|
|
201
|
+
`data-studio-element` attributes. Existing unmarked content retains its original
|
|
202
|
+
editing paths. SVG files can be used as complete pictures; editable SVG paths and
|
|
203
|
+
pixel editing are outside the current feature set.
|
|
204
|
+
|
|
205
|
+
On blank free-canvas pages and pages made of independently positioned objects,
|
|
206
|
+
**Page settings → Background** chooses a page colour or picture. Choosing one
|
|
207
|
+
replaces the other; Remove background returns to the deck's own paint. Pictures
|
|
208
|
+
fill the page from the centre. The background is a native, non-interactive
|
|
209
|
+
`data-studio-background` element at the start of the slide body, below the
|
|
210
|
+
positioned objects. An effective background change, including removal, clears the
|
|
211
|
+
current object selection. It uses the normal save and undo history, and renders in
|
|
212
|
+
thumbnails, presentations and static builds. Background controls stay disabled
|
|
213
|
+
on pages containing document-flow content; existing layout parameters retain
|
|
214
|
+
their own background options.
|
|
215
|
+
|
|
216
|
+
## Select and arrange multiple objects
|
|
217
|
+
|
|
218
|
+
Hold **Shift** and click objects to add or remove them from the selection. Drag
|
|
219
|
+
from empty slide space to box-select; Shift-box-selection adds to the current
|
|
220
|
+
selection. This supports independently positioned Studio text boxes, pictures,
|
|
221
|
+
shapes and components with a definite source range and position on the current
|
|
222
|
+
slide. Backgrounds are excluded.
|
|
223
|
+
|
|
224
|
+
Drag any selected object to move the selection. Create copy, Ctrl/Cmd+D,
|
|
225
|
+
Ctrl/Cmd+C/V and Delete/Backspace act on all selected objects. Home, Object and
|
|
226
|
+
the object inspector offer left/right/top/bottom alignment, horizontal/vertical
|
|
227
|
+
centring and equal horizontal/vertical gaps. Alignment uses the selection's
|
|
228
|
+
visual bounds; distribution needs at least three objects and keeps the outer
|
|
229
|
+
objects fixed. Each batch action is one undo step.
|
|
230
|
+
|
|
231
|
+
Font and Paragraph controls are disabled during multiple selection. Text editing
|
|
232
|
+
and detailed object properties use single selection. Permanent grouping, batch
|
|
233
|
+
resizing/rotation and selection across slides are not provided.
|
|
234
|
+
|
|
235
|
+
## Layers
|
|
236
|
+
|
|
237
|
+
Open **Layers** from View, the contextual Object tab or the right-hand inspector.
|
|
238
|
+
The list runs from front to back; click a row to select that object. Supported
|
|
239
|
+
text boxes, pictures and shapes can move forward/backward or to the front/back
|
|
240
|
+
within the same parent container. The order is saved as CSS stacking order in
|
|
241
|
+
the source and is retained in presentations and static builds.
|
|
242
|
+
|
|
243
|
+
Unknown components can be selected in the list but cannot be reordered. Objects
|
|
244
|
+
in different containers cannot exchange layer order; this is not a page-wide
|
|
245
|
+
stack across layouts or nested components. Backgrounds are excluded from the
|
|
246
|
+
list and stay below the page objects.
|
|
247
|
+
|
|
248
|
+
## Questions and buttons
|
|
249
|
+
|
|
250
|
+
**Insert → Single-choice page / Multiple-choice page** creates a page with a
|
|
251
|
+
question control, a separate prompt, four independent option buttons and feedback.
|
|
252
|
+
Select the control to configure its name and correct option IDs. Edit the prompt
|
|
253
|
+
as an ordinary text box, option text/images on each button, and messages on the
|
|
254
|
+
feedback object. Dashed lines show its connections; selecting a child shows only that
|
|
255
|
+
child's connection. Objects remain independently positioned. The control is
|
|
256
|
+
hidden when presenting by default; **Show question name when presenting** displays
|
|
257
|
+
its name while the question keeps running in either mode. Removing a prompt keeps
|
|
258
|
+
the question; removing the control warns and leaves the display objects in place.
|
|
259
|
+
The prompt is an ordinary Studio text box linked by `data-studio-question-ref`.
|
|
260
|
+
|
|
261
|
+
Multiple-choice pages also have Confirm answer and Clear selection buttons. This version keeps
|
|
262
|
+
four options and does not offer changing the question type. Double-click or F2
|
|
263
|
+
opens rich-text editing for the prompt and button content. Each button also
|
|
264
|
+
offers an image field. Feedback messages belong to the feedback object; its idle
|
|
265
|
+
message supports plain-text editing and all three messages appear in properties.
|
|
266
|
+
|
|
267
|
+
**Insert → Button** adds a button bound to a question on the current page. Its
|
|
268
|
+
properties set the question, purpose, option and appearance. Normal, Selected,
|
|
269
|
+
Correct and Incorrect previews show styles without answering.
|
|
270
|
+
|
|
271
|
+
Answers run in Preview and Present, including static presentations. Single
|
|
272
|
+
choice judges each selection; multiple choice requires the exact correct set
|
|
273
|
+
and ignores empty submissions. Changing the selection clears an old judgement;
|
|
274
|
+
Clear selection removes choices and results. Switching slides retains answers
|
|
275
|
+
within a trial; returning to editing or starting a new trial resets them.
|
|
276
|
+
|
|
277
|
+
Copying a selection that includes a question assigns a fresh question id and
|
|
278
|
+
updates its copied prompt/buttons/feedback. Copying a child alone keeps its question
|
|
279
|
+
binding on the same page. See [the working example](playground/interactions.md)
|
|
280
|
+
and [the advanced signal API](docs/components.md#question-interactions).
|
|
281
|
+
|
|
282
|
+
## Copy, paste and keyboard
|
|
283
|
+
|
|
284
|
+
| Shortcut | Action |
|
|
365
285
|
| --- | --- |
|
|
366
|
-
|
|
|
367
|
-
|
|
|
368
|
-
|
|
|
369
|
-
|
|
|
370
|
-
|
|
|
371
|
-
|
|
|
372
|
-
|
|
|
373
|
-
|
|
|
374
|
-
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
// your own plugins here
|
|
442
|
-
},
|
|
443
|
-
},
|
|
444
|
-
},
|
|
445
|
-
}
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
## Development
|
|
286
|
+
| E | Toggle Studio |
|
|
287
|
+
| Ctrl/Cmd+C | Copy the selected complete object or multiple independent objects |
|
|
288
|
+
| Ctrl/Cmd+V | Paste into the current slide |
|
|
289
|
+
| Ctrl/Cmd+D | Create copies of the selection immediately |
|
|
290
|
+
| Delete / Backspace | Delete the selection when not typing |
|
|
291
|
+
| Ctrl/Cmd+Z / Ctrl/Cmd+Shift+Z | Undo / redo |
|
|
292
|
+
| F2 | Enter or finish editing supported text |
|
|
293
|
+
| Ctrl/Cmd+Enter or Esc while editing text | Apply the text edit; use the floating Cancel button to discard it |
|
|
294
|
+
| Arrow keys / Shift+Arrow | Move a positioned selection by 1 / 10 canvas units |
|
|
295
|
+
| Alt while dragging | Bypass snapping |
|
|
296
|
+
| Shift during ordinary resizing / rotation | Keep ratio / snap rotation to 15 degrees; new pictures also have a ratio lock |
|
|
297
|
+
|
|
298
|
+
Object clipboard copying works across slides at the same presentation entry
|
|
299
|
+
(origin and Vite base). It retains source, local asset references and
|
|
300
|
+
each object's position/animation wrappers. Metadata travels on the native
|
|
301
|
+
clipboard, including across a page reload. Same-page pastes and immediate copies
|
|
302
|
+
are offset by 20 units; the first cross-page paste keeps the original coordinates.
|
|
303
|
+
The new objects are selected after insertion.
|
|
304
|
+
|
|
305
|
+
Text inputs retain native text clipboard behaviour. External text is not treated
|
|
306
|
+
as an object. Nested sub-elements, individual list items and frontmatter-only
|
|
307
|
+
text are not standalone clipboard objects. If another application strips the
|
|
308
|
+
Studio clipboard format, copy the object again in Studio.
|
|
309
|
+
|
|
310
|
+
## Boundaries
|
|
311
|
+
|
|
312
|
+
- Adding, duplicating, deleting or reordering slides reloads the page and clears
|
|
313
|
+
undo history. The first entry slide cannot be moved/deleted, and slides cannot
|
|
314
|
+
be dragged across Markdown files.
|
|
315
|
+
- The source remains Markdown. Complex content may require the source editor;
|
|
316
|
+
not every rendered element can be traced to an independently editable block.
|
|
317
|
+
- Permanent grouping, batch resizing/rotation, selection across slides, manual
|
|
318
|
+
viewport zoom, font installation and interactive crop handles remain future work.
|
|
319
|
+
Layer ordering is limited to supported objects in the same parent container.
|
|
320
|
+
- Return to flow and source-order controls are temporarily hidden throughout
|
|
321
|
+
the editor. Unpositioned content still offers Free position. Editing context
|
|
322
|
+
menus show object actions and Close Studio; presentation menus remain in preview.
|
|
323
|
+
|
|
324
|
+
See [all limitations](docs/limitations.md) and the [stage status](docs/status.md)
|
|
325
|
+
for validation scope. Native clipboard, IME, file-picker, dragging and fullscreen
|
|
326
|
+
interaction are not claimed as browser-automated acceptance tests.
|
|
327
|
+
|
|
328
|
+
## Human–agent authoring and media
|
|
329
|
+
|
|
330
|
+
Let the agent build the effects, interaction rules and first layout. Keep titles,
|
|
331
|
+
copy and replaceable pictures editable so a person can finish in Studio. The
|
|
332
|
+
bundled `skills/studio-authoring/SKILL.md` describes this handoff; read it directly
|
|
333
|
+
or copy its folder into your agent's skill directory. Studio does not install it
|
|
334
|
+
into machine-wide agent settings automatically.
|
|
335
|
+
|
|
336
|
+
Copy `examples/human-agent/` to a writable directory, install dependencies and run
|
|
337
|
+
`pnpm dev`. It contains a configurable animated guest card, independent text boxes
|
|
338
|
+
and shared quiz state, using public addon imports. See its README for edit points.
|
|
339
|
+
|
|
340
|
+
**Insert → Assets** accepts images, audio and video. New audio/video objects use
|
|
341
|
+
`StudioMedia`, with file replacement, poster, autoplay, controls, loop, mute,
|
|
342
|
+
volume and start-time settings. Editing and thumbnail views do not play; leaving
|
|
343
|
+
the active slide pauses and resets to the start time. Autoplay is opt-in, and a
|
|
344
|
+
blocked autoplay offers a manual Play button.
|
|
345
|
+
|
|
346
|
+
Images keep a 32 MiB upload limit; audio/video allow 128 MiB. The original file is
|
|
347
|
+
retained without transcoding. HEIC/TIFF images require conversion; media container
|
|
348
|
+
extensions alone do not guarantee codec support. Larger files can be placed in
|
|
349
|
+
`public/` directly. See [formats and playback](docs/custom-code/media.md).
|
|
350
|
+
|
|
351
|
+
## Language, extensions and development
|
|
352
|
+
|
|
353
|
+
The UI supports English and Simplified Chinese, follows the browser initially,
|
|
354
|
+
and remembers the language selected in the title bar. Component names, existing
|
|
355
|
+
user content and third-party metadata keep their authored form.
|
|
356
|
+
|
|
357
|
+
- [Detailed editing reference](docs/editor-reference.md)
|
|
358
|
+
- [Component and layout metadata](docs/components.md)
|
|
359
|
+
- [Configuration, source modules, verification and distribution](docs/development.md)
|
|
360
|
+
- [Current capabilities and historical plans](docs/status.md)
|
|
449
361
|
|
|
450
362
|
```bash
|
|
451
|
-
pnpm
|
|
452
|
-
pnpm play # the playground deck in playground/
|
|
453
|
-
pnpm test # unit tests for the Markdown rewriting
|
|
363
|
+
pnpm test
|
|
454
364
|
pnpm typecheck
|
|
365
|
+
pnpm exec slidev build playground/slides.md --out /tmp/studio-build
|
|
455
366
|
```
|
|
456
367
|
|
|
457
|
-
There is also an end to end pass over a real deck. It generates a slide per
|
|
458
|
-
component from the catalog, then moves, animates and reconfigures each one,
|
|
459
|
-
posting every edit and recompiling the slide, so markup the editor produces that
|
|
460
|
-
Vue cannot compile fails here rather than in someone's deck:
|
|
461
|
-
|
|
462
|
-
```bash
|
|
463
|
-
slidev decks/qa-studio.md --port 3060
|
|
464
|
-
STUDIO_QA_URL=http://localhost:3060 pnpm test
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
The Markdown rewriting lives in `client/md/` and `node/slide-source.ts` as pure
|
|
468
|
-
functions with no DOM or Vue involved, which is where the tests are aimed.
|
|
469
|
-
Anything that changes a user's file should be provable at that level first.
|
|
470
|
-
|
|
471
|
-
To try it against a real deck, link it in:
|
|
472
|
-
|
|
473
|
-
```bash
|
|
474
|
-
pnpm add -D "link:../slidev-addon-studio"
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
`link:` rather than `file:`, so edits reach the running dev server instead of
|
|
478
|
-
being copied once at install time.
|
|
479
|
-
|
|
480
368
|
## License
|
|
481
369
|
|
|
482
|
-
MIT
|
|
370
|
+
MIT. Fork of [BobTheShoplifter/slidev-addon-studio](https://github.com/BobTheShoplifter/slidev-addon-studio).
|