@fluentui-copilot/react-preview 0.5.8 → 0.6.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.
- package/CHANGELOG.json +22 -1
- package/CHANGELOG.md +12 -2
- package/dist/index.d.ts +3 -2
- package/lib/components/PreviewContent/usePreviewContentStyles.styles.js +2 -1
- package/lib/components/PreviewContent/usePreviewContentStyles.styles.js.map +1 -1
- package/lib/components/PreviewHeader/usePreviewHeaderStyles.styles.js +2 -1
- package/lib/components/PreviewHeader/usePreviewHeaderStyles.styles.js.map +1 -1
- package/lib/components/PreviewMetadata/usePreviewMetadataStyles.styles.js +2 -1
- package/lib/components/PreviewMetadata/usePreviewMetadataStyles.styles.js.map +1 -1
- package/lib/components/PreviewSurface/PreviewSurface.types.js.map +1 -1
- package/lib/components/PreviewSurface/usePreviewSurface.js +6 -1
- package/lib/components/PreviewSurface/usePreviewSurface.js.map +1 -1
- package/lib/components/PreviewSurface/usePreviewSurfaceStyles.styles.js +20 -2
- package/lib/components/PreviewSurface/usePreviewSurfaceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PreviewContent/usePreviewContentStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PreviewHeader/usePreviewHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PreviewMetadata/usePreviewMetadataStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PreviewSurface/PreviewSurface.types.js.map +1 -1
- package/lib-commonjs/components/PreviewSurface/usePreviewSurface.js +6 -1
- package/lib-commonjs/components/PreviewSurface/usePreviewSurface.js.map +1 -1
- package/lib-commonjs/components/PreviewSurface/usePreviewSurfaceStyles.styles.js +21 -1
- package/lib-commonjs/components/PreviewSurface/usePreviewSurfaceStyles.styles.js.map +1 -1
- package/package.json +3 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,28 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-preview",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 20 Mar 2025 16:59:12 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-preview_v0.6.0",
|
|
7
|
+
"version": "0.6.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "makotom@microsoft.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-preview",
|
|
13
|
+
"commit": "9958f308833b5b38dd8afdaf5505f87aca5d3961",
|
|
14
|
+
"comment": "chore: Updating imports of tokens to be imported from @fluentui-copilot/tokens instead of from @fluentui/react-components."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "owcampbe@microsoft.com",
|
|
18
|
+
"package": "@fluentui-copilot/react-preview",
|
|
19
|
+
"commit": "4a9638ac88d3060188019bbdb2b6cde1406bbfb8",
|
|
20
|
+
"comment": "feat: Add designVersion=next styles for Preview."
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Wed, 18 Dec 2024 08:55:42 GMT",
|
|
6
27
|
"tag": "@fluentui-copilot/react-preview_v0.5.8",
|
|
7
28
|
"version": "0.5.8",
|
|
8
29
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-preview
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 20 Mar 2025 16:59:12 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.6.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-preview_v0.6.0)
|
|
8
|
+
|
|
9
|
+
Thu, 20 Mar 2025 16:59:12 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-preview_v0.5.8..@fluentui-copilot/react-preview_v0.6.0)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: Updating imports of tokens to be imported from @fluentui-copilot/tokens instead of from @fluentui/react-components. ([PR #2745](https://github.com/microsoft/fluentai/pull/2745) by makotom@microsoft.com)
|
|
15
|
+
- feat: Add designVersion=next styles for Preview. ([PR #2806](https://github.com/microsoft/fluentai/pull/2806) by owcampbe@microsoft.com)
|
|
16
|
+
|
|
7
17
|
## [0.5.8](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-preview_v0.5.8)
|
|
8
18
|
|
|
9
|
-
Wed, 18 Dec 2024 08:
|
|
19
|
+
Wed, 18 Dec 2024 08:55:42 GMT
|
|
10
20
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-preview_v0.5.7..@fluentui-copilot/react-preview_v0.5.8)
|
|
11
21
|
|
|
12
22
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { ComponentProps } from '@fluentui/react-components';
|
|
|
4
4
|
import type { ComponentState } from '@fluentui/react-components';
|
|
5
5
|
import type { Context } from '@fluentui/react-context-selector';
|
|
6
6
|
import type { ContextSelector } from '@fluentui/react-context-selector';
|
|
7
|
+
import type { DesignVersion } from '@fluentui-copilot/react-provider';
|
|
7
8
|
import { FC } from 'react';
|
|
8
9
|
import type { ForwardRefComponent } from '@fluentui/react-components';
|
|
9
10
|
import { JSXElementConstructor } from 'react';
|
|
@@ -149,14 +150,14 @@ export declare const previewSurfaceClassNames: SlotClassNames<PreviewSurfaceSlot
|
|
|
149
150
|
/**
|
|
150
151
|
* PreviewSurface Props
|
|
151
152
|
*/
|
|
152
|
-
export declare type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & PopoverSurfaceProps & {};
|
|
153
|
+
export declare type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & PopoverSurfaceProps & DesignVersion & {};
|
|
153
154
|
|
|
154
155
|
export declare type PreviewSurfaceSlots = PopoverSurfaceSlots & {};
|
|
155
156
|
|
|
156
157
|
/**
|
|
157
158
|
* State used in rendering PreviewSurface
|
|
158
159
|
*/
|
|
159
|
-
export declare type PreviewSurfaceState = ComponentState<PreviewSurfaceSlots> & PopoverSurfaceState & {};
|
|
160
|
+
export declare type PreviewSurfaceState = ComponentState<PreviewSurfaceSlots> & PopoverSurfaceState & Pick<Required<PreviewSurfaceProps>, 'designVersion'> & {};
|
|
160
161
|
|
|
161
162
|
export declare const PreviewTrigger: React_2.FC<PreviewTriggerProps>;
|
|
162
163
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { __resetStyles, mergeClasses,
|
|
1
|
+
import { __resetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
2
3
|
export const previewContentClassNames = {
|
|
3
4
|
root: 'fai-PreviewContent'
|
|
4
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewContentStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses,
|
|
1
|
+
{"version":3,"sources":["usePreviewContentStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PreviewContentSlots, PreviewContentState } from './PreviewContent.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const previewContentClassNames: SlotClassNames<PreviewContentSlots> = {\n root: 'fai-PreviewContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground3,\n display: 'flex',\n flexDirection: 'column',\n maxWidth: `calc(256px - ${tokens.spacingHorizontalXS} * 2)`,\n padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`,\n rowGap: tokens.spacingVerticalXS,\n wordBreak: 'break-word',\n boxSizing: 'border-box',\n ...typographyStyles.caption1,\n});\n\n/**\n * Apply styling to the PreviewContent slots based on the state\n */\nexport const usePreviewContentStyles_unstable = (state: PreviewContentState): PreviewContentState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n\n state.root.className = mergeClasses(previewContentClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","typographyStyles","tokens","previewContentClassNames","root","useRootBaseClassName","color","colorNeutralForeground3","display","flexDirection","maxWidth","spacingHorizontalXS","padding","spacingVerticalS","spacingHorizontalS","rowGap","spacingVerticalXS","wordBreak","boxSizing","caption1","usePreviewContentStyles_unstable","state","rootBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,6BAA6B;AAC7F,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,uBAAuBN,gBAAgB;IAC3CO,OAAOJ,OAAOK,uBAAuB;IACrCC,SAAS;IACTC,eAAe;IACfC,UAAU,CAAC,aAAa,EAAER,OAAOS,mBAAmB,CAAC,KAAK,CAAC;IAC3DC,SAAS,CAAC,EAAEV,OAAOW,gBAAgB,CAAC,CAAC,EAAEX,OAAOY,kBAAkB,CAAC,CAAC;IAClEC,QAAQb,OAAOc,iBAAiB;IAChCC,WAAW;IACXC,WAAW;IACX,GAAGjB,iBAAiBkB,QAAQ;AAC9B;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C;IAEA,MAAMC,oBAAoBjB;IAE1BgB,MAAMjB,IAAI,CAACmB,SAAS,GAAGvB,aAAaG,yBAAyBC,IAAI,EAAEkB,mBAAmBD,MAAMjB,IAAI,CAACmB,SAAS;IAE1G,OAAOF;AACT,EAAE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { __resetStyles, __styles, mergeClasses,
|
|
1
|
+
import { __resetStyles, __styles, mergeClasses, typographyStyles } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
2
3
|
export const previewHeaderClassNames = {
|
|
3
4
|
root: 'fai-PreviewHeader',
|
|
4
5
|
actions: 'fai-PreviewHeader__actions',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewHeaderStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses,
|
|
1
|
+
{"version":3,"sources":["usePreviewHeaderStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PreviewHeaderSlots, PreviewHeaderState } from './PreviewHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const previewHeaderClassNames: SlotClassNames<PreviewHeaderSlots> = {\n root: 'fai-PreviewHeader',\n actions: 'fai-PreviewHeader__actions',\n citation: 'fai-PreviewHeader__citation',\n label: 'fai-PreviewHeader__label',\n media: 'fai-PreviewHeader__media',\n};\n\nexport const previewHeaderExtraClassNames = {\n mediaChild: 'fai-PreviewHeader__mediaChild',\n};\n\nconst labelFontSize = typographyStyles.caption1Strong.fontSize;\nconst labelLineHeight = typographyStyles.caption1Strong.lineHeight;\n\nconst useActionsBaseClassName = makeResetStyles({\n gridRow: 1,\n justifySelf: 'end',\n});\n\nconst useCitationBaseClassName = makeResetStyles({\n gridRow: 1,\n});\n\nconst useLabelBaseClassName = makeResetStyles({\n alignSelf: 'start',\n display: '-webkit-box',\n gridRow: '1 / 3',\n overflowY: 'hidden',\n // 16px is the height of the tallest element within the preview header\n paddingTop: `calc((16px / 2) - (${labelLineHeight} - ${labelFontSize}))`,\n wordBreak: 'break-word',\n\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n\n ...typographyStyles.caption1Strong,\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n gridRow: 1,\n height: '16px',\n lineHeight: 0,\n width: '16px',\n\n [`> .${previewHeaderExtraClassNames.mediaChild}`]: {\n height: '16px',\n width: '16px',\n },\n});\n\nconst useRootBaseClassName = makeResetStyles({\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalXS,\n display: 'grid',\n gridTemplateRows: '24px',\n});\n\n// Since the grid track that needs to grow is not always guaranteed to be the first or the last, but can change positions\n// based on the slots present, we need to conditionally set the grid template columns based on the slots present.\nconst useRootStyles = makeStyles({\n onlyLabel: {\n gridTemplateColumns: '1fr',\n },\n previousAndLabel: {\n gridTemplateColumns: 'min-content 1fr',\n },\n labelAndActions: {\n gridTemplateColumns: '1fr min-content',\n },\n citationMediaLabel: {\n gridTemplateColumns: 'min-content min-content 1fr',\n },\n previousLabelActions: {\n gridTemplateColumns: 'min-content 1fr min-content',\n },\n all: {\n gridTemplateColumns: 'min-content min-content 1fr min-content',\n },\n});\n\n/**\n * Apply styling to the PreviewHeader slots based on the state\n */\nexport const usePreviewHeaderStyles_unstable = (state: PreviewHeaderState): PreviewHeaderState => {\n 'use no memo';\n\n const actionsBaseClassName = useActionsBaseClassName();\n const citationBaseClassName = useCitationBaseClassName();\n const labelBaseClassName = useLabelBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n\n let actionsPresent = false;\n if (state.actions) {\n actionsPresent = true;\n state.actions.className = mergeClasses(\n previewHeaderClassNames.actions,\n actionsBaseClassName,\n state.actions.className,\n );\n }\n\n let citationPresent = false;\n if (state.citation) {\n citationPresent = true;\n state.citation.className = mergeClasses(\n previewHeaderClassNames.citation,\n citationBaseClassName,\n state.citation.className,\n );\n }\n\n state.label.className = mergeClasses(previewHeaderClassNames.label, labelBaseClassName, state.label.className);\n\n let mediaPresent = false;\n if (state.media) {\n mediaPresent = true;\n state.media.className = mergeClasses(previewHeaderClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.root.className = mergeClasses(\n previewHeaderClassNames.root,\n rootBaseClassName,\n !citationPresent && !mediaPresent && !actionsPresent && rootStyles.onlyLabel,\n ((citationPresent && !mediaPresent) || (mediaPresent && !citationPresent)) &&\n !actionsPresent &&\n rootStyles.previousAndLabel,\n !citationPresent && !mediaPresent && actionsPresent && rootStyles.labelAndActions,\n citationPresent && mediaPresent && !actionsPresent && rootStyles.citationMediaLabel,\n ((citationPresent && !mediaPresent) || (mediaPresent && !citationPresent)) &&\n actionsPresent &&\n rootStyles.previousLabelActions,\n citationPresent && mediaPresent && actionsPresent && rootStyles.all,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","typographyStyles","tokens","previewHeaderClassNames","root","actions","citation","label","media","previewHeaderExtraClassNames","mediaChild","labelFontSize","caption1Strong","fontSize","labelLineHeight","lineHeight","useActionsBaseClassName","gridRow","justifySelf","useCitationBaseClassName","useLabelBaseClassName","alignSelf","display","overflowY","paddingTop","wordBreak","useMediaBaseClassName","height","width","useRootBaseClassName","alignItems","columnGap","spacingHorizontalXS","gridTemplateRows","useRootStyles","onlyLabel","gridTemplateColumns","previousAndLabel","labelAndActions","citationMediaLabel","previousLabelActions","all","usePreviewHeaderStyles_unstable","state","actionsBaseClassName","citationBaseClassName","labelBaseClassName","mediaBaseClassName","rootBaseClassName","rootStyles","actionsPresent","className","citationPresent","mediaPresent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,6BAA6B;AACzG,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,SAAS;IACTC,UAAU;IACVC,OAAO;IACPC,OAAO;AACT,EAAE;AAEF,OAAO,MAAMC,+BAA+B;IAC1CC,YAAY;AACd,EAAE;AAEF,MAA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nEE,MAAMvC,IAAI,CAAC+C,SAAS;IAGtB,OAAOR;AACT,EAAE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { __resetStyles, __styles, mergeClasses, shorthands,
|
|
1
|
+
import { __resetStyles, __styles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
2
3
|
export const previewMetadataClassNames = {
|
|
3
4
|
root: 'fai-PreviewMetadata',
|
|
4
5
|
icon: 'fai-PreviewMetadata__icon',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewMetadataStyles.styles.ts"],"sourcesContent":["import {\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n
|
|
1
|
+
{"version":3,"sources":["usePreviewMetadataStyles.styles.ts"],"sourcesContent":["import {\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PreviewMetadataSlots, PreviewMetadataState } from './PreviewMetadata.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const previewMetadataClassNames: SlotClassNames<PreviewMetadataSlots> = {\n root: 'fai-PreviewMetadata',\n icon: 'fai-PreviewMetadata__icon',\n primaryText: 'fai-PreviewMetadata__primaryText',\n secondaryText: 'fai-PreviewMetadata__secondaryText',\n tertiaryText: 'fai-PreviewMetadata__tertiaryText',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n ...typographyStyles.caption2,\n});\n\nconst useIconBaseClassName = makeResetStyles({\n marginLeft: tokens.spacingHorizontalSNudge,\n verticalAlign: 'middle',\n});\n\nconst useTextStyles = makeStyles({\n subsequentText: {\n marginLeft: `calc(${tokens.spacingHorizontalSNudge} * 2)`,\n position: 'relative',\n\n '&::before': {\n ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n content: '\"\"',\n display: 'block',\n height: typographyStyles.caption2.fontSize,\n left: `calc(-1 * ${tokens.spacingHorizontalSNudge})`,\n position: 'absolute',\n top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,\n },\n },\n});\n\n/**\n * Apply styling to the PreviewMetadata slots based on the state\n */\nexport const usePreviewMetadataStyles_unstable = (state: PreviewMetadataState): PreviewMetadataState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n const textStyles = useTextStyles();\n\n state.root.className = mergeClasses(previewMetadataClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.icon) {\n state.icon.className = mergeClasses(previewMetadataClassNames.icon, iconBaseClassName, state.icon.className);\n }\n\n let isSubsequentAfterText = false;\n\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(previewMetadataClassNames.primaryText, state.primaryText.className);\n isSubsequentAfterText = true;\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n previewMetadataClassNames.secondaryText,\n isSubsequentAfterText && textStyles.subsequentText,\n state.secondaryText.className,\n );\n isSubsequentAfterText = true;\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n previewMetadataClassNames.tertiaryText,\n isSubsequentAfterText && textStyles.subsequentText,\n state.tertiaryText.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","typographyStyles","tokens","previewMetadataClassNames","root","icon","primaryText","secondaryText","tertiaryText","useRootBaseClassName","caption2","useIconBaseClassName","marginLeft","spacingHorizontalSNudge","verticalAlign","useTextStyles","subsequentText","position","borderLeft","strokeWidthThin","colorNeutralStroke2","content","display","height","fontSize","left","top","lineHeight","usePreviewMetadataStyles_unstable","state","rootBaseClassName","iconBaseClassName","textStyles","className","isSubsequentAfterText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,eAAe,EACfC,UAAU,EACV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B,IAAI,CAAC4B,SAAS;IAC7G;IAEA,IAAIC,wBAAwB;IAE5B,IAAIL,MAAMvB,WAAW,EAAE;QACrBuB,MAAMvB,WAAW,CAAC2B,SAAS,GAAGlC,aAAaI,0BAA0BG,WAAW,EAAEuB,MAAMvB,WAAW,CAAC2B,SAAS;QAC7GC,wBAAwB;IAC1B;IAEA,IAAIL,MAAMtB,aAAa,EAAE;QACvBsB,MAAMtB,aAAa,CAAC0B,SAAS,GAAGlC,aAC9BI,0BAA0BI,aAAa,EACvC2B,yBAAyBF,WAAWhB,cAAc,EAClDa,MAAMtB,aAAa,CAAC0B,SAAS;QAE/BC,wBAAwB;IAC1B;IAEA,IAAIL,MAAMrB,YAAY,EAAE;QACtBqB,MAAMrB,YAAY,CAACyB,SAAS,GAAGlC,aAC7BI,0BAA0BK,YAAY,EACtC0B,yBAAyBF,WAAWhB,cAAc,EAClDa,MAAMrB,YAAY,CAACyB,SAAS;IAEhC;IAEA,OAAOJ;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PreviewSurface.types.ts"],"sourcesContent":["import type {\n ComponentProps,\n ComponentState,\n PopoverSurfaceProps,\n PopoverSurfaceSlots,\n PopoverSurfaceState,\n} from '@fluentui/react-components';\n\nexport type PreviewSurfaceSlots = PopoverSurfaceSlots & {};\n\n/**\n * PreviewSurface Props\n */\nexport type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & PopoverSurfaceProps & {};\n\n/**\n * State used in rendering PreviewSurface\n */\nexport type PreviewSurfaceState = ComponentState<PreviewSurfaceSlots>
|
|
1
|
+
{"version":3,"sources":["PreviewSurface.types.ts"],"sourcesContent":["import type { DesignVersion } from '@fluentui-copilot/react-provider';\nimport type {\n ComponentProps,\n ComponentState,\n PopoverSurfaceProps,\n PopoverSurfaceSlots,\n PopoverSurfaceState,\n} from '@fluentui/react-components';\n\nexport type PreviewSurfaceSlots = PopoverSurfaceSlots & {};\n\n/**\n * PreviewSurface Props\n */\nexport type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & PopoverSurfaceProps & DesignVersion & {};\n\n/**\n * State used in rendering PreviewSurface\n */\nexport type PreviewSurfaceState = ComponentState<PreviewSurfaceSlots> &\n PopoverSurfaceState &\n Pick<Required<PreviewSurfaceProps>, 'designVersion'> & {};\n"],"names":[],"rangeMappings":";;","mappings":"AAgBA;;CAEC,GACD,WAE4D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { usePopoverSurface_unstable } from '@fluentui/react-components';
|
|
2
|
+
import { useDesignVersion } from '@fluentui-copilot/react-provider';
|
|
2
3
|
// If you add JSX to this file, be sure to change the file type to .tsx
|
|
3
4
|
/**
|
|
4
5
|
* Create the state required to render PreviewSurface.
|
|
@@ -10,6 +11,10 @@ import { usePopoverSurface_unstable } from '@fluentui/react-components';
|
|
|
10
11
|
* @param ref - reference to root HTMLElement of PreviewSurface
|
|
11
12
|
*/
|
|
12
13
|
export const usePreviewSurface_unstable = (props, ref) => {
|
|
13
|
-
|
|
14
|
+
const designVersion = useDesignVersion(props.designVersion);
|
|
15
|
+
return {
|
|
16
|
+
designVersion,
|
|
17
|
+
...usePopoverSurface_unstable(props, ref)
|
|
18
|
+
};
|
|
14
19
|
};
|
|
15
20
|
//# sourceMappingURL=usePreviewSurface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewSurface.ts"],"sourcesContent":["import type * as React from 'react';\nimport { usePopoverSurface_unstable } from '@fluentui/react-components';\nimport type { PreviewSurfaceProps, PreviewSurfaceState } from './PreviewSurface.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render PreviewSurface.\n *\n * The returned state can be modified with hooks such as usePreviewSurfaceStyles_unstable,\n * before being passed to renderPreviewSurface_unstable.\n *\n * @param props - props from this instance of PreviewSurface\n * @param ref - reference to root HTMLElement of PreviewSurface\n */\nexport const usePreviewSurface_unstable = (\n props: PreviewSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PreviewSurfaceState => {\n return usePopoverSurface_unstable(props, ref);\n};\n"],"names":["usePopoverSurface_unstable","usePreviewSurface_unstable","props","ref"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["usePreviewSurface.ts"],"sourcesContent":["import type * as React from 'react';\nimport { usePopoverSurface_unstable } from '@fluentui/react-components';\nimport type { PreviewSurfaceProps, PreviewSurfaceState } from './PreviewSurface.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render PreviewSurface.\n *\n * The returned state can be modified with hooks such as usePreviewSurfaceStyles_unstable,\n * before being passed to renderPreviewSurface_unstable.\n *\n * @param props - props from this instance of PreviewSurface\n * @param ref - reference to root HTMLElement of PreviewSurface\n */\nexport const usePreviewSurface_unstable = (\n props: PreviewSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PreviewSurfaceState => {\n const designVersion = useDesignVersion(props.designVersion);\n return { designVersion, ...usePopoverSurface_unstable(props, ref) };\n};\n"],"names":["usePopoverSurface_unstable","useDesignVersion","usePreviewSurface_unstable","props","ref","designVersion"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AACA,SAASA,0BAA0B,QAAQ,6BAA6B;AAExE,SAASC,gBAAgB,QAAQ,mCAAmC;AAEpE,uEAAuE;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAMC,gBAAgBJ,iBAAiBE,MAAME,aAAa;IAC1D,OAAO;QAAEA;QAAe,GAAGL,2BAA2BG,OAAOC,IAAI;IAAC;AACpE,EAAE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { __styles, mergeClasses,
|
|
1
|
+
import { __styles, mergeClasses, usePopoverSurfaceStyles_unstable } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
2
3
|
export const previewSurfaceClassNames = {
|
|
3
4
|
root: 'fai-PreviewSurface'
|
|
4
5
|
};
|
|
@@ -19,14 +20,31 @@ const useRootStyles = __styles({
|
|
|
19
20
|
p: -1
|
|
20
21
|
}], ".f1ewtqcl{box-sizing:border-box;}"]
|
|
21
22
|
});
|
|
23
|
+
const useNextStyles = __styles({
|
|
24
|
+
root: {
|
|
25
|
+
Beyfa6y: 0,
|
|
26
|
+
Bbmb7ep: 0,
|
|
27
|
+
Btl43ni: 0,
|
|
28
|
+
B7oj6ja: 0,
|
|
29
|
+
Dimara: "f1kijzfu"
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
d: [[".f1kijzfu{border-radius:var(--borderRadiusXLarge);}", {
|
|
33
|
+
p: -1
|
|
34
|
+
}]]
|
|
35
|
+
});
|
|
22
36
|
/**
|
|
23
37
|
* Apply styling to the PreviewSurface slots based on the state
|
|
24
38
|
*/
|
|
25
39
|
export const usePreviewSurfaceStyles_unstable = state => {
|
|
26
40
|
'use no memo';
|
|
27
41
|
|
|
42
|
+
const {
|
|
43
|
+
designVersion
|
|
44
|
+
} = state;
|
|
28
45
|
const rootStyles = useRootStyles();
|
|
29
|
-
|
|
46
|
+
const nextStyles = useNextStyles();
|
|
47
|
+
state.root.className = mergeClasses(previewSurfaceClassNames.root, rootStyles.base, designVersion === 'next' && nextStyles.root, state.root.className);
|
|
30
48
|
usePopoverSurfaceStyles_unstable(state);
|
|
31
49
|
return state;
|
|
32
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewSurfaceStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses,
|
|
1
|
+
{"version":3,"sources":["usePreviewSurfaceStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, usePopoverSurfaceStyles_unstable } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PreviewSurfaceSlots, PreviewSurfaceState } from './PreviewSurface.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const previewSurfaceClassNames: SlotClassNames<PreviewSurfaceSlots> = {\n root: 'fai-PreviewSurface',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n boxSizing: 'border-box',\n },\n});\n\nconst useNextStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusXLarge,\n },\n});\n\n/**\n * Apply styling to the PreviewSurface slots based on the state\n */\nexport const usePreviewSurfaceStyles_unstable = (state: PreviewSurfaceState): PreviewSurfaceState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const rootStyles = useRootStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n previewSurfaceClassNames.root,\n rootStyles.base,\n designVersion === 'next' && nextStyles.root,\n state.root.className,\n );\n\n usePopoverSurfaceStyles_unstable(state);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","usePopoverSurfaceStyles_unstable","tokens","previewSurfaceClassNames","root","useRootStyles","base","padding","spacingVerticalXS","spacingHorizontalXS","boxSizing","useNextStyles","borderRadius","borderRadiusXLarge","usePreviewSurfaceStyles_unstable","state","designVersion","rootStyles","nextStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,gCAAgC,QAAQ,6BAA6B;AACxG,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAgBN,WAAW;IAC/BO,MAAM;QACJC,SAAS,CAAC,EAAEL,OAAOM,iBAAiB,CAAC,CAAC,EAAEN,OAAOO,mBAAmB,CAAC,CAAC;QACpEC,WAAW;IACb;AACF;AAEA,MAAMC,gBAAgBZ,WAAW;IAC/BK,MAAM;QACJQ,cAAcV,OAAOW,kBAAkB;IACzC;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C;IAEA,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAE1B,MAAME,aAAaZ;IACnB,MAAMa,aAAaP;IAEnBI,MAAMX,IAAI,CAACe,SAAS,GAAGnB,aACrBG,yBAAyBC,IAAI,EAC7Ba,WAAWX,IAAI,EACfU,kBAAkB,UAAUE,WAAWd,IAAI,EAC3CW,MAAMX,IAAI,CAACe,SAAS;IAGtBlB,iCAAiCc;IAEjC,OAAOA;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewContentStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses,
|
|
1
|
+
{"version":3,"sources":["usePreviewContentStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PreviewContentSlots, PreviewContentState } from './PreviewContent.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const previewContentClassNames: SlotClassNames<PreviewContentSlots> = {\n root: 'fai-PreviewContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground3,\n display: 'flex',\n flexDirection: 'column',\n maxWidth: `calc(256px - ${tokens.spacingHorizontalXS} * 2)`,\n padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`,\n rowGap: tokens.spacingVerticalXS,\n wordBreak: 'break-word',\n boxSizing: 'border-box',\n ...typographyStyles.caption1,\n});\n\n/**\n * Apply styling to the PreviewContent slots based on the state\n */\nexport const usePreviewContentStyles_unstable = (state: PreviewContentState): PreviewContentState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n\n state.root.className = mergeClasses(previewContentClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["previewContentClassNames","usePreviewContentStyles_unstable","tokens","root","color","colorNeutralForeground3","padding","boxSizing","useRootBaseClassName","typographyStyles","caption1","rootBaseClassName","state","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,wBAAAA;eAAAA;;IAYFC,gCAA8BC;eAA9BD;;;iCAjB6C;AAKjD,MAAMD,2BAAgE;UAC3EG;AACF;AAEA;;CAEC,SAECC,uBAAcC,IAAAA,8BAAuB,EAAA,UAAA,MAAA;IAAA;CAAA;AAIrCC,MAASL,mCAA8BC,CAAAA;;UAGvCK,oBAAWC;UACRC,IAAAA,CAAAA,SAAAA,GAAiBC,IAAAA,6BAAQ,EAAAV,yBAAAG,IAAA,EAAAQ,mBAAAC,MAAAT,IAAA,CAAAU,SAAA;IAC9B,OAAAD;AAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewHeaderStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses,
|
|
1
|
+
{"version":3,"sources":["usePreviewHeaderStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PreviewHeaderSlots, PreviewHeaderState } from './PreviewHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const previewHeaderClassNames: SlotClassNames<PreviewHeaderSlots> = {\n root: 'fai-PreviewHeader',\n actions: 'fai-PreviewHeader__actions',\n citation: 'fai-PreviewHeader__citation',\n label: 'fai-PreviewHeader__label',\n media: 'fai-PreviewHeader__media',\n};\n\nexport const previewHeaderExtraClassNames = {\n mediaChild: 'fai-PreviewHeader__mediaChild',\n};\n\nconst labelFontSize = typographyStyles.caption1Strong.fontSize;\nconst labelLineHeight = typographyStyles.caption1Strong.lineHeight;\n\nconst useActionsBaseClassName = makeResetStyles({\n gridRow: 1,\n justifySelf: 'end',\n});\n\nconst useCitationBaseClassName = makeResetStyles({\n gridRow: 1,\n});\n\nconst useLabelBaseClassName = makeResetStyles({\n alignSelf: 'start',\n display: '-webkit-box',\n gridRow: '1 / 3',\n overflowY: 'hidden',\n // 16px is the height of the tallest element within the preview header\n paddingTop: `calc((16px / 2) - (${labelLineHeight} - ${labelFontSize}))`,\n wordBreak: 'break-word',\n\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n\n ...typographyStyles.caption1Strong,\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n gridRow: 1,\n height: '16px',\n lineHeight: 0,\n width: '16px',\n\n [`> .${previewHeaderExtraClassNames.mediaChild}`]: {\n height: '16px',\n width: '16px',\n },\n});\n\nconst useRootBaseClassName = makeResetStyles({\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalXS,\n display: 'grid',\n gridTemplateRows: '24px',\n});\n\n// Since the grid track that needs to grow is not always guaranteed to be the first or the last, but can change positions\n// based on the slots present, we need to conditionally set the grid template columns based on the slots present.\nconst useRootStyles = makeStyles({\n onlyLabel: {\n gridTemplateColumns: '1fr',\n },\n previousAndLabel: {\n gridTemplateColumns: 'min-content 1fr',\n },\n labelAndActions: {\n gridTemplateColumns: '1fr min-content',\n },\n citationMediaLabel: {\n gridTemplateColumns: 'min-content min-content 1fr',\n },\n previousLabelActions: {\n gridTemplateColumns: 'min-content 1fr min-content',\n },\n all: {\n gridTemplateColumns: 'min-content min-content 1fr min-content',\n },\n});\n\n/**\n * Apply styling to the PreviewHeader slots based on the state\n */\nexport const usePreviewHeaderStyles_unstable = (state: PreviewHeaderState): PreviewHeaderState => {\n 'use no memo';\n\n const actionsBaseClassName = useActionsBaseClassName();\n const citationBaseClassName = useCitationBaseClassName();\n const labelBaseClassName = useLabelBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n\n let actionsPresent = false;\n if (state.actions) {\n actionsPresent = true;\n state.actions.className = mergeClasses(\n previewHeaderClassNames.actions,\n actionsBaseClassName,\n state.actions.className,\n );\n }\n\n let citationPresent = false;\n if (state.citation) {\n citationPresent = true;\n state.citation.className = mergeClasses(\n previewHeaderClassNames.citation,\n citationBaseClassName,\n state.citation.className,\n );\n }\n\n state.label.className = mergeClasses(previewHeaderClassNames.label, labelBaseClassName, state.label.className);\n\n let mediaPresent = false;\n if (state.media) {\n mediaPresent = true;\n state.media.className = mergeClasses(previewHeaderClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.root.className = mergeClasses(\n previewHeaderClassNames.root,\n rootBaseClassName,\n !citationPresent && !mediaPresent && !actionsPresent && rootStyles.onlyLabel,\n ((citationPresent && !mediaPresent) || (mediaPresent && !citationPresent)) &&\n !actionsPresent &&\n rootStyles.previousAndLabel,\n !citationPresent && !mediaPresent && actionsPresent && rootStyles.labelAndActions,\n citationPresent && mediaPresent && !actionsPresent && rootStyles.citationMediaLabel,\n ((citationPresent && !mediaPresent) || (mediaPresent && !citationPresent)) &&\n actionsPresent &&\n rootStyles.previousLabelActions,\n citationPresent && mediaPresent && actionsPresent && rootStyles.all,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["previewHeaderClassNames","previewHeaderExtraClassNames","usePreviewHeaderStyles_unstable","root","actions","citation","label","media","mediaChild","labelFontSize","typographyStyles","caption1Strong","fontSize","labelLineHeight","lineHeight","useActionsBaseClassName","makeResetStyles","gridRow","__resetStyles","justifySelf","useMediaBaseClassName","useCitationBaseClassName","useLabelBaseClassName","alignSelf","display","Budl1dq","height","width","state","actionsBaseClassName","citationBaseClassName","useRootStyles","makeStyles","onlyLabel","gridTemplateColumns","rootStyles","previousAndLabel","actionsPresent","labelAndActions","mergeClasses","className","citationPresent","citationMediaLabel","labelBaseClassName","mediaPresent","all","mediaBaseClassName","rootBaseClassName","previousLabelActions"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,uBAAAA;eAAAA;;IAQ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B,QAAA,CAAAmC,SAAA,GAAAD,IAAAA,6BAAA,EAAAvC,wBAAAK,QAAA,EAAAyB,uBAAAF,MAAAvB,QAAA,CAAAmC,SAAA;;UAEEN,KAAAA,CAAAA,SAAAA,GAAAA,IAAAA,6BAAqB,EAAAlC,wBAAAM,KAAA,EAAAqC,oBAAAf,MAAAtB,KAAA,CAAAkC,SAAA;QACvBI,eAAA;QACAC,MAAKtC,KAAA,EAAA;uBACH2B;QACFN,MAAArB,KAAA,CAAAiC,SAAA,GAAAD,IAAAA,6BAAA,EAAAvC,wBAAAO,KAAA,EAAAuC,oBAAAlB,MAAArB,KAAA,CAAAiC,SAAA;IACF;IAEAZ,MAAAzB,IAAA,CAAAqC,SAAA,GAAAD,IAAAA,6BAAA,EAAAvC,wBAAAG,IAAA,EAAA4C,mBAAA,CAAAN,mBAAA,CAAAG,gBAAA,CAAAP,kBAAAF,WAAAF,SAAA,EAAA,AAAAQ,CAAAA,mBAAA,CAAAG,gBAAAA,gBAAA,CAAAH,eAAA,KAAA,CAAAJ,kBAAAF,WAAAC,gBAAA,EAAA,CAAAK,mBAAA,CAAAG,gBAAAP,kBAAAF,WAAAG,eAAA,EAAAG,mBAAAG,gBAAA,CAAAP,kBAAAF,WAAAO,kBAAA,EAAA,AAAAD,CAAAA,mBAAA,CAAAG,gBAAAA,gBAAA,CAAAH,eAAA,KAAAJ,kBAAAF,WAAAa,oBAAA,EAAAP,mBAAAG,gBAAAP,kBAAAF,WAAAU,GAAA,EAAAjB,MAAAzB,IAAA,CAAAqC,SAAA;;4DAIE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewMetadataStyles.styles.ts"],"sourcesContent":["import {\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n
|
|
1
|
+
{"version":3,"sources":["usePreviewMetadataStyles.styles.ts"],"sourcesContent":["import {\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PreviewMetadataSlots, PreviewMetadataState } from './PreviewMetadata.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const previewMetadataClassNames: SlotClassNames<PreviewMetadataSlots> = {\n root: 'fai-PreviewMetadata',\n icon: 'fai-PreviewMetadata__icon',\n primaryText: 'fai-PreviewMetadata__primaryText',\n secondaryText: 'fai-PreviewMetadata__secondaryText',\n tertiaryText: 'fai-PreviewMetadata__tertiaryText',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n ...typographyStyles.caption2,\n});\n\nconst useIconBaseClassName = makeResetStyles({\n marginLeft: tokens.spacingHorizontalSNudge,\n verticalAlign: 'middle',\n});\n\nconst useTextStyles = makeStyles({\n subsequentText: {\n marginLeft: `calc(${tokens.spacingHorizontalSNudge} * 2)`,\n position: 'relative',\n\n '&::before': {\n ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n content: '\"\"',\n display: 'block',\n height: typographyStyles.caption2.fontSize,\n left: `calc(-1 * ${tokens.spacingHorizontalSNudge})`,\n position: 'absolute',\n top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,\n },\n },\n});\n\n/**\n * Apply styling to the PreviewMetadata slots based on the state\n */\nexport const usePreviewMetadataStyles_unstable = (state: PreviewMetadataState): PreviewMetadataState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n const textStyles = useTextStyles();\n\n state.root.className = mergeClasses(previewMetadataClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.icon) {\n state.icon.className = mergeClasses(previewMetadataClassNames.icon, iconBaseClassName, state.icon.className);\n }\n\n let isSubsequentAfterText = false;\n\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(previewMetadataClassNames.primaryText, state.primaryText.className);\n isSubsequentAfterText = true;\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n previewMetadataClassNames.secondaryText,\n isSubsequentAfterText && textStyles.subsequentText,\n state.secondaryText.className,\n );\n isSubsequentAfterText = true;\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n previewMetadataClassNames.tertiaryText,\n isSubsequentAfterText && textStyles.subsequentText,\n state.tertiaryText.className,\n );\n }\n\n return state;\n};\n"],"names":["previewMetadataClassNames","usePreviewMetadataStyles_unstable","root","icon","primaryText","secondaryText","tertiaryText","useRootBaseClassName","makeResetStyles","useIconBaseClassName","caption2","useTextStyles","__styles","subsequentText","marginLeft","spacingHorizontalSNudge","verticalAlign","uvfttm","Bbv0w2i","makeStyles","position","shorthands","borderLeft","content","display","state","rootBaseClassName","iconBaseClassName","textStyles","className","mergeClasses","isSubsequentAfterText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAWaA,yBAAAA;eAAAA;;IAkCbC,iCAAA;eAAAA;;;iCAxCkB;AAMX,MAAMD,4BAAkE;UAC7EE;UACAC;iBACAC;mBACAC;kBACAC;AACF;AAEA,MAAMC,uBAAuBC,IAAAA,8BAAAA,EAAAA,WAAgB,MAAA;IAAA;CAAA;MAC3CC,uBAAoBC,IAAAA,8BAAQ,EAAA,WAAA,WAAA;IAAA;IAAA;CAAA;AAC9B,MAAAC,gBAAAC,IAAAA,yBAAA,EAAA;IAEAC,gBAAMJ;QACJK,QAAAA;YAAAA;YAAmBC;SAAAA;QACnBC,QAAAA;QACFC,QAAA;YAAA;YAAA;SAAA;QAEAC,SAAMP;YAAAA;YAAgBQ;SAAW;QAC/BN,SAAAA;YAAAA;YAAgB;SAAA;gBACdC;iBACAM;iBAEA;gBACE;YAAA;YAAGC;SAAWC;iBACdC;iBACAC;;;;;QAGU;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;;AAMhB,MAAAvB,oCAAAwB,CAAAA;;UAIEC,oBAAAnB;UAEAoB,oBAAMD;UACNE,aAAMD;UACNzB,IAAM0B,CAAAA,SAAAA,GAAajB,IAAAA,6BAAAA,EAAAA,0BAAAA,IAAAA,EAAAA,mBAAAA,MAAAA,IAAAA,CAAAA,SAAAA;QAEnBc,MAAMvB,IAAK2B,EAAAA;QAEXJ,MAAIA,IAAMtB,CAAAA,SAAM,GAAA2B,IAAAA,6BAAA,EAAA9B,0BAAAG,IAAA,EAAAwB,mBAAAF,MAAAtB,IAAA,CAAA0B,SAAA;;QAEhBE,wBAAA;QAEAN,MAAIM,WAAAA,EAAAA;QAEJN,MAAIA,WAAMrB,CAAAA,SAAa,GAAA0B,IAAAA,6BAAA,EAAA9B,0BAAAI,WAAA,EAAAqB,MAAArB,WAAA,CAAAyB,SAAA;gCACHA;;QAEpBJ,MAAApB,aAAA,EAAA;QAEAoB,MAAIA,aAAMpB,CAAAA,SAAe,GAAAyB,IAAAA,6BAAA,EAAA9B,0BAAAK,aAAA,EAAA0B,yBAAAH,WAAAf,cAAA,EAAAY,MAAApB,aAAA,CAAAwB,SAAA;gCACHA;;QAMtBJ,MAAAnB,YAAA,EAAA;QAEAmB,MAAIA,YAAMnB,CAAAA,SAAc,GAAAwB,IAAAA,6BAAA,EAAA9B,0BAAAM,YAAA,EAAAyB,yBAAAH,WAAAf,cAAA,EAAAY,MAAAnB,YAAA,CAAAuB,SAAA;;WAMxBJ;GAGF,2DAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PreviewSurface.types.ts"],"sourcesContent":["import type {\n ComponentProps,\n ComponentState,\n PopoverSurfaceProps,\n PopoverSurfaceSlots,\n PopoverSurfaceState,\n} from '@fluentui/react-components';\n\nexport type PreviewSurfaceSlots = PopoverSurfaceSlots & {};\n\n/**\n * PreviewSurface Props\n */\nexport type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & PopoverSurfaceProps & {};\n\n/**\n * State used in rendering PreviewSurface\n */\nexport type PreviewSurfaceState = ComponentState<PreviewSurfaceSlots>
|
|
1
|
+
{"version":3,"sources":["PreviewSurface.types.ts"],"sourcesContent":["import type { DesignVersion } from '@fluentui-copilot/react-provider';\nimport type {\n ComponentProps,\n ComponentState,\n PopoverSurfaceProps,\n PopoverSurfaceSlots,\n PopoverSurfaceState,\n} from '@fluentui/react-components';\n\nexport type PreviewSurfaceSlots = PopoverSurfaceSlots & {};\n\n/**\n * PreviewSurface Props\n */\nexport type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & PopoverSurfaceProps & DesignVersion & {};\n\n/**\n * State used in rendering PreviewSurface\n */\nexport type PreviewSurfaceState = ComponentState<PreviewSurfaceSlots> &\n PopoverSurfaceState &\n Pick<Required<PreviewSurfaceProps>, 'designVersion'> & {};\n"],"names":[],"rangeMappings":";;","mappings":"AAgBA;;CAEC"}
|
|
@@ -9,6 +9,11 @@ Object.defineProperty(exports, "usePreviewSurface_unstable", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const _reactprovider = require("@fluentui-copilot/react-provider");
|
|
12
13
|
const usePreviewSurface_unstable = (props, ref)=>{
|
|
13
|
-
|
|
14
|
+
const designVersion = (0, _reactprovider.useDesignVersion)(props.designVersion);
|
|
15
|
+
return {
|
|
16
|
+
designVersion,
|
|
17
|
+
...(0, _reactcomponents.usePopoverSurface_unstable)(props, ref)
|
|
18
|
+
};
|
|
14
19
|
}; //# sourceMappingURL=usePreviewSurface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewSurface.ts"],"sourcesContent":["import type * as React from 'react';\nimport { usePopoverSurface_unstable } from '@fluentui/react-components';\nimport type { PreviewSurfaceProps, PreviewSurfaceState } from './PreviewSurface.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render PreviewSurface.\n *\n * The returned state can be modified with hooks such as usePreviewSurfaceStyles_unstable,\n * before being passed to renderPreviewSurface_unstable.\n *\n * @param props - props from this instance of PreviewSurface\n * @param ref - reference to root HTMLElement of PreviewSurface\n */\nexport const usePreviewSurface_unstable = (\n props: PreviewSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PreviewSurfaceState => {\n return usePopoverSurface_unstable(props, ref);\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["usePreviewSurface.ts"],"sourcesContent":["import type * as React from 'react';\nimport { usePopoverSurface_unstable } from '@fluentui/react-components';\nimport type { PreviewSurfaceProps, PreviewSurfaceState } from './PreviewSurface.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render PreviewSurface.\n *\n * The returned state can be modified with hooks such as usePreviewSurfaceStyles_unstable,\n * before being passed to renderPreviewSurface_unstable.\n *\n * @param props - props from this instance of PreviewSurface\n * @param ref - reference to root HTMLElement of PreviewSurface\n */\nexport const usePreviewSurface_unstable = (\n props: PreviewSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PreviewSurfaceState => {\n const designVersion = useDesignVersion(props.designVersion);\n return { designVersion, ...usePopoverSurface_unstable(props, ref) };\n};\n"],"names":["designVersion","useDesignVersion","props","usePopoverSurface_unstable","ref"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BAoBQA;;;eAAAA;;;iCAnBmC;+BAEV;AAiB/B,MAAMA,6BAAgBC,CAAiBC,OAAMF;UAC7CA,gBAAOC,IAAAA,+BAAA,EAAAC,MAAAF,aAAA;WAAEA;;QAAyD,GAAAG,IAAAA,2CAAA,EAAAD,OAAAE,IAAA;IAClE"}
|
|
@@ -42,10 +42,30 @@ const previewSurfaceClassNames = {
|
|
|
42
42
|
".f1ewtqcl{box-sizing:border-box;}"
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
|
+
const useNextStyles = (0, _reactcomponents.__styles)({
|
|
46
|
+
root: {
|
|
47
|
+
Beyfa6y: 0,
|
|
48
|
+
Bbmb7ep: 0,
|
|
49
|
+
Btl43ni: 0,
|
|
50
|
+
B7oj6ja: 0,
|
|
51
|
+
Dimara: "f1kijzfu"
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
d: [
|
|
55
|
+
[
|
|
56
|
+
".f1kijzfu{border-radius:var(--borderRadiusXLarge);}",
|
|
57
|
+
{
|
|
58
|
+
p: -1
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
]
|
|
62
|
+
});
|
|
45
63
|
const usePreviewSurfaceStyles_unstable = (state)=>{
|
|
46
64
|
'use no memo';
|
|
65
|
+
const { designVersion } = state;
|
|
47
66
|
const rootStyles = useRootStyles();
|
|
48
|
-
|
|
67
|
+
const nextStyles = useNextStyles();
|
|
68
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(previewSurfaceClassNames.root, rootStyles.base, designVersion === 'next' && nextStyles.root, state.root.className);
|
|
49
69
|
(0, _reactcomponents.usePopoverSurfaceStyles_unstable)(state);
|
|
50
70
|
return state;
|
|
51
71
|
}; //# sourceMappingURL=usePreviewSurfaceStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["usePreviewSurfaceStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses,
|
|
1
|
+
{"version":3,"sources":["usePreviewSurfaceStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, usePopoverSurfaceStyles_unstable } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PreviewSurfaceSlots, PreviewSurfaceState } from './PreviewSurface.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const previewSurfaceClassNames: SlotClassNames<PreviewSurfaceSlots> = {\n root: 'fai-PreviewSurface',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n boxSizing: 'border-box',\n },\n});\n\nconst useNextStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusXLarge,\n },\n});\n\n/**\n * Apply styling to the PreviewSurface slots based on the state\n */\nexport const usePreviewSurfaceStyles_unstable = (state: PreviewSurfaceState): PreviewSurfaceState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const rootStyles = useRootStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n previewSurfaceClassNames.root,\n rootStyles.base,\n designVersion === 'next' && nextStyles.root,\n state.root.className,\n );\n\n usePopoverSurfaceStyles_unstable(state);\n\n return state;\n};\n"],"names":["previewSurfaceClassNames","root","base","__styles","padding","boxSizing","uwmqm3","z189sj","z8tnut","useNextStyles","borderRadius","d","usePreviewSurfaceStyles_unstable","designVersion","state","Beyfa6y","nextStyles","usePopoverSurfaceStyles_unstable","B7oj6ja","Dimara"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,wBAAAA;eAAAA;;;;;;iCALsD;AAK5D,MAAMA,2BAAgE;UAC3EC;AACF;AAEA;;CAEC,SAECC,gBAAMC,IAAAA,yBAAA,EAAA;UACJC;iBACAC;QACFC,QAAA;QACFC,QAAA;QAEAC,QAAMC;QACJR,SAAM;iBACJS;;AAEJ,GAAA;IAEAC,GAAA;QAAA;YAAA;YAAA;;YAEC;SACD;QAAA;KAAaC;;MAGXH,gBAAQI,IAAAA,yBAAkBC,EAAAA;UAE1B;QACAC,SAAMC;QAENF,SAAMb;QAONgB,SAAAA;QAEAC,SAAOJ;QACPK,QAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-preview",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Preview components.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@fluentui-copilot/react-provider": "^0.10.0",
|
|
16
|
+
"@fluentui-copilot/tokens": "^0.3.5",
|
|
15
17
|
"@swc/helpers": "^0.5.1"
|
|
16
18
|
},
|
|
17
19
|
"peerDependencies": {
|