@fluentui/react-provider 9.22.18 → 9.22.19

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.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/react-provider
2
2
 
3
- This log was last generated on Wed, 24 Jun 2026 11:03:42 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 04 Aug 2026 10:09:55 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.22.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.22.19)
8
+
9
+ Tue, 04 Aug 2026 10:09:55 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.22.18..@fluentui/react-provider_v9.22.19)
11
+
12
+ ### Patches
13
+
14
+ - fix: escape SSR theme style selectors ([PR #36464](https://github.com/microsoft/fluentui/pull/36464) by paulmardling@microsoft.com)
15
+
7
16
  ## [9.22.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.22.18)
8
17
 
9
- Wed, 24 Jun 2026 11:03:42 GMT
18
+ Wed, 24 Jun 2026 11:09:53 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.22.17..@fluentui/react-provider_v9.22.18)
11
20
 
12
21
  ### Patches
@@ -17,11 +17,12 @@ const CSS_ESCAPE_MAP = {
17
17
  *
18
18
  * Useful for scenarios when you want to apply theming statically to a top level elements like `body`.
19
19
  */ export function createCSSRuleFromTheme(selector, theme) {
20
+ const escapedSelector = escapeForStyleTag(selector);
20
21
  if (theme) {
21
22
  const cssVarsAsString = Object.keys(theme).reduce((cssVarRule, cssVar)=>{
22
23
  return `${cssVarRule}--${cssVar}: ${theme[cssVar]}; `;
23
24
  }, '');
24
- return `${selector} { ${escapeForStyleTag(cssVarsAsString)} }`;
25
+ return `${escapedSelector} { ${escapeForStyleTag(cssVarsAsString)} }`;
25
26
  }
26
- return `${selector} {}`;
27
+ return `${escapedSelector} {}`;
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/FluentProvider/createCSSRuleFromTheme.ts"],"sourcesContent":["import type { PartialTheme } from '@fluentui/react-theme';\n\nconst CSS_ESCAPE_MAP = {\n '<': '\\\\3C ',\n '>': '\\\\3E ',\n};\n/**\n * Escapes characters that could break out of a <style> tag during SSR.\n *\n * IMPORTANT: Do not strip quotes. Theme values legitimately include quoted font families and other CSS.\n * We only need to ensure the generated text cannot terminate the style tag and inject HTML.\n */\nfunction escapeForStyleTag(value: string): string {\n // Escape as CSS code points so the resulting CSS still represents the same characters.\n // Using CSS escapes prevents the HTML parser from seeing a literal '<' / '>' and closing <style>.\n return value.replace(/[<>]/g, match => CSS_ESCAPE_MAP[match as keyof typeof CSS_ESCAPE_MAP]);\n}\n\n/**\n * Creates a CSS rule from a theme object.\n *\n * Useful for scenarios when you want to apply theming statically to a top level elements like `body`.\n */\nexport function createCSSRuleFromTheme(selector: string, theme: PartialTheme | undefined): string {\n if (theme) {\n const cssVarsAsString = (Object.keys(theme) as (keyof typeof theme)[]).reduce((cssVarRule, cssVar) => {\n return `${cssVarRule}--${cssVar}: ${theme[cssVar]}; `;\n }, '');\n\n return `${selector} { ${escapeForStyleTag(cssVarsAsString)} }`;\n }\n\n return `${selector} {}`;\n}\n"],"names":["CSS_ESCAPE_MAP","escapeForStyleTag","value","replace","match","createCSSRuleFromTheme","selector","theme","cssVarsAsString","Object","keys","reduce","cssVarRule","cssVar"],"mappings":"AAEA,MAAMA,iBAAiB;IACrB,KAAK;IACL,KAAK;AACP;AACA;;;;;CAKC,GACD,SAASC,kBAAkBC,KAAa;IACtC,uFAAuF;IACvF,kGAAkG;IAClG,OAAOA,MAAMC,OAAO,CAAC,SAASC,CAAAA,QAASJ,cAAc,CAACI,MAAqC;AAC7F;AAEA;;;;CAIC,GACD,OAAO,SAASC,uBAAuBC,QAAgB,EAAEC,KAA+B;IACtF,IAAIA,OAAO;QACT,MAAMC,kBAAkB,AAACC,OAAOC,IAAI,CAACH,OAAkCI,MAAM,CAAC,CAACC,YAAYC;YACzF,OAAO,GAAGD,WAAW,EAAE,EAAEC,OAAO,EAAE,EAAEN,KAAK,CAACM,OAAO,CAAC,EAAE,CAAC;QACvD,GAAG;QAEH,OAAO,GAAGP,SAAS,GAAG,EAAEL,kBAAkBO,iBAAiB,EAAE,CAAC;IAChE;IAEA,OAAO,GAAGF,SAAS,GAAG,CAAC;AACzB"}
1
+ {"version":3,"sources":["../src/components/FluentProvider/createCSSRuleFromTheme.ts"],"sourcesContent":["import type { PartialTheme } from '@fluentui/react-theme';\n\nconst CSS_ESCAPE_MAP = {\n '<': '\\\\3C ',\n '>': '\\\\3E ',\n};\n/**\n * Escapes characters that could break out of a <style> tag during SSR.\n *\n * IMPORTANT: Do not strip quotes. Theme values legitimately include quoted font families and other CSS.\n * We only need to ensure the generated text cannot terminate the style tag and inject HTML.\n */\nfunction escapeForStyleTag(value: string): string {\n // Escape as CSS code points so the resulting CSS still represents the same characters.\n // Using CSS escapes prevents the HTML parser from seeing a literal '<' / '>' and closing <style>.\n return value.replace(/[<>]/g, match => CSS_ESCAPE_MAP[match as keyof typeof CSS_ESCAPE_MAP]);\n}\n\n/**\n * Creates a CSS rule from a theme object.\n *\n * Useful for scenarios when you want to apply theming statically to a top level elements like `body`.\n */\nexport function createCSSRuleFromTheme(selector: string, theme: PartialTheme | undefined): string {\n const escapedSelector = escapeForStyleTag(selector);\n\n if (theme) {\n const cssVarsAsString = (Object.keys(theme) as (keyof typeof theme)[]).reduce((cssVarRule, cssVar) => {\n return `${cssVarRule}--${cssVar}: ${theme[cssVar]}; `;\n }, '');\n\n return `${escapedSelector} { ${escapeForStyleTag(cssVarsAsString)} }`;\n }\n\n return `${escapedSelector} {}`;\n}\n"],"names":["CSS_ESCAPE_MAP","escapeForStyleTag","value","replace","match","createCSSRuleFromTheme","selector","theme","escapedSelector","cssVarsAsString","Object","keys","reduce","cssVarRule","cssVar"],"mappings":"AAEA,MAAMA,iBAAiB;IACrB,KAAK;IACL,KAAK;AACP;AACA;;;;;CAKC,GACD,SAASC,kBAAkBC,KAAa;IACtC,uFAAuF;IACvF,kGAAkG;IAClG,OAAOA,MAAMC,OAAO,CAAC,SAASC,CAAAA,QAASJ,cAAc,CAACI,MAAqC;AAC7F;AAEA;;;;CAIC,GACD,OAAO,SAASC,uBAAuBC,QAAgB,EAAEC,KAA+B;IACtF,MAAMC,kBAAkBP,kBAAkBK;IAE1C,IAAIC,OAAO;QACT,MAAME,kBAAkB,AAACC,OAAOC,IAAI,CAACJ,OAAkCK,MAAM,CAAC,CAACC,YAAYC;YACzF,OAAO,GAAGD,WAAW,EAAE,EAAEC,OAAO,EAAE,EAAEP,KAAK,CAACO,OAAO,CAAC,EAAE,CAAC;QACvD,GAAG;QAEH,OAAO,GAAGN,gBAAgB,GAAG,EAAEP,kBAAkBQ,iBAAiB,EAAE,CAAC;IACvE;IAEA,OAAO,GAAGD,gBAAgB,GAAG,CAAC;AAChC"}
@@ -23,11 +23,12 @@ const CSS_ESCAPE_MAP = {
23
23
  return value.replace(/[<>]/g, (match)=>CSS_ESCAPE_MAP[match]);
24
24
  }
25
25
  function createCSSRuleFromTheme(selector, theme) {
26
+ const escapedSelector = escapeForStyleTag(selector);
26
27
  if (theme) {
27
28
  const cssVarsAsString = Object.keys(theme).reduce((cssVarRule, cssVar)=>{
28
29
  return `${cssVarRule}--${cssVar}: ${theme[cssVar]}; `;
29
30
  }, '');
30
- return `${selector} { ${escapeForStyleTag(cssVarsAsString)} }`;
31
+ return `${escapedSelector} { ${escapeForStyleTag(cssVarsAsString)} }`;
31
32
  }
32
- return `${selector} {}`;
33
+ return `${escapedSelector} {}`;
33
34
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/FluentProvider/createCSSRuleFromTheme.ts"],"sourcesContent":["import type { PartialTheme } from '@fluentui/react-theme';\n\nconst CSS_ESCAPE_MAP = {\n '<': '\\\\3C ',\n '>': '\\\\3E ',\n};\n/**\n * Escapes characters that could break out of a <style> tag during SSR.\n *\n * IMPORTANT: Do not strip quotes. Theme values legitimately include quoted font families and other CSS.\n * We only need to ensure the generated text cannot terminate the style tag and inject HTML.\n */\nfunction escapeForStyleTag(value: string): string {\n // Escape as CSS code points so the resulting CSS still represents the same characters.\n // Using CSS escapes prevents the HTML parser from seeing a literal '<' / '>' and closing <style>.\n return value.replace(/[<>]/g, match => CSS_ESCAPE_MAP[match as keyof typeof CSS_ESCAPE_MAP]);\n}\n\n/**\n * Creates a CSS rule from a theme object.\n *\n * Useful for scenarios when you want to apply theming statically to a top level elements like `body`.\n */\nexport function createCSSRuleFromTheme(selector: string, theme: PartialTheme | undefined): string {\n if (theme) {\n const cssVarsAsString = (Object.keys(theme) as (keyof typeof theme)[]).reduce((cssVarRule, cssVar) => {\n return `${cssVarRule}--${cssVar}: ${theme[cssVar]}; `;\n }, '');\n\n return `${selector} { ${escapeForStyleTag(cssVarsAsString)} }`;\n }\n\n return `${selector} {}`;\n}\n"],"names":["CSS_ESCAPE_MAP","escapeForStyleTag","value","replace","match","createCSSRuleFromTheme","selector","theme","cssVarsAsString","Object","keys","reduce","cssVarRule","cssVar"],"mappings":";;;;+BAuBgBK;;;;;;AArBhB,MAAML,iBAAiB;IACrB,KAAK;IACL,KAAK;AACP;AACA;;;;;CAKC,GACD,SAASC,kBAAkBC,KAAa;IACtC,uFAAuF;IACvF,kGAAkG;IAClG,OAAOA,MAAMC,OAAO,CAAC,SAASC,CAAAA,QAASJ,cAAc,CAACI,MAAqC;AAC7F;AAOO,gCAAgCE,QAAgB,EAAEC,KAA+B;IACtF,IAAIA,OAAO;QACT,MAAMC,kBAAmBC,OAAOC,IAAI,CAACH,OAAkCI,MAAM,CAAC,CAACC,YAAYC;YACzF,OAAO,GAAGD,WAAW,EAAE,EAAEC,OAAO,EAAE,EAAEN,KAAK,CAACM,OAAO,CAAC,EAAE,CAAC;QACvD,GAAG;QAEH,OAAO,GAAGP,SAAS,GAAG,EAAEL,kBAAkBO,iBAAiB,EAAE,CAAC;IAChE;IAEA,OAAO,GAAGF,SAAS,GAAG,CAAC;AACzB"}
1
+ {"version":3,"sources":["../src/components/FluentProvider/createCSSRuleFromTheme.ts"],"sourcesContent":["import type { PartialTheme } from '@fluentui/react-theme';\n\nconst CSS_ESCAPE_MAP = {\n '<': '\\\\3C ',\n '>': '\\\\3E ',\n};\n/**\n * Escapes characters that could break out of a <style> tag during SSR.\n *\n * IMPORTANT: Do not strip quotes. Theme values legitimately include quoted font families and other CSS.\n * We only need to ensure the generated text cannot terminate the style tag and inject HTML.\n */\nfunction escapeForStyleTag(value: string): string {\n // Escape as CSS code points so the resulting CSS still represents the same characters.\n // Using CSS escapes prevents the HTML parser from seeing a literal '<' / '>' and closing <style>.\n return value.replace(/[<>]/g, match => CSS_ESCAPE_MAP[match as keyof typeof CSS_ESCAPE_MAP]);\n}\n\n/**\n * Creates a CSS rule from a theme object.\n *\n * Useful for scenarios when you want to apply theming statically to a top level elements like `body`.\n */\nexport function createCSSRuleFromTheme(selector: string, theme: PartialTheme | undefined): string {\n const escapedSelector = escapeForStyleTag(selector);\n\n if (theme) {\n const cssVarsAsString = (Object.keys(theme) as (keyof typeof theme)[]).reduce((cssVarRule, cssVar) => {\n return `${cssVarRule}--${cssVar}: ${theme[cssVar]}; `;\n }, '');\n\n return `${escapedSelector} { ${escapeForStyleTag(cssVarsAsString)} }`;\n }\n\n return `${escapedSelector} {}`;\n}\n"],"names":["CSS_ESCAPE_MAP","escapeForStyleTag","value","replace","match","createCSSRuleFromTheme","selector","theme","escapedSelector","cssVarsAsString","Object","keys","reduce","cssVarRule","cssVar"],"mappings":";;;;+BAuBgBK;;;;;;AArBhB,MAAML,iBAAiB;IACrB,KAAK;IACL,KAAK;AACP;AACA;;;;;CAKC,GACD,SAASC,kBAAkBC,KAAa;IACtC,uFAAuF;IACvF,kGAAkG;IAClG,OAAOA,MAAMC,OAAO,CAAC,SAASC,CAAAA,QAASJ,cAAc,CAACI,MAAqC;AAC7F;AAOO,gCAAgCE,QAAgB,EAAEC,KAA+B;IACtF,MAAMC,kBAAkBP,kBAAkBK;IAE1C,IAAIC,OAAO;QACT,MAAME,kBAAmBC,OAAOC,IAAI,CAACJ,OAAkCK,MAAM,CAAC,CAACC,YAAYC;YACzF,OAAO,GAAGD,WAAW,EAAE,EAAEC,OAAO,EAAE,EAAEP,KAAK,CAACO,OAAO,CAAC,EAAE,CAAC;QACvD,GAAG;QAEH,OAAO,GAAGN,gBAAgB,GAAG,EAAEP,kBAAkBQ,iBAAiB,EAAE,CAAC;IACvE;IAEA,OAAO,GAAGD,gBAAgB,GAAG,CAAC;AAChC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-provider",
3
- "version": "9.22.18",
3
+ "version": "9.22.19",
4
4
  "description": "Fluent UI React provider component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -13,11 +13,11 @@
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
15
  "@fluentui/react-icons": "^2.0.245",
16
+ "@fluentui/react-jsx-runtime": "^9.4.4",
16
17
  "@fluentui/react-shared-contexts": "^9.26.2",
17
18
  "@fluentui/react-tabster": "^9.26.16",
18
19
  "@fluentui/react-theme": "^9.2.1",
19
20
  "@fluentui/react-utilities": "^9.26.5",
20
- "@fluentui/react-jsx-runtime": "^9.4.4",
21
21
  "@griffel/core": "^1.16.0",
22
22
  "@griffel/react": "^1.5.32",
23
23
  "@swc/helpers": "^0.5.1"