@sitecore/sc-contenthub-blok 0.0.91 → 1.0.2
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/dist/Components/BlokBadge/BlokBadge.spec.js +1 -1
- package/dist/Components/BlokBadge/BlokBadge.spec.js.map +1 -1
- package/dist/Components/BlokButton/BlokButton.d.ts +3 -4
- package/dist/Components/BlokButton/BlokButton.js +3 -3
- package/dist/Components/BlokButton/BlokButton.js.map +1 -1
- package/dist/Components/BlokIcon/BlokIcon.d.ts +2 -1
- package/dist/Components/BlokIcon/BlokIcon.js +3 -3
- package/dist/Components/BlokIcon/BlokIcon.js.map +1 -1
- package/dist/Components/BlokIcon/iconNames.d.ts +1 -1
- package/dist/Components/BlokIcon/iconNames.js +1 -0
- package/dist/Components/BlokIcon/iconNames.js.map +1 -1
- package/dist/Components/BlokIconButton/BlokIconButton.d.ts +2 -4
- package/dist/Components/BlokIconButton/BlokIconButton.js +3 -3
- package/dist/Components/BlokIconButton/BlokIconButton.js.map +1 -1
- package/dist/Components/BlokSearchBox/BlokSearchBox.d.ts +3 -2
- package/dist/Components/BlokSearchBox/BlokSearchBox.js +3 -2
- package/dist/Components/BlokSearchBox/BlokSearchBox.js.map +1 -1
- package/dist/Components/BlokTooltip/BlokTooltip.js +0 -4
- package/dist/Components/BlokTooltip/BlokTooltip.js.map +1 -1
- package/esm/Components/BlokButton/BlokButton.js +2 -3
- package/esm/Components/BlokButton/BlokButton.js.map +1 -1
- package/esm/Components/BlokIcon/BlokIcon.js +2 -3
- package/esm/Components/BlokIcon/BlokIcon.js.map +1 -1
- package/esm/Components/BlokIcon/iconNames.js +1 -0
- package/esm/Components/BlokIcon/iconNames.js.map +1 -1
- package/esm/Components/BlokIconButton/BlokIconButton.js +2 -3
- package/esm/Components/BlokIconButton/BlokIconButton.js.map +1 -1
- package/esm/Components/BlokSearchBox/BlokSearchBox.js +3 -3
- package/esm/Components/BlokSearchBox/BlokSearchBox.js.map +1 -1
- package/esm/Components/BlokTooltip/BlokTooltip.js +0 -4
- package/esm/Components/BlokTooltip/BlokTooltip.js.map +1 -1
- package/node_modules/@babel/code-frame/package.json +3 -3
- package/node_modules/@babel/generator/lib/generators/classes.js +7 -4
- package/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
- package/node_modules/@babel/generator/lib/generators/deprecated.js +28 -0
- package/node_modules/@babel/generator/lib/generators/deprecated.js.map +1 -0
- package/node_modules/@babel/generator/lib/generators/expressions.js +17 -12
- package/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
- package/node_modules/@babel/generator/lib/generators/jsx.js +6 -1
- package/node_modules/@babel/generator/lib/generators/jsx.js.map +1 -1
- package/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
- package/node_modules/@babel/generator/lib/generators/modules.js +8 -3
- package/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
- package/node_modules/@babel/generator/lib/generators/statements.js +1 -4
- package/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
- package/node_modules/@babel/generator/lib/generators/template-literals.js +16 -11
- package/node_modules/@babel/generator/lib/generators/template-literals.js.map +1 -1
- package/node_modules/@babel/generator/lib/generators/types.js +4 -9
- package/node_modules/@babel/generator/lib/generators/types.js.map +1 -1
- package/node_modules/@babel/generator/lib/generators/typescript.js +40 -18
- package/node_modules/@babel/generator/lib/generators/typescript.js.map +1 -1
- package/node_modules/@babel/generator/lib/index.js +3 -1
- package/node_modules/@babel/generator/lib/index.js.map +1 -1
- package/node_modules/@babel/generator/lib/node/index.js +11 -8
- package/node_modules/@babel/generator/lib/node/index.js.map +1 -1
- package/node_modules/@babel/generator/lib/node/parentheses.js +44 -7
- package/node_modules/@babel/generator/lib/node/parentheses.js.map +1 -1
- package/node_modules/@babel/generator/lib/printer.js +31 -24
- package/node_modules/@babel/generator/lib/printer.js.map +1 -1
- package/node_modules/@babel/generator/package.json +9 -9
- package/node_modules/@babel/helper-globals/LICENSE +22 -0
- package/node_modules/@babel/helper-globals/README.md +19 -0
- package/node_modules/@babel/helper-globals/data/browser-upper.json +911 -0
- package/node_modules/@babel/helper-globals/data/builtin-lower.json +15 -0
- package/node_modules/@babel/helper-globals/data/builtin-upper.json +51 -0
- package/node_modules/@babel/helper-globals/package.json +32 -0
- package/node_modules/@babel/helper-module-imports/lib/import-builder.js.map +1 -1
- package/node_modules/@babel/helper-module-imports/lib/import-injector.js.map +1 -1
- package/node_modules/@babel/helper-module-imports/package.json +4 -4
- package/node_modules/@babel/helper-string-parser/package.json +1 -1
- package/node_modules/@babel/helper-validator-identifier/package.json +1 -1
- package/node_modules/@babel/parser/bin/babel-parser.js +1 -1
- package/node_modules/@babel/parser/lib/index.js +5814 -5255
- package/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/node_modules/@babel/parser/package.json +7 -7
- package/node_modules/@babel/parser/typings/babel-parser.d.ts +137 -165
- package/node_modules/@babel/template/lib/options.js +1 -1
- package/node_modules/@babel/template/lib/options.js.map +1 -1
- package/node_modules/@babel/template/lib/parse.js +3 -0
- package/node_modules/@babel/template/lib/parse.js.map +1 -1
- package/node_modules/@babel/template/lib/populate.js +2 -1
- package/node_modules/@babel/template/lib/populate.js.map +1 -1
- package/node_modules/@babel/template/package.json +4 -4
- package/node_modules/@babel/traverse/lib/cache.js +10 -16
- package/node_modules/@babel/traverse/lib/cache.js.map +1 -1
- package/node_modules/@babel/traverse/lib/index.js +8 -16
- package/node_modules/@babel/traverse/lib/index.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/ancestry.js +1 -3
- package/node_modules/@babel/traverse/lib/path/ancestry.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/context.js +0 -15
- package/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/conversion.js +7 -4
- package/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/evaluation.js +23 -2
- package/node_modules/@babel/traverse/lib/path/evaluation.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/family.js +13 -7
- package/node_modules/@babel/traverse/lib/path/family.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/index.js +2 -1
- package/node_modules/@babel/traverse/lib/path/index.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/introspection.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/lib/hoister.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/lib/virtual-types.js +1 -1
- package/node_modules/@babel/traverse/lib/path/lib/virtual-types.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/modification.js +3 -2
- package/node_modules/@babel/traverse/lib/path/modification.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/removal.js +2 -1
- package/node_modules/@babel/traverse/lib/path/removal.js.map +1 -1
- package/node_modules/@babel/traverse/lib/path/replacement.js +2 -2
- package/node_modules/@babel/traverse/lib/path/replacement.js.map +1 -1
- package/node_modules/@babel/traverse/lib/scope/binding.js +4 -3
- package/node_modules/@babel/traverse/lib/scope/binding.js.map +1 -1
- package/node_modules/@babel/traverse/lib/scope/index.js +99 -39
- package/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
- package/node_modules/@babel/traverse/lib/traverse-node.js +109 -0
- package/node_modules/@babel/traverse/lib/traverse-node.js.map +1 -1
- package/node_modules/@babel/traverse/lib/types.js +1 -1
- package/node_modules/@babel/traverse/lib/visitors.js +6 -4
- package/node_modules/@babel/traverse/lib/visitors.js.map +1 -1
- package/node_modules/@babel/traverse/package.json +10 -10
- package/node_modules/@babel/types/lib/asserts/generated/index.js +19 -3
- package/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
- package/node_modules/@babel/types/lib/ast-types/generated/index.js +1 -1
- package/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
- package/node_modules/@babel/types/lib/builders/generated/index.js +22 -2858
- package/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
- package/node_modules/@babel/types/lib/builders/generated/lowercase.js +2896 -0
- package/node_modules/@babel/types/lib/builders/generated/lowercase.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/generated/uppercase.js +267 -1525
- package/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
- package/node_modules/@babel/types/lib/constants/generated/index.js +2 -1
- package/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
- package/node_modules/@babel/types/lib/constants/index.js +5 -3
- package/node_modules/@babel/types/lib/constants/index.js.map +1 -1
- package/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
- package/node_modules/@babel/types/lib/converters/toExpression.js +1 -0
- package/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
- package/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
- package/node_modules/@babel/types/lib/converters/valueToNode.js +16 -3
- package/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/core.js +73 -44
- package/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/experimental.js +3 -11
- package/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/flow.js +6 -3
- package/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/index.js +13 -0
- package/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/jsx.js +9 -4
- package/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/typescript.js +56 -28
- package/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/utils.js +37 -15
- package/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
- package/node_modules/@babel/types/lib/index-legacy.d.ts +72 -41
- package/node_modules/@babel/types/lib/index.d.ts +1699 -1655
- package/node_modules/@babel/types/lib/index.js +10 -21
- package/node_modules/@babel/types/lib/index.js.flow +72 -42
- package/node_modules/@babel/types/lib/index.js.map +1 -1
- package/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +9 -8
- package/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
- package/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +1 -0
- package/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
- package/node_modules/@babel/types/lib/traverse/traverseFast.js +19 -5
- package/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
- package/node_modules/@babel/types/lib/utils/deprecationWarning.js +3 -3
- package/node_modules/@babel/types/lib/utils/deprecationWarning.js.map +1 -1
- package/node_modules/@babel/types/lib/validators/generated/index.js +50 -5
- package/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
- package/node_modules/@babel/types/lib/validators/isLet.js +6 -2
- package/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
- package/node_modules/@babel/types/lib/validators/isPlaceholderType.js +1 -5
- package/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
- package/node_modules/@babel/types/lib/validators/isType.js +1 -6
- package/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
- package/node_modules/@babel/types/lib/validators/isVar.js +8 -4
- package/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
- package/node_modules/@babel/types/lib/validators/matchesPattern.js +10 -2
- package/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
- package/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
- package/node_modules/@babel/types/package.json +14 -14
- package/node_modules/@emotion/cache/dist/declarations/src/index.d.ts +16 -2
- package/node_modules/@emotion/cache/dist/declarations/src/types.d.ts +14 -0
- package/node_modules/@emotion/cache/dist/emotion-cache.browser.cjs.js +7 -36
- package/node_modules/@emotion/cache/dist/emotion-cache.browser.development.cjs.js +10 -43
- package/node_modules/@emotion/cache/dist/emotion-cache.browser.development.esm.js +10 -43
- package/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +7 -36
- package/node_modules/@emotion/cache/dist/emotion-cache.cjs.js +11 -73
- package/node_modules/@emotion/cache/dist/emotion-cache.development.cjs.js +15 -81
- package/node_modules/@emotion/cache/dist/emotion-cache.development.edge-light.cjs.js +50 -60
- package/node_modules/@emotion/cache/dist/emotion-cache.development.edge-light.esm.js +51 -61
- package/node_modules/@emotion/cache/dist/emotion-cache.development.esm.js +15 -81
- package/node_modules/@emotion/cache/dist/emotion-cache.edge-light.cjs.js +28 -56
- package/node_modules/@emotion/cache/dist/emotion-cache.edge-light.esm.js +29 -57
- package/node_modules/@emotion/cache/dist/emotion-cache.esm.js +11 -73
- package/node_modules/@emotion/cache/package.json +11 -11
- package/node_modules/@emotion/cache/src/{index.js → index.ts} +39 -55
- package/node_modules/@emotion/cache/src/{prefixer.js → prefixer.ts} +11 -4
- package/node_modules/@emotion/cache/src/{stylis-plugins.js → stylis-plugins.ts} +91 -83
- package/node_modules/@emotion/cache/src/{types.js → types.ts} +4 -5
- package/node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.umd.min.js.map +1 -1
- package/node_modules/@emotion/react/_isolated-hnrs/package.json +1 -0
- package/node_modules/@emotion/react/dist/declarations/src/_isolated-hnrs.d.ts +3 -3
- package/node_modules/@emotion/react/dist/declarations/src/class-names.d.ts +18 -0
- package/node_modules/@emotion/react/dist/declarations/src/context.d.ts +6 -0
- package/node_modules/@emotion/react/dist/declarations/src/css.d.ts +5 -0
- package/node_modules/@emotion/react/dist/declarations/src/global.d.ts +7 -0
- package/node_modules/@emotion/react/dist/declarations/src/index.d.ts +14 -1
- package/node_modules/@emotion/react/dist/declarations/src/jsx-dev-runtime.d.ts +6 -1
- package/node_modules/@emotion/react/dist/declarations/src/jsx-namespace.d.ts +64 -0
- package/node_modules/@emotion/react/dist/declarations/src/jsx-runtime.d.ts +7 -1
- package/node_modules/@emotion/react/dist/declarations/src/jsx.d.ts +22 -0
- package/node_modules/@emotion/react/dist/declarations/src/keyframes.d.ts +10 -0
- package/node_modules/@emotion/react/dist/declarations/src/theming.d.ts +28 -0
- package/node_modules/@emotion/react/dist/declarations/src/types.d.ts +7 -0
- package/node_modules/@emotion/react/dist/{emotion-element-f66136f5.development.edge-light.cjs.js → emotion-element-010f37fa.development.edge-light.cjs.js} +23 -84
- package/node_modules/@emotion/react/dist/{emotion-element-832b737b.browser.cjs.js → emotion-element-25f9958c.browser.cjs.js} +20 -65
- package/node_modules/@emotion/react/dist/{emotion-element-7447be04.browser.development.cjs.js → emotion-element-4787f564.browser.development.cjs.js} +21 -74
- package/node_modules/@emotion/react/dist/{emotion-element-7a1343fa.browser.development.esm.js → emotion-element-489459f2.browser.development.esm.js} +21 -74
- package/node_modules/@emotion/react/dist/{emotion-element-efb2998a.development.edge-light.esm.js → emotion-element-516430c7.development.edge-light.esm.js} +23 -84
- package/node_modules/@emotion/react/dist/{emotion-element-ba80abe0.development.esm.js → emotion-element-782f682d.development.esm.js} +23 -84
- package/node_modules/@emotion/react/dist/{emotion-element-657efc1f.edge-light.esm.js → emotion-element-8113875a.edge-light.esm.js} +22 -75
- package/node_modules/@emotion/react/dist/{emotion-element-b1930563.cjs.js → emotion-element-a1829a1e.cjs.js} +22 -75
- package/node_modules/@emotion/react/dist/{emotion-element-60389d2b.edge-light.cjs.js → emotion-element-af3dc15b.edge-light.cjs.js} +22 -75
- package/node_modules/@emotion/react/dist/{emotion-element-b4c8b265.esm.js → emotion-element-d59e098f.esm.js} +22 -75
- package/node_modules/@emotion/react/dist/{emotion-element-9150ebbd.development.cjs.js → emotion-element-e8f4cc37.development.cjs.js} +23 -84
- package/node_modules/@emotion/react/dist/{emotion-element-5486c51c.browser.esm.js → emotion-element-f0de968e.browser.esm.js} +20 -65
- package/node_modules/@emotion/react/dist/emotion-react.browser.cjs.js +19 -75
- package/node_modules/@emotion/react/dist/emotion-react.browser.development.cjs.js +38 -102
- package/node_modules/@emotion/react/dist/emotion-react.browser.development.esm.js +38 -101
- package/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +19 -74
- package/node_modules/@emotion/react/dist/emotion-react.cjs.js +19 -75
- package/node_modules/@emotion/react/dist/emotion-react.development.cjs.js +38 -102
- package/node_modules/@emotion/react/dist/emotion-react.development.edge-light.cjs.js +37 -99
- package/node_modules/@emotion/react/dist/emotion-react.development.edge-light.esm.js +37 -98
- package/node_modules/@emotion/react/dist/emotion-react.development.esm.js +38 -101
- package/node_modules/@emotion/react/dist/emotion-react.edge-light.cjs.js +18 -72
- package/node_modules/@emotion/react/dist/emotion-react.edge-light.esm.js +18 -71
- package/node_modules/@emotion/react/dist/emotion-react.esm.js +19 -74
- package/node_modules/@emotion/react/dist/emotion-react.umd.min.js +1 -1
- package/node_modules/@emotion/react/dist/emotion-react.umd.min.js.map +1 -1
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.cjs.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.esm.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.esm.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js +3 -3
- package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.umd.min.js.map +1 -1
- package/node_modules/@emotion/react/jsx-dev-runtime/package.json +1 -1
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.cjs.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.cjs.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.esm.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.esm.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js +5 -5
- package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.umd.min.js.map +1 -1
- package/node_modules/@emotion/react/jsx-runtime/package.json +1 -1
- package/node_modules/@emotion/react/package.json +19 -18
- package/node_modules/@emotion/react/src/{_isolated-hnrs.js → _isolated-hnrs.ts} +7 -2
- package/node_modules/@emotion/react/src/{class-names.js → class-names.tsx} +43 -32
- package/node_modules/@emotion/react/src/{context.js → context.tsx} +25 -22
- package/node_modules/@emotion/react/src/css.ts +14 -0
- package/node_modules/@emotion/react/src/{emotion-element.js → emotion-element.tsx} +37 -17
- package/node_modules/@emotion/react/src/{get-label-from-stack-trace.js → get-label-from-stack-trace.ts} +7 -4
- package/node_modules/@emotion/react/src/global.tsx +147 -0
- package/node_modules/@emotion/react/src/{index.js → index.ts} +24 -3
- package/node_modules/@emotion/react/src/{jsx-dev-runtime.js → jsx-dev-runtime.ts} +12 -2
- package/node_modules/@emotion/react/src/jsx-namespace.ts +107 -0
- package/node_modules/@emotion/react/src/jsx-runtime.ts +32 -0
- package/node_modules/@emotion/react/src/jsx.ts +45 -0
- package/node_modules/@emotion/react/src/keyframes.ts +27 -0
- package/node_modules/@emotion/react/src/{theming.js → theming.tsx} +40 -18
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.cjs.js +19 -92
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.development.cjs.js +22 -94
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.development.esm.js +22 -94
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js +19 -92
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.cjs.js +20 -93
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.cjs.js +23 -95
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.edge-light.cjs.js +22 -94
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.edge-light.esm.js +22 -94
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.esm.js +24 -96
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.edge-light.cjs.js +19 -92
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.edge-light.esm.js +19 -92
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js +21 -94
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.umd.min.js +1 -1
- package/node_modules/@emotion/styled/base/dist/emotion-styled-base.umd.min.js.map +1 -1
- package/node_modules/@emotion/styled/base/package.json +1 -1
- package/node_modules/@emotion/styled/dist/declarations/src/base.d.ts +4 -2
- package/node_modules/@emotion/styled/dist/declarations/src/index.d.ts +15 -2
- package/node_modules/@emotion/styled/dist/declarations/src/jsx-namespace.d.ts +5 -0
- package/node_modules/@emotion/styled/dist/declarations/src/types.d.ts +88 -0
- package/node_modules/@emotion/styled/dist/emotion-styled.browser.cjs.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.browser.development.cjs.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.browser.development.esm.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.cjs.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.development.cjs.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.development.edge-light.cjs.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.development.edge-light.esm.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.development.esm.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.edge-light.cjs.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.edge-light.esm.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.esm.js +7 -6
- package/node_modules/@emotion/styled/dist/emotion-styled.umd.min.js +1 -1
- package/node_modules/@emotion/styled/dist/emotion-styled.umd.min.js.map +1 -1
- package/node_modules/@emotion/styled/package.json +13 -14
- package/node_modules/@emotion/styled/src/{base.js → base.tsx} +56 -42
- package/node_modules/@emotion/styled/{types/index.d.ts → src/index.ts} +21 -12
- package/node_modules/@emotion/styled/{dist/declarations/types/jsx-namespace.d.ts → src/jsx-namespace.ts} +3 -5
- package/node_modules/@emotion/styled/src/{tags.js → tags.ts} +1 -1
- package/node_modules/@emotion/styled/{types/base.d.ts → src/types.ts} +8 -15
- package/node_modules/@emotion/styled/src/utils.ts +38 -0
- package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/declarations/src/index.d.ts +3 -0
- package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.cjs.d.mts +2 -0
- package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.cjs.d.ts +2 -0
- package/node_modules/@emotion/use-insertion-effect-with-fallbacks/package.json +7 -6
- package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/index.ts +21 -0
- package/node_modules/@jridgewell/gen-mapping/LICENSE +1 -1
- package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +256 -194
- package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map +6 -1
- package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js +339 -239
- package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map +6 -1
- package/node_modules/@jridgewell/gen-mapping/package.json +46 -51
- package/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts +614 -0
- package/node_modules/@jridgewell/gen-mapping/src/set-array.ts +82 -0
- package/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts +16 -0
- package/node_modules/@jridgewell/gen-mapping/src/types.ts +61 -0
- package/node_modules/@jridgewell/gen-mapping/{dist/types/gen-mapping.d.ts → types/gen-mapping.d.cts} +3 -2
- package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map +1 -0
- package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts +89 -0
- package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map +1 -0
- package/node_modules/@jridgewell/{set-array/dist/types/set-array.d.ts → gen-mapping/types/set-array.d.cts} +2 -1
- package/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map +1 -0
- package/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts +33 -0
- package/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map +1 -0
- package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts +13 -0
- package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map +1 -0
- package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts +13 -0
- package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map +1 -0
- package/node_modules/@jridgewell/gen-mapping/{dist/types/types.d.ts → types/types.d.cts} +10 -2
- package/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map +1 -0
- package/node_modules/@jridgewell/gen-mapping/types/types.d.mts +44 -0
- package/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/LICENSE +1 -1
- package/node_modules/@jridgewell/trace-mapping/README.md +160 -69
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +417 -493
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +6 -1
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +546 -588
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +6 -1
- package/node_modules/@jridgewell/trace-mapping/package.json +43 -49
- package/node_modules/@jridgewell/trace-mapping/src/binary-search.ts +115 -0
- package/node_modules/@jridgewell/trace-mapping/src/by-source.ts +65 -0
- package/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts +192 -0
- package/node_modules/@jridgewell/trace-mapping/src/resolve.ts +16 -0
- package/node_modules/@jridgewell/trace-mapping/src/sort.ts +45 -0
- package/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts +23 -0
- package/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts +8 -0
- package/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts +504 -0
- package/node_modules/@jridgewell/trace-mapping/src/types.ts +114 -0
- package/node_modules/@jridgewell/trace-mapping/{dist/types/binary-search.d.ts → types/binary-search.d.cts} +2 -1
- package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts +33 -0
- package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts +8 -0
- package/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/{dist/types/by-source.d.ts → types/by-source.d.mts} +3 -2
- package/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts +9 -0
- package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts +9 -0
- package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts +4 -0
- package/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts +4 -0
- package/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/sort.d.cts +3 -0
- package/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/{dist/types/sort.d.ts → types/sort.d.mts} +2 -1
- package/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/{dist/types/sourcemap-segment.d.ts → types/sourcemap-segment.d.cts} +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts +17 -0
- package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts +5 -0
- package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/{dist/types/strip-filename.d.ts → types/strip-filename.d.mts} +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/{dist/types/trace-mapping.d.ts → types/trace-mapping.d.cts} +7 -6
- package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts +80 -0
- package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/{dist/types/types.d.ts → types/types.d.cts} +10 -2
- package/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map +1 -0
- package/node_modules/@jridgewell/trace-mapping/types/types.d.mts +107 -0
- package/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map +1 -0
- package/node_modules/@mui/core-downloads-tracker/package.json +1 -1
- package/node_modules/@mui/material/Accordion/Accordion.d.ts +32 -15
- package/node_modules/@mui/material/Accordion/Accordion.js +18 -6
- package/node_modules/@mui/material/AccordionActions/AccordionActions.d.ts +2 -2
- package/node_modules/@mui/material/AccordionDetails/AccordionDetails.d.ts +2 -2
- package/node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts +62 -7
- package/node_modules/@mui/material/AccordionSummary/AccordionSummary.js +67 -16
- package/node_modules/@mui/material/Alert/Alert.d.ts +6 -18
- package/node_modules/@mui/material/AlertTitle/AlertTitle.d.ts +3 -3
- package/node_modules/@mui/material/AppBar/AppBar.d.ts +4 -4
- package/node_modules/@mui/material/Autocomplete/Autocomplete.d.ts +2 -2
- package/node_modules/@mui/material/Autocomplete/Autocomplete.js +1 -1
- package/node_modules/@mui/material/Avatar/Avatar.d.ts +2 -2
- package/node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/node_modules/@mui/material/AvatarGroup/AvatarGroup.js +10 -2
- package/node_modules/@mui/material/Backdrop/Backdrop.d.ts +17 -15
- package/node_modules/@mui/material/Badge/Badge.d.ts +35 -31
- package/node_modules/@mui/material/Badge/Badge.js +27 -20
- package/node_modules/@mui/material/BottomNavigation/BottomNavigation.d.ts +2 -2
- package/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.d.ts +43 -6
- package/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/node_modules/@mui/material/Box/Box.d.ts +2 -2
- package/node_modules/@mui/material/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
- package/node_modules/@mui/material/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/node_modules/@mui/material/Button/Button.d.ts +4 -4
- package/node_modules/@mui/material/Button/Button.js +3 -3
- package/node_modules/@mui/material/ButtonBase/ButtonBase.d.ts +2 -2
- package/node_modules/@mui/material/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/node_modules/@mui/material/CHANGELOG.md +345 -0
- package/node_modules/@mui/material/Card/Card.d.ts +4 -4
- package/node_modules/@mui/material/CardActionArea/CardActionArea.d.ts +43 -6
- package/node_modules/@mui/material/CardActionArea/CardActionArea.js +47 -8
- package/node_modules/@mui/material/CardActions/CardActions.d.ts +2 -2
- package/node_modules/@mui/material/CardContent/CardContent.d.ts +2 -2
- package/node_modules/@mui/material/CardHeader/CardHeader.d.ts +6 -22
- package/node_modules/@mui/material/CardMedia/CardMedia.d.ts +2 -2
- package/node_modules/@mui/material/Checkbox/Checkbox.d.ts +49 -13
- package/node_modules/@mui/material/Checkbox/Checkbox.js +51 -21
- package/node_modules/@mui/material/Chip/Chip.d.ts +2 -2
- package/node_modules/@mui/material/CircularProgress/CircularProgress.d.ts +7 -3
- package/node_modules/@mui/material/ClickAwayListener/ClickAwayListener.d.ts +3 -3
- package/node_modules/@mui/material/ClickAwayListener/ClickAwayListener.js +3 -3
- package/node_modules/@mui/material/Collapse/Collapse.d.ts +5 -5
- package/node_modules/@mui/material/Container/Container.d.ts +2 -2
- package/node_modules/@mui/material/CssBaseline/CssBaseline.d.ts +2 -2
- package/node_modules/@mui/material/Dialog/Dialog.d.ts +7 -7
- package/node_modules/@mui/material/Dialog/dialogClasses.d.ts +6 -2
- package/node_modules/@mui/material/DialogActions/DialogActions.d.ts +2 -2
- package/node_modules/@mui/material/DialogContent/DialogContent.d.ts +2 -2
- package/node_modules/@mui/material/DialogContentText/DialogContentText.d.ts +3 -3
- package/node_modules/@mui/material/DialogTitle/DialogTitle.d.ts +3 -3
- package/node_modules/@mui/material/Divider/Divider.d.ts +3 -3
- package/node_modules/@mui/material/Drawer/Drawer.d.ts +95 -4
- package/node_modules/@mui/material/Drawer/Drawer.js +108 -36
- package/node_modules/@mui/material/Fab/Fab.d.ts +3 -3
- package/node_modules/@mui/material/Fade/Fade.d.ts +3 -3
- package/node_modules/@mui/material/FilledInput/FilledInput.d.ts +3 -3
- package/node_modules/@mui/material/FormControl/FormControl.d.ts +6 -6
- package/node_modules/@mui/material/FormControlLabel/FormControlLabel.d.ts +4 -4
- package/node_modules/@mui/material/FormGroup/FormGroup.d.ts +3 -3
- package/node_modules/@mui/material/FormHelperText/FormHelperText.d.ts +2 -2
- package/node_modules/@mui/material/FormLabel/FormLabel.d.ts +4 -4
- package/node_modules/@mui/material/GlobalStyles/GlobalStyles.d.ts +2 -2
- package/node_modules/@mui/material/Grid/Grid.d.ts +2 -2
- package/node_modules/@mui/material/Grid2/Grid2.d.ts +2 -2
- package/node_modules/@mui/material/Grid2/Grid2.js +2 -2
- package/node_modules/@mui/material/Grow/Grow.d.ts +5 -5
- package/node_modules/@mui/material/Hidden/Hidden.d.ts +2 -2
- package/node_modules/@mui/material/Icon/Icon.d.ts +3 -3
- package/node_modules/@mui/material/IconButton/IconButton.d.ts +4 -4
- package/node_modules/@mui/material/IconButton/IconButton.js +3 -3
- package/node_modules/@mui/material/ImageList/ImageList.d.ts +2 -2
- package/node_modules/@mui/material/ImageListItem/ImageListItem.d.ts +2 -2
- package/node_modules/@mui/material/ImageListItemBar/ImageListItemBar.d.ts +2 -2
- package/node_modules/@mui/material/Input/Input.d.ts +3 -3
- package/node_modules/@mui/material/InputAdornment/InputAdornment.d.ts +2 -2
- package/node_modules/@mui/material/InputBase/InputBase.d.ts +2 -2
- package/node_modules/@mui/material/InputBase/inputBaseClasses.d.ts +15 -6
- package/node_modules/@mui/material/InputLabel/InputLabel.d.ts +3 -3
- package/node_modules/@mui/material/LinearProgress/LinearProgress.d.ts +7 -3
- package/node_modules/@mui/material/Link/Link.d.ts +4 -4
- package/node_modules/@mui/material/List/List.d.ts +3 -3
- package/node_modules/@mui/material/ListItem/ListItem.d.ts +3 -3
- package/node_modules/@mui/material/ListItemAvatar/ListItemAvatar.d.ts +2 -2
- package/node_modules/@mui/material/ListItemButton/ListItemButton.d.ts +3 -3
- package/node_modules/@mui/material/ListItemIcon/ListItemIcon.d.ts +2 -2
- package/node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
- package/node_modules/@mui/material/ListItemText/ListItemText.d.ts +12 -2
- package/node_modules/@mui/material/ListItemText/ListItemText.js +14 -5
- package/node_modules/@mui/material/ListSubheader/ListSubheader.d.ts +2 -2
- package/node_modules/@mui/material/Menu/Menu.d.ts +92 -5
- package/node_modules/@mui/material/Menu/Menu.js +58 -19
- package/node_modules/@mui/material/MenuItem/MenuItem.d.ts +3 -3
- package/node_modules/@mui/material/MenuList/MenuList.d.ts +4 -4
- package/node_modules/@mui/material/MobileStepper/MobileStepper.d.ts +72 -4
- package/node_modules/@mui/material/MobileStepper/MobileStepper.js +76 -18
- package/node_modules/@mui/material/Modal/Modal.d.ts +7 -7
- package/node_modules/@mui/material/Modal/Modal.js +9 -10
- package/node_modules/@mui/material/NativeSelect/NativeSelect.d.ts +3 -3
- package/node_modules/@mui/material/NativeSelect/NativeSelectInput.js +6 -2
- package/node_modules/@mui/material/NoSsr/NoSsr.d.ts +2 -2
- package/node_modules/@mui/material/NoSsr/NoSsr.js +2 -2
- package/node_modules/@mui/material/OutlinedInput/NotchedOutline.js +2 -0
- package/node_modules/@mui/material/OutlinedInput/OutlinedInput.d.ts +32 -5
- package/node_modules/@mui/material/OutlinedInput/OutlinedInput.js +30 -10
- package/node_modules/@mui/material/OverridableComponent/index.d.ts +41 -0
- package/node_modules/@mui/material/OverridableComponent/index.js +1 -0
- package/node_modules/@mui/material/OverridableComponent/package.json +6 -0
- package/node_modules/@mui/material/Pagination/Pagination.d.ts +2 -2
- package/node_modules/@mui/material/PaginationItem/PaginationItem.d.ts +3 -3
- package/node_modules/@mui/material/Paper/Paper.d.ts +3 -3
- package/node_modules/@mui/material/PigmentContainer/PigmentContainer.d.ts +2 -2
- package/node_modules/@mui/material/PigmentContainer/PigmentContainer.js +2 -2
- package/node_modules/@mui/material/PigmentGrid/PigmentGrid.d.ts +2 -2
- package/node_modules/@mui/material/PigmentGrid/PigmentGrid.js +2 -2
- package/node_modules/@mui/material/PigmentHidden/PigmentHidden.d.ts +2 -2
- package/node_modules/@mui/material/PigmentHidden/PigmentHidden.js +2 -2
- package/node_modules/@mui/material/PigmentStack/PigmentStack.d.ts +2 -2
- package/node_modules/@mui/material/PigmentStack/PigmentStack.js +2 -2
- package/node_modules/@mui/material/Popover/Popover.d.ts +65 -12
- package/node_modules/@mui/material/Popover/Popover.js +79 -52
- package/node_modules/@mui/material/Popper/Popper.d.ts +4 -4
- package/node_modules/@mui/material/Popper/Popper.js +4 -4
- package/node_modules/@mui/material/Portal/Portal.d.ts +2 -2
- package/node_modules/@mui/material/Portal/Portal.js +2 -2
- package/node_modules/@mui/material/README.md +4 -2
- package/node_modules/@mui/material/Radio/Radio.d.ts +48 -4
- package/node_modules/@mui/material/Radio/Radio.js +61 -16
- package/node_modules/@mui/material/Radio/RadioButtonIcon.js +7 -2
- package/node_modules/@mui/material/RadioGroup/RadioGroup.d.ts +3 -3
- package/node_modules/@mui/material/Rating/Rating.d.ts +61 -3
- package/node_modules/@mui/material/Rating/Rating.js +131 -45
- package/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
- package/node_modules/@mui/material/Select/Select.d.ts +3 -3
- package/node_modules/@mui/material/Select/SelectInput.js +8 -8
- package/node_modules/@mui/material/Skeleton/Skeleton.d.ts +2 -2
- package/node_modules/@mui/material/Slide/Slide.d.ts +4 -4
- package/node_modules/@mui/material/Slider/Slider.d.ts +2 -2
- package/node_modules/@mui/material/Slider/sliderClasses.d.ts +21 -7
- package/node_modules/@mui/material/Slider/useSlider.js +2 -2
- package/node_modules/@mui/material/Snackbar/Snackbar.d.ts +81 -4
- package/node_modules/@mui/material/Snackbar/Snackbar.js +116 -32
- package/node_modules/@mui/material/SnackbarContent/SnackbarContent.d.ts +3 -3
- package/node_modules/@mui/material/SpeedDial/SpeedDial.d.ts +20 -8
- package/node_modules/@mui/material/SpeedDial/SpeedDial.js +40 -11
- package/node_modules/@mui/material/SpeedDialAction/SpeedDialAction.d.ts +85 -4
- package/node_modules/@mui/material/SpeedDialAction/SpeedDialAction.js +109 -31
- package/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
- package/node_modules/@mui/material/Stack/Stack.d.ts +2 -2
- package/node_modules/@mui/material/Step/Step.d.ts +2 -2
- package/node_modules/@mui/material/StepButton/StepButton.d.ts +3 -3
- package/node_modules/@mui/material/StepConnector/StepConnector.d.ts +2 -2
- package/node_modules/@mui/material/StepContent/StepContent.d.ts +4 -4
- package/node_modules/@mui/material/StepIcon/StepIcon.d.ts +3 -3
- package/node_modules/@mui/material/StepLabel/StepLabel.d.ts +21 -3
- package/node_modules/@mui/material/StepLabel/StepLabel.js +14 -5
- package/node_modules/@mui/material/Stepper/Stepper.d.ts +2 -2
- package/node_modules/@mui/material/SvgIcon/SvgIcon.d.ts +3 -3
- package/node_modules/@mui/material/SwipeableDrawer/SwipeArea.js +1 -0
- package/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.d.ts +31 -5
- package/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.js +60 -13
- package/node_modules/@mui/material/Switch/Switch.d.ts +78 -5
- package/node_modules/@mui/material/Switch/Switch.js +73 -9
- package/node_modules/@mui/material/Tab/Tab.d.ts +3 -3
- package/node_modules/@mui/material/TabScrollButton/TabScrollButton.d.ts +2 -2
- package/node_modules/@mui/material/Table/Table.d.ts +2 -2
- package/node_modules/@mui/material/TableBody/TableBody.d.ts +2 -2
- package/node_modules/@mui/material/TableCell/TableCell.d.ts +2 -2
- package/node_modules/@mui/material/TableContainer/TableContainer.d.ts +2 -2
- package/node_modules/@mui/material/TableFooter/TableFooter.d.ts +2 -2
- package/node_modules/@mui/material/TableHead/TableHead.d.ts +2 -2
- package/node_modules/@mui/material/TablePagination/TablePagination.d.ts +4 -4
- package/node_modules/@mui/material/TableRow/TableRow.d.ts +2 -2
- package/node_modules/@mui/material/TableSortLabel/TableSortLabel.d.ts +3 -3
- package/node_modules/@mui/material/Tabs/Tabs.d.ts +131 -31
- package/node_modules/@mui/material/Tabs/Tabs.js +124 -52
- package/node_modules/@mui/material/Tabs/tabsClasses.d.ts +4 -0
- package/node_modules/@mui/material/Tabs/tabsClasses.js +1 -1
- package/node_modules/@mui/material/TextField/TextField.d.ts +40 -10
- package/node_modules/@mui/material/TextField/TextField.js +22 -11
- package/node_modules/@mui/material/TextareaAutosize/TextareaAutosize.d.ts +2 -2
- package/node_modules/@mui/material/TextareaAutosize/TextareaAutosize.js +68 -47
- package/node_modules/@mui/material/ToggleButton/ToggleButton.d.ts +3 -3
- package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
- package/node_modules/@mui/material/Toolbar/Toolbar.d.ts +2 -2
- package/node_modules/@mui/material/Tooltip/Tooltip.d.ts +23 -27
- package/node_modules/@mui/material/Tooltip/Tooltip.js +1 -1
- package/node_modules/@mui/material/Typography/Typography.d.ts +3 -3
- package/node_modules/@mui/material/Zoom/Zoom.d.ts +3 -3
- package/node_modules/@mui/material/index.js +1 -1
- package/node_modules/@mui/material/internal/SwitchBase.d.ts +35 -1
- package/node_modules/@mui/material/internal/SwitchBase.js +88 -31
- package/node_modules/@mui/material/modern/Accordion/Accordion.js +18 -6
- package/node_modules/@mui/material/modern/AccordionSummary/AccordionSummary.js +67 -16
- package/node_modules/@mui/material/modern/Autocomplete/Autocomplete.js +1 -1
- package/node_modules/@mui/material/modern/AvatarGroup/AvatarGroup.js +10 -2
- package/node_modules/@mui/material/modern/Badge/Badge.js +27 -20
- package/node_modules/@mui/material/modern/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/node_modules/@mui/material/modern/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
- package/node_modules/@mui/material/modern/Button/Button.js +3 -3
- package/node_modules/@mui/material/modern/CardActionArea/CardActionArea.js +47 -8
- package/node_modules/@mui/material/modern/Checkbox/Checkbox.js +51 -21
- package/node_modules/@mui/material/modern/ClickAwayListener/ClickAwayListener.js +3 -3
- package/node_modules/@mui/material/modern/Drawer/Drawer.js +108 -36
- package/node_modules/@mui/material/modern/Grid2/Grid2.js +2 -2
- package/node_modules/@mui/material/modern/IconButton/IconButton.js +3 -3
- package/node_modules/@mui/material/modern/ListItemText/ListItemText.js +14 -5
- package/node_modules/@mui/material/modern/Menu/Menu.js +58 -19
- package/node_modules/@mui/material/modern/MobileStepper/MobileStepper.js +76 -18
- package/node_modules/@mui/material/modern/Modal/Modal.js +9 -10
- package/node_modules/@mui/material/modern/NativeSelect/NativeSelectInput.js +6 -2
- package/node_modules/@mui/material/modern/NoSsr/NoSsr.js +2 -2
- package/node_modules/@mui/material/modern/OutlinedInput/NotchedOutline.js +2 -0
- package/node_modules/@mui/material/modern/OutlinedInput/OutlinedInput.js +30 -10
- package/node_modules/@mui/material/modern/OverridableComponent/index.js +1 -0
- package/node_modules/@mui/material/modern/PigmentContainer/PigmentContainer.js +2 -2
- package/node_modules/@mui/material/modern/PigmentGrid/PigmentGrid.js +2 -2
- package/node_modules/@mui/material/modern/PigmentHidden/PigmentHidden.js +2 -2
- package/node_modules/@mui/material/modern/PigmentStack/PigmentStack.js +2 -2
- package/node_modules/@mui/material/modern/Popover/Popover.js +79 -52
- package/node_modules/@mui/material/modern/Popper/Popper.js +4 -4
- package/node_modules/@mui/material/modern/Portal/Portal.js +2 -2
- package/node_modules/@mui/material/modern/Radio/Radio.js +61 -16
- package/node_modules/@mui/material/modern/Radio/RadioButtonIcon.js +7 -2
- package/node_modules/@mui/material/modern/Rating/Rating.js +131 -45
- package/node_modules/@mui/material/modern/Select/SelectInput.js +8 -8
- package/node_modules/@mui/material/modern/Slider/useSlider.js +2 -2
- package/node_modules/@mui/material/modern/Snackbar/Snackbar.js +116 -32
- package/node_modules/@mui/material/modern/SpeedDial/SpeedDial.js +40 -11
- package/node_modules/@mui/material/modern/SpeedDialAction/SpeedDialAction.js +109 -31
- package/node_modules/@mui/material/modern/StepLabel/StepLabel.js +14 -5
- package/node_modules/@mui/material/modern/SwipeableDrawer/SwipeArea.js +1 -0
- package/node_modules/@mui/material/modern/SwipeableDrawer/SwipeableDrawer.js +60 -13
- package/node_modules/@mui/material/modern/Switch/Switch.js +73 -9
- package/node_modules/@mui/material/modern/Tabs/Tabs.js +124 -52
- package/node_modules/@mui/material/modern/Tabs/tabsClasses.js +1 -1
- package/node_modules/@mui/material/modern/TextField/TextField.js +22 -11
- package/node_modules/@mui/material/modern/TextareaAutosize/TextareaAutosize.js +68 -47
- package/node_modules/@mui/material/modern/Tooltip/Tooltip.js +1 -1
- package/node_modules/@mui/material/modern/index.js +1 -1
- package/node_modules/@mui/material/modern/internal/SwitchBase.js +88 -31
- package/node_modules/@mui/material/modern/styles/ThemeProvider.js +20 -9
- package/node_modules/@mui/material/modern/styles/components.js +1 -0
- package/node_modules/@mui/material/modern/styles/createThemeNoVars.js +5 -2
- package/node_modules/@mui/material/modern/styles/overrides.js +1 -0
- package/node_modules/@mui/material/modern/styles/props.js +1 -0
- package/node_modules/@mui/material/modern/styles/shouldSkipGeneratingVar.js +1 -1
- package/node_modules/@mui/material/modern/styles/variants.js +1 -0
- package/node_modules/@mui/material/modern/useAutocomplete/useAutocomplete.js +16 -14
- package/node_modules/@mui/material/modern/useScrollTrigger/useScrollTrigger.js +3 -0
- package/node_modules/@mui/material/modern/utils/mergeSlotProps.js +10 -3
- package/node_modules/@mui/material/modern/version/index.js +3 -3
- package/node_modules/@mui/material/node/Accordion/Accordion.js +18 -6
- package/node_modules/@mui/material/node/AccordionSummary/AccordionSummary.js +67 -16
- package/node_modules/@mui/material/node/Autocomplete/Autocomplete.js +1 -1
- package/node_modules/@mui/material/node/AvatarGroup/AvatarGroup.js +10 -2
- package/node_modules/@mui/material/node/Badge/Badge.js +27 -20
- package/node_modules/@mui/material/node/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/node_modules/@mui/material/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
- package/node_modules/@mui/material/node/Button/Button.js +3 -3
- package/node_modules/@mui/material/node/CardActionArea/CardActionArea.js +47 -8
- package/node_modules/@mui/material/node/Checkbox/Checkbox.js +51 -21
- package/node_modules/@mui/material/node/ClickAwayListener/ClickAwayListener.js +3 -3
- package/node_modules/@mui/material/node/Drawer/Drawer.js +108 -36
- package/node_modules/@mui/material/node/Grid2/Grid2.js +2 -2
- package/node_modules/@mui/material/node/IconButton/IconButton.js +3 -3
- package/node_modules/@mui/material/node/ListItemText/ListItemText.js +14 -5
- package/node_modules/@mui/material/node/Menu/Menu.js +58 -19
- package/node_modules/@mui/material/node/MobileStepper/MobileStepper.js +76 -18
- package/node_modules/@mui/material/node/Modal/Modal.js +9 -10
- package/node_modules/@mui/material/node/NativeSelect/NativeSelectInput.js +6 -2
- package/node_modules/@mui/material/node/NoSsr/NoSsr.js +2 -2
- package/node_modules/@mui/material/node/OutlinedInput/NotchedOutline.js +2 -0
- package/node_modules/@mui/material/node/OutlinedInput/OutlinedInput.js +30 -10
- package/node_modules/@mui/material/node/OverridableComponent/index.js +5 -0
- package/node_modules/@mui/material/node/PigmentContainer/PigmentContainer.js +2 -2
- package/node_modules/@mui/material/node/PigmentGrid/PigmentGrid.js +2 -2
- package/node_modules/@mui/material/node/PigmentHidden/PigmentHidden.js +2 -2
- package/node_modules/@mui/material/node/PigmentStack/PigmentStack.js +2 -2
- package/node_modules/@mui/material/node/Popover/Popover.js +79 -52
- package/node_modules/@mui/material/node/Popper/Popper.js +4 -4
- package/node_modules/@mui/material/node/Portal/Portal.js +2 -2
- package/node_modules/@mui/material/node/Radio/Radio.js +61 -16
- package/node_modules/@mui/material/node/Radio/RadioButtonIcon.js +7 -2
- package/node_modules/@mui/material/node/Rating/Rating.js +132 -46
- package/node_modules/@mui/material/node/Select/SelectInput.js +8 -8
- package/node_modules/@mui/material/node/Slider/useSlider.js +2 -2
- package/node_modules/@mui/material/node/Snackbar/Snackbar.js +116 -32
- package/node_modules/@mui/material/node/SpeedDial/SpeedDial.js +40 -11
- package/node_modules/@mui/material/node/SpeedDialAction/SpeedDialAction.js +109 -31
- package/node_modules/@mui/material/node/StepLabel/StepLabel.js +14 -5
- package/node_modules/@mui/material/node/SwipeableDrawer/SwipeArea.js +1 -0
- package/node_modules/@mui/material/node/SwipeableDrawer/SwipeableDrawer.js +60 -13
- package/node_modules/@mui/material/node/Switch/Switch.js +73 -9
- package/node_modules/@mui/material/node/Tabs/Tabs.js +124 -52
- package/node_modules/@mui/material/node/Tabs/tabsClasses.js +1 -1
- package/node_modules/@mui/material/node/TextField/TextField.js +22 -11
- package/node_modules/@mui/material/node/TextareaAutosize/TextareaAutosize.js +67 -46
- package/node_modules/@mui/material/node/Tooltip/Tooltip.js +1 -1
- package/node_modules/@mui/material/node/index.js +1 -1
- package/node_modules/@mui/material/node/internal/SwitchBase.js +88 -31
- package/node_modules/@mui/material/node/styles/ThemeProvider.js +20 -9
- package/node_modules/@mui/material/node/styles/components.js +5 -0
- package/node_modules/@mui/material/node/styles/createThemeNoVars.js +5 -2
- package/node_modules/@mui/material/node/styles/overrides.js +5 -0
- package/node_modules/@mui/material/node/styles/props.js +5 -0
- package/node_modules/@mui/material/node/styles/shouldSkipGeneratingVar.js +1 -1
- package/node_modules/@mui/material/node/styles/variants.js +5 -0
- package/node_modules/@mui/material/node/useAutocomplete/useAutocomplete.js +16 -14
- package/node_modules/@mui/material/node/useScrollTrigger/useScrollTrigger.js +3 -0
- package/node_modules/@mui/material/node/utils/mergeSlotProps.js +10 -3
- package/node_modules/@mui/material/node/version/index.js +3 -3
- package/node_modules/@mui/material/package.json +6 -6
- package/node_modules/@mui/material/styles/ThemeProvider.d.ts +6 -0
- package/node_modules/@mui/material/styles/ThemeProvider.js +20 -9
- package/node_modules/@mui/material/styles/ThemeProviderWithVars.d.ts +1 -0
- package/node_modules/@mui/material/styles/components.d.ts +590 -591
- package/node_modules/@mui/material/styles/components.js +1 -0
- package/node_modules/@mui/material/styles/createThemeNoVars.d.ts +2 -1
- package/node_modules/@mui/material/styles/createThemeNoVars.js +5 -2
- package/node_modules/@mui/material/styles/index.d.ts +1 -0
- package/node_modules/@mui/material/styles/overrides.d.ts +123 -142
- package/node_modules/@mui/material/styles/overrides.js +1 -0
- package/node_modules/@mui/material/styles/props.d.ts +120 -122
- package/node_modules/@mui/material/styles/props.js +1 -0
- package/node_modules/@mui/material/styles/shouldSkipGeneratingVar.js +1 -1
- package/node_modules/@mui/material/styles/variants.d.ts +7 -10
- package/node_modules/@mui/material/styles/variants.js +1 -0
- package/node_modules/@mui/material/useAutocomplete/useAutocomplete.d.ts +2 -2
- package/node_modules/@mui/material/useAutocomplete/useAutocomplete.js +16 -14
- package/node_modules/@mui/material/useScrollTrigger/useScrollTrigger.d.ts +1 -1
- package/node_modules/@mui/material/useScrollTrigger/useScrollTrigger.js +3 -0
- package/node_modules/@mui/material/utils/mergeSlotProps.js +10 -3
- package/node_modules/@mui/material/version/index.js +3 -3
- package/node_modules/@mui/private-theming/CHANGELOG.md +256 -0
- package/node_modules/@mui/private-theming/index.js +1 -1
- package/node_modules/@mui/private-theming/modern/index.js +1 -1
- package/node_modules/@mui/private-theming/node/index.js +1 -1
- package/node_modules/@mui/private-theming/package.json +2 -2
- package/node_modules/@mui/styled-engine/CHANGELOG.md +387 -0
- package/node_modules/@mui/styled-engine/README.md +2 -2
- package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.d.ts +1 -0
- package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +72 -18
- package/node_modules/@mui/styled-engine/index.js +1 -1
- package/node_modules/@mui/styled-engine/modern/StyledEngineProvider/StyledEngineProvider.js +72 -18
- package/node_modules/@mui/styled-engine/modern/index.js +1 -1
- package/node_modules/@mui/styled-engine/node/StyledEngineProvider/StyledEngineProvider.js +72 -17
- package/node_modules/@mui/styled-engine/node/index.js +1 -1
- package/node_modules/@mui/styled-engine/package.json +1 -1
- package/node_modules/@mui/system/CHANGELOG.md +345 -0
- package/node_modules/@mui/system/GlobalStyles/GlobalStyles.js +25 -1
- package/node_modules/@mui/system/Grid/createGrid.js +4 -0
- package/node_modules/@mui/system/Grid/deleteLegacyGridProps.d.ts +11 -0
- package/node_modules/@mui/system/Grid/deleteLegacyGridProps.js +47 -0
- package/node_modules/@mui/system/README.md +6 -4
- package/node_modules/@mui/system/ThemeProvider/ThemeProvider.js +4 -2
- package/node_modules/@mui/system/ThemeProvider/useLayerOrder.d.ts +8 -0
- package/node_modules/@mui/system/ThemeProvider/useLayerOrder.js +58 -0
- package/node_modules/@mui/system/createBreakpoints/createBreakpoints.d.ts +5 -5
- package/node_modules/@mui/system/createStyled/createStyled.js +34 -21
- package/node_modules/@mui/system/cssContainerQueries/cssContainerQueries.d.ts +1 -2
- package/node_modules/@mui/system/cssVars/createCssVarsProvider.d.ts +6 -0
- package/node_modules/@mui/system/cssVars/createCssVarsProvider.js +7 -0
- package/node_modules/@mui/system/cssVars/index.d.ts +1 -0
- package/node_modules/@mui/system/cssVars/localStorageManager.d.ts +34 -0
- package/node_modules/@mui/system/cssVars/localStorageManager.js +57 -0
- package/node_modules/@mui/system/cssVars/useCurrentColorScheme.d.ts +2 -0
- package/node_modules/@mui/system/cssVars/useCurrentColorScheme.js +50 -69
- package/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js +26 -2
- package/node_modules/@mui/system/esm/Grid/createGrid.js +4 -0
- package/node_modules/@mui/system/esm/Grid/deleteLegacyGridProps.js +41 -0
- package/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js +5 -3
- package/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js +52 -0
- package/node_modules/@mui/system/esm/createStyled/createStyled.js +35 -22
- package/node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js +7 -0
- package/node_modules/@mui/system/esm/cssVars/localStorageManager.js +51 -0
- package/node_modules/@mui/system/esm/cssVars/useCurrentColorScheme.js +49 -69
- package/node_modules/@mui/system/esm/styleFunctionSx/AliasesCSSProperties.js +1 -0
- package/node_modules/@mui/system/esm/styleFunctionSx/OverwriteCSSProperties.js +1 -0
- package/node_modules/@mui/system/esm/styleFunctionSx/StandardCssProperties.js +1 -0
- package/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +9 -2
- package/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery.js +3 -0
- package/node_modules/@mui/system/esm/version/index.js +3 -3
- package/node_modules/@mui/system/index.js +1 -1
- package/node_modules/@mui/system/modern/GlobalStyles/GlobalStyles.js +26 -2
- package/node_modules/@mui/system/modern/Grid/createGrid.js +4 -0
- package/node_modules/@mui/system/modern/Grid/deleteLegacyGridProps.js +41 -0
- package/node_modules/@mui/system/modern/ThemeProvider/ThemeProvider.js +5 -3
- package/node_modules/@mui/system/modern/ThemeProvider/useLayerOrder.js +52 -0
- package/node_modules/@mui/system/modern/createStyled/createStyled.js +35 -22
- package/node_modules/@mui/system/modern/cssVars/createCssVarsProvider.js +7 -0
- package/node_modules/@mui/system/modern/cssVars/localStorageManager.js +51 -0
- package/node_modules/@mui/system/modern/cssVars/useCurrentColorScheme.js +49 -69
- package/node_modules/@mui/system/modern/index.js +1 -1
- package/node_modules/@mui/system/modern/styleFunctionSx/AliasesCSSProperties.js +1 -0
- package/node_modules/@mui/system/modern/styleFunctionSx/OverwriteCSSProperties.js +1 -0
- package/node_modules/@mui/system/modern/styleFunctionSx/StandardCssProperties.js +1 -0
- package/node_modules/@mui/system/modern/styleFunctionSx/styleFunctionSx.js +9 -2
- package/node_modules/@mui/system/modern/useMediaQuery/useMediaQuery.js +3 -0
- package/node_modules/@mui/system/modern/version/index.js +3 -3
- package/node_modules/@mui/system/package.json +5 -5
- package/node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.d.ts +266 -267
- package/node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.js +5 -0
- package/node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.d.ts +51 -52
- package/node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.js +5 -0
- package/node_modules/@mui/system/styleFunctionSx/StandardCssProperties.d.ts +0 -1
- package/node_modules/@mui/system/styleFunctionSx/StandardCssProperties.js +5 -0
- package/node_modules/@mui/system/styleFunctionSx/styleFunctionSx.js +9 -2
- package/node_modules/@mui/system/useMediaQuery/useMediaQuery.js +3 -0
- package/node_modules/@mui/system/version/index.js +3 -3
- package/node_modules/@mui/types/package.json +1 -1
- package/node_modules/@mui/utils/CHANGELOG.md +256 -0
- package/node_modules/@mui/utils/esm/useForkRef/useForkRef.js +32 -12
- package/node_modules/@mui/utils/index.js +1 -1
- package/node_modules/@mui/utils/modern/index.js +1 -1
- package/node_modules/@mui/utils/modern/useForkRef/useForkRef.js +32 -12
- package/node_modules/@mui/utils/package.json +3 -3
- package/node_modules/@mui/utils/useForkRef/useForkRef.d.ts +1 -2
- package/node_modules/@mui/utils/useForkRef/useForkRef.js +32 -13
- package/package.json +24 -24
- package/node_modules/@babel/parser/index.cjs +0 -5
- package/node_modules/@babel/traverse/lib/scope/traverseForScope.js +0 -68
- package/node_modules/@babel/traverse/lib/scope/traverseForScope.js.map +0 -1
- package/node_modules/@babel/traverse/node_modules/globals/globals.json +0 -1563
- package/node_modules/@babel/traverse/node_modules/globals/index.js +0 -2
- package/node_modules/@babel/traverse/node_modules/globals/license +0 -9
- package/node_modules/@babel/traverse/node_modules/globals/package.json +0 -41
- package/node_modules/@babel/traverse/node_modules/globals/readme.md +0 -41
- package/node_modules/@emotion/cache/dist/declarations/types/index.d.ts +0 -45
- package/node_modules/@emotion/cache/src/index.d.ts +0 -2
- package/node_modules/@emotion/cache/types/index.d.ts +0 -45
- package/node_modules/@emotion/react/dist/declarations/dist/emotion-react.cjs.d.ts +0 -2
- package/node_modules/@emotion/react/dist/declarations/types/helper.d.ts +0 -14
- package/node_modules/@emotion/react/dist/declarations/types/index.d.ts +0 -115
- package/node_modules/@emotion/react/dist/declarations/types/jsx-dev-runtime.d.ts +0 -1
- package/node_modules/@emotion/react/dist/declarations/types/jsx-namespace.d.ts +0 -102
- package/node_modules/@emotion/react/dist/declarations/types/jsx-runtime.d.ts +0 -1
- package/node_modules/@emotion/react/dist/declarations/types/theming.d.ts +0 -31
- package/node_modules/@emotion/react/src/_isolated-hnrs.d.ts +0 -3
- package/node_modules/@emotion/react/src/css.js +0 -8
- package/node_modules/@emotion/react/src/global.js +0 -145
- package/node_modules/@emotion/react/src/index.d.ts +0 -1
- package/node_modules/@emotion/react/src/jsx-dev-runtime.d.ts +0 -1
- package/node_modules/@emotion/react/src/jsx-runtime.d.ts +0 -1
- package/node_modules/@emotion/react/src/jsx-runtime.js +0 -21
- package/node_modules/@emotion/react/src/jsx.js +0 -25
- package/node_modules/@emotion/react/src/keyframes.js +0 -23
- package/node_modules/@emotion/react/types/index.d.ts +0 -115
- package/node_modules/@emotion/react/types/jsx-dev-runtime.d.ts +0 -1
- package/node_modules/@emotion/react/types/jsx-namespace.d.ts +0 -102
- package/node_modules/@emotion/react/types/jsx-runtime.d.ts +0 -1
- package/node_modules/@emotion/react/types/theming.d.ts +0 -31
- package/node_modules/@emotion/styled/dist/declarations/types/base.d.ts +0 -197
- package/node_modules/@emotion/styled/dist/declarations/types/index.d.ts +0 -33
- package/node_modules/@emotion/styled/src/base.d.ts +0 -2
- package/node_modules/@emotion/styled/src/index.d.ts +0 -2
- package/node_modules/@emotion/styled/src/index.js +0 -11
- package/node_modules/@emotion/styled/src/utils.js +0 -86
- package/node_modules/@emotion/styled/types/jsx-namespace.d.ts +0 -14
- package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/index.js +0 -15
- package/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +0 -12
- package/node_modules/@jridgewell/set-array/LICENSE +0 -19
- package/node_modules/@jridgewell/set-array/README.md +0 -37
- package/node_modules/@jridgewell/set-array/dist/set-array.mjs +0 -69
- package/node_modules/@jridgewell/set-array/dist/set-array.mjs.map +0 -1
- package/node_modules/@jridgewell/set-array/dist/set-array.umd.js +0 -83
- package/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map +0 -1
- package/node_modules/@jridgewell/set-array/package.json +0 -65
- package/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +0 -8
- package/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +0 -1
- package/node_modules/@mui/material/OverridableComponent.d.ts +0 -67
- /package/node_modules/@emotion/cache/src/conditions/{false.js → false.ts} +0 -0
- /package/node_modules/@emotion/cache/src/conditions/{is-browser.js → is-browser.ts} +0 -0
- /package/node_modules/@emotion/cache/src/conditions/{true.js → true.ts} +0 -0
- /package/node_modules/@emotion/react/src/conditions/{false.js → false.ts} +0 -0
- /package/node_modules/@emotion/react/src/conditions/{is-browser.js → is-browser.ts} +0 -0
- /package/node_modules/@emotion/react/src/conditions/{true.js → true.ts} +0 -0
- /package/node_modules/@emotion/react/{types/helper.d.ts → src/types.ts} +0 -0
- /package/node_modules/@emotion/react/src/{utils.js → utils.ts} +0 -0
- /package/node_modules/@emotion/styled/src/conditions/{false.js → false.ts} +0 -0
- /package/node_modules/@emotion/styled/src/conditions/{is-browser.js → is-browser.ts} +0 -0
- /package/node_modules/@emotion/styled/src/conditions/{true.js → true.ts} +0 -0
- /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{false.js → false.ts} +0 -0
- /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{is-browser.js → is-browser.ts} +0 -0
- /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{true.js → true.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babel/parser",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.28.0",
|
|
4
4
|
"description": "A JavaScript parser",
|
|
5
5
|
"author": "The Babel Team (https://babel.dev/team)",
|
|
6
6
|
"homepage": "https://babel.dev/docs/en/next/babel-parser",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"# dependencies": "This package doesn't actually have runtime dependencies. @babel/types is only needed for type definitions.",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@babel/types": "^7.
|
|
38
|
+
"@babel/types": "^7.28.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/code-frame": "^7.
|
|
42
|
-
"@babel/helper-check-duplicate-nodes": "^7.
|
|
43
|
-
"@babel/helper-fixtures": "^7.
|
|
44
|
-
"@babel/helper-string-parser": "^7.
|
|
45
|
-
"@babel/helper-validator-identifier": "^7.
|
|
41
|
+
"@babel/code-frame": "^7.27.1",
|
|
42
|
+
"@babel/helper-check-duplicate-nodes": "^7.27.1",
|
|
43
|
+
"@babel/helper-fixtures": "^7.28.0",
|
|
44
|
+
"@babel/helper-string-parser": "^7.27.1",
|
|
45
|
+
"@babel/helper-validator-identifier": "^7.27.1",
|
|
46
46
|
"charcodes": "^0.2.0"
|
|
47
47
|
},
|
|
48
48
|
"bin": "./bin/babel-parser.js",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// This file is auto-generated! Do not modify it directly.
|
|
2
|
+
// Run `yarn gulp bundle-dts` to re-generate it.
|
|
2
3
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */
|
|
3
|
-
import
|
|
4
|
+
import { File, Expression } from '@babel/types';
|
|
4
5
|
|
|
5
6
|
type BABEL_8_BREAKING = false;
|
|
6
7
|
type IF_BABEL_7<V> = false extends BABEL_8_BREAKING ? V : never;
|
|
7
8
|
|
|
8
|
-
type Plugin =
|
|
9
|
+
type Plugin$1 =
|
|
9
10
|
| "asyncDoExpressions"
|
|
10
11
|
| IF_BABEL_7<"asyncGenerators">
|
|
11
12
|
| IF_BABEL_7<"bigInt">
|
|
@@ -21,7 +22,7 @@ type Plugin =
|
|
|
21
22
|
| "deprecatedImportAssert"
|
|
22
23
|
| "doExpressions"
|
|
23
24
|
| IF_BABEL_7<"dynamicImport">
|
|
24
|
-
| "explicitResourceManagement"
|
|
25
|
+
| IF_BABEL_7<"explicitResourceManagement">
|
|
25
26
|
| "exportDefaultFrom"
|
|
26
27
|
| IF_BABEL_7<"exportNamespaceFrom">
|
|
27
28
|
| "flow"
|
|
@@ -53,6 +54,7 @@ type Plugin =
|
|
|
53
54
|
|
|
54
55
|
type ParserPluginWithOptions =
|
|
55
56
|
| ["decorators", DecoratorsPluginOptions]
|
|
57
|
+
| ["discardBinding", { syntaxType: "void" }]
|
|
56
58
|
| ["estree", { classFeatures?: boolean }]
|
|
57
59
|
| IF_BABEL_7<["importAttributes", { deprecatedAssertSyntax: boolean }]>
|
|
58
60
|
| IF_BABEL_7<["moduleAttributes", { version: "may-2020" }]>
|
|
@@ -62,7 +64,7 @@ type ParserPluginWithOptions =
|
|
|
62
64
|
| ["flow", FlowPluginOptions]
|
|
63
65
|
| ["typescript", TypeScriptPluginOptions];
|
|
64
66
|
|
|
65
|
-
type PluginConfig = Plugin | ParserPluginWithOptions;
|
|
67
|
+
type PluginConfig = Plugin$1 | ParserPluginWithOptions;
|
|
66
68
|
|
|
67
69
|
interface DecoratorsPluginOptions {
|
|
68
70
|
decoratorsBeforeExport?: boolean;
|
|
@@ -94,174 +96,144 @@ interface TypeScriptPluginOptions {
|
|
|
94
96
|
disallowAmbiguousJSXLike?: boolean;
|
|
95
97
|
}
|
|
96
98
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
type Plugin = PluginConfig;
|
|
100
|
+
|
|
101
|
+
type SourceType = "script" | "commonjs" | "module" | "unambiguous";
|
|
102
|
+
interface Options {
|
|
103
|
+
/**
|
|
104
|
+
* By default, import and export declarations can only appear at a program's top level.
|
|
105
|
+
* Setting this option to true allows them anywhere where a statement is allowed.
|
|
106
|
+
*/
|
|
107
|
+
allowImportExportEverywhere?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* By default, await use is not allowed outside of an async function.
|
|
110
|
+
* Set this to true to accept such code.
|
|
111
|
+
*/
|
|
112
|
+
allowAwaitOutsideFunction?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* By default, a return statement at the top level raises an error.
|
|
115
|
+
* Set this to true to accept such code.
|
|
116
|
+
*/
|
|
117
|
+
allowReturnOutsideFunction?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* By default, new.target use is not allowed outside of a function or class.
|
|
120
|
+
* Set this to true to accept such code.
|
|
121
|
+
*/
|
|
122
|
+
allowNewTargetOutsideFunction?: boolean;
|
|
123
|
+
allowSuperOutsideMethod?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* By default, exported identifiers must refer to a declared variable.
|
|
126
|
+
* Set this to true to allow export statements to reference undeclared variables.
|
|
127
|
+
*/
|
|
128
|
+
allowUndeclaredExports?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* By default, yield use is not allowed outside of a generator function.
|
|
131
|
+
* Set this to true to accept such code.
|
|
132
|
+
*/
|
|
133
|
+
allowYieldOutsideFunction?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* By default, Babel parser JavaScript code according to Annex B syntax.
|
|
136
|
+
* Set this to `false` to disable such behavior.
|
|
137
|
+
*/
|
|
138
|
+
annexB?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* By default, Babel attaches comments to adjacent AST nodes.
|
|
141
|
+
* When this option is set to false, comments are not attached.
|
|
142
|
+
* It can provide up to 30% performance improvement when the input code has many comments.
|
|
143
|
+
* @babel/eslint-parser will set it for you.
|
|
144
|
+
* It is not recommended to use attachComment: false with Babel transform,
|
|
145
|
+
* as doing so removes all the comments in output code, and renders annotations such as
|
|
146
|
+
* /* istanbul ignore next *\/ nonfunctional.
|
|
147
|
+
*/
|
|
148
|
+
attachComment?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* By default, Babel always throws an error when it finds some invalid code.
|
|
151
|
+
* When this option is set to true, it will store the parsing error and
|
|
152
|
+
* try to continue parsing the invalid input file.
|
|
153
|
+
*/
|
|
154
|
+
errorRecovery?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Indicate the mode the code should be parsed in.
|
|
157
|
+
* Can be one of "script", "commonjs", "module", or "unambiguous". Defaults to "script".
|
|
158
|
+
* "unambiguous" will make @babel/parser attempt to guess, based on the presence
|
|
159
|
+
* of ES6 import or export statements.
|
|
160
|
+
* Files with ES6 imports and exports are considered "module" and are otherwise "script".
|
|
161
|
+
*
|
|
162
|
+
* Use "commonjs" to parse code that is intended to be run in a CommonJS environment such as Node.js.
|
|
163
|
+
*/
|
|
164
|
+
sourceType?: SourceType;
|
|
165
|
+
/**
|
|
166
|
+
* Correlate output AST nodes with their source filename.
|
|
167
|
+
* Useful when generating code and source maps from the ASTs of multiple input files.
|
|
168
|
+
*/
|
|
169
|
+
sourceFilename?: string;
|
|
170
|
+
/**
|
|
171
|
+
* By default, all source indexes start from 0.
|
|
172
|
+
* You can provide a start index to alternatively start with.
|
|
173
|
+
* Useful for integration with other source tools.
|
|
174
|
+
*/
|
|
175
|
+
startIndex?: number;
|
|
176
|
+
/**
|
|
177
|
+
* By default, the first line of code parsed is treated as line 1.
|
|
178
|
+
* You can provide a line number to alternatively start with.
|
|
179
|
+
* Useful for integration with other source tools.
|
|
180
|
+
*/
|
|
181
|
+
startLine?: number;
|
|
182
|
+
/**
|
|
183
|
+
* By default, the parsed code is treated as if it starts from line 1, column 0.
|
|
184
|
+
* You can provide a column number to alternatively start with.
|
|
185
|
+
* Useful for integration with other source tools.
|
|
186
|
+
*/
|
|
187
|
+
startColumn?: number;
|
|
188
|
+
/**
|
|
189
|
+
* Array containing the plugins that you want to enable.
|
|
190
|
+
*/
|
|
191
|
+
plugins?: Plugin[];
|
|
192
|
+
/**
|
|
193
|
+
* Should the parser work in strict mode.
|
|
194
|
+
* Defaults to true if sourceType === 'module'. Otherwise, false.
|
|
195
|
+
*/
|
|
196
|
+
strictMode?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Adds a ranges property to each node: [node.start, node.end]
|
|
199
|
+
*/
|
|
200
|
+
ranges?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Adds all parsed tokens to a tokens property on the File node.
|
|
203
|
+
*/
|
|
204
|
+
tokens?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* By default, the parser adds information about parentheses by setting
|
|
207
|
+
* `extra.parenthesized` to `true` as needed.
|
|
208
|
+
* When this option is `true` the parser creates `ParenthesizedExpression`
|
|
209
|
+
* AST nodes instead of using the `extra` property.
|
|
210
|
+
*/
|
|
211
|
+
createParenthesizedExpressions?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* The default is false in Babel 7 and true in Babel 8
|
|
214
|
+
* Set this to true to parse it as an `ImportExpression` node.
|
|
215
|
+
* Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`.
|
|
216
|
+
*/
|
|
217
|
+
createImportExpressions?: boolean;
|
|
218
|
+
}
|
|
103
219
|
|
|
220
|
+
type ParserOptions = Partial<Options>;
|
|
221
|
+
interface ParseError {
|
|
222
|
+
code: string;
|
|
223
|
+
reasonCode: string;
|
|
224
|
+
}
|
|
225
|
+
type ParseResult<Result extends File | Expression = File> = Result & {
|
|
226
|
+
errors: null | ParseError[];
|
|
227
|
+
};
|
|
104
228
|
/**
|
|
105
229
|
* Parse the provided code as an entire ECMAScript program.
|
|
106
230
|
*/
|
|
107
|
-
declare function parse(
|
|
108
|
-
|
|
109
|
-
options?: ParserOptions
|
|
110
|
-
): ParseResult<_babel_types.File>;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Parse the provided code as a single expression.
|
|
114
|
-
*/
|
|
115
|
-
declare function parseExpression(
|
|
116
|
-
input: string,
|
|
117
|
-
options?: ParserOptions
|
|
118
|
-
): ParseResult<_babel_types.Expression>;
|
|
119
|
-
|
|
120
|
-
interface ParserOptions {
|
|
121
|
-
/**
|
|
122
|
-
* By default, import and export declarations can only appear at a program's top level.
|
|
123
|
-
* Setting this option to true allows them anywhere where a statement is allowed.
|
|
124
|
-
*/
|
|
125
|
-
allowImportExportEverywhere?: boolean;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* By default, await use is not allowed outside of an async function.
|
|
129
|
-
* Set this to true to accept such code.
|
|
130
|
-
*/
|
|
131
|
-
allowAwaitOutsideFunction?: boolean;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* By default, a return statement at the top level raises an error.
|
|
135
|
-
* Set this to true to accept such code.
|
|
136
|
-
*/
|
|
137
|
-
allowReturnOutsideFunction?: boolean;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* By default, new.target use is not allowed outside of a function or class.
|
|
141
|
-
* Set this to true to accept such code.
|
|
142
|
-
*/
|
|
143
|
-
allowNewTargetOutsideFunction?: boolean;
|
|
144
|
-
|
|
145
|
-
allowSuperOutsideMethod?: boolean;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* By default, exported identifiers must refer to a declared variable.
|
|
149
|
-
* Set this to true to allow export statements to reference undeclared variables.
|
|
150
|
-
*/
|
|
151
|
-
allowUndeclaredExports?: boolean;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* By default, Babel parser JavaScript code according to Annex B syntax.
|
|
155
|
-
* Set this to `false` to disable such behavior.
|
|
156
|
-
*/
|
|
157
|
-
annexB?: boolean;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* By default, Babel attaches comments to adjacent AST nodes.
|
|
161
|
-
* When this option is set to false, comments are not attached.
|
|
162
|
-
* It can provide up to 30% performance improvement when the input code has many comments.
|
|
163
|
-
* @babel/eslint-parser will set it for you.
|
|
164
|
-
* It is not recommended to use attachComment: false with Babel transform,
|
|
165
|
-
* as doing so removes all the comments in output code, and renders annotations such as
|
|
166
|
-
* /* istanbul ignore next *\/ nonfunctional.
|
|
167
|
-
*/
|
|
168
|
-
attachComment?: boolean;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* By default, Babel always throws an error when it finds some invalid code.
|
|
172
|
-
* When this option is set to true, it will store the parsing error and
|
|
173
|
-
* try to continue parsing the invalid input file.
|
|
174
|
-
*/
|
|
175
|
-
errorRecovery?: boolean;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Indicate the mode the code should be parsed in.
|
|
179
|
-
* Can be one of "script", "module", or "unambiguous". Defaults to "script".
|
|
180
|
-
* "unambiguous" will make @babel/parser attempt to guess, based on the presence
|
|
181
|
-
* of ES6 import or export statements.
|
|
182
|
-
* Files with ES6 imports and exports are considered "module" and are otherwise "script".
|
|
183
|
-
*/
|
|
184
|
-
sourceType?: "script" | "module" | "unambiguous";
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Correlate output AST nodes with their source filename.
|
|
188
|
-
* Useful when generating code and source maps from the ASTs of multiple input files.
|
|
189
|
-
*/
|
|
190
|
-
sourceFilename?: string;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* By default, all source indexes start from 0.
|
|
194
|
-
* You can provide a start index to alternatively start with.
|
|
195
|
-
* Useful for integration with other source tools.
|
|
196
|
-
*/
|
|
197
|
-
startIndex?: number;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* By default, the first line of code parsed is treated as line 1.
|
|
201
|
-
* You can provide a line number to alternatively start with.
|
|
202
|
-
* Useful for integration with other source tools.
|
|
203
|
-
*/
|
|
204
|
-
startLine?: number;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* By default, the parsed code is treated as if it starts from line 1, column 0.
|
|
208
|
-
* You can provide a column number to alternatively start with.
|
|
209
|
-
* Useful for integration with other source tools.
|
|
210
|
-
*/
|
|
211
|
-
startColumn?: number;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Array containing the plugins that you want to enable.
|
|
215
|
-
*/
|
|
216
|
-
plugins?: ParserPlugin[];
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Should the parser work in strict mode.
|
|
220
|
-
* Defaults to true if sourceType === 'module'. Otherwise, false.
|
|
221
|
-
*/
|
|
222
|
-
strictMode?: boolean;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Adds a ranges property to each node: [node.start, node.end]
|
|
226
|
-
*/
|
|
227
|
-
ranges?: boolean;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Adds all parsed tokens to a tokens property on the File node.
|
|
231
|
-
*/
|
|
232
|
-
tokens?: boolean;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* By default, the parser adds information about parentheses by setting
|
|
236
|
-
* `extra.parenthesized` to `true` as needed.
|
|
237
|
-
* When this option is `true` the parser creates `ParenthesizedExpression`
|
|
238
|
-
* AST nodes instead of using the `extra` property.
|
|
239
|
-
*/
|
|
240
|
-
createParenthesizedExpressions?: boolean;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* The default is false in Babel 7 and true in Babel 8
|
|
244
|
-
* Set this to true to parse it as an `ImportExpression` node.
|
|
245
|
-
* Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`.
|
|
246
|
-
*/
|
|
247
|
-
createImportExpressions?: boolean;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
type ParserPlugin = PluginConfig;
|
|
251
|
-
|
|
231
|
+
declare function parse(input: string, options?: ParserOptions): ParseResult<File>;
|
|
232
|
+
declare function parseExpression(input: string, options?: ParserOptions): ParseResult<Expression>;
|
|
252
233
|
|
|
253
234
|
declare const tokTypes: {
|
|
254
235
|
// todo(flow->ts) real token type
|
|
255
236
|
[name: string]: any;
|
|
256
237
|
};
|
|
257
238
|
|
|
258
|
-
|
|
259
|
-
code: string;
|
|
260
|
-
reasonCode: string;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
type ParseResult<Result> = Result & {
|
|
264
|
-
errors: ParseError[];
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParseResult, ParserOptions, ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };
|
|
239
|
+
export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParseResult, ParserOptions, PluginConfig as ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };
|
|
@@ -7,7 +7,7 @@ exports.merge = merge;
|
|
|
7
7
|
exports.normalizeReplacements = normalizeReplacements;
|
|
8
8
|
exports.validate = validate;
|
|
9
9
|
const _excluded = ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"];
|
|
10
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
11
11
|
function merge(a, b) {
|
|
12
12
|
const {
|
|
13
13
|
placeholderWhitelist = a.placeholderWhitelist,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["merge","a","b","placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders","parser","Object","assign","validate","opts","Error","_ref","_objectWithoutPropertiesLoose","_excluded","Set","RegExp","undefined","normalizeReplacements","replacements","Array","isArray","reduce","acc","replacement","i"],"sources":["../src/options.ts"],"sourcesContent":["import type { ParserOptions as ParserOpts } from \"@babel/parser\";\n\nexport type { ParserOpts };\n\n/**\n * These are the options that 'babel-template' actually accepts and typechecks\n * when called. All other options are passed through to the parser.\n */\nexport type PublicOpts = {\n /**\n * A set of placeholder names to automatically accept, ignoring the given\n * pattern entirely.\n *\n * This option can be used when using %%foo%% style placeholders.\n */\n placeholderWhitelist?: Set<string>;\n /**\n * A pattern to search for when looking for Identifier and StringLiteral\n * nodes that can be replaced.\n *\n * 'false' will disable placeholder searching entirely, leaving only the\n * 'placeholderWhitelist' value to find replacements.\n *\n * Defaults to /^[_$A-Z0-9]+$/.\n *\n * This option can be used when using %%foo%% style placeholders.\n */\n placeholderPattern?: RegExp | false;\n /**\n * 'true' to pass through comments from the template into the resulting AST,\n * or 'false' to automatically discard comments. Defaults to 'false'.\n */\n preserveComments?: boolean;\n /**\n * 'true' to use %%foo%% style placeholders, 'false' to use legacy placeholders\n * described by placeholderPattern or placeholderWhitelist.\n * When it is not set, it behaves as 'true' if there are syntactic placeholders,\n * otherwise as 'false'.\n */\n syntacticPlaceholders?: boolean | null;\n};\n\nexport type TemplateOpts = {\n parser: ParserOpts;\n placeholderWhitelist?: Set<string>;\n placeholderPattern?: RegExp | false;\n preserveComments?: boolean;\n syntacticPlaceholders?: boolean;\n};\n\nexport function merge(a: TemplateOpts, b: TemplateOpts): TemplateOpts {\n const {\n placeholderWhitelist = a.placeholderWhitelist,\n placeholderPattern = a.placeholderPattern,\n preserveComments = a.preserveComments,\n syntacticPlaceholders = a.syntacticPlaceholders,\n } = b;\n\n return {\n parser: {\n ...a.parser,\n ...b.parser,\n },\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n };\n}\n\nexport function validate(opts: unknown): TemplateOpts {\n if (opts != null && typeof opts !== \"object\") {\n throw new Error(\"Unknown template options.\");\n }\n\n const {\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n ...parser\n } = opts || ({} as any);\n\n if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {\n throw new Error(\n \"'.placeholderWhitelist' must be a Set, null, or undefined\",\n );\n }\n\n if (\n placeholderPattern != null &&\n !(placeholderPattern instanceof RegExp) &&\n placeholderPattern !== false\n ) {\n throw new Error(\n \"'.placeholderPattern' must be a RegExp, false, null, or undefined\",\n );\n }\n\n if (preserveComments != null && typeof preserveComments !== \"boolean\") {\n throw new Error(\n \"'.preserveComments' must be a boolean, null, or undefined\",\n );\n }\n\n if (\n syntacticPlaceholders != null &&\n typeof syntacticPlaceholders !== \"boolean\"\n ) {\n throw new Error(\n \"'.syntacticPlaceholders' must be a boolean, null, or undefined\",\n );\n }\n if (\n syntacticPlaceholders === true &&\n (placeholderWhitelist != null || placeholderPattern != null)\n ) {\n throw new Error(\n \"'.placeholderWhitelist' and '.placeholderPattern' aren't compatible\" +\n \" with '.syntacticPlaceholders: true'\",\n );\n }\n\n return {\n parser,\n placeholderWhitelist: placeholderWhitelist || undefined,\n placeholderPattern:\n placeholderPattern == null ? undefined : placeholderPattern,\n preserveComments: preserveComments == null ? undefined : preserveComments,\n syntacticPlaceholders:\n syntacticPlaceholders == null ? undefined : syntacticPlaceholders,\n };\n}\n\nexport type PublicReplacements = { [x: string]: unknown } | Array<unknown>;\nexport type TemplateReplacements = { [x: string]: unknown } | void;\n\nexport function normalizeReplacements(\n replacements: unknown,\n): TemplateReplacements {\n if (Array.isArray(replacements)) {\n return replacements.reduce((acc, replacement, i) => {\n acc[\"$\" + i] = replacement;\n return acc;\n }, {});\n } else if (typeof replacements === \"object\" || replacements == null) {\n return (replacements as any) || undefined;\n }\n\n throw new Error(\n \"Template replacements must be an array, object, null, or undefined\",\n );\n}\n"],"mappings":";;;;;;;;;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AAOA,qBAAqB,KAAK,SAAS,EAC1C;IACA,MAAM,IAAIM,KAAK,CACb,gEACF,CAAC;EACH;EACA,IACEN,qBAAqB,KAAK,IAAI,KAC7BH,oBAAoB,IAAI,IAAI,IAAIC,kBAAkB,IAAI,IAAI,CAAC,EAC5D;IACA,MAAM,IAAIQ,KAAK,CACb,qEAAqE,GACnE,sCACJ,CAAC;EACH;EAEA,OAAO;IACLL,MAAM;IACNJ,oBAAoB,EAAEA,oBAAoB,IAAIe,SAAS;IACvDd,kBAAkB,EAChBA,kBAAkB,IAAI,IAAI,GAAGc,SAAS,GAAGd,kBAAkB;IAC7DC,gBAAgB,EAAEA,gBAAgB,IAAI,IAAI,GAAGa,SAAS,GAAGb,gBAAgB;IACzEC,qBAAqB,EACnBA,qBAAqB,IAAI,IAAI,GAAGY,SAAS,GAAGZ;EAChD,CAAC;AACH;AAKO,SAASa,qBAAqBA,CACnCC,YAAqB,EACC;EACtB,IAAIC,KAAK,CAACC,OAAO,CAACF,YAAY,CAAC,EAAE;IAC/B,OAAOA,YAAY,CAACG,MAAM,CAAC,CAACC,GAAG,EAAEC,WAAW,EAAEC,CAAC,KAAK;MAClDF,GAAG,CAAC,GAAG,GAAGE,CAAC,CAAC,GAAGD,WAAW;MAC1B,OAAOD,GAAG;IACZ,CAAC,EAAE,CAAC,CAAC,CAAC;EACR,CAAC,MAAM,IAAI,OAAOJ,YAAY,KAAK,QAAQ,IAAIA,YAAY,IAAI,IAAI,EAAE;IACnE,OAAQA,YAAY,IAAYF,SAAS;EAC3C;EAEA,MAAM,IAAIN,KAAK,CACb,oEACF,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["merge","a","b","placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders","parser","Object","assign","validate","opts","Error","_ref","_objectWithoutPropertiesLoose","_excluded","Set","RegExp","undefined","normalizeReplacements","replacements","Array","isArray","reduce","acc","replacement","i"],"sources":["../src/options.ts"],"sourcesContent":["import type { ParserOptions as ParserOpts } from \"@babel/parser\";\n\nexport type { ParserOpts };\n\n/**\n * These are the options that 'babel-template' actually accepts and typechecks\n * when called. All other options are passed through to the parser.\n */\nexport type PublicOpts = {\n /**\n * A set of placeholder names to automatically accept, ignoring the given\n * pattern entirely.\n *\n * This option can be used when using %%foo%% style placeholders.\n */\n placeholderWhitelist?: Set<string>;\n /**\n * A pattern to search for when looking for Identifier and StringLiteral\n * nodes that can be replaced.\n *\n * 'false' will disable placeholder searching entirely, leaving only the\n * 'placeholderWhitelist' value to find replacements.\n *\n * Defaults to /^[_$A-Z0-9]+$/.\n *\n * This option can be used when using %%foo%% style placeholders.\n */\n placeholderPattern?: RegExp | false;\n /**\n * 'true' to pass through comments from the template into the resulting AST,\n * or 'false' to automatically discard comments. Defaults to 'false'.\n */\n preserveComments?: boolean;\n /**\n * 'true' to use %%foo%% style placeholders, 'false' to use legacy placeholders\n * described by placeholderPattern or placeholderWhitelist.\n * When it is not set, it behaves as 'true' if there are syntactic placeholders,\n * otherwise as 'false'.\n */\n syntacticPlaceholders?: boolean | null;\n} & ParserOpts;\n\nexport type TemplateOpts = {\n parser: ParserOpts;\n placeholderWhitelist?: Set<string>;\n placeholderPattern?: RegExp | false;\n preserveComments?: boolean;\n syntacticPlaceholders?: boolean;\n};\n\nexport function merge(a: TemplateOpts, b: TemplateOpts): TemplateOpts {\n const {\n placeholderWhitelist = a.placeholderWhitelist,\n placeholderPattern = a.placeholderPattern,\n preserveComments = a.preserveComments,\n syntacticPlaceholders = a.syntacticPlaceholders,\n } = b;\n\n return {\n parser: {\n ...a.parser,\n ...b.parser,\n },\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n };\n}\n\nexport function validate(opts: unknown): TemplateOpts {\n if (opts != null && typeof opts !== \"object\") {\n throw new Error(\"Unknown template options.\");\n }\n\n const {\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n ...parser\n } = opts || ({} as any);\n\n if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {\n throw new Error(\n \"'.placeholderWhitelist' must be a Set, null, or undefined\",\n );\n }\n\n if (\n placeholderPattern != null &&\n !(placeholderPattern instanceof RegExp) &&\n placeholderPattern !== false\n ) {\n throw new Error(\n \"'.placeholderPattern' must be a RegExp, false, null, or undefined\",\n );\n }\n\n if (preserveComments != null && typeof preserveComments !== \"boolean\") {\n throw new Error(\n \"'.preserveComments' must be a boolean, null, or undefined\",\n );\n }\n\n if (\n syntacticPlaceholders != null &&\n typeof syntacticPlaceholders !== \"boolean\"\n ) {\n throw new Error(\n \"'.syntacticPlaceholders' must be a boolean, null, or undefined\",\n );\n }\n if (\n syntacticPlaceholders === true &&\n (placeholderWhitelist != null || placeholderPattern != null)\n ) {\n throw new Error(\n \"'.placeholderWhitelist' and '.placeholderPattern' aren't compatible\" +\n \" with '.syntacticPlaceholders: true'\",\n );\n }\n\n return {\n parser,\n placeholderWhitelist: placeholderWhitelist || undefined,\n placeholderPattern:\n placeholderPattern == null ? undefined : placeholderPattern,\n preserveComments: preserveComments == null ? undefined : preserveComments,\n syntacticPlaceholders:\n syntacticPlaceholders == null ? undefined : syntacticPlaceholders,\n };\n}\n\nexport type PublicReplacements = { [x: string]: unknown } | Array<unknown>;\nexport type TemplateReplacements = { [x: string]: unknown } | void;\n\nexport function normalizeReplacements(\n replacements: unknown,\n): TemplateReplacements {\n if (Array.isArray(replacements)) {\n return replacements.reduce((acc, replacement, i) => {\n acc[\"$\" + i] = replacement;\n return acc;\n }, {});\n } else if (typeof replacements === \"object\" || replacements == null) {\n return (replacements as any) || undefined;\n }\n\n throw new Error(\n \"Template replacements must be an array, object, null, or undefined\",\n );\n}\n"],"mappings":";;;;;;;;;;AAkDO,SAASA,KAAKA,CAACC,CAAe,EAAEC,CAAe,EAAgB;EACpE,MAAM;IACJC,oBAAoB,GAAGF,CAAC,CAACE,oBAAoB;IAC7CC,kBAAkB,GAAGH,CAAC,CAACG,kBAAkB;IACzCC,gBAA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I,CAAC,EAC5D;IACA,MAAM,IAAIQ,KAAK,CACb,qEAAqE,GACnE,sCACJ,CAAC;EACH;EAEA,OAAO;IACLL,MAAM;IACNJ,oBAAoB,EAAEA,oBAAoB,IAAIe,SAAS;IACvDd,kBAAkB,EAChBA,kBAAkB,IAAI,IAAI,GAAGc,SAAS,GAAGd,kBAAkB;IAC7DC,gBAAgB,EAAEA,gBAAgB,IAAI,IAAI,GAAGa,SAAS,GAAGb,gBAAgB;IACzEC,qBAAqB,EACnBA,qBAAqB,IAAI,IAAI,GAAGY,SAAS,GAAGZ;EAChD,CAAC;AACH;AAKO,SAASa,qBAAqBA,CACnCC,YAAqB,EACC;EACtB,IAAIC,KAAK,CAACC,OAAO,CAACF,YAAY,CAAC,EAAE;IAC/B,OAAOA,YAAY,CAACG,MAAM,CAAC,CAACC,GAAG,EAAEC,WAAW,EAAEC,CAAC,KAAK;MAClDF,GAAG,CAAC,GAAG,GAAGE,CAAC,CAAC,GAAGD,WAAW;MAC1B,OAAOD,GAAG;IACZ,CAAC,EAAE,CAAC,CAAC,CAAC;EACR,CAAC,MAAM,IAAI,OAAOJ,YAAY,KAAK,QAAQ,IAAIA,YAAY,IAAI,IAAI,EAAE;IACnE,OAAQA,YAAY,IAAYF,SAAS;EAC3C;EAEA,MAAM,IAAIN,KAAK,CACb,oEACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -137,8 +137,11 @@ function parseWithCodeFrame(code, parserOpts, syntacticPlaceholders) {
|
|
|
137
137
|
plugins.push("placeholders");
|
|
138
138
|
}
|
|
139
139
|
parserOpts = Object.assign({
|
|
140
|
+
allowAwaitOutsideFunction: true,
|
|
140
141
|
allowReturnOutsideFunction: true,
|
|
142
|
+
allowNewTargetOutsideFunction: true,
|
|
141
143
|
allowSuperOutsideMethod: true,
|
|
144
|
+
allowYieldOutsideFunction: true,
|
|
142
145
|
sourceType: "module"
|
|
143
146
|
}, parserOpts, {
|
|
144
147
|
plugins
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_t","require","_parser","_codeFrame","isCallExpression","isExpressionStatement","isFunction","isIdentifier","isJSXIdentifier","isNewExpression","isPlaceholder","isStatement","isStringLiteral","removePropertiesDeep","traverse","PATTERN","parseAndBuildMetadata","formatter","code","opts","placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders","ast","parseWithCodeFrame","parser","validate","state","syntactic","placeholders","placeholderNames","Set","legacy","placeholderVisitorHandler","Object","assign","length","node","ancestors","_state$placeholderWhi","name","hasSyntacticPlaceholders","Error","value","test","has","slice","parent","key","type","expectedNode","push","resolve","resolveAncestors","isDuplicate","add","i","index","undefined","parserOpts","plugins","allowReturnOutsideFunction","allowSuperOutsideMethod","sourceType","parse","err","loc","message","codeFrameColumns","start"],"sources":["../src/parse.ts"],"sourcesContent":["import {\n isCallExpression,\n isExpressionStatement,\n isFunction,\n isIdentifier,\n isJSXIdentifier,\n isNewExpression,\n isPlaceholder,\n isStatement,\n isStringLiteral,\n removePropertiesDeep,\n traverse,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { TraversalAncestors } from \"@babel/types\";\nimport { parse } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport type { TemplateOpts, ParserOpts } from \"./options.ts\";\nimport type { Formatter } from \"./formatters.ts\";\n\nexport type Metadata = {\n ast: t.File;\n placeholders: Array<Placeholder>;\n placeholderNames: Set<string>;\n};\n\ntype PlaceholderType = \"string\" | \"param\" | \"statement\" | \"other\";\nexport type Placeholder = {\n name: string;\n resolve: (a: t.File) => { parent: t.Node; key: string; index?: number };\n type: PlaceholderType;\n isDuplicate: boolean;\n};\n\nconst PATTERN = /^[_$A-Z0-9]+$/;\n\nexport default function parseAndBuildMetadata<T>(\n formatter: Formatter<T>,\n code: string,\n opts: TemplateOpts,\n): Metadata {\n const {\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n } = opts;\n\n const ast = parseWithCodeFrame(code, opts.parser, syntacticPlaceholders);\n\n removePropertiesDeep(ast, {\n preserveComments,\n });\n\n formatter.validate(ast);\n\n const state: MetadataState = {\n syntactic: { placeholders: [], placeholderNames: new Set() },\n legacy: { placeholders: [], placeholderNames: new Set() },\n placeholderWhitelist,\n placeholderPattern,\n syntacticPlaceholders,\n };\n\n traverse(ast, placeholderVisitorHandler, state);\n\n return {\n ast,\n ...(state.syntactic.placeholders.length ? state.syntactic : state.legacy),\n };\n}\n\nfunction placeholderVisitorHandler(\n node: t.Node,\n ancestors: TraversalAncestors,\n state: MetadataState,\n) {\n let name: string;\n\n let hasSyntacticPlaceholders = state.syntactic.placeholders.length > 0;\n\n if (isPlaceholder(node)) {\n if (state.syntacticPlaceholders === false) {\n throw new Error(\n \"%%foo%%-style placeholders can't be used when \" +\n \"'.syntacticPlaceholders' is false.\",\n );\n }\n name = node.name.name;\n hasSyntacticPlaceholders = true;\n } else if (hasSyntacticPlaceholders || state.syntacticPlaceholders) {\n return;\n } else if (isIdentifier(node) || isJSXIdentifier(node)) {\n name = node.name;\n } else if (isStringLiteral(node)) {\n name = node.value;\n } else {\n return;\n }\n\n if (\n hasSyntacticPlaceholders &&\n (state.placeholderPattern != null || state.placeholderWhitelist != null)\n ) {\n // This check is also in options.js. We need it there to handle the default\n // .syntacticPlaceholders behavior.\n throw new Error(\n \"'.placeholderWhitelist' and '.placeholderPattern' aren't compatible\" +\n \" with '.syntacticPlaceholders: true'\",\n );\n }\n\n if (\n !hasSyntacticPlaceholders &&\n (state.placeholderPattern === false ||\n !(state.placeholderPattern || PATTERN).test(name)) &&\n !state.placeholderWhitelist?.has(name)\n ) {\n return;\n }\n\n // Keep our own copy of the ancestors so we can use it in .resolve().\n ancestors = ancestors.slice();\n\n const { node: parent, key } = ancestors[ancestors.length - 1];\n\n let type: PlaceholderType;\n if (\n isStringLiteral(node) ||\n isPlaceholder(node, { expectedNode: \"StringLiteral\" })\n ) {\n type = \"string\";\n } else if (\n (isNewExpression(parent) && key === \"arguments\") ||\n (isCallExpression(parent) && key === \"arguments\") ||\n (isFunction(parent) && key === \"params\")\n ) {\n type = \"param\";\n } else if (isExpressionStatement(parent) && !isPlaceholder(node)) {\n type = \"statement\";\n ancestors = ancestors.slice(0, -1);\n } else if (isStatement(node) && isPlaceholder(node)) {\n type = \"statement\";\n } else {\n type = \"other\";\n }\n\n const { placeholders, placeholderNames } = !hasSyntacticPlaceholders\n ? state.legacy\n : state.syntactic;\n\n placeholders.push({\n name,\n type,\n resolve: ast => resolveAncestors(ast, ancestors),\n isDuplicate: placeholderNames.has(name),\n });\n placeholderNames.add(name);\n}\n\nfunction resolveAncestors(ast: t.File, ancestors: TraversalAncestors) {\n let parent: t.Node = ast;\n for (let i = 0; i < ancestors.length - 1; i++) {\n const { key, index } = ancestors[i];\n\n if (index === undefined) {\n parent = (parent as any)[key];\n } else {\n parent = (parent as any)[key][index];\n }\n }\n\n const { key, index } = ancestors[ancestors.length - 1];\n\n return { parent, key, index };\n}\n\ntype MetadataState = {\n syntactic: {\n placeholders: Array<Placeholder>;\n placeholderNames: Set<string>;\n };\n legacy: {\n placeholders: Array<Placeholder>;\n placeholderNames: Set<string>;\n };\n placeholderWhitelist?: Set<string>;\n placeholderPattern?: RegExp | false;\n syntacticPlaceholders?: boolean;\n};\n\nfunction parseWithCodeFrame(\n code: string,\n parserOpts: ParserOpts,\n syntacticPlaceholders?: boolean,\n): t.File {\n const plugins = (parserOpts.plugins || []).slice();\n if (syntacticPlaceholders !== false) {\n plugins.push(\"placeholders\");\n }\n\n parserOpts = {\n allowReturnOutsideFunction: true,\n allowSuperOutsideMethod: true,\n sourceType: \"module\",\n ...parserOpts,\n plugins,\n };\n\n try {\n // @ts-expect-error todo: use babel-types ast typings in Babel parser\n return parse(code, parserOpts);\n } catch (err) {\n const loc = err.loc;\n if (loc) {\n err.message += \"\\n\" + codeFrameColumns(code, { start: loc });\n err.code = \"BABEL_TEMPLATE_PARSE_ERROR\";\n }\n throw err;\n }\n}\n"],"mappings":";;;;;;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ACnD,IAAI,EAAE;QAAEoD,KAAK,EAAEH;MAAI,CAAC,CAAC;MAC5DD,GAAG,CAAChD,IAAI,GAAG,4BAA4B;IACzC;IACA,MAAMgD,GAAG;EACX;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_t","require","_parser","_codeFrame","isCallExpression","isExpressionStatement","isFunction","isIdentifier","isJSXIdentifier","isNewExpression","isPlaceholder","isStatement","isStringLiteral","removePropertiesDeep","traverse","PATTERN","parseAndBuildMetadata","formatter","code","opts","placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders","ast","parseWithCodeFrame","parser","validate","state","syntactic","placeholders","placeholderNames","Set","legacy","placeholderVisitorHandler","Object","assign","length","node","ancestors","_state$placeholderWhi","name","hasSyntacticPlaceholders","Error","value","test","has","slice","parent","key","type","expectedNode","push","resolve","resolveAncestors","isDuplicate","add","i","index","undefined","parserOpts","plugins","allowAwaitOutsideFunction","allowReturnOutsideFunction","allowNewTargetOutsideFunction","allowSuperOutsideMethod","allowYieldOutsideFunction","sourceType","parse","err","loc","message","codeFrameColumns","start"],"sources":["../src/parse.ts"],"sourcesContent":["import {\n isCallExpression,\n isExpressionStatement,\n isFunction,\n isIdentifier,\n isJSXIdentifier,\n isNewExpression,\n isPlaceholder,\n isStatement,\n isStringLiteral,\n removePropertiesDeep,\n traverse,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { TraversalAncestors } from \"@babel/types\";\nimport { parse } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport type { TemplateOpts, ParserOpts } from \"./options.ts\";\nimport type { Formatter } from \"./formatters.ts\";\n\nexport type Metadata = {\n ast: t.File;\n placeholders: Array<Placeholder>;\n placeholderNames: Set<string>;\n};\n\ntype PlaceholderType = \"string\" | \"param\" | \"statement\" | \"other\";\nexport type Placeholder = {\n name: string;\n resolve: (a: t.File) => { parent: t.Node; key: string; index?: number };\n type: PlaceholderType;\n isDuplicate: boolean;\n};\n\nconst PATTERN = /^[_$A-Z0-9]+$/;\n\nexport default function parseAndBuildMetadata<T>(\n formatter: Formatter<T>,\n code: string,\n opts: TemplateOpts,\n): Metadata {\n const {\n placeholderWhitelist,\n placeholderPattern,\n preserveComments,\n syntacticPlaceholders,\n } = opts;\n\n const ast = parseWithCodeFrame(code, opts.parser, syntacticPlaceholders);\n\n removePropertiesDeep(ast, {\n preserveComments,\n });\n\n formatter.validate(ast);\n\n const state: MetadataState = {\n syntactic: { placeholders: [], placeholderNames: new Set() },\n legacy: { placeholders: [], placeholderNames: new Set() },\n placeholderWhitelist,\n placeholderPattern,\n syntacticPlaceholders,\n };\n\n traverse(ast, placeholderVisitorHandler, state);\n\n return {\n ast,\n ...(state.syntactic.placeholders.length ? state.syntactic : state.legacy),\n };\n}\n\nfunction placeholderVisitorHandler(\n node: t.Node,\n ancestors: TraversalAncestors,\n state: MetadataState,\n) {\n let name: string;\n\n let hasSyntacticPlaceholders = state.syntactic.placeholders.length > 0;\n\n if (isPlaceholder(node)) {\n if (state.syntacticPlaceholders === false) {\n throw new Error(\n \"%%foo%%-style placeholders can't be used when \" +\n \"'.syntacticPlaceholders' is false.\",\n );\n }\n name = node.name.name;\n hasSyntacticPlaceholders = true;\n } else if (hasSyntacticPlaceholders || state.syntacticPlaceholders) {\n return;\n } else if (isIdentifier(node) || isJSXIdentifier(node)) {\n name = node.name;\n } else if (isStringLiteral(node)) {\n name = node.value;\n } else {\n return;\n }\n\n if (\n hasSyntacticPlaceholders &&\n (state.placeholderPattern != null || state.placeholderWhitelist != null)\n ) {\n // This check is also in options.js. We need it there to handle the default\n // .syntacticPlaceholders behavior.\n throw new Error(\n \"'.placeholderWhitelist' and '.placeholderPattern' aren't compatible\" +\n \" with '.syntacticPlaceholders: true'\",\n );\n }\n\n if (\n !hasSyntacticPlaceholders &&\n (state.placeholderPattern === false ||\n !(state.placeholderPattern || PATTERN).test(name)) &&\n !state.placeholderWhitelist?.has(name)\n ) {\n return;\n }\n\n // Keep our own copy of the ancestors so we can use it in .resolve().\n ancestors = ancestors.slice();\n\n const { node: parent, key } = ancestors[ancestors.length - 1];\n\n let type: PlaceholderType;\n if (\n isStringLiteral(node) ||\n isPlaceholder(node, { expectedNode: \"StringLiteral\" })\n ) {\n type = \"string\";\n } else if (\n (isNewExpression(parent) && key === \"arguments\") ||\n (isCallExpression(parent) && key === \"arguments\") ||\n (isFunction(parent) && key === \"params\")\n ) {\n type = \"param\";\n } else if (isExpressionStatement(parent) && !isPlaceholder(node)) {\n type = \"statement\";\n ancestors = ancestors.slice(0, -1);\n } else if (isStatement(node) && isPlaceholder(node)) {\n type = \"statement\";\n } else {\n type = \"other\";\n }\n\n const { placeholders, placeholderNames } = !hasSyntacticPlaceholders\n ? state.legacy\n : state.syntactic;\n\n placeholders.push({\n name,\n type,\n resolve: ast => resolveAncestors(ast, ancestors),\n isDuplicate: placeholderNames.has(name),\n });\n placeholderNames.add(name);\n}\n\nfunction resolveAncestors(ast: t.File, ancestors: TraversalAncestors) {\n let parent: t.Node = ast;\n for (let i = 0; i < ancestors.length - 1; i++) {\n const { key, index } = ancestors[i];\n\n if (index === undefined) {\n parent = (parent as any)[key];\n } else {\n parent = (parent as any)[key][index];\n }\n }\n\n const { key, index } = ancestors[ancestors.length - 1];\n\n return { parent, key, index };\n}\n\ntype MetadataState = {\n syntactic: {\n placeholders: Array<Placeholder>;\n placeholderNames: Set<string>;\n };\n legacy: {\n placeholders: Array<Placeholder>;\n placeholderNames: Set<string>;\n };\n placeholderWhitelist?: Set<string>;\n placeholderPattern?: RegExp | false;\n syntacticPlaceholders?: boolean;\n};\n\nfunction parseWithCodeFrame(\n code: string,\n parserOpts: ParserOpts,\n syntacticPlaceholders?: boolean,\n): t.File {\n const plugins = (parserOpts.plugins || []).slice();\n if (syntacticPlaceholders !== false) {\n plugins.push(\"placeholders\");\n }\n\n parserOpts = {\n allowAwaitOutsideFunction: true,\n allowReturnOutsideFunction: true,\n allowNewTargetOutsideFunction: true,\n allowSuperOutsideMethod: true,\n allowYieldOutsideFunction: true,\n sourceType: \"module\",\n ...parserOpts,\n plugins,\n };\n\n try {\n return parse(code, parserOpts);\n } catch (err) {\n const loc = err.loc;\n if (loc) {\n err.message += \"\\n\" + codeFrameColumns(code, { start: loc });\n err.code = \"BABEL_TEMPLATE_PARSE_ERROR\";\n }\n throw err;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAeA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAAqD;EAfnDG,gBAAgB;EAChBC,qBAAqB;EACrBC,UAAU;EACVC,YAAY;EACZC,eAAe;EACfC,eAAe;EACfC,aAAa;EACbC,WAAW;EACXC,eAAe;EACfC,oBAAoB;EACpBC;AAAQ,IAAAd,EAAA;AAuBV,MAAMe,OAAO,GAAG,eAAe;AAEhB,SAASC,qBAAqBA,CAC3CC,SAAuB,EACvBC,IAAY,EACZC,IAAkB,EACR;EACV,MAAM;IACJC,oBAAoB;IACpBC,kBAAkB;IAClBC,gBAAgB;IAChBC;EACF,CAAC,GAAGJ,IAAI;EAER,MAAMK,GAAG,GAAGC,kBAAkB,CAACP,IAAI,EAAEC,IAAI,CAACO,MAAM,EAAEH,qBAAqB,CAAC;EAExEV,oBAAoB,CAACW,GAAG,EAAE;IACxBF;EACF,CAAC,CAAC;EAEFL,SAAS,CAACU,QAAQ,CAACH,GAAG,CAAC;EAEvB,MAAMI,KAAoB,GAAG;IAC3BC,SAAS,EAAE;MAAEC,YAAY,EAAE,EAAE;MAAEC,gBAAgB,EAAE,IAAIC,GAAG,CAAC;IAAE,CAAC;IAC5DC,MAAM,EAAE;MAAEH,YAAY,EAAE,EAAE;MAAEC,gBAAgB,EAAE,IAAIC,GAAG,CAAC;IAAE,CAAC;IACzDZ,oBAAoB;IACpBC,kBAAkB;IAClBE;EACF,CAAC;EAEDT,QAAQ,CAACU,GAAG,EAAEU,yBAAyB,EAAEN,KAAK,CAAC;EAE/C,OAAAO,M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AAyB,EAAE,IAAI;IAC/BC,UAAU,EAAE;EAAQ,GACjBP,UAAU;IACbC;EAAO,EACR;EAED,IAAI;IACF,OAAO,IAAAO,aAAK,EAAClD,IAAI,EAAE0C,UAAU,CAAC;EAChC,CAAC,CAAC,OAAOS,GAAG,EAAE;IACZ,MAAMC,GAAG,GAAGD,GAAG,CAACC,GAAG;IACnB,IAAIA,GAAG,EAAE;MACPD,GAAG,CAACE,OAAO,IAAI,IAAI,GAAG,IAAAC,2BAAgB,EAACtD,IAAI,EAAE;QAAEuD,KAAK,EAAEH;MAAI,CAAC,CAAC;MAC5DD,GAAG,CAACnD,IAAI,GAAG,4BAA4B;IACzC;IACA,MAAMmD,GAAG;EACX;AACF","ignoreList":[]}
|
|
@@ -36,7 +36,8 @@ function populatePlaceholders(metadata, replacements) {
|
|
|
36
36
|
}
|
|
37
37
|
metadata.placeholders.slice().reverse().forEach(placeholder => {
|
|
38
38
|
try {
|
|
39
|
-
|
|
39
|
+
var _ref;
|
|
40
|
+
applyReplacement(placeholder, ast, (_ref = replacements && replacements[placeholder.name]) != null ? _ref : null);
|
|
40
41
|
} catch (e) {
|
|
41
42
|
e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
|
|
42
43
|
throw e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_t","require","blockStatement","cloneNode","emptyStatement","expressionStatement","identifier","isStatement","isStringLiteral","stringLiteral","validate","populatePlaceholders","metadata","replacements","ast","placeholders","forEach","placeholder","hasOwnProperty","call","name","placeholderName","Error","Object","keys","key","placeholderNames","has","slice","reverse","applyReplacement","e","message","replacement","isDuplicate","Array","isArray","map","node","parent","index","resolve","type","undefined","set","value","typeAnnotation","optional","decorators","items","splice"],"sources":["../src/populate.ts"],"sourcesContent":["import {\n blockStatement,\n cloneNode,\n emptyStatement,\n expressionStatement,\n identifier,\n isStatement,\n isStringLiteral,\n stringLiteral,\n validate,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport type { TemplateReplacements } from \"./options.ts\";\nimport type { Metadata, Placeholder } from \"./parse.ts\";\n\nexport default function populatePlaceholders(\n metadata: Metadata,\n replacements: TemplateReplacements,\n): t.File {\n const ast = cloneNode(metadata.ast);\n\n if (replacements) {\n metadata.placeholders.forEach(placeholder => {\n if (!Object.hasOwn(replacements, placeholder.name)) {\n const placeholderName = placeholder.name;\n\n throw new Error(\n `Error: No substitution given for \"${placeholderName}\". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}\n - { placeholderPattern: /^${placeholderName}$/ }`,\n );\n }\n });\n Object.keys(replacements).forEach(key => {\n if (!metadata.placeholderNames.has(key)) {\n throw new Error(`Unknown substitution \"${key}\" given`);\n }\n });\n }\n\n // Process in reverse order so AST mutation doesn't change indices that\n // will be needed for later calls to `placeholder.resolve()`.\n metadata.placeholders\n .slice()\n .reverse()\n .forEach(placeholder => {\n try {\n applyReplacement(\n placeholder,\n ast,\n (replacements && replacements[placeholder.name])
|
|
1
|
+
{"version":3,"names":["_t","require","blockStatement","cloneNode","emptyStatement","expressionStatement","identifier","isStatement","isStringLiteral","stringLiteral","validate","populatePlaceholders","metadata","replacements","ast","placeholders","forEach","placeholder","hasOwnProperty","call","name","placeholderName","Error","Object","keys","key","placeholderNames","has","slice","reverse","_ref","applyReplacement","e","message","replacement","isDuplicate","Array","isArray","map","node","parent","index","resolve","type","undefined","set","value","typeAnnotation","optional","decorators","items","splice"],"sources":["../src/populate.ts"],"sourcesContent":["import {\n blockStatement,\n cloneNode,\n emptyStatement,\n expressionStatement,\n identifier,\n isStatement,\n isStringLiteral,\n stringLiteral,\n validate,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport type { TemplateReplacements } from \"./options.ts\";\nimport type { Metadata, Placeholder } from \"./parse.ts\";\n\nexport default function populatePlaceholders(\n metadata: Metadata,\n replacements: TemplateReplacements,\n): t.File {\n const ast = cloneNode(metadata.ast);\n\n if (replacements) {\n metadata.placeholders.forEach(placeholder => {\n if (!Object.hasOwn(replacements, placeholder.name)) {\n const placeholderName = placeholder.name;\n\n throw new Error(\n `Error: No substitution given for \"${placeholderName}\". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}\n - { placeholderPattern: /^${placeholderName}$/ }`,\n );\n }\n });\n Object.keys(replacements).forEach(key => {\n if (!metadata.placeholderNames.has(key)) {\n throw new Error(`Unknown substitution \"${key}\" given`);\n }\n });\n }\n\n // Process in reverse order so AST mutation doesn't change indices that\n // will be needed for later calls to `placeholder.resolve()`.\n metadata.placeholders\n .slice()\n .reverse()\n .forEach(placeholder => {\n try {\n applyReplacement(\n placeholder,\n ast,\n (replacements && replacements[placeholder.name]) ?? null,\n );\n } catch (e) {\n e.message = `@babel/template placeholder \"${placeholder.name}\": ${e.message}`;\n throw e;\n }\n });\n\n return ast;\n}\n\nfunction applyReplacement(\n placeholder: Placeholder,\n ast: t.File,\n replacement: any,\n) {\n // Track inserted nodes and clone them if they are inserted more than\n // once to avoid injecting the same node multiple times.\n if (placeholder.isDuplicate) {\n if (Array.isArray(replacement)) {\n replacement = replacement.map(node => cloneNode(node));\n } else if (typeof replacement === \"object\") {\n replacement = cloneNode(replacement);\n }\n }\n\n const { parent, key, index } = placeholder.resolve(ast);\n\n if (placeholder.type === \"string\") {\n if (typeof replacement === \"string\") {\n replacement = stringLiteral(replacement);\n }\n if (!replacement || !isStringLiteral(replacement)) {\n throw new Error(\"Expected string substitution\");\n }\n } else if (placeholder.type === \"statement\") {\n if (index === undefined) {\n if (!replacement) {\n replacement = emptyStatement();\n } else if (Array.isArray(replacement)) {\n replacement = blockStatement(replacement);\n } else if (typeof replacement === \"string\") {\n replacement = expressionStatement(identifier(replacement));\n } else if (!isStatement(replacement)) {\n replacement = expressionStatement(replacement);\n }\n } else {\n if (replacement && !Array.isArray(replacement)) {\n if (typeof replacement === \"string\") {\n replacement = identifier(replacement);\n }\n if (!isStatement(replacement)) {\n replacement = expressionStatement(replacement);\n }\n }\n }\n } else if (placeholder.type === \"param\") {\n if (typeof replacement === \"string\") {\n replacement = identifier(replacement);\n }\n\n if (index === undefined) throw new Error(\"Assertion failure.\");\n } else {\n if (typeof replacement === \"string\") {\n replacement = identifier(replacement);\n }\n if (Array.isArray(replacement)) {\n throw new Error(\"Cannot replace single expression with an array.\");\n }\n }\n\n function set(parent: any, key: any, value: any) {\n const node = parent[key] as t.Node;\n parent[key] = value;\n if (node.type === \"Identifier\" || node.type === \"Placeholder\") {\n if (node.typeAnnotation) {\n value.typeAnnotation = node.typeAnnotation;\n }\n if (node.optional) {\n value.optional = node.optional;\n }\n if (node.decorators) {\n value.decorators = node.decorators;\n }\n }\n }\n\n if (index === undefined) {\n validate(parent, key, replacement);\n\n set(parent, key, replacement);\n } else {\n const items: Array<t.Node> = (parent as any)[key].slice();\n\n if (placeholder.type === \"statement\" || placeholder.type === \"param\") {\n if (replacement == null) {\n items.splice(index, 1);\n } else if (Array.isArray(replacement)) {\n items.splice(index, 1, ...replacement);\n } else {\n set(items, index, replacement);\n }\n } else {\n set(items, index, replacement);\n }\n\n validate(parent, key, items);\n (parent as any)[key] = items;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAUsB;EATpBC,cAAc;EACdC,SAAS;EACTC,cAAc;EACdC,mBAAmB;EACnBC,UAAU;EACVC,WAAW;EACXC,eAAe;EACfC,aAAa;EACbC;AAAQ,IAAAV,EAAA;AAOK,SAASW,oBAAoBA,CAC1CC,QAAkB,EAClBC,YAAkC,EAC1B;EACR,MAAMC,GAAG,GAAGX,SAAS,CAACS,QAAQ,CAACE,GAAG,CAAC;EAEnC,IAAID,YAAY,EAAE;IAChBD,QAAQ,CAACG,YAAY,CAACC,OAAO,CAACC,WAAW,IAAI;MAC3C,IAAI,CAACC,cAAA,CAAAC,IAAA,CAAcN,YAAY,EAAE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C;EAC/B,CAAC,MAAM;IACL,MAAMgB,KAAoB,GAAIV,MAAM,CAASf,GAAG,CAAC,CAACG,KAAK,CAAC,CAAC;IAEzD,IAAIX,WAAW,CAAC0B,IAAI,KAAK,WAAW,IAAI1B,WAAW,CAAC0B,IAAI,KAAK,OAAO,EAAE;MACpE,IAAIT,WAAW,IAAI,IAAI,EAAE;QACvBgB,KAAK,CAACC,MAAM,CAACV,KAAK,EAAE,CAAC,CAAC;MACxB,CAAC,MAAM,IAAIL,KAAK,CAACC,OAAO,CAACH,WAAW,CAAC,EAAE;QACrCgB,KAAK,CAACC,MAAM,CAACV,KAAK,EAAE,CAAC,EAAE,GAAGP,WAAW,CAAC;MACxC,CAAC,MAAM;QACLW,GAAG,CAACK,KAAK,EAAET,KAAK,EAAEP,WAAW,CAAC;MAChC;IACF,CAAC,MAAM;MACLW,GAAG,CAACK,KAAK,EAAET,KAAK,EAAEP,WAAW,CAAC;IAChC;IAEAxB,QAAQ,CAAC8B,MAAM,EAAEf,GAAG,EAAEyB,KAAK,CAAC;IAC3BV,MAAM,CAASf,GAAG,CAAC,GAAGyB,KAAK;EAC9B;AACF","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babel/template",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.27.2",
|
|
4
4
|
"description": "Generate an AST from a string template.",
|
|
5
5
|
"author": "The Babel Team (https://babel.dev/team)",
|
|
6
6
|
"homepage": "https://babel.dev/docs/en/next/babel-template",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
},
|
|
17
17
|
"main": "./lib/index.js",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@babel/code-frame": "^7.
|
|
20
|
-
"@babel/parser": "^7.
|
|
21
|
-
"@babel/types": "^7.
|
|
19
|
+
"@babel/code-frame": "^7.27.1",
|
|
20
|
+
"@babel/parser": "^7.27.2",
|
|
21
|
+
"@babel/types": "^7.27.1"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=6.9.0"
|
|
@@ -21,23 +21,17 @@ function clearPath() {
|
|
|
21
21
|
function clearScope() {
|
|
22
22
|
exports.scope = scope = new WeakMap();
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (_pathsCache$get = pathsCache.get((_hub = hub) != null ? _hub : nullHub)) == null ? void 0 : _pathsCache$get.get(parent);
|
|
24
|
+
function getCachedPaths(path) {
|
|
25
|
+
const {
|
|
26
|
+
parent,
|
|
27
|
+
parentPath
|
|
28
|
+
} = path;
|
|
29
|
+
return pathsCache.get(parent);
|
|
31
30
|
}
|
|
32
|
-
function getOrCreateCachedPaths(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
let parents = pathsCache.get((_hub2 = hub) != null ? _hub2 : nullHub);
|
|
38
|
-
if (!parents) pathsCache.set((_hub3 = hub) != null ? _hub3 : nullHub, parents = new WeakMap());
|
|
39
|
-
let paths = parents.get(parent);
|
|
40
|
-
if (!paths) parents.set(parent, paths = new Map());
|
|
31
|
+
function getOrCreateCachedPaths(node, parentPath) {
|
|
32
|
+
;
|
|
33
|
+
let paths = pathsCache.get(node);
|
|
34
|
+
if (!paths) pathsCache.set(node, paths = new Map());
|
|
41
35
|
return paths;
|
|
42
36
|
}
|
|
43
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pathsCache","exports","path","WeakMap","scope","clear","clearPath","clearScope","
|
|
1
|
+
{"version":3,"names":["pathsCache","exports","path","WeakMap","scope","clear","clearPath","clearScope","getCachedPaths","parent","parentPath","get","getOrCreateCachedPaths","node","paths","set","Map"],"sources":["../src/cache.ts"],"sourcesContent":["import type { Node } from \"@babel/types\";\nimport type NodePath from \"./path/index.ts\";\nimport type Scope from \"./scope/index.ts\";\n\nlet pathsCache: WeakMap<Node, Map<Node, NodePath>> = new WeakMap();\nexport { pathsCache as path };\nexport let scope: WeakMap<Node, Scope> = new WeakMap();\n\nexport function clear() {\n clearPath();\n clearScope();\n}\n\nexport function clearPath() {\n pathsCache = new WeakMap();\n}\n\nexport function clearScope() {\n scope = new WeakMap();\n}\n\nexport function getCachedPaths(path: NodePath) {\n const { parent, parentPath } = path;\n return process.env.BABEL_8_BREAKING && parentPath\n ? parentPath._store\n : pathsCache.get(parent);\n}\n\nexport function getOrCreateCachedPaths(node: Node, parentPath?: NodePath) {\n if (process.env.BABEL_8_BREAKING && parentPath) {\n return (parentPath._store ||= new Map());\n }\n\n let paths = pathsCache.get(node);\n if (!paths) pathsCache.set(node, (paths = new Map()));\n\n return paths;\n}\n"],"mappings":";;;;;;;;;;;AAIA,IAAIA,UAA8C,GAAAC,OAAA,CAAAC,IAAA,GAAG,IAAIC,OAAO,CAAC,CAAC;AAE3D,IAAIC,KAA2B,GAAAH,OAAA,CAAAG,KAAA,GAAG,IAAID,OAAO,CAAC,CAAC;AAE/C,SAASE,KAAKA,CAAA,EAAG;EACtBC,SAAS,CAAC,CAAC;EACXC,UAAU,CAAC,CAAC;AACd;AAEO,SAASD,SAASA,CAAA,EAAG;EAC1BL,OAAA,CAAAC,IAAA,GAAAF,UAAU,GAAG,IAAIG,OAAO,CAAC,CAAC;AAC5B;AAEO,SAASI,UAAUA,CAAA,EAAG;EAC3BN,OAAA,CAAAG,KAAA,GAAAA,KAAK,GAAG,IAAID,OAAO,CAAC,CAAC;AACvB;AAEO,SAASK,cAAcA,CAACN,IAAc,EAAE;EAC7C,MAAM;IAAEO,MAAM;IAAEC;EAAW,CAAC,GAAGR,IAAI;EACnC,OAEIF,UAAU,CAACW,GAAG,CAACF,MAAM,CAAC;AAC5B;AAEO,SAASG,sBAAsBA,CAACC,IAAU,EAAEH,UAAqB,EAAE;EAAA;EAKxE,IAAII,KAAK,GAAGd,UAAU,CAACW,GAAG,CAACE,IAAI,CAAC;EAChC,IAAI,CAACC,KAAK,EAAEd,UAAU,CAACe,GAAG,CAACF,IAAI,EAAGC,KAAK,GAAG,IAAIE,GAAG,CAAC,CAAE,CAAC;EAErD,OAAOF,KAAK;AACd","ignoreList":[]}
|