@fluentui-copilot/react-attachments 0.0.0-nightly-20250716-0405-895dbbbf.1 → 0.0.0-nightly-20250717-0405-eecbae35.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 (109) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  3. package/lib/AgentTag.js +0 -1
  4. package/lib/Attachment.js +0 -1
  5. package/lib/AttachmentList.js +0 -1
  6. package/lib/AttachmentOverflowMenu.js +0 -1
  7. package/lib/AttachmentOverflowMenuButton.js +0 -1
  8. package/lib/AttachmentOverflowMenuItem.js +0 -1
  9. package/lib/components/AgentTag/AgentTag.js +4 -5
  10. package/lib/components/AgentTag/AgentTag.types.js +1 -2
  11. package/lib/components/AgentTag/index.js +0 -1
  12. package/lib/components/AgentTag/renderAgentTag.js +3 -5
  13. package/lib/components/AgentTag/useAgentTag.js +7 -9
  14. package/lib/components/Attachment/Attachment.js +5 -6
  15. package/lib/components/Attachment/Attachment.types.js +1 -2
  16. package/lib/components/Attachment/index.js +0 -1
  17. package/lib/components/Attachment/renderAttachment.js +36 -31
  18. package/lib/components/Attachment/useAttachment.js +85 -95
  19. package/lib/components/AttachmentList/AttachmentList.js +6 -7
  20. package/lib/components/AttachmentList/AttachmentList.types.js +1 -2
  21. package/lib/components/AttachmentList/index.js +0 -1
  22. package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
  23. package/lib/components/AttachmentList/useAttachmentList.js +113 -124
  24. package/lib/components/AttachmentList/useAttachmentListContextValues.js +10 -15
  25. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +8 -9
  26. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -2
  27. package/lib/components/AttachmentOverflowMenu/index.js +0 -1
  28. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +8 -13
  29. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +9 -15
  30. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +10 -15
  31. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +5 -6
  32. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -2
  33. package/lib/components/AttachmentOverflowMenuButton/index.js +0 -1
  34. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +11 -10
  35. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +51 -59
  36. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +4 -5
  37. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -2
  38. package/lib/components/AttachmentOverflowMenuItem/index.js +0 -1
  39. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +9 -8
  40. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -49
  41. package/lib/components/index.js +0 -1
  42. package/lib/contexts/attachmentListContext.js +4 -5
  43. package/lib/contexts/attachmentOverflowMenuContext.js +4 -5
  44. package/lib/index.js +0 -1
  45. package/lib-commonjs/AgentTag.js +0 -1
  46. package/lib-commonjs/Attachment.js +0 -1
  47. package/lib-commonjs/AttachmentList.js +0 -1
  48. package/lib-commonjs/AttachmentOverflowMenu.js +0 -1
  49. package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -1
  50. package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -1
  51. package/lib-commonjs/components/AgentTag/AgentTag.js +1 -1
  52. package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -1
  53. package/lib-commonjs/components/AgentTag/AgentTag.types.js +0 -1
  54. package/lib-commonjs/components/AgentTag/index.js +0 -1
  55. package/lib-commonjs/components/AgentTag/renderAgentTag.js +1 -1
  56. package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -1
  57. package/lib-commonjs/components/AgentTag/useAgentTag.js +1 -1
  58. package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -1
  59. package/lib-commonjs/components/Attachment/Attachment.js +1 -1
  60. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  61. package/lib-commonjs/components/Attachment/Attachment.types.js +0 -1
  62. package/lib-commonjs/components/Attachment/index.js +0 -1
  63. package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
  64. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  65. package/lib-commonjs/components/Attachment/useAttachment.js +1 -1
  66. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  67. package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
  68. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  69. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +0 -1
  70. package/lib-commonjs/components/AttachmentList/index.js +0 -1
  71. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
  72. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
  73. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +1 -1
  74. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  75. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
  76. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  77. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
  78. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
  79. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -1
  80. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -1
  81. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
  82. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
  83. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
  84. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
  85. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
  86. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
  87. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
  88. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  89. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -1
  90. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -1
  91. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
  92. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
  93. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
  94. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
  95. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
  96. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  97. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -1
  98. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -1
  99. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
  100. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
  101. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
  102. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  103. package/lib-commonjs/components/index.js +0 -1
  104. package/lib-commonjs/contexts/attachmentListContext.js +1 -1
  105. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
  106. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
  107. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
  108. package/lib-commonjs/index.js +0 -1
  109. package/package.json +4 -4
@@ -20,4 +20,4 @@ const AttachmentOverflowMenuButton = /*#__PURE__*/ _react.forwardRef((props, ref
20
20
  (0, _reactprovider.useCustomStyleHook)('useAttachmentOverflowMenuButtonStyles')(state);
21
21
  return (0, _renderAttachmentOverflowMenuButton.renderAttachmentOverflowMenuButton_unstable)(state);
22
22
  });
23
- AttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton'; //# sourceMappingURL=AttachmentOverflowMenuButton.js.map
23
+ AttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';\nimport { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';\nimport { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles.styles';\nimport type { AttachmentOverflowMenuButtonProps } from './AttachmentOverflowMenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\nexport const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuButton_unstable(props, ref);\n\n useAttachmentOverflowMenuButtonStyles_unstable(state);\n useCustomStyleHook('useAttachmentOverflowMenuButtonStyles')(state);\n\n return renderAttachmentOverflowMenuButton_unstable(state);\n },\n);\n\nAttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';\n"],"names":["AttachmentOverflowMenuButton","React","forwardRef","props","state","useAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useCustomStyleHook","renderAttachmentOverflowMenuButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;iDACkC;oDACG;6DACG;+BAG5B;AAE5B,MAAMA,+BAAAA,WAAAA,GAAAA,OAAuFC,UAAMC,CAAU,CAClHC,OAACA;UACCC,QAAMA,IAAAA,yEAAQC,EAAAA,OAAyCF;mGAEvDG,EAAAA;yCACAC,EAAAA,yCAAmBH;WAEnBI,IAAAA,+EAAOA,EAAAA;AACT;AAGFR,6BAA6BS,WAAW,GAAG"}
1
+ {"version":3,"sources":["AttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';\nimport { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';\nimport { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles.styles';\nimport type { AttachmentOverflowMenuButtonProps } from './AttachmentOverflowMenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\nexport const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuButton_unstable(props, ref);\n\n useAttachmentOverflowMenuButtonStyles_unstable(state);\n useCustomStyleHook('useAttachmentOverflowMenuButtonStyles')(state);\n\n return renderAttachmentOverflowMenuButton_unstable(state);\n },\n);\n\nAttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';\n"],"names":["AttachmentOverflowMenuButton","React","forwardRef","props","ref","state","useAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useCustomStyleHook","renderAttachmentOverflowMenuButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;iDACkC;oDACG;6DACG;+BAG5B;AAE5B,MAAMA,+BAAAA,WAAAA,GAAuFC,OAAMC,UAAU,CAClH,CAACC,OAAOC;IACN,MAAMC,QAAQC,IAAAA,yEAAAA,EAAyCH,OAAOC;IAE9DG,IAAAA,2FAAAA,EAA+CF;IAC/CG,IAAAA,iCAAAA,EAAmB,yCAAyCH;IAE5D,OAAOI,IAAAA,+EAAAA,EAA4CJ;AACrD;AAGFL,6BAA6BU,WAAW,GAAG"}
@@ -4,4 +4,3 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- //# sourceMappingURL=AttachmentOverflowMenuButton.types.js.map
@@ -29,4 +29,3 @@ const _AttachmentOverflowMenuButton = require("./AttachmentOverflowMenuButton");
29
29
  const _renderAttachmentOverflowMenuButton = require("./renderAttachmentOverflowMenuButton");
30
30
  const _useAttachmentOverflowMenuButton = require("./useAttachmentOverflowMenuButton");
31
31
  const _useAttachmentOverflowMenuButtonStylesstyles = require("./useAttachmentOverflowMenuButtonStyles.styles");
32
- //# sourceMappingURL=index.js.map
@@ -20,4 +20,4 @@ const renderAttachmentOverflowMenuButton_unstable = (state)=>{
20
20
  ]
21
21
  })
22
22
  }) : null;
23
- }; //# sourceMappingURL=renderAttachmentOverflowMenuButton.js.map
23
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachmentOverflowMenuButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { MenuTrigger, assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuButtonState,\n AttachmentOverflowMenuButtonSlots,\n} from './AttachmentOverflowMenuButton.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuButton\n */\nexport const renderAttachmentOverflowMenuButton_unstable = (state: AttachmentOverflowMenuButtonState) => {\n assertSlots<AttachmentOverflowMenuButtonSlots>(state);\n\n return state.isOverflowing ? (\n <MenuTrigger>\n <state.root>\n {state.root.children}\n {state.isLoading && <state.progress />}\n </state.root>\n </MenuTrigger>\n ) : null;\n};\n"],"names":["assertSlots","state","root","MenuTrigger","children","isLoading","_jsx","progress"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaEA;;;eAAAA;;;4BAZF;iCAEyC;AAUvCA,MAAAA,8CAA+CC,CAAAA;oCAExCA,EAAAA;8BAEH,GAAA,WAACA,GAAMC,IAAAA,eAAI,EAAAC,4BAAA,EAAA;;sBACRF;gBAAAA,MAAMC,IAAKE,CAAAA,QAAQ;gBAAAH,MAAAI,SAAA,IAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAL,MAAAM,QAAA,EAAA,CAAA;aAAA;;;iEAItB"}
1
+ {"version":3,"sources":["renderAttachmentOverflowMenuButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { MenuTrigger, assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuButtonState,\n AttachmentOverflowMenuButtonSlots,\n} from './AttachmentOverflowMenuButton.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuButton\n */\nexport const renderAttachmentOverflowMenuButton_unstable = (state: AttachmentOverflowMenuButtonState) => {\n assertSlots<AttachmentOverflowMenuButtonSlots>(state);\n\n return state.isOverflowing ? (\n <MenuTrigger>\n <state.root>\n {state.root.children}\n {state.isLoading && <state.progress />}\n </state.root>\n </MenuTrigger>\n ) : null;\n};\n"],"names":["renderAttachmentOverflowMenuButton_unstable","state","assertSlots","isOverflowing","_jsx","MenuTrigger","_jsxs","root","children","isLoading","progress"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;4BAXb;iCAEyC;AASlC,MAAMA,8CAA8C,CAACC;IAC1DC,IAAAA,4BAAAA,EAA+CD;IAE/C,OAAOA,MAAME,aAAa,GAAA,WAAA,GACxBC,IAAAA,eAAA,EAACC,4BAAAA,EAAAA;kBACC,WAAA,GAAAC,IAAAA,gBAAA,EAACL,MAAMM,IAAI,EAAA;;gBACRN,MAAMM,IAAI,CAACC,QAAQ;gBACnBP,MAAMQ,SAAS,IAAA,WAAA,GAAIL,IAAAA,eAAA,EAACH,MAAMS,QAAQ,EAAA,CAAA;;;SAGrC;AACN"}
@@ -69,4 +69,4 @@ function defaultButtonText(props, overflowCount, designVersion, copilotMode, ful
69
69
  return /*#__PURE__*/ _react.createElement(_react.Fragment, null, copilotMode === 'canvas' ? /*#__PURE__*/ _react.createElement(_reacticons.Attach24Regular, null) : /*#__PURE__*/ _react.createElement(_reacticons.Attach20Regular, null), overflowCount);
70
70
  }
71
71
  return `+${overflowCount}`;
72
- } //# sourceMappingURL=useAttachmentOverflowMenuButton.js.map
72
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { ProgressBar, getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuContext_unstable } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuButtonProps,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\nimport { Attach20Regular, Attach24Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\n\n/**\n * Create the state required to render AttachmentOverflowMenuButton.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuButton_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuButton\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton\n */\nexport const useAttachmentOverflowMenuButton_unstable = (\n props: AttachmentOverflowMenuButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentOverflowMenuButtonState => {\n const { isOverflowing, overflowCount, overflowButtonRef } = useAttachmentOverflowMenuContext_unstable(\n context => context,\n );\n const { numberOfAttachments } = useAttachmentListContext_unstable(context => context);\n\n const fullyOverflowed = overflowCount >= numberOfAttachments;\n const isLoading = !!props.isLoading;\n\n const designVersion = useDesignVersion(props.designVersion);\n const mode = useCopilotMode(props.mode);\n\n const buttonText = defaultButtonText(props, overflowCount, designVersion, mode, fullyOverflowed);\n\n return {\n components: {\n root: 'button',\n progress: ProgressBar,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref: useMergedRefs(ref, overflowButtonRef),\n ...props,\n }),\n {\n defaultProps: {\n children: buttonText,\n },\n elementType: 'button',\n },\n ),\n progress: slot.always(props.progress, {\n defaultProps: { value: undefined, shape: 'square', thickness: 'large', 'aria-label': 'Loading' },\n elementType: ProgressBar,\n }),\n fullyOverflowed,\n isOverflowing,\n overflowCount,\n isLoading,\n designVersion,\n mode,\n };\n};\n\nfunction defaultButtonText(\n props: AttachmentOverflowMenuButtonProps,\n overflowCount: number,\n designVersion: DesignVersion['designVersion'],\n copilotMode: CopilotMode['mode'],\n fullyOverflowed: boolean,\n) {\n if (props.children) {\n return props.children;\n }\n\n if (props.text) {\n if (typeof props.text === 'function') {\n return props.text(overflowCount);\n } else {\n return props.text;\n }\n }\n\n if (designVersion === 'next' && fullyOverflowed) {\n return (\n <>\n {copilotMode === 'canvas' ? <Attach24Regular /> : <Attach20Regular />}\n {overflowCount}\n </>\n );\n }\n\n return `+${overflowCount}`;\n}\n"],"names":["isOverflowing","overflowButtonRef","useAttachmentOverflowMenuContext_unstable","fullyOverflowed","overflowCount","isLoading","designVersion","context","numberOfAttachments","progress","ProgressBar","useDesignVersion","props","root","slot","getIntrinsicElementProps","useMergedRefs","defaultProps","children","buttonText","elementType","ref","value","shape","mode","defaultButtonText","copilotMode","text"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAyBUA;;;eAAAA;;;;iEAzBa;+BAE0B;iCAC0B;+CACjB;4BAKT;uCACC;AAehD,MAAQA,2CAA8BC,CAAAA,OAAsBC;UAG5D,EAEAF,aAAMG,EACNC,aAAMC,EAENJ,iBAAMK,KACNJ,IAAAA,wEAAsC,EAAAK,CAAAA,UAAAA;UAEtC,EAEAC,mBAAO,iEACO,EAAAD,CAAAA,UAAAA;4BACJH,iBAAAI;sBACNC,CAAAA,CAAUC,MAAAA,SAAAA;UACZJ,gBAAAK,IAAAA,+BAAA,EAAAC,MAAAN,aAAA;UACAO,OAAMC,IAAAA,6BACJC,EAAAA,MAAAA,IAAAA;uBACOC,kBAAmBf,OAAAA,eAAAA,eAAAA,MAAAA;;oBAG1B;kBACEgB;sBACEC,4BAAUC;;mCAEZC,CAAAA,MAAAA,CAAAA,IAAAA,yCAAa,EAAA,UAAA;iBACfJ,IAAAA,8BAAA,EAAAK,KAAApB;eAEFQ,KAAAA;;0BACkBa;0BAAkBC;;yBAAqC;;kBACvEH,qBAAAA,CAAAA,MAAaV,CAAAA,MAAAA,QAAAA,EAAAA;0BACf;gBACAP,OAAAA;gBACAH,OAAAA;gBACAI,WAAAA;gBACAC,cAAAA;;yBAEAmB,4BAAAA;QACF;QACArB;QAEFH;QAOEI;;QAEAE;QAEAkB;;;SAGEC,kBAAOb,KAAA,EAAAR,aAAA,EAAAE,aAAA,EAAAoB,WAAA,EAAAvB,eAAA;cACLe,QAAON,EAAAA;eACTA,MAAAM,QAAA;;QAGFN,MAAIN,IAAAA,EAAAA;YACF,OAAAM,MAAAe,IAAA,KACE,YAAA;YAKJ,OAAAf,MAAAe,IAAA,CAAAvB;QAEA,OAAO;YACT,OAAAQ,MAAAe,IAAA"}
1
+ {"version":3,"sources":["useAttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { ProgressBar, getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuContext_unstable } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuButtonProps,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\nimport { Attach20Regular, Attach24Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\n\n/**\n * Create the state required to render AttachmentOverflowMenuButton.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuButton_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuButton\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton\n */\nexport const useAttachmentOverflowMenuButton_unstable = (\n props: AttachmentOverflowMenuButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentOverflowMenuButtonState => {\n const { isOverflowing, overflowCount, overflowButtonRef } = useAttachmentOverflowMenuContext_unstable(\n context => context,\n );\n const { numberOfAttachments } = useAttachmentListContext_unstable(context => context);\n\n const fullyOverflowed = overflowCount >= numberOfAttachments;\n const isLoading = !!props.isLoading;\n\n const designVersion = useDesignVersion(props.designVersion);\n const mode = useCopilotMode(props.mode);\n\n const buttonText = defaultButtonText(props, overflowCount, designVersion, mode, fullyOverflowed);\n\n return {\n components: {\n root: 'button',\n progress: ProgressBar,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref: useMergedRefs(ref, overflowButtonRef),\n ...props,\n }),\n {\n defaultProps: {\n children: buttonText,\n },\n elementType: 'button',\n },\n ),\n progress: slot.always(props.progress, {\n defaultProps: { value: undefined, shape: 'square', thickness: 'large', 'aria-label': 'Loading' },\n elementType: ProgressBar,\n }),\n fullyOverflowed,\n isOverflowing,\n overflowCount,\n isLoading,\n designVersion,\n mode,\n };\n};\n\nfunction defaultButtonText(\n props: AttachmentOverflowMenuButtonProps,\n overflowCount: number,\n designVersion: DesignVersion['designVersion'],\n copilotMode: CopilotMode['mode'],\n fullyOverflowed: boolean,\n) {\n if (props.children) {\n return props.children;\n }\n\n if (props.text) {\n if (typeof props.text === 'function') {\n return props.text(overflowCount);\n } else {\n return props.text;\n }\n }\n\n if (designVersion === 'next' && fullyOverflowed) {\n return (\n <>\n {copilotMode === 'canvas' ? <Attach24Regular /> : <Attach20Regular />}\n {overflowCount}\n </>\n );\n }\n\n return `+${overflowCount}`;\n}\n"],"names":["useAttachmentOverflowMenuButton_unstable","props","ref","isOverflowing","overflowCount","overflowButtonRef","useAttachmentOverflowMenuContext_unstable","context","numberOfAttachments","useAttachmentListContext_unstable","fullyOverflowed","isLoading","designVersion","useDesignVersion","mode","useCopilotMode","buttonText","defaultButtonText","components","root","progress","ProgressBar","slot","always","getIntrinsicElementProps","useMergedRefs","defaultProps","children","elementType","value","undefined","shape","thickness","copilotMode","text","React","createElement","Fragment","Attach24Regular","Attach20Regular"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqBaA;;;eAAAA;;;;iEArBU;+BAE0B;iCAC0B;+CACjB;4BAKT;uCACC;AAW3C,MAAMA,2CAA2C,CACtDC,OACAC;IAEA,MAAM,EAAEC,aAAa,EAAEC,aAAa,EAAEC,iBAAiB,EAAE,GAAGC,IAAAA,wEAAAA,EAC1DC,CAAAA,UAAWA;IAEb,MAAM,EAAEC,mBAAmB,EAAE,GAAGC,IAAAA,wDAAAA,EAAkCF,CAAAA,UAAWA;IAE7E,MAAMG,kBAAkBN,iBAAiBI;IACzC,MAAMG,YAAY,CAAC,CAACV,MAAMU,SAAS;IAEnC,MAAMC,gBAAgBC,IAAAA,+BAAAA,EAAiBZ,MAAMW,aAAa;IAC1D,MAAME,OAAOC,IAAAA,6BAAAA,EAAed,MAAMa,IAAI;IAEtC,MAAME,aAAaC,kBAAkBhB,OAAOG,eAAeQ,eAAeE,MAAMJ;IAEhF,OAAO;QACLQ,YAAY;YACVC,MAAM;YACNC,UAAUC,4BAAAA;QACZ;QACAF,MAAMG,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,UAAU;YACjCtB,KAAKuB,IAAAA,8BAAAA,EAAcvB,KAAKG;YACxB,GAAGJ,KAAK;QACV,IACA;YACEyB,cAAc;gBACZC,UAAUX;YACZ;YACAY,aAAa;QACf;QAEFR,UAAUE,qBAAAA,CAAKC,MAAM,CAACtB,MAAMmB,QAAQ,EAAE;YACpCM,cAAc;gBAAEG,OAAOC;gBAAWC,OAAO;gBAAUC,WAAW;gBAAS,cAAc;YAAU;YAC/FJ,aAAaP,4BAAAA;QACf;QACAX;QACAP;QACAC;QACAO;QACAC;QACAE;IACF;AACF;AAEA,SAASG,kBACPhB,KAAwC,EACxCG,aAAqB,EACrBQ,aAA6C,EAC7CqB,WAAgC,EAChCvB,eAAwB;IAExB,IAAIT,MAAM0B,QAAQ,EAAE;QAClB,OAAO1B,MAAM0B,QAAQ;IACvB;IAEA,IAAI1B,MAAMiC,IAAI,EAAE;QACd,IAAI,OAAOjC,MAAMiC,IAAI,KAAK,YAAY;YACpC,OAAOjC,MAAMiC,IAAI,CAAC9B;QACpB,OAAO;YACL,OAAOH,MAAMiC,IAAI;QACnB;IACF;IAEA,IAAItB,kBAAkB,UAAUF,iBAAiB;QAC/C,OAAA,WAAA,GACEyB,OAAAC,aAAA,CAAAD,OAAAE,QAAA,EAAA,MACGJ,gBAAgB,WAAA,WAAA,GAAWE,OAAAC,aAAA,CAACE,2BAAAA,EAAAA,QAAAA,WAAAA,GAAqBH,OAAAC,aAAA,CAACG,2BAAAA,EAAAA,OAClDnC;IAGP;IAEA,OAAO,CAAC,CAAC,EAAEA,cAAc,CAAC;AAC5B"}
@@ -18,4 +18,4 @@ const AttachmentOverflowMenuItem = /*#__PURE__*/ _react.forwardRef((props, ref)=
18
18
  (0, _useAttachmentOverflowMenuItemStylesstyles.useAttachmentOverflowMenuItemStyles_unstable)(state);
19
19
  return (0, _renderAttachmentOverflowMenuItem.renderAttachmentOverflowMenuItem_unstable)(state);
20
20
  });
21
- AttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem'; //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
21
+ AttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';\nimport { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';\nimport type { AttachmentOverflowMenuItemProps } from './AttachmentOverflowMenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles.styles';\nexport const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuItem_unstable(props, ref);\n useAttachmentOverflowMenuItemStyles_unstable(state);\n\n return renderAttachmentOverflowMenuItem_unstable(state);\n },\n);\n\nAttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';\n"],"names":["AttachmentOverflowMenuItem","React","forwardRef","props","state","useAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","renderAttachmentOverflowMenuItem_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;;iEANU;+CACgC;kDACG;2DAGG;AACtD,MAAMA,6BAAAA,WAAAA,GAAAA,OAAmFC,UAAMC,CAAU,CAC9GC,OAACA;UACCC,QAAMA,IAAAA,qEAAQC,EAAAA,OAAuCF;+FACrDG,EAAAA;WAEAC,IAAAA,2EAAOA,EAAAA;AACT;AAGFP,2BAA2BQ,WAAW,GAAG"}
1
+ {"version":3,"sources":["AttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';\nimport { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';\nimport type { AttachmentOverflowMenuItemProps } from './AttachmentOverflowMenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles.styles';\nexport const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuItem_unstable(props, ref);\n useAttachmentOverflowMenuItemStyles_unstable(state);\n\n return renderAttachmentOverflowMenuItem_unstable(state);\n },\n);\n\nAttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';\n"],"names":["AttachmentOverflowMenuItem","React","forwardRef","props","ref","state","useAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","renderAttachmentOverflowMenuItem_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;;iEANU;+CACgC;kDACG;2DAGG;AACtD,MAAMA,6BAAAA,WAAAA,GAAmFC,OAAMC,UAAU,CAC9G,CAACC,OAAOC;IACN,MAAMC,QAAQC,IAAAA,qEAAAA,EAAuCH,OAAOC;IAC5DG,IAAAA,uFAAAA,EAA6CF;IAE7C,OAAOG,IAAAA,2EAAAA,EAA0CH;AACnD;AAGFL,2BAA2BS,WAAW,GAAG"}
@@ -4,4 +4,3 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- //# sourceMappingURL=AttachmentOverflowMenuItem.types.js.map
@@ -29,4 +29,3 @@ const _AttachmentOverflowMenuItem = require("./AttachmentOverflowMenuItem");
29
29
  const _renderAttachmentOverflowMenuItem = require("./renderAttachmentOverflowMenuItem");
30
30
  const _useAttachmentOverflowMenuItem = require("./useAttachmentOverflowMenuItem");
31
31
  const _useAttachmentOverflowMenuItemStylesstyles = require("./useAttachmentOverflowMenuItemStyles.styles");
32
- //# sourceMappingURL=index.js.map
@@ -18,4 +18,4 @@ const renderAttachmentOverflowMenuItem_unstable = (state)=>{
18
18
  state.progress && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.progress, {})
19
19
  ]
20
20
  }) : null;
21
- }; //# sourceMappingURL=renderAttachmentOverflowMenuItem.js.map
21
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachmentOverflowMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemState,\n AttachmentOverflowMenuItemSlots,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = (state: AttachmentOverflowMenuItemState) => {\n assertSlots<AttachmentOverflowMenuItemSlots>(state);\n\n return !state.isVisible ? (\n <state.root>\n {state.root.children}\n {state.progress && <state.progress />}\n </state.root>\n ) : null;\n};\n"],"names":["assertSlots","state","root","children","progress","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaEA;;;eAAAA;;;4BAZF;iCAE4B;AAU1BA,MAAAA,4CAA6CC,CAAAA;oCAErCA,EAAAA;;kBAEHA;YAAAA,MAAMC,IAAKC,CAAAA,QAAQ;YAAAF,MAAAG,QAAA,IAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAJ,MAAAG,QAAA,EAAA,CAAA;SAAA;;+DAGpB"}
1
+ {"version":3,"sources":["renderAttachmentOverflowMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemState,\n AttachmentOverflowMenuItemSlots,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = (state: AttachmentOverflowMenuItemState) => {\n assertSlots<AttachmentOverflowMenuItemSlots>(state);\n\n return !state.isVisible ? (\n <state.root>\n {state.root.children}\n {state.progress && <state.progress />}\n </state.root>\n ) : null;\n};\n"],"names":["renderAttachmentOverflowMenuItem_unstable","state","assertSlots","isVisible","_jsxs","root","children","progress","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;4BAXb;iCAE4B;AASrB,MAAMA,4CAA4C,CAACC;IACxDC,IAAAA,4BAAAA,EAA6CD;IAE7C,OAAO,CAACA,MAAME,SAAS,GAAA,WAAA,GACrBC,IAAAA,gBAAA,EAACH,MAAMI,IAAI,EAAA;;YACRJ,MAAMI,IAAI,CAACC,QAAQ;YACnBL,MAAMM,QAAQ,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACP,MAAMM,QAAQ,EAAA,CAAA;;SAElC;AACN"}
@@ -56,4 +56,4 @@ const useAttachmentOverflowMenuItem_unstable = (props, ref)=>{
56
56
  imageOnly,
57
57
  designVersion
58
58
  };
59
- }; //# sourceMappingURL=useAttachmentOverflowMenuItem.js.map
59
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuItem,\n ProgressBar,\n mergeCallbacks,\n slot,\n useId,\n useIsOverflowItemVisible,\n} from '@fluentui/react-components';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render AttachmentOverflowMenuItem.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuItem_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuItem\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem\n */\nexport const useAttachmentOverflowMenuItem_unstable = (\n props: AttachmentOverflowMenuItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentOverflowMenuItemState => {\n 'use no memo';\n\n const { imageOnly, media } = props;\n const menuItemId = useId('attachment-', props.id);\n const isVisible = useIsOverflowItemVisible(menuItemId);\n const { onAttachmentDismiss } = useAttachmentListContext_unstable(context => context);\n const designVersion = useDesignVersion(props.designVersion);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <Dismiss20Regular />, ...props, id: menuItemId },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev => {\n onAttachmentDismiss?.(ev, { content: props.children, media, id: menuItemId });\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n return {\n components: {\n root: MenuItem,\n progress: ProgressBar,\n },\n root,\n progress,\n isVisible,\n imageOnly,\n designVersion,\n };\n};\n"],"names":["useAttachmentOverflowMenuItem_unstable","props","ref","imageOnly","onAttachmentDismiss","media","icon","secondaryContent","menuItemId","designVersion","useDesignVersion","elementType","MenuItem","root","onClick","content","progress","optional","ev","shape","children","slot","defaultProps","components","ProgressBar","isVisible"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA8BEA;;;eAAAA;;;;iEA9BqB;iCAQhB;4BAC0B;uCACiB;+BAKjB;AAe/B,MAAAA,yCAAA,CAAAC,OAAAC;;UAIA,EACAC,SAAQC,EACRC,KAAA,KAEAJ;UACIC,aAAAA,IAAAA,sBAAAA,EAAAA,eAAAA,MAAAA,EAAAA;UAAKI,YAAMD,IAAAA,yCAAAA,EAAAA;UAAOE,qBAAgD,iEAAMC,EAAAA,CAAAA,UAAAA;UAC1EC,gBAAAC,IAAAA,+BAAA,EAAAT,MAAAQ,aAAA;UAAEE,OAAAA,qBAAAA,CAAAA,MAAaC,CAAAA;QAASV;QAE1BW,MAAKC;0BACHV,WAAAA,GAAAA,OAAAA,aAAAA,CAAAA,4BAAAA,EAAAA;gBAA4BW;;;qBAA+CH,yBAAA;;SAG7EE,OAAME,GAAAA,IAAAA,+BAAgBC,EAAAA,KAAShB,OAAMe,EAAAA,CAAAA;gCACrB,QAAAZ,wBAAA,KAAA,IAAA,KAAA,IAAAA,oBAAAc,IAAA;qBACZC,MAAOC,QAAA;;;;;UAKXJ,WAAAK,qBAAA,CAAAJ,QAAA,CAAAhB,MAAAe,QAAA,EAAA;QAEAM,cAAO;mBACLC;uBACEV;+BACUW,MAAAA,EAAAA;;qBAEZX,4BAAAA;;WAEAY;oBACAtB;kBACAM,yBAAAA;YACFO,UAAAQ,4BAAA;QACA"}
1
+ {"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuItem,\n ProgressBar,\n mergeCallbacks,\n slot,\n useId,\n useIsOverflowItemVisible,\n} from '@fluentui/react-components';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render AttachmentOverflowMenuItem.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuItem_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuItem\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem\n */\nexport const useAttachmentOverflowMenuItem_unstable = (\n props: AttachmentOverflowMenuItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentOverflowMenuItemState => {\n 'use no memo';\n\n const { imageOnly, media } = props;\n const menuItemId = useId('attachment-', props.id);\n const isVisible = useIsOverflowItemVisible(menuItemId);\n const { onAttachmentDismiss } = useAttachmentListContext_unstable(context => context);\n const designVersion = useDesignVersion(props.designVersion);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <Dismiss20Regular />, ...props, id: menuItemId },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev => {\n onAttachmentDismiss?.(ev, { content: props.children, media, id: menuItemId });\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n return {\n components: {\n root: MenuItem,\n progress: ProgressBar,\n },\n root,\n progress,\n isVisible,\n imageOnly,\n designVersion,\n };\n};\n"],"names":["useAttachmentOverflowMenuItem_unstable","props","ref","imageOnly","media","menuItemId","useId","id","isVisible","useIsOverflowItemVisible","onAttachmentDismiss","useAttachmentListContext_unstable","context","designVersion","useDesignVersion","root","slot","always","icon","secondaryContent","React","createElement","Dismiss20Regular","elementType","MenuItem","onClick","mergeCallbacks","ev","content","children","progress","optional","defaultProps","shape","thickness","ProgressBar","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA0BaA;;;eAAAA;;;;iEA1BU;iCAQhB;4BAC0B;uCACiB;+BAKjB;AAW1B,MAAMA,yCAAyC,CACpDC,OACAC;IAEA;IAEA,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGH;IAC7B,MAAMI,aAAaC,IAAAA,sBAAAA,EAAM,eAAeL,MAAMM,EAAE;IAChD,MAAMC,YAAYC,IAAAA,yCAAAA,EAAyBJ;IAC3C,MAAM,EAAEK,mBAAmB,EAAE,GAAGC,IAAAA,wDAAAA,EAAkCC,CAAAA,UAAWA;IAC7E,MAAMC,gBAAgBC,IAAAA,+BAAAA,EAAiBb,MAAMY,aAAa;IAE1D,MAAME,OAAOC,qBAAAA,CAAKC,MAAM,CACtB;QAAEf;QAAKgB,MAAMd;QAAOe,kBAAAA,WAAAA,GAAkBC,OAAAC,aAAA,CAACC,4BAAAA,EAAAA;QAAqB,GAAGrB,KAAK;QAAEM,IAAIF;IAAW,GACrF;QAAEkB,aAAaC,yBAAAA;IAAS;IAE1BT,KAAKU,OAAO,GAAGC,IAAAA,+BAAAA,EAAeX,KAAKU,OAAO,EAAEE,CAAAA;QAC1CjB,wBAAAA,QAAAA,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAsBiB,IAAI;YAAEC,SAAS3B,MAAM4B,QAAQ;YAAEzB;YAAOG,IAAIF;QAAW;IAC7E;IAEA,MAAMyB,WAAWd,qBAAAA,CAAKe,QAAQ,CAAC9B,MAAM6B,QAAQ,EAAE;QAC7CE,cAAc;YACZC,OAAO;YACPC,WAAW;YACX,mBAAmBjC,MAAMM,EAAE;QAC7B;QACAgB,aAAaY,4BAAAA;IACf;IAEA,OAAO;QACLC,YAAY;YACVrB,MAAMS,yBAAAA;YACNM,UAAUK,4BAAAA;QACZ;QACApB;QACAe;QACAtB;QACAL;QACAU;IACF;AACF"}
@@ -90,4 +90,3 @@ const _AttachmentList = require("./AttachmentList");
90
90
  const _AttachmentOverflowMenu = require("./AttachmentOverflowMenu");
91
91
  const _AttachmentOverflowMenuButton = require("./AttachmentOverflowMenuButton");
92
92
  const _AttachmentOverflowMenuItem = require("./AttachmentOverflowMenuItem");
93
- //# sourceMappingURL=index.js.map
@@ -27,4 +27,4 @@ const attachmentListContextDefaultValue = {
27
27
  numberOfAttachments: 0
28
28
  };
29
29
  const AttachmentListProvider = AttachmentListContext.Provider;
30
- const useAttachmentListContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentListContext, (ctx = attachmentListContextDefaultValue)=>selector(ctx)); //# sourceMappingURL=attachmentListContext.js.map
30
+ const useAttachmentListContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentListContext, (ctx = attachmentListContextDefaultValue)=>selector(ctx));
@@ -1 +1 @@
1
- {"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListState } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n shouldUseOverflow: false,\n numberOfAttachments: 0,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<\n AttachmentListState,\n 'onAttachmentDismiss' | 'shouldUseOverflow' | 'numberOfAttachments'\n>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","createContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","shouldUseOverflow","numberOfAttachments","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,qBAAAA;eAAAA;;IAkBAC,sBAAAA;eAAAA;;IAEAC,iCAAAA;eAAAA;;;sCAxBqC;AAI3C,MAAMF,wBAA6DG,IAAAA,mCAAAA,EAExEC;AAEF,MAAMC,oCAAgE;yBACpEC,IAA2B;uBAC3BC;yBACAC;AACF;AAUO,MAAMP,yBAAyBD,sBAAsBS,QAAQ;AAE7D,MAAMP,oCAAoCQ,CAAAA,WAC/CC,IAAAA,wCAAAA,EAAmBX,uBAAuB,CAACY,MAAMP,iCAAiC,GAAKK,SAASE"}
1
+ {"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListState } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n shouldUseOverflow: false,\n numberOfAttachments: 0,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<\n AttachmentListState,\n 'onAttachmentDismiss' | 'shouldUseOverflow' | 'numberOfAttachments'\n>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","createContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","shouldUseOverflow","numberOfAttachments","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,qBAAAA;eAAAA;;IAkBAC,sBAAAA;eAAAA;;IAEAC,iCAAAA;eAAAA;;;sCAxBqC;AAI3C,MAAMF,wBAA6DG,IAAAA,mCAAAA,EAExEC;AAEF,MAAMC,oCAAgE;IACpEC,qBAAqB,IAAM;IAC3BC,mBAAmB;IACnBC,qBAAqB;AACvB;AAUO,MAAMP,yBAAyBD,sBAAsBS,QAAQ;AAE7D,MAAMP,oCAAoC,CAAIQ,WACnDC,IAAAA,wCAAAA,EAAmBX,uBAAuB,CAACY,MAAMP,iCAAiC,GAAKK,SAASE"}
@@ -27,4 +27,4 @@ const overflowMenuContextDefaultValue = {
27
27
  overflowCount: 0
28
28
  };
29
29
  const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;
30
- const useAttachmentOverflowMenuContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue)=>selector(ctx)); //# sourceMappingURL=attachmentOverflowMenuContext.js.map
30
+ const useAttachmentOverflowMenuContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue)=>selector(ctx));
@@ -1 +1 @@
1
- {"version":3,"sources":["attachmentOverflowMenuContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentOverflowMenuState } from '../components/index';\n\nexport const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue> = createContext<\n AttachmentOverflowMenuContextValue | undefined\n>(undefined) as Context<AttachmentOverflowMenuContextValue>;\n\nconst overflowMenuContextDefaultValue: AttachmentOverflowMenuContextValue = {\n isOverflowing: false,\n overflowButtonRef: undefined,\n overflowCount: 0,\n};\n\n/**\n * Context shared between AttachmentOverflowMenu and its children components\n */\nexport type AttachmentOverflowMenuContextValue = Pick<\n AttachmentOverflowMenuState,\n 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'\n>;\nexport const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;\n\nexport const useAttachmentOverflowMenuContext_unstable = <T>(\n selector: ContextSelector<AttachmentOverflowMenuContextValue, T>,\n) => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable","createContext","undefined","overflowMenuContextDefaultValue","isOverflowing","overflowButtonRef","overflowCount","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,6BAAAA;eAAAA;;IAiBAC,8BAAAA;eAAAA;;IAEAC,yCAAAA;eAAAA;;;sCAvBqC;AAI3C,MAAMF,gCAA6EG,IAAAA,mCAAAA,EAExFC;AAEF,MAAMC,kCAAsE;mBAC1EC;uBACAC;mBACAC;AACF;AASO,MAAMP,iCAAiCD,8BAA8BS,QAAQ;AAE7E,MAAMP,4CAA4CQ,CAAAA,WAEpDC,IAAAA,wCAAAA,EAAmBX,+BAA+B,CAACY,MAAMP,+BAA+B,GAAKK,SAASE"}
1
+ {"version":3,"sources":["attachmentOverflowMenuContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentOverflowMenuState } from '../components/index';\n\nexport const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue> = createContext<\n AttachmentOverflowMenuContextValue | undefined\n>(undefined) as Context<AttachmentOverflowMenuContextValue>;\n\nconst overflowMenuContextDefaultValue: AttachmentOverflowMenuContextValue = {\n isOverflowing: false,\n overflowButtonRef: undefined,\n overflowCount: 0,\n};\n\n/**\n * Context shared between AttachmentOverflowMenu and its children components\n */\nexport type AttachmentOverflowMenuContextValue = Pick<\n AttachmentOverflowMenuState,\n 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'\n>;\nexport const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;\n\nexport const useAttachmentOverflowMenuContext_unstable = <T>(\n selector: ContextSelector<AttachmentOverflowMenuContextValue, T>,\n) => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable","createContext","undefined","overflowMenuContextDefaultValue","isOverflowing","overflowButtonRef","overflowCount","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,6BAAAA;eAAAA;;IAiBAC,8BAAAA;eAAAA;;IAEAC,yCAAAA;eAAAA;;;sCAvBqC;AAI3C,MAAMF,gCAA6EG,IAAAA,mCAAAA,EAExFC;AAEF,MAAMC,kCAAsE;IAC1EC,eAAe;IACfC,mBAAmBH;IACnBI,eAAe;AACjB;AASO,MAAMP,iCAAiCD,8BAA8BS,QAAQ;AAE7E,MAAMP,4CAA4C,CACvDQ,WACGC,IAAAA,wCAAAA,EAAmBX,+BAA+B,CAACY,MAAMP,+BAA+B,GAAKK,SAASE"}
@@ -120,4 +120,3 @@ const _attachmentOverflowMenuContext = require("./contexts/attachmentOverflowMen
120
120
  const _AttachmentOverflowMenuButton = require("./AttachmentOverflowMenuButton");
121
121
  const _AttachmentOverflowMenuItem = require("./AttachmentOverflowMenuItem");
122
122
  const _AgentTag = require("./AgentTag");
123
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-attachments",
3
- "version": "0.0.0-nightly-20250716-0405-895dbbbf.1",
3
+ "version": "0.0.0-nightly-20250717-0405-eecbae35.1",
4
4
  "description": "A set of components related to attaching files in Copilot experiences.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,9 +12,9 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui-copilot/react-provider": "0.0.0-nightly-20250716-0405-895dbbbf.1",
16
- "@fluentui-copilot/react-utilities": "0.0.0-nightly-20250716-0405-895dbbbf.1",
17
- "@fluentui-copilot/tokens": "0.0.0-nightly-20250716-0405-895dbbbf.1",
15
+ "@fluentui-copilot/react-provider": "0.0.0-nightly-20250717-0405-eecbae35.1",
16
+ "@fluentui-copilot/react-utilities": "0.0.0-nightly-20250717-0405-eecbae35.1",
17
+ "@fluentui-copilot/tokens": "0.0.0-nightly-20250717-0405-eecbae35.1",
18
18
  "@swc/helpers": "^0.5.1"
19
19
  },
20
20
  "peerDependencies": {