@canonical/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 +300 -2
- package/cast.schema.json +101 -0
- package/dist/esm/cli.js +30 -0
- package/dist/esm/cli.js.map +1 -0
- package/dist/esm/global.js +7 -0
- package/dist/esm/global.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/cast/checkCasts.js +34 -0
- package/dist/esm/lib/cast/checkCasts.js.map +1 -0
- package/dist/esm/lib/cast/checkScene.js +58 -0
- package/dist/esm/lib/cast/checkScene.js.map +1 -0
- package/dist/esm/lib/cast/checkStep.js +73 -0
- package/dist/esm/lib/cast/checkStep.js.map +1 -0
- package/dist/esm/lib/cast/constants.js +53 -0
- package/dist/esm/lib/cast/constants.js.map +1 -0
- package/dist/esm/lib/cast/formatReport.js +22 -0
- package/dist/esm/lib/cast/formatReport.js.map +1 -0
- package/dist/esm/lib/cast/index.js +10 -0
- package/dist/esm/lib/cast/index.js.map +1 -0
- package/dist/esm/lib/cast/listFrameNames.js +19 -0
- package/dist/esm/lib/cast/listFrameNames.js.map +1 -0
- package/dist/esm/lib/cast/measureScene.js +11 -0
- package/dist/esm/lib/cast/measureScene.js.map +1 -0
- package/dist/esm/lib/cast/measureStep.js +21 -0
- package/dist/esm/lib/cast/measureStep.js.map +1 -0
- package/dist/esm/lib/cast/measureTyping.js +13 -0
- package/dist/esm/lib/cast/measureTyping.js.map +1 -0
- package/dist/esm/lib/cast/types.js +2 -0
- package/dist/esm/lib/cast/types.js.map +1 -0
- package/dist/esm/lib/gif/compressLzw.js +61 -0
- package/dist/esm/lib/gif/compressLzw.js.map +1 -0
- package/dist/esm/lib/gif/constants.js +9 -0
- package/dist/esm/lib/gif/constants.js.map +1 -0
- package/dist/esm/lib/gif/encodeGif.js +45 -0
- package/dist/esm/lib/gif/encodeGif.js.map +1 -0
- package/dist/esm/lib/gif/index.js +6 -0
- package/dist/esm/lib/gif/index.js.map +1 -0
- package/dist/esm/lib/gif/mergeStills.js +32 -0
- package/dist/esm/lib/gif/mergeStills.js.map +1 -0
- package/dist/esm/lib/gif/quantizePictures.js +75 -0
- package/dist/esm/lib/gif/quantizePictures.js.map +1 -0
- package/dist/esm/lib/gif/types.js +2 -0
- package/dist/esm/lib/gif/types.js.map +1 -0
- package/dist/esm/lib/index.js +3 -0
- package/dist/esm/lib/index.js.map +1 -0
- package/dist/esm/lib/moment/constants.js +33 -0
- package/dist/esm/lib/moment/constants.js.map +1 -0
- package/dist/esm/lib/moment/describeAction.js +20 -0
- package/dist/esm/lib/moment/describeAction.js.map +1 -0
- package/dist/esm/lib/moment/describeKeyRun.js +53 -0
- package/dist/esm/lib/moment/describeKeyRun.js.map +1 -0
- package/dist/esm/lib/moment/describeMoment.js +323 -0
- package/dist/esm/lib/moment/describeMoment.js.map +1 -0
- package/dist/esm/lib/moment/easeInOut.js +12 -0
- package/dist/esm/lib/moment/easeInOut.js.map +1 -0
- package/dist/esm/lib/moment/index.js +8 -0
- package/dist/esm/lib/moment/index.js.map +1 -0
- package/dist/esm/lib/moment/resolveStates.js +82 -0
- package/dist/esm/lib/moment/resolveStates.js.map +1 -0
- package/dist/esm/lib/moment/takeSpan.js +12 -0
- package/dist/esm/lib/moment/takeSpan.js.map +1 -0
- package/dist/esm/lib/moment/types.js +2 -0
- package/dist/esm/lib/moment/types.js.map +1 -0
- package/dist/esm/lib/player/Player.js +498 -0
- package/dist/esm/lib/player/Player.js.map +1 -0
- package/dist/esm/lib/player/announceHeight.js +30 -0
- package/dist/esm/lib/player/announceHeight.js.map +1 -0
- package/dist/esm/lib/player/applyMoment.js +155 -0
- package/dist/esm/lib/player/applyMoment.js.map +1 -0
- package/dist/esm/lib/player/assertPresent.js +14 -0
- package/dist/esm/lib/player/assertPresent.js.map +1 -0
- package/dist/esm/lib/player/collectFrames.js +30 -0
- package/dist/esm/lib/player/collectFrames.js.map +1 -0
- package/dist/esm/lib/player/collectStyles.js +24 -0
- package/dist/esm/lib/player/collectStyles.js.map +1 -0
- package/dist/esm/lib/player/constants.js +101 -0
- package/dist/esm/lib/player/constants.js.map +1 -0
- package/dist/esm/lib/player/defaultProfile.js +50 -0
- package/dist/esm/lib/player/defaultProfile.js.map +1 -0
- package/dist/esm/lib/player/drawMarkup.js +36 -0
- package/dist/esm/lib/player/drawMarkup.js.map +1 -0
- package/dist/esm/lib/player/drawScene.js +32 -0
- package/dist/esm/lib/player/drawScene.js.map +1 -0
- package/dist/esm/lib/player/drawSprites.js +122 -0
- package/dist/esm/lib/player/drawSprites.js.map +1 -0
- package/dist/esm/lib/player/fitEmbeds.js +42 -0
- package/dist/esm/lib/player/fitEmbeds.js.map +1 -0
- package/dist/esm/lib/player/fitSlide.js +27 -0
- package/dist/esm/lib/player/fitSlide.js.map +1 -0
- package/dist/esm/lib/player/formatKey.js +13 -0
- package/dist/esm/lib/player/formatKey.js.map +1 -0
- package/dist/esm/lib/player/formatKeySign.js +12 -0
- package/dist/esm/lib/player/formatKeySign.js.map +1 -0
- package/dist/esm/lib/player/formatSpeed.js +11 -0
- package/dist/esm/lib/player/formatSpeed.js.map +1 -0
- package/dist/esm/lib/player/formatTime.js +18 -0
- package/dist/esm/lib/player/formatTime.js.map +1 -0
- package/dist/esm/lib/player/index.js +30 -0
- package/dist/esm/lib/player/index.js.map +1 -0
- package/dist/esm/lib/player/installStateRules.js +25 -0
- package/dist/esm/lib/player/installStateRules.js.map +1 -0
- package/dist/esm/lib/player/listHidden.js +24 -0
- package/dist/esm/lib/player/listHidden.js.map +1 -0
- package/dist/esm/lib/player/makeElement.js +15 -0
- package/dist/esm/lib/player/makeElement.js.map +1 -0
- package/dist/esm/lib/player/mergeProfile.js +17 -0
- package/dist/esm/lib/player/mergeProfile.js.map +1 -0
- package/dist/esm/lib/player/mirrorStates.js +23 -0
- package/dist/esm/lib/player/mirrorStates.js.map +1 -0
- package/dist/esm/lib/player/mountScenes.js +100 -0
- package/dist/esm/lib/player/mountScenes.js.map +1 -0
- package/dist/esm/lib/player/readLayerBox.js +20 -0
- package/dist/esm/lib/player/readLayerBox.js.map +1 -0
- package/dist/esm/lib/player/recordGif.js +63 -0
- package/dist/esm/lib/player/recordGif.js.map +1 -0
- package/dist/esm/lib/player/recordVideo.js +114 -0
- package/dist/esm/lib/player/recordVideo.js.map +1 -0
- package/dist/esm/lib/player/renderLegend.js +27 -0
- package/dist/esm/lib/player/renderLegend.js.map +1 -0
- package/dist/esm/lib/player/saveFile.js +22 -0
- package/dist/esm/lib/player/saveFile.js.map +1 -0
- package/dist/esm/lib/player/serializeElement.js +36 -0
- package/dist/esm/lib/player/serializeElement.js.map +1 -0
- package/dist/esm/lib/player/types.js +2 -0
- package/dist/esm/lib/player/types.js.map +1 -0
- package/dist/esm/lib/player/wrapSlide.js +28 -0
- package/dist/esm/lib/player/wrapSlide.js.map +1 -0
- package/dist/esm/lib/timeline/advanceClock.js +24 -0
- package/dist/esm/lib/timeline/advanceClock.js.map +1 -0
- package/dist/esm/lib/timeline/buildTimeline.js +47 -0
- package/dist/esm/lib/timeline/buildTimeline.js.map +1 -0
- package/dist/esm/lib/timeline/constants.js +3 -0
- package/dist/esm/lib/timeline/constants.js.map +1 -0
- package/dist/esm/lib/timeline/findKeyframe.js +11 -0
- package/dist/esm/lib/timeline/findKeyframe.js.map +1 -0
- package/dist/esm/lib/timeline/index.js +7 -0
- package/dist/esm/lib/timeline/index.js.map +1 -0
- package/dist/esm/lib/timeline/locateTime.js +21 -0
- package/dist/esm/lib/timeline/locateTime.js.map +1 -0
- package/dist/esm/lib/timeline/stepKeyframe.js +20 -0
- package/dist/esm/lib/timeline/stepKeyframe.js.map +1 -0
- package/dist/esm/lib/timeline/types.js +2 -0
- package/dist/esm/lib/timeline/types.js.map +1 -0
- package/dist/esm/lib/video/constants.js +7 -0
- package/dist/esm/lib/video/constants.js.map +1 -0
- package/dist/esm/lib/video/index.js +4 -0
- package/dist/esm/lib/video/index.js.map +1 -0
- package/dist/esm/lib/video/types.js +2 -0
- package/dist/esm/lib/video/types.js.map +1 -0
- package/dist/esm/lib/video/writeBox.js +21 -0
- package/dist/esm/lib/video/writeBox.js.map +1 -0
- package/dist/esm/lib/video/writeMp4.js +45 -0
- package/dist/esm/lib/video/writeMp4.js.map +1 -0
- package/dist/motion.css +581 -0
- package/dist/motion.global.js +1502 -0
- package/dist/types/cli.d.ts +3 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/global.d.ts +2 -0
- package/dist/types/global.d.ts.map +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lib/cast/checkCasts.d.ts +15 -0
- package/dist/types/lib/cast/checkCasts.d.ts.map +1 -0
- package/dist/types/lib/cast/checkScene.d.ts +11 -0
- package/dist/types/lib/cast/checkScene.d.ts.map +1 -0
- package/dist/types/lib/cast/checkStep.d.ts +12 -0
- package/dist/types/lib/cast/checkStep.d.ts.map +1 -0
- package/dist/types/lib/cast/constants.d.ts +20 -0
- package/dist/types/lib/cast/constants.d.ts.map +1 -0
- package/dist/types/lib/cast/formatReport.d.ts +11 -0
- package/dist/types/lib/cast/formatReport.d.ts.map +1 -0
- package/dist/types/lib/cast/index.d.ts +11 -0
- package/dist/types/lib/cast/index.d.ts.map +1 -0
- package/dist/types/lib/cast/listFrameNames.d.ts +8 -0
- package/dist/types/lib/cast/listFrameNames.d.ts.map +1 -0
- package/dist/types/lib/cast/measureScene.d.ts +9 -0
- package/dist/types/lib/cast/measureScene.d.ts.map +1 -0
- package/dist/types/lib/cast/measureStep.d.ts +13 -0
- package/dist/types/lib/cast/measureStep.d.ts.map +1 -0
- package/dist/types/lib/cast/measureTyping.d.ts +12 -0
- package/dist/types/lib/cast/measureTyping.d.ts.map +1 -0
- package/dist/types/lib/cast/types.d.ts +87 -0
- package/dist/types/lib/cast/types.d.ts.map +1 -0
- package/dist/types/lib/gif/compressLzw.d.ts +9 -0
- package/dist/types/lib/gif/compressLzw.d.ts.map +1 -0
- package/dist/types/lib/gif/constants.d.ts +9 -0
- package/dist/types/lib/gif/constants.d.ts.map +1 -0
- package/dist/types/lib/gif/encodeGif.d.ts +13 -0
- package/dist/types/lib/gif/encodeGif.d.ts.map +1 -0
- package/dist/types/lib/gif/index.d.ts +7 -0
- package/dist/types/lib/gif/index.d.ts.map +1 -0
- package/dist/types/lib/gif/mergeStills.d.ts +12 -0
- package/dist/types/lib/gif/mergeStills.d.ts.map +1 -0
- package/dist/types/lib/gif/quantizePictures.d.ts +13 -0
- package/dist/types/lib/gif/quantizePictures.d.ts.map +1 -0
- package/dist/types/lib/gif/types.d.ts +22 -0
- package/dist/types/lib/gif/types.d.ts.map +1 -0
- package/dist/types/lib/index.d.ts +3 -0
- package/dist/types/lib/index.d.ts.map +1 -0
- package/dist/types/lib/moment/constants.d.ts +33 -0
- package/dist/types/lib/moment/constants.d.ts.map +1 -0
- package/dist/types/lib/moment/describeAction.d.ts +9 -0
- package/dist/types/lib/moment/describeAction.d.ts.map +1 -0
- package/dist/types/lib/moment/describeKeyRun.d.ts +18 -0
- package/dist/types/lib/moment/describeKeyRun.d.ts.map +1 -0
- package/dist/types/lib/moment/describeMoment.d.ts +16 -0
- package/dist/types/lib/moment/describeMoment.d.ts.map +1 -0
- package/dist/types/lib/moment/easeInOut.d.ts +8 -0
- package/dist/types/lib/moment/easeInOut.d.ts.map +1 -0
- package/dist/types/lib/moment/index.d.ts +9 -0
- package/dist/types/lib/moment/index.d.ts.map +1 -0
- package/dist/types/lib/moment/resolveStates.d.ts +18 -0
- package/dist/types/lib/moment/resolveStates.d.ts.map +1 -0
- package/dist/types/lib/moment/takeSpan.d.ts +10 -0
- package/dist/types/lib/moment/takeSpan.d.ts.map +1 -0
- package/dist/types/lib/moment/types.d.ts +187 -0
- package/dist/types/lib/moment/types.d.ts.map +1 -0
- package/dist/types/lib/player/Player.d.ts +134 -0
- package/dist/types/lib/player/Player.d.ts.map +1 -0
- package/dist/types/lib/player/announceHeight.d.ts +12 -0
- package/dist/types/lib/player/announceHeight.d.ts.map +1 -0
- package/dist/types/lib/player/applyMoment.d.ts +21 -0
- package/dist/types/lib/player/applyMoment.d.ts.map +1 -0
- package/dist/types/lib/player/assertPresent.d.ts +10 -0
- package/dist/types/lib/player/assertPresent.d.ts.map +1 -0
- package/dist/types/lib/player/collectFrames.d.ts +11 -0
- package/dist/types/lib/player/collectFrames.d.ts.map +1 -0
- package/dist/types/lib/player/collectStyles.d.ts +12 -0
- package/dist/types/lib/player/collectStyles.d.ts.map +1 -0
- package/dist/types/lib/player/constants.d.ts +80 -0
- package/dist/types/lib/player/constants.d.ts.map +1 -0
- package/dist/types/lib/player/defaultProfile.d.ts +8 -0
- package/dist/types/lib/player/defaultProfile.d.ts.map +1 -0
- package/dist/types/lib/player/drawMarkup.d.ts +15 -0
- package/dist/types/lib/player/drawMarkup.d.ts.map +1 -0
- package/dist/types/lib/player/drawScene.d.ts +23 -0
- package/dist/types/lib/player/drawScene.d.ts.map +1 -0
- package/dist/types/lib/player/drawSprites.d.ts +35 -0
- package/dist/types/lib/player/drawSprites.d.ts.map +1 -0
- package/dist/types/lib/player/fitEmbeds.d.ts +13 -0
- package/dist/types/lib/player/fitEmbeds.d.ts.map +1 -0
- package/dist/types/lib/player/fitSlide.d.ts +24 -0
- package/dist/types/lib/player/fitSlide.d.ts.map +1 -0
- package/dist/types/lib/player/formatKey.d.ts +9 -0
- package/dist/types/lib/player/formatKey.d.ts.map +1 -0
- package/dist/types/lib/player/formatKeySign.d.ts +9 -0
- package/dist/types/lib/player/formatKeySign.d.ts.map +1 -0
- package/dist/types/lib/player/formatSpeed.d.ts +9 -0
- package/dist/types/lib/player/formatSpeed.d.ts.map +1 -0
- package/dist/types/lib/player/formatTime.d.ts +12 -0
- package/dist/types/lib/player/formatTime.d.ts.map +1 -0
- package/dist/types/lib/player/index.d.ts +31 -0
- package/dist/types/lib/player/index.d.ts.map +1 -0
- package/dist/types/lib/player/installStateRules.d.ts +12 -0
- package/dist/types/lib/player/installStateRules.d.ts.map +1 -0
- package/dist/types/lib/player/listHidden.d.ts +12 -0
- package/dist/types/lib/player/listHidden.d.ts.map +1 -0
- package/dist/types/lib/player/makeElement.d.ts +10 -0
- package/dist/types/lib/player/makeElement.d.ts.map +1 -0
- package/dist/types/lib/player/mergeProfile.d.ts +9 -0
- package/dist/types/lib/player/mergeProfile.d.ts.map +1 -0
- package/dist/types/lib/player/mirrorStates.d.ts +12 -0
- package/dist/types/lib/player/mirrorStates.d.ts.map +1 -0
- package/dist/types/lib/player/mountScenes.d.ts +25 -0
- package/dist/types/lib/player/mountScenes.d.ts.map +1 -0
- package/dist/types/lib/player/readLayerBox.d.ts +23 -0
- package/dist/types/lib/player/readLayerBox.d.ts.map +1 -0
- package/dist/types/lib/player/recordGif.d.ts +16 -0
- package/dist/types/lib/player/recordGif.d.ts.map +1 -0
- package/dist/types/lib/player/recordVideo.d.ts +19 -0
- package/dist/types/lib/player/recordVideo.d.ts.map +1 -0
- package/dist/types/lib/player/renderLegend.d.ts +8 -0
- package/dist/types/lib/player/renderLegend.d.ts.map +1 -0
- package/dist/types/lib/player/saveFile.d.ts +13 -0
- package/dist/types/lib/player/saveFile.d.ts.map +1 -0
- package/dist/types/lib/player/serializeElement.d.ts +14 -0
- package/dist/types/lib/player/serializeElement.d.ts.map +1 -0
- package/dist/types/lib/player/types.d.ts +321 -0
- package/dist/types/lib/player/types.d.ts.map +1 -0
- package/dist/types/lib/player/wrapSlide.d.ts +17 -0
- package/dist/types/lib/player/wrapSlide.d.ts.map +1 -0
- package/dist/types/lib/timeline/advanceClock.d.ts +16 -0
- package/dist/types/lib/timeline/advanceClock.d.ts.map +1 -0
- package/dist/types/lib/timeline/buildTimeline.d.ts +15 -0
- package/dist/types/lib/timeline/buildTimeline.d.ts.map +1 -0
- package/dist/types/lib/timeline/constants.d.ts +3 -0
- package/dist/types/lib/timeline/constants.d.ts.map +1 -0
- package/dist/types/lib/timeline/findKeyframe.d.ts +10 -0
- package/dist/types/lib/timeline/findKeyframe.d.ts.map +1 -0
- package/dist/types/lib/timeline/index.d.ts +8 -0
- package/dist/types/lib/timeline/index.d.ts.map +1 -0
- package/dist/types/lib/timeline/locateTime.d.ts +10 -0
- package/dist/types/lib/timeline/locateTime.d.ts.map +1 -0
- package/dist/types/lib/timeline/stepKeyframe.d.ts +12 -0
- package/dist/types/lib/timeline/stepKeyframe.d.ts.map +1 -0
- package/dist/types/lib/timeline/types.d.ts +40 -0
- package/dist/types/lib/timeline/types.d.ts.map +1 -0
- package/dist/types/lib/video/constants.d.ts +5 -0
- package/dist/types/lib/video/constants.d.ts.map +1 -0
- package/dist/types/lib/video/index.d.ts +5 -0
- package/dist/types/lib/video/index.d.ts.map +1 -0
- package/dist/types/lib/video/types.d.ts +21 -0
- package/dist/types/lib/video/types.d.ts.map +1 -0
- package/dist/types/lib/video/writeBox.d.ts +9 -0
- package/dist/types/lib/video/writeBox.d.ts.map +1 -0
- package/dist/types/lib/video/writeMp4.d.ts +10 -0
- package/dist/types/lib/video/writeMp4.d.ts.map +1 -0
- package/package.json +106 -4
- package/skills/design-motion-frames/SKILL.md +183 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Short looping clips of interactions, played over a page's own HTML frames, with one symbol per kind of
|
|
3
|
+
* interaction.
|
|
4
|
+
*
|
|
5
|
+
* A page draws its screens as HTML and names each with `data-frame`. A cast lists, in order, the frames to show
|
|
6
|
+
* and the interactions that lead from one to the next. `mountScenes` plays casts on the page; `checkCasts`
|
|
7
|
+
* checks them without a browser.
|
|
8
|
+
*
|
|
9
|
+
* This barrel is curated: a name is here because a consumer needs it, not because a domain has it. The page
|
|
10
|
+
* side is `collectFrames`, `mountScenes` and `fitEmbeds`; the side that needs no browser is `checkCasts`,
|
|
11
|
+
* `listFrameNames` and `formatReport`, which are also what the `motion` executable is made of.
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
export type { About, Action, ActionStep, CheckResult, Frame, FrameMeta, FrameStep, Frames, KeysMode, Mounted, MountOptions, Outline, Player, Profile, ProfileOptions, Scene, Shown, Step, StepNotes, Stuck, TimeMode, TitlePlace, Words, } from "./lib/index.js";
|
|
16
|
+
export { checkCasts, collectFrames, fitEmbeds, formatReport, listFrameNames, mountScenes, } from "./lib/index.js";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,YAAY,EACV,KAAK,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,MAAM,EACN,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,OAAO,EACP,MAAM,EACN,OAAO,EACP,cAAc,EACd,KAAK,EACL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,KAAK,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,UAAU,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CheckResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Checks a list of scenes without a browser.
|
|
4
|
+
*
|
|
5
|
+
* Errors are things the player cannot play: a frame that does not exist, a step that is neither a frame nor an
|
|
6
|
+
* interaction, an id used twice. Warnings are things a reviewer would question: an interaction whose effect is
|
|
7
|
+
* never shown, a scene far from its intended length. A selector that matches nothing cannot be found here,
|
|
8
|
+
* since that needs the frames themselves: the player's `audit` finds those in a browser.
|
|
9
|
+
*
|
|
10
|
+
* @param casts - The scenes, as read from a file: nothing about them is taken for granted.
|
|
11
|
+
* @param frameNames - The names of the frames that exist. Leave out to skip checking frame names.
|
|
12
|
+
* @returns What cannot be played, and what a reviewer would question, as sentences.
|
|
13
|
+
*/
|
|
14
|
+
export default function checkCasts(casts: unknown, frameNames?: Iterable<string>): CheckResult;
|
|
15
|
+
//# sourceMappingURL=checkCasts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkCasts.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/checkCasts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,KAAK,EAAE,OAAO,EACd,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAC5B,WAAW,CAmBb"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CheckResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Checks one scene: its name, its title, what it is about, each of its steps, and how long it lasts.
|
|
4
|
+
*
|
|
5
|
+
* @param scene - The scene, as read from a file: nothing about it is taken for granted.
|
|
6
|
+
* @param position - Its place in the list, counted from one, to name it when it has no id.
|
|
7
|
+
* @param frameNames - The names of the frames that exist, or nothing to leave names unchecked.
|
|
8
|
+
* @returns What cannot be played, and what a reviewer would question.
|
|
9
|
+
*/
|
|
10
|
+
export default function checkScene(scene: unknown, position: number, frameNames?: ReadonlySet<string>): CheckResult;
|
|
11
|
+
//# sourceMappingURL=checkScene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkScene.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/checkScene.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAS,MAAM,YAAY,CAAC;AAKrD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC/B,WAAW,CAqDb"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CheckResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Checks one step of a scene.
|
|
4
|
+
*
|
|
5
|
+
* @param step - The step, as read from a file: nothing about it is taken for granted.
|
|
6
|
+
* @param next - The step after it, if any.
|
|
7
|
+
* @param where - How to name the step in a sentence, such as `scene add, step 2`.
|
|
8
|
+
* @param frameNames - The names of the frames that exist, or nothing to leave names unchecked.
|
|
9
|
+
* @returns What cannot be played, and what a reviewer would question.
|
|
10
|
+
*/
|
|
11
|
+
export default function checkStep(step: unknown, next: unknown, where: string, frameNames?: ReadonlySet<string>): CheckResult;
|
|
12
|
+
//# sourceMappingURL=checkStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkStep.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/checkStep.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAiB9C;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC/B,WAAW,CAqEb"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Action } from "./types.js";
|
|
2
|
+
/** The interactions that draw a symbol, each with its name and a description of what is drawn. */
|
|
3
|
+
export declare const SYMBOLS: Record<Exclude<Action, "wait">, [string, string]>;
|
|
4
|
+
/** Every value a step's `do` may take. */
|
|
5
|
+
export declare const ACTIONS: Action[];
|
|
6
|
+
/** How long each interaction lasts when its step gives no `ms`, in milliseconds. */
|
|
7
|
+
export declare const DURATIONS: Record<Exclude<Action, "type">, number>;
|
|
8
|
+
/** How long a frame stays when its step gives no `hold`, in milliseconds. */
|
|
9
|
+
export declare const DEFAULT_HOLD = 900;
|
|
10
|
+
/** How many characters a typed line is taken to have when its length is not known. */
|
|
11
|
+
export declare const DEFAULT_CHARS = 12;
|
|
12
|
+
/** Typing speed when a step gives no `cps`, in characters per second. */
|
|
13
|
+
export declare const DEFAULT_CPS = 14;
|
|
14
|
+
/** The shortest time typing takes, in milliseconds, so that a short word is still seen arriving. */
|
|
15
|
+
export declare const MIN_TYPING = 400;
|
|
16
|
+
/** The longest caption that still reads at a glance, in characters. */
|
|
17
|
+
export declare const MAX_CAPTION = 90;
|
|
18
|
+
/** How long a scene and a clip are meant to last, as lower and upper bounds in milliseconds. */
|
|
19
|
+
export declare const LIMITS: Record<"scene" | "clip", [number, number]>;
|
|
20
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,kGAAkG;AAClG,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAUrE,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,OAAO,EAAE,MAAM,EAW3B,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAU7D,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,sFAAsF;AACtF,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC,yEAAyE;AACzE,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,oGAAoG;AACpG,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B,uEAAuE;AACvE,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,gGAAgG;AAChG,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAG7D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CheckResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Writes the outcome of a check as lines to print: each warning, each error, then one line that counts.
|
|
4
|
+
*
|
|
5
|
+
* @param casts - The scenes that were checked.
|
|
6
|
+
* @param result - What the check found.
|
|
7
|
+
* @param namesChecked - Whether frame names were checked; the last line says so when they were not.
|
|
8
|
+
* @returns The lines, in the order to print them.
|
|
9
|
+
*/
|
|
10
|
+
export default function formatReport(casts: unknown, result: CheckResult, namesChecked: boolean): string[];
|
|
11
|
+
//# sourceMappingURL=formatReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatReport.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/formatReport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAS,MAAM,YAAY,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,OAAO,GACpB,MAAM,EAAE,CAgBV"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as checkCasts } from "./checkCasts.js";
|
|
2
|
+
export { default as checkScene } from "./checkScene.js";
|
|
3
|
+
export { default as checkStep } from "./checkStep.js";
|
|
4
|
+
export { ACTIONS, DEFAULT_CHARS, DEFAULT_CPS, DEFAULT_HOLD, DURATIONS, LIMITS, MAX_CAPTION, MIN_TYPING, SYMBOLS, } from "./constants.js";
|
|
5
|
+
export { default as formatReport } from "./formatReport.js";
|
|
6
|
+
export { default as listFrameNames } from "./listFrameNames.js";
|
|
7
|
+
export { default as measureScene } from "./measureScene.js";
|
|
8
|
+
export { default as measureStep } from "./measureStep.js";
|
|
9
|
+
export { default as measureTyping } from "./measureTyping.js";
|
|
10
|
+
export type { About, Action, ActionStep, CheckResult, FrameStep, Scene, Step, StepNotes, } from "./types.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,SAAS,EACT,MAAM,EACN,WAAW,EACX,UAAU,EACV,OAAO,GACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,YAAY,EACV,KAAK,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,SAAS,EACT,KAAK,EACL,IAAI,EACJ,SAAS,GACV,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lists the names frames answer to, from a catalogue read from a file.
|
|
3
|
+
*
|
|
4
|
+
* @param catalogue - A list of names, or of objects with an `id` and perhaps a `code`.
|
|
5
|
+
* @returns Every name: each string, and each object's id and code.
|
|
6
|
+
*/
|
|
7
|
+
export default function listFrameNames(catalogue: unknown): string[];
|
|
8
|
+
//# sourceMappingURL=listFrameNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listFrameNames.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/listFrameNames.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,EAAE,CAUnE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Scene } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Says how long a scene lasts, in milliseconds, as the sum of its steps.
|
|
4
|
+
*
|
|
5
|
+
* @param scene - The scene.
|
|
6
|
+
* @returns The duration. Typing whose words come from a frame is counted at the usual length of a line.
|
|
7
|
+
*/
|
|
8
|
+
export default function measureScene(scene: Pick<Scene, "steps">): number;
|
|
9
|
+
//# sourceMappingURL=measureScene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureScene.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/measureScene.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,MAAM,CAExE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Step } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Says how long one step lasts, in milliseconds.
|
|
4
|
+
*
|
|
5
|
+
* A frame lasts its hold, after any typing. Typing lasts as long as its words. Any other interaction lasts
|
|
6
|
+
* its `ms`, or the usual time of its kind.
|
|
7
|
+
*
|
|
8
|
+
* @param step - The step.
|
|
9
|
+
* @param chars - The number of characters typed, when the words come from the frame.
|
|
10
|
+
* @returns The duration.
|
|
11
|
+
*/
|
|
12
|
+
export default function measureStep(step: Step, chars?: number): number;
|
|
13
|
+
//# sourceMappingURL=measureStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureStep.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/measureStep.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAQtE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Says how long typing takes, in milliseconds.
|
|
3
|
+
*
|
|
4
|
+
* @param step - What is typed: its words, when the step gives them, and its speed.
|
|
5
|
+
* @param chars - The number of characters, when the words come from the frame and not from the step.
|
|
6
|
+
* @returns The duration, never shorter than the time a short word needs to be seen arriving.
|
|
7
|
+
*/
|
|
8
|
+
export default function measureTyping(step: {
|
|
9
|
+
text?: string;
|
|
10
|
+
cps?: number;
|
|
11
|
+
}, chars?: number): number;
|
|
12
|
+
//# sourceMappingURL=measureTyping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureTyping.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/measureTyping.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EACrC,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAGR"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/** The kinds of interaction a step can perform, each drawn with its own symbol; `wait` draws nothing. */
|
|
2
|
+
export type Action = "tap" | "hold" | "slide" | "drag" | "move" | "click" | "wheel" | "key" | "type" | "wait";
|
|
3
|
+
/** What a step of either kind may carry: a caption, and the name of the chapter it opens. */
|
|
4
|
+
export interface StepNotes {
|
|
5
|
+
/** One sentence shown under the clip while this step, and the steps after it, play. */
|
|
6
|
+
say?: string;
|
|
7
|
+
/** The name of the part of a clip that starts with this step. */
|
|
8
|
+
chapter?: string;
|
|
9
|
+
}
|
|
10
|
+
/** A keyframe: shows a frame by its name. */
|
|
11
|
+
export interface FrameStep extends StepNotes {
|
|
12
|
+
/** The name of the frame, as the page declares it with `data-frame` or `data-code`. */
|
|
13
|
+
frame: string;
|
|
14
|
+
/** How long the frame stays, in milliseconds, after any typing. */
|
|
15
|
+
hold?: number;
|
|
16
|
+
/** Type the words the frame shows in its line, letter by letter, before holding. */
|
|
17
|
+
type?: boolean;
|
|
18
|
+
/** Typing speed in characters per second. */
|
|
19
|
+
cps?: number;
|
|
20
|
+
}
|
|
21
|
+
/** One interaction on the frame in view. */
|
|
22
|
+
export interface ActionStep extends StepNotes {
|
|
23
|
+
/** The kind of interaction. */
|
|
24
|
+
do: Action;
|
|
25
|
+
/** A CSS selector, inside the frame in view, for the element acted on. */
|
|
26
|
+
on?: string;
|
|
27
|
+
/** Where on that element, as two fractions of its width and height. */
|
|
28
|
+
at?: [number, number];
|
|
29
|
+
/** How long the interaction lasts, in milliseconds. */
|
|
30
|
+
ms?: number;
|
|
31
|
+
/** For a slide: towards the start or the end of the line of text. */
|
|
32
|
+
to?: "start" | "end";
|
|
33
|
+
/** For a slide: a little, or all the way. */
|
|
34
|
+
depth?: "short" | "deep";
|
|
35
|
+
/** For a scroll: how far the content moves, in pixels; negative moves it up. */
|
|
36
|
+
dy?: number;
|
|
37
|
+
/** For a scroll: a selector for what rolls, in place of the profile's. */
|
|
38
|
+
move?: string;
|
|
39
|
+
/** For a key: the name on the keycap. */
|
|
40
|
+
k?: string;
|
|
41
|
+
/**
|
|
42
|
+
* For typing: the words to type, at the end of what the frame's line holds. Left out, the frame's own words
|
|
43
|
+
* are typed into an empty line.
|
|
44
|
+
*/
|
|
45
|
+
text?: string;
|
|
46
|
+
/** Typing speed in characters per second. */
|
|
47
|
+
cps?: number;
|
|
48
|
+
/**
|
|
49
|
+
* For a tap, a click or a hold: wait for the reader to do it on the frame before going on, where the page
|
|
50
|
+
* plays its scenes for practice.
|
|
51
|
+
*/
|
|
52
|
+
practice?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** A step either shows a frame or does one interaction. */
|
|
55
|
+
export type Step = FrameStep | ActionStep;
|
|
56
|
+
/** What a scene shows in the product's own model: a journey, a situation, a requirement. */
|
|
57
|
+
export interface About {
|
|
58
|
+
/** The kind of thing, in the product's words. */
|
|
59
|
+
kind: string;
|
|
60
|
+
/** Its name. */
|
|
61
|
+
name: string;
|
|
62
|
+
}
|
|
63
|
+
/** A cast: a few frames in order, with the interactions that lead from one to the next. */
|
|
64
|
+
export interface Scene {
|
|
65
|
+
/** A name for links: lower-case letters, digits and hyphens. */
|
|
66
|
+
id: string;
|
|
67
|
+
/** What the scene shows, as a reader would say it. */
|
|
68
|
+
title: string;
|
|
69
|
+
/** The name of a shell in the profile; `phone` when absent. */
|
|
70
|
+
device?: string;
|
|
71
|
+
/** A longer end-to-end story, 20 to 30 seconds, with chapters. */
|
|
72
|
+
clip?: boolean;
|
|
73
|
+
/** Set to false to stop at the end instead of starting again. */
|
|
74
|
+
loop?: boolean;
|
|
75
|
+
/** What the scene shows in the product's own model. */
|
|
76
|
+
about?: About;
|
|
77
|
+
/** The steps, in order. The first must show a frame. */
|
|
78
|
+
steps: Step[];
|
|
79
|
+
}
|
|
80
|
+
/** The outcome of checking casts: what cannot be played, and what a reviewer would question. */
|
|
81
|
+
export interface CheckResult {
|
|
82
|
+
/** Sentences naming what the player cannot play. */
|
|
83
|
+
errors: string[];
|
|
84
|
+
/** Sentences naming what a reviewer would question. */
|
|
85
|
+
warnings: string[];
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/cast/types.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,MAAM,MAAM,GACd,KAAK,GACL,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,KAAK,GACL,MAAM,GACN,MAAM,CAAC;AAEX,6FAA6F;AAC7F,MAAM,WAAW,SAAS;IACxB,uFAAuF;IACvF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,6CAA6C;AAC7C,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,4CAA4C;AAC5C,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,0EAA0E;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uEAAuE;IACvE,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtB,uDAAuD;IACvD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,EAAE,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACrB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,gFAAgF;IAChF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,2DAA2D;AAC3D,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,UAAU,CAAC;AAE1C,4FAA4F;AAC5F,MAAM,WAAW,KAAK;IACpB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,2FAA2F;AAC3F,MAAM,WAAW,KAAK;IACpB,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,wDAAwD;IACxD,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,gGAAgG;AAChG,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compresses a picture's palette indices the way the GIF format asks: sequences already seen are written as one
|
|
3
|
+
* code, and codes grow from nine bits to twelve as the table of sequences fills, then the table starts again.
|
|
4
|
+
*
|
|
5
|
+
* @param indices - One palette index per pixel.
|
|
6
|
+
* @returns The stream of codes packed into bytes, lowest bit first, not yet cut into blocks.
|
|
7
|
+
*/
|
|
8
|
+
export default function compressLzw(indices: Uint8Array): Uint8Array;
|
|
9
|
+
//# sourceMappingURL=compressLzw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compressLzw.d.ts","sourceRoot":"","sources":["../../../../src/lib/gif/compressLzw.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,CAgDnE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** How many colours a GIF's palette holds. */
|
|
2
|
+
export declare const PALETTE_SIZE = 256;
|
|
3
|
+
/** The number of bits a pixel's index takes before compression: eight, for a palette of 256. */
|
|
4
|
+
export declare const MIN_CODE_SIZE = 8;
|
|
5
|
+
/** The longest code the format allows, in bits. The table of sequences starts again when it is full. */
|
|
6
|
+
export declare const MAX_CODE_BITS = 12;
|
|
7
|
+
/** The most bytes one block of image data may carry. */
|
|
8
|
+
export declare const BLOCK_SIZE = 255;
|
|
9
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/lib/gif/constants.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,gGAAgG;AAChG,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,wGAAwG;AACxG,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC,wDAAwD;AACxD,eAAO,MAAM,UAAU,MAAM,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Quantized } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Writes pictures that share one palette as an animated GIF that plays again when it ends.
|
|
4
|
+
*
|
|
5
|
+
* @param quantized - The palette of 256 colours and the pictures as indices into it.
|
|
6
|
+
* @param width - The width of every picture, in pixels.
|
|
7
|
+
* @param height - The height of every picture, in pixels.
|
|
8
|
+
* @param loop - Whether the file plays again when it ends; a viewer shows it once and stops on its last picture
|
|
9
|
+
* when not.
|
|
10
|
+
* @returns The bytes of the file.
|
|
11
|
+
*/
|
|
12
|
+
export default function encodeGif(quantized: Quantized, width: number, height: number, loop?: boolean): Uint8Array;
|
|
13
|
+
//# sourceMappingURL=encodeGif.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeGif.d.ts","sourceRoot":"","sources":["../../../../src/lib/gif/encodeGif.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,UAAO,GACV,UAAU,CA2BZ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as compressLzw } from "./compressLzw.js";
|
|
2
|
+
export { BLOCK_SIZE, MAX_CODE_BITS, MIN_CODE_SIZE, PALETTE_SIZE, } from "./constants.js";
|
|
3
|
+
export { default as encodeGif } from "./encodeGif.js";
|
|
4
|
+
export { default as mergeStills } from "./mergeStills.js";
|
|
5
|
+
export { default as quantizePictures } from "./quantizePictures.js";
|
|
6
|
+
export type { IndexedPicture, Picture, Quantized } from "./types.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/gif/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EACb,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Picture } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Merges pictures that follow each other and show the same thing into one that stays longer.
|
|
4
|
+
*
|
|
5
|
+
* A clip holds each frame for a second or more, so most of a recording is the same picture again and again;
|
|
6
|
+
* merged, the file carries each still once.
|
|
7
|
+
*
|
|
8
|
+
* @param pictures - The pictures, in order.
|
|
9
|
+
* @returns The pictures with each run of identical ones made one, its delay the sum of theirs.
|
|
10
|
+
*/
|
|
11
|
+
export default function mergeStills(pictures: Picture[]): Picture[];
|
|
12
|
+
//# sourceMappingURL=mergeStills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeStills.d.ts","sourceRoot":"","sources":["../../../../src/lib/gif/mergeStills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAU1C;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAWlE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Picture, Quantized } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Reduces pictures to one shared palette of 256 colours: the colours used most across all of them. A colour
|
|
4
|
+
* that did not make the palette takes the nearest one that did.
|
|
5
|
+
*
|
|
6
|
+
* An interface is drawn in few colours, so its commonest ones cover it; what is lost is the rarest shades of
|
|
7
|
+
* its smoothed edges. Transparent pixels are read as their colour, since a GIF frame here is always opaque.
|
|
8
|
+
*
|
|
9
|
+
* @param pictures - The pictures, all of one size.
|
|
10
|
+
* @returns The palette, and each picture as indices into it.
|
|
11
|
+
*/
|
|
12
|
+
export default function quantizePictures(pictures: Picture[]): Quantized;
|
|
13
|
+
//# sourceMappingURL=quantizePictures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quantizePictures.d.ts","sourceRoot":"","sources":["../../../../src/lib/gif/quantizePictures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAMrD;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,SAAS,CA4DvE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** One picture of a recording: its pixels as red, green, blue and alpha bytes, and how long it stays. */
|
|
2
|
+
export interface Picture {
|
|
3
|
+
/** Four bytes per pixel, row by row from the top. */
|
|
4
|
+
rgba: Uint8ClampedArray | Uint8Array;
|
|
5
|
+
/** How long the picture stays, in milliseconds. */
|
|
6
|
+
delay: number;
|
|
7
|
+
}
|
|
8
|
+
/** A picture after its colours were reduced: one palette index per pixel. */
|
|
9
|
+
export interface IndexedPicture {
|
|
10
|
+
/** One byte per pixel, row by row from the top: the index of its colour in the palette. */
|
|
11
|
+
indices: Uint8Array;
|
|
12
|
+
/** How long the picture stays, in milliseconds. */
|
|
13
|
+
delay: number;
|
|
14
|
+
}
|
|
15
|
+
/** Pictures that share one palette. */
|
|
16
|
+
export interface Quantized {
|
|
17
|
+
/** 256 colours, three bytes each: red, green, blue. */
|
|
18
|
+
palette: Uint8Array;
|
|
19
|
+
/** The pictures, each as indices into the palette. */
|
|
20
|
+
pictures: IndexedPicture[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/gif/types.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,WAAW,OAAO;IACtB,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,GAAG,UAAU,CAAC;IACrC,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,2FAA2F;IAC3F,OAAO,EAAE,UAAU,CAAC;IACpB,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,uCAAuC;AACvC,MAAM,WAAW,SAAS;IACxB,uDAAuD;IACvD,OAAO,EAAE,UAAU,CAAC;IACpB,sDAAsD;IACtD,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** How far into a click the pointer has reached its target and presses it. */
|
|
2
|
+
export declare const CLICK_PRESS = 0.6;
|
|
3
|
+
/** How far into a tap the finger is down. */
|
|
4
|
+
export declare const TAP_PRESS = 0.35;
|
|
5
|
+
/** How far into a click or a tap the press is let go. */
|
|
6
|
+
export declare const PRESS_RELEASE = 0.8;
|
|
7
|
+
/** How far along its way the pointer still counts as over what it is leaving. */
|
|
8
|
+
export declare const HOVER_LEAVES = 0.2;
|
|
9
|
+
/** How far along its way the pointer counts as over what it is going to. */
|
|
10
|
+
export declare const HOVER_ARRIVES = 0.8;
|
|
11
|
+
/** How far into a key's press a key that takes a letter back has taken it. */
|
|
12
|
+
export declare const KEY_ERASES = 0.45;
|
|
13
|
+
/** How far into a key's step the key goes down, and how far it comes back up. */
|
|
14
|
+
export declare const KEY_DOWN = 0.3;
|
|
15
|
+
export declare const KEY_UP = 0.6;
|
|
16
|
+
/** How long the keys of a run stay after the last one was pressed, in milliseconds, before they fade. */
|
|
17
|
+
export declare const KEY_LINGER = 1500;
|
|
18
|
+
/** How long a run of keys takes to fade, in milliseconds: after its linger, or once a step that is not a key starts. */
|
|
19
|
+
export declare const KEY_RUN_FADE = 400;
|
|
20
|
+
/** How much fainter each earlier key of a run is than the one after it, and the faintest any is shown. */
|
|
21
|
+
export declare const KEY_AGE_FADE = 0.35;
|
|
22
|
+
export declare const KEY_FAINTEST = 0.2;
|
|
23
|
+
/** How many keys of a run are shown at most, the newest among them. */
|
|
24
|
+
export declare const KEYS_IN_RUN = 4;
|
|
25
|
+
/** The keys that take back the letter before the end of the line, by their name in lower case. */
|
|
26
|
+
export declare const ERASING_KEYS: readonly string[];
|
|
27
|
+
/** How long a frame takes to come to full strength after a cut, in milliseconds. */
|
|
28
|
+
export declare const CUT_FADE = 160;
|
|
29
|
+
/** How long the name of an interaction takes to fade once its frame has come, in milliseconds. */
|
|
30
|
+
export declare const PATTERN_FADE = 350;
|
|
31
|
+
/** How far a scroll moves its content when a step does not say, in pixels; negative moves it up. */
|
|
32
|
+
export declare const DEFAULT_SCROLL = -140;
|
|
33
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/lib/moment/constants.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B,6CAA6C;AAC7C,eAAO,MAAM,SAAS,OAAO,CAAC;AAE9B,yDAAyD;AACzD,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,iFAAiF;AACjF,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,4EAA4E;AAC5E,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,8EAA8E;AAC9E,eAAO,MAAM,UAAU,OAAO,CAAC;AAE/B,iFAAiF;AACjF,eAAO,MAAM,QAAQ,MAAM,CAAC;AAC5B,eAAO,MAAM,MAAM,MAAM,CAAC;AAE1B,yGAAyG;AACzG,eAAO,MAAM,UAAU,OAAO,CAAC;AAE/B,wHAAwH;AACxH,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,0GAA0G;AAC1G,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,uEAAuE;AACvE,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,kGAAkG;AAClG,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAkB,CAAC;AAE7D,oFAAoF;AACpF,eAAO,MAAM,QAAQ,MAAM,CAAC;AAE5B,kGAAkG;AAClG,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,oGAAoG;AACpG,eAAO,MAAM,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ActionStep } from "../cast/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Names an interaction for the strip under a clip: its kind, and what tells it from others of its kind.
|
|
4
|
+
*
|
|
5
|
+
* @param step - The interaction.
|
|
6
|
+
* @returns The name, such as `Tap`, `Key · Enter` or `Slide · all the way to the end`; empty for a wait.
|
|
7
|
+
*/
|
|
8
|
+
export default function describeAction(step: ActionStep): string;
|
|
9
|
+
//# sourceMappingURL=describeAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describeAction.d.ts","sourceRoot":"","sources":["../../../../src/lib/moment/describeAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,kBAAkB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAS/D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Timeline } from "../timeline/index.js";
|
|
2
|
+
import type { Sprite } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the run of named keys a sign shows at one moment: the keys pressed one after another up to now,
|
|
5
|
+
* so that one pressed a moment ago can still be read while the next one comes.
|
|
6
|
+
*
|
|
7
|
+
* The newest key comes in as its step starts and stays; each earlier one is fainter by its age. The run fades
|
|
8
|
+
* once a step that is not a key starts, or once no key has been pressed for a while, whichever comes first.
|
|
9
|
+
*
|
|
10
|
+
* @param timeline - The scene laid out in time.
|
|
11
|
+
* @param index - The step in view.
|
|
12
|
+
* @param elapsed - How far into it, in milliseconds.
|
|
13
|
+
* @returns The run, or nothing when no key is shown.
|
|
14
|
+
*/
|
|
15
|
+
export default function describeKeyRun(timeline: Timeline, index: number, elapsed: number): Extract<Sprite, {
|
|
16
|
+
kind: "keys";
|
|
17
|
+
}> | undefined;
|
|
18
|
+
//# sourceMappingURL=describeKeyRun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describeKeyRun.d.ts","sourceRoot":"","sources":["../../../../src/lib/moment/describeKeyRun.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAWrD,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,YAAY,CAAC;AAKjD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAyC/C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Moment, MomentContext } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Describes one moment of a scene: the frame in view, the symbols over it, what the step changes in the frame,
|
|
4
|
+
* what is hovered, pressed and focused, and what the panel reads.
|
|
5
|
+
*
|
|
6
|
+
* Nothing is drawn. The description is the same for the same step and progress, whatever was shown before,
|
|
7
|
+
* which is what lets a scene be played, stepped and scrubbed by one routine, and drawn by more than one
|
|
8
|
+
* renderer.
|
|
9
|
+
*
|
|
10
|
+
* @param index - The step.
|
|
11
|
+
* @param progress - How far into it, from 0, its start, to 1, its end.
|
|
12
|
+
* @param context - The scene laid out in time, and what the page says about where things are.
|
|
13
|
+
* @returns The moment.
|
|
14
|
+
*/
|
|
15
|
+
export default function describeMoment(index: number, progress: number, context: MomentContext): Moment;
|
|
16
|
+
//# sourceMappingURL=describeMoment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describeMoment.d.ts","sourceRoot":"","sources":["../../../../src/lib/moment/describeMoment.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAEV,MAAM,EACN,aAAa,EAId,MAAM,YAAY,CAAC;AA4SpB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,aAAa,GACrB,MAAM,CAkER"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Eases a progress in and out: slow at both ends, fast in the middle.
|
|
3
|
+
*
|
|
4
|
+
* @param progress - From 0 to 1.
|
|
5
|
+
* @returns The eased progress, from 0 to 1.
|
|
6
|
+
*/
|
|
7
|
+
export default function easeInOut(progress: number): number;
|
|
8
|
+
//# sourceMappingURL=easeInOut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"easeInOut.d.ts","sourceRoot":"","sources":["../../../../src/lib/moment/easeInOut.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI1D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { CLICK_PRESS, CUT_FADE, DEFAULT_SCROLL, ERASING_KEYS, HOVER_ARRIVES, HOVER_LEAVES, KEY_AGE_FADE, KEY_DOWN, KEY_ERASES, KEY_FAINTEST, KEY_LINGER, KEY_RUN_FADE, KEY_UP, KEYS_IN_RUN, PATTERN_FADE, PRESS_RELEASE, TAP_PRESS, } from "./constants.js";
|
|
2
|
+
export { default as describeAction } from "./describeAction.js";
|
|
3
|
+
export { default as describeKeyRun } from "./describeKeyRun.js";
|
|
4
|
+
export { default as describeMoment } from "./describeMoment.js";
|
|
5
|
+
export { default as easeInOut } from "./easeInOut.js";
|
|
6
|
+
export { default as resolveStates } from "./resolveStates.js";
|
|
7
|
+
export { default as takeSpan } from "./takeSpan.js";
|
|
8
|
+
export type { Aim, Effect, KeyCap, Measure, Moment, MomentContext, Place, Sprite, States, Strip, Typing, } from "./types.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/moment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,MAAM,EACN,WAAW,EACX,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EACV,GAAG,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,aAAa,EACb,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,GACP,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Step } from "../cast/index.js";
|
|
2
|
+
import type { States } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Works out which targets a page would show as hovered, pressed and focused at one moment of a scene, from the
|
|
5
|
+
* steps alone.
|
|
6
|
+
*
|
|
7
|
+
* A browser decides these from a real pointer and a real keyboard, which a clip has not got. The rules here are
|
|
8
|
+
* the browser's own, read off the steps: what the pointer rests on is hovered, what is being pressed is active,
|
|
9
|
+
* focus goes to the last thing pressed or typed into and stays there, and a link that was clicked or tapped
|
|
10
|
+
* has been visited from then on.
|
|
11
|
+
*
|
|
12
|
+
* @param steps - The steps of the scene.
|
|
13
|
+
* @param index - The step in view.
|
|
14
|
+
* @param progress - How far into that step, from 0 to 1.
|
|
15
|
+
* @returns The selector of what is hovered and of what is pressed, and where the focus is.
|
|
16
|
+
*/
|
|
17
|
+
export default function resolveStates(steps: Step[], index: number, progress: number): States;
|
|
18
|
+
//# sourceMappingURL=resolveStates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveStates.d.ts","sourceRoot":"","sources":["../../../../src/lib/moment/resolveStates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAQzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AA8BzC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,KAAK,EAAE,IAAI,EAAE,EACb,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GACf,MAAM,CAuCR"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Takes the part of a progress that falls between two moments.
|
|
3
|
+
*
|
|
4
|
+
* @param progress - The progress of the whole.
|
|
5
|
+
* @param from - Where the part begins.
|
|
6
|
+
* @param to - Where the part ends.
|
|
7
|
+
* @returns 0 before the part, 1 after it, and its own progress in between.
|
|
8
|
+
*/
|
|
9
|
+
export default function takeSpan(progress: number, from: number, to: number): number;
|
|
10
|
+
//# sourceMappingURL=takeSpan.d.ts.map
|