1 line
4.8 KiB
JSON
1 line
4.8 KiB
JSON
{"ast":null,"code":"\"use client\";\n\nimport { jsx } from 'react/jsx-runtime';\nimport { useContext, useRef, useMemo } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { DeprecatedLayoutGroupContext } from '../../context/DeprecatedLayoutGroupContext.mjs';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { nodeGroup } from '../../projection/node/group.mjs';\nconst shouldInheritGroup = inherit => inherit === true;\nconst shouldInheritId = inherit => shouldInheritGroup(inherit === true) || inherit === \"id\";\nconst LayoutGroup = ({\n children,\n id,\n inherit = true\n}) => {\n const layoutGroupContext = useContext(LayoutGroupContext);\n const deprecatedLayoutGroupContext = useContext(DeprecatedLayoutGroupContext);\n const [forceRender, key] = useForceUpdate();\n const context = useRef(null);\n const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;\n if (context.current === null) {\n if (shouldInheritId(inherit) && upstreamId) {\n id = id ? upstreamId + \"-\" + id : upstreamId;\n }\n context.current = {\n id,\n group: shouldInheritGroup(inherit) ? layoutGroupContext.group || nodeGroup() : nodeGroup()\n };\n }\n const memoizedContext = useMemo(() => ({\n ...context.current,\n forceRender\n }), [key]);\n return jsx(LayoutGroupContext.Provider, {\n value: memoizedContext,\n children: children\n });\n};\nexport { LayoutGroup };","map":{"version":3,"names":["jsx","useContext","useRef","useMemo","LayoutGroupContext","DeprecatedLayoutGroupContext","useForceUpdate","nodeGroup","shouldInheritGroup","inherit","shouldInheritId","LayoutGroup","children","id","layoutGroupContext","deprecatedLayoutGroupContext","forceRender","key","context","upstreamId","current","group","memoizedContext","Provider","value"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { useContext, useRef, useMemo } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { DeprecatedLayoutGroupContext } from '../../context/DeprecatedLayoutGroupContext.mjs';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { nodeGroup } from '../../projection/node/group.mjs';\n\nconst shouldInheritGroup = (inherit) => inherit === true;\nconst shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === \"id\";\nconst LayoutGroup = ({ children, id, inherit = true }) => {\n const layoutGroupContext = useContext(LayoutGroupContext);\n const deprecatedLayoutGroupContext = useContext(DeprecatedLayoutGroupContext);\n const [forceRender, key] = useForceUpdate();\n const context = useRef(null);\n const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;\n if (context.current === null) {\n if (shouldInheritId(inherit) && upstreamId) {\n id = id ? upstreamId + \"-\" + id : upstreamId;\n }\n context.current = {\n id,\n group: shouldInheritGroup(inherit)\n ? layoutGroupContext.group || nodeGroup()\n : nodeGroup(),\n };\n }\n const memoizedContext = useMemo(() => ({ ...context.current, forceRender }), [key]);\n return (jsx(LayoutGroupContext.Provider, { value: memoizedContext, children: children }));\n};\n\nexport { LayoutGroup };\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,GAAG,QAAQ,mBAAmB;AACvC,SAASC,UAAU,EAAEC,MAAM,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,kBAAkB,QAAQ,sCAAsC;AACzE,SAASC,4BAA4B,QAAQ,gDAAgD;AAC7F,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,SAAS,QAAQ,iCAAiC;AAE3D,MAAMC,kBAAkB,GAAIC,OAAO,IAAKA,OAAO,KAAK,IAAI;AACxD,MAAMC,eAAe,GAAID,OAAO,IAAKD,kBAAkB,CAACC,OAAO,KAAK,IAAI,CAAC,IAAIA,OAAO,KAAK,IAAI;AAC7F,MAAME,WAAW,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,EAAE;EAAEJ,OAAO,GAAG;AAAK,CAAC,KAAK;EACtD,MAAMK,kBAAkB,GAAGb,UAAU,CAACG,kBAAkB,CAA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