@fluentui-copilot/react-prompt-starter 0.0.0-nightly-20250708-1433-52f2b6b1.1 → 0.0.0-nightly-20250709-0404-150e065c.1

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.
Files changed (71) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  3. package/lib/PromptStarter.js +1 -0
  4. package/lib/PromptStarterList.js +1 -0
  5. package/lib/PromptStarterV2.js +1 -0
  6. package/lib/components/PromptStarter/PromptStarter.js +6 -5
  7. package/lib/components/PromptStarter/PromptStarter.types.js +2 -1
  8. package/lib/components/PromptStarter/index.js +1 -0
  9. package/lib/components/PromptStarter/renderPromptStarter.js +9 -16
  10. package/lib/components/PromptStarter/usePromptStarter.js +44 -42
  11. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.js +6 -5
  12. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +2 -1
  13. package/lib/components/PromptStarterV2/PromptStarter/index.js +1 -0
  14. package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +50 -61
  15. package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +9 -15
  16. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +51 -49
  17. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +6 -5
  18. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +2 -1
  19. package/lib/components/PromptStarterV2/PromptStarterList/index.js +1 -0
  20. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +14 -15
  21. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +97 -97
  22. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +7 -4
  23. package/lib/contexts/PromptStarterListContext.js +3 -2
  24. package/lib/index.js +1 -0
  25. package/lib-commonjs/PromptStarter.js +1 -0
  26. package/lib-commonjs/PromptStarterList.js +1 -0
  27. package/lib-commonjs/PromptStarterV2.js +1 -0
  28. package/lib-commonjs/components/PromptStarter/PromptStarter.js +1 -1
  29. package/lib-commonjs/components/PromptStarter/PromptStarter.js.map +1 -1
  30. package/lib-commonjs/components/PromptStarter/PromptStarter.types.js +1 -0
  31. package/lib-commonjs/components/PromptStarter/index.js +1 -0
  32. package/lib-commonjs/components/PromptStarter/renderPromptStarter.js +1 -1
  33. package/lib-commonjs/components/PromptStarter/renderPromptStarter.js.map +1 -1
  34. package/lib-commonjs/components/PromptStarter/usePromptStarter.js +1 -1
  35. package/lib-commonjs/components/PromptStarter/usePromptStarter.js.map +1 -1
  36. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js +1 -1
  37. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js.map +1 -1
  38. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +1 -0
  39. package/lib-commonjs/components/PromptStarterV2/PromptStarter/index.js +1 -0
  40. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +1 -1
  41. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -1
  42. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +1 -1
  43. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -1
  44. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +1 -1
  45. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
  46. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +1 -1
  47. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -1
  48. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +1 -0
  49. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js +1 -0
  50. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +1 -1
  51. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -1
  52. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +1 -1
  53. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -1
  54. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +1 -1
  55. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -1
  56. package/lib-commonjs/contexts/PromptStarterListContext.js +1 -1
  57. package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -1
  58. package/lib-commonjs/index.js +1 -0
  59. package/package.json +3 -3
  60. package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -94
  61. package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
  62. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -119
  63. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
  64. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +0 -61
  65. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +0 -1
  66. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -112
  67. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
  68. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -137
  69. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
  70. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +0 -77
  71. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +0 -1
@@ -11,103 +11,103 @@ import { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';
11
11
  *
12
12
  * @param props - props from this instance of PromptStarterList
13
13
  * @param ref - reference to root HTMLElement of PromptStarterList
14
- */ export const usePromptStarterList_unstable = (props, ref)=>{
15
- const { arrowNavigationOptions, expandButtonLabel = 'Show more', collapseButtonLabel = 'Show less' } = props;
16
- const designVersion = useDesignVersion(props.designVersion);
17
- var _arrowNavigationOptions_axis, _arrowNavigationOptions_memorizeCurrent;
18
- const focusAttrs = useArrowNavigationGroup({
19
- ...arrowNavigationOptions,
20
- axis: (_arrowNavigationOptions_axis = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.axis) !== null && _arrowNavigationOptions_axis !== void 0 ? _arrowNavigationOptions_axis : 'grid-linear',
21
- memorizeCurrent: (_arrowNavigationOptions_memorizeCurrent = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.memorizeCurrent) !== null && _arrowNavigationOptions_memorizeCurrent !== void 0 ? _arrowNavigationOptions_memorizeCurrent : true
22
- });
23
- const [isExpanded, setIsExpanded] = React.useState(false);
24
- const [numberOfColumns, setNumberOfColumns] = React.useState(3);
25
- const gridWrapperRef = React.useRef(null);
26
- const { targetDocument } = useFluent();
27
- const win = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;
28
- React.useEffect(()=>{
29
- if (!win || !gridWrapperRef.current) return;
30
- const promptStarterGrid = gridWrapperRef.current;
31
- const updateNumberOfColumns = ()=>{
32
- const numColumns = win.getComputedStyle(promptStarterGrid).gridTemplateColumns.split(' ').length;
33
- setNumberOfColumns(numColumns);
34
- };
35
- const ro = new win.ResizeObserver(updateNumberOfColumns);
36
- ro.observe(promptStarterGrid);
37
- return ()=>{
38
- ro.unobserve(promptStarterGrid);
39
- };
40
- }, [
41
- win
42
- ]);
43
- const state = {
44
- numberOfColumns: numberOfColumns,
45
- isExpanded,
46
- designVersion,
47
- components: {
48
- root: 'div',
49
- gridWrapper: 'div',
50
- expandButton: Button
51
- },
52
- root: slot.always(getIntrinsicElementProps('div', {
53
- ref,
54
- ...props
55
- }), {
56
- elementType: 'div'
57
- }),
58
- gridWrapper: slot.always(props.gridWrapper, {
59
- defaultProps: {
60
- role: 'group',
61
- ...focusAttrs
62
- },
63
- elementType: 'div'
64
- }),
65
- expandButton: slot.optional(props.expandButton, {
66
- defaultProps: {
67
- appearance: 'subtle',
68
- size: 'small',
69
- shape: 'rounded',
70
- icon: /*#__PURE__*/ React.createElement(ChevronDown12Regular, null),
71
- iconPosition: 'after',
72
- 'aria-expanded': isExpanded,
73
- children: isExpanded ? collapseButtonLabel : expandButtonLabel
74
- },
75
- renderByDefault: true,
76
- elementType: Button
77
- })
14
+ */
15
+ export const usePromptStarterList_unstable = (props, ref) => {
16
+ const {
17
+ arrowNavigationOptions,
18
+ expandButtonLabel = 'Show more',
19
+ collapseButtonLabel = 'Show less'
20
+ } = props;
21
+ const designVersion = useDesignVersion(props.designVersion);
22
+ var _arrowNavigationOptions_axis, _arrowNavigationOptions_memorizeCurrent;
23
+ const focusAttrs = useArrowNavigationGroup({
24
+ ...arrowNavigationOptions,
25
+ axis: (_arrowNavigationOptions_axis = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.axis) !== null && _arrowNavigationOptions_axis !== void 0 ? _arrowNavigationOptions_axis : 'grid-linear',
26
+ memorizeCurrent: (_arrowNavigationOptions_memorizeCurrent = arrowNavigationOptions === null || arrowNavigationOptions === void 0 ? void 0 : arrowNavigationOptions.memorizeCurrent) !== null && _arrowNavigationOptions_memorizeCurrent !== void 0 ? _arrowNavigationOptions_memorizeCurrent : true
27
+ });
28
+ const [isExpanded, setIsExpanded] = React.useState(false);
29
+ const [numberOfColumns, setNumberOfColumns] = React.useState(3);
30
+ const gridWrapperRef = React.useRef(null);
31
+ const {
32
+ targetDocument
33
+ } = useFluent();
34
+ const win = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;
35
+ React.useEffect(() => {
36
+ if (!win || !gridWrapperRef.current) return;
37
+ const promptStarterGrid = gridWrapperRef.current;
38
+ const updateNumberOfColumns = () => {
39
+ const numColumns = win.getComputedStyle(promptStarterGrid).gridTemplateColumns.split(' ').length;
40
+ setNumberOfColumns(numColumns);
78
41
  };
79
- state.gridWrapper.ref = useMergedRefs(gridWrapperRef, state.gridWrapper.ref);
80
- // Get the array of children.
81
- const childrenArray = React.useMemo(()=>{
82
- return React.Children.toArray(state.root.children);
83
- }, [
84
- state.root.children
85
- ]);
86
- // Add motion to the children.
87
- const childrenWithMotion = React.useMemo(()=>childrenArray.map((child, index)=>{
88
- // Throw error if the child is not a valid React element or is a Fragment.
89
- if (!/*#__PURE__*/ React.isValidElement(child) || child.type === React.Fragment) {
90
- throw new Error('You should only use PromptStarter components as the children of PromptStarterList.');
91
- }
92
- // In the collapsed state, if there is one column, we show three children.
93
- // If there are two or three columns, we show two or three. All children
94
- // are shown in the expanded state.
95
- const visibility = numberOfColumns === 1 && index < 3 || index < numberOfColumns || isExpanded;
96
- return /*#__PURE__*/ React.createElement(PromptStarterMotion, {
97
- appear: true,
98
- key: index,
99
- index: index,
100
- visible: visibility,
101
- numberOfColumns: numberOfColumns
102
- }, child);
103
- }), [
104
- childrenArray,
105
- numberOfColumns,
106
- isExpanded
107
- ]);
108
- state.root.children = childrenWithMotion;
109
- if (state.expandButton) {
110
- state.expandButton.onClick = mergeCallbacks(state.expandButton.onClick, ()=>setIsExpanded(!isExpanded));
42
+ const ro = new win.ResizeObserver(updateNumberOfColumns);
43
+ ro.observe(promptStarterGrid);
44
+ return () => {
45
+ ro.unobserve(promptStarterGrid);
46
+ };
47
+ }, [win]);
48
+ const state = {
49
+ numberOfColumns: numberOfColumns,
50
+ isExpanded,
51
+ designVersion,
52
+ components: {
53
+ root: 'div',
54
+ gridWrapper: 'div',
55
+ expandButton: Button
56
+ },
57
+ root: slot.always(getIntrinsicElementProps('div', {
58
+ ref,
59
+ ...props
60
+ }), {
61
+ elementType: 'div'
62
+ }),
63
+ gridWrapper: slot.always(props.gridWrapper, {
64
+ defaultProps: {
65
+ role: 'group',
66
+ ...focusAttrs
67
+ },
68
+ elementType: 'div'
69
+ }),
70
+ expandButton: slot.optional(props.expandButton, {
71
+ defaultProps: {
72
+ appearance: 'subtle',
73
+ size: 'small',
74
+ shape: 'rounded',
75
+ icon: /*#__PURE__*/React.createElement(ChevronDown12Regular, null),
76
+ iconPosition: 'after',
77
+ 'aria-expanded': isExpanded,
78
+ children: isExpanded ? collapseButtonLabel : expandButtonLabel
79
+ },
80
+ renderByDefault: true,
81
+ elementType: Button
82
+ })
83
+ };
84
+ state.gridWrapper.ref = useMergedRefs(gridWrapperRef, state.gridWrapper.ref);
85
+ // Get the array of children.
86
+ const childrenArray = React.useMemo(() => {
87
+ return React.Children.toArray(state.root.children);
88
+ }, [state.root.children]);
89
+ // Add motion to the children.
90
+ const childrenWithMotion = React.useMemo(() => childrenArray.map((child, index) => {
91
+ // Throw error if the child is not a valid React element or is a Fragment.
92
+ if (! /*#__PURE__*/React.isValidElement(child) || child.type === React.Fragment) {
93
+ throw new Error('You should only use PromptStarter components as the children of PromptStarterList.');
111
94
  }
112
- return state;
95
+ // In the collapsed state, if there is one column, we show three children.
96
+ // If there are two or three columns, we show two or three. All children
97
+ // are shown in the expanded state.
98
+ const visibility = numberOfColumns === 1 && index < 3 || index < numberOfColumns || isExpanded;
99
+ return /*#__PURE__*/React.createElement(PromptStarterMotion, {
100
+ appear: true,
101
+ key: index,
102
+ index: index,
103
+ visible: visibility,
104
+ numberOfColumns: numberOfColumns
105
+ }, child);
106
+ }), [childrenArray, numberOfColumns, isExpanded]);
107
+ state.root.children = childrenWithMotion;
108
+ if (state.expandButton) {
109
+ state.expandButton.onClick = mergeCallbacks(state.expandButton.onClick, () => setIsExpanded(!isExpanded));
110
+ }
111
+ return state;
113
112
  };
113
+ //# sourceMappingURL=usePromptStarterList.js.map
@@ -1,6 +1,9 @@
1
1
  export function usePromptStarterListContextValues(state) {
2
- const { numberOfColumns } = state;
3
- return {
4
- numberOfColumns
5
- };
2
+ const {
3
+ numberOfColumns
4
+ } = state;
5
+ return {
6
+ numberOfColumns
7
+ };
6
8
  }
9
+ //# sourceMappingURL=usePromptStarterListContextValues.js.map
@@ -1,7 +1,8 @@
1
1
  import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
2
  export const PromptStarterListContext = createContext(undefined);
3
3
  const promptStarterListContextDefaultValue = {
4
- numberOfColumns: 3
4
+ numberOfColumns: 3
5
5
  };
6
- export const usePromptStarterListContext = (selector)=>useContextSelector(PromptStarterListContext, (ctx = promptStarterListContextDefaultValue)=>selector(ctx));
6
+ export const usePromptStarterListContext = selector => useContextSelector(PromptStarterListContext, (ctx = promptStarterListContextDefaultValue) => selector(ctx));
7
7
  export const PromptStarterListProvider = PromptStarterListContext.Provider;
8
+ //# sourceMappingURL=PromptStarterListContext.js.map
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { PromptStarter, promptStarterClassNames, renderPromptStarter_unstable, usePromptStarterStyles_unstable, usePromptStarter_unstable } from './PromptStarter';
2
2
  export { PromptStarter as PromptStarterV2, promptStarterClassNames as promptStarterV2ClassNames, renderPromptStarter_unstable as renderPromptStarterV2_unstable, usePromptStarterStyles_unstable as usePromptStarterV2Styles_unstable, usePromptStarter_unstable as usePromptStarterV2_unstable } from './PromptStarterV2';
3
3
  export { PromptStarterList, renderPromptStarterList_unstable, usePromptStarterList_unstable, promptStarterListClassNames, usePromptStarterListStyles_unstable } from './PromptStarterList';
4
+ //# sourceMappingURL=index.js.map
@@ -26,3 +26,4 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _index = require("./components/PromptStarter/index");
29
+ //# sourceMappingURL=PromptStarter.js.map
@@ -26,3 +26,4 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _index = require("./components/PromptStarterV2/PromptStarterList/index");
29
+ //# sourceMappingURL=PromptStarterList.js.map
@@ -26,3 +26,4 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _index = require("./components/PromptStarterV2/PromptStarter/index");
29
+ //# sourceMappingURL=PromptStarterV2.js.map
@@ -20,4 +20,4 @@ const PromptStarter = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
20
20
  (0, _reactprovider.useCustomStyleHook)('usePromptStarterStyles')(state);
21
21
  return (0, _renderPromptStarter.renderPromptStarter_unstable)(state);
22
22
  });
23
- PromptStarter.displayName = 'PromptStarter';
23
+ PromptStarter.displayName = 'PromptStarter'; //# sourceMappingURL=PromptStarter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PromptStarter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarter_unstable } from './usePromptStarter';\nimport { renderPromptStarter_unstable } from './renderPromptStarter';\nimport { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport type { PromptStarterProps } from './PromptStarter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const PromptStarter: ForwardRefComponent<PromptStarterProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarter_unstable(props, ref);\n\n usePromptStarterStyles_unstable(state);\n useCustomStyleHook('usePromptStarterStyles')(state);\n\n return renderPromptStarter_unstable(state);\n});\n\nPromptStarter.displayName = 'PromptStarter';\n"],"names":["PromptStarter","React","forwardRef","props","ref","state","usePromptStarter_unstable","usePromptStarterStyles_unstable","useCustomStyleHook","renderPromptStarter_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;kCACmB;qCACG;8CACG;+BACb;AAI5B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChCG,IAAAA,iCAAAA,EAAmB,0BAA0BH;IAE7C,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
1
+ {"version":3,"sources":["PromptStarter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarter_unstable } from './usePromptStarter';\nimport { renderPromptStarter_unstable } from './renderPromptStarter';\nimport { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport type { PromptStarterProps } from './PromptStarter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const PromptStarter: ForwardRefComponent<PromptStarterProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarter_unstable(props, ref);\n\n usePromptStarterStyles_unstable(state);\n useCustomStyleHook('usePromptStarterStyles')(state);\n\n return renderPromptStarter_unstable(state);\n});\n\nPromptStarter.displayName = 'PromptStarter';\n"],"names":["PromptStarter","React","forwardRef","props","state","usePromptStarter_unstable","usePromptStarterStyles_unstable","useCustomStyleHook","renderPromptStarter_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;kCACmB;qCACG;8CACG;+BACb;AAI5B,MAAMA,gBAAAA,WAAAA,GAAAA,OAAyDC,UAAMC,CAAU,CAACC,OAACA;UACtFC,QAAMA,IAAAA,2CAAQC,EAAAA,OAA0BF;qEAExCG,EAAAA;yCACAC,EAAAA,0BAAmBH;WAEnBI,IAAAA,iDAAOA,EAAAA;AACT;AAEAR,cAAcS,WAAW,GAAG"}
@@ -4,3 +4,4 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ //# sourceMappingURL=PromptStarter.types.js.map
@@ -29,3 +29,4 @@ const _PromptStarter = require("./PromptStarter");
29
29
  const _renderPromptStarter = require("./renderPromptStarter");
30
30
  const _usePromptStarter = require("./usePromptStarter");
31
31
  const _usePromptStarterStylesstyles = require("./usePromptStarterStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -25,4 +25,4 @@ const renderPromptStarter_unstable = (state)=>{
25
25
  state.prompt && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.prompt, {})
26
26
  ]
27
27
  });
28
- };
28
+ }; //# sourceMappingURL=renderPromptStarter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\nexport const renderPromptStarter_unstable = (state: PromptStarterState) => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.icon />\n <state.category>\n {state.category.children} {state.badge && <state.badge />}\n </state.category>\n {state.prompt && <state.prompt />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","_jsx","icon","category","children","badge","prompt"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;4BALb;iCAE4B;AAGrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;0BACTC,IAAAA,eAAA,EAACJ,MAAMK,IAAI,EAAA,CAAA;0BACXH,IAAAA,gBAAA,EAACF,MAAMM,QAAQ,EAAA;;oBACZN,MAAMM,QAAQ,CAACC,QAAQ;oBAAC;oBAAEP,MAAMQ,KAAK,IAAA,WAAA,GAAIJ,IAAAA,eAAA,EAACJ,MAAMQ,KAAK,EAAA,CAAA;;;YAEvDR,MAAMS,MAAM,IAAA,WAAA,GAAIL,IAAAA,eAAA,EAACJ,MAAMS,MAAM,EAAA,CAAA;;;AAGpC"}
1
+ {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\nexport const renderPromptStarter_unstable = (state: PromptStarterState) => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.icon />\n <state.category>\n {state.category.children} {state.badge && <state.badge />}\n </state.category>\n {state.prompt && <state.prompt />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","icon","badge","_jsx","category","prompt"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;4BALb;iCAE4B;AAGrB,MAAMA,+BAA+BC,CAAAA;oCAC1CC,EAAAA;WAEA,WAAA,GAAAC,IAAAA,gBACE,EAAAF,MAACA,IAAMG,EAAAA;;;;;kCACJH,CAAAA,QAAMI;oBAAI;oBAAAJ,MAAAK,KAAA,IAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAN,MAAAK,KAAA,EAAA,CAAA;iBAAA;;uCACVL,GAAAA,IAAAA,eAAMO,EAAAA,MAAQC,MAAA,EAAA,CAAA;SAAA;;kDACY"}
@@ -52,4 +52,4 @@ const usePromptStarter_unstable = (props, ref)=>{
52
52
  }),
53
53
  designVersion
54
54
  };
55
- };
55
+ }; //# sourceMappingURL=usePromptStarter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { Badge, getIntrinsicElementProps, slot, useId } from '@fluentui/react-components';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLButtonElement>,\n): PromptStarterState => {\n const designVersion = useDesignVersion(props.designVersion);\n const idPrefix = useId('prompt-starter');\n\n return {\n components: {\n root: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n badge: Badge,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-labelledby': `${idPrefix}-category`,\n 'aria-describedby': `${idPrefix}-prompt`,\n ...props,\n }),\n { elementType: 'button' },\n ),\n icon: slot.always(props.icon, { elementType: 'span' }),\n category: slot.always(props.category, { defaultProps: { id: `${idPrefix}-category` }, elementType: 'span' }),\n prompt: slot.optional(props.prompt, { defaultProps: { id: `${idPrefix}-prompt` }, elementType: 'span' }),\n badge: slot.optional(props.badge, { defaultProps: { appearance: 'tint' }, elementType: Badge }),\n designVersion,\n };\n};\n"],"names":["usePromptStarter_unstable","props","ref","designVersion","useDesignVersion","idPrefix","useId","components","root","icon","category","prompt","badge","Badge","slot","always","getIntrinsicElementProps","elementType","defaultProps","id","optional","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;+BAboB;iCAC4B;AAYtD,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,gBAAgBC,IAAAA,+BAAAA,EAAiBH,MAAME,aAAa;IAC1D,MAAME,WAAWC,IAAAA,sBAAAA,EAAM;IAEvB,OAAO;QACLC,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;YACRC,OAAOC,sBAAAA;QACT;QACAL,MAAMM,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,UAAU;YACjCd;YACA,mBAAmB,CAAC,EAAEG,SAAS,SAAS,CAAC;YACzC,oBAAoB,CAAC,EAAEA,SAAS,OAAO,CAAC;YACxC,GAAGJ,KAAK;QACV,IACA;YAAEgB,aAAa;QAAS;QAE1BR,MAAMK,qBAAAA,CAAKC,MAAM,CAACd,MAAMQ,IAAI,EAAE;YAAEQ,aAAa;QAAO;QACpDP,UAAUI,qBAAAA,CAAKC,MAAM,CAACd,MAAMS,QAAQ,EAAE;YAAEQ,cAAc;gBAAEC,IAAI,CAAC,EAAEd,SAAS,SAAS,CAAC;YAAC;YAAGY,aAAa;QAAO;QAC1GN,QAAQG,qBAAAA,CAAKM,QAAQ,CAACnB,MAAMU,MAAM,EAAE;YAAEO,cAAc;gBAAEC,IAAI,CAAC,EAAEd,SAAS,OAAO,CAAC;YAAC;YAAGY,aAAa;QAAO;QACtGL,OAAOE,qBAAAA,CAAKM,QAAQ,CAACnB,MAAMW,KAAK,EAAE;YAAEM,cAAc;gBAAEG,YAAY;YAAO;YAAGJ,aAAaJ,sBAAAA;QAAM;QAC7FV;IACF;AACF"}
1
+ {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { Badge, getIntrinsicElementProps, slot, useId } from '@fluentui/react-components';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLButtonElement>,\n): PromptStarterState => {\n const designVersion = useDesignVersion(props.designVersion);\n const idPrefix = useId('prompt-starter');\n\n return {\n components: {\n root: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n badge: Badge,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-labelledby': `${idPrefix}-category`,\n 'aria-describedby': `${idPrefix}-prompt`,\n ...props,\n }),\n { elementType: 'button' },\n ),\n icon: slot.always(props.icon, { elementType: 'span' }),\n category: slot.always(props.category, { defaultProps: { id: `${idPrefix}-category` }, elementType: 'span' }),\n prompt: slot.optional(props.prompt, { defaultProps: { id: `${idPrefix}-prompt` }, elementType: 'span' }),\n badge: slot.optional(props.badge, { defaultProps: { appearance: 'tint' }, elementType: Badge }),\n designVersion,\n };\n};\n"],"names":["designVersion","useDesignVersion","useId","props","idPrefix","components","root","icon","category","prompt","badge","Badge","ref","elementType","defaultProps","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBQA;;;eAAAA;;;+BAjByB;iCAC4B;AAgB3D,MAAMA,4BAAgBC,CAAAA,OAAuBD;UAC7CA,gBAAiBE,IAAAA,+BAAM,EAAAC,MAAAH,aAAA;UAEvBI,WAAOF,IAAAA,sBAAA,EAAA;WACLG;oBACEC;kBACAC;kBACAC;sBACAC;oBACAC;mBACFC,sBAAA;;mCAGIC,CAAAA,MAAAA,CAAAA,IAAAA,yCAAAA,EAAAA,UAAAA;;+BAEA,CAAA,EAAAR,SAAuBA,SAAS,CAAA;gCACxB,CAAA,EAAAA,SAAA,OAAA,CAAA;eACVD,KACA;;yBAAwB;;mCAEMU,CAAAA,MAAAA,CAAAA,MAAaN,IAAA,EAAA;yBAAO;;kBACZO,qBAAAA,CAAAA,MAAAA,CAAcX,MAAAK,QAAA,EAAA;0BAAM;oBAAuB,CAAA,EAAAJ,SAAA,SAAA,CAAA;;yBAAuB;;gBACpEU,qBAAAA,CAAAA,QAAAA,CAAcX,MAAAM,MAAA,EAAA;0BAAM;oBAAqB,CAAA,EAAAL,SAAA,OAAA,CAAA;;yBAAuB;;oCAClEU,CAAAA,QAAAA,CAAAA,MAAcJ,KAAA,EAAA;0BAAEK;4BAAmB;;yBAAsBJ,sBAAA;;QAE/FX;IACA"}
@@ -20,4 +20,4 @@ const PromptStarter = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
20
20
  (0, _reactprovider.useCustomStyleHook)('usePromptStarterStyles')(state);
21
21
  return (0, _renderPromptStarter.renderPromptStarter_unstable)(state);
22
22
  });
23
- PromptStarter.displayName = 'PromptStarter';
23
+ PromptStarter.displayName = 'PromptStarter'; //# sourceMappingURL=PromptStarter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PromptStarter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarter_unstable } from './usePromptStarter';\nimport { renderPromptStarter_unstable } from './renderPromptStarter';\nimport { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport type { PromptStarterProps } from './PromptStarter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const PromptStarter: ForwardRefComponent<PromptStarterProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarter_unstable(props, ref);\n\n usePromptStarterStyles_unstable(state);\n useCustomStyleHook('usePromptStarterStyles')(state);\n\n return renderPromptStarter_unstable(state);\n});\n\nPromptStarter.displayName = 'PromptStarter';\n"],"names":["PromptStarter","React","forwardRef","props","ref","state","usePromptStarter_unstable","usePromptStarterStyles_unstable","useCustomStyleHook","renderPromptStarter_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;kCACmB;qCACG;8CACG;+BACb;AAI5B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChCG,IAAAA,iCAAAA,EAAmB,0BAA0BH;IAE7C,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
1
+ {"version":3,"sources":["PromptStarter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarter_unstable } from './usePromptStarter';\nimport { renderPromptStarter_unstable } from './renderPromptStarter';\nimport { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport type { PromptStarterProps } from './PromptStarter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const PromptStarter: ForwardRefComponent<PromptStarterProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarter_unstable(props, ref);\n\n usePromptStarterStyles_unstable(state);\n useCustomStyleHook('usePromptStarterStyles')(state);\n\n return renderPromptStarter_unstable(state);\n});\n\nPromptStarter.displayName = 'PromptStarter';\n"],"names":["PromptStarter","React","forwardRef","props","state","usePromptStarter_unstable","usePromptStarterStyles_unstable","useCustomStyleHook","renderPromptStarter_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;kCACmB;qCACG;8CACG;+BACb;AAI5B,MAAMA,gBAAAA,WAAAA,GAAAA,OAAyDC,UAAMC,CAAU,CAACC,OAACA;UACtFC,QAAMA,IAAAA,2CAAQC,EAAAA,OAA0BF;qEAExCG,EAAAA;yCACAC,EAAAA,0BAAmBH;WAEnBI,IAAAA,iDAAOA,EAAAA;AACT;AAEAR,cAAcS,WAAW,GAAG"}
@@ -4,3 +4,4 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ //# sourceMappingURL=PromptStarter.types.js.map
@@ -29,3 +29,4 @@ const _PromptStarter = require("./PromptStarter");
29
29
  const _renderPromptStarter = require("./renderPromptStarter");
30
30
  const _usePromptStarter = require("./usePromptStarter");
31
31
  const _usePromptStarterStylesstyles = require("./usePromptStarterStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -70,4 +70,4 @@ const PromptStarterMotion = (0, _reactcomponents.createPresenceComponent)(({ ind
70
70
  duration: opacityExitDuration
71
71
  }
72
72
  };
73
- });
73
+ }); //# sourceMappingURL=promptStarterMotion.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["promptStarterMotion.ts"],"sourcesContent":["import { createPresenceComponent } from '@fluentui/react-components';\n\nexport type PromptStarterMotionParams = { index: number; numberOfColumns: number };\n\nexport const PromptStarterMotion: ReturnType<typeof createPresenceComponent<PromptStarterMotionParams>> =\n createPresenceComponent<PromptStarterMotionParams>(({ index, numberOfColumns }) => {\n const isFirstRow = index < numberOfColumns;\n const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;\n\n const opacityDuration = 100;\n const opacityOffset = delay / (delay + opacityDuration);\n const opacityEasing = 'linear';\n\n const scaleDuration = 500;\n const scaleOffset = delay / (delay + scaleDuration);\n const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;\n\n const opacityExitDuration = 200;\n\n return {\n enter: [\n {\n keyframes: [{ opacity: 0 }, { opacity: 0, offset: opacityOffset }, { opacity: 1 }],\n easing: opacityEasing,\n duration: opacityDuration + delay,\n },\n {\n keyframes: [\n { transform: 'scale(0.9)' },\n { transform: 'scale(0.9)', offset: scaleOffset },\n { transform: 'scale(1)' },\n ],\n easing: scaleEasing,\n duration: scaleDuration + delay,\n },\n ],\n exit: {\n keyframes: [{ opacity: 1 }, { opacity: 1 }, { opacity: 0 }],\n easing: opacityEasing,\n duration: opacityExitDuration,\n },\n };\n });\n"],"names":["PromptStarterMotion","createPresenceComponent","index","numberOfColumns","isFirstRow","delay","opacityDuration","opacityOffset","opacityEasing","scaleDuration","scaleOffset","scaleEasing","opacityExitDuration","enter","keyframes","opacity","offset","easing","duration","transform","exit"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;iCAJ2B;AAIjC,MAAMA,sBACXC,IAAAA,wCAAAA,EAAmD,CAAC,EAAEC,KAAK,EAAEC,eAAe,EAAE;IAC5E,MAAMC,aAAaF,QAAQC;IAC3B,MAAME,QAAQD,aAAaF,QAAQ,KAAK,AAACA,CAAAA,QAAQC,eAAAA,IAAmB;IAEpE,MAAMG,kBAAkB;IACxB,MAAMC,gBAAgBF,QAASA,CAAAA,QAAQC,eAAAA;IACvC,MAAME,gBAAgB;IAEtB,MAAMC,gBAAgB;IACtB,MAAMC,cAAcL,QAASA,CAAAA,QAAQI,aAAAA;IACrC,MAAME,cAAc,CAAC,iCAAiC,CAAC;IAEvD,MAAMC,sBAAsB;IAE5B,OAAO;QACLC,OAAO;YACL;gBACEC,WAAW;oBAAC;wBAAEC,SAAS;oBAAE;oBAAG;wBAAEA,SAAS;wBAAGC,QAAQT;oBAAc;oBAAG;wBAAEQ,SAAS;oBAAE;iBAAE;gBAClFE,QAAQT;gBACRU,UAAUZ,kBAAkBD;YAC9B;YACA;gBACES,WAAW;oBACT;wBAAEK,WAAW;oBAAa;oBAC1B;wBAAEA,WAAW;wBAAcH,QAAQN;oBAAY;oBAC/C;wBAAES,WAAW;oBAAW;iBACzB;gBACDF,QAAQN;gBACRO,UAAUT,gBAAgBJ;YAC5B;SACD;QACDe,MAAM;YACJN,WAAW;gBAAC;oBAAEC,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;aAAE;YAC3DE,QAAQT;YACRU,UAAUN;QACZ;IACF;AACF"}
1
+ {"version":3,"sources":["promptStarterMotion.ts"],"sourcesContent":["import { createPresenceComponent } from '@fluentui/react-components';\n\nexport type PromptStarterMotionParams = { index: number; numberOfColumns: number };\n\nexport const PromptStarterMotion: ReturnType<typeof createPresenceComponent<PromptStarterMotionParams>> =\n createPresenceComponent<PromptStarterMotionParams>(({ index, numberOfColumns }) => {\n const isFirstRow = index < numberOfColumns;\n const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;\n\n const opacityDuration = 100;\n const opacityOffset = delay / (delay + opacityDuration);\n const opacityEasing = 'linear';\n\n const scaleDuration = 500;\n const scaleOffset = delay / (delay + scaleDuration);\n const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;\n\n const opacityExitDuration = 200;\n\n return {\n enter: [\n {\n keyframes: [{ opacity: 0 }, { opacity: 0, offset: opacityOffset }, { opacity: 1 }],\n easing: opacityEasing,\n duration: opacityDuration + delay,\n },\n {\n keyframes: [\n { transform: 'scale(0.9)' },\n { transform: 'scale(0.9)', offset: scaleOffset },\n { transform: 'scale(1)' },\n ],\n easing: scaleEasing,\n duration: scaleDuration + delay,\n },\n ],\n exit: {\n keyframes: [{ opacity: 1 }, { opacity: 1 }, { opacity: 0 }],\n easing: opacityEasing,\n duration: opacityExitDuration,\n },\n };\n });\n"],"names":["PromptStarterMotion","createPresenceComponent","delay","isFirstRow","opacityOffset","opacityEasing","index","numberOfColumns","opacityDuration","scaleDuration","opacityExitDuration","scaleOffset","enter","duration","keyframes","easing"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;iCAJ2B;AAIjC,MAAMA,sBACXC,IAAAA,wCAAAA,EAAmD,CAAC,OAClD,iBACMC;UAGNC,aAAMC,QAAgBF;UACtBA,QAAMG,aAAgBC,QAAA,KAAA,AAAAA,CAAAA,QAAAC,eAAA,IAAA;UAEtBC,kBAAsB;UACtBJ,gBAAoBF,QAASA,CAAAA,QAAQO,eAAY;UACjDJ,gBAAoB;UAEpBI,gBAAMC;UAENC,cAAOT,QAAAA,CAAAA,QAAAO,aAAA;UACLG,cAAO,CAAA,iCAAA,CAAA;gCACL;;;;;;;;;;;;;;;;;4CACoFV;;;2BAElFW;oBAAAA;mCACF;;;mCAEEC;;;;;;;;0CAEqCH;;;;;;;;;6BAGrCI;;;6BAEF;;;oBAEIV;sBACJS;;;mDAA4B"}
@@ -24,4 +24,4 @@ const renderPromptStarter_unstable = (state)=>{
24
24
  state.actions && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.actions, {})
25
25
  ]
26
26
  });
27
- };
27
+ }; //# sourceMappingURL=renderPromptStarter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\nexport const renderPromptStarter_unstable = (state: PromptStarterState) => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n <state.icon />\n <state.prompt />\n {state.reasonMarker && <state.reasonMarker />}\n </state.primaryAction>\n {state.actions && <state.actions />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","primaryAction","_jsx","icon","prompt","reasonMarker","actions"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;4BALb;iCAE4B;AAGrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;0BACTD,IAAAA,gBAAA,EAACF,MAAMI,aAAa,EAAA;;kCAClBC,IAAAA,eAAA,EAACL,MAAMM,IAAI,EAAA,CAAA;kCACXD,IAAAA,eAAA,EAACL,MAAMO,MAAM,EAAA,CAAA;oBACZP,MAAMQ,YAAY,IAAA,WAAA,GAAIH,IAAAA,eAAA,EAACL,MAAMQ,YAAY,EAAA,CAAA;;;YAE3CR,MAAMS,OAAO,IAAA,WAAA,GAAIJ,IAAAA,eAAA,EAACL,MAAMS,OAAO,EAAA,CAAA;;;AAGtC"}
1
+ {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\nexport const renderPromptStarter_unstable = (state: PromptStarterState) => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n <state.icon />\n <state.prompt />\n {state.reasonMarker && <state.reasonMarker />}\n </state.primaryAction>\n {state.actions && <state.actions />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","_jsx","primaryAction","prompt","reasonMarker"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;4BALb;iCAE4B;AAGrB,MAAMA,+BAA+BC,CAAAA;oCAC1CC,EAAAA;WAEA,WAAA,GAAAC,IAAAA,gBACE,EAAAF,MAACA,IAAMG,EAAAA;;;;+BACL,GAAAC,IAAAA,eAACJ,EAAAA,MAAMK,IAAAA,EAAAA,CAAAA;oBAAa,WAAA,GAAAD,IAAAA,eAAA,EAAAJ,MAAAM,MAAA,EAAA,CAAA;oBAAAN,MAAAO,YAAA,IAAA,WAAA,GAAAH,IAAAA,eAAA,EAAAJ,MAAAO,YAAA,EAAA,CAAA;iBAAA;;;;;kDAGC"}
@@ -59,4 +59,4 @@ const usePromptStarter_unstable = (props, ref)=>{
59
59
  })
60
60
  };
61
61
  return state;
62
- };
62
+ }; //# sourceMappingURL=usePromptStarter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot, useFocusableGroup, useId } from '@fluentui/react-components';\nimport { usePromptStarterListContext } from '../../../contexts/PromptStarterListContext';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterState => {\n const id = useId('prompt-starter');\n const focusAttrs = useFocusableGroup();\n\n const numberOfColumns = usePromptStarterListContext(ctx => ctx.numberOfColumns);\n\n const state: PromptStarterState = {\n isSingleColumn: numberOfColumns === 1,\n components: {\n root: 'div',\n primaryAction: 'button',\n icon: 'span',\n prompt: 'span',\n reasonMarker: 'span',\n actions: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n 'aria-labelledby': `${id}-prompt`,\n 'aria-describedby': `${id}-icon, ${id}-reasonMarker`,\n ...focusAttrs,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n elementType: 'button',\n }),\n icon: slot.always(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n }),\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n }),\n actions: slot.optional(props.actions, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["usePromptStarter_unstable","props","ref","id","useId","focusAttrs","useFocusableGroup","numberOfColumns","usePromptStarterListContext","ctx","state","isSingleColumn","components","root","primaryAction","icon","prompt","reasonMarker","actions","slot","always","getIntrinsicElementProps","elementType","defaultProps","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;iCAb4D;0CAC7B;AAYrC,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,KAAKC,IAAAA,sBAAAA,EAAM;IACjB,MAAMC,aAAaC,IAAAA,kCAAAA;IAEnB,MAAMC,kBAAkBC,IAAAA,qDAAAA,EAA4BC,CAAAA,MAAOA,IAAIF,eAAe;IAE9E,MAAMG,QAA4B;QAChCC,gBAAgBJ,oBAAoB;QACpCK,YAAY;YACVC,MAAM;YACNC,eAAe;YACfC,MAAM;YACNC,QAAQ;YACRC,cAAc;YACdC,SAAS;QACX;QACAL,MAAMM,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,OAAO;YAC9BnB;YACA,mBAAmB,CAAC,EAAEC,GAAG,OAAO,CAAC;YACjC,oBAAoB,CAAC,EAAEA,GAAG,OAAO,EAAEA,GAAG,aAAa,CAAC;YACpD,GAAGE,UAAU;YACb,GAAGJ,KAAK;QACV,IACA;YAAEqB,aAAa;QAAM;QAEvBR,eAAeK,qBAAAA,CAAKC,MAAM,CAACnB,MAAMa,aAAa,EAAE;YAC9CQ,aAAa;QACf;QACAP,MAAMI,qBAAAA,CAAKC,MAAM,CAACnB,MAAMc,IAAI,EAAE;YAC5BQ,cAAc;gBAAEpB,IAAI,CAAC,EAAEA,GAAG,KAAK,CAAC;YAAC;YACjCmB,aAAa;QACf;QACAN,QAAQG,qBAAAA,CAAKC,MAAM,CAACnB,MAAMe,MAAM,EAAE;YAChCO,cAAc;gBAAEpB,IAAI,CAAC,EAAEA,GAAG,OAAO,CAAC;YAAC;YACnCmB,aAAa;QACf;QACAL,cAAcE,qBAAAA,CAAKK,QAAQ,CAACvB,MAAMgB,YAAY,EAAE;YAC9CM,cAAc;gBAAEpB,IAAI,CAAC,EAAEA,GAAG,aAAa,CAAC;YAAC;YACzCmB,aAAa;QACf;QACAJ,SAASC,qBAAAA,CAAKK,QAAQ,CAACvB,MAAMiB,OAAO,EAAE;YAAEI,aAAa;QAAO;IAC9D;IAEA,OAAOZ;AACT"}
1
+ {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot, useFocusableGroup, useId } from '@fluentui/react-components';\nimport { usePromptStarterListContext } from '../../../contexts/PromptStarterListContext';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterState => {\n const id = useId('prompt-starter');\n const focusAttrs = useFocusableGroup();\n\n const numberOfColumns = usePromptStarterListContext(ctx => ctx.numberOfColumns);\n\n const state: PromptStarterState = {\n isSingleColumn: numberOfColumns === 1,\n components: {\n root: 'div',\n primaryAction: 'button',\n icon: 'span',\n prompt: 'span',\n reasonMarker: 'span',\n actions: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n 'aria-labelledby': `${id}-prompt`,\n 'aria-describedby': `${id}-icon, ${id}-reasonMarker`,\n ...focusAttrs,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n elementType: 'button',\n }),\n icon: slot.always(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n }),\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n }),\n actions: slot.optional(props.actions, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["id","props","ref","focusAttrs","numberOfColumns","usePromptStarterListContext","ctx","isSingleColumn","root","primaryAction","prompt","reasonMarker","actions","elementType","defaultProps","icon","state"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBQA;;;eAAAA;;;iCAjBiE;0CAC7B;AAgB1C,MAAMA,4BAAW,CAAAC,OAAAC;UACjBF,KAAMG,IAAAA,sBAAAA,EAAAA;UAENA,aAAMC,IAAAA,kCAAkBC;UAExBD,kBAAkCC,IAAAA,qDAAA,EAAAC,CAAAA,MAAAA,IAAAF,eAAA;UAChCG,QAAAA;wBACYH,oBAAA;oBACVI;kBACAC;2BACM;kBACNC;oBACAC;0BACAC;qBACF;;mCAGIV,CAAAA,MAAAA,CAAAA,IAAAA,yCAAAA,EAAAA,OAAAA;;+BAEA,CAAA,EAAAF,GAAA,OAA0B,CAAA;gCACb,CAAA,EAAAA,GAAA,OAAA,EAAAA,GAAA,aAAA,CAAA;yBACVC;eACLA,KACA;;yBAAqB;;uBAGrBY,qBAAAA,CAAAA,MAAa,CAAAZ,MAAAQ,aAAA,EAAA;yBACf;;mCAEEK,CAAAA,MAAAA,CAAAA,MAAcC,IAAA,EAAA;0BAAM;oBAAa,CAAA,EAAAf,GAAA,KAAA,CAAA;;yBAEnC;;gBAEEc,qBAAAA,CAAAA,MAAAA,CAAAA,MAAcJ,MAAA,EAAA;0BAAM;oBAAe,CAAA,EAAAV,GAAA,OAAA,CAAA;;yBAErC;;sBAEEc,qBAAAA,CAAAA,QAAc,CAAAb,MAAAU,YAAA,EAAA;0BAAM;oBAAqB,CAAA,EAAAX,GAAA,aAAA,CAAA;;yBAE3C;;iBACwCa,qBAAAA,CAAAA,QAAa,CAAAZ,MAAAW,OAAA,EAAA;yBAAO;QAC9D;;IAGA,OAAAI"}
@@ -20,4 +20,4 @@ const PromptStarterList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
20
20
  (0, _usePromptStarterListStylesstyles.usePromptStarterListStyles_unstable)(state);
21
21
  return (0, _renderPromptStarterList.renderPromptStarterList_unstable)(state, contextValues);
22
22
  });
23
- PromptStarterList.displayName = 'PromptStarterList';
23
+ PromptStarterList.displayName = 'PromptStarterList'; //# sourceMappingURL=PromptStarterList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PromptStarterList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarterList_unstable } from './usePromptStarterList';\nimport { renderPromptStarterList_unstable } from './renderPromptStarterList';\nimport { usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';\nimport type { PromptStarterListProps } from './PromptStarterList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { usePromptStarterListContextValues } from './usePromptStarterListContextValues';\n\nexport const PromptStarterList: ForwardRefComponent<PromptStarterListProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarterList_unstable(props, ref);\n const contextValues = usePromptStarterListContextValues(state);\n\n usePromptStarterListStyles_unstable(state);\n return renderPromptStarterList_unstable(state, contextValues);\n});\n\nPromptStarterList.displayName = 'PromptStarterList';\n"],"names":["PromptStarterList","React","forwardRef","props","ref","state","usePromptStarterList_unstable","contextValues","usePromptStarterListContextValues","usePromptStarterListStyles_unstable","renderPromptStarterList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;sCACuB;yCACG;kDACG;mDAGF;AAE3C,MAAMA,oBAAAA,WAAAA,GAAiEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQC,IAAAA,mDAAAA,EAA8BH,OAAOC;IACnD,MAAMG,gBAAgBC,IAAAA,oEAAAA,EAAkCH;IAExDI,IAAAA,qEAAAA,EAAoCJ;IACpC,OAAOK,IAAAA,yDAAAA,EAAiCL,OAAOE;AACjD;AAEAP,kBAAkBW,WAAW,GAAG"}
1
+ {"version":3,"sources":["PromptStarterList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarterList_unstable } from './usePromptStarterList';\nimport { renderPromptStarterList_unstable } from './renderPromptStarterList';\nimport { usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';\nimport type { PromptStarterListProps } from './PromptStarterList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { usePromptStarterListContextValues } from './usePromptStarterListContextValues';\n\nexport const PromptStarterList: ForwardRefComponent<PromptStarterListProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarterList_unstable(props, ref);\n const contextValues = usePromptStarterListContextValues(state);\n\n usePromptStarterListStyles_unstable(state);\n return renderPromptStarterList_unstable(state, contextValues);\n});\n\nPromptStarterList.displayName = 'PromptStarterList';\n"],"names":["PromptStarterList","React","forwardRef","props","state","usePromptStarterList_unstable","contextValues","usePromptStarterListContextValues","usePromptStarterListStyles_unstable","renderPromptStarterList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;sCACuB;yCACG;kDACG;mDAGF;AAE3C,MAAMA,oBAAAA,WAAAA,GAAAA,OAAiEC,UAAMC,CAAU,CAACC,OAACA;UAC9FC,QAAMA,IAAAA,mDAAQC,EAAAA,OAA8BF;UAC5CG,gBAAMA,IAAAA,oEAAgBC,EAAAA;6EAEtBC,EAAAA;WACAC,IAAAA,yDAAOA,EAAAA,OAAiCL;AAC1C;AAEAJ,kBAAkBU,WAAW,GAAG"}
@@ -2,3 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
+ //# sourceMappingURL=PromptStarterList.types.js.map
@@ -29,3 +29,4 @@ const _PromptStarterList = require("./PromptStarterList");
29
29
  const _renderPromptStarterList = require("./renderPromptStarterList");
30
30
  const _usePromptStarterList = require("./usePromptStarterList");
31
31
  const _usePromptStarterListStylesstyles = require("./usePromptStarterListStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -26,4 +26,4 @@ const renderPromptStarterList_unstable = (state, contextValue)=>{
26
26
  ]
27
27
  })
28
28
  });
29
- };
29
+ }; //# sourceMappingURL=renderPromptStarterList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderPromptStarterList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, PresenceGroup } from '@fluentui/react-components';\nimport { PromptStarterListProvider } from '../../../contexts/PromptStarterListContext';\nimport type {\n PromptStarterListState,\n PromptStarterListSlots,\n PromptStarterListContextValue,\n} from './PromptStarterList.types';\n\n/**\n * Render the final JSX of PromptStarterList\n */\nexport const renderPromptStarterList_unstable = (\n state: PromptStarterListState,\n contextValue: PromptStarterListContextValue,\n) => {\n assertSlots<PromptStarterListSlots>(state);\n\n return (\n <PromptStarterListProvider value={contextValue}>\n <state.root>\n <PresenceGroup>\n <state.gridWrapper>{state.root.children}</state.gridWrapper>\n </PresenceGroup>\n {state.expandButton && <state.expandButton />}\n </state.root>\n </PromptStarterListProvider>\n );\n};\n"],"names":["renderPromptStarterList_unstable","state","contextValue","assertSlots","_jsx","PromptStarterListProvider","value","_jsxs","root","PresenceGroup","gridWrapper","children","expandButton"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;4BAbb;iCAE2C;0CACD;AAUnC,MAAMA,mCAAmC,CAC9CC,OACAC;IAEAC,IAAAA,4BAAAA,EAAoCF;IAEpC,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,mDAAAA,EAAAA;QAA0BC,OAAOJ;kBAChC,WAAA,GAAAK,IAAAA,gBAAA,EAACN,MAAMO,IAAI,EAAA;;8BACTJ,IAAAA,eAAA,EAACK,8BAAAA,EAAAA;8BACC,WAAA,GAAAL,IAAAA,eAAA,EAACH,MAAMS,WAAW,EAAA;kCAAET,MAAMO,IAAI,CAACG,QAAQ;;;gBAExCV,MAAMW,YAAY,IAAA,WAAA,GAAIR,IAAAA,eAAA,EAACH,MAAMW,YAAY,EAAA,CAAA;;;;AAIlD"}
1
+ {"version":3,"sources":["renderPromptStarterList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, PresenceGroup } from '@fluentui/react-components';\nimport { PromptStarterListProvider } from '../../../contexts/PromptStarterListContext';\nimport type {\n PromptStarterListState,\n PromptStarterListSlots,\n PromptStarterListContextValue,\n} from './PromptStarterList.types';\n\n/**\n * Render the final JSX of PromptStarterList\n */\nexport const renderPromptStarterList_unstable = (\n state: PromptStarterListState,\n contextValue: PromptStarterListContextValue,\n) => {\n assertSlots<PromptStarterListSlots>(state);\n\n return (\n <PromptStarterListProvider value={contextValue}>\n <state.root>\n <PresenceGroup>\n <state.gridWrapper>{state.root.children}</state.gridWrapper>\n </PresenceGroup>\n {state.expandButton && <state.expandButton />}\n </state.root>\n </PromptStarterListProvider>\n );\n};\n"],"names":["assertSlots","state","value","contextValue","_jsx","PresenceGroup","gridWrapper"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBEA;;;eAAAA;;;4BAjBF;iCAE2C;0CACD;AAcxCA,MAAAA,mCAAoCC,CAAAA,OAAAA;oCAEpC,EAAAA;WAC6BC,WAAOC,GAAAA,IAAAA,eAAAA,EAAAA,mDAAAA,EAAAA;;;;8BAE9BC,IAAAA,eAAA,EAACC,8BAAAA,EAAAA;4CACCD,IAAAA,eAAA,EAAAH,MAAAK,WAACL,EAAMK;qDAAaL"}
@@ -113,4 +113,4 @@ const usePromptStarterList_unstable = (props, ref)=>{
113
113
  state.expandButton.onClick = (0, _reactcomponents.mergeCallbacks)(state.expandButton.onClick, ()=>setIsExpanded(!isExpanded));
114
114
  }
115
115
  return state;
116
- };
116
+ }; //# sourceMappingURL=usePromptStarterList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarterList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n slot,\n Button,\n useArrowNavigationGroup,\n mergeCallbacks,\n useFluent,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport type { PromptStarterListProps, PromptStarterListState } from './PromptStarterList.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { ChevronDown12Regular } from '@fluentui/react-icons';\nimport { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';\n\n/**\n * Create the state required to render PromptStarterList.\n *\n * The returned state can be modified with hooks such as usePromptStarterListStyles_unstable,\n * before being passed to renderPromptStarterList_unstable.\n *\n * @param props - props from this instance of PromptStarterList\n * @param ref - reference to root HTMLElement of PromptStarterList\n */\nexport const usePromptStarterList_unstable = (\n props: PromptStarterListProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterListState => {\n const { arrowNavigationOptions, expandButtonLabel = 'Show more', collapseButtonLabel = 'Show less' } = props;\n const designVersion = useDesignVersion(props.designVersion);\n const focusAttrs = useArrowNavigationGroup({\n ...arrowNavigationOptions,\n axis: arrowNavigationOptions?.axis ?? 'grid-linear',\n memorizeCurrent: arrowNavigationOptions?.memorizeCurrent ?? true,\n });\n\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [numberOfColumns, setNumberOfColumns] = React.useState<number>(3);\n\n const gridWrapperRef = React.useRef<HTMLDivElement>(null);\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n React.useEffect(() => {\n if (!win || !gridWrapperRef.current) return;\n\n const promptStarterGrid = gridWrapperRef.current;\n\n const updateNumberOfColumns = () => {\n const numColumns = win.getComputedStyle(promptStarterGrid).gridTemplateColumns.split(' ').length;\n setNumberOfColumns(numColumns);\n };\n\n const ro = new win.ResizeObserver(updateNumberOfColumns);\n ro.observe(promptStarterGrid);\n\n return () => {\n ro.unobserve(promptStarterGrid);\n };\n }, [win]);\n\n const state: PromptStarterListState = {\n numberOfColumns: numberOfColumns,\n isExpanded,\n designVersion,\n components: {\n root: 'div',\n gridWrapper: 'div',\n expandButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n gridWrapper: slot.always(props.gridWrapper, {\n defaultProps: {\n role: 'group',\n ...focusAttrs,\n },\n elementType: 'div',\n }),\n expandButton: slot.optional(props.expandButton, {\n defaultProps: {\n appearance: 'subtle',\n size: 'small',\n shape: 'rounded',\n icon: <ChevronDown12Regular />,\n iconPosition: 'after',\n 'aria-expanded': isExpanded,\n children: isExpanded ? collapseButtonLabel : expandButtonLabel,\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n state.gridWrapper.ref = useMergedRefs(gridWrapperRef, state.gridWrapper.ref);\n\n // Get the array of children.\n const childrenArray = React.useMemo<(React.ReactChild | React.ReactFragment | React.ReactPortal)[]>(() => {\n return React.Children.toArray(state.root.children);\n }, [state.root.children]);\n\n // Add motion to the children.\n const childrenWithMotion = React.useMemo(\n () =>\n childrenArray.map((child, index) => {\n // Throw error if the child is not a valid React element or is a Fragment.\n if (!React.isValidElement(child) || child.type === React.Fragment) {\n throw new Error('You should only use PromptStarter components as the children of PromptStarterList.');\n }\n\n // In the collapsed state, if there is one column, we show three children.\n // If there are two or three columns, we show two or three. All children\n // are shown in the expanded state.\n const visibility = (numberOfColumns === 1 && index < 3) || index < numberOfColumns || isExpanded;\n\n return (\n <PromptStarterMotion appear key={index} index={index} visible={visibility} numberOfColumns={numberOfColumns}>\n {child}\n </PromptStarterMotion>\n );\n }),\n [childrenArray, numberOfColumns, isExpanded],\n );\n\n state.root.children = childrenWithMotion;\n\n if (state.expandButton) {\n state.expandButton.onClick = mergeCallbacks(\n state.expandButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n () => setIsExpanded(!isExpanded),\n );\n }\n\n return state;\n};\n"],"names":["usePromptStarterList_unstable","props","ref","arrowNavigationOptions","expandButtonLabel","collapseButtonLabel","designVersion","useDesignVersion","focusAttrs","useArrowNavigationGroup","axis","memorizeCurrent","isExpanded","setIsExpanded","React","useState","numberOfColumns","setNumberOfColumns","gridWrapperRef","useRef","targetDocument","useFluent","win","defaultView","useEffect","current","promptStarterGrid","updateNumberOfColumns","numColumns","getComputedStyle","gridTemplateColumns","split","length","ro","ResizeObserver","observe","unobserve","state","components","root","gridWrapper","expandButton","Button","slot","always","getIntrinsicElementProps","elementType","defaultProps","role","optional","appearance","size","shape","icon","createElement","ChevronDown12Regular","iconPosition","children","renderByDefault","useMergedRefs","childrenArray","useMemo","Children","toArray","childrenWithMotion","map","child","index","isValidElement","type","Fragment","Error","visibility","PromptStarterMotion","appear","key","visible","onClick","mergeCallbacks"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAwBaA;;;eAAAA;;;;iEAxBU;iCAShB;+BAE0B;4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D,OAAMwD,QAAQ,EAAE;gBACjE,MAAM,IAAIC,MAAM;YAClB;YAEA,0EAA0E;YAC1E,wEAAwE;YACxE,mCAAmC;YACnC,MAAMC,aAAaxD,oBAAqB,KAAKmD,QAAQ,KAAMA,QAAQnD,mBAAmBJ;YAEtF,OAAA,WAAA,GACEE,OAAAwC,aAAA,CAACmB,wCAAAA,EAAAA;gBAAoBC,QAAAA;gBAAOC,KAAKR;gBAAOA,OAAOA;gBAAOS,SAASJ;gBAAYxD,iBAAiBA;eACzFkD;QAGP,IACF;QAACN;QAAe5C;QAAiBJ;KAAW;IAG9CyB,MAAME,IAAI,CAACkB,QAAQ,GAAGO;IAEtB,IAAI3B,MAAMI,YAAY,EAAE;QACtBJ,MAAMI,YAAY,CAACoC,OAAO,GAAGC,IAAAA,+BAAAA,EAC3BzC,MAAMI,YAAY,CAACoC,OAAO,EAC1B,IAAMhE,cAAc,CAACD;IAEzB;IAEA,OAAOyB;AACT"}
1
+ {"version":3,"sources":["usePromptStarterList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n slot,\n Button,\n useArrowNavigationGroup,\n mergeCallbacks,\n useFluent,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport type { PromptStarterListProps, PromptStarterListState } from './PromptStarterList.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { ChevronDown12Regular } from '@fluentui/react-icons';\nimport { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';\n\n/**\n * Create the state required to render PromptStarterList.\n *\n * The returned state can be modified with hooks such as usePromptStarterListStyles_unstable,\n * before being passed to renderPromptStarterList_unstable.\n *\n * @param props - props from this instance of PromptStarterList\n * @param ref - reference to root HTMLElement of PromptStarterList\n */\nexport const usePromptStarterList_unstable = (\n props: PromptStarterListProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterListState => {\n const { arrowNavigationOptions, expandButtonLabel = 'Show more', collapseButtonLabel = 'Show less' } = props;\n const designVersion = useDesignVersion(props.designVersion);\n const focusAttrs = useArrowNavigationGroup({\n ...arrowNavigationOptions,\n axis: arrowNavigationOptions?.axis ?? 'grid-linear',\n memorizeCurrent: arrowNavigationOptions?.memorizeCurrent ?? true,\n });\n\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [numberOfColumns, setNumberOfColumns] = React.useState<number>(3);\n\n const gridWrapperRef = React.useRef<HTMLDivElement>(null);\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n React.useEffect(() => {\n if (!win || !gridWrapperRef.current) return;\n\n const promptStarterGrid = gridWrapperRef.current;\n\n const updateNumberOfColumns = () => {\n const numColumns = win.getComputedStyle(promptStarterGrid).gridTemplateColumns.split(' ').length;\n setNumberOfColumns(numColumns);\n };\n\n const ro = new win.ResizeObserver(updateNumberOfColumns);\n ro.observe(promptStarterGrid);\n\n return () => {\n ro.unobserve(promptStarterGrid);\n };\n }, [win]);\n\n const state: PromptStarterListState = {\n numberOfColumns: numberOfColumns,\n isExpanded,\n designVersion,\n components: {\n root: 'div',\n gridWrapper: 'div',\n expandButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n gridWrapper: slot.always(props.gridWrapper, {\n defaultProps: {\n role: 'group',\n ...focusAttrs,\n },\n elementType: 'div',\n }),\n expandButton: slot.optional(props.expandButton, {\n defaultProps: {\n appearance: 'subtle',\n size: 'small',\n shape: 'rounded',\n icon: <ChevronDown12Regular />,\n iconPosition: 'after',\n 'aria-expanded': isExpanded,\n children: isExpanded ? collapseButtonLabel : expandButtonLabel,\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n state.gridWrapper.ref = useMergedRefs(gridWrapperRef, state.gridWrapper.ref);\n\n // Get the array of children.\n const childrenArray = React.useMemo<(React.ReactChild | React.ReactFragment | React.ReactPortal)[]>(() => {\n return React.Children.toArray(state.root.children);\n }, [state.root.children]);\n\n // Add motion to the children.\n const childrenWithMotion = React.useMemo(\n () =>\n childrenArray.map((child, index) => {\n // Throw error if the child is not a valid React element or is a Fragment.\n if (!React.isValidElement(child) || child.type === React.Fragment) {\n throw new Error('You should only use PromptStarter components as the children of PromptStarterList.');\n }\n\n // In the collapsed state, if there is one column, we show three children.\n // If there are two or three columns, we show two or three. All children\n // are shown in the expanded state.\n const visibility = (numberOfColumns === 1 && index < 3) || index < numberOfColumns || isExpanded;\n\n return (\n <PromptStarterMotion appear key={index} index={index} visible={visibility} numberOfColumns={numberOfColumns}>\n {child}\n </PromptStarterMotion>\n );\n }),\n [childrenArray, numberOfColumns, isExpanded],\n );\n\n state.root.children = childrenWithMotion;\n\n if (state.expandButton) {\n state.expandButton.onClick = mergeCallbacks(\n state.expandButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n () => setIsExpanded(!isExpanded),\n );\n }\n\n return state;\n};\n"],"names":["arrowNavigationOptions","expandButtonLabel","useArrowNavigationGroup","memorizeCurrent","_arrowNavigationOptions_axis","_arrowNavigationOptions_memorizeCurrent","focusAttrs","isExpanded","React","setNumberOfColumns","axis","gridWrapperRef","targetDocument","useFluent","setIsExpanded","useState","numberOfColumns","promptStarterGrid","numColumns","win","defaultView","useEffect","ro","observe","current","getComputedStyle","gridTemplateColumns","split","length","ResizeObserver","updateNumberOfColumns","state","components","root","gridWrapper","slot","ref","props","Button","always","getIntrinsicElementProps","defaultProps","elementType","expandButton","size","icon","iconPosition","renderByDefault","createElement","ChevronDown12Regular","children","collapseButtonLabel","childrenArray","useMemo","childrenWithMotion","Error","map","child","index","isValidElement","type","Fragment","PromptStarterMotion","appear","visibility","mergeCallbacks","onClick"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA4BUA;;;eAAAA;;;;iEA5Ba;iCAShB;+BAE0B;4BACI;qCACD;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umns
15
15
  };
16
- }
16
+ } //# sourceMappingURL=usePromptStarterListContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarterListContextValues.ts"],"sourcesContent":["import type { PromptStarterListContextValue, PromptStarterListState } from './PromptStarterList.types';\n\nexport function usePromptStarterListContextValues(state: PromptStarterListState): PromptStarterListContextValue {\n const { numberOfColumns } = state;\n\n return {\n numberOfColumns,\n };\n}\n"],"names":["usePromptStarterListContextValues","state","numberOfColumns"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,kCAAkCC,KAA6B;IAC7E,MAAM,EAAEC,eAAe,EAAE,GAAGD;IAE5B,OAAO;QACLC;IACF;AACF"}
1
+ {"version":3,"sources":["usePromptStarterListContextValues.ts"],"sourcesContent":["import type { PromptStarterListContextValue, PromptStarterListState } from './PromptStarterList.types';\n\nexport function usePromptStarterListContextValues(state: PromptStarterListState): PromptStarterListContextValue {\n const { numberOfColumns } = state;\n\n return {\n numberOfColumns,\n };\n}\n"],"names":["usePromptStarterListContextValues","state","numberOfColumns"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,kCAAkCC,KAA6B;UAC7E,EAEAC,eAAO;WAEP;QACFA"}
@@ -25,4 +25,4 @@ const promptStarterListContextDefaultValue = {
25
25
  numberOfColumns: 3
26
26
  };
27
27
  const usePromptStarterListContext = (selector)=>(0, _reactcontextselector.useContextSelector)(PromptStarterListContext, (ctx = promptStarterListContextDefaultValue)=>selector(ctx));
28
- const PromptStarterListProvider = PromptStarterListContext.Provider;
28
+ const PromptStarterListProvider = PromptStarterListContext.Provider; //# sourceMappingURL=PromptStarterListContext.js.map