Open KermanX opened 7 months ago
https://github.com/slidevjs/slidev/issues/1392 Nuxt should enable a production build that doesn't need a running web server because it has SSG. Opening index.html from a browser on the same device should be enough to run the presentation which will be possible from devices when they are offline and can't install their own web servers such as phones and tablets.
I don't think we should replace theme
with addons. To me addons should be a subset of theme, that mostly for extending Markdown Syntax or adding new components, but shouldn't change how the slide would work/look. Having two "themes" doesn't make sense either.
Yes if we move to Nuxt we could use Nuxt Hooks to extends the parsers and transformer etc. But that won't be happen very soon. Maybe we could adopt to use a custom https://github.com/unjs/hookable instance for now for addons and later we could just swap to Nuxt's.
I don't think we should replace
theme
with addons. To me addons should be a subset of theme, that mostly for extending Markdown Syntax or adding new components, but shouldn't change how the slide would work/look. Having two "themes" doesn't make sense either.
I totally agree with you.
Yes if we move to Nuxt we could use Nuxt Hooks to extends the parsers and transformer etc. But that won't be happen very soon. Maybe we could adopt to use a custom unjs/hookable instance for now for addons and later we could just swap to Nuxt's.
I don't think unjs/hookable
is very suitable for Slidev. Currently, the customization in Slidev is mostly based on setup functions. And AFAIK there are 3 ways to "customize" a procedure:
resolvedConfig => returnedOptions
) and merge the returned options with the default one. Then execute the procedure based on the merged options.resolvedConfig => currentOptions => newOptions
) in a chain. Then execute the procedure based on the merged options.(Now the CodeRunnersSetup
and the ShortcutsSetup
use the 3rd way, while the others (excluding side-effect-only setups) use the 2nd way.)
I think the 3rd way is the most "hackable" because addons can both add new options and edit the existing options. For transformer "hooks", in the 3rd way an addon can insert its transformer between any existing hooks, rather than only prepending or appending. For users, if two addons have conflicts, it would also be possible to remove the conflict hooks or re-ordering them.
About the addon marketplace, I meant something like https://nuxt.com/modules. It is of course OK to search the "slidev-addon" keyword in GitHub, but the search result is not intuitive enough I think.
magic-move
were inspired by Reveal.js Auto-Animate. In summary, Auto-Animate considers matching elements if they have:id
(Priority - see the data-auto-animate-id
attribute, explained here).src
attribute is compared.For situations where the automatic-matching algorithm is not feasible or does not provide the correct matching, you can add the data-magic-id
property to the elements you want to animate. This property is prioritized over automatic matching.
In addition to the features of Auto-Animate, the following considerations can be taken into account:
shiki-magic-move
algorithm.magic-move
in KaTeX equations. I believe that with this implementation, it's possible to create transitions like this one done in Manim. I'm not sure exactly how to do the implementation in this case, but I consider two possibilities:
shiki-magic-move
.<span>
tags.\htmlData{magic-id=a}{x}
(or similar) to implement the transition functionality between elements with the same id
.x
, y
),fill
, stroke
,d
(<path>
),width
and height
(rect
)Finally, users can modify (or extend) the automatic-matching algorithm, as is possible in Reveal.js Auto-Animate, by writing a custom automatic matching function, opening up the possibility of implementing plugins based on the magic-move
feature.
Features
shiki-magic-move
into a more universalmagic-move
and ashiki
"tokenizer"?Addons
Consider theme as addonSee https://github.com/slidevjs/slidev/issues/1515#issuecomment-2050062650Markdown Transformer ((#1767)setupMdTransformer
) (#1626) (example use-case: #1503)Page Templates (#1509)slide layers#1634setupViteConfig: (config: Config) => Config
instead ofvite.config.ts
Custom routes(#1529)Module resolution
@slidev/client
into@slidev/cli
.env
orpackage.json
or slide frontmatter?slidev.config.ts
?Optimize deps related (#1385:- Need help - may be Vite bug
(#1559)@vueuse/core
)Global installation related (#1440,#1479,#1490)- Deprecate global installation? Or how to fix it
(#1559)Preserve comments in frontmatter when updating it (#1518)- Use
yaml
package instead ofjs-yaml
Performance
warmup
option (Blocked by https://github.com/vitejs/vite/issues/16523)@slidev/client
, (Should also solve #1573)slides
orpresenter
setup
s andlayout
sLoad the quick overview component after the current slide is fully loaded (#1526)Chore
Migrate CodeMirror to Monaco editor in side editor (#1391)(#1698)