@fluentui-react-native/framework 0.16.1 → 0.17.2
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/.cache/tsconfig.tsbuildinfo +1 -1
- package/AGENTS.md +244 -0
- package/CHANGELOG.md +70 -0
- package/lib/compose.d.ts +1 -1
- package/lib/compose.d.ts.map +1 -1
- package/lib/compose.js +1 -1
- package/lib/compose.js.map +1 -1
- package/lib/compressible.d.ts +4 -4
- package/lib/compressible.d.ts.map +1 -1
- package/lib/compressible.js.map +1 -1
- package/lib/compressible.test.js +3 -4
- package/lib/compressible.test.js.map +1 -1
- package/lib/index.d.ts +13 -14
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -8
- package/lib/index.js.map +1 -1
- package/lib/themeHelper.d.ts +1 -1
- package/lib/themeHelper.d.ts.map +1 -1
- package/lib/themeHelper.js +1 -1
- package/lib/themeHelper.js.map +1 -1
- package/lib/useFluentTheme.d.ts +1 -1
- package/lib/useFluentTheme.d.ts.map +1 -1
- package/lib/useFluentTheme.js +1 -1
- package/lib/useFluentTheme.js.map +1 -1
- package/lib/useStyling.d.ts +1 -1
- package/lib/useStyling.d.ts.map +1 -1
- package/lib/useStyling.js +1 -1
- package/lib/useStyling.js.map +1 -1
- package/lib/useTokens.d.ts +2 -2
- package/lib/useTokens.d.ts.map +1 -1
- package/lib/useTokens.js +1 -1
- package/lib/useTokens.js.map +1 -1
- package/package.json +11 -13
- package/src/compose.ts +2 -2
- package/src/compressible.test.tsx +5 -6
- package/src/compressible.ts +7 -7
- package/src/index.ts +13 -14
- package/src/themeHelper.ts +2 -2
- package/src/useFluentTheme.ts +2 -2
- package/src/useStyling.ts +2 -2
- package/src/useTokens.ts +3 -3
package/lib/useTokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAMpH,MAAM,UAAU,cAAc,CAAU,GAAG,MAAgC;IACzE,OAAO,kBAAkB,CAAC,WAAW,CAAC,gBAAgB,EAAE,GAAG,MAAM,CAAC,CAAC;AACrE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "Component framework used by fluentui react native controls",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -22,9 +22,8 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "
|
|
25
|
+
"build": "tsc -b",
|
|
26
26
|
"clean": "fluentui-scripts clean",
|
|
27
|
-
"depcheck": "fluentui-scripts depcheck",
|
|
28
27
|
"format": "fluentui-scripts format",
|
|
29
28
|
"lint": "fluentui-scripts lint",
|
|
30
29
|
"start-test": "fluentui-scripts jest-watch",
|
|
@@ -33,15 +32,14 @@
|
|
|
33
32
|
"update-snapshots": "fluentui-scripts jest -u"
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
|
-
"@fluentui-react-native/composition": "0.
|
|
37
|
-
"@fluentui-react-native/default-theme": "0.27.
|
|
38
|
-
"@fluentui-react-native/
|
|
39
|
-
"@fluentui-react-native/
|
|
40
|
-
"@fluentui-react-native/tokens": "0.24.
|
|
41
|
-
"@fluentui-react-native/use-
|
|
42
|
-
"@fluentui-react-native/use-
|
|
43
|
-
"@fluentui-react-native/use-
|
|
44
|
-
"@fluentui-react-native/use-tokens": "0.8.1"
|
|
35
|
+
"@fluentui-react-native/composition": "0.14.2",
|
|
36
|
+
"@fluentui-react-native/default-theme": "0.27.8",
|
|
37
|
+
"@fluentui-react-native/design": "0.3.1",
|
|
38
|
+
"@fluentui-react-native/framework-base": "0.6.1",
|
|
39
|
+
"@fluentui-react-native/tokens": "0.24.8",
|
|
40
|
+
"@fluentui-react-native/use-slots": "0.13.2",
|
|
41
|
+
"@fluentui-react-native/use-styling": "0.16.2",
|
|
42
|
+
"@fluentui-react-native/use-tokens": "0.9.2"
|
|
45
43
|
},
|
|
46
44
|
"devDependencies": {
|
|
47
45
|
"@babel/core": "^7.20.0",
|
|
@@ -51,7 +49,7 @@
|
|
|
51
49
|
"@react-native-community/cli-platform-ios": "^20.0.0",
|
|
52
50
|
"@react-native/babel-preset": "^0.81.0",
|
|
53
51
|
"@react-native/metro-config": "^0.81.0",
|
|
54
|
-
"@rnx-kit/cli": "^2.0.
|
|
52
|
+
"@rnx-kit/cli": "^2.0.2",
|
|
55
53
|
"@types/react": "~19.1.4",
|
|
56
54
|
"@types/react-test-renderer": "^19.1.0",
|
|
57
55
|
"react": "19.1.4",
|
package/src/compose.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ComposeFactoryOptions, ComposeFactoryComponent, UseStyledSlots } from '@fluentui-react-native/composition';
|
|
2
2
|
import { composeFactory } from '@fluentui-react-native/composition';
|
|
3
|
-
import type { Theme } from '@fluentui-react-native/
|
|
3
|
+
import type { Theme } from '@fluentui-react-native/design/theming';
|
|
4
4
|
import type { ObjectBase } from '@fluentui-react-native/framework-base';
|
|
5
5
|
|
|
6
|
-
import { themeHelper } from './themeHelper
|
|
6
|
+
import { themeHelper } from './themeHelper';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* This is an object used purely for configuring the typings on composable. It is not necessary to define
|
|
@@ -4,15 +4,14 @@ import { act } from 'react';
|
|
|
4
4
|
import type { TextProps, TextStyle } from 'react-native';
|
|
5
5
|
import { Text, View } from 'react-native';
|
|
6
6
|
|
|
7
|
-
import { mergeStyles } from '@fluentui-react-native/framework-base';
|
|
8
|
-
import type { Theme } from '@fluentui-react-native/
|
|
9
|
-
import { useSlot } from '@fluentui-react-native/use-slot';
|
|
7
|
+
import { mergeStyles, useSlot } from '@fluentui-react-native/framework-base';
|
|
8
|
+
import type { Theme } from '@fluentui-react-native/design/theming';
|
|
10
9
|
import { applyTokenLayers } from '@fluentui-react-native/use-tokens';
|
|
11
10
|
import * as renderer from 'react-test-renderer';
|
|
12
11
|
|
|
13
|
-
import { compressible } from './compressible
|
|
14
|
-
import { buildUseTokens } from './useTokens
|
|
15
|
-
import type { UseTokens } from './useTokens
|
|
12
|
+
import { compressible } from './compressible';
|
|
13
|
+
import { buildUseTokens } from './useTokens';
|
|
14
|
+
import type { UseTokens } from './useTokens';
|
|
16
15
|
|
|
17
16
|
type Variant = 'normal' | 'header' | 'caption';
|
|
18
17
|
interface VariantTextTokens {
|
package/src/compressible.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Theme } from '@fluentui-react-native/
|
|
2
|
-
import type { StagedRender } from '@fluentui-react-native/framework-base';
|
|
1
|
+
import type { Theme } from '@fluentui-react-native/design/theming';
|
|
3
2
|
import { stagedComponent } from '@fluentui-react-native/framework-base';
|
|
4
3
|
import type { CustomizableComponent } from '@fluentui-react-native/use-tokens';
|
|
5
4
|
|
|
6
|
-
import type { TokenSettings } from './useStyling
|
|
7
|
-
import type { UseTokens } from './useTokens
|
|
5
|
+
import type { TokenSettings } from './useStyling';
|
|
6
|
+
import type { UseTokens } from './useTokens';
|
|
7
|
+
import type { LegacyFunctionComponent } from '@fluentui-react-native/framework-base';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
|
|
@@ -14,13 +14,13 @@ import type { UseTokens } from './useTokens.ts';
|
|
|
14
14
|
* @returns A tree compressed function component with the `.customize` method exposed to it
|
|
15
15
|
*/
|
|
16
16
|
export function compressible<TProps, TTokens>(
|
|
17
|
-
fn:
|
|
17
|
+
fn: (props: TProps, useTokens: UseTokens<TTokens>) => LegacyFunctionComponent<TProps>,
|
|
18
18
|
useTokens: UseTokens<TTokens>,
|
|
19
19
|
): CustomizableComponent<TProps, TTokens, Theme> {
|
|
20
20
|
type ThisComponent = CustomizableComponent<TProps, TTokens, Theme>;
|
|
21
21
|
|
|
22
|
-
const injectedWrapper = (props: TProps) => fn(props, useTokens);
|
|
23
|
-
const component = stagedComponent(injectedWrapper) as ThisComponent;
|
|
22
|
+
const injectedWrapper = (props: Partial<TProps>) => fn(props as TProps, useTokens);
|
|
23
|
+
const component = stagedComponent(injectedWrapper) as unknown as ThisComponent;
|
|
24
24
|
|
|
25
25
|
component.customize = (...tokens: TokenSettings<TTokens>[]) => {
|
|
26
26
|
const useTokensNew = useTokens.customize(...tokens);
|
package/src/index.ts
CHANGED
|
@@ -32,9 +32,8 @@ export type {
|
|
|
32
32
|
TokenBuilder,
|
|
33
33
|
} from '@fluentui-react-native/tokens';
|
|
34
34
|
|
|
35
|
-
export { useSlot } from '@fluentui-react-native/
|
|
36
|
-
export {
|
|
37
|
-
export type { ComposableFunction, FinalRender, NativeReactType, SlotFn, StagedRender } from '@fluentui-react-native/framework-base';
|
|
35
|
+
export { renderSlot, stagedComponent, withSlots, useSlot } from '@fluentui-react-native/framework-base';
|
|
36
|
+
export type { RenderType as NativeReactType } from '@fluentui-react-native/framework-base';
|
|
38
37
|
|
|
39
38
|
export { buildUseSlots } from '@fluentui-react-native/use-slots';
|
|
40
39
|
export type { GetSlotProps, Slots, UseSlotOptions, UseSlotsBase } from '@fluentui-react-native/use-slots';
|
|
@@ -49,7 +48,7 @@ export type {
|
|
|
49
48
|
RecursionOption,
|
|
50
49
|
} from '@fluentui-react-native/framework-base';
|
|
51
50
|
|
|
52
|
-
export { ThemeContext, useTheme } from '@fluentui-react-native/
|
|
51
|
+
export { ThemeContext, useTheme } from '@fluentui-react-native/design/theming';
|
|
53
52
|
export type {
|
|
54
53
|
AliasColorTokens,
|
|
55
54
|
AppearanceOptions,
|
|
@@ -79,9 +78,9 @@ export type {
|
|
|
79
78
|
Variant,
|
|
80
79
|
VariantValue,
|
|
81
80
|
Variants,
|
|
82
|
-
} from '@fluentui-react-native/
|
|
81
|
+
} from '@fluentui-react-native/design/theming';
|
|
83
82
|
|
|
84
|
-
export { compose } from './compose
|
|
83
|
+
export { compose } from './compose';
|
|
85
84
|
export type {
|
|
86
85
|
ComposableComponent,
|
|
87
86
|
ComposeOptions,
|
|
@@ -91,11 +90,11 @@ export type {
|
|
|
91
90
|
ExtractStatics,
|
|
92
91
|
ExtractTokens,
|
|
93
92
|
UseSlots,
|
|
94
|
-
} from './compose
|
|
95
|
-
export { compressible } from './compressible
|
|
96
|
-
export { useFluentTheme } from './useFluentTheme
|
|
97
|
-
export type { HasLayer, TokensThatAreAlsoProps, UseStyling } from './useStyling
|
|
98
|
-
export { buildProps, buildUseStyling } from './useStyling
|
|
99
|
-
export type { BuildProps, TokenSettings, TokensFromTheme, UseStylingOptions } from './useStyling
|
|
100
|
-
export { applyPropsToTokens, applyTokenLayers, buildUseTokens, customizable, patchTokens } from './useTokens
|
|
101
|
-
export type { UseTokens, CustomizableComponent } from './useTokens
|
|
93
|
+
} from './compose';
|
|
94
|
+
export { compressible } from './compressible';
|
|
95
|
+
export { useFluentTheme } from './useFluentTheme';
|
|
96
|
+
export type { HasLayer, TokensThatAreAlsoProps, UseStyling } from './useStyling';
|
|
97
|
+
export { buildProps, buildUseStyling } from './useStyling';
|
|
98
|
+
export type { BuildProps, TokenSettings, TokensFromTheme, UseStylingOptions } from './useStyling';
|
|
99
|
+
export { applyPropsToTokens, applyTokenLayers, buildUseTokens, customizable, patchTokens } from './useTokens';
|
|
100
|
+
export type { UseTokens, CustomizableComponent } from './useTokens';
|
package/src/themeHelper.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Theme } from '@fluentui-react-native/
|
|
1
|
+
import type { Theme } from '@fluentui-react-native/design/theming';
|
|
2
2
|
import type { ThemeHelper } from '@fluentui-react-native/use-styling';
|
|
3
3
|
|
|
4
|
-
import { useFluentTheme } from './useFluentTheme
|
|
4
|
+
import { useFluentTheme } from './useFluentTheme';
|
|
5
5
|
|
|
6
6
|
export const themeHelper: ThemeHelper<Theme> = {
|
|
7
7
|
useTheme: () => useFluentTheme(),
|
package/src/useFluentTheme.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultFluentTheme } from '@fluentui-react-native/default-theme';
|
|
2
|
-
import type { Theme } from '@fluentui-react-native/
|
|
3
|
-
import { useTheme } from '@fluentui-react-native/
|
|
2
|
+
import type { Theme } from '@fluentui-react-native/design/theming';
|
|
3
|
+
import { useTheme } from '@fluentui-react-native/design/theming';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Attempts to obtain a theme via the react context, failing that the default fluent theme will be returned. Used to ensure some theme
|
package/src/useStyling.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* as to be dependent on the core theme type
|
|
4
4
|
*/
|
|
5
5
|
export type { TokensThatAreAlsoProps, HasLayer, UseStyling } from '@fluentui-react-native/use-styling';
|
|
6
|
-
import type { Theme } from '@fluentui-react-native/
|
|
6
|
+
import type { Theme } from '@fluentui-react-native/design/theming';
|
|
7
7
|
import type {
|
|
8
8
|
TokensFromTheme as TokensFromThemeBase,
|
|
9
9
|
TokenSettings as TokenSettingsBase,
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
} from '@fluentui-react-native/use-styling';
|
|
14
14
|
import { buildUseStyling as buildUseStylingBase, buildProps as buildPropsBase } from '@fluentui-react-native/use-styling';
|
|
15
15
|
|
|
16
|
-
import { themeHelper } from './themeHelper
|
|
16
|
+
import { themeHelper } from './themeHelper';
|
|
17
17
|
|
|
18
18
|
export type BuildProps<TProps, TTokens> = BuildPropsBase<TProps, TTokens, Theme>;
|
|
19
19
|
|
package/src/useTokens.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Theme } from '@fluentui-react-native/
|
|
1
|
+
import type { Theme } from '@fluentui-react-native/design/theming';
|
|
2
2
|
import type { UseTokens as UseTokensCore } from '@fluentui-react-native/use-tokens';
|
|
3
3
|
import { buildUseTokens as buildUseTokensCore } from '@fluentui-react-native/use-tokens';
|
|
4
4
|
|
|
5
|
-
import { themeHelper } from './themeHelper
|
|
6
|
-
import type { TokenSettings } from './useStyling
|
|
5
|
+
import { themeHelper } from './themeHelper';
|
|
6
|
+
import type { TokenSettings } from './useStyling';
|
|
7
7
|
|
|
8
8
|
export { applyTokenLayers, applyPropsToTokens, customizable, patchTokens } from '@fluentui-react-native/use-tokens';
|
|
9
9
|
|