@fluentui/global-context 9.0.0-beta.74 → 9.0.0-beta.76

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,33 @@
1
1
  # Change Log - @fluentui/global-context
2
2
 
3
- This log was last generated on Mon, 23 Sep 2024 12:36:04 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 11 Nov 2024 09:55:27 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.76](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.76)
8
+
9
+ Mon, 11 Nov 2024 09:55:27 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.75..@fluentui/global-context_v9.0.0-beta.76)
11
+
12
+ ### Changes
13
+
14
+ - chore: replace npm-scripts and just-scrtips with nx inferred tasks ([PR #33074](https://github.com/microsoft/fluentui/pull/33074) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/react-context-selector to v9.1.69 ([PR #31887](https://github.com/microsoft/fluentui/pull/31887) by beachball)
16
+ - Bump @fluentui/react-utilities to v9.18.17 ([PR #31887](https://github.com/microsoft/fluentui/pull/31887) by beachball)
17
+
18
+ ## [9.0.0-beta.75](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.75)
19
+
20
+ Tue, 15 Oct 2024 17:17:52 GMT
21
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.74..@fluentui/global-context_v9.0.0-beta.75)
22
+
23
+ ### Changes
24
+
25
+ - Bump @fluentui/react-context-selector to v9.1.68 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
26
+ - Bump @fluentui/react-utilities to v9.18.16 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
27
+
7
28
  ## [9.0.0-beta.74](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.74)
8
29
 
9
- Mon, 23 Sep 2024 12:36:04 GMT
30
+ Mon, 23 Sep 2024 12:40:17 GMT
10
31
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.73..@fluentui/global-context_v9.0.0-beta.74)
11
32
 
12
33
  ### Changes
@@ -3,7 +3,6 @@ import { createContext as baseCreateContext } from '@fluentui/react-context-sele
3
3
  import { canUseDOM } from '@fluentui/react-utilities';
4
4
  import { getMajorVersion } from './utils';
5
5
  const isBrowser = canUseDOM();
6
- // eslint-disable-next-line no-restricted-globals
7
6
  const globalObject = isBrowser ? window : global;
8
7
  // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
9
8
  // Useful for clearning global object during SSR reloads
@@ -1 +1 @@
1
- {"version":3,"sources":["global-context-selector.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext as baseCreateContext } from '@fluentui/react-context-selector';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { getMajorVersion } from './utils';\nimport { GlobalObject } from './types';\n\nconst isBrowser = canUseDOM();\n// eslint-disable-next-line no-restricted-globals\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context-selector:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see createContext from \\@fluentui/react-context-selector that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = baseCreateContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["React","createContext","baseCreateContext","canUseDOM","getMajorVersion","isBrowser","globalObject","window","global","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","defaultValue","name","packageName","packageVersion","for","includes"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiBC,iBAAiB,QAAQ,mCAAmC;AACtF,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,eAAe,QAAQ,UAAU;AAG1C,MAAMC,YAAYF;AAClB,iDAAiD;AACjD,MAAMG,eAA6BD,YAAYE,SAASC;AAExD,sFAAsF;AACtF,wDAAwD;AACxD,OAAO,MAAMC,mBAAmB,2BAA2B;AAE3D,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACJ,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnDO,cAAcG,OAAO,CAACC,CAAAA;YAChBC;QAAJ,KAAIA,iBAAAA,OAAOC,MAAM,CAACF,kBAAdC,qCAAAA,eAAoBE,UAAU,CAACX,mBAAmB;YACpD,OAAOH,YAAY,CAACW,IAAI;QAC1B;IACF;AACF;AAEA;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMhB,gBAAgB,CAAIoB,cAAiBC,MAAcC,aAAqBC;IACnF,wDAAwD;IACxD,MAAMP,MAAMC,OAAOO,GAAG,CAAC,CAAC,EAAEhB,iBAAiB,EAAEc,YAAY,CAAC,EAAED,KAAK,EAAE,EAAElB,gBAAgBoB,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMX,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnD,IAAI,CAACO,cAAca,QAAQ,CAACT,MAAM;QAChC,8DAA8D;QAC9DX,YAAY,CAACW,IAAI,GAAGf,kBAA2BmB;IACjD;IAEA,OAAOf,YAAY,CAACW,IAAI;AAC1B,EAAE"}
1
+ {"version":3,"sources":["../src/global-context-selector.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext as baseCreateContext } from '@fluentui/react-context-selector';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { getMajorVersion } from './utils';\nimport { GlobalObject } from './types';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser\n ? // eslint-disable-next-line @nx/workspace-no-restricted-globals\n window\n : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context-selector:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see createContext from \\@fluentui/react-context-selector that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = baseCreateContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["React","createContext","baseCreateContext","canUseDOM","getMajorVersion","isBrowser","globalObject","window","global","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","defaultValue","name","packageName","packageVersion","for","includes"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiBC,iBAAiB,QAAQ,mCAAmC;AACtF,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,eAAe,QAAQ,UAAU;AAG1C,MAAMC,YAAYF;AAClB,MAAMG,eAA6BD,YAE/BE,SACAC;AAEJ,sFAAsF;AACtF,wDAAwD;AACxD,OAAO,MAAMC,mBAAmB,2BAA2B;AAE3D,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACJ,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnDO,cAAcG,OAAO,CAACC,CAAAA;YAChBC;QAAJ,KAAIA,iBAAAA,OAAOC,MAAM,CAACF,kBAAdC,qCAAAA,eAAoBE,UAAU,CAACX,mBAAmB;YACpD,OAAOH,YAAY,CAACW,IAAI;QAC1B;IACF;AACF;AAEA;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMhB,gBAAgB,CAAIoB,cAAiBC,MAAcC,aAAqBC;IACnF,wDAAwD;IACxD,MAAMP,MAAMC,OAAOO,GAAG,CAAC,CAAC,EAAEhB,iBAAiB,EAAEc,YAAY,CAAC,EAAED,KAAK,EAAE,EAAElB,gBAAgBoB,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMX,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnD,IAAI,CAACO,cAAca,QAAQ,CAACT,MAAM;QAChC,8DAA8D;QAC9DX,YAAY,CAACW,IAAI,GAAGf,kBAA2BmB;IACjD;IAEA,OAAOf,YAAY,CAACW,IAAI;AAC1B,EAAE"}
@@ -2,7 +2,6 @@ import * as React from 'react';
2
2
  import { canUseDOM } from '@fluentui/react-utilities';
3
3
  import { getMajorVersion } from './utils';
4
4
  const isBrowser = canUseDOM();
5
- // eslint-disable-next-line no-restricted-globals
6
5
  const globalObject = isBrowser ? window : global;
7
6
  // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
8
7
  // Useful for clearning global object during SSR reloads
@@ -1 +1 @@
1
- {"version":3,"sources":["global-context.ts"],"sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { GlobalObject } from './types';\nimport { getMajorVersion } from './utils';\n\nconst isBrowser = canUseDOM();\n// eslint-disable-next-line no-restricted-globals\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see React.createContext that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = React.createContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["React","canUseDOM","getMajorVersion","isBrowser","globalObject","window","global","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","createContext","defaultValue","name","packageName","packageVersion","for","includes"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,QAAQ,4BAA4B;AAEtD,SAASC,eAAe,QAAQ,UAAU;AAE1C,MAAMC,YAAYF;AAClB,iDAAiD;AACjD,MAAMG,eAA6BD,YAAYE,SAASC;AAExD,sFAAsF;AACtF,wDAAwD;AACxD,OAAO,MAAMC,mBAAmB,kBAAkB;AAElD,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACJ,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnDO,cAAcG,OAAO,CAACC,CAAAA;YAChBC;QAAJ,KAAIA,iBAAAA,OAAOC,MAAM,CAACF,kBAAdC,qCAAAA,eAAoBE,UAAU,CAACX,mBAAmB;YACpD,OAAOH,YAAY,CAACW,IAAI;QAC1B;IACF;AACF;AAEA;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMI,gBAAgB,CAAIC,cAAiBC,MAAcC,aAAqBC;IACnF,wDAAwD;IACxD,MAAMR,MAAMC,OAAOQ,GAAG,CAAC,CAAC,EAAEjB,iBAAiB,EAAEe,YAAY,CAAC,EAAED,KAAK,EAAE,EAAEnB,gBAAgBqB,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMZ,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnD,IAAI,CAACO,cAAcc,QAAQ,CAACV,MAAM;QAChC,8DAA8D;QAC9DX,YAAY,CAACW,IAAI,GAAGf,MAAMmB,aAAa,CAAUC;IACnD;IAEA,OAAOhB,YAAY,CAACW,IAAI;AAC1B,EAAE"}
1
+ {"version":3,"sources":["../src/global-context.ts"],"sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { GlobalObject } from './types';\nimport { getMajorVersion } from './utils';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser\n ? // eslint-disable-next-line @nx/workspace-no-restricted-globals\n window\n : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see React.createContext that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = React.createContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["React","canUseDOM","getMajorVersion","isBrowser","globalObject","window","global","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","createContext","defaultValue","name","packageName","packageVersion","for","includes"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,QAAQ,4BAA4B;AAEtD,SAASC,eAAe,QAAQ,UAAU;AAE1C,MAAMC,YAAYF;AAClB,MAAMG,eAA6BD,YAE/BE,SACAC;AAEJ,sFAAsF;AACtF,wDAAwD;AACxD,OAAO,MAAMC,mBAAmB,kBAAkB;AAElD,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACJ,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnDO,cAAcG,OAAO,CAACC,CAAAA;YAChBC;QAAJ,KAAIA,iBAAAA,OAAOC,MAAM,CAACF,kBAAdC,qCAAAA,eAAoBE,UAAU,CAACX,mBAAmB;YACpD,OAAOH,YAAY,CAACW,IAAI;QAC1B;IACF;AACF;AAEA;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMI,gBAAgB,CAAIC,cAAiBC,MAAcC,aAAqBC;IACnF,wDAAwD;IACxD,MAAMR,MAAMC,OAAOQ,GAAG,CAAC,CAAC,EAAEjB,iBAAiB,EAAEe,YAAY,CAAC,EAAED,KAAK,EAAE,EAAEnB,gBAAgBqB,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMZ,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnD,IAAI,CAACO,cAAcc,QAAQ,CAACV,MAAM;QAChC,8DAA8D;QAC9DX,YAAY,CAACW,IAAI,GAAGf,MAAMmB,aAAa,CAAUC;IACnD;IAEA,OAAOhB,YAAY,CAACW,IAAI;AAC1B,EAAE"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"],"names":["createContext","createContextSelector"],"rangeMappings":";","mappings":"AAAA,SAASA,aAAa,QAAQ,mBAAmB;AACjD,SAASA,iBAAiBC,qBAAqB,QAAQ,4BAA4B"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"],"names":["createContext","createContextSelector"],"rangeMappings":";","mappings":"AAAA,SAASA,aAAa,QAAQ,mBAAmB;AACjD,SAASA,iBAAiBC,qBAAqB,QAAQ,4BAA4B"}
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type GlobalObject = typeof globalThis & Record<symbol, React.Context<unknown>>;\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type GlobalObject = typeof globalThis & Record<symbol, React.Context<unknown>>;\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
package/lib/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["utils.ts"],"sourcesContent":["/**\n * @param version - semver version string\n * @returns The major version number\n */\nexport function getMajorVersion(version: string) {\n return Number(version.split('.')[0]);\n}\n"],"names":["getMajorVersion","version","Number","split"],"rangeMappings":";;;;;","mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,gBAAgBC,OAAe;IAC7C,OAAOC,OAAOD,QAAQE,KAAK,CAAC,IAAI,CAAC,EAAE;AACrC"}
1
+ {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["/**\n * @param version - semver version string\n * @returns The major version number\n */\nexport function getMajorVersion(version: string) {\n return Number(version.split('.')[0]);\n}\n"],"names":["getMajorVersion","version","Number","split"],"rangeMappings":";;;;;","mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,gBAAgBC,OAAe;IAC7C,OAAOC,OAAOD,QAAQE,KAAK,CAAC,IAAI,CAAC,EAAE;AACrC"}
@@ -22,7 +22,6 @@ const _reactcontextselector = require("@fluentui/react-context-selector");
22
22
  const _reactutilities = require("@fluentui/react-utilities");
23
23
  const _utils = require("./utils");
24
24
  const isBrowser = (0, _reactutilities.canUseDOM)();
25
- // eslint-disable-next-line no-restricted-globals
26
25
  const globalObject = isBrowser ? window : global;
27
26
  const SYMBOL_NAMESPACE = 'global-context-selector:';
28
27
  // During SSR the global object persists with the server process
@@ -1 +1 @@
1
- {"version":3,"sources":["global-context-selector.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext as baseCreateContext } from '@fluentui/react-context-selector';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { getMajorVersion } from './utils';\nimport { GlobalObject } from './types';\n\nconst isBrowser = canUseDOM();\n// eslint-disable-next-line no-restricted-globals\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context-selector:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see createContext from \\@fluentui/react-context-selector that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = baseCreateContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["SYMBOL_NAMESPACE","createContext","isBrowser","canUseDOM","globalObject","window","global","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","defaultValue","name","packageName","packageVersion","for","getMajorVersion","includes","baseCreateContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,gBAAAA;eAAAA;;IA0BAC,aAAAA;eAAAA;;;;iEAtCU;sCAC4B;gCACzB;uBACM;AAGhC,MAAMC,YAAYC,IAAAA,yBAAAA;AAClB,iDAAiD;AACjD,MAAMC,eAA6BF,YAAYG,SAASC;AAIjD,MAAMN,mBAAmB;AAEhC,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACE,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACR;IACnDM,cAAcG,OAAO,CAACC,CAAAA;YAChBC;QAAJ,IAAA,AAAIA,CAAAA,iBAAAA,OAAOC,MAAM,CAACF,IAAAA,MAAAA,QAAdC,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAoBE,UAAU,CAACjB,mBAAmB;YACpD,OAAOI,YAAY,CAACU,IAAI;QAC1B;IACF;AACF;AAeO,MAAMb,gBAAgB,CAAIiB,cAAiBC,MAAcC,aAAqBC;IACnF,wDAAwD;IACxD,MAAMP,MAAMC,OAAOO,GAAG,CAAC,CAAC,EAAEtB,iBAAiB,EAAEoB,YAAY,CAAC,EAAED,KAAK,EAAE,EAAEI,IAAAA,sBAAAA,EAAgBF,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMX,gBAAgBC,OAAOC,qBAAqB,CAACR;IACnD,IAAI,CAACM,cAAcc,QAAQ,CAACV,MAAM;QAChC,8DAA8D;QAC9DV,YAAY,CAACU,IAAI,GAAGW,IAAAA,mCAAAA,EAA2BP;IACjD;IAEA,OAAOd,YAAY,CAACU,IAAI;AAC1B"}
1
+ {"version":3,"sources":["../src/global-context-selector.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext as baseCreateContext } from '@fluentui/react-context-selector';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { getMajorVersion } from './utils';\nimport { GlobalObject } from './types';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser\n ? // eslint-disable-next-line @nx/workspace-no-restricted-globals\n window\n : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context-selector:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see createContext from \\@fluentui/react-context-selector that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = baseCreateContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["SYMBOL_NAMESPACE","createContext","isBrowser","canUseDOM","globalObject","window","global","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","defaultValue","name","packageName","packageVersion","for","getMajorVersion","includes","baseCreateContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAcaA,gBAAgB;eAAhBA;;IA0BAC,aAAa;eAAbA;;;;iEAxCU;sCAC4B;gCACzB;uBACM;AAGhC,MAAMC,YAAYC,IAAAA,yBAAS;AAC3B,MAAMC,eAA6BF,YAE/BG,SACAC;AAIG,MAAMN,mBAAmB;AAEhC,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACE,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACR;IACnDM,cAAcG,OAAO,CAACC,CAAAA;YAChBC;QAAJ,KAAIA,iBAAAA,OAAOC,MAAM,CAACF,kBAAdC,qCAAAA,eAAoBE,UAAU,CAACjB,mBAAmB;YACpD,OAAOI,YAAY,CAACU,IAAI;QAC1B;IACF;AACF;AAeO,MAAMb,gBAAgB,CAAIiB,cAAiBC,MAAcC,aAAqBC;IACnF,wDAAwD;IACxD,MAAMP,MAAMC,OAAOO,GAAG,CAAC,CAAC,EAAEtB,iBAAiB,EAAEoB,YAAY,CAAC,EAAED,KAAK,EAAE,EAAEI,IAAAA,sBAAe,EAACF,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMX,gBAAgBC,OAAOC,qBAAqB,CAACR;IACnD,IAAI,CAACM,cAAcc,QAAQ,CAACV,MAAM;QAChC,8DAA8D;QAC9DV,YAAY,CAACU,IAAI,GAAGW,IAAAA,mCAAiB,EAAUP;IACjD;IAEA,OAAOd,YAAY,CAACU,IAAI;AAC1B"}
@@ -21,7 +21,6 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
21
21
  const _reactutilities = require("@fluentui/react-utilities");
22
22
  const _utils = require("./utils");
23
23
  const isBrowser = (0, _reactutilities.canUseDOM)();
24
- // eslint-disable-next-line no-restricted-globals
25
24
  const globalObject = isBrowser ? window : global;
26
25
  const SYMBOL_NAMESPACE = 'global-context:';
27
26
  // During SSR the global object persists with the server process
@@ -43,7 +42,7 @@ const createContext = (defaultValue, name, packageName, packageVersion)=>{
43
42
  const globalSymbols = Object.getOwnPropertySymbols(globalObject);
44
43
  if (!globalSymbols.includes(sym)) {
45
44
  // eslint-disable-next-line @fluentui/no-context-default-value
46
- globalObject[sym] = /*#__PURE__*/ _react.createContext(defaultValue);
45
+ globalObject[sym] = _react.createContext(defaultValue);
47
46
  }
48
47
  return globalObject[sym];
49
48
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["global-context.ts"],"sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { GlobalObject } from './types';\nimport { getMajorVersion } from './utils';\n\nconst isBrowser = canUseDOM();\n// eslint-disable-next-line no-restricted-globals\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see React.createContext that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = React.createContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["SYMBOL_NAMESPACE","createContext","isBrowser","canUseDOM","globalObject","window","global","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","defaultValue","name","packageName","packageVersion","for","getMajorVersion","includes","React"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAWaA,gBAAAA;eAAAA;;IA0BAC,aAAAA;eAAAA;;;;iEArCU;gCACG;uBAEM;AAEhC,MAAMC,YAAYC,IAAAA,yBAAAA;AAClB,iDAAiD;AACjD,MAAMC,eAA6BF,YAAYG,SAASC;AAIjD,MAAMN,mBAAmB;AAEhC,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACE,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACR;IACnDM,cAAcG,OAAO,CAACC,CAAAA;YAChBC;QAAJ,IAAA,AAAIA,CAAAA,iBAAAA,OAAOC,MAAM,CAACF,IAAAA,MAAAA,QAAdC,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAoBE,UAAU,CAACjB,mBAAmB;YACpD,OAAOI,YAAY,CAACU,IAAI;QAC1B;IACF;AACF;AAeO,MAAMb,gBAAgB,CAAIiB,cAAiBC,MAAcC,aAAqBC;IACnF,wDAAwD;IACxD,MAAMP,MAAMC,OAAOO,GAAG,CAAC,CAAC,EAAEtB,iBAAiB,EAAEoB,YAAY,CAAC,EAAED,KAAK,EAAE,EAAEI,IAAAA,sBAAAA,EAAgBF,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMX,gBAAgBC,OAAOC,qBAAqB,CAACR;IACnD,IAAI,CAACM,cAAcc,QAAQ,CAACV,MAAM;QAChC,8DAA8D;QAC9DV,YAAY,CAACU,IAAI,iBAAGW,OAAMxB,aAAa,CAAUiB;IACnD;IAEA,OAAOd,YAAY,CAACU,IAAI;AAC1B"}
1
+ {"version":3,"sources":["../src/global-context.ts"],"sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { GlobalObject } from './types';\nimport { getMajorVersion } from './utils';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser\n ? // eslint-disable-next-line @nx/workspace-no-restricted-globals\n window\n : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see React.createContext that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = React.createContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["SYMBOL_NAMESPACE","createContext","isBrowser","canUseDOM","globalObject","window","global","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","defaultValue","name","packageName","packageVersion","for","getMajorVersion","includes","React"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAaaA,gBAAgB;eAAhBA;;IA0BAC,aAAa;eAAbA;;;;iEAvCU;gCACG;uBAEM;AAEhC,MAAMC,YAAYC,IAAAA,yBAAS;AAC3B,MAAMC,eAA6BF,YAE/BG,SACAC;AAIG,MAAMN,mBAAmB;AAEhC,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACE,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACR;IACnDM,cAAcG,OAAO,CAACC,CAAAA;YAChBC;QAAJ,KAAIA,iBAAAA,OAAOC,MAAM,CAACF,kBAAdC,qCAAAA,eAAoBE,UAAU,CAACjB,mBAAmB;YACpD,OAAOI,YAAY,CAACU,IAAI;QAC1B;IACF;AACF;AAeO,MAAMb,gBAAgB,CAAIiB,cAAiBC,MAAcC,aAAqBC;IACnF,wDAAwD;IACxD,MAAMP,MAAMC,OAAOO,GAAG,CAAC,CAAC,EAAEtB,iBAAiB,EAAEoB,YAAY,CAAC,EAAED,KAAK,EAAE,EAAEI,IAAAA,sBAAe,EAACF,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMX,gBAAgBC,OAAOC,qBAAqB,CAACR;IACnD,IAAI,CAACM,cAAcc,QAAQ,CAACV,MAAM;QAChC,8DAA8D;QAC9DV,YAAY,CAACU,IAAI,GAAGW,OAAMxB,aAAa,CAAUiB;IACnD;IAEA,OAAOd,YAAY,CAACU,IAAI;AAC1B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"],"names":["createContext","createContextSelector"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IACIC,qBAAqB;eAAtCD,oCAAAA;;;+BADqB;uCACyB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"],"names":["createContext","createContextSelector"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IACIC,qBAAqB;eAAtCD,oCAAa;;;+BADQ;uCACyB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type GlobalObject = typeof globalThis & Record<symbol, React.Context<unknown>>;\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type GlobalObject = typeof globalThis & Record<symbol, React.Context<unknown>>;\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils.ts"],"sourcesContent":["/**\n * @param version - semver version string\n * @returns The major version number\n */\nexport function getMajorVersion(version: string) {\n return Number(version.split('.')[0]);\n}\n"],"names":["getMajorVersion","version","Number","split"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA;;;CAGC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,gBAAgBC,OAAe;IAC7C,OAAOC,OAAOD,QAAQE,KAAK,CAAC,IAAI,CAAC,EAAE;AACrC"}
1
+ {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["/**\n * @param version - semver version string\n * @returns The major version number\n */\nexport function getMajorVersion(version: string) {\n return Number(version.split('.')[0]);\n}\n"],"names":["getMajorVersion","version","Number","split"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA;;;CAGC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,gBAAgBC,OAAe;IAC7C,OAAOC,OAAOD,QAAQE,KAAK,CAAC,IAAI,CAAC,EAAE;AACrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/global-context",
3
- "version": "9.0.0-beta.74",
3
+ "version": "9.0.0-beta.76",
4
4
  "description": "Extension of React createContext to be a true singleton on the global scope",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -11,29 +11,14 @@
11
11
  "url": "https://github.com/microsoft/fluentui"
12
12
  },
13
13
  "license": "MIT",
14
- "scripts": {
15
- "build": "just-scripts build",
16
- "bundle-size": "monosize measure",
17
- "clean": "just-scripts clean",
18
- "code-style": "just-scripts code-style",
19
- "e2e": "cypress run --component",
20
- "e2e:local": "cypress open --component",
21
- "just": "just-scripts",
22
- "lint": "just-scripts lint",
23
- "test": "jest --passWithNoTests",
24
- "type-check": "just-scripts type-check",
25
- "generate-api": "just-scripts generate-api",
26
- "test-ssr": "test-ssr \"./stories/**/*.stories.tsx\""
27
- },
28
14
  "devDependencies": {
29
15
  "@fluentui/eslint-plugin": "*",
30
16
  "@fluentui/scripts-api-extractor": "*",
31
- "@fluentui/scripts-cypress": "*",
32
- "@fluentui/scripts-tasks": "*"
17
+ "@fluentui/scripts-cypress": "*"
33
18
  },
34
19
  "dependencies": {
35
- "@fluentui/react-context-selector": "^9.1.67",
36
- "@fluentui/react-utilities": "^9.18.15",
20
+ "@fluentui/react-context-selector": "^9.1.69",
21
+ "@fluentui/react-utilities": "^9.18.17",
37
22
  "@swc/helpers": "^0.5.1"
38
23
  },
39
24
  "peerDependencies": {