@fluentui/react-provider 9.22.13 → 9.22.14

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,22 @@
1
1
  # Change Log - @fluentui/react-provider
2
2
 
3
- This log was last generated on Thu, 22 Jan 2026 17:01:21 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 12 Feb 2026 10:42:44 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.22.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.22.14)
8
+
9
+ Thu, 12 Feb 2026 10:42:44 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.22.13..@fluentui/react-provider_v9.22.14)
11
+
12
+ ### Patches
13
+
14
+ - fix: prevent XSS theme vulnerability during SSR ([PR #35717](https://github.com/microsoft/fluentui/pull/35717) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/react-jsx-runtime to v9.4.0 ([PR #35743](https://github.com/microsoft/fluentui/pull/35743) by beachball)
16
+
7
17
  ## [9.22.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-provider_v9.22.13)
8
18
 
9
- Thu, 22 Jan 2026 17:01:21 GMT
19
+ Thu, 22 Jan 2026 17:06:37 GMT
10
20
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-provider_v9.22.12..@fluentui/react-provider_v9.22.13)
11
21
 
12
22
  ### Patches
@@ -1,3 +1,17 @@
1
+ const CSS_ESCAPE_MAP = {
2
+ '<': '\\3C ',
3
+ '>': '\\3E '
4
+ };
5
+ /**
6
+ * Escapes characters that could break out of a <style> tag during SSR.
7
+ *
8
+ * IMPORTANT: Do not strip quotes. Theme values legitimately include quoted font families and other CSS.
9
+ * We only need to ensure the generated text cannot terminate the style tag and inject HTML.
10
+ */ function escapeForStyleTag(value) {
11
+ // Escape as CSS code points so the resulting CSS still represents the same characters.
12
+ // Using CSS escapes prevents the HTML parser from seeing a literal '<' / '>' and closing <style>.
13
+ return value.replace(/[<>]/g, (match)=>CSS_ESCAPE_MAP[match]);
14
+ }
1
15
  /**
2
16
  * Creates a CSS rule from a theme object.
3
17
  *
@@ -7,7 +21,7 @@
7
21
  const cssVarsAsString = Object.keys(theme).reduce((cssVarRule, cssVar)=>{
8
22
  return `${cssVarRule}--${cssVar}: ${theme[cssVar]}; `;
9
23
  }, '');
10
- return `${selector} { ${cssVarsAsString} }`;
24
+ return `${selector} { ${escapeForStyleTag(cssVarsAsString)} }`;
11
25
  }
12
26
  return `${selector} {}`;
13
27
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/FluentProvider/createCSSRuleFromTheme.ts"],"sourcesContent":["import type { PartialTheme } from '@fluentui/react-theme';\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} { ${cssVarsAsString} }`;\n }\n\n return `${selector} {}`;\n}\n"],"names":["createCSSRuleFromTheme","selector","theme","cssVarsAsString","Object","keys","reduce","cssVarRule","cssVar"],"mappings":"AAEA;;;;CAIC,GACD,OAAO,SAASA,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,EAAEE,gBAAgB,EAAE,CAAC;IAC7C;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 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,8 +1,4 @@
1
- /**
2
- * Creates a CSS rule from a theme object.
3
- *
4
- * Useful for scenarios when you want to apply theming statically to a top level elements like `body`.
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -12,12 +8,26 @@ Object.defineProperty(exports, "createCSSRuleFromTheme", {
12
8
  return createCSSRuleFromTheme;
13
9
  }
14
10
  });
11
+ const CSS_ESCAPE_MAP = {
12
+ '<': '\\3C ',
13
+ '>': '\\3E '
14
+ };
15
+ /**
16
+ * Escapes characters that could break out of a <style> tag during SSR.
17
+ *
18
+ * IMPORTANT: Do not strip quotes. Theme values legitimately include quoted font families and other CSS.
19
+ * We only need to ensure the generated text cannot terminate the style tag and inject HTML.
20
+ */ function escapeForStyleTag(value) {
21
+ // Escape as CSS code points so the resulting CSS still represents the same characters.
22
+ // Using CSS escapes prevents the HTML parser from seeing a literal '<' / '>' and closing <style>.
23
+ return value.replace(/[<>]/g, (match)=>CSS_ESCAPE_MAP[match]);
24
+ }
15
25
  function createCSSRuleFromTheme(selector, theme) {
16
26
  if (theme) {
17
27
  const cssVarsAsString = Object.keys(theme).reduce((cssVarRule, cssVar)=>{
18
28
  return `${cssVarRule}--${cssVar}: ${theme[cssVar]}; `;
19
29
  }, '');
20
- return `${selector} { ${cssVarsAsString} }`;
30
+ return `${selector} { ${escapeForStyleTag(cssVarsAsString)} }`;
21
31
  }
22
32
  return `${selector} {}`;
23
33
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/FluentProvider/createCSSRuleFromTheme.ts"],"sourcesContent":["import type { PartialTheme } from '@fluentui/react-theme';\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} { ${cssVarsAsString} }`;\n }\n\n return `${selector} {}`;\n}\n"],"names":["createCSSRuleFromTheme","selector","theme","cssVarsAsString","Object","keys","reduce","cssVarRule","cssVar"],"mappings":"AAEA;;;;CAIC,GACD;;;;;;;;;;AAAO,SAASA,uBAAuBC,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,EAAEE,gBAAgB,EAAE,CAAC;IAC7C;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 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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-provider",
3
- "version": "9.22.13",
3
+ "version": "9.22.14",
4
4
  "description": "Fluent UI React provider component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -17,7 +17,7 @@
17
17
  "@fluentui/react-tabster": "^9.26.12",
18
18
  "@fluentui/react-theme": "^9.2.1",
19
19
  "@fluentui/react-utilities": "^9.26.1",
20
- "@fluentui/react-jsx-runtime": "^9.3.5",
20
+ "@fluentui/react-jsx-runtime": "^9.4.0",
21
21
  "@griffel/core": "^1.16.0",
22
22
  "@griffel/react": "^1.5.32",
23
23
  "@swc/helpers": "^0.5.1"