11"use strict" ;
2- ( self [ "webpackChunkboajs_dev" ] = self [ "webpackChunkboajs_dev" ] || [ ] ) . push ( [ [ 6183 ] , {
2+ ( globalThis [ "webpackChunkboajs_dev" ] = globalThis [ "webpackChunkboajs_dev" ] || [ ] ) . push ( [ [ 6183 ] , {
33
4- /***/ 28453 :
5- /***/ ( ( __unused_webpack___webpack_module__ , __webpack_exports__ , __webpack_require__ ) => {
6-
7- /* harmony export */ __webpack_require__ . d ( __webpack_exports__ , {
8- /* harmony export */ R : ( ) => ( /* binding */ useMDXComponents ) ,
9- /* harmony export */ x : ( ) => ( /* binding */ MDXProvider )
10- /* harmony export */ } ) ;
11- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( 96540 ) ;
12- /**
13- * @import {MDXComponents} from 'mdx/types.js'
14- * @import {Component, ReactElement, ReactNode} from 'react'
15- */
16-
17- /**
18- * @callback MergeComponents
19- * Custom merge function.
20- * @param {Readonly<MDXComponents> } currentComponents
21- * Current components from the context.
22- * @returns {MDXComponents }
23- * Additional components.
24- *
25- * @typedef Props
26- * Configuration for `MDXProvider`.
27- * @property {ReactNode | null | undefined } [children]
28- * Children (optional).
29- * @property {Readonly<MDXComponents> | MergeComponents | null | undefined } [components]
30- * Additional components to use or a function that creates them (optional).
31- * @property {boolean | null | undefined } [disableParentContext=false]
32- * Turn off outer component context (default: `false`).
33- */
34-
35-
36-
37- /** @type {Readonly<MDXComponents> } */
38- const emptyComponents = { }
39-
40- const MDXContext = react__WEBPACK_IMPORTED_MODULE_0__ . createContext ( emptyComponents )
41-
42- /**
43- * Get current components from the MDX Context.
44- *
45- * @param {Readonly<MDXComponents> | MergeComponents | null | undefined } [components]
46- * Additional components to use or a function that creates them (optional).
47- * @returns {MDXComponents }
48- * Current components.
49- */
50- function useMDXComponents ( components ) {
51- const contextComponents = react__WEBPACK_IMPORTED_MODULE_0__ . useContext ( MDXContext )
52-
53- // Memoize to avoid unnecessary top-level context changes
54- return react__WEBPACK_IMPORTED_MODULE_0__ . useMemo (
55- function ( ) {
56- // Custom merge via a function prop
57- if ( typeof components === 'function' ) {
58- return components ( contextComponents )
59- }
60-
61- return { ...contextComponents , ...components }
62- } ,
63- [ contextComponents , components ]
64- )
65- }
66-
67- /**
68- * Provider for MDX context.
69- *
70- * @param {Readonly<Props> } properties
71- * Properties.
72- * @returns {ReactElement }
73- * Element.
74- * @satisfies {Component }
75- */
76- function MDXProvider ( properties ) {
77- /** @type {Readonly<MDXComponents> } */
78- let allComponents
79-
80- if ( properties . disableParentContext ) {
81- allComponents =
82- typeof properties . components === 'function'
83- ? properties . components ( emptyComponents )
84- : properties . components || emptyComponents
85- } else {
86- allComponents = useMDXComponents ( properties . components )
87- }
88-
89- return react__WEBPACK_IMPORTED_MODULE_0__ . createElement (
90- MDXContext . Provider ,
91- { value : allComponents } ,
92- properties . children
93- )
94- }
95-
96-
97- /***/ } ) ,
98-
99- /***/ 35035 :
100- /***/ ( ( __unused_webpack_module , __webpack_exports__ , __webpack_require__ ) => {
4+ /***/ 35035
5+ ( __unused_webpack_module , __webpack_exports__ , __webpack_require__ ) {
1016
1027// ESM COMPAT FLAG
1038__webpack_require__ . r ( __webpack_exports__ ) ;
@@ -674,6 +579,101 @@ function MDXContent(props = {}) {
674579
675580
676581
677- /***/ } )
582+ /***/ } ,
583+
584+ /***/ 28453
585+ ( __unused_webpack___webpack_module__ , __webpack_exports__ , __webpack_require__ ) {
586+
587+ /* harmony export */ __webpack_require__ . d ( __webpack_exports__ , {
588+ /* harmony export */ R : ( ) => ( /* binding */ useMDXComponents ) ,
589+ /* harmony export */ x : ( ) => ( /* binding */ MDXProvider )
590+ /* harmony export */ } ) ;
591+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( 96540 ) ;
592+ /**
593+ * @import {MDXComponents} from 'mdx/types.js'
594+ * @import {Component, ReactElement, ReactNode} from 'react'
595+ */
596+
597+ /**
598+ * @callback MergeComponents
599+ * Custom merge function.
600+ * @param {Readonly<MDXComponents> } currentComponents
601+ * Current components from the context.
602+ * @returns {MDXComponents }
603+ * Additional components.
604+ *
605+ * @typedef Props
606+ * Configuration for `MDXProvider`.
607+ * @property {ReactNode | null | undefined } [children]
608+ * Children (optional).
609+ * @property {Readonly<MDXComponents> | MergeComponents | null | undefined } [components]
610+ * Additional components to use or a function that creates them (optional).
611+ * @property {boolean | null | undefined } [disableParentContext=false]
612+ * Turn off outer component context (default: `false`).
613+ */
614+
615+
616+
617+ /** @type {Readonly<MDXComponents> } */
618+ const emptyComponents = { }
619+
620+ const MDXContext = react__WEBPACK_IMPORTED_MODULE_0__ . createContext ( emptyComponents )
621+
622+ /**
623+ * Get current components from the MDX Context.
624+ *
625+ * @param {Readonly<MDXComponents> | MergeComponents | null | undefined } [components]
626+ * Additional components to use or a function that creates them (optional).
627+ * @returns {MDXComponents }
628+ * Current components.
629+ */
630+ function useMDXComponents ( components ) {
631+ const contextComponents = react__WEBPACK_IMPORTED_MODULE_0__ . useContext ( MDXContext )
632+
633+ // Memoize to avoid unnecessary top-level context changes
634+ return react__WEBPACK_IMPORTED_MODULE_0__ . useMemo (
635+ function ( ) {
636+ // Custom merge via a function prop
637+ if ( typeof components === 'function' ) {
638+ return components ( contextComponents )
639+ }
640+
641+ return { ...contextComponents , ...components }
642+ } ,
643+ [ contextComponents , components ]
644+ )
645+ }
646+
647+ /**
648+ * Provider for MDX context.
649+ *
650+ * @param {Readonly<Props> } properties
651+ * Properties.
652+ * @returns {ReactElement }
653+ * Element.
654+ * @satisfies {Component }
655+ */
656+ function MDXProvider ( properties ) {
657+ /** @type {Readonly<MDXComponents> } */
658+ let allComponents
659+
660+ if ( properties . disableParentContext ) {
661+ allComponents =
662+ typeof properties . components === 'function'
663+ ? properties . components ( emptyComponents )
664+ : properties . components || emptyComponents
665+ } else {
666+ allComponents = useMDXComponents ( properties . components )
667+ }
668+
669+ return react__WEBPACK_IMPORTED_MODULE_0__ . createElement (
670+ MDXContext . Provider ,
671+ { value : allComponents } ,
672+ properties . children
673+ )
674+ }
675+
676+
677+ /***/ }
678678
679679} ] ) ;
0 commit comments