@fluentui-copilot/react-preview 0.0.0-nightly-20240313-0404-8abc883d.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 (182) hide show
  1. package/CHANGELOG.json +273 -0
  2. package/CHANGELOG.md +105 -0
  3. package/LICENSE +23 -0
  4. package/README.md +5 -0
  5. package/dist/index.d.ts +280 -0
  6. package/lib/Preview.js +2 -0
  7. package/lib/Preview.js.map +1 -0
  8. package/lib/PreviewContent.js +2 -0
  9. package/lib/PreviewContent.js.map +1 -0
  10. package/lib/PreviewHeader.js +2 -0
  11. package/lib/PreviewHeader.js.map +1 -0
  12. package/lib/PreviewMetadata.js +2 -0
  13. package/lib/PreviewMetadata.js.map +1 -0
  14. package/lib/PreviewSurface.js +2 -0
  15. package/lib/PreviewSurface.js.map +1 -0
  16. package/lib/PreviewTrigger.js +2 -0
  17. package/lib/PreviewTrigger.js.map +1 -0
  18. package/lib/components/Preview/Preview.js +8 -0
  19. package/lib/components/Preview/Preview.js.map +1 -0
  20. package/lib/components/Preview/Preview.types.js +2 -0
  21. package/lib/components/Preview/Preview.types.js.map +1 -0
  22. package/lib/components/Preview/index.js +5 -0
  23. package/lib/components/Preview/index.js.map +1 -0
  24. package/lib/components/Preview/renderPreview.js +47 -0
  25. package/lib/components/Preview/renderPreview.js.map +1 -0
  26. package/lib/components/Preview/usePreview.js +240 -0
  27. package/lib/components/Preview/usePreview.js.map +1 -0
  28. package/lib/components/PreviewContent/PreviewContent.js +11 -0
  29. package/lib/components/PreviewContent/PreviewContent.js.map +1 -0
  30. package/lib/components/PreviewContent/PreviewContent.types.js +2 -0
  31. package/lib/components/PreviewContent/PreviewContent.types.js.map +1 -0
  32. package/lib/components/PreviewContent/index.js +6 -0
  33. package/lib/components/PreviewContent/index.js.map +1 -0
  34. package/lib/components/PreviewContent/renderPreviewContent.js +10 -0
  35. package/lib/components/PreviewContent/renderPreviewContent.js.map +1 -0
  36. package/lib/components/PreviewContent/usePreviewContent.js +24 -0
  37. package/lib/components/PreviewContent/usePreviewContent.js.map +1 -0
  38. package/lib/components/PreviewContent/usePreviewContentStyles.js +17 -0
  39. package/lib/components/PreviewContent/usePreviewContentStyles.js.map +1 -0
  40. package/lib/components/PreviewHeader/PreviewHeader.js +11 -0
  41. package/lib/components/PreviewHeader/PreviewHeader.js.map +1 -0
  42. package/lib/components/PreviewHeader/PreviewHeader.types.js +2 -0
  43. package/lib/components/PreviewHeader/PreviewHeader.types.js.map +1 -0
  44. package/lib/components/PreviewHeader/index.js +6 -0
  45. package/lib/components/PreviewHeader/index.js.map +1 -0
  46. package/lib/components/PreviewHeader/renderPreviewHeader.js +12 -0
  47. package/lib/components/PreviewHeader/renderPreviewHeader.js.map +1 -0
  48. package/lib/components/PreviewHeader/usePreviewHeader.js +68 -0
  49. package/lib/components/PreviewHeader/usePreviewHeader.js.map +1 -0
  50. package/lib/components/PreviewHeader/usePreviewHeaderStyles.js +41 -0
  51. package/lib/components/PreviewHeader/usePreviewHeaderStyles.js.map +1 -0
  52. package/lib/components/PreviewMetadata/PreviewMetadata.js +11 -0
  53. package/lib/components/PreviewMetadata/PreviewMetadata.js.map +1 -0
  54. package/lib/components/PreviewMetadata/PreviewMetadata.types.js +2 -0
  55. package/lib/components/PreviewMetadata/PreviewMetadata.types.js.map +1 -0
  56. package/lib/components/PreviewMetadata/index.js +6 -0
  57. package/lib/components/PreviewMetadata/index.js.map +1 -0
  58. package/lib/components/PreviewMetadata/renderPreviewMetadata.js +12 -0
  59. package/lib/components/PreviewMetadata/renderPreviewMetadata.js.map +1 -0
  60. package/lib/components/PreviewMetadata/usePreviewMetadata.js +46 -0
  61. package/lib/components/PreviewMetadata/usePreviewMetadata.js.map +1 -0
  62. package/lib/components/PreviewMetadata/usePreviewMetadataStyles.js +53 -0
  63. package/lib/components/PreviewMetadata/usePreviewMetadataStyles.js.map +1 -0
  64. package/lib/components/PreviewSurface/PreviewSurface.js +11 -0
  65. package/lib/components/PreviewSurface/PreviewSurface.js.map +1 -0
  66. package/lib/components/PreviewSurface/PreviewSurface.types.js +2 -0
  67. package/lib/components/PreviewSurface/PreviewSurface.types.js.map +1 -0
  68. package/lib/components/PreviewSurface/index.js +6 -0
  69. package/lib/components/PreviewSurface/index.js.map +1 -0
  70. package/lib/components/PreviewSurface/renderPreviewSurface.js +8 -0
  71. package/lib/components/PreviewSurface/renderPreviewSurface.js.map +1 -0
  72. package/lib/components/PreviewSurface/usePreviewSurface.js +15 -0
  73. package/lib/components/PreviewSurface/usePreviewSurface.js.map +1 -0
  74. package/lib/components/PreviewSurface/usePreviewSurfaceStyles.js +28 -0
  75. package/lib/components/PreviewSurface/usePreviewSurfaceStyles.js.map +1 -0
  76. package/lib/components/PreviewTrigger/PreviewTrigger.js +8 -0
  77. package/lib/components/PreviewTrigger/PreviewTrigger.js.map +1 -0
  78. package/lib/components/PreviewTrigger/PreviewTrigger.types.js +2 -0
  79. package/lib/components/PreviewTrigger/PreviewTrigger.types.js.map +1 -0
  80. package/lib/components/PreviewTrigger/index.js +5 -0
  81. package/lib/components/PreviewTrigger/index.js.map +1 -0
  82. package/lib/components/PreviewTrigger/renderPreviewTrigger.js +8 -0
  83. package/lib/components/PreviewTrigger/renderPreviewTrigger.js.map +1 -0
  84. package/lib/components/PreviewTrigger/usePreviewTrigger.js +15 -0
  85. package/lib/components/PreviewTrigger/usePreviewTrigger.js.map +1 -0
  86. package/lib/index.js +8 -0
  87. package/lib/index.js.map +1 -0
  88. package/lib/previewContext.js +25 -0
  89. package/lib/previewContext.js.map +1 -0
  90. package/lib/utils/index.js +2 -0
  91. package/lib/utils/index.js.map +1 -0
  92. package/lib/utils/openedByHoverPreviewManager.js +23 -0
  93. package/lib/utils/openedByHoverPreviewManager.js.map +1 -0
  94. package/lib-commonjs/Preview.js +7 -0
  95. package/lib-commonjs/Preview.js.map +1 -0
  96. package/lib-commonjs/PreviewContent.js +7 -0
  97. package/lib-commonjs/PreviewContent.js.map +1 -0
  98. package/lib-commonjs/PreviewHeader.js +7 -0
  99. package/lib-commonjs/PreviewHeader.js.map +1 -0
  100. package/lib-commonjs/PreviewMetadata.js +7 -0
  101. package/lib-commonjs/PreviewMetadata.js.map +1 -0
  102. package/lib-commonjs/PreviewSurface.js +7 -0
  103. package/lib-commonjs/PreviewSurface.js.map +1 -0
  104. package/lib-commonjs/PreviewTrigger.js +7 -0
  105. package/lib-commonjs/PreviewTrigger.js.map +1 -0
  106. package/lib-commonjs/components/Preview/Preview.js +17 -0
  107. package/lib-commonjs/components/Preview/Preview.js.map +1 -0
  108. package/lib-commonjs/components/Preview/Preview.types.js +5 -0
  109. package/lib-commonjs/components/Preview/Preview.types.js.map +1 -0
  110. package/lib-commonjs/components/Preview/index.js +10 -0
  111. package/lib-commonjs/components/Preview/index.js.map +1 -0
  112. package/lib-commonjs/components/Preview/renderPreview.js +37 -0
  113. package/lib-commonjs/components/Preview/renderPreview.js.map +1 -0
  114. package/lib-commonjs/components/Preview/usePreview.js +241 -0
  115. package/lib-commonjs/components/Preview/usePreview.js.map +1 -0
  116. package/lib-commonjs/components/PreviewContent/PreviewContent.js +21 -0
  117. package/lib-commonjs/components/PreviewContent/PreviewContent.js.map +1 -0
  118. package/lib-commonjs/components/PreviewContent/PreviewContent.types.js +5 -0
  119. package/lib-commonjs/components/PreviewContent/PreviewContent.types.js.map +1 -0
  120. package/lib-commonjs/components/PreviewContent/index.js +11 -0
  121. package/lib-commonjs/components/PreviewContent/index.js.map +1 -0
  122. package/lib-commonjs/components/PreviewContent/renderPreviewContent.js +16 -0
  123. package/lib-commonjs/components/PreviewContent/renderPreviewContent.js.map +1 -0
  124. package/lib-commonjs/components/PreviewContent/usePreviewContent.js +24 -0
  125. package/lib-commonjs/components/PreviewContent/usePreviewContent.js.map +1 -0
  126. package/lib-commonjs/components/PreviewContent/usePreviewContentStyles.js +33 -0
  127. package/lib-commonjs/components/PreviewContent/usePreviewContentStyles.js.map +1 -0
  128. package/lib-commonjs/components/PreviewHeader/PreviewHeader.js +21 -0
  129. package/lib-commonjs/components/PreviewHeader/PreviewHeader.js.map +1 -0
  130. package/lib-commonjs/components/PreviewHeader/PreviewHeader.types.js +5 -0
  131. package/lib-commonjs/components/PreviewHeader/PreviewHeader.types.js.map +1 -0
  132. package/lib-commonjs/components/PreviewHeader/index.js +11 -0
  133. package/lib-commonjs/components/PreviewHeader/index.js.map +1 -0
  134. package/lib-commonjs/components/PreviewHeader/renderPreviewHeader.js +23 -0
  135. package/lib-commonjs/components/PreviewHeader/renderPreviewHeader.js.map +1 -0
  136. package/lib-commonjs/components/PreviewHeader/usePreviewHeader.js +63 -0
  137. package/lib-commonjs/components/PreviewHeader/usePreviewHeader.js.map +1 -0
  138. package/lib-commonjs/components/PreviewHeader/usePreviewHeaderStyles.js +69 -0
  139. package/lib-commonjs/components/PreviewHeader/usePreviewHeaderStyles.js.map +1 -0
  140. package/lib-commonjs/components/PreviewMetadata/PreviewMetadata.js +21 -0
  141. package/lib-commonjs/components/PreviewMetadata/PreviewMetadata.js.map +1 -0
  142. package/lib-commonjs/components/PreviewMetadata/PreviewMetadata.types.js +5 -0
  143. package/lib-commonjs/components/PreviewMetadata/PreviewMetadata.types.js.map +1 -0
  144. package/lib-commonjs/components/PreviewMetadata/index.js +11 -0
  145. package/lib-commonjs/components/PreviewMetadata/index.js.map +1 -0
  146. package/lib-commonjs/components/PreviewMetadata/renderPreviewMetadata.js +24 -0
  147. package/lib-commonjs/components/PreviewMetadata/renderPreviewMetadata.js.map +1 -0
  148. package/lib-commonjs/components/PreviewMetadata/usePreviewMetadata.js +41 -0
  149. package/lib-commonjs/components/PreviewMetadata/usePreviewMetadata.js.map +1 -0
  150. package/lib-commonjs/components/PreviewMetadata/usePreviewMetadataStyles.js +104 -0
  151. package/lib-commonjs/components/PreviewMetadata/usePreviewMetadataStyles.js.map +1 -0
  152. package/lib-commonjs/components/PreviewSurface/PreviewSurface.js +21 -0
  153. package/lib-commonjs/components/PreviewSurface/PreviewSurface.js.map +1 -0
  154. package/lib-commonjs/components/PreviewSurface/PreviewSurface.types.js +5 -0
  155. package/lib-commonjs/components/PreviewSurface/PreviewSurface.types.js.map +1 -0
  156. package/lib-commonjs/components/PreviewSurface/index.js +11 -0
  157. package/lib-commonjs/components/PreviewSurface/index.js.map +1 -0
  158. package/lib-commonjs/components/PreviewSurface/renderPreviewSurface.js +14 -0
  159. package/lib-commonjs/components/PreviewSurface/renderPreviewSurface.js.map +1 -0
  160. package/lib-commonjs/components/PreviewSurface/usePreviewSurface.js +14 -0
  161. package/lib-commonjs/components/PreviewSurface/usePreviewSurface.js.map +1 -0
  162. package/lib-commonjs/components/PreviewSurface/usePreviewSurfaceStyles.js +53 -0
  163. package/lib-commonjs/components/PreviewSurface/usePreviewSurfaceStyles.js.map +1 -0
  164. package/lib-commonjs/components/PreviewTrigger/PreviewTrigger.js +17 -0
  165. package/lib-commonjs/components/PreviewTrigger/PreviewTrigger.js.map +1 -0
  166. package/lib-commonjs/components/PreviewTrigger/PreviewTrigger.types.js +5 -0
  167. package/lib-commonjs/components/PreviewTrigger/PreviewTrigger.types.js.map +1 -0
  168. package/lib-commonjs/components/PreviewTrigger/index.js +10 -0
  169. package/lib-commonjs/components/PreviewTrigger/index.js.map +1 -0
  170. package/lib-commonjs/components/PreviewTrigger/renderPreviewTrigger.js +14 -0
  171. package/lib-commonjs/components/PreviewTrigger/renderPreviewTrigger.js.map +1 -0
  172. package/lib-commonjs/components/PreviewTrigger/usePreviewTrigger.js +14 -0
  173. package/lib-commonjs/components/PreviewTrigger/usePreviewTrigger.js.map +1 -0
  174. package/lib-commonjs/index.js +107 -0
  175. package/lib-commonjs/index.js.map +1 -0
  176. package/lib-commonjs/previewContext.js +45 -0
  177. package/lib-commonjs/previewContext.js.map +1 -0
  178. package/lib-commonjs/utils/index.js +7 -0
  179. package/lib-commonjs/utils/index.js.map +1 -0
  180. package/lib-commonjs/utils/openedByHoverPreviewManager.js +43 -0
  181. package/lib-commonjs/utils/openedByHoverPreviewManager.js.map +1 -0
  182. package/package.json +38 -0
package/CHANGELOG.json ADDED
@@ -0,0 +1,273 @@
1
+ {
2
+ "name": "@fluentui-copilot/react-preview",
3
+ "entries": [
4
+ {
5
+ "date": "Wed, 13 Mar 2024 04:09:45 GMT",
6
+ "tag": "@fluentui-copilot/react-preview_v0.0.0-nightly-20240313-0404-8abc883d.1",
7
+ "version": "0.0.0-nightly-20240313-0404-8abc883d.1",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "fluentui-internal@service.microsoft.com",
12
+ "package": "@fluentui-copilot/react-preview",
13
+ "commit": "not available",
14
+ "comment": "Release nightly"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Fri, 01 Mar 2024 20:07:29 GMT",
21
+ "tag": "@fluentai/react-preview_v0.2.0",
22
+ "version": "0.2.0",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "author": "estebanmu@microsoft.com",
27
+ "package": "@fluentai/react-preview",
28
+ "commit": "cb1a21b8465c9a9ff86e52d29a398af35f9d0d3d",
29
+ "comment": "chore: Add tests for SSR."
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Thu, 15 Feb 2024 20:24:47 GMT",
36
+ "tag": "@fluentai/react-preview_v0.2.0",
37
+ "version": "0.2.0",
38
+ "comments": {
39
+ "none": [
40
+ {
41
+ "author": "tristan.watanabe@gmail.com",
42
+ "package": "@fluentai/react-preview",
43
+ "commit": "31ae3ad9098d67abbaf7ac83c402312748bc2ea8",
44
+ "comment": "chore: no longer shipping test related files."
45
+ }
46
+ ],
47
+ "minor": [
48
+ {
49
+ "author": "tristan.watanabe@gmail.com",
50
+ "package": "@fluentai/react-preview",
51
+ "commit": "cd80fe52dd6c3d2b48c96c0ddb26b31cc232b4ca",
52
+ "comment": "chore: initial release to NPM."
53
+ }
54
+ ]
55
+ }
56
+ },
57
+ {
58
+ "date": "Thu, 15 Feb 2024 19:00:00 GMT",
59
+ "tag": "@fluentai/react-preview_v0.1.2",
60
+ "version": "0.1.2",
61
+ "comments": {
62
+ "none": [
63
+ {
64
+ "author": "tristan.watanabe@gmail.com",
65
+ "package": "@fluentai/react-preview",
66
+ "commit": "12c785efdd7e75542f017b70fff7a2d5b00b3df9",
67
+ "comment": "chore: disallow minor package bumps."
68
+ }
69
+ ]
70
+ }
71
+ },
72
+ {
73
+ "date": "Fri, 09 Feb 2024 17:34:09 GMT",
74
+ "tag": "@fluentai/react-preview_v0.1.2",
75
+ "version": "0.1.2",
76
+ "comments": {
77
+ "patch": [
78
+ {
79
+ "author": "makotom@microsoft.com",
80
+ "package": "@fluentai/react-preview",
81
+ "commit": "6e7925f2f2b1de82ad8a1d5b38df0d4679ed11d7",
82
+ "comment": "feat: Implementing manager to close Previews that were opened by hover when another Preview is open by hover."
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ {
88
+ "date": "Tue, 12 Dec 2023 16:35:16 GMT",
89
+ "tag": "@fluentai/react-preview_v0.1.1",
90
+ "version": "0.1.1",
91
+ "comments": {
92
+ "none": [
93
+ {
94
+ "author": "tristan.watanabe@gmail.com",
95
+ "package": "@fluentai/react-preview",
96
+ "commit": "5232ecc84b093f807c6ca5673f54fec0313fd038",
97
+ "comment": "chore: migrate to use global wcagTests a11y testing API."
98
+ },
99
+ {
100
+ "author": "tristan.watanabe@gmail.com",
101
+ "package": "@fluentai/react-preview",
102
+ "commit": "d678a67851c48124410bcf3776fb08dfe2ea3102",
103
+ "comment": "chore: upgrade to use yarn 3."
104
+ }
105
+ ],
106
+ "patch": [
107
+ {
108
+ "author": "Humberto.Morimoto@microsoft.com",
109
+ "package": "@fluentai/react-preview",
110
+ "commit": "2002c3a2d9be30cba86db62208858b2afb907534",
111
+ "comment": "feat: Introducing Preview context to pass custom preview information via context."
112
+ },
113
+ {
114
+ "author": "Humberto.Morimoto@microsoft.com",
115
+ "package": "@fluentai/react-preview",
116
+ "commit": "210193c096e5bf257e0ea8c46bb9da25ff3ede1d",
117
+ "comment": "fix: Preview calls onOpenChange callback every time it opens and closes."
118
+ },
119
+ {
120
+ "author": "owcampbe@microsoft.com",
121
+ "package": "@fluentai/react-preview",
122
+ "commit": "18a1852a22d13af5b985ef8895487805f8ec5948",
123
+ "comment": "fix: Wrap label on word breaks."
124
+ }
125
+ ]
126
+ }
127
+ },
128
+ {
129
+ "date": "Wed, 15 Nov 2023 00:55:21 GMT",
130
+ "tag": "@fluentai/react-preview_v0.1.0",
131
+ "version": "0.1.0",
132
+ "comments": {
133
+ "none": [
134
+ {
135
+ "author": "Humberto.Morimoto@microsoft.com",
136
+ "package": "@fluentai/react-preview",
137
+ "commit": "95db1820516bc2bfde3b2970fc01bf8e7f01f28b",
138
+ "comment": "chore: Fixing failing e2e tests."
139
+ }
140
+ ],
141
+ "patch": [
142
+ {
143
+ "author": "tristan.watanabe@gmail.com",
144
+ "package": "@fluentai/react-preview",
145
+ "commit": "b40885976ace4f49dac58829c43ef9d6c39d158c",
146
+ "comment": "fix: align peer dependency ranges with all other react copilot components."
147
+ },
148
+ {
149
+ "author": "Humberto.Morimoto@microsoft.com",
150
+ "package": "@fluentai/react-preview",
151
+ "commit": "ea9078be8acf2317b0d198435e95608fda5945c4",
152
+ "comment": "feat: Adding Preview component and its subcomponents."
153
+ },
154
+ {
155
+ "author": "tristan.watanabe@gmail.com",
156
+ "package": "@fluentai/react-preview",
157
+ "commit": "0f8bee2a01c127a911afd5974efe899d70bddcf6",
158
+ "comment": "chore: bump peer deep range to latest @fluentui/react-components 9.37.3."
159
+ },
160
+ {
161
+ "author": "Humberto.Morimoto@microsoft.com",
162
+ "package": "@fluentai/react-preview",
163
+ "commit": "ed753c95d8fa73edcd463557ca7048cc5250387e",
164
+ "comment": "fix: Nested popovers in preview can escape without closing preview."
165
+ }
166
+ ],
167
+ "minor": [
168
+ {
169
+ "author": "tristan.watanabe@gmail.com",
170
+ "package": "@fluentai/react-preview",
171
+ "commit": "de4d0645ade56badaab3b5e2b72937e02aecf831",
172
+ "comment": "chore: move @fluentui dependencies to peer dependencies."
173
+ }
174
+ ]
175
+ }
176
+ },
177
+ {
178
+ "date": "Mon, 25 Sep 2023 20:31:08 GMT",
179
+ "tag": "@fluentai/react-preview_v0.0.5",
180
+ "version": "0.0.5",
181
+ "comments": {
182
+ "patch": [
183
+ {
184
+ "author": "tristan.watanabe@gmail.com",
185
+ "package": "@fluentai/react-preview",
186
+ "commit": "3af73688a366aae72ea810e441c7096635e2efdd",
187
+ "comment": "fix: bump swc core to mitigate transpilation memory leaks."
188
+ }
189
+ ],
190
+ "none": [
191
+ {
192
+ "author": "tristan.watanabe@gmail.com",
193
+ "package": "@fluentai/react-preview",
194
+ "commit": "5da9480d5a59872ac5148097a287e04d842d6dd6",
195
+ "comment": "chore: update swc transpilation to use swc-transpile script instead of cli."
196
+ }
197
+ ]
198
+ }
199
+ },
200
+ {
201
+ "date": "Fri, 22 Sep 2023 02:11:56 GMT",
202
+ "tag": "@fluentai/react-preview_v0.0.4",
203
+ "version": "0.0.4",
204
+ "comments": {
205
+ "patch": [
206
+ {
207
+ "author": "tristan.watanabe@gmail.com",
208
+ "package": "@fluentai/react-preview",
209
+ "commit": "a206564fcbe9ebe96455a8f5e80fb8e508bd8cd8",
210
+ "comment": "chore: bump fluentui v9 dependencies to latest."
211
+ }
212
+ ]
213
+ }
214
+ },
215
+ {
216
+ "date": "Fri, 08 Sep 2023 18:32:55 GMT",
217
+ "tag": "@fluentai/react-preview_v0.0.3",
218
+ "version": "0.0.3",
219
+ "comments": {
220
+ "patch": [
221
+ {
222
+ "author": "tristan.watanabe@gmail.com",
223
+ "package": "@fluentai/react-preview",
224
+ "commit": "cb1c7f942a8ebe35d6dbad3afff1e7173966d8dc",
225
+ "comment": "test: add e2e setup and WCAG tests."
226
+ }
227
+ ]
228
+ }
229
+ },
230
+ {
231
+ "date": "Tue, 22 Aug 2023 23:54:16 GMT",
232
+ "tag": "@fluentai/react-preview_v0.0.2",
233
+ "version": "0.0.2",
234
+ "comments": {
235
+ "patch": [
236
+ {
237
+ "author": "eysjiang@gmail.com",
238
+ "package": "@fluentai/react-preview",
239
+ "commit": "053b6ace2e6f9433ad062d44865b2d5488760f6b",
240
+ "comment": "add useCustomStyleHook to all components"
241
+ },
242
+ {
243
+ "author": "tristan.watanabe@gmail.com",
244
+ "package": "@fluentai/react-preview",
245
+ "commit": "85042a8790abc66f6cd011356ac3756d34748973",
246
+ "comment": "chore: bump fluentui dependencies."
247
+ },
248
+ {
249
+ "author": "Humberto.Morimoto@microsoft.com",
250
+ "package": "@fluentai/react-preview",
251
+ "commit": "b67343603566c0d4c6d1fc9b6f79be24045be7fb",
252
+ "comment": "fix: Make media slot be descriptor of label/title."
253
+ }
254
+ ]
255
+ }
256
+ },
257
+ {
258
+ "date": "Thu, 10 Aug 2023 17:07:07 GMT",
259
+ "tag": "@fluentai/react-preview_v0.0.1",
260
+ "version": "0.0.1",
261
+ "comments": {
262
+ "patch": [
263
+ {
264
+ "author": "Humberto.Morimoto@microsoft.com",
265
+ "package": "@fluentai/react-preview",
266
+ "commit": "d35950449b15960e7390bb047a62b240a2ade3a1",
267
+ "comment": "chore: Make react-preview package not private to be ready for publishing."
268
+ }
269
+ ]
270
+ }
271
+ }
272
+ ]
273
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,105 @@
1
+ # Change Log - @fluentui-copilot/react-preview
2
+
3
+ This log was last generated on Wed, 13 Mar 2024 04:09:45 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly-20240313-0404-8abc883d.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-preview_v0.0.0-nightly-20240313-0404-8abc883d.1)
8
+
9
+ Wed, 13 Mar 2024 04:09:45 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.2.0..@fluentui-copilot/react-preview_v0.0.0-nightly-20240313-0404-8abc883d.1)
11
+
12
+ ### Changes
13
+
14
+ - Release nightly ([commit](https://github.com/microsoft/fluentai/commit/not available) by fluentui-internal@service.microsoft.com)
15
+
16
+ ## [0.2.0](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.2.0)
17
+
18
+ Thu, 15 Feb 2024 20:24:47 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.1.2..@fluentai/react-preview_v0.2.0)
20
+
21
+ ### Minor changes
22
+
23
+ - chore: initial release to NPM. ([PR #1358](https://github.com/microsoft/fluentai/pull/1358) by tristan.watanabe@gmail.com)
24
+
25
+ ## [0.1.2](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.1.2)
26
+
27
+ Fri, 09 Feb 2024 17:34:09 GMT
28
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.1.1..@fluentai/react-preview_v0.1.2)
29
+
30
+ ### Patches
31
+
32
+ - feat: Implementing manager to close Previews that were opened by hover when another Preview is open by hover. ([PR #1348](https://github.com/microsoft/fluentai/pull/1348) by makotom@microsoft.com)
33
+
34
+ ## [0.1.1](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.1.1)
35
+
36
+ Tue, 12 Dec 2023 16:35:16 GMT
37
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.1.0..@fluentai/react-preview_v0.1.1)
38
+
39
+ ### Patches
40
+
41
+ - feat: Introducing Preview context to pass custom preview information via context. ([PR #1252](https://github.com/microsoft/fluentai/pull/1252) by Humberto.Morimoto@microsoft.com)
42
+ - fix: Preview calls onOpenChange callback every time it opens and closes. ([PR #1267](https://github.com/microsoft/fluentai/pull/1267) by Humberto.Morimoto@microsoft.com)
43
+ - fix: Wrap label on word breaks. ([PR #1245](https://github.com/microsoft/fluentai/pull/1245) by owcampbe@microsoft.com)
44
+
45
+ ## [0.1.0](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.1.0)
46
+
47
+ Wed, 15 Nov 2023 00:55:21 GMT
48
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.0.5..@fluentai/react-preview_v0.1.0)
49
+
50
+ ### Minor changes
51
+
52
+ - chore: move @fluentui dependencies to peer dependencies. ([PR #979](https://github.com/microsoft/fluentai/pull/979) by tristan.watanabe@gmail.com)
53
+
54
+ ### Patches
55
+
56
+ - fix: align peer dependency ranges with all other react copilot components. ([PR #976](https://github.com/microsoft/fluentai/pull/976) by tristan.watanabe@gmail.com)
57
+ - feat: Adding Preview component and its subcomponents. ([PR #980](https://github.com/microsoft/fluentai/pull/980) by Humberto.Morimoto@microsoft.com)
58
+ - chore: bump peer deep range to latest @fluentui/react-components 9.37.3. ([PR #1125](https://github.com/microsoft/fluentai/pull/1125) by tristan.watanabe@gmail.com)
59
+ - fix: Nested popovers in preview can escape without closing preview. ([PR #1142](https://github.com/microsoft/fluentai/pull/1142) by Humberto.Morimoto@microsoft.com)
60
+
61
+ ## [0.0.5](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.0.5)
62
+
63
+ Mon, 25 Sep 2023 20:31:08 GMT
64
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.0.4..@fluentai/react-preview_v0.0.5)
65
+
66
+ ### Patches
67
+
68
+ - fix: bump swc core to mitigate transpilation memory leaks. ([PR #972](https://github.com/microsoft/fluentai/pull/972) by tristan.watanabe@gmail.com)
69
+
70
+ ## [0.0.4](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.0.4)
71
+
72
+ Fri, 22 Sep 2023 02:11:56 GMT
73
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.0.3..@fluentai/react-preview_v0.0.4)
74
+
75
+ ### Patches
76
+
77
+ - chore: bump fluentui v9 dependencies to latest. ([PR #928](https://github.com/microsoft/fluentai/pull/928) by tristan.watanabe@gmail.com)
78
+
79
+ ## [0.0.3](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.0.3)
80
+
81
+ Fri, 08 Sep 2023 18:32:55 GMT
82
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.0.2..@fluentai/react-preview_v0.0.3)
83
+
84
+ ### Patches
85
+
86
+ - test: add e2e setup and WCAG tests. ([PR #886](https://github.com/microsoft/fluentai/pull/886) by tristan.watanabe@gmail.com)
87
+
88
+ ## [0.0.2](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.0.2)
89
+
90
+ Tue, 22 Aug 2023 23:54:16 GMT
91
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/react-preview_v0.0.1..@fluentai/react-preview_v0.0.2)
92
+
93
+ ### Patches
94
+
95
+ - add useCustomStyleHook to all components ([PR #843](https://github.com/microsoft/fluentai/pull/843) by eysjiang@gmail.com)
96
+ - chore: bump fluentui dependencies. ([PR #836](https://github.com/microsoft/fluentai/pull/836) by tristan.watanabe@gmail.com)
97
+ - fix: Make media slot be descriptor of label/title. ([PR #845](https://github.com/microsoft/fluentai/pull/845) by Humberto.Morimoto@microsoft.com)
98
+
99
+ ## [0.0.1](https://github.com/microsoft/fluentai/tree/@fluentai/react-preview_v0.0.1)
100
+
101
+ Thu, 10 Aug 2023 17:07:07 GMT
102
+
103
+ ### Patches
104
+
105
+ - chore: Make react-preview package not private to be ready for publishing. ([PR #828](https://github.com/microsoft/fluentai/pull/828) by Humberto.Morimoto@microsoft.com)
package/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ @fluentui-copilot/react-preview
2
+
3
+ MIT License
4
+
5
+ Copyright (c) Microsoft Corporation.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @fluentui-copilot/react-preview
2
+
3
+ **For internal use only. External use is not supported at this time.**
4
+
5
+ **React Preview components for [Fluent AI React](https://ai.fluentui.dev/)**
@@ -0,0 +1,280 @@
1
+ /// <reference types="react" />
2
+
3
+ import type { ComponentProps } from '@fluentui/react-components';
4
+ import type { ComponentState } from '@fluentui/react-components';
5
+ import type { Context } from '@fluentui/react-context-selector';
6
+ import type { ContextSelector } from '@fluentui/react-context-selector';
7
+ import { FC } from 'react';
8
+ import type { ForwardRefComponent } from '@fluentui/react-components';
9
+ import { JSXElementConstructor } from 'react';
10
+ import type { PopoverContextValue } from '@fluentui/react-components';
11
+ import type { PopoverProps } from '@fluentui/react-components';
12
+ import type { PopoverState } from '@fluentui/react-components';
13
+ import type { PopoverSurfaceProps } from '@fluentui/react-components';
14
+ import type { PopoverSurfaceSlots } from '@fluentui/react-components';
15
+ import type { PopoverSurfaceState } from '@fluentui/react-components';
16
+ import type { PopoverTriggerProps } from '@fluentui/react-components';
17
+ import type { PopoverTriggerState } from '@fluentui/react-components';
18
+ import { Provider } from 'react';
19
+ import { ProviderProps } from 'react';
20
+ import * as React_2 from 'react';
21
+ import { ReactElement } from 'react';
22
+ import type { Slot } from '@fluentui/react-components';
23
+ import type { SlotClassNames } from '@fluentui/react-components';
24
+
25
+ export declare const Preview: React_2.FC<PreviewProps>;
26
+
27
+ export declare const PreviewContent: ForwardRefComponent<PreviewContentProps>;
28
+
29
+ export declare const previewContentClassNames: SlotClassNames<PreviewContentSlots>;
30
+
31
+ /**
32
+ * PreviewContent Props
33
+ */
34
+ export declare type PreviewContentProps = ComponentProps<PreviewContentSlots>;
35
+
36
+ export declare type PreviewContentSlots = {
37
+ root: NonNullable<Slot<'div'>>;
38
+ };
39
+
40
+ /**
41
+ * State used in rendering PreviewContent
42
+ */
43
+ export declare type PreviewContentState = ComponentState<PreviewContentSlots>;
44
+
45
+ export declare const PreviewContext: Context<PreviewContextValue>;
46
+
47
+ export declare const PreviewContextProvider: Provider<PreviewContextValue> & FC<ProviderProps<PreviewContextValue>>;
48
+
49
+ export declare type PreviewContextValue = PopoverContextValue & Pick<PreviewState, 'isPreviewLocked'>;
50
+
51
+ export declare const PreviewHeader: ForwardRefComponent<PreviewHeaderProps>;
52
+
53
+ export declare const previewHeaderClassNames: SlotClassNames<PreviewHeaderSlots>;
54
+
55
+ /**
56
+ * PreviewHeader Props
57
+ */
58
+ export declare type PreviewHeaderProps = ComponentProps<Partial<PreviewHeaderSlots>>;
59
+
60
+ export declare type PreviewHeaderSlots = {
61
+ root: NonNullable<Slot<'div'>>;
62
+ /**
63
+ * Actions slot.
64
+ */
65
+ actions: Slot<'div'>;
66
+ /**
67
+ * Citation slot. Displays a `Citation`. Set to `null` to hide the citation.
68
+ */
69
+ citation: Slot<'span'>;
70
+ /**
71
+ * Label slot. Primary description of the preview.
72
+ */
73
+ label: NonNullable<Slot<'span'>>;
74
+ /**
75
+ * Media slot. Used to display Avatars, Icons, etc.
76
+ */
77
+ media: Slot<'div'>;
78
+ };
79
+
80
+ /**
81
+ * State used in rendering PreviewHeader
82
+ */
83
+ export declare type PreviewHeaderState = ComponentState<PreviewHeaderSlots>;
84
+
85
+ export declare const PreviewMetadata: ForwardRefComponent<PreviewMetadataProps>;
86
+
87
+ export declare const previewMetadataClassNames: SlotClassNames<PreviewMetadataSlots>;
88
+
89
+ /**
90
+ * PreviewMetadata Props
91
+ */
92
+ export declare type PreviewMetadataProps = ComponentProps<Partial<PreviewMetadataSlots>>;
93
+
94
+ export declare type PreviewMetadataSlots = {
95
+ root: Slot<'div'>;
96
+ /**
97
+ * Icon slot in the metadata displayed after all text.
98
+ */
99
+ icon: Slot<'span'>;
100
+ /**
101
+ * First text displayed in the metadata.
102
+ */
103
+ primaryText: Slot<'span'>;
104
+ /**
105
+ * Second text displayed in the metadata.
106
+ */
107
+ secondaryText: Slot<'span'>;
108
+ /**
109
+ * Third text displayed in the metadata.
110
+ */
111
+ tertiaryText: Slot<'span'>;
112
+ };
113
+
114
+ /**
115
+ * State used in rendering PreviewMetadata
116
+ */
117
+ export declare type PreviewMetadataState = ComponentState<PreviewMetadataSlots>;
118
+
119
+ /**
120
+ * Preview Props
121
+ */
122
+ export declare type PreviewProps = PopoverProps;
123
+
124
+ /**
125
+ * State used in rendering Preview
126
+ */
127
+ export declare type PreviewState = PopoverState & {
128
+ /**
129
+ * Whether the Preview was opened by click or keyboard and is therefore locked until intentional interaction to close it.
130
+ */
131
+ isPreviewLocked: boolean;
132
+ };
133
+
134
+ export declare const PreviewSurface: ForwardRefComponent<PreviewSurfaceProps>;
135
+
136
+ export declare const previewSurfaceClassNames: SlotClassNames<PreviewSurfaceSlots>;
137
+
138
+ /**
139
+ * PreviewSurface Props
140
+ */
141
+ export declare type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & PopoverSurfaceProps & {};
142
+
143
+ export declare type PreviewSurfaceSlots = PopoverSurfaceSlots & {};
144
+
145
+ /**
146
+ * State used in rendering PreviewSurface
147
+ */
148
+ export declare type PreviewSurfaceState = ComponentState<PreviewSurfaceSlots> & PopoverSurfaceState & {};
149
+
150
+ export declare const PreviewTrigger: React_2.FC<PreviewTriggerProps>;
151
+
152
+ /**
153
+ * PreviewTrigger Props
154
+ */
155
+ export declare type PreviewTriggerProps = PopoverTriggerProps & {};
156
+
157
+ /**
158
+ * State used in rendering PreviewTrigger
159
+ */
160
+ export declare type PreviewTriggerState = PopoverTriggerState & {};
161
+
162
+ /**
163
+ * Render the final JSX of Preview
164
+ */
165
+ export declare const renderPreview_unstable: (state: PreviewState) => JSX.Element;
166
+
167
+ /**
168
+ * Render the final JSX of PreviewContent
169
+ */
170
+ export declare const renderPreviewContent_unstable: (state: PreviewContentState) => JSX.Element;
171
+
172
+ /**
173
+ * Render the final JSX of PreviewHeader
174
+ */
175
+ export declare const renderPreviewHeader_unstable: (state: PreviewHeaderState) => JSX.Element;
176
+
177
+ /**
178
+ * Render the final JSX of PreviewMetadata
179
+ */
180
+ export declare const renderPreviewMetadata_unstable: (state: PreviewMetadataState) => JSX.Element;
181
+
182
+ /**
183
+ * Render the final JSX of PreviewSurface
184
+ */
185
+ export declare const renderPreviewSurface_unstable: (state: PreviewSurfaceState) => React.ReactElement;
186
+
187
+ /**
188
+ * Render the final JSX of PreviewTrigger
189
+ */
190
+ export declare const renderPreviewTrigger_unstable: (state: PreviewTriggerState) => ReactElement<any, string | JSXElementConstructor<any>> | null;
191
+
192
+ /**
193
+ * Create the state required to render Preview.
194
+ *
195
+ * The returned state can be modified with hooks such as usePreviewStyles_unstable,
196
+ * before being passed to renderPreview_unstable.
197
+ *
198
+ * @param props - props from this instance of Preview
199
+ * @param ref - reference to root HTMLElement of Preview
200
+ */
201
+ export declare const usePreview_unstable: (props: PreviewProps) => PreviewState;
202
+
203
+ /**
204
+ * Create the state required to render PreviewContent.
205
+ *
206
+ * The returned state can be modified with hooks such as usePreviewContentStyles_unstable,
207
+ * before being passed to renderPreviewContent_unstable.
208
+ *
209
+ * @param props - props from this instance of PreviewContent
210
+ * @param ref - reference to root HTMLElement of PreviewContent
211
+ */
212
+ export declare const usePreviewContent_unstable: (props: PreviewContentProps, ref: React_2.Ref<HTMLElement>) => PreviewContentState;
213
+
214
+ /**
215
+ * Apply styling to the PreviewContent slots based on the state
216
+ */
217
+ export declare const usePreviewContentStyles_unstable: (state: PreviewContentState) => PreviewContentState;
218
+
219
+ export declare const usePreviewContext_unstable: <T>(selector: ContextSelector<PreviewContextValue, T>) => T;
220
+
221
+ /**
222
+ * Create the state required to render PreviewHeader.
223
+ *
224
+ * The returned state can be modified with hooks such as usePreviewHeaderStyles_unstable,
225
+ * before being passed to renderPreviewHeader_unstable.
226
+ *
227
+ * @param props - props from this instance of PreviewHeader
228
+ * @param ref - reference to root HTMLElement of PreviewHeader
229
+ */
230
+ export declare const usePreviewHeader_unstable: (props: PreviewHeaderProps, ref: React_2.Ref<HTMLElement>) => PreviewHeaderState;
231
+
232
+ /**
233
+ * Apply styling to the PreviewHeader slots based on the state
234
+ */
235
+ export declare const usePreviewHeaderStyles_unstable: (state: PreviewHeaderState) => PreviewHeaderState;
236
+
237
+ /**
238
+ * Create the state required to render PreviewMetadata.
239
+ *
240
+ * The returned state can be modified with hooks such as usePreviewMetadataStyles_unstable,
241
+ * before being passed to renderPreviewMetadata_unstable.
242
+ *
243
+ * @param props - props from this instance of PreviewMetadata
244
+ * @param ref - reference to root HTMLElement of PreviewMetadata
245
+ */
246
+ export declare const usePreviewMetadata_unstable: (props: PreviewMetadataProps, ref: React_2.Ref<HTMLElement>) => PreviewMetadataState;
247
+
248
+ /**
249
+ * Apply styling to the PreviewMetadata slots based on the state
250
+ */
251
+ export declare const usePreviewMetadataStyles_unstable: (state: PreviewMetadataState) => PreviewMetadataState;
252
+
253
+ /**
254
+ * Create the state required to render PreviewSurface.
255
+ *
256
+ * The returned state can be modified with hooks such as usePreviewSurfaceStyles_unstable,
257
+ * before being passed to renderPreviewSurface_unstable.
258
+ *
259
+ * @param props - props from this instance of PreviewSurface
260
+ * @param ref - reference to root HTMLElement of PreviewSurface
261
+ */
262
+ export declare const usePreviewSurface_unstable: (props: PreviewSurfaceProps, ref: React_2.Ref<HTMLDivElement>) => PreviewSurfaceState;
263
+
264
+ /**
265
+ * Apply styling to the PreviewSurface slots based on the state
266
+ */
267
+ export declare const usePreviewSurfaceStyles_unstable: (state: PreviewSurfaceState) => PreviewSurfaceState;
268
+
269
+ /**
270
+ * Create the state required to render PreviewTrigger.
271
+ *
272
+ * The returned state can be modified with hooks such as usePreviewTriggerStyles_unstable,
273
+ * before being passed to renderPreviewTrigger_unstable.
274
+ *
275
+ * @param props - props from this instance of PreviewTrigger
276
+ * @param ref - reference to root HTMLElement of PreviewTrigger
277
+ */
278
+ export declare const usePreviewTrigger_unstable: (props: PreviewTriggerProps) => PreviewTriggerState;
279
+
280
+ export { }