@fluentui-copilot/react-prompt-starter 0.9.4 → 0.10.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 (76) hide show
  1. package/CHANGELOG.json +49 -1
  2. package/CHANGELOG.md +23 -2
  3. package/dist/index.d.ts +109 -0
  4. package/lib/PromptStarterList.js +2 -0
  5. package/lib/PromptStarterList.js.map +1 -0
  6. package/lib/PromptStarterV2.js +2 -0
  7. package/lib/PromptStarterV2.js.map +1 -0
  8. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.js +13 -0
  9. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.js.map +1 -0
  10. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +4 -0
  11. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -0
  12. package/lib/components/PromptStarterV2/PromptStarter/index.js +5 -0
  13. package/lib/components/PromptStarterV2/PromptStarter/index.js.map +1 -0
  14. package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +52 -0
  15. package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -0
  16. package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +11 -0
  17. package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -0
  18. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +62 -0
  19. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -0
  20. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +204 -0
  21. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -0
  22. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +13 -0
  23. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -0
  24. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +2 -0
  25. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -0
  26. package/lib/components/PromptStarterV2/PromptStarterList/index.js +5 -0
  27. package/lib/components/PromptStarterV2/PromptStarterList/index.js.map +1 -0
  28. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +20 -0
  29. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -0
  30. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +113 -0
  31. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -0
  32. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +9 -0
  33. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -0
  34. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +57 -0
  35. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -0
  36. package/lib/contexts/PromptStarterListContext.js +8 -0
  37. package/lib/contexts/PromptStarterListContext.js.map +1 -0
  38. package/lib/index.js +2 -0
  39. package/lib/index.js.map +1 -1
  40. package/lib-commonjs/PromptStarterList.js +29 -0
  41. package/lib-commonjs/PromptStarterList.js.map +1 -0
  42. package/lib-commonjs/PromptStarterV2.js +29 -0
  43. package/lib-commonjs/PromptStarterV2.js.map +1 -0
  44. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js +23 -0
  45. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js.map +1 -0
  46. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +7 -0
  47. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -0
  48. package/lib-commonjs/components/PromptStarterV2/PromptStarter/index.js +32 -0
  49. package/lib-commonjs/components/PromptStarterV2/PromptStarter/index.js.map +1 -0
  50. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +73 -0
  51. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -0
  52. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +27 -0
  53. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -0
  54. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +62 -0
  55. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -0
  56. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +381 -0
  57. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -0
  58. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +23 -0
  59. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -0
  60. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +5 -0
  61. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -0
  62. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js +32 -0
  63. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js.map +1 -0
  64. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +29 -0
  65. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -0
  66. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +116 -0
  67. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -0
  68. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +16 -0
  69. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -0
  70. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +89 -0
  71. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -0
  72. package/lib-commonjs/contexts/PromptStarterListContext.js +28 -0
  73. package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -0
  74. package/lib-commonjs/index.js +32 -0
  75. package/lib-commonjs/index.js.map +1 -1
  76. package/package.json +3 -2
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n primaryAction: 'fai-PromptStarter__primaryAction',\n icon: 'fai-PromptStarter__icon',\n prompt: 'fai-PromptStarter__prompt',\n reasonMarker: 'fai-PromptStarter__reasonMarker',\n actions: 'fai-PromptStarter__actions',\n};\n\nconst useRootResetStyles = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'max-content auto',\n minWidth: '214px',\n\n // Apply styles to the primary action on hover / active states\n '&:hover': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n '&:active': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow8,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n\n // Hide actions when not focused or hovered\n ':not(:focus-within):not(:hover)': {\n [`& .${promptStarterClassNames.actions}`]: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n opacity: 0,\n },\n },\n});\n\nconst useStyles = makeStyles({\n primaryAction: {\n gridRow: '1 / 3',\n gridColumn: '1 / 3',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n borderRadius: '28px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground2,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n rowGap: tokens.spacingHorizontalS,\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n ...createFocusOutlineStyle({ style: { outlineRadius: '28px' } }),\n },\n\n primaryActionHovered: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n\n icon: {\n display: 'flex',\n alignItems: 'center',\n minHeight: tokens.spacingVerticalXXL,\n },\n actions: {\n margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}\n ${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,\n position: 'relative',\n gridRow: '1 / 2',\n gridColumn: '2 / 3',\n\n opacity: 1,\n transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`,\n },\n prompt: {\n ...typographyStyles.body1Strong,\n\n // Truncate text after two lines.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n overflowY: 'hidden',\n },\n reasonMarker: {\n ...typographyStyles.caption2,\n },\n\n // Hide icon, actions, and reason marker in single column appearance\n singleColumnStyles: {\n display: 'none',\n },\n});\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { isSingleColumn } = state;\n\n const styles = useStyles();\n const rootResetStyles = useRootResetStyles();\n state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n state.primaryAction.className,\n );\n state.icon.className = mergeClasses(\n promptStarterClassNames.icon,\n styles.icon,\n isSingleColumn && styles.singleColumnStyles,\n state.icon.className,\n );\n state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, state.prompt.className);\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n isSingleColumn && styles.singleColumnStyles,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(\n promptStarterClassNames.actions,\n styles.actions,\n isSingleColumn && styles.singleColumnStyles,\n state.actions.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","shorthands","typographyStyles","createFocusOutlineStyle","tokens","promptStarterClassNames","root","primaryAction","icon","prompt","reasonMarker","actions","useRootResetStyles","display","gridTemplateColumns","gridTemplateRows","minWidth","boxShadow","shadow16","transform","transition","durationNormal","curveDecelerateMin","shadow8","clip","height","margin","overflow","padding","width","position","opacity","useStyles","gridRow","gridColumn","flexDirection","borderRadius","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground2","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","rowGap","spacingHorizontalS","spacingVerticalL","spacingHorizontalL","border","strokeWidthThin","colorNeutralStroke2","style","outlineRadius","primaryActionHovered","alignItems","minHeight","spacingVerticalXXL","spacingVerticalNone","spacingHorizontalNone","durationFast","curveLinear","body1Strong","overflowY","caption2","singleColumnStyles","usePromptStarterStyles_unstable","state","isSingleColumn","styles","rootResetStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { usePromptStarterList_unstable } from './usePromptStarterList';
3
+ import { renderPromptStarterList_unstable } from './renderPromptStarterList';
4
+ import { usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';
5
+ import { usePromptStarterListContextValues } from './usePromptStarterListContextValues';
6
+ export const PromptStarterList = /*#__PURE__*/React.forwardRef((props, ref) => {
7
+ const state = usePromptStarterList_unstable(props, ref);
8
+ const contextValues = usePromptStarterListContextValues(state);
9
+ usePromptStarterListStyles_unstable(state);
10
+ return renderPromptStarterList_unstable(state, contextValues);
11
+ });
12
+ PromptStarterList.displayName = 'PromptStarterList';
13
+ //# sourceMappingURL=PromptStarterList.js.map
@@ -0,0 +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":["React","usePromptStarterList_unstable","renderPromptStarterList_unstable","usePromptStarterListStyles_unstable","usePromptStarterListContextValues","PromptStarterList","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,sCAAsC;AAG1F,SAASC,iCAAiC,QAAQ,sCAAsC;AAExF,OAAO,MAAMC,kCAAiEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQR,8BAA8BM,OAAOC;IACnD,MAAME,gBAAgBN,kCAAkCK;IAExDN,oCAAoCM;IACpC,OAAOP,iCAAiCO,OAAOC;AACjD,GAAG;AAEHL,kBAAkBM,WAAW,GAAG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PromptStarterList.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarterList.types.ts"],"sourcesContent":["import type { DesignVersion } from '@fluentui-copilot/react-provider';\nimport type {\n ComponentProps,\n ComponentState,\n Slot,\n Button,\n UseArrowNavigationGroupOptions,\n} from '@fluentui/react-components';\n\nexport type PromptStarterListSlots = {\n root: NonNullable<Slot<'div'>>;\n gridWrapper: NonNullable<Slot<'div'>>;\n expandButton?: Slot<typeof Button>;\n};\n\n/**\n * PromptStarterList Props\n */\nexport type PromptStarterListProps = ComponentProps<PromptStarterListSlots> &\n DesignVersion & {\n /**\n * Text for the expand button when the list is collapsed.\n *\n * default: \"Show more\"\n */\n expandButtonLabel?: string;\n /**\n * Text for the expand button when the list is expanded.\n *\n * default: \"Show less\"\n */\n collapseButtonLabel?: string;\n /**\n * Arrow navigation options. This can be used to customize Tabster's direction,\n * tab behavior, and memoization options.\n *\n * default: { axis: 'horizontal', memorizeCurrent: true }\n */\n arrowNavigationOptions?: UseArrowNavigationGroupOptions;\n };\n\n/**\n * State used in rendering PromptStarterList\n */\nexport type PromptStarterListState = ComponentState<PromptStarterListSlots> &\n Required<Pick<PromptStarterListProps, 'designVersion'>> & {\n numberOfColumns: number;\n isExpanded?: boolean;\n };\n\nexport type PromptStarterListContextValue = Pick<PromptStarterListState, 'numberOfColumns' | 'isExpanded'>;\n"],"names":[],"rangeMappings":"","mappings":"AAkDA,WAA2G"}
@@ -0,0 +1,5 @@
1
+ export { PromptStarterList } from './PromptStarterList';
2
+ export { renderPromptStarterList_unstable } from './renderPromptStarterList';
3
+ export { usePromptStarterList_unstable } from './usePromptStarterList';
4
+ export { promptStarterListClassNames, usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { PromptStarterList } from './PromptStarterList';\nexport type {\n PromptStarterListProps,\n PromptStarterListSlots,\n PromptStarterListState,\n PromptStarterListContextValue,\n} from './PromptStarterList.types';\nexport { renderPromptStarterList_unstable } from './renderPromptStarterList';\nexport { usePromptStarterList_unstable } from './usePromptStarterList';\nexport { promptStarterListClassNames, usePromptStarterListStyles_unstable } from './usePromptStarterListStyles.styles';\n"],"names":["PromptStarterList","renderPromptStarterList_unstable","usePromptStarterList_unstable","promptStarterListClassNames","usePromptStarterListStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,iBAAiB,QAAQ,sBAAsB;AAOxD,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,2BAA2B,EAAEC,mCAAmC,QAAQ,sCAAsC"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots, PresenceGroup } from '@fluentui/react-components';
3
+ import { PromptStarterListProvider } from '../../../contexts/PromptStarterListContext';
4
+ /**
5
+ * Render the final JSX of PromptStarterList
6
+ */
7
+ export const renderPromptStarterList_unstable = (state, contextValue) => {
8
+ assertSlots(state);
9
+ return /*#__PURE__*/_jsx(PromptStarterListProvider, {
10
+ value: contextValue,
11
+ children: /*#__PURE__*/_jsxs(state.root, {
12
+ children: [/*#__PURE__*/_jsx(PresenceGroup, {
13
+ children: /*#__PURE__*/_jsx(state.gridWrapper, {
14
+ children: state.root.children
15
+ })
16
+ }), state.expandButton && /*#__PURE__*/_jsx(state.expandButton, {})]
17
+ })
18
+ });
19
+ };
20
+ //# sourceMappingURL=renderPromptStarterList.js.map
@@ -0,0 +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":["assertSlots","PresenceGroup","PromptStarterListProvider","renderPromptStarterList_unstable","state","contextValue","value","root","gridWrapper","children","expandButton"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,EAAEC,aAAa,QAAQ,6BAA6B;AACxE,SAASC,yBAAyB,QAAQ,6CAA6C;AAOvF;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAC9CC,OACAC;IAEAL,YAAoCI;IAEpC,qBACE,KAACF;QAA0BI,OAAOD;kBAChC,cAAA,MAACD,MAAMG,IAAI;;8BACT,KAACN;8BACC,cAAA,KAACG,MAAMI,WAAW;kCAAEJ,MAAMG,IAAI,CAACE,QAAQ;;;gBAExCL,MAAMM,YAAY,kBAAI,KAACN,MAAMM,YAAY;;;;AAIlD,EAAE"}
@@ -0,0 +1,113 @@
1
+ import * as React from 'react';
2
+ import { getIntrinsicElementProps, slot, Button, useArrowNavigationGroup, mergeCallbacks, useFluent, useMergedRefs } from '@fluentui/react-components';
3
+ import { useDesignVersion } from '@fluentui-copilot/react-provider';
4
+ import { ChevronDown12Regular } from '@fluentui/react-icons';
5
+ import { PromptStarterMotion } from '../PromptStarter/promptStarterMotion';
6
+ /**
7
+ * Create the state required to render PromptStarterList.
8
+ *
9
+ * The returned state can be modified with hooks such as usePromptStarterListStyles_unstable,
10
+ * before being passed to renderPromptStarterList_unstable.
11
+ *
12
+ * @param props - props from this instance of PromptStarterList
13
+ * @param ref - reference to root HTMLElement of PromptStarterList
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);
41
+ };
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.');
94
+ }
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;
112
+ };
113
+ //# sourceMappingURL=usePromptStarterList.js.map
@@ -0,0 +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":["React","getIntrinsicElementProps","slot","Button","useArrowNavigationGroup","mergeCallbacks","useFluent","useMergedRefs","useDesignVersion","ChevronDown12Regular","PromptStarterMotion","usePromptStarterList_unstable","props","ref","arrowNavigationOptions","expandButtonLabel","collapseButtonLabel","designVersion","focusAttrs","axis","memorizeCurrent","isExpanded","setIsExpanded","useState","numberOfColumns","setNumberOfColumns","gridWrapperRef","useRef","targetDocument","win","defaultView","useEffect","current","promptStarterGrid","updateNumberOfColumns","numColumns","getComputedStyle","gridTemplateColumns","split","length","ro","ResizeObserver","observe","unobserve","state","components","root","gridWrapper","expandButton","always","elementType","defaultProps","role","optional","appearance","size","shape","icon","iconPosition","children","renderByDefault","childrenArray","useMemo","Children","toArray","childrenWithMotion","map","child","index","isValidElement","type","Fragment","Error","visibility","appear","key","visible","onClick"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -0,0 +1,9 @@
1
+ export function usePromptStarterListContextValues(state) {
2
+ const {
3
+ numberOfColumns
4
+ } = state;
5
+ return {
6
+ numberOfColumns
7
+ };
8
+ }
9
+ //# sourceMappingURL=usePromptStarterListContextValues.js.map
@@ -0,0 +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":"AAEA,OAAO,SAASA,kCAAkCC,KAA6B;IAC7E,MAAM,EAAEC,eAAe,EAAE,GAAGD;IAE5B,OAAO;QACLC;IACF;AACF"}
@@ -0,0 +1,57 @@
1
+ import { buttonClassNames, __resetStyles, __styles, mergeClasses } from '@fluentui/react-components';
2
+ import { tokens } from '@fluentui-copilot/tokens';
3
+ export const promptStarterListClassNames = {
4
+ root: 'fai-PromptStarterList',
5
+ gridWrapper: 'fai-PromptStarterList__gridWrapper',
6
+ expandButton: 'fai-PromptStarterList__expandButton'
7
+ };
8
+ /**
9
+ * Styles for the root slot
10
+ */
11
+ const useRootClassName = __resetStyles("r1n85ojv", null, [".r1n85ojv{display:flex;flex-direction:column;max-width:772px;gap:var(--spacingHorizontalXL);}"]);
12
+ const useStyles = __styles({
13
+ gridWrapper: {
14
+ mc9l5x: "f13qh94s",
15
+ i8kkvl: 0,
16
+ Belr9w4: 0,
17
+ rmohyg: "f1p93rwu",
18
+ t4k1zu: "f4wu0r3",
19
+ Budl1dq: "fvo7o13",
20
+ Bxotwcr: "f1nkeedh"
21
+ },
22
+ expandButton: {
23
+ qb2dma: "f1locze1",
24
+ wrk2wx: "f11k2d1d",
25
+ dutsh0: "f1iwh30k",
26
+ B4u5nao: "fn63aq9",
27
+ Bbdnnc7: "fm7zj7h",
28
+ x3br3k: "fuzcl37"
29
+ },
30
+ expandButtonExpanded: {
31
+ Bs9jjb3: ["f5l68jj", "f1i29bk4"]
32
+ }
33
+ }, {
34
+ d: [".f13qh94s{display:grid;}", [".f1p93rwu{gap:var(--spacingHorizontalL);}", {
35
+ p: -1
36
+ }], ".f4wu0r3{grid-auto-columns:max-content;}", ".fvo7o13{grid-template-columns:repeat(auto-fit, minmax(214px, 1fr));}", ".f1nkeedh{grid-auto-flow:unset;}", ".f1locze1{align-self:end;}", ".f11k2d1d .fui-Button__icon{font-size:12px;}", ".f1iwh30k .fui-Button__icon{height:12px;}", ".fn63aq9 .fui-Button__icon{width:12px;}", ".f5l68jj>.fui-Button__icon{transform:rotate(180deg);}", ".f1i29bk4>.fui-Button__icon{transform:rotate(-180deg);}"],
37
+ h: [".fm7zj7h:hover .fui-Button__icon{color:var(--colorNeutralForeground2Hover);}", ".fuzcl37:hover:active .fui-Button__icon{color:var(--colorNeutralForeground2Pressed);}"]
38
+ });
39
+ /**
40
+ * Apply styling to the PromptStarterList slots based on the state
41
+ */
42
+ export const usePromptStarterListStyles_unstable = state => {
43
+ 'use no memo';
44
+
45
+ const {
46
+ isExpanded
47
+ } = state;
48
+ const rootClassName = useRootClassName();
49
+ const styles = useStyles();
50
+ state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);
51
+ state.gridWrapper.className = mergeClasses(promptStarterListClassNames.gridWrapper, styles.gridWrapper, state.gridWrapper.className);
52
+ if (state.expandButton) {
53
+ state.expandButton.className = mergeClasses(promptStarterListClassNames.expandButton, styles.expandButton, isExpanded && styles.expandButtonExpanded, state.expandButton.className);
54
+ }
55
+ return state;
56
+ };
57
+ //# sourceMappingURL=usePromptStarterListStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["usePromptStarterListStyles.styles.ts"],"sourcesContent":["import { buttonClassNames, makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport type { PromptStarterListSlots, PromptStarterListState } from './PromptStarterList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const promptStarterListClassNames: SlotClassNames<PromptStarterListSlots> = {\n root: 'fai-PromptStarterList',\n gridWrapper: 'fai-PromptStarterList__gridWrapper',\n expandButton: 'fai-PromptStarterList__expandButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'flex',\n flexDirection: 'column',\n maxWidth: '772px',\n gap: tokens.spacingHorizontalXL,\n});\n\nconst useStyles = makeStyles({\n gridWrapper: {\n display: 'grid',\n gap: tokens.spacingHorizontalL,\n gridAutoColumns: 'max-content',\n\n gridTemplateColumns: `repeat(auto-fit, minmax(214px, 1fr))`,\n gridAutoFlow: 'unset',\n },\n\n expandButton: {\n alignSelf: 'end',\n [`& .${buttonClassNames.icon}`]: {\n fontSize: '12px',\n height: '12px',\n width: '12px',\n },\n ':hover': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n ':hover:active': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n expandButtonExpanded: {\n [`& > .${buttonClassNames.icon}`]: {\n transform: 'rotate(180deg)',\n },\n },\n});\n\n/**\n * Apply styling to the PromptStarterList slots based on the state\n */\nexport const usePromptStarterListStyles_unstable = (state: PromptStarterListState): PromptStarterListState => {\n 'use no memo';\n\n const { isExpanded } = state;\n\n const rootClassName = useRootClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);\n state.gridWrapper.className = mergeClasses(\n promptStarterListClassNames.gridWrapper,\n styles.gridWrapper,\n state.gridWrapper.className,\n );\n if (state.expandButton) {\n state.expandButton.className = mergeClasses(\n promptStarterListClassNames.expandButton,\n styles.expandButton,\n isExpanded && styles.expandButtonExpanded,\n state.expandButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","tokens","promptStarterListClassNames","root","gridWrapper","expandButton","useRootClassName","display","flexDirection","maxWidth","gap","spacingHorizontalXL","useStyles","spacingHorizontalL","gridAutoColumns","gridTemplateColumns","gridAutoFlow","alignSelf","icon","fontSize","height","width","color","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","expandButtonExpanded","transform","usePromptStarterListStyles_unstable","state","isExpanded","rootClassName","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AAGzG,SAASC,MAAM,QAAQ,2BAA2B;AAElD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;IACNC,aAAa;IACbC,cAAc;AAChB,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBR,gBAAgB;IACvCS,SAAS;IACTC,eAAe;IACfC,UAAU;IACVC,KAAKT,OAAOU,mBAAmB;AACjC;AAEA,MAAMC,YAAYb,WAAW;IAC3BK,aAAa;QACXG,SAAS;QACTG,KAAKT,OAAOY,kBAAkB;QAC9BC,iBAAiB;QAEjBC,qBAAqB,CAAC,oCAAoC,CAAC;QAC3DC,cAAc;IAChB;IAEAX,cAAc;QACZY,WAAW;QACX,CAAC,CAAC,GAAG,EAAEpB,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;YAC/BC,UAAU;YACVC,QAAQ;YACRC,OAAO;QACT;QACA,UAAU;YACR,CAAC,CAAC,GAAG,EAAExB,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAOrB,OAAOsB,4BAA4B;YAC5C;QACF;QACA,iBAAiB;YACf,CAAC,CAAC,GAAG,EAAE1B,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC/BI,OAAOrB,OAAOuB,8BAA8B;YAC9C;QACF;IACF;IAEAC,sBAAsB;QACpB,CAAC,CAAC,KAAK,EAAE5B,iBAAiBqB,IAAI,CAAC,CAAC,CAAC,EAAE;YACjCQ,WAAW;QACb;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD;IAEA,MAAM,EAAEC,UAAU,EAAE,GAAGD;IAEvB,MAAME,gBAAgBxB;IACtB,MAAMyB,SAASnB;IACfgB,MAAMzB,IAAI,CAAC6B,SAAS,GAAGhC,aAAaE,4BAA4BC,IAAI,EAAE2B,eAAeF,MAAMzB,IAAI,CAAC6B,SAAS;IACzGJ,MAAMxB,WAAW,CAAC4B,SAAS,GAAGhC,aAC5BE,4BAA4BE,WAAW,EACvC2B,OAAO3B,WAAW,EAClBwB,MAAMxB,WAAW,CAAC4B,SAAS;IAE7B,IAAIJ,MAAMvB,YAAY,EAAE;QACtBuB,MAAMvB,YAAY,CAAC2B,SAAS,GAAGhC,aAC7BE,4BAA4BG,YAAY,EACxC0B,OAAO1B,YAAY,EACnBwB,cAAcE,OAAON,oBAAoB,EACzCG,MAAMvB,YAAY,CAAC2B,SAAS;IAEhC;IAEA,OAAOJ;AACT,EAAE"}
@@ -0,0 +1,8 @@
1
+ import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
+ export const PromptStarterListContext = createContext(undefined);
3
+ const promptStarterListContextDefaultValue = {
4
+ numberOfColumns: 3
5
+ };
6
+ export const usePromptStarterListContext = selector => useContextSelector(PromptStarterListContext, (ctx = promptStarterListContextDefaultValue) => selector(ctx));
7
+ export const PromptStarterListProvider = PromptStarterListContext.Provider;
8
+ //# sourceMappingURL=PromptStarterListContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarterListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport type { PromptStarterListContextValue } from '../PromptStarterList';\n\nexport const PromptStarterListContext = createContext<PromptStarterListContextValue | undefined>(undefined);\n\nconst promptStarterListContextDefaultValue: PromptStarterListContextValue = {\n numberOfColumns: 3,\n};\n\nexport const usePromptStarterListContext = <T>(selector: ContextSelector<PromptStarterListContextValue, T>) =>\n useContextSelector(PromptStarterListContext, (ctx = promptStarterListContextDefaultValue) => selector(ctx));\nexport const PromptStarterListProvider = PromptStarterListContext.Provider;\n"],"names":["createContext","useContextSelector","PromptStarterListContext","undefined","promptStarterListContextDefaultValue","numberOfColumns","usePromptStarterListContext","selector","ctx","PromptStarterListProvider","Provider"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,2BAA2BF,cAAyDG,WAAW;AAE5G,MAAMC,uCAAsE;IAC1EC,iBAAiB;AACnB;AAEA,OAAO,MAAMC,8BAA8B,CAAIC,WAC7CN,mBAAmBC,0BAA0B,CAACM,MAAMJ,oCAAoC,GAAKG,SAASC,MAAM;AAC9G,OAAO,MAAMC,4BAA4BP,yBAAyBQ,QAAQ,CAAC"}
package/lib/index.js CHANGED
@@ -1,2 +1,4 @@
1
1
  export { PromptStarter, promptStarterClassNames, renderPromptStarter_unstable, usePromptStarterStyles_unstable, usePromptStarter_unstable } from './PromptStarter';
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
+ export { PromptStarterList, renderPromptStarterList_unstable, usePromptStarterList_unstable, promptStarterListClassNames, usePromptStarterListStyles_unstable } from './PromptStarterList';
2
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type { PromptStarterProps, PromptStarterSlots, PromptStarterState } from './PromptStarter';\nexport {\n PromptStarter,\n promptStarterClassNames,\n renderPromptStarter_unstable,\n usePromptStarterStyles_unstable,\n usePromptStarter_unstable,\n} from './PromptStarter';\n"],"names":["PromptStarter","promptStarterClassNames","renderPromptStarter_unstable","usePromptStarterStyles_unstable","usePromptStarter_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { PromptStarterProps, PromptStarterSlots, PromptStarterState } from './PromptStarter';\nexport {\n PromptStarter,\n promptStarterClassNames,\n renderPromptStarter_unstable,\n usePromptStarterStyles_unstable,\n usePromptStarter_unstable,\n} from './PromptStarter';\n\nexport type {\n PromptStarterProps as PromptStarterV2Props,\n PromptStarterSlots as PromptStarterV2Slots,\n PromptStarterState as PromptStarterV2State,\n} from './PromptStarterV2';\nexport {\n PromptStarter as PromptStarterV2,\n promptStarterClassNames as promptStarterV2ClassNames,\n renderPromptStarter_unstable as renderPromptStarterV2_unstable,\n usePromptStarterStyles_unstable as usePromptStarterV2Styles_unstable,\n usePromptStarter_unstable as usePromptStarterV2_unstable,\n} from './PromptStarterV2';\n\nexport {\n PromptStarterList,\n renderPromptStarterList_unstable,\n usePromptStarterList_unstable,\n promptStarterListClassNames,\n usePromptStarterListStyles_unstable,\n} from './PromptStarterList';\nexport type { PromptStarterListProps, PromptStarterListSlots, PromptStarterListState } from './PromptStarterList';"],"names":["PromptStarter","promptStarterClassNames","renderPromptStarter_unstable","usePromptStarterStyles_unstable","usePromptStarter_unstable","PromptStarterV2","promptStarterV2ClassNames","renderPromptStarterV2_unstable","usePromptStarterV2Styles_unstable","usePromptStarterV2_unstable","PromptStarterList","renderPromptStarterList_unstable","usePromptStarterList_unstable","promptStarterListClassNames","usePromptStarterListStyles_unstable"],"rangeMappings":";;","mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEJ,iBAAiBK,eAAe,EAChCJ,2BAA2BK,yBAAyB,EACpDJ,gCAAgCK,8BAA8B,EAC9DJ,mCAAmCK,iCAAiC,EACpEJ,6BAA6BK,2BAA2B,QACnD,oBAAoB;AAE3B,SACEC,iBAAiB,EACjBC,gCAAgC,EAChCC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,mCAAmC,QAC9B,sBAAsB"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ PromptStarterList: function() {
13
+ return _index.PromptStarterList;
14
+ },
15
+ promptStarterListClassNames: function() {
16
+ return _index.promptStarterListClassNames;
17
+ },
18
+ renderPromptStarterList_unstable: function() {
19
+ return _index.renderPromptStarterList_unstable;
20
+ },
21
+ usePromptStarterListStyles_unstable: function() {
22
+ return _index.usePromptStarterListStyles_unstable;
23
+ },
24
+ usePromptStarterList_unstable: function() {
25
+ return _index.usePromptStarterList_unstable;
26
+ }
27
+ });
28
+ const _index = require("./components/PromptStarterV2/PromptStarterList/index");
29
+ //# sourceMappingURL=PromptStarterList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarterList.ts"],"sourcesContent":["export {\n PromptStarterList,\n renderPromptStarterList_unstable,\n usePromptStarterList_unstable,\n promptStarterListClassNames,\n usePromptStarterListStyles_unstable,\n} from './components/PromptStarterV2/PromptStarterList/index';\nexport type {\n PromptStarterListProps,\n PromptStarterListSlots,\n PromptStarterListState,\n PromptStarterListContextValue,\n} from './components/PromptStarterV2/PromptStarterList/index';\n"],"names":["PromptStarterList","promptStarterListClassNames","renderPromptStarterList_unstable","usePromptStarterListStyles_unstable","usePromptStarterList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,iBAAiB;eAAjBA,wBAAiB;;IAGjBC,2BAA2B;eAA3BA,kCAA2B;;IAF3BC,gCAAgC;eAAhCA,uCAAgC;;IAGhCC,mCAAmC;eAAnCA,0CAAmC;;IAFnCC,6BAA6B;eAA7BA,oCAA6B;;;uBAGxB"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ PromptStarter: function() {
13
+ return _index.PromptStarter;
14
+ },
15
+ promptStarterClassNames: function() {
16
+ return _index.promptStarterClassNames;
17
+ },
18
+ renderPromptStarter_unstable: function() {
19
+ return _index.renderPromptStarter_unstable;
20
+ },
21
+ usePromptStarterStyles_unstable: function() {
22
+ return _index.usePromptStarterStyles_unstable;
23
+ },
24
+ usePromptStarter_unstable: function() {
25
+ return _index.usePromptStarter_unstable;
26
+ }
27
+ });
28
+ const _index = require("./components/PromptStarterV2/PromptStarter/index");
29
+ //# sourceMappingURL=PromptStarterV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarterV2.ts"],"sourcesContent":["export type {\n PromptStarterProps,\n PromptStarterSlots,\n PromptStarterState,\n} from './components/PromptStarterV2/PromptStarter/index';\nexport {\n PromptStarter,\n promptStarterClassNames,\n renderPromptStarter_unstable,\n usePromptStarterStyles_unstable,\n usePromptStarter_unstable,\n} from './components/PromptStarterV2/PromptStarter/index';\n"],"names":["PromptStarter","promptStarterClassNames","renderPromptStarter_unstable","usePromptStarterStyles_unstable","usePromptStarter_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMEA,aAAa;eAAbA,oBAAa;;IACbC,uBAAuB;eAAvBA,8BAAuB;;IACvBC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,+BAA+B;eAA/BA,sCAA+B;;IAC/BC,yBAAyB;eAAzBA,gCAAyB;;;uBACpB"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PromptStarter", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PromptStarter;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _usePromptStarter = require("./usePromptStarter");
14
+ const _renderPromptStarter = require("./renderPromptStarter");
15
+ const _usePromptStarterStylesstyles = require("./usePromptStarterStyles.styles");
16
+ const _reactprovider = require("@fluentui-copilot/react-provider");
17
+ const PromptStarter = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
18
+ const state = (0, _usePromptStarter.usePromptStarter_unstable)(props, ref);
19
+ (0, _usePromptStarterStylesstyles.usePromptStarterStyles_unstable)(state);
20
+ (0, _reactprovider.useCustomStyleHook)('usePromptStarterStyles')(state);
21
+ return (0, _renderPromptStarter.renderPromptStarter_unstable)(state);
22
+ });
23
+ PromptStarter.displayName = 'PromptStarter'; //# sourceMappingURL=PromptStarter.js.map
@@ -0,0 +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","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"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * State used in rendering PromptStarter
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ //# sourceMappingURL=PromptStarter.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarter.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type PromptStarterSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button'>>;\n icon: NonNullable<Slot<'span'>>;\n prompt: NonNullable<Slot<'span'>>;\n reasonMarker?: Slot<'span'>;\n actions?: Slot<'span'>;\n};\n\n/**\n * PromptStarter Props\n */\nexport type PromptStarterProps = Omit<ComponentProps<PromptStarterSlots>, 'disabled'>;\n\n/**\n * State used in rendering PromptStarter\n */\nexport type PromptStarterState = ComponentState<PromptStarterSlots> & {\n isSingleColumn?: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAgBA;;CAEC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ PromptStarter: function() {
13
+ return _PromptStarter.PromptStarter;
14
+ },
15
+ promptStarterClassNames: function() {
16
+ return _usePromptStarterStylesstyles.promptStarterClassNames;
17
+ },
18
+ renderPromptStarter_unstable: function() {
19
+ return _renderPromptStarter.renderPromptStarter_unstable;
20
+ },
21
+ usePromptStarterStyles_unstable: function() {
22
+ return _usePromptStarterStylesstyles.usePromptStarterStyles_unstable;
23
+ },
24
+ usePromptStarter_unstable: function() {
25
+ return _usePromptStarter.usePromptStarter_unstable;
26
+ }
27
+ });
28
+ const _PromptStarter = require("./PromptStarter");
29
+ const _renderPromptStarter = require("./renderPromptStarter");
30
+ const _usePromptStarter = require("./usePromptStarter");
31
+ const _usePromptStarterStylesstyles = require("./usePromptStarterStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { PromptStarter } from './PromptStarter';\nexport type { PromptStarterProps, PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nexport { renderPromptStarter_unstable } from './renderPromptStarter';\nexport { usePromptStarter_unstable } from './usePromptStarter';\nexport { promptStarterClassNames, usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\n"],"names":["PromptStarter","promptStarterClassNames","renderPromptStarter_unstable","usePromptStarterStyles_unstable","usePromptStarter_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAIbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAEHC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BAHJ;qCAEe;kCACH;8CAC+B"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PromptStarterMotion", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PromptStarterMotion;
9
+ }
10
+ });
11
+ const _reactcomponents = require("@fluentui/react-components");
12
+ const PromptStarterMotion = (0, _reactcomponents.createPresenceComponent)(({ index, numberOfColumns })=>{
13
+ const isFirstRow = index < numberOfColumns;
14
+ const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;
15
+ const opacityDuration = 100;
16
+ const opacityOffset = delay / (delay + opacityDuration);
17
+ const opacityEasing = 'linear';
18
+ const scaleDuration = 500;
19
+ const scaleOffset = delay / (delay + scaleDuration);
20
+ const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;
21
+ const opacityExitDuration = 200;
22
+ return {
23
+ enter: [
24
+ {
25
+ keyframes: [
26
+ {
27
+ opacity: 0
28
+ },
29
+ {
30
+ opacity: 0,
31
+ offset: opacityOffset
32
+ },
33
+ {
34
+ opacity: 1
35
+ }
36
+ ],
37
+ easing: opacityEasing,
38
+ duration: opacityDuration + delay
39
+ },
40
+ {
41
+ keyframes: [
42
+ {
43
+ transform: 'scale(0.9)'
44
+ },
45
+ {
46
+ transform: 'scale(0.9)',
47
+ offset: scaleOffset
48
+ },
49
+ {
50
+ transform: 'scale(1)'
51
+ }
52
+ ],
53
+ easing: scaleEasing,
54
+ duration: scaleDuration + delay
55
+ }
56
+ ],
57
+ exit: {
58
+ keyframes: [
59
+ {
60
+ opacity: 1
61
+ },
62
+ {
63
+ opacity: 1
64
+ },
65
+ {
66
+ opacity: 0
67
+ }
68
+ ],
69
+ easing: opacityEasing,
70
+ duration: opacityExitDuration
71
+ }
72
+ };
73
+ }); //# sourceMappingURL=promptStarterMotion.js.map
@@ -0,0 +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 = 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,sBAAsBC,IAAAA,wCAAAA,EAAmD,CAAC,OACrF,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"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderPromptStarter_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderPromptStarter_unstable;
9
+ }
10
+ });
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactcomponents = require("@fluentui/react-components");
13
+ const renderPromptStarter_unstable = (state)=>{
14
+ (0, _reactcomponents.assertSlots)(state);
15
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
+ children: [
17
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.primaryAction, {
18
+ children: [
19
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {}),
20
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.prompt, {}),
21
+ state.reasonMarker && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.reasonMarker, {})
22
+ ]
23
+ }),
24
+ state.actions && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.actions, {})
25
+ ]
26
+ });
27
+ }; //# sourceMappingURL=renderPromptStarter.js.map
@@ -0,0 +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","_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"}