@gui-chat-plugin/sequence 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +12 -5
- package/dist/core/index.d.ts +1 -1
- package/dist/core/slideHtml.d.ts +17 -5
- package/dist/{core-BALd7sgj.js → core-D3XJ6n_I.js} +134 -136
- package/dist/core-OZRdlavD.cjs +145 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +45 -45
- package/package.json +1 -1
- package/dist/core-B1EsmU-q.cjs +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
- **HTML slides animate with MulmoCast's `data-animation` attributes**, not CSS: `animate`
|
|
6
|
+
(opacity, translate, scale, rotate, width, height), `counter` and `typewriter`, with `data-start`
|
|
7
|
+
and `data-end` in seconds. A movie made from the slides (MulmoChat's makeMovie: an `html_tailwind`
|
|
8
|
+
beat with `animation: true`) now moves as the View does; MulmoCast pauses CSS animations, so the
|
|
9
|
+
0.3 slides' `animate-fade-up` and the like didn't move there. The page plays them with its own
|
|
10
|
+
player, written for this package (MIT; MulmoCast is AGPL) and checked against MulmoCast's
|
|
11
|
+
renderer: 56 of 56 sampled values equal. CSS animations and transitions don't play; each is
|
|
12
|
+
shown at its end, so an element faded in with the model's own `@keyframes` is seen rather than
|
|
13
|
+
held transparent. `SLIDE_CSS_ANIMATIONS_FINISHED` is those rules, for a host to add to the HTML
|
|
14
|
+
it gives MulmoCast, which would hold such an element at its first frame.
|
|
15
|
+
- Breaking: `SLIDE_ANIMATIONS` (the `animate-*` classes) is gone; `SLIDE_ANIMATION_KINDS`,
|
|
16
|
+
`SLIDE_AUTO_END_SECONDS` and `SLIDE_CSS_ANIMATIONS_FINISHED` are new.
|
|
17
|
+
|
|
18
|
+
## 0.3.1
|
|
19
|
+
|
|
20
|
+
- **"HTML slides" go to presentSlide**: the prompt says that when the user asks for HTML slides,
|
|
21
|
+
presentSlide is the tool, one HTML slide per call, not one HTML page. OpenAI Realtime, asked to
|
|
22
|
+
"explain this article in HTML slides", wrote a single presentHtml page with its own slide
|
|
23
|
+
navigation (found in MulmoChat). With this and the hosts' presentHtml prompt, 6 of 6 runs in
|
|
24
|
+
MulmoChat and 3 of 3 in MulmoGlass made presentSlide HTML slides.
|
|
25
|
+
|
|
3
26
|
## 0.3.0
|
|
4
27
|
|
|
5
28
|
- **HTML slides**: `presentSlide` takes `html` instead of `imagePrompt` for a slide designed in HTML
|
package/README.md
CHANGED
|
@@ -65,13 +65,20 @@ it is drawn.
|
|
|
65
65
|
A slide is a generated picture (`imagePrompt`) or HTML (`html`), the model's choice per slide: a
|
|
66
66
|
picture for a scene or an object, HTML for words, numbers, lists, comparisons and diagrams, which
|
|
67
67
|
picture models draw badly. The model writes the inside of `<body>` for a 1280x720 canvas, with
|
|
68
|
-
Tailwind CSS
|
|
69
|
-
`
|
|
70
|
-
`
|
|
71
|
-
`
|
|
68
|
+
Tailwind CSS classes, and animates it with [MulmoCast](https://github.com/receptron/mulmocast-cli)'s
|
|
69
|
+
declarative `data-animation` attributes: `animate` (`data-opacity`, `data-translate-x/y`,
|
|
70
|
+
`data-scale`, `data-rotate`, `data-width`/`data-height`), `counter` and `typewriter`, each with
|
|
71
|
+
`data-start` and `data-end` in seconds and an optional `data-easing`. A movie made from the slide
|
|
72
|
+
(an `html_tailwind` beat with `animation: true`) moves the same way. The page plays them with its
|
|
73
|
+
own player (MIT; MulmoCast is AGPL), measured against MulmoCast's: the same values at the same
|
|
74
|
+
times. An animation without `data-end` runs to the end of the beat in a movie, and for
|
|
75
|
+
`SLIDE_AUTO_END_SECONDS` (8) here. CSS animations and transitions don't play: each is shown at its
|
|
76
|
+
end. MulmoCast would hold them at their first frame (an element faded in with `@keyframes` stays
|
|
77
|
+
transparent), so a host making a movie adds `SLIDE_CSS_ANIMATIONS_FINISHED` (a `<style>`'s rules)
|
|
78
|
+
to the HTML it passes on. The slide's own scripts don't run.
|
|
72
79
|
|
|
73
80
|
`slideHtmlDocument(html)` (core entry) makes the page: Tailwind's browser build from jsDelivr (one
|
|
74
|
-
version, checked by its hash), the
|
|
81
|
+
version, checked by its hash), the animation player, and a Content Security Policy that lets it send
|
|
75
82
|
nothing out: `connect-src 'none'`; images, media and fonts only from `data:`/`blob:` URLs and
|
|
76
83
|
Google Fonts; and no script but the page's own and Tailwind's, so nothing can navigate the frame to
|
|
77
84
|
a URL carrying the page (a sandbox allows that, and CSP can't forbid it). The slide's `<meta>`,
|
package/dist/core/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export declare const presentSlidePluginCore: SequencePluginCore;
|
|
|
4
4
|
export declare const defineStoryboardPluginCore: SequencePluginCore;
|
|
5
5
|
export declare const presentPanelPluginCore: SequencePluginCore;
|
|
6
6
|
export * from "./definitions";
|
|
7
|
-
export { MAX_SLIDE_HTML,
|
|
7
|
+
export { MAX_SLIDE_HTML, SLIDE_ANIMATION_KINDS, SLIDE_AUTO_END_SECONDS, SLIDE_CSS_ANIMATIONS_FINISHED, SLIDE_HEIGHT, SLIDE_WIDTH, slideHtmlDocument, } from "./slideHtml";
|
|
8
8
|
export { SLIDESHOWS_DIR, STORYBOARDS_DIR, loadRecord } from "./records";
|
|
9
9
|
export type { SequenceContext } from "./host";
|
package/dist/core/slideHtml.d.ts
CHANGED
|
@@ -2,12 +2,17 @@ export declare const SLIDE_WIDTH = 1280;
|
|
|
2
2
|
export declare const SLIDE_HEIGHT = 720;
|
|
3
3
|
/** The most HTML a slide may have, in characters. */
|
|
4
4
|
export declare const MAX_SLIDE_HTML = 60000;
|
|
5
|
-
/** The
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
|
|
5
|
+
/** The data-animation kinds a slide can use: MulmoCast's (its html_tailwind
|
|
6
|
+
* beats with `animation: true`), so a slide animates the same in a movie
|
|
7
|
+
* made from it. MulmoCast also has stagger, codeReveal, blink, coverZoom and
|
|
8
|
+
* coverPan; not these. */
|
|
9
|
+
export declare const SLIDE_ANIMATION_KINDS: readonly ["animate", "counter", "typewriter"];
|
|
10
|
+
/** How long an animation without data-end runs here, in seconds. In a movie
|
|
11
|
+
* it runs to the end of its beat, which the narration decides and the View
|
|
12
|
+
* doesn't know. */
|
|
13
|
+
export declare const SLIDE_AUTO_END_SECONDS = 8;
|
|
9
14
|
/** PAGE_SCRIPT's hash, which the policy allows (checked by a test). */
|
|
10
|
-
export declare const PAGE_SCRIPT_HASH = "sha256-
|
|
15
|
+
export declare const PAGE_SCRIPT_HASH = "sha256-0zsqCvkCfq5Z1iJCn46NiAtSAyIr/JDkyNs/Fae1J+Y=";
|
|
11
16
|
/** The slide's HTML, made safe to show:
|
|
12
17
|
* - the tags that act on the page from outside the body are plain text:
|
|
13
18
|
* <meta> (a refresh navigates the frame, a policy of its own), <base> and
|
|
@@ -19,5 +24,12 @@ export declare const PAGE_SCRIPT_HASH = "sha256-MZyL5rvWmIVxl3WUuDU5BqzPJGR2/fV/
|
|
|
19
24
|
* "shadowroot" is renamed, which leaves no attribute that makes one.
|
|
20
25
|
* Everything stays in the light DOM, where the guard sees it. */
|
|
21
26
|
export declare const neutralizeSlideHtml: (html: string) => string;
|
|
27
|
+
/** CSS rules that stop a slide's CSS animations and transitions, which the
|
|
28
|
+
* slide isn't to use (it animates with data-animation), showing each at its
|
|
29
|
+
* end: an element the model faded in with its own @keyframes is seen, not
|
|
30
|
+
* held at its first, transparent frame. MulmoCast pauses CSS animations at
|
|
31
|
+
* that frame, so a host that makes a movie of the slide adds these to the
|
|
32
|
+
* HTML it passes on (a zero-length animation is at its end even paused). */
|
|
33
|
+
export declare const SLIDE_CSS_ANIMATIONS_FINISHED = "*, *::before, *::after { animation-play-state: paused !important; animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; animation-fill-mode: both !important; transition: none !important; }";
|
|
22
34
|
/** The page an HTML slide is shown as. */
|
|
23
35
|
export declare function slideHtmlDocument(html: string): string;
|