@canonical/react-motion-control 0.0.0-stage → 0.48.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/LICENSE +166 -0
- package/README.md +124 -2
- package/dist/esm/MotionHint/MotionHint.js +19 -0
- package/dist/esm/MotionHint/MotionHint.js.map +1 -0
- package/dist/esm/MotionHint/index.js +2 -0
- package/dist/esm/MotionHint/index.js.map +1 -0
- package/dist/esm/MotionHint/types.js +2 -0
- package/dist/esm/MotionHint/types.js.map +1 -0
- package/dist/esm/MotionScene/Context.js +4 -0
- package/dist/esm/MotionScene/Context.js.map +1 -0
- package/dist/esm/MotionScene/MotionScene.js +76 -0
- package/dist/esm/MotionScene/MotionScene.js.map +1 -0
- package/dist/esm/MotionScene/common/Controls/Controls.js +38 -0
- package/dist/esm/MotionScene/common/Controls/Controls.js.map +1 -0
- package/dist/esm/MotionScene/common/Controls/index.js +2 -0
- package/dist/esm/MotionScene/common/Controls/index.js.map +1 -0
- package/dist/esm/MotionScene/common/Controls/types.js +2 -0
- package/dist/esm/MotionScene/common/Controls/types.js.map +1 -0
- package/dist/esm/MotionScene/common/ExportSlide/ExportSlide.js +55 -0
- package/dist/esm/MotionScene/common/ExportSlide/ExportSlide.js.map +1 -0
- package/dist/esm/MotionScene/common/ExportSlide/constants.js +11 -0
- package/dist/esm/MotionScene/common/ExportSlide/constants.js.map +1 -0
- package/dist/esm/MotionScene/common/ExportSlide/index.js +3 -0
- package/dist/esm/MotionScene/common/ExportSlide/index.js.map +1 -0
- package/dist/esm/MotionScene/common/ExportSlide/types.js +2 -0
- package/dist/esm/MotionScene/common/ExportSlide/types.js.map +1 -0
- package/dist/esm/MotionScene/common/Frame/Frame.js +19 -0
- package/dist/esm/MotionScene/common/Frame/Frame.js.map +1 -0
- package/dist/esm/MotionScene/common/Frame/index.js +2 -0
- package/dist/esm/MotionScene/common/Frame/index.js.map +1 -0
- package/dist/esm/MotionScene/common/Frame/types.js +2 -0
- package/dist/esm/MotionScene/common/Frame/types.js.map +1 -0
- package/dist/esm/MotionScene/common/Title/Title.js +27 -0
- package/dist/esm/MotionScene/common/Title/Title.js.map +1 -0
- package/dist/esm/MotionScene/common/Title/index.js +2 -0
- package/dist/esm/MotionScene/common/Title/index.js.map +1 -0
- package/dist/esm/MotionScene/common/Title/types.js +2 -0
- package/dist/esm/MotionScene/common/Title/types.js.map +1 -0
- package/dist/esm/MotionScene/common/index.js +5 -0
- package/dist/esm/MotionScene/common/index.js.map +1 -0
- package/dist/esm/MotionScene/index.js +2 -0
- package/dist/esm/MotionScene/index.js.map +1 -0
- package/dist/esm/MotionScene/types.js +2 -0
- package/dist/esm/MotionScene/types.js.map +1 -0
- package/dist/esm/MotionSlide/MotionSlide.js +42 -0
- package/dist/esm/MotionSlide/MotionSlide.js.map +1 -0
- package/dist/esm/MotionSlide/index.js +2 -0
- package/dist/esm/MotionSlide/index.js.map +1 -0
- package/dist/esm/MotionSlide/types.js +2 -0
- package/dist/esm/MotionSlide/types.js.map +1 -0
- package/dist/esm/hooks/index.js +2 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/types.js +2 -0
- package/dist/esm/hooks/types.js.map +1 -0
- package/dist/esm/hooks/useMotion.js +228 -0
- package/dist/esm/hooks/useMotion.js.map +1 -0
- package/dist/esm/index.js +17 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/styles.css +81 -0
- package/dist/types/MotionHint/MotionHint.d.ts +7 -0
- package/dist/types/MotionHint/MotionHint.d.ts.map +1 -0
- package/dist/types/MotionHint/index.d.ts +3 -0
- package/dist/types/MotionHint/index.d.ts.map +1 -0
- package/dist/types/MotionHint/types.d.ts +7 -0
- package/dist/types/MotionHint/types.d.ts.map +1 -0
- package/dist/types/MotionScene/Context.d.ts +4 -0
- package/dist/types/MotionScene/Context.d.ts.map +1 -0
- package/dist/types/MotionScene/MotionScene.d.ts +8 -0
- package/dist/types/MotionScene/MotionScene.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Controls/Controls.d.ts +8 -0
- package/dist/types/MotionScene/common/Controls/Controls.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Controls/index.d.ts +3 -0
- package/dist/types/MotionScene/common/Controls/index.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Controls/types.d.ts +10 -0
- package/dist/types/MotionScene/common/Controls/types.d.ts.map +1 -0
- package/dist/types/MotionScene/common/ExportSlide/ExportSlide.d.ts +9 -0
- package/dist/types/MotionScene/common/ExportSlide/ExportSlide.d.ts.map +1 -0
- package/dist/types/MotionScene/common/ExportSlide/constants.d.ts +28 -0
- package/dist/types/MotionScene/common/ExportSlide/constants.d.ts.map +1 -0
- package/dist/types/MotionScene/common/ExportSlide/index.d.ts +4 -0
- package/dist/types/MotionScene/common/ExportSlide/index.d.ts.map +1 -0
- package/dist/types/MotionScene/common/ExportSlide/types.d.ts +23 -0
- package/dist/types/MotionScene/common/ExportSlide/types.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Frame/Frame.d.ts +12 -0
- package/dist/types/MotionScene/common/Frame/Frame.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Frame/index.d.ts +3 -0
- package/dist/types/MotionScene/common/Frame/index.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Frame/types.d.ts +11 -0
- package/dist/types/MotionScene/common/Frame/types.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Title/Title.d.ts +8 -0
- package/dist/types/MotionScene/common/Title/Title.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Title/index.d.ts +3 -0
- package/dist/types/MotionScene/common/Title/index.d.ts.map +1 -0
- package/dist/types/MotionScene/common/Title/types.d.ts +18 -0
- package/dist/types/MotionScene/common/Title/types.d.ts.map +1 -0
- package/dist/types/MotionScene/common/index.d.ts +5 -0
- package/dist/types/MotionScene/common/index.d.ts.map +1 -0
- package/dist/types/MotionScene/index.d.ts +4 -0
- package/dist/types/MotionScene/index.d.ts.map +1 -0
- package/dist/types/MotionScene/types.d.ts +31 -0
- package/dist/types/MotionScene/types.d.ts.map +1 -0
- package/dist/types/MotionSlide/MotionSlide.d.ts +15 -0
- package/dist/types/MotionSlide/MotionSlide.d.ts.map +1 -0
- package/dist/types/MotionSlide/index.d.ts +3 -0
- package/dist/types/MotionSlide/index.d.ts.map +1 -0
- package/dist/types/MotionSlide/types.d.ts +26 -0
- package/dist/types/MotionSlide/types.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +3 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/types.d.ts +86 -0
- package/dist/types/hooks/types.d.ts.map +1 -0
- package/dist/types/hooks/useMotion.d.ts +16 -0
- package/dist/types/hooks/useMotion.d.ts.map +1 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +78 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExportSlideProps } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* A form that exports a scene on a slide: the slide's size, typed in or chosen from the usual ones, whether it
|
|
4
|
+
* shows the whole figure or the screen alone, its title and caption, how fast the scene plays, and whether the
|
|
5
|
+
* file is a video or a GIF. While the scene records, the form says how far it is.
|
|
6
|
+
*/
|
|
7
|
+
declare const ExportSlide: ({ scene, onClose, onExport }: ExportSlideProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ExportSlide;
|
|
9
|
+
//# sourceMappingURL=ExportSlide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportSlide.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/ExportSlide/ExportSlide.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,YAAY,CAAC;AAIhE;;;;GAIG;AACH,QAAA,MAAM,WAAW,iCAAkC,gBAAgB,4CAqKlE,CAAC;eAEa,WAAW"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** The sizes a slide is offered at first, by name; any other can be typed in. */
|
|
2
|
+
export declare const SLIDE_SIZES: readonly [{
|
|
3
|
+
readonly name: "4K 16:10";
|
|
4
|
+
readonly width: 3840;
|
|
5
|
+
readonly height: 2400;
|
|
6
|
+
}, {
|
|
7
|
+
readonly name: "4K 16:9";
|
|
8
|
+
readonly width: 3840;
|
|
9
|
+
readonly height: 2160;
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "1080p 16:9";
|
|
12
|
+
readonly width: 1920;
|
|
13
|
+
readonly height: 1080;
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "1080p 16:10";
|
|
16
|
+
readonly width: 1920;
|
|
17
|
+
readonly height: 1200;
|
|
18
|
+
}, {
|
|
19
|
+
readonly name: "Square";
|
|
20
|
+
readonly width: 2160;
|
|
21
|
+
readonly height: 2160;
|
|
22
|
+
}];
|
|
23
|
+
/** Pictures per second when the reader asks for none: smooth for a video, small for a GIF. */
|
|
24
|
+
export declare const DEFAULT_FPS: {
|
|
25
|
+
readonly mp4: 30;
|
|
26
|
+
readonly gif: 10;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/ExportSlide/constants.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,WAAW;aACpB,IAAI,EAAE,UAAU;aAAE,KAAK,EAAE,IAAI;aAAE,MAAM,EAAE,IAAI;;aAC3C,IAAI,EAAE,SAAS;aAAE,KAAK,EAAE,IAAI;aAAE,MAAM,EAAE,IAAI;;aAC1C,IAAI,EAAE,YAAY;aAAE,KAAK,EAAE,IAAI;aAAE,MAAM,EAAE,IAAI;;aAC7C,IAAI,EAAE,aAAa;aAAE,KAAK,EAAE,IAAI;aAAE,MAAM,EAAE,IAAI;;aAC9C,IAAI,EAAE,QAAQ;aAAE,KAAK,EAAE,IAAI;aAAE,MAAM,EAAE,IAAI;EACnC,CAAC;AAEX,8FAA8F;AAC9F,eAAO,MAAM,WAAW;aAAK,GAAG,EAAE,EAAE;aAAE,GAAG,EAAE,EAAE;CAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/ExportSlide/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Scene } from "@canonical/motion-control/cast";
|
|
2
|
+
import type { Slide } from "@canonical/motion-control/dom";
|
|
3
|
+
/** What a reader asks of an export: the slide, how fast the scene plays on it, and the file. */
|
|
4
|
+
export interface SlideExport {
|
|
5
|
+
/** The slide's size, what of the figure it shows, and its title and caption. */
|
|
6
|
+
slide: Slide;
|
|
7
|
+
/** How many times faster than written the scene plays in the file. */
|
|
8
|
+
speed: number;
|
|
9
|
+
/** The file: an MP4 video, or an animated GIF. */
|
|
10
|
+
format: "mp4" | "gif";
|
|
11
|
+
/** Pictures per second. */
|
|
12
|
+
fps: number;
|
|
13
|
+
}
|
|
14
|
+
/** Props for the form that exports a scene on a slide. */
|
|
15
|
+
export interface ExportSlideProps {
|
|
16
|
+
/** The scene, whose title the slide's title starts from. */
|
|
17
|
+
scene: Scene;
|
|
18
|
+
/** Called when the reader closes the form without exporting, or once the file is handed over. */
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
/** Records the scene as asked and hands the reader the file. Gives how far it is, from 0 to 1. */
|
|
21
|
+
onExport: (asked: SlideExport, onProgress: (done: number) => void) => Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/ExportSlide/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,gGAAgG;AAChG,MAAM,WAAW,WAAW;IAC1B,gFAAgF;IAChF,KAAK,EAAE,KAAK,CAAC;IACb,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;IACtB,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,KAAK,EAAE,KAAK,CAAC;IACb,iGAAiG;IACjG,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kGAAkG;IAClG,QAAQ,EAAE,CACR,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FrameProps } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* One frame of a scene: the application's own components in one state, with a name the scene's steps call it
|
|
4
|
+
* by. Every frame a scene shows is on the page at once, so each has its data and its size from the start; only
|
|
5
|
+
* the frame in view shows and can be reached. A frame the scene never shows takes no room, so one set of
|
|
6
|
+
* frames can serve many scenes.
|
|
7
|
+
*
|
|
8
|
+
* `import { MotionScene } from "@canonical/react-motion-control";`
|
|
9
|
+
*/
|
|
10
|
+
declare const Frame: ({ name, code, className, children, ...rest }: FrameProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Frame;
|
|
12
|
+
//# sourceMappingURL=Frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/Frame/Frame.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI7C;;;;;;;GAOG;AACH,QAAA,MAAM,KAAK,iDAAkD,UAAU,4CAgBtE,CAAC;eAEa,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/Frame/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
interface OwnProps {
|
|
3
|
+
/** The frame's name, as the scene's steps call it: `<view>.<state>`. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** The short code the panel shows for the frame. */
|
|
6
|
+
code?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Props for `MotionScene.Frame`: its own, and every attribute a native `<div>` accepts. */
|
|
9
|
+
export type FrameProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/Frame/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,UAAU,QAAQ;IAChB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,4FAA4F;AAC5F,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TitleProps } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The title's row of a scene: what it is, its title as a link to itself, what it is about, and three dots that
|
|
4
|
+
* open the menu of what else a reader can do with it.
|
|
5
|
+
*/
|
|
6
|
+
declare const Title: ({ scene, words, onSave, onExportSlide, loop, onLoop, }: TitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Title;
|
|
8
|
+
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/Title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;GAGG;AACH,QAAA,MAAM,KAAK,2DAOR,UAAU,4CA+DZ,CAAC;eAEa,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/Title/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Scene } from "@canonical/motion-control/cast";
|
|
2
|
+
import type { Words } from "@canonical/motion-control/dom";
|
|
3
|
+
/** Props for the title's row of a scene. */
|
|
4
|
+
export interface TitleProps {
|
|
5
|
+
/** The scene. */
|
|
6
|
+
scene: Scene;
|
|
7
|
+
/** The words of the panel. */
|
|
8
|
+
words: Words;
|
|
9
|
+
/** Records the scene as a GIF and hands the reader the file. Gives how far it is, from 0 to 1. */
|
|
10
|
+
onSave: (onProgress: (done: number) => void) => Promise<void>;
|
|
11
|
+
/** Opens the form that exports the scene on a slide. */
|
|
12
|
+
onExportSlide: () => void;
|
|
13
|
+
/** Whether the scene starts again at its end. */
|
|
14
|
+
loop: boolean;
|
|
15
|
+
/** Turns starting again at the end on or off. */
|
|
16
|
+
onLoop: (on: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/MotionScene/common/Title/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,4CAA4C;AAC5C,MAAM,WAAW,UAAU;IACzB,iBAAiB;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,8BAA8B;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,kGAAkG;IAClG,MAAM,EAAE,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,wDAAwD;IACxD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,iDAAiD;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,iDAAiD;IACjD,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Controls, type ControlsProps } from "./Controls/index.js";
|
|
2
|
+
export { ExportSlide, type ExportSlideProps, type SlideExport, } from "./ExportSlide/index.js";
|
|
3
|
+
export { Frame, type FrameProps } from "./Frame/index.js";
|
|
4
|
+
export { Title, type TitleProps } from "./Title/index.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MotionScene/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/MotionScene/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Scene } from "@canonical/motion-control/cast";
|
|
2
|
+
import type { Shown, TitlePlace } from "@canonical/motion-control/dom";
|
|
3
|
+
import type { ComponentProps } from "react";
|
|
4
|
+
import type { UseMotionOptions } from "../hooks/index.js";
|
|
5
|
+
interface OwnProps extends UseMotionOptions {
|
|
6
|
+
/** The scene to play: the frames to show, and the interactions that lead from one to the next. */
|
|
7
|
+
scene: Scene;
|
|
8
|
+
/**
|
|
9
|
+
* Where the title stands. `above`, when left out: a bar over the screen. `below`: the first row of the panel
|
|
10
|
+
* under the screen.
|
|
11
|
+
*/
|
|
12
|
+
titlePlace?: TitlePlace;
|
|
13
|
+
/**
|
|
14
|
+
* What the figure shows beside its screen: the title's row, the caption's rows and the controls' row, whole
|
|
15
|
+
* or part by part. Everything, when left out.
|
|
16
|
+
*/
|
|
17
|
+
show?: Shown;
|
|
18
|
+
/** The frames, each a `MotionScene.Frame` holding the application's components in one state. */
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/** What the frames of a scene need to know of it: which of them is in view, and which the scene shows at all. */
|
|
22
|
+
export interface SceneFrames {
|
|
23
|
+
/** The name of the frame in view. */
|
|
24
|
+
current: string;
|
|
25
|
+
/** The names of the frames the scene shows. A frame it never shows takes no room. */
|
|
26
|
+
used: ReadonlySet<string>;
|
|
27
|
+
}
|
|
28
|
+
/** Props for `MotionScene`: its own, and every attribute a native `<figure>` accepts. */
|
|
29
|
+
export type MotionSceneProps = OwnProps & Omit<ComponentProps<"figure">, keyof OwnProps>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/MotionScene/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,UAAU,QAAS,SAAQ,gBAAgB;IACzC,kGAAkG;IAClG,KAAK,EAAE,KAAK,CAAC;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,gGAAgG;IAChG,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,iHAAiH;AACjH,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,yFAAyF;AACzF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GACrC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MotionSlideProps } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* A scene on a slide of a deck: the slide at its full size, a title over the scene and a caption under it, and
|
|
4
|
+
* the scene centred and scaled to fill what is left, whole. Framed, it is the whole figure; bare, the screen
|
|
5
|
+
* alone, with the symbols over it.
|
|
6
|
+
*
|
|
7
|
+
* The layout is that of a slide the recorders of `@canonical/motion-control` write to a file, so what shows here is what a
|
|
8
|
+
* video or a GIF of it shows. A slide is drawn at its full size; a page that shows it smaller scales what holds
|
|
9
|
+
* it.
|
|
10
|
+
*
|
|
11
|
+
* `import { MotionSlide } from "@canonical/react-motion-control";`
|
|
12
|
+
*/
|
|
13
|
+
declare const MotionSlide: ({ scene, width, height, mode, title, caption, profile, speeds, keys, outline, practice, loop, autoPlay, onStep, onEnd, className, style, children, ...rest }: MotionSlideProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default MotionSlide;
|
|
15
|
+
//# sourceMappingURL=MotionSlide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MotionSlide.d.ts","sourceRoot":"","sources":["../../../src/MotionSlide/MotionSlide.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AASnD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,WAAW,iKAoBd,gBAAgB,4CAsDlB,CAAC;eAEa,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/MotionSlide/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Scene } from "@canonical/motion-control/cast";
|
|
2
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import type { UseMotionOptions } from "../hooks/index.js";
|
|
4
|
+
interface OwnProps extends UseMotionOptions {
|
|
5
|
+
/** The scene the slide shows. */
|
|
6
|
+
scene: Scene;
|
|
7
|
+
/** The slide's width, in pixels: a deck's slide is drawn at its full size. 3840 when left out. */
|
|
8
|
+
width?: number;
|
|
9
|
+
/** The slide's height, in pixels. 2400 when left out, a 16:10 slide at 4K. */
|
|
10
|
+
height?: number;
|
|
11
|
+
/**
|
|
12
|
+
* What of the figure the slide shows. `framed`, when left out: the whole figure, with its title and caption.
|
|
13
|
+
* `bare`: the screen alone, with the symbols over it.
|
|
14
|
+
*/
|
|
15
|
+
mode?: "framed" | "bare";
|
|
16
|
+
/** A line over the scene, in the slide's own type. */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** A line under the scene, in the slide's own type. */
|
|
19
|
+
caption?: string;
|
|
20
|
+
/** The frames, each a `MotionScene.Frame` holding the application's components in one state. */
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/** Props for `MotionSlide`: its own, and every attribute a native `<div>` accepts. */
|
|
24
|
+
export type MotionSlideProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/MotionSlide/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,UAAU,QAAS,SAAQ,gBAAgB;IACzC,iCAAiC;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,kGAAkG;IAClG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gGAAgG;IAChG,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GACrC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { Scene } from "@canonical/motion-control/cast";
|
|
2
|
+
import type { KeysMode, Outline, Profile, ProfileOptions } from "@canonical/motion-control/dom";
|
|
3
|
+
import type { Moment } from "@canonical/motion-control/moment";
|
|
4
|
+
import type { Position, Timeline } from "@canonical/motion-control/timeline";
|
|
5
|
+
import type { RefObject } from "react";
|
|
6
|
+
/** What `useMotion` may be told beside the scene. */
|
|
7
|
+
export interface UseMotionOptions {
|
|
8
|
+
/**
|
|
9
|
+
* What the application says about its frames: where typed words go, what rolls on a scroll, what stays in
|
|
10
|
+
* place while it rolls, what a slide carries.
|
|
11
|
+
*/
|
|
12
|
+
profile?: ProfileOptions;
|
|
13
|
+
/** The speeds the scene can be played at. Half, as written and double when left out. */
|
|
14
|
+
speeds?: number[];
|
|
15
|
+
/**
|
|
16
|
+
* How keys are shown over the frames. `sign`, when left out: a small sign that words are being typed.
|
|
17
|
+
* `letters`: a strip of keystrokes over the frame's line, with the letters as they arrive and each named
|
|
18
|
+
* key as a cap after them. The stylesheet's `--mo-keys-gap` sets how far over the line it stands.
|
|
19
|
+
*/
|
|
20
|
+
keys?: KeysMode;
|
|
21
|
+
/**
|
|
22
|
+
* What is outlined in the frame while a step acts on it: what keys go to, on when left out, and what a click
|
|
23
|
+
* or a tap presses, off when left out.
|
|
24
|
+
*/
|
|
25
|
+
outline?: Outline;
|
|
26
|
+
/** Whether a step the scene marks with `practice` waits for the reader to do it on the frame. */
|
|
27
|
+
practice?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the scene starts again at its end, whatever its cast says. As the cast says when left out: again,
|
|
30
|
+
* unless it says `"loop": false`. The reader's choice from the menu wins over both.
|
|
31
|
+
*/
|
|
32
|
+
loop?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the scene plays by itself while it is in view. It does when left out, unless the reader asked for
|
|
35
|
+
* less motion.
|
|
36
|
+
*/
|
|
37
|
+
autoPlay?: boolean;
|
|
38
|
+
/** Called when the step in view changes, with its index. */
|
|
39
|
+
onStep?: (index: number) => void;
|
|
40
|
+
/** Called when the scene reaches its end, whether it then starts again or stops. */
|
|
41
|
+
onEnd?: () => void;
|
|
42
|
+
}
|
|
43
|
+
/** The arguments of `useMotion`: the scene, then what is optional. */
|
|
44
|
+
export type UseMotionProps = [scene: Scene, options?: UseMotionOptions];
|
|
45
|
+
/** What `useMotion` gives back: where the scene is, what it shows there, and the ways to move it. */
|
|
46
|
+
export interface UseMotionResult {
|
|
47
|
+
/** For the element that holds the frames. Each frame is a child that carries `data-frame`. */
|
|
48
|
+
screenRef: RefObject<HTMLDivElement | null>;
|
|
49
|
+
/** For the element laid over the screen, where the symbols are drawn. */
|
|
50
|
+
layerRef: RefObject<HTMLDivElement | null>;
|
|
51
|
+
/** The name of the frame in view. */
|
|
52
|
+
frame: string;
|
|
53
|
+
/** The scene laid out in time, once the frames are on the page. */
|
|
54
|
+
timeline: Timeline | undefined;
|
|
55
|
+
/** The step in view, and how far into it. */
|
|
56
|
+
position: Position;
|
|
57
|
+
/** What the scene shows at that position, once it has been drawn. */
|
|
58
|
+
moment: Moment | undefined;
|
|
59
|
+
/** The profile in force: the application's, over the defaults. */
|
|
60
|
+
profile: Profile;
|
|
61
|
+
/** Whether the scene is playing. */
|
|
62
|
+
playing: boolean;
|
|
63
|
+
/** How many times faster than written the scene plays. */
|
|
64
|
+
speed: number;
|
|
65
|
+
/** The speeds a press of the speed goes through, slowest first. */
|
|
66
|
+
speeds: number[];
|
|
67
|
+
/** Whether the scene starts again at its end. */
|
|
68
|
+
loop: boolean;
|
|
69
|
+
/** The step that waits for the reader to do it themselves, when one does. */
|
|
70
|
+
awaiting: number | undefined;
|
|
71
|
+
/** Starts the clock. */
|
|
72
|
+
play: () => void;
|
|
73
|
+
/** Stops the clock where it is. */
|
|
74
|
+
pause: () => void;
|
|
75
|
+
/** Shows the moment at a time from the start, in milliseconds. */
|
|
76
|
+
seek: (time: number) => void;
|
|
77
|
+
/** Goes to the next (1) or the previous (-1) keyframe, shown settled, and pauses. */
|
|
78
|
+
stepKeyframe: (direction: 1 | -1) => void;
|
|
79
|
+
/** Goes on to the next speed, then round again. */
|
|
80
|
+
cycleSpeed: () => void;
|
|
81
|
+
/** Makes the scene start again at its end, or stop there, from now on. */
|
|
82
|
+
setLoop: (on: boolean) => void;
|
|
83
|
+
/** Tells the hook the reader pressed something on the frame: a step that waited for it goes on. */
|
|
84
|
+
press: (pressed: Element) => void;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EACV,QAAQ,EACR,OAAO,EACP,OAAO,EACP,cAAc,EACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,sEAAsE;AACtE,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAExE,qGAAqG;AACrG,MAAM,WAAW,eAAe;IAC9B,8FAA8F;IAC9F,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC5C,yEAAyE;IACzE,QAAQ,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3C,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,6CAA6C;IAC7C,QAAQ,EAAE,QAAQ,CAAC;IACnB,qEAAqE;IACrE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,iDAAiD;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,wBAAwB;IACxB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,mCAAmC;IACnC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,kEAAkE;IAClE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,qFAAqF;IACrF,YAAY,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1C,mDAAmD;IACnD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,0EAA0E;IAC1E,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,mGAAmG;IACnG,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UseMotionProps, UseMotionResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Plays a scene over frames that are living parts of the page.
|
|
4
|
+
*
|
|
5
|
+
* The hook holds where the scene is and runs its clock. After every change of position it works out what the
|
|
6
|
+
* scene shows there, makes the frame in view show it, and draws the symbols over it; before the next change it
|
|
7
|
+
* takes everything it did to the frame back, because the frame is the application's own and is not drawn afresh.
|
|
8
|
+
*
|
|
9
|
+
* @param scene - The scene to play. Its first step must show a frame.
|
|
10
|
+
* @param options - The application's profile, the speeds, whether to wait for the reader at steps marked for
|
|
11
|
+
* practice, how keys are shown, whether to play while in view, and what to call when the step changes or the scene ends.
|
|
12
|
+
* @returns Refs for the screen and the layer, where the scene is, what it shows, and the ways to move it.
|
|
13
|
+
*/
|
|
14
|
+
declare const useMotion: (...[scene, options]: UseMotionProps) => UseMotionResult;
|
|
15
|
+
export default useMotion;
|
|
16
|
+
//# sourceMappingURL=useMotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMotion.d.ts","sourceRoot":"","sources":["../../../src/hooks/useMotion.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AASlE;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,SAAS,wBACa,cAAc,KACvC,eAoQF,CAAC;eAEa,SAAS"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React components that play motion scenes over an application's own components.
|
|
3
|
+
*
|
|
4
|
+
* `MotionScene` plays a scene in the page, `MotionHint` a small scene beside the thing it explains, and
|
|
5
|
+
* `MotionSlide` a scene on a slide of a deck, at the slide's full size. `useMotion` is what they are made of, for
|
|
6
|
+
* a figure of another shape. A scene's menu exports it on a slide, as a video or a GIF.
|
|
7
|
+
*
|
|
8
|
+
* The stylesheet of `@canonical/motion-control` and this package's own are needed once in the application:
|
|
9
|
+
* `import "@canonical/motion-control/style.css"; import "@canonical/react-motion-control/style.css";`
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
export type { UseMotionOptions, UseMotionProps, UseMotionResult, } from "./hooks/index.js";
|
|
14
|
+
export { useMotion } from "./hooks/index.js";
|
|
15
|
+
export type { MotionHintProps } from "./MotionHint/index.js";
|
|
16
|
+
export { MotionHint } from "./MotionHint/index.js";
|
|
17
|
+
export type { FrameProps, MotionSceneProps } from "./MotionScene/index.js";
|
|
18
|
+
export { MotionScene } from "./MotionScene/index.js";
|
|
19
|
+
export type { MotionSlideProps } from "./MotionSlide/index.js";
|
|
20
|
+
export { MotionSlide } from "./MotionSlide/index.js";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,80 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/react-motion-control",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"description": "React components that play motion-control scenes over an application's own components: embeds, slides, fullscreen tours and hints.",
|
|
4
|
+
"version": "0.48.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.css"
|
|
8
|
+
],
|
|
9
|
+
"main": "dist/esm/index.js",
|
|
10
|
+
"module": "dist/esm/index.js",
|
|
11
|
+
"types": "dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"import": "./dist/esm/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./style.css": "./dist/esm/styles.css"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"author": {
|
|
23
|
+
"email": "webteam@canonical.com",
|
|
24
|
+
"name": "Canonical Webteam"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/canonical/pragma-web"
|
|
29
|
+
},
|
|
30
|
+
"license": "LGPL-3.0",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/canonical/pragma-web/issues"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/canonical/pragma-web#readme",
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "bun run build:package",
|
|
40
|
+
"build:all": "bun run build:package && bun run build:storybook",
|
|
41
|
+
"build:storybook": "storybook build",
|
|
42
|
+
"build:package": "tsc -p tsconfig.build.json && cp src/styles.css dist/esm/styles.css",
|
|
43
|
+
"check": "bun run check:biome && bun run check:ts && bun run check:webarchitect",
|
|
44
|
+
"check:webarchitect": "webarchitect library",
|
|
45
|
+
"check:fix": "bun run check:biome:fix && bun run check:ts",
|
|
46
|
+
"check:biome": "biome check",
|
|
47
|
+
"check:biome:fix": "biome check --write",
|
|
48
|
+
"check:ts": "tsc --noEmit",
|
|
49
|
+
"storybook": "storybook dev -p 6008 --no-open --host 0.0.0.0",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:watch": "vitest",
|
|
52
|
+
"test:coverage": "vitest run --coverage"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@canonical/motion-control": "^0.48.0",
|
|
56
|
+
"react": "^19.2.4",
|
|
57
|
+
"react-dom": "^19.2.4"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@biomejs/biome": "2.6.9",
|
|
61
|
+
"@canonical/biome-config": "0.47.0",
|
|
62
|
+
"@canonical/storybook-config": "^0.48.0",
|
|
63
|
+
"@canonical/styles": "^0.48.0",
|
|
64
|
+
"@canonical/typescript-config-react": "^0.48.0",
|
|
65
|
+
"@canonical/webarchitect": "0.46.0",
|
|
66
|
+
"@chromatic-com/storybook": "^5.0.1",
|
|
67
|
+
"@storybook/addon-docs": "^10.6.0",
|
|
68
|
+
"@storybook/react-vite": "^10.6.0",
|
|
69
|
+
"@testing-library/react": "^16.3.2",
|
|
70
|
+
"@types/node": "^26.0.0",
|
|
71
|
+
"@types/react": "^19.2.14",
|
|
72
|
+
"@types/react-dom": "^19.2.3",
|
|
73
|
+
"@vitest/coverage-v8": "^5.0.0",
|
|
74
|
+
"happy-dom": "^21.0.0",
|
|
75
|
+
"storybook": "^10.6.0",
|
|
76
|
+
"typescript": "^7.0.2",
|
|
77
|
+
"vitest": "^5.0.0"
|
|
78
|
+
},
|
|
79
|
+
"gitHead": "aee4aebab851f90159776a7ba658d0c62e0d2bf4"
|
|
80
|
+
}
|