@fluentui/react-utilities
Advanced tools
Comparing version 0.2.4 to 0.3.0
@@ -5,6 +5,98 @@ { | ||
{ | ||
"date": "Mon, 01 Feb 2021 12:21:22 GMT", | ||
"date": "Thu, 18 Feb 2021 12:22:02 GMT", | ||
"tag": "@fluentui/react-utilities_v0.3.0", | ||
"version": "0.3.0", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"comment": "include all utils from fluentui/react-utils", | ||
"author": "olfedias@microsoft.com", | ||
"commit": "e0d4772fbaff0afd7ae0a2f85b53c4ca3831a701", | ||
"package": "@fluentui/react-utilities" | ||
} | ||
], | ||
"prerelease": [ | ||
{ | ||
"comment": "Bump @fluentui/eslint-plugin to v1.0.0-beta.2", | ||
"author": "elcraig@microsoft.com", | ||
"commit": "1072765ed2e0ffda34688d84d376a8bc4bf928f0", | ||
"package": "@fluentui/react-utilities" | ||
}, | ||
{ | ||
"comment": "Bump @fluentui/utilities to v8.0.0-beta.13", | ||
"author": "elcraig@microsoft.com", | ||
"commit": "1072765ed2e0ffda34688d84d376a8bc4bf928f0", | ||
"package": "@fluentui/react-utilities" | ||
}, | ||
{ | ||
"comment": "Bump @fluentui/jest-serializer-merge-styles to v8.0.0-beta.6", | ||
"author": "elcraig@microsoft.com", | ||
"commit": "1072765ed2e0ffda34688d84d376a8bc4bf928f0", | ||
"package": "@fluentui/react-utilities" | ||
}, | ||
{ | ||
"comment": "Bump @fluentui/set-version to v8.0.0-beta.2", | ||
"author": "elcraig@microsoft.com", | ||
"commit": "1072765ed2e0ffda34688d84d376a8bc4bf928f0", | ||
"package": "@fluentui/react-utilities" | ||
}, | ||
{ | ||
"comment": "Bump @fluentui/scripts to v1.0.0", | ||
"author": "elcraig@microsoft.com", | ||
"commit": "1072765ed2e0ffda34688d84d376a8bc4bf928f0", | ||
"package": "@fluentui/react-utilities" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Wed, 17 Feb 2021 12:21:39 GMT", | ||
"tag": "@fluentui/react-utilities_v0.2.4", | ||
"version": "0.2.4", | ||
"comments": { | ||
"none": [ | ||
{ | ||
"comment": "chore: apply single version policy on jest", | ||
"author": "martinhochel@microsoft.com", | ||
"commit": "0de01d003589b5e2f166bc070729dca20125a091", | ||
"package": "@fluentui/react-utilities" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 11 Feb 2021 12:18:41 GMT", | ||
"tag": "@fluentui/react-utilities_v0.2.4", | ||
"version": "0.2.4", | ||
"comments": { | ||
"none": [ | ||
{ | ||
"comment": "Bump @fluentui/jest-serializer-merge-styles to v8.0.0-beta.5", | ||
"author": "martinhochel@microsoft.com", | ||
"commit": "7566015a7edd355b4fcd3796bc8f44f732ef0877", | ||
"package": "@fluentui/react-utilities" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Wed, 03 Feb 2021 05:51:40 GMT", | ||
"tag": "@fluentui/react-utilities_v0.2.4", | ||
"version": "0.2.4", | ||
"comments": { | ||
"none": [ | ||
{ | ||
"comment": "refactor: remove unused .npmrc in packages", | ||
"author": "hantatsang@gmail.com", | ||
"commit": "c688ee2ea6f192c4874974ebf11598523ccf6db9", | ||
"package": "@fluentui/react-utilities" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Mon, 01 Feb 2021 12:23:48 GMT", | ||
"tag": "@fluentui/react-utilities_v0.2.4", | ||
"version": "0.2.4", | ||
"comments": { | ||
"patch": [ | ||
@@ -11,0 +103,0 @@ { |
# Change Log - @fluentui/react-utilities | ||
This log was last generated on Mon, 01 Feb 2021 12:21:22 GMT and should not be manually modified. | ||
This log was last generated on Thu, 18 Feb 2021 12:22:02 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [0.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.3.0) | ||
Thu, 18 Feb 2021 12:22:02 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.2.4..@fluentui/react-utilities_v0.3.0) | ||
### Minor changes | ||
- include all utils from fluentui/react-utils ([PR #16970](https://github.com/microsoft/fluentui/pull/16970) by olfedias@microsoft.com) | ||
### Changes | ||
- Bump @fluentui/eslint-plugin to v1.0.0-beta.2 ([PR #16975](https://github.com/microsoft/fluentui/pull/16975) by elcraig@microsoft.com) | ||
- Bump @fluentui/utilities to v8.0.0-beta.13 ([PR #16975](https://github.com/microsoft/fluentui/pull/16975) by elcraig@microsoft.com) | ||
- Bump @fluentui/jest-serializer-merge-styles to v8.0.0-beta.6 ([PR #16975](https://github.com/microsoft/fluentui/pull/16975) by elcraig@microsoft.com) | ||
- Bump @fluentui/set-version to v8.0.0-beta.2 ([PR #16975](https://github.com/microsoft/fluentui/pull/16975) by elcraig@microsoft.com) | ||
- Bump @fluentui/scripts to v1.0.0 ([PR #16975](https://github.com/microsoft/fluentui/pull/16975) by elcraig@microsoft.com) | ||
## [0.2.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.2.4) | ||
Mon, 01 Feb 2021 12:21:22 GMT | ||
Mon, 01 Feb 2021 12:23:48 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.2.4-4..@fluentui/react-utilities_v0.2.4) | ||
@@ -11,0 +28,0 @@ |
import * as React from 'react'; | ||
export declare interface BaseSlots { | ||
root: React.ElementType; | ||
} | ||
/** | ||
* Tests if children are nil in React and Preact. | ||
* Class dictionary. | ||
*/ | ||
export declare type ClassDictionary = Record<string, string>; | ||
export declare interface ComponentProps { | ||
as?: React.ElementType; | ||
className?: string; | ||
children?: React.ReactNode; | ||
} | ||
/** | ||
* Generic name to any dictionary. | ||
*/ | ||
export declare type GenericDictionary = Record<string, any>; | ||
/** | ||
* Given the state and an array of slot names, will break out `slots` and `slotProps` | ||
* collections. | ||
* | ||
* @param children - The children prop of a component. | ||
* The root is always derived from the `as` prop. | ||
* | ||
* Slots will render as null if they are rendered as primitives with undefined children. | ||
* | ||
* The slotProps will always omit the `as` prop within them, and for slots that are string | ||
* primitives, the props will be filtered according the the slot type. For example, if the | ||
* slot is rendered `as: 'a'`, the props will be filtered for acceptable anchor props. | ||
* | ||
* @param state - State including slot definitions | ||
* @param slotNames - Name of which props are slots | ||
* @returns An object containing the `slots` map and `slotProps` map. | ||
*/ | ||
export declare const childrenExist: (children: React.ReactNode) => boolean; | ||
export declare const getSlots: (state: Record<string, any>, slotNames?: string[] | undefined) => { | ||
slots: Record<string, any>; | ||
slotProps: Record<string, any>; | ||
}; | ||
export declare const makeClasses: (classes: Record<string, string>) => (state: Record<string, any>) => void; | ||
/** | ||
* Helper which deep clones props, but respectively assigns JSX, object refs, and class names | ||
* appropriately. | ||
* | ||
* @param target - the target object to merge onto. | ||
* @param propSets - one or more prop sets to deep merge onto the target. | ||
*/ | ||
export declare const makeMergeProps: <TState = Record<string, any>>(options?: MergePropsOptions) => (target: Record<string, any>, ...propSets: (Record<string, any> | undefined)[]) => TState; | ||
export declare type MergePropsOptions = { | ||
/** | ||
* A list of props to deep merge. By default, `style` will | ||
* always be deep merged so it's not required to be provided. | ||
*/ | ||
deepMerge?: string[]; | ||
}; | ||
export declare type ObjectShorthandProps<TProps extends ComponentProps = {}> = TProps & { | ||
children?: TProps['children'] | ShorthandRenderFunction<TProps>; | ||
}; | ||
/** | ||
* Ensures that the given slots are represented using object syntax. This ensures that | ||
* the object can be merged along with other objects. | ||
* @param props - The incoming props | ||
* @param shorthandPropNames - An array of prop names to apply simplification to | ||
*/ | ||
export declare const resolveShorthandProps: <TProps>(props: TProps, shorthandPropNames: string[]) => TProps; | ||
export declare type ShorthandProps<TProps extends ComponentProps = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | boolean | number | null | undefined | (TProps & ComponentProps & { | ||
children?: TProps['children'] | ShorthandRenderFunction<TProps>; | ||
}); | ||
export declare type ShorthandRenderFunction<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode; | ||
export declare type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = { | ||
[key in keyof Omit<TSlots, 'root'>]: key extends keyof TProps ? TProps[key] : any; | ||
} & { | ||
root: TRootProps; | ||
}; | ||
export { } |
@@ -9,8 +9,67 @@ ## API Report File for "@fluentui/react-utilities" | ||
// @public (undocumented) | ||
export interface BaseSlots { | ||
// (undocumented) | ||
root: React.ElementType; | ||
} | ||
// @public | ||
export const childrenExist: (children: React.ReactNode) => boolean; | ||
export type ClassDictionary = Record<string, string>; | ||
// @public (undocumented) | ||
export interface ComponentProps { | ||
// (undocumented) | ||
as?: React.ElementType; | ||
// (undocumented) | ||
children?: React.ReactNode; | ||
// (undocumented) | ||
className?: string; | ||
} | ||
// @public | ||
export type GenericDictionary = Record<string, any>; | ||
// @public | ||
export const getSlots: (state: Record<string, any>, slotNames?: string[] | undefined) => { | ||
slots: Record<string, any>; | ||
slotProps: Record<string, any>; | ||
}; | ||
// @public (undocumented) | ||
export const makeClasses: (classes: Record<string, string>) => (state: Record<string, any>) => void; | ||
// @public | ||
export const makeMergeProps: <TState = Record<string, any>>(options?: MergePropsOptions) => (target: Record<string, any>, ...propSets: (Record<string, any> | undefined)[]) => TState; | ||
// @public (undocumented) | ||
export type MergePropsOptions = { | ||
deepMerge?: string[]; | ||
}; | ||
// @public (undocumented) | ||
export type ObjectShorthandProps<TProps extends ComponentProps = {}> = TProps & { | ||
children?: TProps['children'] | ShorthandRenderFunction<TProps>; | ||
}; | ||
// @public | ||
export const resolveShorthandProps: <TProps>(props: TProps, shorthandPropNames: string[]) => TProps; | ||
// @public (undocumented) | ||
export type ShorthandProps<TProps extends ComponentProps = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | boolean | number | null | undefined | (TProps & ComponentProps & { | ||
children?: TProps['children'] | ShorthandRenderFunction<TProps>; | ||
}); | ||
// @public (undocumented) | ||
export type ShorthandRenderFunction<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode; | ||
// @public (undocumented) | ||
export type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = { | ||
[key in keyof Omit<TSlots, 'root'>]: key extends keyof TProps ? TProps[key] : any; | ||
} & { | ||
root: TRootProps; | ||
}; | ||
// (No @packageDocumentation comment for this package) | ||
``` |
@@ -1,2 +0,2 @@ | ||
export * from './childrenExist'; | ||
import './version'; | ||
export * from './compose/index'; |
@@ -1,6 +0,6 @@ | ||
define(["require", "exports", "tslib", "./childrenExist", "./version"], function (require, exports, tslib_1, childrenExist_1) { | ||
define(["require", "exports", "tslib", "./compose/index", "./version"], function (require, exports, tslib_1, index_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
tslib_1.__exportStar(childrenExist_1, exports); | ||
tslib_1.__exportStar(index_1, exports); | ||
}); | ||
//# sourceMappingURL=index.js.map |
define(["require", "exports", "@fluentui/set-version"], function (require, exports, set_version_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
set_version_1.setVersion('@fluentui/react-utilities', '0.2.4'); | ||
set_version_1.setVersion('@fluentui/react-utilities', '0.3.0'); | ||
}); | ||
//# sourceMappingURL=version.js.map |
@@ -1,2 +0,2 @@ | ||
export * from './childrenExist'; | ||
import './version'; | ||
export * from './compose/index'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./childrenExist"), exports); | ||
require("./version"); | ||
tslib_1.__exportStar(require("./compose/index"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
var set_version_1 = require("@fluentui/set-version"); | ||
set_version_1.setVersion('@fluentui/react-utilities', '0.2.4'); | ||
set_version_1.setVersion('@fluentui/react-utilities', '0.3.0'); | ||
//# sourceMappingURL=version.js.map |
@@ -1,2 +0,2 @@ | ||
export * from './childrenExist'; | ||
import './version'; | ||
export * from './compose/index'; |
@@ -1,3 +0,3 @@ | ||
export * from './childrenExist'; | ||
import './version'; | ||
export * from './compose/index'; | ||
//# sourceMappingURL=index.js.map |
// Do not modify this file; it is generated as part of publish. | ||
// The checked in version is a placeholder only and will not be updated. | ||
import { setVersion } from '@fluentui/set-version'; | ||
setVersion('@fluentui/react-utilities', '0.2.4'); | ||
setVersion('@fluentui/react-utilities', '0.3.0'); | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@fluentui/react-utilities", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"description": "A set of general React-specific utilities.", | ||
@@ -29,6 +29,5 @@ "main": "lib-commonjs/index.js", | ||
"devDependencies": { | ||
"@fluentui/eslint-plugin": "^1.0.0-beta.1", | ||
"@fluentui/eslint-plugin": "^1.0.0-beta.2", | ||
"@types/enzyme": "3.10.3", | ||
"@types/enzyme-adapter-react-16": "1.0.3", | ||
"@types/jest": "~24.9.0", | ||
"@types/react": "16.9.42", | ||
@@ -38,3 +37,3 @@ "@types/react-test-renderer": "^16.0.0", | ||
"@fluentui/scripts": "^1.0.0", | ||
"@fluentui/jest-serializer-merge-styles": "^8.0.0-beta.5", | ||
"@fluentui/jest-serializer-merge-styles": "^8.0.0-beta.6", | ||
"enzyme": "~3.10.0", | ||
@@ -47,3 +46,4 @@ "enzyme-adapter-react-16": "^1.15.0", | ||
"dependencies": { | ||
"@fluentui/set-version": "^8.0.0-beta.1", | ||
"@fluentui/set-version": "^8.0.0-beta.2", | ||
"@fluentui/utilities": "^8.0.0-beta.13", | ||
"tslib": "^1.10.0" | ||
@@ -50,0 +50,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148093
13
128
1602
5
2
+ Added@fluentui/dom-utilities@2.3.9(transitive)
+ Added@fluentui/merge-styles@8.6.13(transitive)
+ Added@fluentui/react-window-provider@2.2.28(transitive)
+ Added@fluentui/utilities@8.15.19(transitive)