@fluentui-react-native/use-slots 0.10.11 → 0.11.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/CHANGELOG.json CHANGED
@@ -1,6 +1,21 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/use-slots",
3
3
  "entries": [
4
+ {
5
+ "date": "Tue, 05 Aug 2025 18:50:39 GMT",
6
+ "version": "0.10.12",
7
+ "tag": "@fluentui-react-native/use-slots_v0.10.12",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "jasonmo@microsoft.com",
12
+ "package": "@fluentui-react-native/use-slots",
13
+ "commit": "1ed213f1b48036479e39ace7f25f9a31f46042bf",
14
+ "comment": "move repo to pnpm, create babel and jest config packages, fix dependencies"
15
+ }
16
+ ]
17
+ }
18
+ },
4
19
  {
5
20
  "date": "Tue, 22 Jul 2025 19:06:24 GMT",
6
21
  "version": "0.10.8",
package/CHANGELOG.md CHANGED
@@ -1,9 +1,54 @@
1
1
  # Change Log - @fluentui-react-native/use-slots
2
2
 
3
- <!-- This log was last generated on Tue, 22 Jul 2025 19:06:24 GMT and should not be manually modified. -->
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d7adbdd: # Migration from Beachball to Changesets
8
+
9
+ This changeset represents the migration from Beachball to Changesets for version management and consolidates all changes from 440+ beachball change files that were in the `change/` directory.
10
+
11
+ All 75 affected packages receive a minor version bump to acknowledge the accumulated changes from the beachball era.
12
+
13
+ ## What Changed
14
+
15
+ Going forward, all version management uses Changesets via `yarn changeset`. The following beachball infrastructure has been removed:
16
+
17
+ - ❌ 440+ beachball change files from `change/` directory
18
+ - ❌ `beachball` package dependency
19
+ - ❌ Beachball scripts from `package.json`
20
+ - ❌ `beachball.config.js` configuration file
21
+ - ❌ Beachball publish steps from Azure Pipelines
22
+
23
+ ## New Workflow
24
+
25
+ ✅ **Create changes**: Run `yarn changeset` to document changes
26
+ ✅ **Version bump PRs**: Automatically created by GitHub Actions
27
+ ✅ **Publishing**: Handled by Azure Pipelines using `changeset publish`
28
+ ✅ **Validation**: CI validates changesets and blocks major version bumps
29
+
30
+ For details, see `CHANGESETS_SETUP.md` and `CONTRIBUTING.md`.
31
+
32
+ ### Patch Changes
33
+
34
+ - d1d8c26: We were pinning @types/react and react-native-macos via resolutions. This fixes that which uncovered a bunch of type inconsistencies that needed to be addressed.
35
+ - Updated dependencies [d7adbdd]
36
+ - Updated dependencies [d1d8c26]
37
+ - @fluentui-react-native/framework-base@0.3.0
38
+ - @fluentui-react-native/use-slot@0.7.0
39
+
40
+ <!-- This log was last generated on Tue, 05 Aug 2025 18:50:39 GMT and should not be manually modified. -->
4
41
 
5
42
  <!-- Start content -->
6
43
 
44
+ ## 0.10.12
45
+
46
+ Tue, 05 Aug 2025 18:50:39 GMT
47
+
48
+ ### Patches
49
+
50
+ - move repo to pnpm, create babel and jest config packages, fix dependencies (jasonmo@microsoft.com)
51
+
7
52
  ## 0.10.8
8
53
 
9
54
  Tue, 22 Jul 2025 19:06:24 GMT
package/babel.config.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('@fluentui-react-native/scripts/configs/babel.config');
1
+ module.exports = require('@fluentui-react-native/babel-config');
@@ -1,17 +1,18 @@
1
- import type { ComposableFunction, SlotFn, NativeReactType } from '@fluentui-react-native/framework-base';
1
+ import { type ComponentType } from '@fluentui-react-native/use-slot';
2
+ import type { FunctionComponent, PropsFilter } from '@fluentui-react-native/framework-base';
2
3
  export type Slots<TSlotProps> = {
3
- [K in keyof TSlotProps]: SlotFn<TSlotProps[K]>;
4
+ [K in keyof TSlotProps]: FunctionComponent<TSlotProps[K]>;
4
5
  };
5
6
  export type UseSlotOptions<TSlotProps> = {
6
- slots: {
7
- [K in keyof TSlotProps]: NativeReactType | ComposableFunction<TSlotProps[K]>;
8
- };
9
- filters?: {
10
- [K in keyof TSlotProps]?: (propName: string) => boolean;
11
- };
12
- useStyling?: TSlotProps | GetSlotProps<TSlotProps>;
7
+ slots: {
8
+ [K in keyof TSlotProps]: ComponentType<TSlotProps[K]>;
9
+ };
10
+ filters?: {
11
+ [K in keyof TSlotProps]?: PropsFilter;
12
+ };
13
+ useStyling?: TSlotProps | GetSlotProps<TSlotProps>;
13
14
  };
14
15
  export type GetSlotProps<TSlotProps> = (...args: any[]) => TSlotProps;
15
16
  export type UseSlotsBase<TSlotProps> = (...args: any[]) => Slots<TSlotProps>;
16
17
  export declare function buildUseSlots<TSlotProps>(options: UseSlotOptions<TSlotProps>): UseSlotsBase<TSlotProps>;
17
- //# sourceMappingURL=buildUseSlots.d.ts.map
18
+ //# sourceMappingURL=buildUseSlots.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildUseSlots.d.ts","sourceRoot":"","sources":["../src/buildUseSlots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAUzG,MAAM,MAAM,KAAK,CAAC,UAAU,IAAI;KAAG,CAAC,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEnF,MAAM,MAAM,cAAc,CAAC,UAAU,IAAI;IACvC,KAAK,EAAE;SAAG,CAAC,IAAI,MAAM,UAAU,GAAG,eAAe,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KAAE,CAAC;IACxF,OAAO,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO;KAAE,CAAC;IACtE,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,UAAU,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC;AAEtE,MAAM,MAAM,YAAY,CAAC,UAAU,IAAI,CAAC,G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2
  export function buildUseSlots(options) {
3
- const { slots, filters = {}, useStyling } = options;
4
- return (...args) => {
5
- // get the baseline slot props to render with the slots
6
- const slotProps = typeof useStyling === 'function' ? useStyling(...args) : (useStyling || {});
7
- // build up a set of slots closures and store them in props
8
- const builtSlots = {};
9
- // for each slot go through and either cache the slot props or call part one render if it is staged
10
- Object.keys(slots).forEach((slotName) => {
11
- builtSlots[slotName] = useSlot(slots[slotName], slotProps[slotName], filters[slotName]);
12
- });
13
- // return the prebuilt closures, these will have internal references to state.results
14
- return builtSlots;
15
- };
3
+ const { slots, filters = {}, useStyling } = options;
4
+ return (...args) => {
5
+ // get the baseline slot props to render with the slots
6
+ const slotProps = typeof useStyling === 'function' ? useStyling(...args) : useStyling || {};
7
+ // build up a set of slots closures and store them in props
8
+ const builtSlots = {};
9
+ // for each slot go through and either cache the slot props or call part one render if it is staged
10
+ // note: changing this to a for..in loop causes rule of hooks violations
11
+ // eslint-disable-next-line @rnx-kit/no-foreach-with-captured-variables
12
+ Object.keys(slots).forEach((slotName) => {
13
+ builtSlots[slotName] = useSlot(slots[slotName], slotProps[slotName], filters[slotName]);
14
+ });
15
+ // return the prebuilt closures, these will have internal references to state.results
16
+ return builtSlots;
17
+ };
16
18
  }
17
- //# sourceMappingURL=buildUseSlots.js.map
19
+ //# sourceMappingURL=buildUseSlots.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildUseSlots.js","sourceRoot":"","sources":["../src/buildUseSlots.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAqB1D,MAAM,UAAU,aAAa,CAAa,OAAmC;IAC3E,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IACpD,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;QACxB,uDAAuD;QACvD,MAAM,SAAS,GACb,OAAO,UAAU,KAAK,UAAU,CAAC,CAAC,CAAE,UAAqC,CAAC,GAA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AQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAA,CACzF,CAAC,CAAC;QAEH,qFAAqF;QACrF,OAAO,UAAU,CAAC;IAAA,CACnB,CAAC;AAAA,CACH"}
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=buildUseSlots.test.d.ts.map
2
+ //# sourceMappingURL=buildUseSlots.test.d.ts.map
@@ -1,27 +1,37 @@
1
+ import { jsx as _jsx } from '@fluentui-react-native/framework-base/jsx-runtime';
2
+ /** @jsxImportSource @fluentui-react-native/framework-base */
3
+ import { act } from 'react';
1
4
  import { View, Text } from 'react-native';
2
- import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base';
5
+ import { stagedComponent } from '@fluentui-react-native/framework-base';
3
6
  import * as renderer from 'react-test-renderer';
4
7
  import { buildUseSlots } from './buildUseSlots';
5
8
  const useSlotsBase = buildUseSlots({
6
- slots: {
7
- outer: View,
8
- inner: View,
9
- content: Text,
10
- },
9
+ slots: {
10
+ outer: View,
11
+ inner: View,
12
+ content: Text,
13
+ },
11
14
  });
12
15
  const CompBase = stagedComponent((props) => {
13
- const Slots = useSlotsBase(props);
14
- return (extra) => {
15
- const merged = { ...props, ...extra };
16
- return (withSlots(Slots.outer, { ...merged },
17
- withSlots(Slots.inner, { style: { backgroundColor: 'blue', width: 20, height: 10 } },
18
- withSlots(Slots.content, null, "Hello"))));
19
- };
16
+ const Slots = useSlotsBase(props);
17
+ return (extra) => {
18
+ const merged = { ...props, ...extra };
19
+ return _jsx(Slots.outer, {
20
+ ...merged,
21
+ children: _jsx(Slots.inner, {
22
+ style: { backgroundColor: 'blue', width: 20, height: 10 },
23
+ children: _jsx(Slots.content, { children: 'Hello' }),
24
+ }),
25
+ });
26
+ };
20
27
  });
21
28
  describe('buildUseSlots test suite', () => {
22
- it('Simple component render', () => {
23
- const tree = renderer.create(withSlots(CompBase, { style: { width: 30, height: 20, borderColor: 'green', borderWidth: 1 } })).toJSON();
24
- expect(tree).toMatchSnapshot();
29
+ it('Simple component render', () => {
30
+ let component;
31
+ act(() => {
32
+ component = renderer.create(_jsx(CompBase, { style: { width: 30, height: 20, borderColor: 'green', borderWidth: 1 } }));
25
33
  });
34
+ expect(component.toJSON()).toMatchSnapshot();
35
+ });
26
36
  });
27
- //# sourceMappingURL=buildUseSlots.test.js.map
37
+ //# sourceMappingURL=buildUseSlots.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildUseSlots.test.js","sourceRoot":"","sources":["../src/buildUseSlots.test.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,MAAM,YAAY,GAAG,aAAa,CAAa;IAC7C,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI;KACd;CACF,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAgB,EAAE,EAAE;IACpD,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,OAAO,CAAC,KAAgB,EAAE,EAAE;QAC1B,MAAM,MAAM,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;QACtC,OAAO,CACL,UAAC,KAAK,CAAC,KAAK,OAAK,MAAM;YACrB,UAAC,KAAK,CAAC,KAAK,IAAC,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;gBACpE,UAAC,KAAK,CAAC,OAAO,gBAAsB,CACxB,CACF,CACf,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,Q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IAAC,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,YACpE,KAAC,KAAK,CAAC,OAAO,wBAAsB,GACxB,GACF,CACf,CAAC;IAAA,CACH,CAAC;AAAA,CACH,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE,CAAC;IACzC,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC;QAClC,IAAI,SAAqC,CAAC;QAC1C,GAAG,CAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,GAAI,CAAC,CAAC;QAAA,CACnH,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC/C,CAAC,CAAC;AAAA,CACJ,CAAC,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { buildUseSlots } from './buildUseSlots';
2
2
  export type { GetSlotProps, Slots, UseSlotOptions, UseSlotsBase } from './buildUseSlots';
3
- //# sourceMappingURL=index.d.ts.map
3
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export { buildUseSlots } from './buildUseSlots';
2
- //# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=useSlots.samples.test.d.ts.map
2
+ //# sourceMappingURL=useSlots.samples.test.d.ts.map