@fluentui-react-native/framework 0.8.29 → 0.8.31

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.json CHANGED
@@ -2,7 +2,43 @@
2
2
  "name": "@fluentui-react-native/framework",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 29 Dec 2022 03:44:56 GMT",
5
+ "date": "Fri, 06 Jan 2023 12:24:19 GMT",
6
+ "tag": "@fluentui-react-native/framework_v0.8.31",
7
+ "version": "0.8.31",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "78454019+lyzhan7@users.noreply.github.com",
12
+ "package": "@fluentui-react-native/framework",
13
+ "commit": "984ee826e94da2e7dabf162d02007727adba53ac",
14
+ "comment": "Change default theme const to a method"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-react-native/framework",
19
+ "comment": "Bump @fluentui-react-native/default-theme to v0.16.21",
20
+ "commit": "984ee826e94da2e7dabf162d02007727adba53ac"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Fri, 30 Dec 2022 16:09:27 GMT",
27
+ "tag": "@fluentui-react-native/framework_v0.8.30",
28
+ "version": "0.8.30",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "sanajmi@microsoft.com",
33
+ "package": "@fluentui-react-native/framework",
34
+ "commit": "8aefb1921c84f220ddf5c5def669c5ab9a036219",
35
+ "comment": "Update Compressible documentation"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "date": "Thu, 29 Dec 2022 03:47:47 GMT",
6
42
  "tag": "@fluentui-react-native/framework_v0.8.29",
7
43
  "version": "0.8.29",
8
44
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
1
1
  # Change Log - @fluentui-react-native/framework
2
2
 
3
- This log was last generated on Thu, 29 Dec 2022 03:44:56 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 06 Jan 2023 12:24:19 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.8.31
8
+
9
+ Fri, 06 Jan 2023 12:24:19 GMT
10
+
11
+ ### Patches
12
+
13
+ - Change default theme const to a method (78454019+lyzhan7@users.noreply.github.com)
14
+ - Bump @fluentui-react-native/default-theme to v0.16.21
15
+
16
+ ## 0.8.30
17
+
18
+ Fri, 30 Dec 2022 16:09:27 GMT
19
+
20
+ ### Patches
21
+
22
+ - Update Compressible documentation (sanajmi@microsoft.com)
23
+
7
24
  ## 0.8.29
8
25
 
9
- Thu, 29 Dec 2022 03:44:56 GMT
26
+ Thu, 29 Dec 2022 03:47:47 GMT
10
27
 
11
28
  ### Patches
12
29
 
@@ -2,4 +2,11 @@ import { Theme } from '@fluentui-react-native/theme-types';
2
2
  import { StagedRender } from '@fluentui-react-native/use-slot';
3
3
  import { CustomizableComponent } from '@fluentui-react-native/use-tokens';
4
4
  import { UseTokens } from './useTokens';
5
+ /**
6
+ * Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
7
+ * and also have customize functionality.
8
+ * @param fn StagedRender function that defines your component
9
+ * @param useTokens a hook function to build a set of tokens from a passed in theme as well as a cache object
10
+ * @returns A tree compressed function component with the `.customize` method exposed to it
11
+ */
5
12
  export declare function compressible<TProps, TTokens>(fn: StagedRender<TProps>, useTokens: UseTokens<TTokens>): CustomizableComponent<TProps, TTokens, Theme>;
@@ -1,4 +1,11 @@
1
1
  import { stagedComponent } from '@fluentui-react-native/use-slot';
2
+ /**
3
+ * Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
4
+ * and also have customize functionality.
5
+ * @param fn StagedRender function that defines your component
6
+ * @param useTokens a hook function to build a set of tokens from a passed in theme as well as a cache object
7
+ * @returns A tree compressed function component with the `.customize` method exposed to it
8
+ */
2
9
  export function compressible(fn, useTokens) {
3
10
  var injectedWrapper = function (props) { return fn(props, useTokens); };
4
11
  var component = stagedComponent(injectedWrapper);
@@ -1 +1 @@
1
- {"version":3,"file":"compressible.js","sourceRoot":"","sources":["../src/compressible.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAgB,MAAM,iCAAiC,CAAC;AAKhF,MAAM,UAAU,YAAY,CAC1B,EAAwB,EACxB,SAA6B;IAI7B,IAAM,eAAe,GAAG,UAAC,KAAa,IAAK,OAAA,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,EAApB,CAAoB,CAAC;IAChE,IAAM,SAAS,GAAG,eAAe,CAAC,eAAe,CAAkB,CAAC;IAEpE,SAAS,CAAC,SAAS,GAAG;QAAC,gBAAmC;aAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;YAAnC,2BAAmC;;QACxD,IAAM,YAAY,GAAG,SAAS,CAAC,SAAS,OAAnB,SAAS,EAAc,MAAM,CAAC,CAAC;QACpD,OAAO,YAAY,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"compressible.js","sourceRoot":"","sources":["../src/compressible.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAgB,MAAM,iCAAiC,CAAC;AAKhF;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,EAAwB,EACxB,SAA6B;IAI7B,IAAM,eAAe,GAAG,UAAC,KAAa,IAAK,OAAA,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,EAApB,CAAoB,CAAC;IAChE,IAAM,SAAS,GAAG,eAAe,CAAC,eAAe,CAAkB,CAAC;IAEpE,SAAS,CAAC,SAAS,GAAG;QAAC,gBAAmC;aAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;YAAnC,2BAAmC;;QACxD,IAAM,YAAY,GAAG,SAAS,CAAC,SAAS,OAAnB,SAAS,EAAc,MAAM,CAAC,CAAC;QACpD,OAAO,YAAY,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -6,6 +6,6 @@ import { useTheme } from '@fluentui-react-native/theme-types';
6
6
  * @returns - a valid Theme object
7
7
  */
8
8
  export function useFluentTheme() {
9
- return useTheme() || defaultFluentTheme;
9
+ return useTheme() || defaultFluentTheme();
10
10
  }
11
11
  //# sourceMappingURL=useFluentTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFluentTheme.js","sourceRoot":"","sources":["../src/useFluentTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAS,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAErE;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,QAAQ,EAAE,IAAI,kBAAkB,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"file":"useFluentTheme.js","sourceRoot":"","sources":["../src/useFluentTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAS,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAErE;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,QAAQ,EAAE,IAAI,kBAAkB,EAAE,CAAC;AAC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAA8B,MAAM,mCAAmC,CAAC;AACrH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAIpH,MAAM,UAAU,cAAc;IAAU,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IACzE,OAAO,kBAAkB,8BAAC,WAAW,CAAC,gBAAgB,GAAK,MAAM,UAAE;AACrE,CAAC"}
1
+ {"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAA8B,MAAM,mCAAmC,CAAC;AACrH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAKpH,MAAM,UAAU,cAAc;IAAU,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IACzE,OAAO,kBAAkB,8BAAC,WAAW,CAAC,gBAAgB,GAAK,MAAM,UAAE;AACrE,CAAC"}
@@ -2,4 +2,11 @@ import { Theme } from '@fluentui-react-native/theme-types';
2
2
  import { StagedRender } from '@fluentui-react-native/use-slot';
3
3
  import { CustomizableComponent } from '@fluentui-react-native/use-tokens';
4
4
  import { UseTokens } from './useTokens';
5
+ /**
6
+ * Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
7
+ * and also have customize functionality.
8
+ * @param fn StagedRender function that defines your component
9
+ * @param useTokens a hook function to build a set of tokens from a passed in theme as well as a cache object
10
+ * @returns A tree compressed function component with the `.customize` method exposed to it
11
+ */
5
12
  export declare function compressible<TProps, TTokens>(fn: StagedRender<TProps>, useTokens: UseTokens<TTokens>): CustomizableComponent<TProps, TTokens, Theme>;
@@ -2,6 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.compressible = void 0;
4
4
  var use_slot_1 = require("@fluentui-react-native/use-slot");
5
+ /**
6
+ * Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
7
+ * and also have customize functionality.
8
+ * @param fn StagedRender function that defines your component
9
+ * @param useTokens a hook function to build a set of tokens from a passed in theme as well as a cache object
10
+ * @returns A tree compressed function component with the `.customize` method exposed to it
11
+ */
5
12
  function compressible(fn, useTokens) {
6
13
  var injectedWrapper = function (props) { return fn(props, useTokens); };
7
14
  var component = (0, use_slot_1.stagedComponent)(injectedWrapper);
@@ -1 +1 @@
1
- {"version":3,"file":"compressible.js","sourceRoot":"","sources":["../src/compressible.ts"],"names":[],"mappings":";;;AACA,4DAAgF;AAKhF,SAAgB,YAAY,CAC1B,EAAwB,EACxB,SAA6B;IAI7B,IAAM,eAAe,GAAG,UAAC,KAAa,IAAK,OAAA,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,EAApB,CAAoB,CAAC;IAChE,IAAM,SAAS,GAAG,IAAA,0BAAe,EAAC,eAAe,CAAkB,CAAC;IAEpE,SAAS,CAAC,SAAS,GAAG;QAAC,gBAAmC;aAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;YAAnC,2BAAmC;;QACxD,IAAM,YAAY,GAAG,SAAS,CAAC,SAAS,OAAnB,SAAS,EAAc,MAAM,CAAC,CAAC;QACpD,OAAO,YAAY,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAfD,oCAeC"}
1
+ {"version":3,"file":"compressible.js","sourceRoot":"","sources":["../src/compressible.ts"],"names":[],"mappings":";;;AACA,4DAAgF;AAKhF;;;;;;GAMG;AACH,SAAgB,YAAY,CAC1B,EAAwB,EACxB,SAA6B;IAI7B,IAAM,eAAe,GAAG,UAAC,KAAa,IAAK,OAAA,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,EAApB,CAAoB,CAAC;IAChE,IAAM,SAAS,GAAG,IAAA,0BAAe,EAAC,eAAe,CAAkB,CAAC;IAEpE,SAAS,CAAC,SAAS,GAAG;QAAC,gBAAmC;aAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;YAAnC,2BAAmC;;QACxD,IAAM,YAAY,GAAG,SAAS,CAAC,SAAS,OAAnB,SAAS,EAAc,MAAM,CAAC,CAAC;QACpD,OAAO,YAAY,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAfD,oCAeC"}
@@ -9,7 +9,7 @@ var theme_types_1 = require("@fluentui-react-native/theme-types");
9
9
  * @returns - a valid Theme object
10
10
  */
11
11
  function useFluentTheme() {
12
- return (0, theme_types_1.useTheme)() || default_theme_1.defaultFluentTheme;
12
+ return (0, theme_types_1.useTheme)() || (0, default_theme_1.defaultFluentTheme)();
13
13
  }
14
14
  exports.useFluentTheme = useFluentTheme;
15
15
  //# sourceMappingURL=useFluentTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFluentTheme.js","sourceRoot":"","sources":["../src/useFluentTheme.ts"],"names":[],"mappings":";;;AAAA,sEAA0E;AAC1E,kEAAqE;AAErE;;;;GAIG;AACH,SAAgB,cAAc;IAC5B,OAAO,IAAA,sBAAQ,GAAE,IAAI,kCAAkB,CAAC;AAC1C,CAAC;AAFD,wCAEC"}
1
+ {"version":3,"file":"useFluentTheme.js","sourceRoot":"","sources":["../src/useFluentTheme.ts"],"names":[],"mappings":";;;AAAA,sEAA0E;AAC1E,kEAAqE;AAErE;;;;GAIG;AACH,SAAgB,cAAc;IAC5B,OAAO,IAAA,sBAAQ,GAAE,IAAI,IAAA,kCAAkB,GAAE,CAAC;AAC5C,CAAC;AAFD,wCAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":";;;;AAAA,gEAAqH;AACrH,6CAA4C;AAI5C,gEAAoH;AAA3G,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,yGAAA,WAAW,OAAA;AAIxE,SAAgB,cAAc;IAAU,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IACzE,OAAO,2BAAkB,2CAAC,yBAAW,CAAC,gBAAgB,GAAK,MAAM,UAAE;AACrE,CAAC;AAFD,wCAEC"}
1
+ {"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":";;;;AAAA,gEAAqH;AACrH,6CAA4C;AAI5C,gEAAoH;AAA3G,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,yGAAA,WAAW,OAAA;AAKxE,SAAgB,cAAc;IAAU,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IACzE,OAAO,2BAAkB,2CAAC,yBAAW,CAAC,gBAAgB,GAAK,MAAM,UAAE;AACrE,CAAC;AAFD,wCAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/framework",
3
- "version": "0.8.29",
3
+ "version": "0.8.31",
4
4
  "description": "Component framework used by fluentui react native controls",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@fluentui-react-native/composition": ">=0.8.1 <1.0.0",
28
- "@fluentui-react-native/default-theme": ">=0.16.20 <1.0.0",
28
+ "@fluentui-react-native/default-theme": ">=0.16.21 <1.0.0",
29
29
  "@fluentui-react-native/immutable-merge": "^1.1.7",
30
30
  "@fluentui-react-native/merge-props": ">=0.5.1 <1.0.0",
31
31
  "@fluentui-react-native/theme-types": ">=0.28.0 <1.0.0",
@@ -1,9 +1,16 @@
1
1
  import { Theme } from '@fluentui-react-native/theme-types';
2
2
  import { stagedComponent, StagedRender } from '@fluentui-react-native/use-slot';
3
3
  import { CustomizableComponent } from '@fluentui-react-native/use-tokens';
4
- import { UseTokens } from './useTokens';
5
4
  import { TokenSettings } from './useStyling';
5
+ import { UseTokens } from './useTokens';
6
6
 
7
+ /**
8
+ * Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
9
+ * and also have customize functionality.
10
+ * @param fn StagedRender function that defines your component
11
+ * @param useTokens a hook function to build a set of tokens from a passed in theme as well as a cache object
12
+ * @returns A tree compressed function component with the `.customize` method exposed to it
13
+ */
7
14
  export function compressible<TProps, TTokens>(
8
15
  fn: StagedRender<TProps>,
9
16
  useTokens: UseTokens<TTokens>,
@@ -7,5 +7,5 @@ import { Theme, useTheme } from '@fluentui-react-native/theme-types';
7
7
  * @returns - a valid Theme object
8
8
  */
9
9
  export function useFluentTheme(): Theme {
10
- return useTheme() || defaultFluentTheme;
10
+ return useTheme() || defaultFluentTheme();
11
11
  }
package/src/useTokens.ts CHANGED
@@ -5,6 +5,7 @@ import { TokenSettings } from './useStyling';
5
5
 
6
6
  export { applyTokenLayers, applyPropsToTokens, customizable, patchTokens } from '@fluentui-react-native/use-tokens';
7
7
 
8
+ // A hook function to build a set of tokens from a passed in theme as well as a cache object
8
9
  export type UseTokens<TTokens> = UseTokensCore<TTokens, Theme>;
9
10
 
10
11
  export function buildUseTokens<TTokens>(...tokens: TokenSettings<TTokens>[]): UseTokens<TTokens> {