@fluentui-copilot/react-prompt-starter 0.9.3 → 0.9.4

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 CHANGED
@@ -2,7 +2,30 @@
2
2
  "name": "@fluentui-copilot/react-prompt-starter",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 03 May 2025 01:25:53 GMT",
5
+ "date": "Mon, 19 May 2025 18:03:24 GMT",
6
+ "tag": "@fluentui-copilot/react-prompt-starter_v0.9.4",
7
+ "version": "0.9.4",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "sarah.higley@microsoft.com",
12
+ "package": "@fluentui-copilot/react-prompt-starter",
13
+ "commit": "12581083b6078b77bbd4828e42d814eda634e1fe",
14
+ "comment": "feat: update PromptStarter to use primary text as a label and secondary text as a description"
15
+ }
16
+ ],
17
+ "none": [
18
+ {
19
+ "author": "hochelmartin@gmail.com",
20
+ "package": "@fluentui-copilot/react-prompt-starter",
21
+ "commit": "442954951d0eca92de20ecb0ff0fa9492431b62d",
22
+ "comment": "fix: exclude story files from production build"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "date": "Sat, 03 May 2025 01:27:44 GMT",
6
29
  "tag": "@fluentui-copilot/react-prompt-starter_v0.9.3",
7
30
  "version": "0.9.3",
8
31
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui-copilot/react-prompt-starter
2
2
 
3
- This log was last generated on Sat, 03 May 2025 01:25:53 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 19 May 2025 18:03:24 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.9.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-starter_v0.9.4)
8
+
9
+ Mon, 19 May 2025 18:03:24 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.9.3..@fluentui-copilot/react-prompt-starter_v0.9.4)
11
+
12
+ ### Patches
13
+
14
+ - feat: update PromptStarter to use primary text as a label and secondary text as a description ([PR #2999](https://github.com/microsoft/fluentai/pull/2999) by sarah.higley@microsoft.com)
15
+
7
16
  ## [0.9.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-starter_v0.9.3)
8
17
 
9
- Sat, 03 May 2025 01:25:53 GMT
18
+ Sat, 03 May 2025 01:27:44 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-starter_v0.9.2..@fluentui-copilot/react-prompt-starter_v0.9.3)
11
20
 
12
21
  ### Patches
@@ -1,5 +1,5 @@
1
1
  import { useDesignVersion } from '@fluentui-copilot/react-provider';
2
- import { Badge, getIntrinsicElementProps, slot } from '@fluentui/react-components';
2
+ import { Badge, getIntrinsicElementProps, slot, useId } from '@fluentui/react-components';
3
3
  /**
4
4
  * Create the state required to render PromptStarter.
5
5
  *
@@ -11,6 +11,7 @@ import { Badge, getIntrinsicElementProps, slot } from '@fluentui/react-component
11
11
  */
12
12
  export const usePromptStarter_unstable = (props, ref) => {
13
13
  const designVersion = useDesignVersion(props.designVersion);
14
+ const idPrefix = useId('prompt-starter');
14
15
  return {
15
16
  components: {
16
17
  root: 'button',
@@ -21,6 +22,8 @@ export const usePromptStarter_unstable = (props, ref) => {
21
22
  },
22
23
  root: slot.always(getIntrinsicElementProps('button', {
23
24
  ref,
25
+ 'aria-labelledby': `${idPrefix}-category`,
26
+ 'aria-describedby': `${idPrefix}-prompt`,
24
27
  ...props
25
28
  }), {
26
29
  elementType: 'button'
@@ -29,9 +32,15 @@ export const usePromptStarter_unstable = (props, ref) => {
29
32
  elementType: 'span'
30
33
  }),
31
34
  category: slot.always(props.category, {
35
+ defaultProps: {
36
+ id: `${idPrefix}-category`
37
+ },
32
38
  elementType: 'span'
33
39
  }),
34
40
  prompt: slot.optional(props.prompt, {
41
+ defaultProps: {
42
+ id: `${idPrefix}-prompt`
43
+ },
35
44
  elementType: 'span'
36
45
  }),
37
46
  badge: slot.optional(props.badge, {
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { Badge, getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLButtonElement>,\n): PromptStarterState => {\n const designVersion = useDesignVersion(props.designVersion);\n return {\n components: {\n root: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n badge: Badge,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n ...props,\n }),\n { elementType: 'button' },\n ),\n icon: slot.always(props.icon, { elementType: 'span' }),\n category: slot.always(props.category, { elementType: 'span' }),\n prompt: slot.optional(props.prompt, { elementType: 'span' }),\n badge: slot.optional(props.badge, { defaultProps: { appearance: 'tint' }, elementType: Badge }),\n designVersion,\n };\n};\n"],"names":["useDesignVersion","Badge","getIntrinsicElementProps","slot","usePromptStarter_unstable","props","ref","designVersion","components","root","icon","category","prompt","badge","always","elementType","optional","defaultProps","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,QAAQ,mCAAmC;AACpE,SAASC,KAAK,EAAEC,wBAAwB,EAAEC,IAAI,QAAQ,6BAA6B;AAGnF;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,gBAAgBP,iBAAiBK,MAAME,aAAa;IAC1D,OAAO;QACLC,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;YACRC,OAAOZ;QACT;QACAQ,MAAMN,KAAKW,MAAM,CACfZ,yBAAyB,UAAU;YACjCI;YACA,GAAGD,KAAK;QACV,IACA;YAAEU,aAAa;QAAS;QAE1BL,MAAMP,KAAKW,MAAM,CAACT,MAAMK,IAAI,EAAE;YAAEK,aAAa;QAAO;QACpDJ,UAAUR,KAAKW,MAAM,CAACT,MAAMM,QAAQ,EAAE;YAAEI,aAAa;QAAO;QAC5DH,QAAQT,KAAKa,QAAQ,CAACX,MAAMO,MAAM,EAAE;YAAEG,aAAa;QAAO;QAC1DF,OAAOV,KAAKa,QAAQ,CAACX,MAAMQ,KAAK,EAAE;YAAEI,cAAc;gBAAEC,YAAY;YAAO;YAAGH,aAAad;QAAM;QAC7FM;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { Badge, getIntrinsicElementProps, slot, useId } from '@fluentui/react-components';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLButtonElement>,\n): PromptStarterState => {\n const designVersion = useDesignVersion(props.designVersion);\n const idPrefix = useId('prompt-starter');\n\n return {\n components: {\n root: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n badge: Badge,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-labelledby': `${idPrefix}-category`,\n 'aria-describedby': `${idPrefix}-prompt`,\n ...props,\n }),\n { elementType: 'button' },\n ),\n icon: slot.always(props.icon, { elementType: 'span' }),\n category: slot.always(props.category, { defaultProps: { id: `${idPrefix}-category` }, elementType: 'span' }),\n prompt: slot.optional(props.prompt, { defaultProps: { id: `${idPrefix}-prompt` }, elementType: 'span' }),\n badge: slot.optional(props.badge, { defaultProps: { appearance: 'tint' }, elementType: Badge }),\n designVersion,\n };\n};\n"],"names":["useDesignVersion","Badge","getIntrinsicElementProps","slot","useId","usePromptStarter_unstable","props","ref","designVersion","idPrefix","components","root","icon","category","prompt","badge","always","elementType","defaultProps","id","optional","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,QAAQ,mCAAmC;AACpE,SAASC,KAAK,EAAEC,wBAAwB,EAAEC,IAAI,EAAEC,KAAK,QAAQ,6BAA6B;AAG1F;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,gBAAgBR,iBAAiBM,MAAME,aAAa;IAC1D,MAAMC,WAAWL,MAAM;IAEvB,OAAO;QACLM,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;YACRC,OAAOd;QACT;QACAU,MAAMR,KAAKa,MAAM,CACfd,yBAAyB,UAAU;YACjCK;YACA,mBAAmB,CAAC,EAAEE,SAAS,SAAS,CAAC;YACzC,oBAAoB,CAAC,EAAEA,SAAS,OAAO,CAAC;YACxC,GAAGH,KAAK;QACV,IACA;YAAEW,aAAa;QAAS;QAE1BL,MAAMT,KAAKa,MAAM,CAACV,MAAMM,IAAI,EAAE;YAAEK,aAAa;QAAO;QACpDJ,UAAUV,KAAKa,MAAM,CAACV,MAAMO,QAAQ,EAAE;YAAEK,cAAc;gBAAEC,IAAI,CAAC,EAAEV,SAAS,SAAS,CAAC;YAAC;YAAGQ,aAAa;QAAO;QAC1GH,QAAQX,KAAKiB,QAAQ,CAACd,MAAMQ,MAAM,EAAE;YAAEI,cAAc;gBAAEC,IAAI,CAAC,EAAEV,SAAS,OAAO,CAAC;YAAC;YAAGQ,aAAa;QAAO;QACtGF,OAAOZ,KAAKiB,QAAQ,CAACd,MAAMS,KAAK,EAAE;YAAEG,cAAc;gBAAEG,YAAY;YAAO;YAAGJ,aAAahB;QAAM;QAC7FO;IACF;AACF,EAAE"}
@@ -12,6 +12,7 @@ const _reactprovider = require("@fluentui-copilot/react-provider");
12
12
  const _reactcomponents = require("@fluentui/react-components");
13
13
  const usePromptStarter_unstable = (props, ref)=>{
14
14
  const designVersion = (0, _reactprovider.useDesignVersion)(props.designVersion);
15
+ const idPrefix = (0, _reactcomponents.useId)('prompt-starter');
15
16
  return {
16
17
  components: {
17
18
  root: 'button',
@@ -22,6 +23,8 @@ const usePromptStarter_unstable = (props, ref)=>{
22
23
  },
23
24
  root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('button', {
24
25
  ref,
26
+ 'aria-labelledby': `${idPrefix}-category`,
27
+ 'aria-describedby': `${idPrefix}-prompt`,
25
28
  ...props
26
29
  }), {
27
30
  elementType: 'button'
@@ -30,9 +33,15 @@ const usePromptStarter_unstable = (props, ref)=>{
30
33
  elementType: 'span'
31
34
  }),
32
35
  category: _reactcomponents.slot.always(props.category, {
36
+ defaultProps: {
37
+ id: `${idPrefix}-category`
38
+ },
33
39
  elementType: 'span'
34
40
  }),
35
41
  prompt: _reactcomponents.slot.optional(props.prompt, {
42
+ defaultProps: {
43
+ id: `${idPrefix}-prompt`
44
+ },
36
45
  elementType: 'span'
37
46
  }),
38
47
  badge: _reactcomponents.slot.optional(props.badge, {
@@ -1 +1 @@
1
- {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { Badge, getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLButtonElement>,\n): PromptStarterState => {\n const designVersion = useDesignVersion(props.designVersion);\n return {\n components: {\n root: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n badge: Badge,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n ...props,\n }),\n { elementType: 'button' },\n ),\n icon: slot.always(props.icon, { elementType: 'span' }),\n category: slot.always(props.category, { elementType: 'span' }),\n prompt: slot.optional(props.prompt, { elementType: 'span' }),\n badge: slot.optional(props.badge, { defaultProps: { appearance: 'tint' }, elementType: Badge }),\n designVersion,\n };\n};\n"],"names":["designVersion","useDesignVersion","props","components","root","icon","category","prompt","badge","Badge","ref","elementType","defaultProps","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBQA;;;eAAAA;;;+BAjByB;iCACqB;AAgBpD,MAAMA,4BAAgBC,CAAAA,OAAuBD;UAC7CA,gBAAOC,IAAAA,+BAAA,EAAAC,MAAAF,aAAA;WACLG;oBACEC;kBACAC;kBACAC;sBACAC;oBACAC;mBACFC,sBAAA;;mCAGIC,CAAAA,MAAAA,CAAAA,IAAAA,yCAAAA,EAAAA,UAAAA;;eAEFR,KACA;;yBAAwB;;mCAEMS,CAAAA,MAAAA,CAAAA,MAAaN,IAAA,EAAA;yBAAO;;kBACZM,qBAAAA,CAAAA,MAAa,CAAAT,MAAAI,QAAA,EAAA;yBAAO;;gBACtBK,qBAAAA,CAAAA,QAAa,CAAAT,MAAAK,MAAA,EAAA;yBAAO;;oCACtBK,CAAAA,QAAAA,CAAAA,MAAcJ,KAAA,EAAA;0BAAEK;4BAAmB;;yBAAsBJ,sBAAA;;QAE/FT;IACA"}
1
+ {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { Badge, getIntrinsicElementProps, slot, useId } from '@fluentui/react-components';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLButtonElement>,\n): PromptStarterState => {\n const designVersion = useDesignVersion(props.designVersion);\n const idPrefix = useId('prompt-starter');\n\n return {\n components: {\n root: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n badge: Badge,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-labelledby': `${idPrefix}-category`,\n 'aria-describedby': `${idPrefix}-prompt`,\n ...props,\n }),\n { elementType: 'button' },\n ),\n icon: slot.always(props.icon, { elementType: 'span' }),\n category: slot.always(props.category, { defaultProps: { id: `${idPrefix}-category` }, elementType: 'span' }),\n prompt: slot.optional(props.prompt, { defaultProps: { id: `${idPrefix}-prompt` }, elementType: 'span' }),\n badge: slot.optional(props.badge, { defaultProps: { appearance: 'tint' }, elementType: Badge }),\n designVersion,\n };\n};\n"],"names":["designVersion","useDesignVersion","useId","props","idPrefix","components","root","icon","category","prompt","badge","Badge","ref","elementType","defaultProps","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBQA;;;eAAAA;;;+BAjByB;iCAC4B;AAgB3D,MAAMA,4BAAgBC,CAAAA,OAAuBD;UAC7CA,gBAAiBE,IAAAA,+BAAM,EAAAC,MAAAH,aAAA;UAEvBI,WAAOF,IAAAA,sBAAA,EAAA;WACLG;oBACEC;kBACAC;kBACAC;sBACAC;oBACAC;mBACFC,sBAAA;;mCAGIC,CAAAA,MAAAA,CAAAA,IAAAA,yCAAAA,EAAAA,UAAAA;;+BAEA,CAAA,EAAAR,SAAuBA,SAAS,CAAA;gCACxB,CAAA,EAAAA,SAAA,OAAA,CAAA;eACVD,KACA;;yBAAwB;;mCAEMU,CAAAA,MAAAA,CAAAA,MAAaN,IAAA,EAAA;yBAAO;;kBACZO,qBAAAA,CAAAA,MAAAA,CAAcX,MAAAK,QAAA,EAAA;0BAAM;oBAAuB,CAAA,EAAAJ,SAAA,SAAA,CAAA;;yBAAuB;;gBACpEU,qBAAAA,CAAAA,QAAAA,CAAcX,MAAAM,MAAA,EAAA;0BAAM;oBAAqB,CAAA,EAAAL,SAAA,OAAA,CAAA;;yBAAuB;;oCAClEU,CAAAA,QAAAA,CAAAA,MAAcJ,KAAA,EAAA;0BAAEK;4BAAmB;;yBAAsBJ,sBAAA;;QAE/FX;IACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-prompt-starter",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "A Fluent AI package",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",