@fluentui/react-shared-contexts 9.13.0 → 9.13.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.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/react-shared-contexts
2
2
 
3
- This log was last generated on Mon, 20 Nov 2023 09:51:21 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 14 Dec 2023 09:51:36 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.13.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.13.1)
8
+
9
+ Thu, 14 Dec 2023 09:51:36 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.13.0..@fluentui/react-shared-contexts_v9.13.1)
11
+
12
+ ### Patches
13
+
14
+ - chore: disallow `window` and `document` access ([PR #29962](https://github.com/microsoft/fluentui/pull/29962) by seanmonahan@microsoft.com)
15
+
7
16
  ## [9.13.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.13.0)
8
17
 
9
- Mon, 20 Nov 2023 09:51:21 GMT
18
+ Mon, 20 Nov 2023 09:55:09 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.12.0..@fluentui/react-shared-contexts_v9.13.0)
11
20
 
12
21
  ### Minor changes
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  * @internal
4
4
  */ const ProviderContext = React.createContext(undefined);
5
5
  const providerContextDefaultValue = {
6
+ // eslint-disable-next-line no-restricted-globals
6
7
  targetDocument: typeof document === 'object' ? document : undefined,
7
8
  dir: 'ltr'
8
9
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["ProviderContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type ProviderContextValue = {\n /** Sets the direction of text & generated styles. */\n dir: 'ltr' | 'rtl';\n\n /** Provides the document, can be undefined during SSR render. */\n targetDocument?: Document;\n};\n\n/**\n * @internal\n */\nconst ProviderContext = React.createContext<ProviderContextValue | undefined>(\n undefined,\n) as React.Context<ProviderContextValue>;\n\nconst providerContextDefaultValue: ProviderContextValue = {\n targetDocument: typeof document === 'object' ? document : undefined,\n dir: 'ltr' as const,\n};\n\n/**\n * @internal\n */\nexport const Provider = ProviderContext.Provider;\n\nexport function useFluent(): ProviderContextValue {\n return React.useContext(ProviderContext) ?? providerContextDefaultValue;\n}\n"],"names":["React","ProviderContext","createContext","undefined","providerContextDefaultValue","targetDocument","document","dir","Provider","useFluent","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAU/B;;CAEC,GACD,MAAMC,kBAAkBD,MAAME,aAAa,CACzCC;AAGF,MAAMC,8BAAoD;IACxDC,gBAAgB,OAAOC,aAAa,WAAWA,WAAWH;IAC1DI,KAAK;AACP;AAEA;;CAEC,GACD,OAAO,MAAMC,WAAWP,gBAAgBO,QAAQ,CAAC;AAEjD,OAAO,SAASC;QACPT;IAAP,OAAOA,CAAAA,oBAAAA,MAAMU,UAAU,CAACT,8BAAjBD,+BAAAA,oBAAqCI;AAC9C"}
1
+ {"version":3,"sources":["ProviderContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type ProviderContextValue = {\n /** Sets the direction of text & generated styles. */\n dir: 'ltr' | 'rtl';\n\n /** Provides the document, can be undefined during SSR render. */\n targetDocument?: Document;\n};\n\n/**\n * @internal\n */\nconst ProviderContext = React.createContext<ProviderContextValue | undefined>(\n undefined,\n) as React.Context<ProviderContextValue>;\n\nconst providerContextDefaultValue: ProviderContextValue = {\n // eslint-disable-next-line no-restricted-globals\n targetDocument: typeof document === 'object' ? document : undefined,\n dir: 'ltr' as const,\n};\n\n/**\n * @internal\n */\nexport const Provider = ProviderContext.Provider;\n\nexport function useFluent(): ProviderContextValue {\n return React.useContext(ProviderContext) ?? providerContextDefaultValue;\n}\n"],"names":["React","ProviderContext","createContext","undefined","providerContextDefaultValue","targetDocument","document","dir","Provider","useFluent","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAU/B;;CAEC,GACD,MAAMC,kBAAkBD,MAAME,aAAa,CACzCC;AAGF,MAAMC,8BAAoD;IACxD,iDAAiD;IACjDC,gBAAgB,OAAOC,aAAa,WAAWA,WAAWH;IAC1DI,KAAK;AACP;AAEA;;CAEC,GACD,OAAO,MAAMC,WAAWP,gBAAgBO,QAAQ,CAAC;AAEjD,OAAO,SAASC;QACPT;IAAP,OAAOA,CAAAA,oBAAAA,MAAMU,UAAU,CAACT,8BAAjBD,+BAAAA,oBAAqCI;AAC9C"}
@@ -22,6 +22,7 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
22
22
  * @internal
23
23
  */ const ProviderContext = /*#__PURE__*/ _react.createContext(undefined);
24
24
  const providerContextDefaultValue = {
25
+ // eslint-disable-next-line no-restricted-globals
25
26
  targetDocument: typeof document === 'object' ? document : undefined,
26
27
  dir: 'ltr'
27
28
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["ProviderContext.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n */ const ProviderContext = React.createContext(undefined);\nconst providerContextDefaultValue = {\n targetDocument: typeof document === 'object' ? document : undefined,\n dir: 'ltr'\n};\n/**\n * @internal\n */ export const Provider = ProviderContext.Provider;\nexport function useFluent() {\n var _React_useContext;\n return (_React_useContext = React.useContext(ProviderContext)) !== null && _React_useContext !== void 0 ? _React_useContext : providerContextDefaultValue;\n}\n"],"names":["Provider","useFluent","ProviderContext","React","createContext","undefined","providerContextDefaultValue","targetDocument","document","dir","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAUiBA,QAAQ;eAARA;;IACDC,SAAS;eAATA;;;;iEAXO;AACvB;;CAEC,GAAG,MAAMC,gCAAkBC,OAAMC,aAAa,CAACC;AAChD,MAAMC,8BAA8B;IAChCC,gBAAgB,OAAOC,aAAa,WAAWA,WAAWH;IAC1DI,KAAK;AACT;AAGW,MAAMT,WAAWE,gBAAgBF,QAAQ;AAC7C,SAASC;IACZ,IAAIS;IACJ,OAAO,AAACA,CAAAA,oBAAoBP,OAAMQ,UAAU,CAACT,gBAAe,MAAO,QAAQQ,sBAAsB,KAAK,IAAIA,oBAAoBJ;AAClI"}
1
+ {"version":3,"sources":["ProviderContext.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n */ const ProviderContext = React.createContext(undefined);\nconst providerContextDefaultValue = {\n // eslint-disable-next-line no-restricted-globals\n targetDocument: typeof document === 'object' ? document : undefined,\n dir: 'ltr'\n};\n/**\n * @internal\n */ export const Provider = ProviderContext.Provider;\nexport function useFluent() {\n var _React_useContext;\n return (_React_useContext = React.useContext(ProviderContext)) !== null && _React_useContext !== void 0 ? _React_useContext : providerContextDefaultValue;\n}\n"],"names":["Provider","useFluent","ProviderContext","React","createContext","undefined","providerContextDefaultValue","targetDocument","document","dir","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAWiBA,QAAQ;eAARA;;IACDC,SAAS;eAATA;;;;iEAZO;AACvB;;CAEC,GAAG,MAAMC,gCAAkBC,OAAMC,aAAa,CAACC;AAChD,MAAMC,8BAA8B;IAChC,iDAAiD;IACjDC,gBAAgB,OAAOC,aAAa,WAAWA,WAAWH;IAC1DI,KAAK;AACT;AAGW,MAAMT,WAAWE,gBAAgBF,QAAQ;AAC7C,SAASC;IACZ,IAAIS;IACJ,OAAO,AAACA,CAAAA,oBAAoBP,OAAMQ,UAAU,CAACT,gBAAe,MAAO,QAAQQ,sBAAsB,KAAK,IAAIA,oBAAoBJ;AAClI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-shared-contexts",
3
- "version": "9.13.0",
3
+ "version": "9.13.1",
4
4
  "description": "Fluent UI React Contexts shared by multiple components.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",