@fluentui-copilot/react-reference 0.11.3 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.json +73 -1
  2. package/CHANGELOG.md +26 -2
  3. package/dist/index.d.ts +77 -29
  4. package/lib/ReferenceListV2.js +1 -1
  5. package/lib/ReferenceListV2.js.map +1 -1
  6. package/lib/ReferenceOverflowButton.js +1 -1
  7. package/lib/ReferenceOverflowButton.js.map +1 -1
  8. package/lib/ReferenceV2.js +1 -1
  9. package/lib/ReferenceV2.js.map +1 -1
  10. package/lib/components/Reference/Reference.js +1 -1
  11. package/lib/components/Reference/Reference.js.map +1 -1
  12. package/lib/components/Reference/Reference.types.js +1 -3
  13. package/lib/components/Reference/Reference.types.js.map +1 -1
  14. package/lib/components/Reference/renderReference.js +1 -3
  15. package/lib/components/Reference/renderReference.js.map +1 -1
  16. package/lib/components/Reference/useReference.js +2 -0
  17. package/lib/components/Reference/useReference.js.map +1 -1
  18. package/lib/components/Reference/useReferenceStyles.styles.js +4 -0
  19. package/lib/components/Reference/useReferenceStyles.styles.js.map +1 -1
  20. package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js +1 -1
  21. package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
  22. package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js.map +1 -1
  23. package/lib/components/ReferenceList/ReferenceList.js +1 -1
  24. package/lib/components/ReferenceList/ReferenceList.js.map +1 -1
  25. package/lib/components/ReferenceList/ReferenceList.types.js +1 -3
  26. package/lib/components/ReferenceList/ReferenceList.types.js.map +1 -1
  27. package/lib/components/ReferenceList/renderReferenceList.js +1 -3
  28. package/lib/components/ReferenceList/renderReferenceList.js.map +1 -1
  29. package/lib/components/ReferenceList/useReferenceList.js +2 -1
  30. package/lib/components/ReferenceList/useReferenceList.js.map +1 -1
  31. package/lib/components/ReferenceList/useReferenceListStyles.styles.js +4 -0
  32. package/lib/components/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
  33. package/lib/components/reference-v2/Reference/Reference.types.js.map +1 -1
  34. package/lib/components/reference-v2/Reference/useReference.js +11 -4
  35. package/lib/components/reference-v2/Reference/useReference.js.map +1 -1
  36. package/lib/components/reference-v2/Reference/useReferenceStyles.styles.js +1 -1
  37. package/lib/components/reference-v2/Reference/useReferenceStyles.styles.js.map +1 -1
  38. package/lib/components/reference-v2/ReferenceList/ReferenceList.types.js.map +1 -1
  39. package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js +1 -1
  40. package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
  41. package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js.map +1 -1
  42. package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js +1 -1
  43. package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js.map +1 -1
  44. package/lib/hooks/reference-v2/useReferenceCitationPreview.js +9 -7
  45. package/lib/hooks/reference-v2/useReferenceCitationPreview.js.map +1 -1
  46. package/lib/hooks/useReferenceCitationPreview.js +6 -4
  47. package/lib/hooks/useReferenceCitationPreview.js.map +1 -1
  48. package/lib/index.js +2 -2
  49. package/lib/index.js.map +1 -1
  50. package/lib-commonjs/ReferenceListV2.js +1 -1
  51. package/lib-commonjs/ReferenceListV2.js.map +1 -1
  52. package/lib-commonjs/ReferenceOverflowButton.js +1 -1
  53. package/lib-commonjs/ReferenceOverflowButton.js.map +1 -1
  54. package/lib-commonjs/ReferenceV2.js +1 -1
  55. package/lib-commonjs/ReferenceV2.js.map +1 -1
  56. package/lib-commonjs/components/Reference/Reference.js.map +1 -1
  57. package/lib-commonjs/components/Reference/Reference.types.js +1 -3
  58. package/lib-commonjs/components/Reference/Reference.types.js.map +1 -1
  59. package/lib-commonjs/components/Reference/renderReference.js.map +1 -1
  60. package/lib-commonjs/components/Reference/useReference.js.map +1 -1
  61. package/lib-commonjs/components/Reference/useReferenceStyles.styles.js.map +1 -1
  62. package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
  63. package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js.map +1 -1
  64. package/lib-commonjs/components/ReferenceList/ReferenceList.js.map +1 -1
  65. package/lib-commonjs/components/ReferenceList/ReferenceList.types.js +1 -3
  66. package/lib-commonjs/components/ReferenceList/ReferenceList.types.js.map +1 -1
  67. package/lib-commonjs/components/ReferenceList/renderReferenceList.js.map +1 -1
  68. package/lib-commonjs/components/ReferenceList/useReferenceList.js.map +1 -1
  69. package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
  70. package/lib-commonjs/components/reference-v2/Reference/Reference.types.js.map +1 -1
  71. package/lib-commonjs/components/reference-v2/Reference/useReference.js +11 -5
  72. package/lib-commonjs/components/reference-v2/Reference/useReference.js.map +1 -1
  73. package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.js +6 -6
  74. package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.js.map +1 -1
  75. package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.types.js.map +1 -1
  76. package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js +2 -2
  77. package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
  78. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js.map +1 -1
  79. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js +4 -4
  80. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js.map +1 -1
  81. package/lib-commonjs/hooks/reference-v2/useReferenceCitationPreview.js +9 -7
  82. package/lib-commonjs/hooks/reference-v2/useReferenceCitationPreview.js.map +1 -1
  83. package/lib-commonjs/hooks/useReferenceCitationPreview.js +6 -4
  84. package/lib-commonjs/hooks/useReferenceCitationPreview.js.map +1 -1
  85. package/lib-commonjs/index.js +6 -6
  86. package/lib-commonjs/index.js.map +1 -1
  87. package/package.json +3 -3
package/CHANGELOG.json CHANGED
@@ -2,7 +2,79 @@
2
2
  "name": "@fluentui-copilot/react-reference",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 31 May 2024 18:42:06 GMT",
5
+ "date": "Thu, 20 Jun 2024 23:05:26 GMT",
6
+ "tag": "@fluentui-copilot/react-reference_v0.12.0",
7
+ "version": "0.12.0",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "tristan.watanabe@gmail.com",
12
+ "package": "@fluentui-copilot/react-reference",
13
+ "commit": "b8a46e43b66fa17ed3cbb98a57171f9805ca5801",
14
+ "comment": "fix: failing e2e tests after playwright/test dependency update to v1.44.0."
15
+ }
16
+ ],
17
+ "minor": [
18
+ {
19
+ "author": "Humberto.Morimoto@microsoft.com",
20
+ "package": "@fluentui-copilot/react-reference",
21
+ "commit": "fc6c01300d29e17aa4bd56305a0f4fd2d9f7b94c",
22
+ "comment": "chore: Deprecating Reference v1 pattern, and consolidating Citation, Reference v1 and Reference v2 docs."
23
+ }
24
+ ],
25
+ "patch": [
26
+ {
27
+ "author": "humbertomakotomorimoto@gmail.com",
28
+ "package": "@fluentui-copilot/react-reference",
29
+ "commit": "8556966a4bc720f393d1c00b6befb857cc757877",
30
+ "comment": "fix: Making some fit-and-finish styling changes to better match design specs."
31
+ }
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "date": "Thu, 13 Jun 2024 21:00:45 GMT",
37
+ "tag": "@fluentui-copilot/react-reference_v0.11.4",
38
+ "version": "0.11.4",
39
+ "comments": {
40
+ "none": [
41
+ {
42
+ "author": "estebanmu@microsoft.com",
43
+ "package": "@fluentui-copilot/react-reference",
44
+ "commit": "f17f78e440c2dc6b0cd7ac5ac998ccf7f5c475d0",
45
+ "comment": "chore: Disable typecheck for ssr-tests."
46
+ },
47
+ {
48
+ "author": "humbertomakotomorimoto@gmail.com",
49
+ "package": "@fluentui-copilot/react-reference",
50
+ "commit": "17abeb1551c78c1c6cabce04f8482172a4b1b667",
51
+ "comment": "chore: Path cleanup on exports and docs."
52
+ }
53
+ ],
54
+ "patch": [
55
+ {
56
+ "author": "Humberto.Morimoto@microsoft.com",
57
+ "package": "@fluentui-copilot/react-reference",
58
+ "commit": "74388025459a4141f03e1053e377509df397f4b0",
59
+ "comment": "fix: Fixing Reference anchor behavior and improving reference-v2 docs."
60
+ },
61
+ {
62
+ "author": "humbertomakotomorimoto@gmail.com",
63
+ "package": "@fluentui-copilot/react-reference",
64
+ "commit": "eff11b64e31fb776ddf9d7941da7c7bcd7bea170",
65
+ "comment": "chore: Allow PreviewHeader props to be modified in useReferenceCitationPreview hooks."
66
+ },
67
+ {
68
+ "author": "Humberto.Morimoto@microsoft.com",
69
+ "package": "@fluentui-copilot/react-reference",
70
+ "commit": "c8d54cf5a0b9f000a1b90fd647c4559d76153f32",
71
+ "comment": "fix: Fixing PreviewHeader styles, taking previewSurfaceProps.children into account in hook, and improving docs."
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "date": "Fri, 31 May 2024 18:42:53 GMT",
6
78
  "tag": "@fluentui-copilot/react-reference_v0.11.3",
7
79
  "version": "0.11.3",
8
80
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,36 @@
1
1
  # Change Log - @fluentui-copilot/react-reference
2
2
 
3
- This log was last generated on Fri, 31 May 2024 18:42:06 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 20 Jun 2024 23:05:26 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.12.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.12.0)
8
+
9
+ Thu, 20 Jun 2024 23:05:26 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.11.4..@fluentui-copilot/react-reference_v0.12.0)
11
+
12
+ ### Minor changes
13
+
14
+ - chore: Deprecating Reference v1 pattern, and consolidating Citation, Reference v1 and Reference v2 docs. ([PR #1731](https://github.com/microsoft/fluentai/pull/1731) by Humberto.Morimoto@microsoft.com)
15
+
16
+ ### Patches
17
+
18
+ - fix: Making some fit-and-finish styling changes to better match design specs. ([PR #1748](https://github.com/microsoft/fluentai/pull/1748) by humbertomakotomorimoto@gmail.com)
19
+
20
+ ## [0.11.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.11.4)
21
+
22
+ Thu, 13 Jun 2024 21:00:45 GMT
23
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.11.3..@fluentui-copilot/react-reference_v0.11.4)
24
+
25
+ ### Patches
26
+
27
+ - fix: Fixing Reference anchor behavior and improving reference-v2 docs. ([PR #1698](https://github.com/microsoft/fluentai/pull/1698) by Humberto.Morimoto@microsoft.com)
28
+ - chore: Allow PreviewHeader props to be modified in useReferenceCitationPreview hooks. ([PR #1727](https://github.com/microsoft/fluentai/pull/1727) by humbertomakotomorimoto@gmail.com)
29
+ - fix: Fixing PreviewHeader styles, taking previewSurfaceProps.children into account in hook, and improving docs. ([PR #1702](https://github.com/microsoft/fluentai/pull/1702) by Humberto.Morimoto@microsoft.com)
30
+
7
31
  ## [0.11.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.11.3)
8
32
 
9
- Fri, 31 May 2024 18:42:06 GMT
33
+ Fri, 31 May 2024 18:42:53 GMT
10
34
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.11.2..@fluentui-copilot/react-reference_v0.11.3)
11
35
 
12
36
  ### Patches
package/dist/index.d.ts CHANGED
@@ -88,6 +88,31 @@ export declare type PackagedReferenceV2 = React_2.FC<ReferenceV2Props>;
88
88
 
89
89
  declare type PartialReferenceProps = 'citationHref' | 'index' | 'referenceId';
90
90
 
91
+ /**
92
+ * PreviewHeader Props
93
+ */
94
+ declare type PreviewHeaderProps = ComponentProps<Partial<PreviewHeaderSlots>>;
95
+
96
+ declare type PreviewHeaderSlots = {
97
+ root: NonNullable<Slot<'div'>>;
98
+ /**
99
+ * Actions slot.
100
+ */
101
+ actions: Slot<'div'>;
102
+ /**
103
+ * Citation slot. Displays a `Citation`. Set to `null` to hide the citation.
104
+ */
105
+ citation: Slot<'span'>;
106
+ /**
107
+ * Label slot. Primary description of the preview.
108
+ */
109
+ label: NonNullable<Slot<'span'>>;
110
+ /**
111
+ * Media slot. Used to display Avatars, Icons, etc.
112
+ */
113
+ media: Slot<'div'>;
114
+ };
115
+
91
116
  /**
92
117
  * PreviewMetadata Props
93
118
  */
@@ -116,7 +141,7 @@ declare type PreviewMetadataSlots = {
116
141
  /**
117
142
  * Preview Props
118
143
  */
119
- declare type PreviewProps = PopoverProps;
144
+ declare type PreviewProps = Omit<PopoverProps, 'mouseLeaveDelay' | 'openOnHover'>;
120
145
 
121
146
  declare const PreviewSurface: ForwardRefComponent<PreviewSurfaceProps>;
122
147
 
@@ -127,6 +152,7 @@ declare type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & Popover
127
152
 
128
153
  declare type PreviewSurfaceSlots = PopoverSurfaceSlots & {};
129
154
 
155
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
130
156
  export declare const Reference: ForwardRefComponent<ReferenceProps>;
131
157
 
132
158
  /**
@@ -139,13 +165,16 @@ export declare type ReferenceCitationData = {
139
165
  citationId?: string;
140
166
  citationProps?: PackagedCitationProps;
141
167
  referenceProps?: PackagedReferenceProps;
168
+ previewHeaderProps?: PreviewHeaderProps;
142
169
  previewProps?: PreviewProps;
143
170
  previewSurfaceProps?: PreviewSurfaceProps;
144
171
  sensitivityLabelProps?: SensitivityLabelProps;
145
172
  };
146
173
 
174
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
147
175
  export declare const referenceClassNames: SlotClassNames<ReferenceSlots>;
148
176
 
177
+ /** deprecated The ReferenceGroup pattern is deprecated and will be removed in a future release. */
149
178
  export declare const ReferenceGroupToggle: ForwardRefComponent<ReferenceGroupToggleProps>;
150
179
 
151
180
  export declare const referenceGroupToggleClassNames: SlotClassNames<ReferenceGroupToggleSlots>;
@@ -167,8 +196,10 @@ export declare type ReferenceGroupToggleSlots = {
167
196
  */
168
197
  export declare type ReferenceGroupToggleState = ComponentState<ReferenceGroupToggleSlots> & Required<Pick<ReferenceGroupToggleProps, 'isOpen' | 'mode'>>;
169
198
 
199
+ /** deprecated Use ReferenceListV2 component, hooks and types instead. */
170
200
  export declare const ReferenceList: ForwardRefComponent<ReferenceListProps>;
171
201
 
202
+ /** deprecated Use ReferenceListV2 component, hooks and types instead. */
172
203
  export declare const referenceListClassNames: SlotClassNames<ReferenceListSlots>;
173
204
 
174
205
  export declare const ReferenceListContext: Context<ReferenceListContextValue>;
@@ -180,11 +211,10 @@ export declare const ReferenceListContextProvider: Provider<ReferenceListContext
180
211
  */
181
212
  export declare type ReferenceListContextValue = Pick<ReferenceListV2State, 'areReferencesExpanded' | 'maxVisibleReferences' | 'overflowButtonTriggeredViaKeyboard' | 'referenceListRef' | 'shouldUseOverflow' | 'totalReferencesCount'>;
182
213
 
183
- /**
184
- * ReferenceList Props
185
- */
214
+ /** deprecated Use ReferenceListV2 component, hooks and types instead. */
186
215
  export declare type ReferenceListProps = ComponentProps<ReferenceListSlots>;
187
216
 
217
+ /** deprecated Use ReferenceListV2 component, hooks and types instead. */
188
218
  export declare type ReferenceListSlots = {
189
219
  /**
190
220
  * The root slot.
@@ -192,9 +222,7 @@ export declare type ReferenceListSlots = {
192
222
  root: Slot<'ol'>;
193
223
  };
194
224
 
195
- /**
196
- * State used in rendering ReferenceList
197
- */
225
+ /** deprecated Use ReferenceListV2 component, hooks and types instead. */
198
226
  export declare type ReferenceListState = ComponentState<ReferenceListSlots>;
199
227
 
200
228
  export declare const ReferenceListV2: ForwardRefComponent<ReferenceListV2Props>;
@@ -216,8 +244,11 @@ export declare type ReferenceListV2Props = ComponentProps<ReferenceListV2Slots>
216
244
  };
217
245
 
218
246
  export declare type ReferenceListV2Slots = {
247
+ /** The root of the component that contains the list of references. */
219
248
  root: NonNullable<Slot<'div'>>;
249
+ /** A space containing a button that expands the list of references. This slot is only rendered when the list of references is collapsed. */
220
250
  showMoreButton?: Slot<'span'>;
251
+ /** A space containing a button that collapses the list of references. This slot is only rendered when the list of references is expanded. */
221
252
  showLessButton?: Slot<'span'>;
222
253
  };
223
254
 
@@ -237,10 +268,16 @@ export declare const referenceOverflowButtonClassNames: SlotClassNames<Reference
237
268
  * ReferenceOverflowButton Props
238
269
  */
239
270
  export declare type ReferenceOverflowButtonProps = ComponentProps<ReferenceOverflowButtonSlots> & {
271
+ /**
272
+ * The text that is displayed inside of the overflow button. This text is only displayed when `children` has not been passed to the component.
273
+ * If a string is passed, that is what is rendered verbatim.
274
+ * If a callback is passed, the callback is called with the number of items that are overflowing, and the result of the callback is rendered.
275
+ */
240
276
  text?: string | ((overflowCount: number) => React.ReactNode);
241
277
  };
242
278
 
243
279
  export declare type ReferenceOverflowButtonSlots = {
280
+ /** The root of the component that renders the overflow button. */
244
281
  root: Slot<'button'>;
245
282
  };
246
283
 
@@ -251,9 +288,7 @@ export declare type ReferenceOverflowButtonState = ComponentState<ReferenceOverf
251
288
  shouldRenderOverflowButton: boolean;
252
289
  };
253
290
 
254
- /**
255
- * Reference Props
256
- */
291
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
257
292
  export declare type ReferenceProps = ComponentProps<Partial<ReferenceSlots>> & CopilotMode & {
258
293
  /**
259
294
  * Numeric index associated with `Citation`.
@@ -277,6 +312,7 @@ export declare type ReferenceProps = ComponentProps<Partial<ReferenceSlots>> & C
277
312
  layout?: 'inline' | 'popover';
278
313
  };
279
314
 
315
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
280
316
  export declare type ReferenceSlots = {
281
317
  /**
282
318
  * The root slot.
@@ -332,9 +368,7 @@ export declare type ReferenceSlots = {
332
368
  detailsButton: Slot<typeof Button>;
333
369
  };
334
370
 
335
- /**
336
- * State used in rendering Reference
337
- */
371
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
338
372
  export declare type ReferenceState = ComponentState<ReferenceSlots> & Required<Pick<ReferenceProps, 'mode' | 'layout' | 'index'>> & {
339
373
  /**
340
374
  * State used to renderer the `Reference` in an expanded state.
@@ -353,10 +387,15 @@ export declare const referenceV2ExtraClassNames: {
353
387
  export declare type ReferenceV2Props = ComponentProps<Partial<ReferenceV2Slots>> & {};
354
388
 
355
389
  export declare type ReferenceV2Slots = {
390
+ /** The root of the component that renders the reference as either a button or an anchor element. */
356
391
  root: NonNullable<Slot<'button', 'a'>>;
392
+ /** The number of the citation this reference corresponds to. */
357
393
  citation?: Slot<'span'>;
394
+ /** A divider that visually separates the citation from the content of the reference. */
358
395
  divider?: Slot<'span'>;
396
+ /** A space containing the content of the reference, which goes into an ellipsis if it overflows. */
359
397
  content?: Slot<'span'>;
398
+ /** A space within the content slot where a graphic such as an icon or an image can be displayed before the rest of the content. */
360
399
  graphic?: Slot<'span'>;
361
400
  };
362
401
 
@@ -367,9 +406,7 @@ export declare type ReferenceV2State = ComponentState<ReferenceV2Slots> & Requir
367
406
  */
368
407
  export declare const renderCitation_unstable: (state: CitationState) => JSX.Element;
369
408
 
370
- /**
371
- * Render the final JSX of Reference
372
- */
409
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
373
410
  export declare const renderReference_unstable: (state: ReferenceState) => JSX.Element;
374
411
 
375
412
  /**
@@ -377,9 +414,7 @@ export declare const renderReference_unstable: (state: ReferenceState) => JSX.El
377
414
  */
378
415
  export declare const renderReferenceGroupToggle_unstable: (state: ReferenceGroupToggleState) => JSX.Element;
379
416
 
380
- /**
381
- * Render the final JSX of ReferenceList
382
- */
417
+ /** deprecated Use ReferenceListV2 component, hooks and types instead. */
383
418
  export declare const renderReferenceList_unstable: (state: ReferenceListState) => JSX.Element;
384
419
 
385
420
  /**
@@ -414,6 +449,10 @@ declare const SensitivityTooltip: ForwardRefComponent<SensitivityTooltipProps>;
414
449
  */
415
450
  declare type SensitivityTooltipProps = ComponentProps<SensitivityTooltipSlots> & {
416
451
  positioning?: PositioningShorthand;
452
+ /**
453
+ * Prop to display a backplate behind the tooltip
454
+ */
455
+ withBackplate?: boolean;
417
456
  };
418
457
 
419
458
  declare type SensitivityTooltipSlots = {
@@ -448,6 +487,8 @@ export declare const useCitationStyles_unstable: (state: CitationState) => Citat
448
487
  *
449
488
  * @param props - props from this instance of Reference
450
489
  * @param ref - reference to root HTMLElement of Reference
490
+ *
491
+ * deprecated Use ReferenceV2 component, hooks and types instead.
451
492
  */
452
493
  export declare const useReference_unstable: (props: ReferenceProps, ref: React_2.Ref<HTMLDivElement>) => ReferenceState;
453
494
 
@@ -478,6 +519,7 @@ export declare type UseReferenceCitationPreviewV2Props = {
478
519
  citationProps?: CitationProps;
479
520
  index: number;
480
521
  previewContentProps?: PackagedPreviewContentV2Props;
522
+ previewHeaderProps?: PreviewHeaderProps;
481
523
  referencePreviewProps?: PreviewProps;
482
524
  referencePreviewSurfaceProps?: PreviewSurfaceProps;
483
525
  referenceProps?: ReferenceV2Props;
@@ -526,6 +568,8 @@ export declare const useReferenceGroupToggleStyles_unstable: (state: ReferenceGr
526
568
  *
527
569
  * @param props - props from this instance of ReferenceList
528
570
  * @param ref - reference to root HTMLElement of ReferenceList
571
+ *
572
+ * deprecated Use ReferenceListV2 component, hooks and types instead.
529
573
  */
530
574
  export declare const useReferenceList_unstable: (props: ReferenceListProps, ref: React_2.Ref<HTMLOListElement>) => ReferenceListState;
531
575
 
@@ -533,14 +577,11 @@ export declare const useReferenceListContext_unstable: <T>(selector: ContextSele
533
577
 
534
578
  /**
535
579
  * Apply styling to the ReferenceList slots based on the state
580
+ *
581
+ * deprecated Use ReferenceListV2 component, hooks and types instead.
536
582
  */
537
583
  export declare const useReferenceListStyles_unstable: (state: ReferenceListState) => ReferenceListState;
538
584
 
539
- /**
540
- * Apply styling to the ReferenceList slots based on the state
541
- */
542
- export declare const useReferenceListStylesV2_unstable: (state: ReferenceListV2State) => ReferenceListV2State;
543
-
544
585
  /**
545
586
  * Create the state required to render ReferenceList.
546
587
  *
@@ -552,6 +593,11 @@ export declare const useReferenceListStylesV2_unstable: (state: ReferenceListV2S
552
593
  */
553
594
  export declare const useReferenceListV2_unstable: (props: ReferenceListV2Props, ref: React_2.Ref<HTMLDivElement>) => ReferenceListV2State;
554
595
 
596
+ /**
597
+ * Apply styling to the ReferenceList slots based on the state
598
+ */
599
+ export declare const useReferenceListV2Styles_unstable: (state: ReferenceListV2State) => ReferenceListV2State;
600
+
555
601
  /**
556
602
  * Create the state required to render ReferenceOverflowButton.
557
603
  *
@@ -570,14 +616,11 @@ export declare const useReferenceOverflowButtonStyles_unstable: (state: Referenc
570
616
 
571
617
  /**
572
618
  * Apply styling to the Reference slots based on the state
619
+ *
620
+ * deprecated Use ReferenceV2 component, hooks and types instead.
573
621
  */
574
622
  export declare const useReferenceStyles_unstable: (state: ReferenceState) => ReferenceState;
575
623
 
576
- /**
577
- * Apply styling to the Reference slots based on the state
578
- */
579
- export declare const useReferenceStylesV2_unstable: (state: ReferenceV2State) => ReferenceV2State;
580
-
581
624
  /**
582
625
  * Create the state required to render Reference.
583
626
  *
@@ -589,4 +632,9 @@ export declare const useReferenceStylesV2_unstable: (state: ReferenceV2State) =>
589
632
  */
590
633
  export declare const useReferenceV2_unstable: (props: ReferenceV2Props, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => ReferenceV2State;
591
634
 
635
+ /**
636
+ * Apply styling to the Reference slots based on the state
637
+ */
638
+ export declare const useReferenceV2Styles_unstable: (state: ReferenceV2State) => ReferenceV2State;
639
+
592
640
  export { }
@@ -1,2 +1,2 @@
1
- export * from './components/reference-v2/ReferenceList';
1
+ export * from './components/reference-v2/ReferenceList/index';
2
2
  //# sourceMappingURL=ReferenceListV2.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ReferenceListV2.ts"],"sourcesContent":["export * from './components/reference-v2/ReferenceList';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,0CAA0C"}
1
+ {"version":3,"sources":["ReferenceListV2.ts"],"sourcesContent":["export * from './components/reference-v2/ReferenceList/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,gDAAgD"}
@@ -1,2 +1,2 @@
1
- export * from './components/reference-v2/ReferenceOverflowButton';
1
+ export * from './components/reference-v2/ReferenceOverflowButton/index';
2
2
  //# sourceMappingURL=ReferenceOverflowButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ReferenceOverflowButton.ts"],"sourcesContent":["export * from './components/reference-v2/ReferenceOverflowButton';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,oDAAoD"}
1
+ {"version":3,"sources":["ReferenceOverflowButton.ts"],"sourcesContent":["export * from './components/reference-v2/ReferenceOverflowButton/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,0DAA0D"}
@@ -1,2 +1,2 @@
1
- export * from './components/reference-v2/Reference';
1
+ export * from './components/reference-v2/Reference/index';
2
2
  //# sourceMappingURL=ReferenceV2.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ReferenceV2.ts"],"sourcesContent":["export * from './components/reference-v2/Reference';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,sCAAsC"}
1
+ {"version":3,"sources":["ReferenceV2.ts"],"sourcesContent":["export * from './components/reference-v2/Reference/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,4CAA4C"}
@@ -3,7 +3,7 @@ import { useReference_unstable } from './useReference';
3
3
  import { renderReference_unstable } from './renderReference';
4
4
  import { useReferenceStyles_unstable } from './useReferenceStyles.styles';
5
5
  import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
- // Reference component - TODO: add more docs
6
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
7
7
  export const Reference = /*#__PURE__*/React.forwardRef((props, ref) => {
8
8
  const state = useReference_unstable(props, ref);
9
9
  useReferenceStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["Reference.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReference_unstable } from './useReference';\nimport { renderReference_unstable } from './renderReference';\nimport { useReferenceStyles_unstable } from './useReferenceStyles.styles';\nimport type { ReferenceProps } from './Reference.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Reference component - TODO: add more docs\nexport const Reference: ForwardRefComponent<ReferenceProps> = React.forwardRef((props, ref) => {\n const state = useReference_unstable(props, ref);\n\n useReferenceStyles_unstable(state);\n useCustomStyleHook('useReferenceStyles')(state);\n\n return renderReference_unstable(state);\n});\n\nReference.displayName = 'Reference';\n"],"names":["React","useReference_unstable","renderReference_unstable","useReferenceStyles_unstable","useCustomStyleHook","Reference","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,8BAA8B;AAG1E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,4CAA4C;AAC5C,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAC5BL,mBAAmB,sBAAsBK;IAEzC,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Reference.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReference_unstable } from './useReference';\nimport { renderReference_unstable } from './renderReference';\nimport { useReferenceStyles_unstable } from './useReferenceStyles.styles';\nimport type { ReferenceProps } from './Reference.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const Reference: ForwardRefComponent<ReferenceProps> = React.forwardRef((props, ref) => {\n const state = useReference_unstable(props, ref);\n\n useReferenceStyles_unstable(state);\n useCustomStyleHook('useReferenceStyles')(state);\n\n return renderReference_unstable(state);\n});\n\nReference.displayName = 'Reference';\n"],"names":["React","useReference_unstable","renderReference_unstable","useReferenceStyles_unstable","useCustomStyleHook","Reference","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,8BAA8B;AAG1E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,mEAAmE,GACnE,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAC5BL,mBAAmB,sBAAsBK;IAEzC,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
@@ -1,4 +1,2 @@
1
- /**
2
- * State used in rendering Reference
3
- */export {};
1
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */export {};
4
2
  //# sourceMappingURL=Reference.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Reference.types.ts"],"sourcesContent":["import type { CopilotMode } from '@fluentui-copilot/react-provider';\nimport type { Button, ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ReferenceSlots = {\n /**\n * The root slot.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Citation slot. Displays a `Citation`. Set the `null` to hide the citation.\n */\n citation: Slot<'div'>;\n\n /**\n * Media slot. Used to display Avatars, Icons, etc.\n */\n media: Slot<'div'>;\n\n /**\n * Actions slot.\n */\n actions: Slot<'div'>;\n\n /**\n * Label slot. Primary description of the reference.\n */\n label: NonNullable<Slot<'div'>>;\n\n /**\n * Sensitivity slot. Used to display a `SensitivityLabel`.\n */\n sensitivity: Slot<'span'>;\n\n /**\n * Metadata slot. Container for `primaryText`, `secondaryText`, `tertiaryText` and `icon`.\n */\n metadata: NonNullable<Slot<'div'>>;\n\n /**\n * Primary text slot. First displayed metadata text.\n */\n primaryText: Slot<'span'>;\n\n /**\n * Secondary text slot. Second displayed metadata text.\n */\n secondaryText: Slot<'span'>;\n\n /**\n * Tertiary text slot. Third displayed metadata text.\n */\n tertiaryText: Slot<'span'>;\n\n /**\n * Icon slot. Icon displayed in metadata area.\n */\n icon: Slot<'span'>;\n\n /**\n * Content slot.\n */\n content: NonNullable<Slot<'div'>>;\n\n /**\n * Details button slot. Used to expand/collapse the reference.\n */\n detailsButton: Slot<typeof Button>;\n};\n\n/**\n * Reference Props\n */\nexport type ReferenceProps = ComponentProps<Partial<ReferenceSlots>> &\n CopilotMode & {\n /**\n * Numeric index associated with `Citation`.\n */\n index: number;\n\n /**\n * HREF back to the `Citation` this `Reference` is associated with.\n */\n citationHref?: string;\n\n /**\n * Unique ID associated with this `Reference`.\n */\n referenceId?: string;\n\n /**\n * Text snippet from the reference source.\n */\n excerpt?: string;\n\n /**\n * @deprecated Inline layout is the only one that is available, use `Preview` component instead for an equivalent to a `Reference` with a popover layout inside of a `Popover`.\n */\n layout?: 'inline' | 'popover';\n };\n\n/**\n * State used in rendering Reference\n */\nexport type ReferenceState = ComponentState<ReferenceSlots> &\n Required<Pick<ReferenceProps, 'mode' | 'layout' | 'index'>> & {\n /**\n * State used to renderer the `Reference` in an expanded state.\n */\n isExpanded: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAqGA;;CAEC,GACD,WAMI"}
1
+ {"version":3,"sources":["Reference.types.ts"],"sourcesContent":["import type { CopilotMode } from '@fluentui-copilot/react-provider';\nimport type { Button, ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport type ReferenceSlots = {\n /**\n * The root slot.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Citation slot. Displays a `Citation`. Set the `null` to hide the citation.\n */\n citation: Slot<'div'>;\n\n /**\n * Media slot. Used to display Avatars, Icons, etc.\n */\n media: Slot<'div'>;\n\n /**\n * Actions slot.\n */\n actions: Slot<'div'>;\n\n /**\n * Label slot. Primary description of the reference.\n */\n label: NonNullable<Slot<'div'>>;\n\n /**\n * Sensitivity slot. Used to display a `SensitivityLabel`.\n */\n sensitivity: Slot<'span'>;\n\n /**\n * Metadata slot. Container for `primaryText`, `secondaryText`, `tertiaryText` and `icon`.\n */\n metadata: NonNullable<Slot<'div'>>;\n\n /**\n * Primary text slot. First displayed metadata text.\n */\n primaryText: Slot<'span'>;\n\n /**\n * Secondary text slot. Second displayed metadata text.\n */\n secondaryText: Slot<'span'>;\n\n /**\n * Tertiary text slot. Third displayed metadata text.\n */\n tertiaryText: Slot<'span'>;\n\n /**\n * Icon slot. Icon displayed in metadata area.\n */\n icon: Slot<'span'>;\n\n /**\n * Content slot.\n */\n content: NonNullable<Slot<'div'>>;\n\n /**\n * Details button slot. Used to expand/collapse the reference.\n */\n detailsButton: Slot<typeof Button>;\n};\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport type ReferenceProps = ComponentProps<Partial<ReferenceSlots>> &\n CopilotMode & {\n /**\n * Numeric index associated with `Citation`.\n */\n index: number;\n\n /**\n * HREF back to the `Citation` this `Reference` is associated with.\n */\n citationHref?: string;\n\n /**\n * Unique ID associated with this `Reference`.\n */\n referenceId?: string;\n\n /**\n * Text snippet from the reference source.\n */\n excerpt?: string;\n\n /**\n * @deprecated Inline layout is the only one that is available, use `Preview` component instead for an equivalent to a `Reference` with a popover layout inside of a `Popover`.\n */\n layout?: 'inline' | 'popover';\n };\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport type ReferenceState = ComponentState<ReferenceSlots> &\n Required<Pick<ReferenceProps, 'mode' | 'layout' | 'index'>> & {\n /**\n * State used to renderer the `Reference` in an expanded state.\n */\n isExpanded: boolean;\n };\n"],"names":[],"rangeMappings":"","mappings":"AAoGA,mEAAmE,GACnE,WAMI"}
@@ -1,8 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-components';
3
- /**
4
- * Render the final JSX of Reference
5
- */
3
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
6
4
  export const renderReference_unstable = state => {
7
5
  assertSlots(state);
8
6
  return /*#__PURE__*/_jsxs(state.root, {
@@ -1 +1 @@
1
- {"version":3,"sources":["renderReference.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport type { ReferenceState, ReferenceSlots } from './Reference.types';\n\n/**\n * Render the final JSX of Reference\n */\nexport const renderReference_unstable = (state: ReferenceState) => {\n assertSlots<ReferenceSlots>(state);\n\n return (\n <state.root>\n {state.citation && <state.citation />}\n {state.media && <state.media />}\n <state.label />\n {state.actions && (\n <state.actions>\n {state.actions.children}\n {state.detailsButton && <state.detailsButton />}\n </state.actions>\n )}\n {state.sensitivity && <state.sensitivity />}\n <state.metadata>\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.tertiaryText && <state.tertiaryText />}\n {state.icon && <state.icon />}\n {state.metadata.children}\n </state.metadata>\n <state.content />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderReference_unstable","state","root","citation","media","label","actions","children","detailsButton","sensitivity","metadata","primaryText","secondaryText","tertiaryText","icon","content"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAIzD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC;IACvCF,YAA4BE;IAE5B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,QAAQ,kBAAI,KAACF,MAAME,QAAQ;YACjCF,MAAMG,KAAK,kBAAI,KAACH,MAAMG,KAAK;0BAC5B,KAACH,MAAMI,KAAK;YACXJ,MAAMK,OAAO,kBACZ,MAACL,MAAMK,OAAO;;oBACXL,MAAMK,OAAO,CAACC,QAAQ;oBACtBN,MAAMO,aAAa,kBAAI,KAACP,MAAMO,aAAa;;;YAG/CP,MAAMQ,WAAW,kBAAI,KAACR,MAAMQ,WAAW;0BACxC,MAACR,MAAMS,QAAQ;;oBACZT,MAAMU,WAAW,kBAAI,KAACV,MAAMU,WAAW;oBACvCV,MAAMW,aAAa,kBAAI,KAACX,MAAMW,aAAa;oBAC3CX,MAAMY,YAAY,kBAAI,KAACZ,MAAMY,YAAY;oBACzCZ,MAAMa,IAAI,kBAAI,KAACb,MAAMa,IAAI;oBACzBb,MAAMS,QAAQ,CAACH,QAAQ;;;0BAE1B,KAACN,MAAMc,OAAO;;;AAGpB,EAAE"}
1
+ {"version":3,"sources":["renderReference.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport type { ReferenceState, ReferenceSlots } from './Reference.types';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const renderReference_unstable = (state: ReferenceState) => {\n assertSlots<ReferenceSlots>(state);\n\n return (\n <state.root>\n {state.citation && <state.citation />}\n {state.media && <state.media />}\n <state.label />\n {state.actions && (\n <state.actions>\n {state.actions.children}\n {state.detailsButton && <state.detailsButton />}\n </state.actions>\n )}\n {state.sensitivity && <state.sensitivity />}\n <state.metadata>\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.tertiaryText && <state.tertiaryText />}\n {state.icon && <state.icon />}\n {state.metadata.children}\n </state.metadata>\n <state.content />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderReference_unstable","state","root","citation","media","label","actions","children","detailsButton","sensitivity","metadata","primaryText","secondaryText","tertiaryText","icon","content"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAIzD,mEAAmE,GACnE,OAAO,MAAMC,2BAA2B,CAACC;IACvCF,YAA4BE;IAE5B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,QAAQ,kBAAI,KAACF,MAAME,QAAQ;YACjCF,MAAMG,KAAK,kBAAI,KAACH,MAAMG,KAAK;0BAC5B,KAACH,MAAMI,KAAK;YACXJ,MAAMK,OAAO,kBACZ,MAACL,MAAMK,OAAO;;oBACXL,MAAMK,OAAO,CAACC,QAAQ;oBACtBN,MAAMO,aAAa,kBAAI,KAACP,MAAMO,aAAa;;;YAG/CP,MAAMQ,WAAW,kBAAI,KAACR,MAAMQ,WAAW;0BACxC,MAACR,MAAMS,QAAQ;;oBACZT,MAAMU,WAAW,kBAAI,KAACV,MAAMU,WAAW;oBACvCV,MAAMW,aAAa,kBAAI,KAACX,MAAMW,aAAa;oBAC3CX,MAAMY,YAAY,kBAAI,KAACZ,MAAMY,YAAY;oBACzCZ,MAAMa,IAAI,kBAAI,KAACb,MAAMa,IAAI;oBACzBb,MAAMS,QAAQ,CAACH,QAAQ;;;0BAE1B,KAACN,MAAMc,OAAO;;;AAGpB,EAAE"}
@@ -13,6 +13,8 @@ import { useCopilotMode } from '@fluentui-copilot/react-provider';
13
13
  *
14
14
  * @param props - props from this instance of Reference
15
15
  * @param ref - reference to root HTMLElement of Reference
16
+ *
17
+ * deprecated Use ReferenceV2 component, hooks and types instead.
16
18
  */
17
19
  export const useReference_unstable = (props, ref) => {
18
20
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["useReference.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Button,\n Caption1,\n getIntrinsicElementProps,\n mergeCallbacks,\n mergeClasses,\n slot,\n useId,\n usePopoverContext_unstable as usePopoverContext,\n} from '@fluentui/react-components';\nimport {\n ChevronDown24Regular,\n ChevronUp24Regular,\n ChevronDown16Regular,\n ChevronUp16Regular,\n} from '@fluentui/react-icons';\nimport { referenceExtraClassNames } from './useReferenceStyles.styles';\nimport { Citation } from '../Citation';\nimport type { ReferenceProps, ReferenceState } from './Reference.types';\nimport { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Reference.\n *\n * The returned state can be modified with hooks such as useReferenceStyles_unstable,\n * before being passed to renderReference_unstable.\n *\n * @param props - props from this instance of Reference\n * @param ref - reference to root HTMLElement of Reference\n */\nexport const useReference_unstable = (props: ReferenceProps, ref: React.Ref<HTMLDivElement>): ReferenceState => {\n const { index, referenceId, citationHref, excerpt, layout = 'inline' } = props;\n\n const mode = useCopilotMode(props.mode);\n\n const labelId = useId();\n const mediaId = useId();\n const [isExpanded, setIsExpanded] = React.useState(layout === 'popover' ? true : false);\n\n const setPopoverOpen = usePopoverContext(context => context.setOpen);\n\n const onExpandClick: React.MouseEventHandler<HTMLButtonElement> = _e => {\n setIsExpanded(!isExpanded);\n };\n\n const label = slot.always(props.label, {\n defaultProps: { id: labelId },\n elementType: 'div',\n });\n const media = slot.optional(props.media, { defaultProps: { id: mediaId }, elementType: 'div' });\n if (media && React.isValidElement<HTMLElement>(media.children)) {\n media.children = React.cloneElement(media.children, {\n className: mergeClasses(media.children.props.className, referenceExtraClassNames.mediaChild),\n });\n }\n\n if (media?.id) {\n label['aria-describedby'] = label['aria-describedby']?.concat(media.id) ?? media.id;\n }\n\n const ariaLabelledByProp = props['aria-labelledby'];\n const groupSemantics = React.useMemo(() => {\n return layout === 'inline'\n ? {\n role: 'group',\n 'aria-labelledby': `${ariaLabelledByProp ?? ''} ${label.id}`,\n tabIndex: -1,\n }\n : {};\n }, [layout, ariaLabelledByProp, label.id]);\n\n // Within a popup, a citation should function as a close button\n const citationProps = React.useMemo(() => {\n const onPopoverCloseClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n setPopoverOpen(e, false);\n\n // don't navigate\n e.preventDefault();\n };\n\n return layout === 'popover'\n ? {\n referenceHref: '#',\n tabIndex: -1,\n 'aria-label': `Reference ${index}, close`,\n onClick: onPopoverCloseClick,\n }\n : {\n referenceHref: citationHref,\n };\n }, [layout, citationHref, index, setPopoverOpen]);\n\n const state: ReferenceState = {\n isExpanded,\n mode: layout === 'popover' ? 'sidecar' : mode,\n layout,\n index,\n components: {\n root: 'div',\n citation: 'div',\n media: 'div',\n actions: 'div',\n label: 'div',\n sensitivity: 'span',\n metadata: 'div',\n content: 'div',\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n icon: 'span',\n detailsButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n id: referenceId,\n ...groupSemantics,\n ...props,\n }),\n { elementType: 'div' },\n ),\n citation: slot.optional(props.citation, {\n defaultProps: {\n children: (\n <Citation block {...citationProps}>\n {index}\n </Citation>\n ),\n },\n renderByDefault: true,\n elementType: 'div',\n }),\n media,\n actions: slot.optional(layout === 'inline' ? props.actions : null, {\n renderByDefault: true,\n elementType: 'div',\n }),\n label,\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n metadata: slot.always(props.metadata, { elementType: 'div' }),\n primaryText: slot.optional(props.primaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n tertiaryText: slot.optional(props.tertiaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n content: slot.always(props.content, {\n defaultProps: {\n children: excerpt && <Caption1>{excerpt}</Caption1>,\n },\n elementType: 'div',\n }),\n detailsButton: slot.optional(layout === 'inline' ? props.detailsButton : null, {\n defaultProps: {\n appearance: 'transparent',\n 'aria-expanded': isExpanded,\n 'aria-label': 'show details',\n size: mode === 'sidecar' ? 'small' : 'medium',\n icon: {\n children: getIcon(isExpanded, mode),\n },\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n if (state.detailsButton) {\n const onClick = state.detailsButton.onClick as React.MouseEventHandler<HTMLButtonElement>;\n state.detailsButton.onClick = mergeCallbacks(onClick, onExpandClick);\n }\n\n const referenceGroupSetOpen = useReferenceGroupSetOpen();\n const onTargettedByCitation = (e: React.FocusEvent<HTMLElement>) => {\n const relatedTargetHash: string | undefined = (e.relatedTarget as HTMLAnchorElement)?.hash;\n if (relatedTargetHash && relatedTargetHash.substring(1) === referenceId) {\n referenceGroupSetOpen();\n setIsExpanded(true);\n }\n };\n state.root.onFocus = mergeCallbacks(state.root.onFocus, onTargettedByCitation);\n\n return state;\n};\n\nconst getIcon = (isExpanded: boolean, mode: ReferenceProps['mode']): JSX.Element => {\n if (mode === 'sidecar') {\n return !isExpanded ? <ChevronDown16Regular /> : <ChevronUp16Regular />;\n }\n\n return !isExpanded ? <ChevronDown24Regular /> : <ChevronUp24Regular />;\n};\n"],"names":["React","Button","Caption1","getIntrinsicElementProps","mergeCallbacks","mergeClasses","slot","useId","usePopoverContext_unstable","usePopoverContext","ChevronDown24Regular","ChevronUp24Regular","ChevronDown16Regular","ChevronUp16Regular","referenceExtraClassNames","Citation","useReferenceGroupSetOpen","useCopilotMode","useReference_unstable","props","ref","index","referenceId","citationHref","excerpt","layout","mode","labelId","mediaId","isExpanded","setIsExpanded","useState","setPopoverOpen","context","setOpen","onExpandClick","_e","label","always","defaultProps","id","elementType","media","optional","isValidElement","children","cloneElement","className","mediaChild","concat","ariaLabelledByProp","groupSemantics","useMemo","role","tabIndex","citationProps","onPopoverCloseClick","e","preventDefault","referenceHref","onClick","state","components","root","citation","actions","sensitivity","metadata","content","primaryText","secondaryText","tertiaryText","icon","detailsButton","block","renderByDefault","hidden","appearance","size","getIcon","referenceGroupSetOpen","onTargettedByCitation","relatedTargetHash","relatedTarget","hash","substring","onFocus"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,MAAM,EACNC,QAAQ,EACRC,wBAAwB,EACxBC,cAAc,EACdC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,8BAA8BC,iBAAiB,QAC1C,6BAA6B;AACpC,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,QACb,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,8BAA8B;AACvE,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,wBAAwB,QAAQ,uCAAuC;AAChF,SAASC,cAAc,QAAQ,mCAAmC;AAElE;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,KAAK,EAAEC,WAAW,EAAEC,YAAY,EAAEC,OAAO,EAAEC,SAAS,QAAQ,EAAE,GAAGN;IAEzE,MAAMO,OAAOT,eAAeE,MAAMO,IAAI;IAEtC,MAAMC,UAAUpB;IAChB,MAAMqB,UAAUrB;IAChB,MAAM,CAACsB,YAAYC,cAAc,GAAG9B,MAAM+B,QAAQ,CAACN,WAAW,YAAY,OAAO;IAEjF,MAAMO,iBAAiBvB,kBAAkBwB,CAAAA,UAAWA,QAAQC,OAAO;IAEnE,MAAMC,gBAA4DC,CAAAA;QAChEN,cAAc,CAACD;IACjB;IAEA,MAAMQ,QAAQ/B,KAAKgC,MAAM,CAACnB,MAAMkB,KAAK,EAAE;QACrCE,cAAc;YAAEC,IA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B,oBAACC;AACnD"}
1
+ {"version":3,"sources":["useReference.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Button,\n Caption1,\n getIntrinsicElementProps,\n mergeCallbacks,\n mergeClasses,\n slot,\n useId,\n usePopoverContext_unstable as usePopoverContext,\n} from '@fluentui/react-components';\nimport {\n ChevronDown24Regular,\n ChevronUp24Regular,\n ChevronDown16Regular,\n ChevronUp16Regular,\n} from '@fluentui/react-icons';\nimport { referenceExtraClassNames } from './useReferenceStyles.styles';\nimport { Citation } from '../Citation';\nimport type { ReferenceProps, ReferenceState } from './Reference.types';\nimport { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Reference.\n *\n * The returned state can be modified with hooks such as useReferenceStyles_unstable,\n * before being passed to renderReference_unstable.\n *\n * @param props - props from this instance of Reference\n * @param ref - reference to root HTMLElement of Reference\n *\n * deprecated Use ReferenceV2 component, hooks and types instead.\n */\nexport const useReference_unstable = (props: ReferenceProps, ref: React.Ref<HTMLDivElement>): ReferenceState => {\n const { index, referenceId, citationHref, excerpt, layout = 'inline' } = props;\n\n const mode = useCopilotMode(props.mode);\n\n const labelId = useId();\n const mediaId = useId();\n const [isExpanded, setIsExpanded] = React.useState(layout === 'popover' ? true : false);\n\n const setPopoverOpen = usePopoverContext(context => context.setOpen);\n\n const onExpandClick: React.MouseEventHandler<HTMLButtonElement> = _e => {\n setIsExpanded(!isExpanded);\n };\n\n const label = slot.always(props.label, {\n defaultProps: { id: labelId },\n elementType: 'div',\n });\n const media = slot.optional(props.media, { defaultProps: { id: mediaId }, elementType: 'div' });\n if (media && React.isValidElement<HTMLElement>(media.children)) {\n media.children = React.cloneElement(media.children, {\n className: mergeClasses(media.children.props.className, referenceExtraClassNames.mediaChild),\n });\n }\n\n if (media?.id) {\n label['aria-describedby'] = label['aria-describedby']?.concat(media.id) ?? media.id;\n }\n\n const ariaLabelledByProp = props['aria-labelledby'];\n const groupSemantics = React.useMemo(() => {\n return layout === 'inline'\n ? {\n role: 'group',\n 'aria-labelledby': `${ariaLabelledByProp ?? ''} ${label.id}`,\n tabIndex: -1,\n }\n : {};\n }, [layout, ariaLabelledByProp, label.id]);\n\n // Within a popup, a citation should function as a close button\n const citationProps = React.useMemo(() => {\n const onPopoverCloseClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n setPopoverOpen(e, false);\n\n // don't navigate\n e.preventDefault();\n };\n\n return layout === 'popover'\n ? {\n referenceHref: '#',\n tabIndex: -1,\n 'aria-label': `Reference ${index}, close`,\n onClick: onPopoverCloseClick,\n }\n : {\n referenceHref: citationHref,\n };\n }, [layout, citationHref, index, setPopoverOpen]);\n\n const state: ReferenceState = {\n isExpanded,\n mode: layout === 'popover' ? 'sidecar' : mode,\n layout,\n index,\n components: {\n root: 'div',\n citation: 'div',\n media: 'div',\n actions: 'div',\n label: 'div',\n sensitivity: 'span',\n metadata: 'div',\n content: 'div',\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n icon: 'span',\n detailsButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n id: referenceId,\n ...groupSemantics,\n ...props,\n }),\n { elementType: 'div' },\n ),\n citation: slot.optional(props.citation, {\n defaultProps: {\n children: (\n <Citation block {...citationProps}>\n {index}\n </Citation>\n ),\n },\n renderByDefault: true,\n elementType: 'div',\n }),\n media,\n actions: slot.optional(layout === 'inline' ? props.actions : null, {\n renderByDefault: true,\n elementType: 'div',\n }),\n label,\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n metadata: slot.always(props.metadata, { elementType: 'div' }),\n primaryText: slot.optional(props.primaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n tertiaryText: slot.optional(props.tertiaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n content: slot.always(props.content, {\n defaultProps: {\n children: excerpt && <Caption1>{excerpt}</Caption1>,\n },\n elementType: 'div',\n }),\n detailsButton: slot.optional(layout === 'inline' ? props.detailsButton : null, {\n defaultProps: {\n appearance: 'transparent',\n 'aria-expanded': isExpanded,\n 'aria-label': 'show details',\n size: mode === 'sidecar' ? 'small' : 'medium',\n icon: {\n children: getIcon(isExpanded, mode),\n },\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n if (state.detailsButton) {\n const onClick = state.detailsButton.onClick as React.MouseEventHandler<HTMLButtonElement>;\n state.detailsButton.onClick = mergeCallbacks(onClick, onExpandClick);\n }\n\n const referenceGroupSetOpen = useReferenceGroupSetOpen();\n const onTargettedByCitation = (e: React.FocusEvent<HTMLElement>) => {\n const relatedTargetHash: string | undefined = (e.relatedTarget as HTMLAnchorElement)?.hash;\n if (relatedTargetHash && relatedTargetHash.substring(1) === referenceId) {\n referenceGroupSetOpen();\n setIsExpanded(true);\n }\n };\n state.root.onFocus = mergeCallbacks(state.root.onFocus, onTargettedByCitation);\n\n return state;\n};\n\nconst getIcon = (isExpanded: boolean, mode: ReferenceProps['mode']): JSX.Element => {\n if (mode === 'sidecar') {\n return !isExpanded ? <ChevronDown16Regular /> : <ChevronUp16Regular />;\n }\n\n return !isExpanded ? <ChevronDown24Regular /> : <ChevronUp24Regular />;\n};\n"],"names":["React","Button","Caption1","getIntrinsicElementProps","mergeCallbacks","mergeClasses","slot","useId","usePopoverContext_unstable","usePopoverContext","ChevronDown24Regular","ChevronUp24Regular","ChevronDown16Regular","ChevronUp16Regular","referenceExtraClassNames","Citation","useReferenceGroupSetOpen","useCopilotMode","useReference_unstable","props","ref","index","referenceId","citationHref","excerpt","layout","mode","labelId","mediaId","isExpanded","setIsExpanded","useState","setPopoverOpen","context","setOpen","onExpandClick","_e","label","always","defaultProps","id","elementType","media","optional","isValidElement","children","cloneElement","className","mediaChild","concat","ariaLabelledByProp","groupSemantics","useMemo","role","tabIndex","citationProps","onPopoverCloseClick","e","preventDefault","referenceHref","onClick","state","components","root","citation","actions","sensitivity","metadata","content","primaryText","secondaryText","tertiaryText","icon","detailsButton","block","renderByDefault","hidden","appearance","size","getIcon","referenceGroupSetOpen","onTargettedByCitation","relatedTargetHash","relatedTarget","hash","substring","onFocus"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,MAAM,EACNC,QAAQ,EACRC,wBAAwB,EACxBC,cAAc,EACdC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,8BAA8BC,iBAAiB,QAC1C,6BAA6B;AACpC,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,QACb,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,8BAA8B;AACvE,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,wBAAwB,QAAQ,uCAAuC;AAChF,SAASC,cAAc,QAAQ,mCAAmC;AAElE;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,KAAK,EAAEC,WAAW,EAAEC,YAAY,EAAEC,OAAO,EAAEC,SAAS,QAAQ,EAAE,GAAGN;IAEzE,MAAMO,OAAOT,eAAeE,MAAMO,IAAI;IAEtC,MAAMC,UAAUpB;IAChB,MAAMqB,UAAUrB;IAChB,MAAM,CAACsB,YAAYC,cAAc,GAAG9B,MAAM+B,QAAQ,CAACN,WAAW,YAAY,OAAO;IAEjF,MAAMO,iBAAiBvB,kBAAkBw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AAOpB;AACT,EAAE;AAEF,MAAMkB,UAAU,CAAClD,YAAqBH;IACpC,IAAIA,SAAS,WAAW;QACtB,OAAO,CAACG,2BAAa,oBAACjB,4CAA0B,oBAACC;IACnD;IAEA,OAAO,CAACgB,2BAAa,oBAACnB,4CAA0B,oBAACC;AACnD"}
@@ -1,4 +1,5 @@
1
1
  import { buttonClassNames, __resetStyles, __styles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';
2
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
2
3
  export const referenceClassNames = {
3
4
  root: 'fai-Reference',
4
5
  citation: 'fai-Reference__citation',
@@ -14,6 +15,7 @@ export const referenceClassNames = {
14
15
  content: 'fai-Reference__content',
15
16
  detailsButton: 'fai-Reference__detailsButton'
16
17
  };
18
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */
17
19
  export const referenceExtraClassNames = {
18
20
  text: 'fai-Reference__text',
19
21
  mediaChild: 'fai-Reference__mediaChild'
@@ -166,6 +168,8 @@ const useLabelStyles = __styles({
166
168
  });
167
169
  /**
168
170
  * Apply styling to the Reference slots based on the state
171
+ *
172
+ * deprecated Use ReferenceV2 component, hooks and types instead.
169
173
  */
170
174
  export const useReferenceStyles_unstable = state => {
171
175
  'use no memo';