react-native-laminar 1.1.0 → 1.4.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/README.md +47 -3
- package/lib/commonjs/hooks/use-display-units.js +1 -0
- package/lib/commonjs/hooks/use-display-units.js.map +1 -1
- package/lib/commonjs/hooks/use-inline-auto-width.js +43 -10
- package/lib/commonjs/hooks/use-inline-auto-width.js.map +1 -1
- package/lib/commonjs/hooks/use-morph-motion.js +2 -1
- package/lib/commonjs/hooks/use-morph-motion.js.map +1 -1
- package/lib/commonjs/hooks/use-morph-text-style.js +4 -0
- package/lib/commonjs/hooks/use-morph-text-style.js.map +1 -1
- package/lib/commonjs/hooks/use-numeric-lanes.js +1 -0
- package/lib/commonjs/hooks/use-numeric-lanes.js.map +1 -1
- package/lib/commonjs/hooks/use-text-glyphs.js +28 -7
- package/lib/commonjs/hooks/use-text-glyphs.js.map +1 -1
- package/lib/commonjs/index.js +58 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/model/display-units.js +7 -1
- package/lib/commonjs/model/display-units.js.map +1 -1
- package/lib/commonjs/model/numeric-lanes.js +4 -0
- package/lib/commonjs/model/numeric-lanes.js.map +1 -1
- package/lib/commonjs/model/text-keys.js +4 -0
- package/lib/commonjs/model/text-keys.js.map +1 -1
- package/lib/commonjs/motion/entry-exit-builders.js +78 -1
- package/lib/commonjs/motion/entry-exit-builders.js.map +1 -1
- package/lib/commonjs/motion/preset-map.js +7 -0
- package/lib/commonjs/motion/preset-map.js.map +1 -1
- package/lib/commonjs/view/glyph-run.js +34 -3
- package/lib/commonjs/view/glyph-run.js.map +1 -1
- package/lib/commonjs/view/morph-viewport.js +33 -3
- package/lib/commonjs/view/morph-viewport.js.map +1 -1
- package/lib/commonjs/view/number-lane.js +5 -1
- package/lib/commonjs/view/number-lane.js.map +1 -1
- package/lib/commonjs/view/number-run.js +17 -1
- package/lib/commonjs/view/number-run.js.map +1 -1
- package/lib/commonjs/view/slots-run.js +258 -0
- package/lib/commonjs/view/slots-run.js.map +1 -0
- package/lib/commonjs/view/text-run.js +37 -3
- package/lib/commonjs/view/text-run.js.map +1 -1
- package/lib/module/hooks/use-display-units.js +2 -0
- package/lib/module/hooks/use-display-units.js.map +1 -1
- package/lib/module/hooks/use-inline-auto-width.js +44 -11
- package/lib/module/hooks/use-inline-auto-width.js.map +1 -1
- package/lib/module/hooks/use-morph-motion.js +2 -1
- package/lib/module/hooks/use-morph-motion.js.map +1 -1
- package/lib/module/hooks/use-morph-text-style.js +4 -0
- package/lib/module/hooks/use-morph-text-style.js.map +1 -1
- package/lib/module/hooks/use-numeric-lanes.js +1 -0
- package/lib/module/hooks/use-numeric-lanes.js.map +1 -1
- package/lib/module/hooks/use-text-glyphs.js +28 -7
- package/lib/module/hooks/use-text-glyphs.js.map +1 -1
- package/lib/module/index.js +60 -12
- package/lib/module/index.js.map +1 -1
- package/lib/module/model/display-units.js +7 -1
- package/lib/module/model/display-units.js.map +1 -1
- package/lib/module/model/numeric-lanes.js +5 -0
- package/lib/module/model/numeric-lanes.js.map +1 -1
- package/lib/module/model/text-keys.js +4 -0
- package/lib/module/model/text-keys.js.map +1 -1
- package/lib/module/motion/entry-exit-builders.js +75 -0
- package/lib/module/motion/entry-exit-builders.js.map +1 -1
- package/lib/module/motion/preset-map.js +7 -0
- package/lib/module/motion/preset-map.js.map +1 -1
- package/lib/module/view/glyph-run.js +34 -3
- package/lib/module/view/glyph-run.js.map +1 -1
- package/lib/module/view/morph-viewport.js +33 -3
- package/lib/module/view/morph-viewport.js.map +1 -1
- package/lib/module/view/number-lane.js +5 -1
- package/lib/module/view/number-lane.js.map +1 -1
- package/lib/module/view/number-run.js +17 -1
- package/lib/module/view/number-run.js.map +1 -1
- package/lib/module/view/slots-run.js +253 -0
- package/lib/module/view/slots-run.js.map +1 -0
- package/lib/module/view/text-run.js +38 -4
- package/lib/module/view/text-run.js.map +1 -1
- package/lib/typescript/commonjs/hooks/use-display-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/use-inline-auto-width.d.ts +3 -1
- package/lib/typescript/commonjs/hooks/use-inline-auto-width.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/use-morph-motion.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/use-morph-text-style.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/use-numeric-lanes.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/use-text-glyphs.d.ts +2 -1
- package/lib/typescript/commonjs/hooks/use-text-glyphs.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/model/display-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/model/numeric-lanes.d.ts.map +1 -1
- package/lib/typescript/commonjs/model/text-keys.d.ts.map +1 -1
- package/lib/typescript/commonjs/motion/entry-exit-builders.d.ts +13 -0
- package/lib/typescript/commonjs/motion/entry-exit-builders.d.ts.map +1 -1
- package/lib/typescript/commonjs/motion/preset-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/types.d.ts +14 -2
- package/lib/typescript/commonjs/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/view/glyph-run.d.ts +7 -3
- package/lib/typescript/commonjs/view/glyph-run.d.ts.map +1 -1
- package/lib/typescript/commonjs/view/morph-viewport.d.ts +3 -1
- package/lib/typescript/commonjs/view/morph-viewport.d.ts.map +1 -1
- package/lib/typescript/commonjs/view/number-lane.d.ts.map +1 -1
- package/lib/typescript/commonjs/view/number-run.d.ts +3 -2
- package/lib/typescript/commonjs/view/number-run.d.ts.map +1 -1
- package/lib/typescript/commonjs/view/slots-run.d.ts +15 -0
- package/lib/typescript/commonjs/view/slots-run.d.ts.map +1 -0
- package/lib/typescript/commonjs/view/text-run.d.ts +7 -2
- package/lib/typescript/commonjs/view/text-run.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-display-units.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-inline-auto-width.d.ts +3 -1
- package/lib/typescript/module/hooks/use-inline-auto-width.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-morph-motion.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-morph-text-style.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-numeric-lanes.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-text-glyphs.d.ts +2 -1
- package/lib/typescript/module/hooks/use-text-glyphs.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -3
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/model/display-units.d.ts.map +1 -1
- package/lib/typescript/module/model/numeric-lanes.d.ts.map +1 -1
- package/lib/typescript/module/model/text-keys.d.ts.map +1 -1
- package/lib/typescript/module/motion/entry-exit-builders.d.ts +13 -0
- package/lib/typescript/module/motion/entry-exit-builders.d.ts.map +1 -1
- package/lib/typescript/module/motion/preset-map.d.ts.map +1 -1
- package/lib/typescript/module/types.d.ts +14 -2
- package/lib/typescript/module/types.d.ts.map +1 -1
- package/lib/typescript/module/view/glyph-run.d.ts +7 -3
- package/lib/typescript/module/view/glyph-run.d.ts.map +1 -1
- package/lib/typescript/module/view/morph-viewport.d.ts +3 -1
- package/lib/typescript/module/view/morph-viewport.d.ts.map +1 -1
- package/lib/typescript/module/view/number-lane.d.ts.map +1 -1
- package/lib/typescript/module/view/number-run.d.ts +3 -2
- package/lib/typescript/module/view/number-run.d.ts.map +1 -1
- package/lib/typescript/module/view/slots-run.d.ts +15 -0
- package/lib/typescript/module/view/slots-run.d.ts.map +1 -0
- package/lib/typescript/module/view/text-run.d.ts +7 -2
- package/lib/typescript/module/view/text-run.d.ts.map +1 -1
- package/package.json +11 -2
- package/src/hooks/use-display-units.ts +1 -0
- package/src/hooks/use-inline-auto-width.ts +55 -12
- package/src/hooks/use-morph-motion.ts +2 -1
- package/src/hooks/use-morph-text-style.ts +3 -0
- package/src/hooks/use-numeric-lanes.ts +1 -0
- package/src/hooks/use-text-glyphs.ts +48 -10
- package/src/index.tsx +103 -17
- package/src/model/display-units.ts +4 -1
- package/src/model/numeric-lanes.ts +3 -0
- package/src/model/text-keys.ts +3 -0
- package/src/motion/entry-exit-builders.ts +73 -0
- package/src/motion/preset-map.ts +4 -0
- package/src/types.ts +16 -2
- package/src/view/glyph-run.tsx +48 -15
- package/src/view/morph-viewport.tsx +28 -3
- package/src/view/number-lane.tsx +7 -2
- package/src/view/number-run.tsx +13 -2
- package/src/view/slots-run.tsx +385 -0
- package/src/view/text-run.tsx +80 -7
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
3
|
import type { ComplexAnimationBuilder, EntryExitAnimationFunction } from "react-native-reanimated";
|
|
4
|
-
import type { GlyphToken } from "../types";
|
|
5
|
-
export declare const GlyphRun: React.MemoExoticComponent<({ glyphs, layoutTransition, enterTransition, exitTransition, textStyle, className, }: Readonly<{
|
|
4
|
+
import type { GlyphToken, LaminarAlign } from "../types";
|
|
5
|
+
export declare const GlyphRun: React.MemoExoticComponent<({ glyphs, layoutTransition, enterTransition, elementEnterTransition, exitTransition, elementExitTransition, leadingGap, align, textStyle, className, }: Readonly<{
|
|
6
6
|
glyphs: readonly GlyphToken[];
|
|
7
|
-
layoutTransition
|
|
7
|
+
layoutTransition?: ComplexAnimationBuilder;
|
|
8
8
|
enterTransition?: EntryExitAnimationFunction;
|
|
9
|
+
elementEnterTransition?: EntryExitAnimationFunction;
|
|
9
10
|
exitTransition?: EntryExitAnimationFunction;
|
|
11
|
+
elementExitTransition?: EntryExitAnimationFunction;
|
|
12
|
+
leadingGap?: number;
|
|
13
|
+
align: LaminarAlign;
|
|
10
14
|
textStyle?: StyleProp<TextStyle>;
|
|
11
15
|
className?: string;
|
|
12
16
|
}>) => React.JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyph-run.d.ts","sourceRoot":"","sources":["../../../../src/view/glyph-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"glyph-run.d.ts","sourceRoot":"","sources":["../../../../src/view/glyph-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAezD,eAAO,MAAM,QAAQ,qLAYhB,QAAQ,CAAC;IACV,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;IAC3C,eAAe,CAAC,EAAE,0BAA0B,CAAC;IAC7C,sBAAsB,CAAC,EAAE,0BAA0B,CAAC;IACpD,cAAc,CAAC,EAAE,0BAA0B,CAAC;IAC5C,qBAAqB,CAAC,EAAE,0BAA0B,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,uBAmCH,CAAC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
3
|
import Animated from "react-native-reanimated";
|
|
4
|
+
import type { LaminarAlign } from "../types";
|
|
4
5
|
type MorphViewportProps = {
|
|
5
6
|
readonly autoSize: boolean;
|
|
6
7
|
readonly clipToBounds: boolean;
|
|
8
|
+
readonly align: LaminarAlign;
|
|
7
9
|
readonly containerStyle?: StyleProp<ViewStyle>;
|
|
8
10
|
readonly animatedWidthStyle?: React.ComponentProps<typeof Animated.View>["style"];
|
|
9
11
|
readonly measurement?: React.ReactNode;
|
|
10
12
|
readonly children: React.ReactNode;
|
|
11
13
|
};
|
|
12
|
-
export declare const MorphViewport: React.MemoExoticComponent<({ autoSize, clipToBounds, containerStyle, animatedWidthStyle, measurement, children, }: MorphViewportProps) => React.JSX.Element>;
|
|
14
|
+
export declare const MorphViewport: React.MemoExoticComponent<({ autoSize, clipToBounds, align, containerStyle, animatedWidthStyle, measurement, children, }: MorphViewportProps) => React.JSX.Element>;
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=morph-viewport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph-viewport.d.ts","sourceRoot":"","sources":["../../../../src/view/morph-viewport.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"morph-viewport.d.ts","sourceRoot":"","sources":["../../../../src/view/morph-viewport.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA4C7C,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE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;
|
|
1
|
+
{"version":3,"file":"number-lane.d.ts","sourceRoot":"","sources":["../../../../src/view/number-lane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpE,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAiBnE,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,UAAU,+IAYlB,eAAe,uBAqFnB,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
|
-
import type { MotionRecipe } from "../types";
|
|
3
|
+
import type { LaminarAlign, MotionRecipe } from "../types";
|
|
4
4
|
type NumberRunProps = {
|
|
5
5
|
readonly value: string;
|
|
6
6
|
readonly motionRecipe: MotionRecipe;
|
|
7
|
+
readonly align: LaminarAlign;
|
|
7
8
|
readonly fontSize?: number;
|
|
8
9
|
readonly textStyle?: StyleProp<TextStyle>;
|
|
9
10
|
readonly staggerMs: number;
|
|
10
11
|
readonly className?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const NumberRun: React.MemoExoticComponent<({ value, motionRecipe, fontSize, textStyle, staggerMs, className, }: Readonly<NumberRunProps>) => React.JSX.Element>;
|
|
13
|
+
export declare const NumberRun: React.MemoExoticComponent<({ value, motionRecipe, align, fontSize, textStyle, staggerMs, className, }: Readonly<NumberRunProps>) => React.JSX.Element>;
|
|
13
14
|
export {};
|
|
14
15
|
//# sourceMappingURL=number-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-run.d.ts","sourceRoot":"","sources":["../../../../src/view/number-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"number-run.d.ts","sourceRoot":"","sources":["../../../../src/view/number-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAe3D,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,SAAS,yGASjB,QAAQ,CAAC,cAAc,CAAC,uBA8C5B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
|
+
import type { LaminarAlign, MotionRecipe } from "../types";
|
|
4
|
+
type SlotsRunProps = {
|
|
5
|
+
readonly value: string;
|
|
6
|
+
readonly motionRecipe: MotionRecipe;
|
|
7
|
+
readonly align: LaminarAlign;
|
|
8
|
+
readonly fontSize?: number;
|
|
9
|
+
readonly textStyle?: StyleProp<TextStyle>;
|
|
10
|
+
readonly staggerMs: number;
|
|
11
|
+
readonly className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const SlotsRun: React.MemoExoticComponent<({ value, motionRecipe, align, fontSize, textStyle, staggerMs, className, }: Readonly<SlotsRunProps>) => React.JSX.Element>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=slots-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slots-run.d.ts","sourceRoot":"","sources":["../../../../src/view/slots-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAwB,MAAM,UAAU,CAAC;AAmQjF,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,QAAQ,yGAShB,QAAQ,CAAC,aAAa,CAAC,uBAwF3B,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
2
3
|
import type { StyleProp, TextStyle } from "react-native";
|
|
3
|
-
import type { MotionRecipe } from "../types";
|
|
4
|
+
import type { LaminarAlign, MotionRecipe } from "../types";
|
|
4
5
|
type TextRunProps = {
|
|
5
6
|
readonly value: string;
|
|
6
7
|
readonly motionRecipe: MotionRecipe;
|
|
8
|
+
readonly align: LaminarAlign;
|
|
9
|
+
readonly leading?: ReactNode;
|
|
10
|
+
readonly leadingKey?: string | number;
|
|
11
|
+
readonly leadingGap?: number;
|
|
7
12
|
readonly textStyle?: StyleProp<TextStyle>;
|
|
8
13
|
readonly className?: string;
|
|
9
14
|
};
|
|
10
|
-
export declare const TextRun: React.MemoExoticComponent<({ value, motionRecipe, textStyle, className }: TextRunProps) => React.JSX.Element>;
|
|
15
|
+
export declare const TextRun: React.MemoExoticComponent<({ value, motionRecipe, align, leading, leadingKey, leadingGap, textStyle, className, }: TextRunProps) => React.JSX.Element>;
|
|
11
16
|
export {};
|
|
12
17
|
//# sourceMappingURL=text-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-run.d.ts","sourceRoot":"","sources":["../../../../src/view/text-run.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"text-run.d.ts","sourceRoot":"","sources":["../../../../src/view/text-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG3D,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,OAAO,qHAUf,YAAY,uBA8EhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-display-units.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-display-units.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-display-units.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-display-units.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,EACb,iBAAc,KACb,SAAS,MAAM,EAQf,CAAC"}
|
|
@@ -2,14 +2,16 @@ import type { LayoutChangeEvent } from "react-native";
|
|
|
2
2
|
type Params = {
|
|
3
3
|
enabled: boolean;
|
|
4
4
|
driveToWidth: (toValue: number) => number;
|
|
5
|
+
measurementKey: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const useInlineAutoWidth: ({ enabled, driveToWidth }: Params) => {
|
|
7
|
+
export declare const useInlineAutoWidth: ({ enabled, driveToWidth, measurementKey, }: Params) => {
|
|
7
8
|
captureLayout: (event: LayoutChangeEvent) => void;
|
|
8
9
|
animatedWidthStyle: {
|
|
9
10
|
width: number;
|
|
10
11
|
} | {
|
|
11
12
|
width?: undefined;
|
|
12
13
|
};
|
|
14
|
+
shouldMeasure: boolean;
|
|
13
15
|
};
|
|
14
16
|
export {};
|
|
15
17
|
//# sourceMappingURL=use-inline-auto-width.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-inline-auto-width.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-inline-auto-width.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,KAAK,MAAM,GAAG;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"use-inline-auto-width.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-inline-auto-width.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,KAAK,MAAM,GAAG;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAKF,eAAO,MAAM,kBAAkB,GAAI,4CAIhC,MAAM;2BA6BG,iBAAiB;;;;;;;CAqD5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-morph-motion.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-morph-motion.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,KAAK,MAAM,GAAG;IACZ,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"use-morph-motion.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-morph-motion.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,KAAK,MAAM,GAAG;IACZ,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,2DAK5B,MAAM,KAAG,WAcX,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-morph-text-style.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-morph-text-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,KAAK,MAAM,GAAG;IACZ,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC1C,CAAC;
|
|
1
|
+
{"version":3,"file":"use-morph-text-style.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-morph-text-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,KAAK,MAAM,GAAG;IACZ,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC1C,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,wCAK/B,MAAM,KAAG,cA2BX,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-numeric-lanes.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-numeric-lanes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAcrD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"use-numeric-lanes.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-numeric-lanes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAcrD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,mBAgC/C,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import type { GlyphToken } from "../types";
|
|
2
|
-
export declare const useTextGlyphs: (value: string, namespace: string) => readonly GlyphToken[];
|
|
3
|
+
export declare const useTextGlyphs: (value: string, namespace: string, leading?: ReactNode, leadingKey?: string | number) => readonly GlyphToken[];
|
|
3
4
|
//# sourceMappingURL=use-text-glyphs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-text-glyphs.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-text-glyphs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-text-glyphs.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-text-glyphs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAc3C,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,EACb,WAAW,MAAM,EACjB,UAAU,SAAS,EACnB,aAAa,MAAM,GAAG,MAAM,KAC3B,SAAS,UAAU,EAoErB,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { MorphingTextProps } from "./types";
|
|
3
3
|
export declare const Laminar: React.NamedExoticComponent<Readonly<MorphingTextProps>>;
|
|
4
|
-
export
|
|
5
|
-
export default Laminar;
|
|
6
|
-
export type { LaminarProps, MorphAnimationPresetName, MorphContentVariant, MorphingTextProps, } from "./types";
|
|
4
|
+
export type { LaminarAlign, LaminarLeadingMap, LaminarProps, MorphAnimationPresetName, MorphContentVariant, MorphingTextProps, } from "./types";
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAOpE,eAAO,MAAM,OAAO,yDAqJhB,CAAC;AAcL,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-units.d.ts","sourceRoot":"","sources":["../../../../src/model/display-units.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"display-units.d.ts","sourceRoot":"","sources":["../../../../src/model/display-units.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,MAAM,EASvD,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,WACrB,CAAC;AAG7B,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,YAA+B,CAAC;AAGzE,eAAO,MAAM,qBAAqB,GAAI,OAAO,SAAS,MAAM,EAAE,WAI7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeric-lanes.d.ts","sourceRoot":"","sources":["../../../../src/model/numeric-lanes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"numeric-lanes.d.ts","sourceRoot":"","sources":["../../../../src/model/numeric-lanes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAiBrD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;CAC1C,CAAC;AAGF,eAAO,MAAM,qBAAqB,GAChC,eAAe,MAAM,EACrB,WAAW,MAAM,EACjB,cAAc,SAAS,MAAM,EAAE,EAC/B,MAAM,MAAM,KACX,mBAqDF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-keys.d.ts","sourceRoot":"","sources":["../../../../src/model/text-keys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-keys.d.ts","sourceRoot":"","sources":["../../../../src/model/text-keys.ts"],"names":[],"mappings":"AAqDA,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAGF,eAAO,MAAM,sBAAsB,GACjC,eAAe,SAAS,MAAM,EAAE,EAChC,WAAW,SAAS,MAAM,EAAE,EAC5B,cAAc,SAAS,MAAM,EAAE,EAC/B,MAAM,MAAM,EACZ,WAAW,MAAM,KAChB,wBA4DF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type EntryExitAnimationFunction, type WithTimingConfig } from "react-native-reanimated";
|
|
2
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
2
3
|
type TransitionParams = {
|
|
3
4
|
readonly delayMs?: number;
|
|
4
5
|
readonly durationMs: number;
|
|
@@ -10,6 +11,18 @@ type TransitionParams = {
|
|
|
10
11
|
readonly fromScale: number;
|
|
11
12
|
readonly toScale: number;
|
|
12
13
|
};
|
|
14
|
+
type LeadingExitTransitionParams = {
|
|
15
|
+
readonly durationMs: number;
|
|
16
|
+
readonly easing: NonNullable<WithTimingConfig["easing"]>;
|
|
17
|
+
readonly leadingGap: number;
|
|
18
|
+
readonly scale?: boolean | SharedValue<number>;
|
|
19
|
+
};
|
|
20
|
+
type LeadingEnterTransitionParams = {
|
|
21
|
+
readonly durationMs: number;
|
|
22
|
+
readonly easing: NonNullable<WithTimingConfig["easing"]>;
|
|
23
|
+
};
|
|
24
|
+
export declare const createLeadingEnterTransition: ({ durationMs, easing, }: LeadingEnterTransitionParams) => EntryExitAnimationFunction;
|
|
13
25
|
export declare const createShiftTransition: ({ delayMs, durationMs, easing, fromOpacity, toOpacity, fromTranslateY, toTranslateY, fromScale, toScale, }: TransitionParams) => EntryExitAnimationFunction;
|
|
26
|
+
export declare const createLeadingExitTransition: ({ durationMs, easing, leadingGap, scale, }: LeadingExitTransitionParams) => EntryExitAnimationFunction;
|
|
14
27
|
export {};
|
|
15
28
|
//# sourceMappingURL=entry-exit-builders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-exit-builders.d.ts","sourceRoot":"","sources":["../../../../src/motion/entry-exit-builders.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,
|
|
1
|
+
{"version":3,"file":"entry-exit-builders.d.ts","sourceRoot":"","sources":["../../../../src/motion/entry-exit-builders.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,gBAAgB,EAGtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,M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
|
|
1
|
+
{"version":3,"file":"preset-map.d.ts","sourceRoot":"","sources":["../../../../src/motion/preset-map.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,wBAAwB,EACxB,oBAAoB,CAqBZ,CAAC;AAiCX,eAAO,MAAM,mBAAmB,GAC9B,aAAY,wBAAoC,EAChD,mBAAmB,MAAM,KACxB,YAqDF,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
1
2
|
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
3
|
import type { ComplexAnimationBuilder, EntryExitAnimationFunction, WithTimingConfig } from "react-native-reanimated";
|
|
3
4
|
export type MorphAnimationPresetName = "default" | "smooth" | "snappy" | "bouncy";
|
|
4
|
-
export type MorphContentVariant = "text" | "number";
|
|
5
|
+
export type MorphContentVariant = "text" | "number" | "slots";
|
|
6
|
+
export type LaminarAlign = "left" | "center" | "right";
|
|
7
|
+
export type LaminarLeadingMap = Readonly<Record<string, ReactNode>>;
|
|
5
8
|
type CubicBezierTuple = readonly [number, number, number, number];
|
|
6
9
|
export type MorphAnimationPreset = {
|
|
7
10
|
readonly duration: number;
|
|
@@ -13,7 +16,9 @@ export type MorphAnimationPreset = {
|
|
|
13
16
|
};
|
|
14
17
|
export type GlyphToken = {
|
|
15
18
|
readonly id: string;
|
|
16
|
-
readonly
|
|
19
|
+
readonly kind: "text" | "element";
|
|
20
|
+
readonly value?: string;
|
|
21
|
+
readonly element?: ReactNode;
|
|
17
22
|
};
|
|
18
23
|
export type NumericFlowDirection = -1 | 0 | 1;
|
|
19
24
|
export type MotionRecipe = {
|
|
@@ -29,7 +34,14 @@ export type MorphingTextProps = {
|
|
|
29
34
|
readonly variant?: MorphContentVariant;
|
|
30
35
|
readonly fontSize?: number;
|
|
31
36
|
readonly color?: string;
|
|
37
|
+
readonly align?: LaminarAlign;
|
|
32
38
|
readonly className?: string;
|
|
39
|
+
/** optional inline element reconciled and animated as the leading token */
|
|
40
|
+
readonly leading?: ReactNode | LaminarLeadingMap;
|
|
41
|
+
/** identity for swapping one leading element for another */
|
|
42
|
+
readonly leadingKey?: string | number;
|
|
43
|
+
/** spacing between the leading element and the first text glyph */
|
|
44
|
+
readonly leadingGap?: number;
|
|
33
45
|
readonly style?: StyleProp<TextStyle>;
|
|
34
46
|
readonly containerStyle?: StyleProp<ViewStyle>;
|
|
35
47
|
readonly fontStyle?: StyleProp<TextStyle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;A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ilder, EntryExitAnimationFunction } from "react-native-reanimated";
|
|
4
|
-
import type { GlyphToken } from "../types";
|
|
5
|
-
export declare const GlyphRun: React.MemoExoticComponent<({ glyphs, layoutTransition, enterTransition, exitTransition, textStyle, className, }: Readonly<{
|
|
4
|
+
import type { GlyphToken, LaminarAlign } from "../types";
|
|
5
|
+
export declare const GlyphRun: React.MemoExoticComponent<({ glyphs, layoutTransition, enterTransition, elementEnterTransition, exitTransition, elementExitTransition, leadingGap, align, textStyle, className, }: Readonly<{
|
|
6
6
|
glyphs: readonly GlyphToken[];
|
|
7
|
-
layoutTransition
|
|
7
|
+
layoutTransition?: ComplexAnimationBuilder;
|
|
8
8
|
enterTransition?: EntryExitAnimationFunction;
|
|
9
|
+
elementEnterTransition?: EntryExitAnimationFunction;
|
|
9
10
|
exitTransition?: EntryExitAnimationFunction;
|
|
11
|
+
elementExitTransition?: EntryExitAnimationFunction;
|
|
12
|
+
leadingGap?: number;
|
|
13
|
+
align: LaminarAlign;
|
|
10
14
|
textStyle?: StyleProp<TextStyle>;
|
|
11
15
|
className?: string;
|
|
12
16
|
}>) => React.JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyph-run.d.ts","sourceRoot":"","sources":["../../../../src/view/glyph-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"glyph-run.d.ts","sourceRoot":"","sources":["../../../../src/view/glyph-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAezD,eAAO,MAAM,QAAQ,qLAYhB,QAAQ,CAAC;IACV,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;IAC3C,eAAe,CAAC,EAAE,0BAA0B,CAAC;IAC7C,sBAAsB,CAAC,EAAE,0BAA0B,CAAC;IACpD,cAAc,CAAC,EAAE,0BAA0B,CAAC;IAC5C,qBAAqB,CAAC,EAAE,0BAA0B,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,uBAmCH,CAAC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
3
|
import Animated from "react-native-reanimated";
|
|
4
|
+
import type { LaminarAlign } from "../types";
|
|
4
5
|
type MorphViewportProps = {
|
|
5
6
|
readonly autoSize: boolean;
|
|
6
7
|
readonly clipToBounds: boolean;
|
|
8
|
+
readonly align: LaminarAlign;
|
|
7
9
|
readonly containerStyle?: StyleProp<ViewStyle>;
|
|
8
10
|
readonly animatedWidthStyle?: React.ComponentProps<typeof Animated.View>["style"];
|
|
9
11
|
readonly measurement?: React.ReactNode;
|
|
10
12
|
readonly children: React.ReactNode;
|
|
11
13
|
};
|
|
12
|
-
export declare const MorphViewport: React.MemoExoticComponent<({ autoSize, clipToBounds, containerStyle, animatedWidthStyle, measurement, children, }: MorphViewportProps) => React.JSX.Element>;
|
|
14
|
+
export declare const MorphViewport: React.MemoExoticComponent<({ autoSize, clipToBounds, align, containerStyle, animatedWidthStyle, measurement, children, }: MorphViewportProps) => React.JSX.Element>;
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=morph-viewport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph-viewport.d.ts","sourceRoot":"","sources":["../../../../src/view/morph-viewport.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"morph-viewport.d.ts","sourceRoot":"","sources":["../../../../src/view/morph-viewport.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA4C7C,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;IAClF,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,CAAC;AAGF,eAAO,MAAM,aAAa,4HASrB,kBAAkB,uBAqCtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-lane.d.ts","sourceRoot":"","sources":["../../../../src/view/number-lane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpE,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAiBnE,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"number-lane.d.ts","sourceRoot":"","sources":["../../../../src/view/number-lane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpE,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAiBnE,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,UAAU,+IAYlB,eAAe,uBAqFnB,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
|
-
import type { MotionRecipe } from "../types";
|
|
3
|
+
import type { LaminarAlign, MotionRecipe } from "../types";
|
|
4
4
|
type NumberRunProps = {
|
|
5
5
|
readonly value: string;
|
|
6
6
|
readonly motionRecipe: MotionRecipe;
|
|
7
|
+
readonly align: LaminarAlign;
|
|
7
8
|
readonly fontSize?: number;
|
|
8
9
|
readonly textStyle?: StyleProp<TextStyle>;
|
|
9
10
|
readonly staggerMs: number;
|
|
10
11
|
readonly className?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const NumberRun: React.MemoExoticComponent<({ value, motionRecipe, fontSize, textStyle, staggerMs, className, }: Readonly<NumberRunProps>) => React.JSX.Element>;
|
|
13
|
+
export declare const NumberRun: React.MemoExoticComponent<({ value, motionRecipe, align, fontSize, textStyle, staggerMs, className, }: Readonly<NumberRunProps>) => React.JSX.Element>;
|
|
13
14
|
export {};
|
|
14
15
|
//# sourceMappingURL=number-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-run.d.ts","sourceRoot":"","sources":["../../../../src/view/number-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"number-run.d.ts","sourceRoot":"","sources":["../../../../src/view/number-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAe3D,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,SAAS,yGASjB,QAAQ,CAAC,cAAc,CAAC,uBA8C5B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
|
+
import type { LaminarAlign, MotionRecipe } from "../types";
|
|
4
|
+
type SlotsRunProps = {
|
|
5
|
+
readonly value: string;
|
|
6
|
+
readonly motionRecipe: MotionRecipe;
|
|
7
|
+
readonly align: LaminarAlign;
|
|
8
|
+
readonly fontSize?: number;
|
|
9
|
+
readonly textStyle?: StyleProp<TextStyle>;
|
|
10
|
+
readonly staggerMs: number;
|
|
11
|
+
readonly className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const SlotsRun: React.MemoExoticComponent<({ value, motionRecipe, align, fontSize, textStyle, staggerMs, className, }: Readonly<SlotsRunProps>) => React.JSX.Element>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=slots-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slots-run.d.ts","sourceRoot":"","sources":["../../../../src/view/slots-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAwB,MAAM,UAAU,CAAC;AAmQjF,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,QAAQ,yGAShB,QAAQ,CAAC,aAAa,CAAC,uBAwF3B,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
2
3
|
import type { StyleProp, TextStyle } from "react-native";
|
|
3
|
-
import type { MotionRecipe } from "../types";
|
|
4
|
+
import type { LaminarAlign, MotionRecipe } from "../types";
|
|
4
5
|
type TextRunProps = {
|
|
5
6
|
readonly value: string;
|
|
6
7
|
readonly motionRecipe: MotionRecipe;
|
|
8
|
+
readonly align: LaminarAlign;
|
|
9
|
+
readonly leading?: ReactNode;
|
|
10
|
+
readonly leadingKey?: string | number;
|
|
11
|
+
readonly leadingGap?: number;
|
|
7
12
|
readonly textStyle?: StyleProp<TextStyle>;
|
|
8
13
|
readonly className?: string;
|
|
9
14
|
};
|
|
10
|
-
export declare const TextRun: React.MemoExoticComponent<({ value, motionRecipe, textStyle, className }: TextRunProps) => React.JSX.Element>;
|
|
15
|
+
export declare const TextRun: React.MemoExoticComponent<({ value, motionRecipe, align, leading, leadingKey, leadingGap, textStyle, className, }: TextRunProps) => React.JSX.Element>;
|
|
11
16
|
export {};
|
|
12
17
|
//# sourceMappingURL=text-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-run.d.ts","sourceRoot":"","sources":["../../../../src/view/text-run.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"text-run.d.ts","sourceRoot":"","sources":["../../../../src/view/text-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG3D,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,OAAO,qHAUf,YAAY,uBA8EhB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-laminar",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "A React Native component for morphing text and numbers with character-level identity.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"react-native": "./src/index.tsx",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
+
"react-native": "./src/index.tsx",
|
|
25
|
+
"source": "./src/index.tsx",
|
|
24
26
|
"import": {
|
|
25
27
|
"types": "./lib/typescript/module/index.d.ts",
|
|
26
28
|
"default": "./lib/module/index.js"
|
|
@@ -37,7 +39,14 @@
|
|
|
37
39
|
],
|
|
38
40
|
"scripts": {
|
|
39
41
|
"build": "bob build",
|
|
40
|
-
"prepare": "bob build"
|
|
42
|
+
"prepare": "bob build",
|
|
43
|
+
"test": "jest --config jest.config.js --runInBand",
|
|
44
|
+
"test:watch": "jest --config jest.config.js --watch",
|
|
45
|
+
"test:coverage": "jest --config jest.config.js --runInBand --coverage && node scripts/check-coverage.js",
|
|
46
|
+
"test:ci": "jest --config jest.config.js --runInBand --ci --coverage && node scripts/check-coverage.js",
|
|
47
|
+
"typecheck": "tsc --project tsconfig.test.json --noEmit",
|
|
48
|
+
"pack:check": "npm pack --dry-run --cache ./coverage/npm-cache",
|
|
49
|
+
"quality": "npm run typecheck && npm run test:ci && npm run build && npm run pack:check"
|
|
41
50
|
},
|
|
42
51
|
"sideEffects": false,
|
|
43
52
|
"peerDependencies": {
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
import { useCallback, useRef, useState } from "react";
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
2
|
import type { LayoutChangeEvent } from "react-native";
|
|
3
3
|
import { useAnimatedStyle, useSharedValue } from "react-native-reanimated";
|
|
4
4
|
|
|
5
5
|
type Params = {
|
|
6
6
|
enabled: boolean;
|
|
7
7
|
driveToWidth: (toValue: number) => number;
|
|
8
|
+
measurementKey: string;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
const WIDTH_CACHE_LIMIT = 64;
|
|
12
|
+
|
|
13
|
+
// measure each content signature once and drive later changes through one width value
|
|
14
|
+
export const useInlineAutoWidth = ({
|
|
15
|
+
enabled,
|
|
16
|
+
driveToWidth,
|
|
17
|
+
measurementKey,
|
|
18
|
+
}: Params) => {
|
|
11
19
|
const widthValue = useSharedValue(0);
|
|
12
20
|
const measuredWidthRef = useRef<number | null>(null);
|
|
13
21
|
const bootstrappedRef = useRef(false);
|
|
22
|
+
const widthCacheRef = useRef(new Map<string, number>());
|
|
14
23
|
const [hasBootstrappedWidth, setHasBootstrappedWidth] = useState(false);
|
|
15
24
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const nextWidth = Math.max(0, Math.ceil(event.nativeEvent.layout.width));
|
|
23
|
-
|
|
25
|
+
// the first measurement establishes the shell without animating from zero
|
|
26
|
+
const applyWidth = useCallback(
|
|
27
|
+
(nextWidth: number) => {
|
|
24
28
|
if (measuredWidthRef.current === nextWidth) {
|
|
25
29
|
return;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
measuredWidthRef.current = nextWidth;
|
|
29
33
|
|
|
30
|
-
// snap the first width so mount does not animate from zero
|
|
31
34
|
if (!bootstrappedRef.current) {
|
|
32
35
|
bootstrappedRef.current = true;
|
|
33
36
|
widthValue.value = nextWidth;
|
|
@@ -37,9 +40,48 @@ export const useInlineAutoWidth = ({ enabled, driveToWidth }: Params) => {
|
|
|
37
40
|
|
|
38
41
|
widthValue.value = driveToWidth(nextWidth);
|
|
39
42
|
},
|
|
40
|
-
[driveToWidth,
|
|
43
|
+
[driveToWidth, widthValue]
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const captureLayout = useCallback(
|
|
47
|
+
(event: LayoutChangeEvent) => {
|
|
48
|
+
if (!enabled) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// round up so fractional native measurements cannot clip the final glyph
|
|
53
|
+
const nextWidth = Math.max(0, Math.ceil(event.nativeEvent.layout.width));
|
|
54
|
+
|
|
55
|
+
// delete before setting so a repeated key moves to the most recent position
|
|
56
|
+
widthCacheRef.current.delete(measurementKey);
|
|
57
|
+
|
|
58
|
+
if (widthCacheRef.current.size >= WIDTH_CACHE_LIMIT) {
|
|
59
|
+
// map insertion order gives the lru entry at the front
|
|
60
|
+
const oldestKey = widthCacheRef.current.keys().next().value;
|
|
61
|
+
|
|
62
|
+
if (oldestKey !== undefined) {
|
|
63
|
+
widthCacheRef.current.delete(oldestKey);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
widthCacheRef.current.set(measurementKey, nextWidth);
|
|
68
|
+
applyWidth(nextWidth);
|
|
69
|
+
},
|
|
70
|
+
[applyWidth, enabled, measurementKey]
|
|
41
71
|
);
|
|
42
72
|
|
|
73
|
+
const cachedWidth = widthCacheRef.current.get(measurementKey);
|
|
74
|
+
|
|
75
|
+
// a cached width can restore the shell before the hidden probe renders again
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
if (enabled && cachedWidth !== undefined) {
|
|
78
|
+
// promote cache hits so active states stay available longer
|
|
79
|
+
widthCacheRef.current.delete(measurementKey);
|
|
80
|
+
widthCacheRef.current.set(measurementKey, cachedWidth);
|
|
81
|
+
applyWidth(cachedWidth);
|
|
82
|
+
}
|
|
83
|
+
}, [applyWidth, cachedWidth, enabled, measurementKey]);
|
|
84
|
+
|
|
43
85
|
const animatedWidthStyle = useAnimatedStyle(
|
|
44
86
|
() =>
|
|
45
87
|
enabled && hasBootstrappedWidth
|
|
@@ -53,5 +95,6 @@ export const useInlineAutoWidth = ({ enabled, driveToWidth }: Params) => {
|
|
|
53
95
|
return {
|
|
54
96
|
captureLayout,
|
|
55
97
|
animatedWidthStyle,
|
|
98
|
+
shouldMeasure: enabled && cachedWidth === undefined,
|
|
56
99
|
};
|
|
57
100
|
};
|