@react-native-motion-kit/text-motion 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/LICENSE +20 -0
- package/README.ko.md +104 -0
- package/README.md +103 -2
- package/lib/module/accessibility/index.js +4 -0
- package/lib/module/accessibility/index.js.map +1 -0
- package/lib/module/accessibility/policies.js +39 -0
- package/lib/module/accessibility/policies.js.map +1 -0
- package/lib/module/controls/brand.js +4 -0
- package/lib/module/controls/brand.js.map +1 -0
- package/lib/module/controls/controls.js +28 -0
- package/lib/module/controls/controls.js.map +1 -0
- package/lib/module/controls/descriptors.js +55 -0
- package/lib/module/controls/descriptors.js.map +1 -0
- package/lib/module/controls/index.js +4 -0
- package/lib/module/controls/index.js.map +1 -0
- package/lib/module/effects/compose.js +48 -0
- package/lib/module/effects/compose.js.map +1 -0
- package/lib/module/effects/fade.js +15 -0
- package/lib/module/effects/fade.js.map +1 -0
- package/lib/module/effects/index.js +12 -0
- package/lib/module/effects/index.js.map +1 -0
- package/lib/module/effects/lineReveal.js +17 -0
- package/lib/module/effects/lineReveal.js.map +1 -0
- package/lib/module/effects/pulse.js +14 -0
- package/lib/module/effects/pulse.js.map +1 -0
- package/lib/module/effects/rise.js +14 -0
- package/lib/module/effects/rise.js.map +1 -0
- package/lib/module/effects/scale.js +15 -0
- package/lib/module/effects/scale.js.map +1 -0
- package/lib/module/effects/shake.js +14 -0
- package/lib/module/effects/shake.js.map +1 -0
- package/lib/module/effects/slide.js +15 -0
- package/lib/module/effects/slide.js.map +1 -0
- package/lib/module/effects/typewriter.js +19 -0
- package/lib/module/effects/typewriter.js.map +1 -0
- package/lib/module/effects/validation.js +10 -0
- package/lib/module/effects/validation.js.map +1 -0
- package/lib/module/index.js +10 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/presets/index.js +35 -0
- package/lib/module/presets/index.js.map +1 -0
- package/lib/module/recipe/component.js +60 -0
- package/lib/module/recipe/component.js.map +1 -0
- package/lib/module/recipe/defineTextMotion.js +9 -0
- package/lib/module/recipe/defineTextMotion.js.map +1 -0
- package/lib/module/recipe/descriptors.js +60 -0
- package/lib/module/recipe/descriptors.js.map +1 -0
- package/lib/module/recipe/index.js +5 -0
- package/lib/module/recipe/index.js.map +1 -0
- package/lib/module/recipe/recipe.js +163 -0
- package/lib/module/recipe/recipe.js.map +1 -0
- package/lib/module/renderers/index.js +5 -0
- package/lib/module/renderers/index.js.map +1 -0
- package/lib/module/renderers/nativeText.js +494 -0
- package/lib/module/renderers/nativeText.js.map +1 -0
- package/lib/module/renderers/nativeTextControls.js +96 -0
- package/lib/module/renderers/nativeTextControls.js.map +1 -0
- package/lib/module/renderers/nativeTextLineLayout.js +290 -0
- package/lib/module/renderers/nativeTextLineLayout.js.map +1 -0
- package/lib/module/renderers/nativeTextPlayback.js +91 -0
- package/lib/module/renderers/nativeTextPlayback.js.map +1 -0
- package/lib/module/renderers/overlayText.js +543 -0
- package/lib/module/renderers/overlayText.js.map +1 -0
- package/lib/module/renderers/overlayTextLayout.js +182 -0
- package/lib/module/renderers/overlayTextLayout.js.map +1 -0
- package/lib/module/renderers/rendererMotion.js +264 -0
- package/lib/module/renderers/rendererMotion.js.map +1 -0
- package/lib/module/split/createToken.js +19 -0
- package/lib/module/split/createToken.js.map +1 -0
- package/lib/module/split/custom.js +57 -0
- package/lib/module/split/custom.js.map +1 -0
- package/lib/module/split/graphemes.js +25 -0
- package/lib/module/split/graphemes.js.map +1 -0
- package/lib/module/split/index.js +7 -0
- package/lib/module/split/index.js.map +1 -0
- package/lib/module/split/lines.js +43 -0
- package/lib/module/split/lines.js.map +1 -0
- package/lib/module/split/segmenter.js +74 -0
- package/lib/module/split/segmenter.js.map +1 -0
- package/lib/module/split/words.js +28 -0
- package/lib/module/split/words.js.map +1 -0
- package/lib/module/timeline/index.js +7 -0
- package/lib/module/timeline/index.js.map +1 -0
- package/lib/module/timeline/parallel.js +21 -0
- package/lib/module/timeline/parallel.js.map +1 -0
- package/lib/module/timeline/sequence.js +18 -0
- package/lib/module/timeline/sequence.js.map +1 -0
- package/lib/module/timeline/stagger.js +43 -0
- package/lib/module/timeline/stagger.js.map +1 -0
- package/lib/module/timeline/validation.js +24 -0
- package/lib/module/timeline/validation.js.map +1 -0
- package/lib/module/timeline/wave.js +25 -0
- package/lib/module/timeline/wave.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/recipe.js +4 -0
- package/lib/module/types/recipe.js.map +1 -0
- package/lib/module/types/renderer.js +27 -0
- package/lib/module/types/renderer.js.map +1 -0
- package/lib/module/types/token.js +2 -0
- package/lib/module/types/token.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/accessibility/index.d.ts +2 -0
- package/lib/typescript/src/accessibility/index.d.ts.map +1 -0
- package/lib/typescript/src/accessibility/policies.d.ts +13 -0
- package/lib/typescript/src/accessibility/policies.d.ts.map +1 -0
- package/lib/typescript/src/controls/brand.d.ts +2 -0
- package/lib/typescript/src/controls/brand.d.ts.map +1 -0
- package/lib/typescript/src/controls/controls.d.ts +28 -0
- package/lib/typescript/src/controls/controls.d.ts.map +1 -0
- package/lib/typescript/src/controls/descriptors.d.ts +14 -0
- package/lib/typescript/src/controls/descriptors.d.ts.map +1 -0
- package/lib/typescript/src/controls/index.d.ts +3 -0
- package/lib/typescript/src/controls/index.d.ts.map +1 -0
- package/lib/typescript/src/effects/compose.d.ts +11 -0
- package/lib/typescript/src/effects/compose.d.ts.map +1 -0
- package/lib/typescript/src/effects/fade.d.ts +10 -0
- package/lib/typescript/src/effects/fade.d.ts.map +1 -0
- package/lib/typescript/src/effects/index.d.ts +10 -0
- package/lib/typescript/src/effects/index.d.ts.map +1 -0
- package/lib/typescript/src/effects/lineReveal.d.ts +11 -0
- package/lib/typescript/src/effects/lineReveal.d.ts.map +1 -0
- package/lib/typescript/src/effects/pulse.d.ts +8 -0
- package/lib/typescript/src/effects/pulse.d.ts.map +1 -0
- package/lib/typescript/src/effects/rise.d.ts +8 -0
- package/lib/typescript/src/effects/rise.d.ts.map +1 -0
- package/lib/typescript/src/effects/scale.d.ts +10 -0
- package/lib/typescript/src/effects/scale.d.ts.map +1 -0
- package/lib/typescript/src/effects/shake.d.ts +8 -0
- package/lib/typescript/src/effects/shake.d.ts.map +1 -0
- package/lib/typescript/src/effects/slide.d.ts +10 -0
- package/lib/typescript/src/effects/slide.d.ts.map +1 -0
- package/lib/typescript/src/effects/typewriter.d.ts +13 -0
- package/lib/typescript/src/effects/typewriter.d.ts.map +1 -0
- package/lib/typescript/src/effects/validation.d.ts +2 -0
- package/lib/typescript/src/effects/validation.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +15 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/presets/index.d.ts +10 -0
- package/lib/typescript/src/presets/index.d.ts.map +1 -0
- package/lib/typescript/src/recipe/component.d.ts +3 -0
- package/lib/typescript/src/recipe/component.d.ts.map +1 -0
- package/lib/typescript/src/recipe/defineTextMotion.d.ts +4 -0
- package/lib/typescript/src/recipe/defineTextMotion.d.ts.map +1 -0
- package/lib/typescript/src/recipe/descriptors.d.ts +15 -0
- package/lib/typescript/src/recipe/descriptors.d.ts.map +1 -0
- package/lib/typescript/src/recipe/index.d.ts +4 -0
- package/lib/typescript/src/recipe/index.d.ts.map +1 -0
- package/lib/typescript/src/recipe/recipe.d.ts +67 -0
- package/lib/typescript/src/recipe/recipe.d.ts.map +1 -0
- package/lib/typescript/src/renderers/index.d.ts +3 -0
- package/lib/typescript/src/renderers/index.d.ts.map +1 -0
- package/lib/typescript/src/renderers/nativeText.d.ts +13 -0
- package/lib/typescript/src/renderers/nativeText.d.ts.map +1 -0
- package/lib/typescript/src/renderers/nativeTextControls.d.ts +16 -0
- package/lib/typescript/src/renderers/nativeTextControls.d.ts.map +1 -0
- package/lib/typescript/src/renderers/nativeTextLineLayout.d.ts +84 -0
- package/lib/typescript/src/renderers/nativeTextLineLayout.d.ts.map +1 -0
- package/lib/typescript/src/renderers/nativeTextPlayback.d.ts +21 -0
- package/lib/typescript/src/renderers/nativeTextPlayback.d.ts.map +1 -0
- package/lib/typescript/src/renderers/overlayText.d.ts +13 -0
- package/lib/typescript/src/renderers/overlayText.d.ts.map +1 -0
- package/lib/typescript/src/renderers/overlayTextLayout.d.ts +36 -0
- package/lib/typescript/src/renderers/overlayTextLayout.d.ts.map +1 -0
- package/lib/typescript/src/renderers/rendererMotion.d.ts +53 -0
- package/lib/typescript/src/renderers/rendererMotion.d.ts.map +1 -0
- package/lib/typescript/src/split/createToken.d.ts +11 -0
- package/lib/typescript/src/split/createToken.d.ts.map +1 -0
- package/lib/typescript/src/split/custom.d.ts +17 -0
- package/lib/typescript/src/split/custom.d.ts.map +1 -0
- package/lib/typescript/src/split/graphemes.d.ts +4 -0
- package/lib/typescript/src/split/graphemes.d.ts.map +1 -0
- package/lib/typescript/src/split/index.d.ts +5 -0
- package/lib/typescript/src/split/index.d.ts.map +1 -0
- package/lib/typescript/src/split/lines.d.ts +4 -0
- package/lib/typescript/src/split/lines.d.ts.map +1 -0
- package/lib/typescript/src/split/segmenter.d.ts +18 -0
- package/lib/typescript/src/split/segmenter.d.ts.map +1 -0
- package/lib/typescript/src/split/words.d.ts +4 -0
- package/lib/typescript/src/split/words.d.ts.map +1 -0
- package/lib/typescript/src/timeline/index.d.ts +5 -0
- package/lib/typescript/src/timeline/index.d.ts.map +1 -0
- package/lib/typescript/src/timeline/parallel.d.ts +4 -0
- package/lib/typescript/src/timeline/parallel.d.ts.map +1 -0
- package/lib/typescript/src/timeline/sequence.d.ts +4 -0
- package/lib/typescript/src/timeline/sequence.d.ts.map +1 -0
- package/lib/typescript/src/timeline/stagger.d.ts +11 -0
- package/lib/typescript/src/timeline/stagger.d.ts.map +1 -0
- package/lib/typescript/src/timeline/validation.d.ts +4 -0
- package/lib/typescript/src/timeline/validation.d.ts.map +1 -0
- package/lib/typescript/src/timeline/wave.d.ts +11 -0
- package/lib/typescript/src/timeline/wave.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +6 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/types/recipe.d.ts +123 -0
- package/lib/typescript/src/types/recipe.d.ts.map +1 -0
- package/lib/typescript/src/types/renderer.d.ts +51 -0
- package/lib/typescript/src/types/renderer.d.ts.map +1 -0
- package/lib/typescript/src/types/token.d.ts +35 -0
- package/lib/typescript/src/types/token.d.ts.map +1 -0
- package/package.json +117 -3
- package/src/accessibility/index.ts +7 -0
- package/src/accessibility/policies.ts +60 -0
- package/src/controls/brand.ts +3 -0
- package/src/controls/controls.ts +41 -0
- package/src/controls/descriptors.ts +83 -0
- package/src/controls/index.ts +2 -0
- package/src/effects/compose.ts +98 -0
- package/src/effects/fade.ts +22 -0
- package/src/effects/index.ts +9 -0
- package/src/effects/lineReveal.ts +28 -0
- package/src/effects/pulse.ts +19 -0
- package/src/effects/rise.ts +19 -0
- package/src/effects/scale.ts +22 -0
- package/src/effects/shake.ts +19 -0
- package/src/effects/slide.ts +22 -0
- package/src/effects/typewriter.ts +16 -0
- package/src/effects/validation.ts +9 -0
- package/src/index.tsx +46 -0
- package/src/presets/index.ts +42 -0
- package/src/recipe/component.tsx +88 -0
- package/src/recipe/defineTextMotion.ts +6 -0
- package/src/recipe/descriptors.ts +158 -0
- package/src/recipe/index.ts +3 -0
- package/src/recipe/recipe.ts +359 -0
- package/src/renderers/index.ts +2 -0
- package/src/renderers/nativeText.tsx +813 -0
- package/src/renderers/nativeTextControls.ts +131 -0
- package/src/renderers/nativeTextLineLayout.ts +495 -0
- package/src/renderers/nativeTextPlayback.ts +204 -0
- package/src/renderers/overlayText.tsx +945 -0
- package/src/renderers/overlayTextLayout.ts +312 -0
- package/src/renderers/rendererMotion.ts +483 -0
- package/src/split/createToken.ts +26 -0
- package/src/split/custom.ts +92 -0
- package/src/split/graphemes.ts +27 -0
- package/src/split/index.ts +9 -0
- package/src/split/lines.ts +35 -0
- package/src/split/segmenter.ts +111 -0
- package/src/split/words.ts +28 -0
- package/src/timeline/index.ts +4 -0
- package/src/timeline/parallel.ts +30 -0
- package/src/timeline/sequence.ts +29 -0
- package/src/timeline/stagger.ts +60 -0
- package/src/timeline/validation.ts +29 -0
- package/src/timeline/wave.ts +34 -0
- package/src/types/index.ts +34 -0
- package/src/types/recipe.ts +195 -0
- package/src/types/renderer.ts +91 -0
- package/src/types/token.ts +39 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const WORD_CHARACTER_SOURCE = '[0-9A-Za-z_\\u00C0-\\u024F\\u0370-\\u03FF\\u0400-\\u04FF\\u0590-\\u05FF\\u0600-\\u06FF\\u0900-\\u097F\\u0E00-\\u0E7F\\u1100-\\u11FF\\u3040-\\u30FF\\u3130-\\u318F\\u3400-\\u9FFF\\uAC00-\\uD7AF\\uF900-\\uFAFF]';
|
|
4
|
+
const WORD_MARK_SOURCE = '[\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F]';
|
|
5
|
+
const WORD_CONTINUATION_SOURCE = `(?:${WORD_CHARACTER_SOURCE}|${WORD_MARK_SOURCE})*`;
|
|
6
|
+
const WORD_UNIT_SOURCE = `${WORD_CHARACTER_SOURCE}${WORD_CONTINUATION_SOURCE}`;
|
|
7
|
+
const WORD_LIKE_SOURCE = `${WORD_UNIT_SOURCE}(?:[.'’]${WORD_UNIT_SOURCE})*`;
|
|
8
|
+
const WHITESPACE_SOURCE = '\\s+';
|
|
9
|
+
const WHITESPACE_PATTERN = /^\s+$/u;
|
|
10
|
+
const SURROGATE_PAIR_SOURCE = '[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]';
|
|
11
|
+
const CODE_POINT_SOURCE = `(?:\\r\\n|${SURROGATE_PAIR_SOURCE}|[\\s\\S])`;
|
|
12
|
+
const GRAPHEME_EXTENSION_SOURCE = '[\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F\\uFE00-\\uFE0F\\u{E0100}-\\u{E01EF}\\u{1F3FB}-\\u{1F3FF}]';
|
|
13
|
+
const HANGUL_LEADING_SOURCE = '[\\u1100-\\u115F\\uA960-\\uA97C]';
|
|
14
|
+
const HANGUL_VOWEL_SOURCE = '[\\u1160-\\u11A7\\uD7B0-\\uD7C6]';
|
|
15
|
+
const HANGUL_TRAILING_SOURCE = '[\\u11A8-\\u11FF\\uD7CB-\\uD7FB]';
|
|
16
|
+
// Precomposed LV syllables occur every 28 code points, starting at 가 (U+AC00).
|
|
17
|
+
const HANGUL_LV_SOURCE = `[${Array.from({
|
|
18
|
+
length: 399
|
|
19
|
+
}, (_, index) => String.fromCharCode(0xac00 + index * 28)).join('')}]`;
|
|
20
|
+
const HANGUL_LVT_SOURCE = `(?!${HANGUL_LV_SOURCE})[\\uAC00-\\uD7A3]`;
|
|
21
|
+
// UAX #29 GB6–GB8: L* (V+ | LV V* | LVT) T* | L+ | T+.
|
|
22
|
+
const HANGUL_SYLLABLE_SOURCE = `${HANGUL_LEADING_SOURCE}*(?:${HANGUL_VOWEL_SOURCE}+|${HANGUL_LV_SOURCE}${HANGUL_VOWEL_SOURCE}*|${HANGUL_LVT_SOURCE})${HANGUL_TRAILING_SOURCE}*|${HANGUL_LEADING_SOURCE}+|${HANGUL_TRAILING_SOURCE}+`;
|
|
23
|
+
const BASE_GRAPHEME_SOURCE = `(?:${HANGUL_SYLLABLE_SOURCE}|${CODE_POINT_SOURCE})${GRAPHEME_EXTENSION_SOURCE}*`;
|
|
24
|
+
const JOINED_GRAPHEME_SOURCE = `${BASE_GRAPHEME_SOURCE}(?:\\u200D${BASE_GRAPHEME_SOURCE})*`;
|
|
25
|
+
const REGIONAL_INDICATOR_PAIR_SOURCE = '[\\u{1F1E6}-\\u{1F1FF}]{2}';
|
|
26
|
+
const GRAPHEME_SEGMENT_SOURCE = `${REGIONAL_INDICATOR_PAIR_SOURCE}|${JOINED_GRAPHEME_SOURCE}`;
|
|
27
|
+
const WORD_SEGMENT_SOURCE = `${WORD_LIKE_SOURCE}|${WHITESPACE_SOURCE}|${GRAPHEME_SEGMENT_SOURCE}`;
|
|
28
|
+
const WORD_LIKE_PATTERN = new RegExp(`^${WORD_LIKE_SOURCE}$`, 'u');
|
|
29
|
+
export function createSegmenter(granularity, locale, runtime = getDefaultSegmenterRuntime()) {
|
|
30
|
+
const Segmenter = runtime?.Segmenter;
|
|
31
|
+
if (Segmenter) {
|
|
32
|
+
return new Segmenter(locale, {
|
|
33
|
+
granularity
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return createFallbackSegmenter(granularity);
|
|
37
|
+
}
|
|
38
|
+
function createFallbackSegmenter(granularity) {
|
|
39
|
+
return {
|
|
40
|
+
segment(input) {
|
|
41
|
+
return granularity === 'word' ? segmentWordsWithoutIntl(input) : segmentGraphemesWithoutIntl(input);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function segmentWordsWithoutIntl(input) {
|
|
46
|
+
return Array.from(input.matchAll(createWordSegmentPattern()), createWordSegment);
|
|
47
|
+
}
|
|
48
|
+
function segmentGraphemesWithoutIntl(input) {
|
|
49
|
+
return Array.from(input.matchAll(createGraphemeSegmentPattern()), createSegment);
|
|
50
|
+
}
|
|
51
|
+
function createWordSegment(match) {
|
|
52
|
+
const segment = match[0] ?? '';
|
|
53
|
+
return {
|
|
54
|
+
index: match.index ?? 0,
|
|
55
|
+
isWordLike: WORD_LIKE_PATTERN.test(segment) && !WHITESPACE_PATTERN.test(segment),
|
|
56
|
+
segment
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function createSegment(match) {
|
|
60
|
+
return {
|
|
61
|
+
index: match.index ?? 0,
|
|
62
|
+
segment: match[0] ?? ''
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function createGraphemeSegmentPattern() {
|
|
66
|
+
return new RegExp(GRAPHEME_SEGMENT_SOURCE, 'gu');
|
|
67
|
+
}
|
|
68
|
+
function createWordSegmentPattern() {
|
|
69
|
+
return new RegExp(WORD_SEGMENT_SOURCE, 'gu');
|
|
70
|
+
}
|
|
71
|
+
function getDefaultSegmenterRuntime() {
|
|
72
|
+
return globalThis.Intl;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=segmenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WORD_CHARACTER_SOURCE","WORD_MARK_SOURCE","WORD_CONTINUATION_SOURCE","WORD_UNIT_SOURCE","WORD_LIKE_SOURCE","WHITESPACE_SOURCE","WHITESPACE_PATTERN","SURROGATE_PAIR_SOURCE","CODE_POINT_SOURCE","GRAPHEME_EXTENSION_SOURCE","HANGUL_LEADING_SOURCE","HANGUL_VOWEL_SOURCE","HANGUL_TRAILING_SOURCE","HANGUL_LV_SOURCE","Array","from","length","_","index","String","fromCharCode","join","HANGUL_LVT_SOURCE","HANGUL_SYLLABLE_SOURCE","BASE_GRAPHEME_SOURCE","JOINED_GRAPHEME_SOURCE","REGIONAL_INDICATOR_PAIR_SOURCE","GRAPHEME_SEGMENT_SOURCE","WORD_SEGMENT_SOURCE","WORD_LIKE_PATTERN","RegExp","createSegmenter","granularity","locale","runtime","getDefaultSegmenterRuntime","Segmenter","createFallbackSegmenter","segment","input","segmentWordsWithoutIntl","segmentGraphemesWithoutIntl","matchAll","createWordSegmentPattern","createWordSegment","createGraphemeSegmentPattern","createSegment","match","isWordLike","test","globalThis","Intl"],"sourceRoot":"../../../src","sources":["split/segmenter.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createTextMotionSplitterHandle } from "../recipe/descriptors.js";
|
|
4
|
+
import { createTextMotionToken } from "./createToken.js";
|
|
5
|
+
import { createSegmenter } from "./segmenter.js";
|
|
6
|
+
|
|
7
|
+
/** Split text into word, spacing, and punctuation tokens. */
|
|
8
|
+
export function words() {
|
|
9
|
+
return createTextMotionSplitterHandle({
|
|
10
|
+
kind: 'word',
|
|
11
|
+
split(input, context) {
|
|
12
|
+
const segmenter = createSegmenter('word', context?.locale);
|
|
13
|
+
return Array.from(segmenter.segment(input), (segment, index) => createTextMotionToken({
|
|
14
|
+
index,
|
|
15
|
+
metadata: {
|
|
16
|
+
isWordLike: segment.isWordLike === true
|
|
17
|
+
},
|
|
18
|
+
sourceRange: {
|
|
19
|
+
start: segment.index,
|
|
20
|
+
end: segment.index + segment.segment.length
|
|
21
|
+
},
|
|
22
|
+
text: segment.segment,
|
|
23
|
+
unit: 'word'
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=words.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTextMotionSplitterHandle","createTextMotionToken","createSegmenter","words","kind","split","input","context","segmenter","locale","Array","from","segment","index","metadata","isWordLike","sourceRange","start","end","length","text","unit"],"sourceRoot":"../../../src","sources":["split/words.ts"],"mappings":";;AAEA,SAASA,8BAA8B,QAAQ,0BAAuB;AACtE,SAASC,qBAAqB,QAAQ,kBAAe;AACrD,SAASC,eAAe,QAAQ,gBAAa;;AAE7C;AACA,OAAO,SAASC,KAAKA,CAAA,EAA+B;EAClD,OAAOH,8BAA8B,CAAC;IACpCI,IAAI,EAAE,MAAM;IACZC,KAAKA,CAACC,KAAK,EAAEC,OAAO,EAAE;MACpB,MAAMC,SAAS,GAAGN,eAAe,CAAC,MAAM,EAAEK,OAAO,EAAEE,MAAM,CAAC;MAE1D,OAAOC,KAAK,CAACC,IAAI,CAACH,SAAS,CAACI,OAAO,CAACN,KAAK,CAAC,EAAE,CAACM,OAAO,EAAEC,KAAK,KACzDZ,qBAAqB,CAAC;QACpBY,KAAK;QACLC,QAAQ,EAAE;UAAEC,UAAU,EAAEH,OAAO,CAACG,UAAU,KAAK;QAAK,CAAC;QACrDC,WAAW,EAAE;UACXC,KAAK,EAAEL,OAAO,CAACC,KAAK;UACpBK,GAAG,EAAEN,OAAO,CAACC,KAAK,GAAGD,OAAO,CAACA,OAAO,CAACO;QACvC,CAAC;QACDC,IAAI,EAAER,OAAO,CAACA,OAAO;QACrBS,IAAI,EAAE;MACR,CAAC,CACH,CAAC;IACH;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["parallel","sequence","stagger","wave"],"sourceRoot":"../../../src","sources":["timeline/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,eAAY;AACrC,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,OAAO,QAAmE,cAAW;AAC9F,SAASC,IAAI,QAAoC,WAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createTextMotionTimelineHandle, readTextMotionTimelineDescriptor } from "../recipe/descriptors.js";
|
|
4
|
+
/** Combine timelines by using the earliest delay for each token. */
|
|
5
|
+
export function parallel(...timelines) {
|
|
6
|
+
const descriptors = timelines.map(readTextMotionTimelineDescriptor);
|
|
7
|
+
return createTextMotionTimelineHandle({
|
|
8
|
+
kind: 'timeline',
|
|
9
|
+
name: 'parallel',
|
|
10
|
+
options: {
|
|
11
|
+
timelines: descriptors.map(descriptor => descriptor.name)
|
|
12
|
+
},
|
|
13
|
+
delayFor(index, count) {
|
|
14
|
+
if (descriptors.length === 0) {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
17
|
+
return Math.min(...descriptors.map(descriptor => descriptor.delayFor(index, count)));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=parallel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTextMotionTimelineHandle","readTextMotionTimelineDescriptor","parallel","timelines","descriptors","map","kind","name","options","descriptor","delayFor","index","count","length","Math","min"],"sourceRoot":"../../../src","sources":["timeline/parallel.ts"],"mappings":";;AAEA,SACEA,8BAA8B,EAC9BC,gCAAgC,QAC3B,0BAAuB;AAM9B;AACA,OAAO,SAASC,QAAQA,CACtB,GAAGC,SAA2C,EACd;EAChC,MAAMC,WAAW,GAAGD,SAAS,CAACE,GAAG,CAACJ,gCAAgC,CAAC;EAEnE,OAAOD,8BAA8B,CAAiD;IACpFM,IAAI,EAAE,UAAU;IAChBC,IAAI,EAAE,UAAU;IAChBC,OAAO,EAAE;MAAEL,SAAS,EAAEC,WAAW,CAACC,GAAG,CAAEI,UAAU,IAAKA,UAAU,CAACF,IAAI;IAAE,CAAC;IACxEG,QAAQA,CAACC,KAAK,EAAEC,KAAK,EAAE;MACrB,IAAIR,WAAW,CAACS,MAAM,KAAK,CAAC,EAAE;QAC5B,OAAO,CAAC;MACV;MAEA,OAAOC,IAAI,CAACC,GAAG,CAAC,GAAGX,WAAW,CAACC,GAAG,CAAEI,UAAU,IAAKA,UAAU,CAACC,QAAQ,CAACC,KAAK,EAAEC,KAAK,CAAC,CAAC,CAAC;IACxF;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createTextMotionTimelineHandle, readTextMotionTimelineDescriptor } from "../recipe/descriptors.js";
|
|
4
|
+
/** Combine timelines by adding each timeline delay for a token. */
|
|
5
|
+
export function sequence(...timelines) {
|
|
6
|
+
const descriptors = timelines.map(readTextMotionTimelineDescriptor);
|
|
7
|
+
return createTextMotionTimelineHandle({
|
|
8
|
+
kind: 'timeline',
|
|
9
|
+
name: 'sequence',
|
|
10
|
+
options: {
|
|
11
|
+
timelines: descriptors.map(descriptor => descriptor.name)
|
|
12
|
+
},
|
|
13
|
+
delayFor(index, count) {
|
|
14
|
+
return descriptors.reduce((delay, descriptor) => delay + descriptor.delayFor(index, count), 0);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=sequence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTextMotionTimelineHandle","readTextMotionTimelineDescriptor","sequence","timelines","descriptors","map","kind","name","options","descriptor","delayFor","index","count","reduce","delay"],"sourceRoot":"../../../src","sources":["timeline/sequence.ts"],"mappings":";;AAEA,SACEA,8BAA8B,EAC9BC,gCAAgC,QAC3B,0BAAuB;AAM9B;AACA,OAAO,SAASC,QAAQA,CACtB,GAAGC,SAA2C,EACd;EAChC,MAAMC,WAAW,GAAGD,SAAS,CAACE,GAAG,CAACJ,gCAAgC,CAAC;EAEnE,OAAOD,8BAA8B,CAAiD;IACpFM,IAAI,EAAE,UAAU;IAChBC,IAAI,EAAE,UAAU;IAChBC,OAAO,EAAE;MAAEL,SAAS,EAAEC,WAAW,CAACC,GAAG,CAAEI,UAAU,IAAKA,UAAU,CAACF,IAAI;IAAE,CAAC;IACxEG,QAAQA,CAACC,KAAK,EAAEC,KAAK,EAAE;MACrB,OAAOR,WAAW,CAACS,MAAM,CACvB,CAACC,KAAK,EAAEL,UAAU,KAAKK,KAAK,GAAGL,UAAU,CAACC,QAAQ,CAACC,KAAK,EAAEC,KAAK,CAAC,EAChE,CACF,CAAC;IACH;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createTextMotionTimelineHandle } from "../recipe/descriptors.js";
|
|
4
|
+
import { validateFiniteTimelineNumber, validateNonNegativeTimelineNumber } from "./validation.js";
|
|
5
|
+
|
|
6
|
+
/** Origin used when calculating stagger delays. */
|
|
7
|
+
|
|
8
|
+
/** Options for {@link stagger}. */
|
|
9
|
+
|
|
10
|
+
function offsetFrom(index, count, from) {
|
|
11
|
+
if (typeof from === 'number') {
|
|
12
|
+
return Math.abs(index - from);
|
|
13
|
+
}
|
|
14
|
+
if (from === 'center') {
|
|
15
|
+
return Math.abs(index - (count - 1) / 2);
|
|
16
|
+
}
|
|
17
|
+
if (from === 'end') {
|
|
18
|
+
return count - 1 - index;
|
|
19
|
+
}
|
|
20
|
+
if (from === 'edges') {
|
|
21
|
+
return Math.min(index, count - 1 - index);
|
|
22
|
+
}
|
|
23
|
+
return index;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Delay each token by a fixed step from the chosen origin. */
|
|
27
|
+
export function stagger(step, options = {}) {
|
|
28
|
+
const fromOption = options.from ?? 'start';
|
|
29
|
+
const from = typeof fromOption === 'number' ? validateFiniteTimelineNumber(fromOption, 'stagger from') : fromOption;
|
|
30
|
+
const safeStep = validateNonNegativeTimelineNumber(step, 'stagger step');
|
|
31
|
+
return createTextMotionTimelineHandle({
|
|
32
|
+
kind: 'timeline',
|
|
33
|
+
name: 'stagger',
|
|
34
|
+
options: {
|
|
35
|
+
from,
|
|
36
|
+
step: safeStep
|
|
37
|
+
},
|
|
38
|
+
delayFor(index, count) {
|
|
39
|
+
return offsetFrom(index, count, from) * safeStep;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=stagger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTextMotionTimelineHandle","validateFiniteTimelineNumber","validateNonNegativeTimelineNumber","offsetFrom","index","count","from","Math","abs","min","stagger","step","options","fromOption","safeStep","kind","name","delayFor"],"sourceRoot":"../../../src","sources":["timeline/stagger.ts"],"mappings":";;AAEA,SAASA,8BAA8B,QAAQ,0BAAuB;AACtE,SAASC,4BAA4B,EAAEC,iCAAiC,QAAQ,iBAAc;;AAE9F;;AAGA;;AAWA,SAASC,UAAUA,CAACC,KAAa,EAAEC,KAAa,EAAEC,IAA2B,EAAU;EACrF,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAOC,IAAI,CAACC,GAAG,CAACJ,KAAK,GAAGE,IAAI,CAAC;EAC/B;EAEA,IAAIA,IAAI,KAAK,QAAQ,EAAE;IACrB,OAAOC,IAAI,CAACC,GAAG,CAACJ,KAAK,GAAG,CAACC,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;EAC1C;EAEA,IAAIC,IAAI,KAAK,KAAK,EAAE;IAClB,OAAOD,KAAK,GAAG,CAAC,GAAGD,KAAK;EAC1B;EAEA,IAAIE,IAAI,KAAK,OAAO,EAAE;IACpB,OAAOC,IAAI,CAACE,GAAG,CAACL,KAAK,EAAEC,KAAK,GAAG,CAAC,GAAGD,KAAK,CAAC;EAC3C;EAEA,OAAOA,KAAK;AACd;;AAEA;AACA,OAAO,SAASM,OAAOA,CACrBC,IAAY,EACZC,OAAiC,GAAG,CAAC,CAAC,EACP;EAC/B,MAAMC,UAAU,GAAGD,OAAO,CAACN,IAAI,IAAI,OAAO;EAC1C,MAAMA,IAAI,GACR,OAAOO,UAAU,KAAK,QAAQ,GAC1BZ,4BAA4B,CAACY,UAAU,EAAE,cAAc,CAAC,GACxDA,UAAU;EAChB,MAAMC,QAAQ,GAAGZ,iCAAiC,CAACS,IAAI,EAAE,cAAc,CAAC;EAExE,OAAOX,8BAA8B,CAA8C;IACjFe,IAAI,EAAE,UAAU;IAChBC,IAAI,EAAE,SAAS;IACfJ,OAAO,EAAE;MAAEN,IAAI;MAAEK,IAAI,EAAEG;IAAS,CAAC;IACjCG,QAAQA,CAACb,KAAK,EAAEC,KAAK,EAAE;MACrB,OAAOF,UAAU,CAACC,KAAK,EAAEC,KAAK,EAAEC,IAAI,CAAC,GAAGQ,QAAQ;IAClD;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const ERROR_PREFIX = '@react-native-motion-kit/text-motion';
|
|
4
|
+
export function validateFiniteTimelineNumber(value, label) {
|
|
5
|
+
if (Number.isFinite(value)) {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
throw new Error(`${ERROR_PREFIX} ${label} must be a finite number.`);
|
|
9
|
+
}
|
|
10
|
+
export function validateNonNegativeTimelineNumber(value, label) {
|
|
11
|
+
const finiteValue = validateFiniteTimelineNumber(value, label);
|
|
12
|
+
if (finiteValue >= 0) {
|
|
13
|
+
return finiteValue;
|
|
14
|
+
}
|
|
15
|
+
throw new Error(`${ERROR_PREFIX} ${label} must be greater than or equal to 0.`);
|
|
16
|
+
}
|
|
17
|
+
export function validatePositiveTimelineNumber(value, label) {
|
|
18
|
+
const finiteValue = validateFiniteTimelineNumber(value, label);
|
|
19
|
+
if (finiteValue > 0) {
|
|
20
|
+
return finiteValue;
|
|
21
|
+
}
|
|
22
|
+
throw new Error(`${ERROR_PREFIX} ${label} must be greater than 0.`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ERROR_PREFIX","validateFiniteTimelineNumber","value","label","Number","isFinite","Error","validateNonNegativeTimelineNumber","finiteValue","validatePositiveTimelineNumber"],"sourceRoot":"../../../src","sources":["timeline/validation.ts"],"mappings":";;AAAA,MAAMA,YAAY,GAAG,sCAAsC;AAE3D,OAAO,SAASC,4BAA4BA,CAACC,KAAa,EAAEC,KAAa,EAAU;EACjF,IAAIC,MAAM,CAACC,QAAQ,CAACH,KAAK,CAAC,EAAE;IAC1B,OAAOA,KAAK;EACd;EAEA,MAAM,IAAII,KAAK,CAAC,GAAGN,YAAY,IAAIG,KAAK,2BAA2B,CAAC;AACtE;AAEA,OAAO,SAASI,iCAAiCA,CAACL,KAAa,EAAEC,KAAa,EAAU;EACtF,MAAMK,WAAW,GAAGP,4BAA4B,CAACC,KAAK,EAAEC,KAAK,CAAC;EAE9D,IAAIK,WAAW,IAAI,CAAC,EAAE;IACpB,OAAOA,WAAW;EACpB;EAEA,MAAM,IAAIF,KAAK,CAAC,GAAGN,YAAY,IAAIG,KAAK,sCAAsC,CAAC;AACjF;AAEA,OAAO,SAASM,8BAA8BA,CAACP,KAAa,EAAEC,KAAa,EAAU;EACnF,MAAMK,WAAW,GAAGP,4BAA4B,CAACC,KAAK,EAAEC,KAAK,CAAC;EAE9D,IAAIK,WAAW,GAAG,CAAC,EAAE;IACnB,OAAOA,WAAW;EACpB;EAEA,MAAM,IAAIF,KAAK,CAAC,GAAGN,YAAY,IAAIG,KAAK,0BAA0B,CAAC;AACrE","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createTextMotionTimelineHandle } from "../recipe/descriptors.js";
|
|
4
|
+
import { validateNonNegativeTimelineNumber, validatePositiveTimelineNumber } from "./validation.js";
|
|
5
|
+
|
|
6
|
+
/** Options for {@link wave}. */
|
|
7
|
+
|
|
8
|
+
/** Create sine-wave token delays for soft rolling text motion. */
|
|
9
|
+
export function wave(options = {}) {
|
|
10
|
+
const amplitude = validateNonNegativeTimelineNumber(options.amplitude ?? 0.08, 'wave amplitude');
|
|
11
|
+
const wavelength = validatePositiveTimelineNumber(options.wavelength ?? 4, 'wave wavelength');
|
|
12
|
+
return createTextMotionTimelineHandle({
|
|
13
|
+
kind: 'timeline',
|
|
14
|
+
name: 'wave',
|
|
15
|
+
options: {
|
|
16
|
+
amplitude,
|
|
17
|
+
wavelength
|
|
18
|
+
},
|
|
19
|
+
delayFor(index) {
|
|
20
|
+
const phase = index / wavelength * Math.PI * 2;
|
|
21
|
+
return (Math.sin(phase) + 1) / 2 * amplitude;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=wave.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTextMotionTimelineHandle","validateNonNegativeTimelineNumber","validatePositiveTimelineNumber","wave","options","amplitude","wavelength","kind","name","delayFor","index","phase","Math","PI","sin"],"sourceRoot":"../../../src","sources":["timeline/wave.ts"],"mappings":";;AAEA,SAASA,8BAA8B,QAAQ,0BAAuB;AACtE,SAASC,iCAAiC,EAAEC,8BAA8B,QAAQ,iBAAc;;AAEhG;;AAaA;AACA,OAAO,SAASC,IAAIA,CAACC,OAA8B,GAAG,CAAC,CAAC,EAA8B;EACpF,MAAMC,SAAS,GAAGJ,iCAAiC,CAACG,OAAO,CAACC,SAAS,IAAI,IAAI,EAAE,gBAAgB,CAAC;EAChG,MAAMC,UAAU,GAAGJ,8BAA8B,CAACE,OAAO,CAACE,UAAU,IAAI,CAAC,EAAE,iBAAiB,CAAC;EAE7F,OAAON,8BAA8B,CAAwC;IAC3EO,IAAI,EAAE,UAAU;IAChBC,IAAI,EAAE,MAAM;IACZJ,OAAO,EAAE;MAAEC,SAAS;MAAEC;IAAW,CAAC;IAClCG,QAAQA,CAACC,KAAK,EAAE;MACd,MAAMC,KAAK,GAAID,KAAK,GAAGJ,UAAU,GAAIM,IAAI,CAACC,EAAE,GAAG,CAAC;MAEhD,OAAQ,CAACD,IAAI,CAACE,GAAG,CAACH,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAIN,SAAS;IAChD;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTextMotionRendererCapability"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;AA0BA,SAASA,kCAAkC,QAAQ,eAAY","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/recipe.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Branded renderer capability name for custom renderer packages. */
|
|
4
|
+
|
|
5
|
+
/** Capability supported by a renderer and required by effects. */
|
|
6
|
+
|
|
7
|
+
/** @internal Built-in capability used by overlayText line-mask effects. */
|
|
8
|
+
|
|
9
|
+
/** Create a branded capability name for a custom renderer. */
|
|
10
|
+
export function createTextMotionRendererCapability(name) {
|
|
11
|
+
return name;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Props passed from the recipe component into a renderer component. */
|
|
15
|
+
|
|
16
|
+
/** @internal Renderer descriptor consumed by recipe internals. */
|
|
17
|
+
|
|
18
|
+
/** Renderer handle used by `.layout(...)`. */
|
|
19
|
+
|
|
20
|
+
/** @internal Renderer handle for source-token renderers accepted after `.split(...)`. */
|
|
21
|
+
|
|
22
|
+
/** @internal Renderer handle for renderers that own rendered-line layout. */
|
|
23
|
+
|
|
24
|
+
/** Capabilities required by an effect but missing from a renderer. */
|
|
25
|
+
|
|
26
|
+
/** Effect type gate that rejects effects incompatible with the selected renderer. */
|
|
27
|
+
//# sourceMappingURL=renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTextMotionRendererCapability","name"],"sourceRoot":"../../../src","sources":["types/renderer.ts"],"mappings":";;AASA;;AAKA;;AAMA;;AAGA;AACA,OAAO,SAASA,kCAAkCA,CAChDC,IAAU,EACmC;EAC7C,OAAOA,IAAI;AACb;;AAEA;;AAQA;;AAYA;;AAWA;;AAQA;;AAQA;;AAMA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/token.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/accessibility/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,8BAA8B,EAC9B,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,wBAAwB,GAC9B,MAAM,eAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TextProps } from 'react-native';
|
|
2
|
+
import type { TextMotionAccessibilityPolicy, TextMotionToken } from '../types/index.js';
|
|
3
|
+
/** Options for {@link parentLabelPolicy}. */
|
|
4
|
+
export type ParentLabelPolicyOptions = {
|
|
5
|
+
/** Reduced-motion behavior. Defaults to `system`. */
|
|
6
|
+
reducedMotion?: TextMotionAccessibilityPolicy['reducedMotion'];
|
|
7
|
+
};
|
|
8
|
+
/** Make the parent text node accessible and hide decorative animated token nodes. */
|
|
9
|
+
export declare function parentLabelPolicy(options?: ParentLabelPolicyOptions): TextMotionAccessibilityPolicy;
|
|
10
|
+
export declare function resolveAccessibleText(children: string, tokens: readonly TextMotionToken[]): string;
|
|
11
|
+
export declare function createParentAccessibilityProps(policy: TextMotionAccessibilityPolicy, label: string): Pick<TextProps, 'accessibilityLabel' | 'accessible'>;
|
|
12
|
+
export declare function createHiddenTokenAccessibilityProps(policy: TextMotionAccessibilityPolicy): Pick<TextProps, 'accessibilityElementsHidden' | 'accessible' | 'importantForAccessibility'>;
|
|
13
|
+
//# sourceMappingURL=policies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../../../../src/accessibility/policies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,mBAAU,CAAC;AAE/E,6CAA6C;AAC7C,MAAM,MAAM,wBAAwB,GAAG;IACrC,qDAAqD;IACrD,aAAa,CAAC,EAAE,6BAA6B,CAAC,eAAe,CAAC,CAAC;CAChE,CAAC;AAEF,qFAAqF;AACrF,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE,wBAA6B,GACrC,6BAA6B,CAO/B;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS,eAAe,EAAE,GACjC,MAAM,CAMR;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,6BAA6B,EACrC,KAAK,EAAE,MAAM,GACZ,IAAI,CAAC,SAAS,EAAE,oBAAoB,GAAG,YAAY,CAAC,CAStD;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,6BAA6B,GACpC,IAAI,CAAC,SAAS,EAAE,6BAA6B,GAAG,YAAY,GAAG,2BAA2B,CAAC,CAU7F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../../../src/controls/brand.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,EAAE,OAAO,MAE5C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { textMotionControlsBrand } from './brand.js';
|
|
2
|
+
/**
|
|
3
|
+
* Command channel for event-driven text playback.
|
|
4
|
+
*
|
|
5
|
+
* Pass the returned controls object to a text motion component with
|
|
6
|
+
* `controls={controls}`. The controls object emits playback commands; the component still owns
|
|
7
|
+
* its recipe, timeline, effects, and `.motion()` transition.
|
|
8
|
+
*/
|
|
9
|
+
export type TextMotionControls = {
|
|
10
|
+
readonly [textMotionControlsBrand]: true;
|
|
11
|
+
/** Play the current text motion from its current progress toward the final state. */
|
|
12
|
+
play(): void;
|
|
13
|
+
/** Reset to the initial state and play again with the recipe timeline and `.motion()` config. */
|
|
14
|
+
replay(): void;
|
|
15
|
+
/** Stop any in-flight playback and return to the initial state. */
|
|
16
|
+
reset(): void;
|
|
17
|
+
/** Stop any in-flight playback while preserving the current visual progress. */
|
|
18
|
+
stop(): void;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Create a stable text motion command channel for event-driven playback.
|
|
22
|
+
*
|
|
23
|
+
* Use controls for button presses, screen focus, onboarding steps, and other discrete events.
|
|
24
|
+
* Use the `progress` prop instead when text should follow a raw scroll, gesture, or synchronized
|
|
25
|
+
* Reanimated shared value.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useTextMotionControls(): TextMotionControls;
|
|
28
|
+
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../../src/controls/controls.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAS,CAAC;AAIvD;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,CAAC,uBAAuB,CAAC,EAAE,IAAI,CAAC;IACzC,qFAAqF;IACrF,IAAI,IAAI,IAAI,CAAC;IACb,iGAAiG;IACjG,MAAM,IAAI,IAAI,CAAC;IACf,mEAAmE;IACnE,KAAK,IAAI,IAAI,CAAC;IACd,gFAAgF;IAChF,IAAI,IAAI,IAAI,CAAC;CACd,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,CAQ1D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TextMotionControls } from './controls.js';
|
|
2
|
+
export type TextMotionControlCommandKind = 'play' | 'replay' | 'reset' | 'stop';
|
|
3
|
+
export type TextMotionControlCommand = {
|
|
4
|
+
id: number;
|
|
5
|
+
kind: TextMotionControlCommandKind;
|
|
6
|
+
};
|
|
7
|
+
export type TextMotionControlCommandListener = (command: TextMotionControlCommand) => void;
|
|
8
|
+
export type TextMotionControlsDescriptor = {
|
|
9
|
+
getListenerCount(): number;
|
|
10
|
+
subscribe(listener: TextMotionControlCommandListener): () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function createTextMotionControlsHandle(): TextMotionControls;
|
|
13
|
+
export declare function readTextMotionControlsDescriptor(controls: TextMotionControls): TextMotionControlsDescriptor;
|
|
14
|
+
//# sourceMappingURL=descriptors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptors.d.ts","sourceRoot":"","sources":["../../../../src/controls/descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAY,CAAC;AAIrD,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhF,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,4BAA4B,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC;AAE3F,MAAM,MAAM,4BAA4B,GAAG;IACzC,gBAAgB,IAAI,MAAM,CAAC;IAC3B,SAAS,CAAC,QAAQ,EAAE,gCAAgC,GAAG,MAAM,IAAI,CAAC;CACnE,CAAC;AAIF,wBAAgB,8BAA8B,IAAI,kBAAkB,CAkCnE;AAED,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,kBAAkB,GAC3B,4BAA4B,CAQ9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/controls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAY,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TextMotionEffect, TextMotionEffectDescriptorOptions } from '../types/recipe.js';
|
|
2
|
+
import type { TextMotionRendererCapability } from '../types/renderer.js';
|
|
3
|
+
/** Compose multiple effects into one ordered effect. */
|
|
4
|
+
export declare function composeTextMotionEffects<Capabilities extends TextMotionRendererCapability>(effects: readonly TextMotionEffect<Capabilities>[]): TextMotionEffect<Capabilities>;
|
|
5
|
+
/** Create a custom native-text effect without descriptor options. */
|
|
6
|
+
export declare function createTextMotionEffect<Name extends string>(name: Name): TextMotionEffect<'native-text', Name>;
|
|
7
|
+
/** Create a custom native-text effect with typed descriptor options. */
|
|
8
|
+
export declare function createTextMotionEffect<Name extends string, Options extends TextMotionEffectDescriptorOptions>(name: Name, options: Options): TextMotionEffect<'native-text', Name>;
|
|
9
|
+
/** Create a custom effect with typed descriptor options and renderer capabilities. */
|
|
10
|
+
export declare function createTextMotionEffect<Name extends string, Options extends TextMotionEffectDescriptorOptions, Capabilities extends TextMotionRendererCapability>(name: Name, options: Options, requiredCapabilities: readonly Capabilities[]): TextMotionEffect<Capabilities, Name>;
|
|
11
|
+
//# sourceMappingURL=compose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../../../src/effects/compose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,gBAAgB,EAChB,iCAAiC,EAClC,MAAM,oBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAmB,CAAC;AAgBtE,wDAAwD;AACxD,wBAAgB,wBAAwB,CAAC,YAAY,SAAS,4BAA4B,EACxF,OAAO,EAAE,SAAS,gBAAgB,CAAC,YAAY,CAAC,EAAE,GACjD,gBAAgB,CAAC,YAAY,CAAC,CAuBhC;AAED,qEAAqE;AACrE,wBAAgB,sBAAsB,CAAC,IAAI,SAAS,MAAM,EACxD,IAAI,EAAE,IAAI,GACT,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAEzC,wEAAwE;AACxE,wBAAgB,sBAAsB,CACpC,IAAI,SAAS,MAAM,EACnB,OAAO,SAAS,iCAAiC,EACjD,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAEvE,sFAAsF;AACtF,wBAAgB,sBAAsB,CACpC,IAAI,SAAS,MAAM,EACnB,OAAO,SAAS,iCAAiC,EACjD,YAAY,SAAS,4BAA4B,EAEjD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,oBAAoB,EAAE,SAAS,YAAY,EAAE,GAC5C,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Options for {@link fade}. */
|
|
2
|
+
export type FadeOptions = {
|
|
3
|
+
/** Starting opacity. Defaults to `0`. */
|
|
4
|
+
from?: number;
|
|
5
|
+
/** Ending opacity. Defaults to `1`. */
|
|
6
|
+
to?: number;
|
|
7
|
+
};
|
|
8
|
+
/** Fade each token between opacity values. */
|
|
9
|
+
export declare function fade(options?: FadeOptions): import("../index.js").TextMotionEffect<"style-transform", "fade">;
|
|
10
|
+
//# sourceMappingURL=fade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../../../src/effects/fade.ts"],"names":[],"mappings":"AAGA,gCAAgC;AAChC,MAAM,MAAM,WAAW,GAAG;IACxB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,8CAA8C;AAC9C,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,qEAS7C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { composeTextMotionEffects, createTextMotionEffect } from './compose.js';
|
|
2
|
+
export { fade, type FadeOptions } from './fade.js';
|
|
3
|
+
export { lineReveal, type LineRevealOptions } from './lineReveal.js';
|
|
4
|
+
export { pulse, type PulseOptions } from './pulse.js';
|
|
5
|
+
export { rise, type RiseOptions } from './rise.js';
|
|
6
|
+
export { scale, type ScaleOptions } from './scale.js';
|
|
7
|
+
export { shake, type ShakeOptions } from './shake.js';
|
|
8
|
+
export { slide, type SlideOptions } from './slide.js';
|
|
9
|
+
export { typewriter } from './typewriter.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/effects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,cAAW,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,WAAQ,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAc,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,WAAQ,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAS,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAS,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TextMotionLineMaskCapability } from '../types/renderer.js';
|
|
2
|
+
/** Options for {@link lineReveal}. */
|
|
3
|
+
export type LineRevealOptions = {
|
|
4
|
+
/** Initial downward offset in points. Defaults to `16`. */
|
|
5
|
+
y?: number;
|
|
6
|
+
/** Initial opacity before each rendered line reveals. Defaults to `0`. */
|
|
7
|
+
fromOpacity?: number;
|
|
8
|
+
};
|
|
9
|
+
/** Reveal each React Native rendered line through an `overlayText()` line mask. */
|
|
10
|
+
export declare function lineReveal(options?: LineRevealOptions): import("../index.js").TextMotionEffect<"style-transform" | TextMotionLineMaskCapability, "lineReveal">;
|
|
11
|
+
//# sourceMappingURL=lineReveal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineReveal.d.ts","sourceRoot":"","sources":["../../../../src/effects/lineReveal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAmB,CAAC;AAStE,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,2DAA2D;IAC3D,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,0GASzD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Options for {@link pulse}. */
|
|
2
|
+
export type PulseOptions = {
|
|
3
|
+
/** Peak pulse scale reached around the middle of the motion. Defaults to `1.04`. */
|
|
4
|
+
scale?: number;
|
|
5
|
+
};
|
|
6
|
+
/** Briefly emphasize each token by scaling it up and returning to its final scale. */
|
|
7
|
+
export declare function pulse(options?: PulseOptions): import("../index.js").TextMotionEffect<"style-transform", "pulse">;
|
|
8
|
+
//# sourceMappingURL=pulse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pulse.d.ts","sourceRoot":"","sources":["../../../../src/effects/pulse.ts"],"names":[],"mappings":"AAGA,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAAG;IACzB,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,sFAAsF;AACtF,wBAAgB,KAAK,CAAC,OAAO,GAAE,YAAiB,sEAQ/C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Options for {@link rise}. */
|
|
2
|
+
export type RiseOptions = {
|
|
3
|
+
/** Initial downward offset in pixels. Defaults to `12`. */
|
|
4
|
+
y?: number;
|
|
5
|
+
};
|
|
6
|
+
/** Move each token upward from a vertical offset. */
|
|
7
|
+
export declare function rise(options?: RiseOptions): import("../index.js").TextMotionEffect<"style-transform", "rise">;
|
|
8
|
+
//# sourceMappingURL=rise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rise.d.ts","sourceRoot":"","sources":["../../../../src/effects/rise.ts"],"names":[],"mappings":"AAGA,gCAAgC;AAChC,MAAM,MAAM,WAAW,GAAG;IACxB,2DAA2D;IAC3D,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,qDAAqD;AACrD,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,qEAQ7C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Options for {@link scale}. */
|
|
2
|
+
export type ScaleOptions = {
|
|
3
|
+
/** Starting scale. Defaults to `0.96`. */
|
|
4
|
+
from?: number;
|
|
5
|
+
/** Ending scale. Defaults to `1`. */
|
|
6
|
+
to?: number;
|
|
7
|
+
};
|
|
8
|
+
/** Scale each token between two scale values. */
|
|
9
|
+
export declare function scale(options?: ScaleOptions): import("../index.js").TextMotionEffect<"style-transform", "scale">;
|
|
10
|
+
//# sourceMappingURL=scale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../../../src/effects/scale.ts"],"names":[],"mappings":"AAGA,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAAG;IACzB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,iDAAiD;AACjD,wBAAgB,KAAK,CAAC,OAAO,GAAE,YAAiB,sEAS/C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Options for {@link shake}. */
|
|
2
|
+
export type ShakeOptions = {
|
|
3
|
+
/** Initial horizontal offset in pixels. Defaults to `4`. */
|
|
4
|
+
x?: number;
|
|
5
|
+
};
|
|
6
|
+
/** Offset each token horizontally for a shake-like entrance. */
|
|
7
|
+
export declare function shake(options?: ShakeOptions): import("../index.js").TextMotionEffect<"style-transform", "shake">;
|
|
8
|
+
//# sourceMappingURL=shake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shake.d.ts","sourceRoot":"","sources":["../../../../src/effects/shake.ts"],"names":[],"mappings":"AAGA,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAAG;IACzB,4DAA4D;IAC5D,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,gEAAgE;AAChE,wBAAgB,KAAK,CAAC,OAAO,GAAE,YAAiB,sEAQ/C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Options for {@link slide}. */
|
|
2
|
+
export type SlideOptions = {
|
|
3
|
+
/** Initial horizontal offset in pixels. Defaults to `0`. */
|
|
4
|
+
x?: number;
|
|
5
|
+
/** Initial vertical offset in pixels. Defaults to `12`. */
|
|
6
|
+
y?: number;
|
|
7
|
+
};
|
|
8
|
+
/** Move each token from an x/y offset into place. */
|
|
9
|
+
export declare function slide(options?: SlideOptions): import("../index.js").TextMotionEffect<"style-transform", "slide">;
|
|
10
|
+
//# sourceMappingURL=slide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide.d.ts","sourceRoot":"","sources":["../../../../src/effects/slide.ts"],"names":[],"mappings":"AAGA,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAAG;IACzB,4DAA4D;IAC5D,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,qDAAqD;AACrD,wBAAgB,KAAK,CAAC,OAAO,GAAE,YAAiB,sEAS/C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reveal each native-text token when its local progress becomes positive.
|
|
3
|
+
*
|
|
4
|
+
* Keeps the final token layout in place. Combine with `graphemes()`, `stagger(seconds)`,
|
|
5
|
+
* and `.motion({ kind: 'timing', options: { duration: 0 } })` for instant character reveals.
|
|
6
|
+
* The splitter and timeline determine the reveal units and order; whitespace does not
|
|
7
|
+
* consume a motion index. Other effects retain their own opacity and transforms.
|
|
8
|
+
*
|
|
9
|
+
* External `progress` follows the recipe timeline, not the fraction of visible characters.
|
|
10
|
+
* Decreasing progress can hide tokens again. Requires `nativeText()`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function typewriter(): import("../index.js").TextMotionEffect<"native-text", "typewriter">;
|
|
13
|
+
//# sourceMappingURL=typewriter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typewriter.d.ts","sourceRoot":"","sources":["../../../../src/effects/typewriter.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,wEAEzB"}
|