@mappedin/viewer 0.30.6 → 0.30.7-ec2bc30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11385 -11333
- package/dist/types/src/components/common/typography.d.ts +15 -0
- package/dist/types/src/components/common/typography.stories.d.ts +2 -0
- package/dist/types/src/lib/hooks/use-debounced-value.d.ts +2 -0
- package/dist/types/src/lib/hooks/use-debounced-value.test.d.ts +1 -0
- package/dist/types/src/lib/hooks/use-previous.d.ts +5 -0
- package/dist/types/src/lib/hooks/use-previous.test.d.ts +1 -0
- package/dist/types/src/lib/hooks/use-responsive-size.d.ts +9 -0
- package/dist/types/src/lib/hooks/use-size.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TTheme } from '../../lib/types/theme';
|
|
2
|
+
import { ComponentProps, PropsWithChildren } from 'react';
|
|
2
3
|
type TFontProps = {
|
|
3
4
|
theme?: TTheme;
|
|
4
5
|
strokeWidth?: number;
|
|
@@ -9,9 +10,23 @@ type TFontProps = {
|
|
|
9
10
|
export declare const fontStyle: import("styled-components").RuleSet<TFontProps>;
|
|
10
11
|
export declare const textwrapStyle: import("styled-components").RuleSet<object>;
|
|
11
12
|
export declare const Text: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, TFontProps>>;
|
|
13
|
+
/**
|
|
14
|
+
* Style a substring within a string a different color.
|
|
15
|
+
*/
|
|
12
16
|
export declare const PartialHighlight: React.FC<TFontProps & {
|
|
13
17
|
substr?: string | string[];
|
|
14
18
|
str: string;
|
|
15
19
|
style?: React.CSSProperties;
|
|
16
20
|
}>;
|
|
21
|
+
type TDynamicallySizedTextProps = {
|
|
22
|
+
textProps?: Omit<ComponentProps<typeof Text>, 'children'>;
|
|
23
|
+
width: number | string;
|
|
24
|
+
maxFontSize?: number;
|
|
25
|
+
minFontSize?: number;
|
|
26
|
+
debug?: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Dynamically size text to fit within a container.
|
|
30
|
+
*/
|
|
31
|
+
export declare const DynamicallySizedText: React.FC<PropsWithChildren<TDynamicallySizedTextProps>>;
|
|
17
32
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
type TUseSizeOptions = {
|
|
2
2
|
dependencies?: any[];
|
|
3
3
|
};
|
|
4
|
+
/**
|
|
5
|
+
* Read the size of a statically sized element. Optionally specify an array of dependencies
|
|
6
|
+
* to re-read the size when they change.
|
|
7
|
+
*
|
|
8
|
+
* To respond to continous size changes without a well defined set of dependencies, use
|
|
9
|
+
* {@link useResponsiveSize} instead.
|
|
10
|
+
*/
|
|
4
11
|
declare const useSize: ({ dependencies }?: TUseSizeOptions) => {
|
|
5
12
|
elementRef: (ref: unknown) => void;
|
|
6
13
|
width: number;
|