@mantine/spotlight 9.0.0-alpha.5 → 9.0.0-alpha.6
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/cjs/Spotlight.cjs +85 -75
- package/cjs/Spotlight.cjs.map +1 -1
- package/cjs/Spotlight.context.cjs +6 -10
- package/cjs/Spotlight.context.cjs.map +1 -1
- package/cjs/Spotlight.module.cjs +21 -0
- package/cjs/Spotlight.module.cjs.map +1 -0
- package/cjs/SpotlightAction.cjs +75 -92
- package/cjs/SpotlightAction.cjs.map +1 -1
- package/cjs/SpotlightActionsGroup.cjs +23 -29
- package/cjs/SpotlightActionsGroup.cjs.map +1 -1
- package/cjs/SpotlightActionsList.cjs +35 -38
- package/cjs/SpotlightActionsList.cjs.map +1 -1
- package/cjs/SpotlightEmpty.cjs +21 -19
- package/cjs/SpotlightEmpty.cjs.map +1 -1
- package/cjs/SpotlightFooter.cjs +21 -19
- package/cjs/SpotlightFooter.cjs.map +1 -1
- package/cjs/SpotlightRoot.cjs +92 -120
- package/cjs/SpotlightRoot.cjs.map +1 -1
- package/cjs/SpotlightSearch.cjs +48 -60
- package/cjs/SpotlightSearch.cjs.map +1 -1
- package/cjs/default-spotlight-filter.cjs +41 -46
- package/cjs/default-spotlight-filter.cjs.map +1 -1
- package/cjs/get-hotkeys.cjs +10 -15
- package/cjs/get-hotkeys.cjs.map +1 -1
- package/cjs/index.cjs +27 -32
- package/cjs/is-actions-group.cjs +7 -7
- package/cjs/is-actions-group.cjs.map +1 -1
- package/cjs/limit-actions.cjs +23 -28
- package/cjs/limit-actions.cjs.map +1 -1
- package/cjs/spotlight.store.cjs +98 -117
- package/cjs/spotlight.store.cjs.map +1 -1
- package/esm/Spotlight.context.mjs +7 -8
- package/esm/Spotlight.context.mjs.map +1 -1
- package/esm/Spotlight.mjs +74 -62
- package/esm/Spotlight.mjs.map +1 -1
- package/esm/Spotlight.module.mjs +21 -0
- package/esm/Spotlight.module.mjs.map +1 -0
- package/esm/SpotlightAction.mjs +74 -89
- package/esm/SpotlightAction.mjs.map +1 -1
- package/esm/SpotlightActionsGroup.mjs +22 -26
- package/esm/SpotlightActionsGroup.mjs.map +1 -1
- package/esm/SpotlightActionsList.mjs +34 -35
- package/esm/SpotlightActionsList.mjs.map +1 -1
- package/esm/SpotlightEmpty.mjs +20 -16
- package/esm/SpotlightEmpty.mjs.map +1 -1
- package/esm/SpotlightFooter.mjs +20 -16
- package/esm/SpotlightFooter.mjs.map +1 -1
- package/esm/SpotlightRoot.mjs +91 -117
- package/esm/SpotlightRoot.mjs.map +1 -1
- package/esm/SpotlightSearch.mjs +47 -57
- package/esm/SpotlightSearch.mjs.map +1 -1
- package/esm/default-spotlight-filter.mjs +41 -44
- package/esm/default-spotlight-filter.mjs.map +1 -1
- package/esm/get-hotkeys.mjs +10 -13
- package/esm/get-hotkeys.mjs.map +1 -1
- package/esm/index.mjs +11 -11
- package/esm/is-actions-group.mjs +7 -5
- package/esm/is-actions-group.mjs.map +1 -1
- package/esm/limit-actions.mjs +23 -26
- package/esm/limit-actions.mjs.map +1 -1
- package/esm/spotlight.store.mjs +96 -100
- package/esm/spotlight.store.mjs.map +1 -1
- package/package.json +4 -4
- package/cjs/Spotlight.module.css.cjs +0 -7
- package/cjs/Spotlight.module.css.cjs.map +0 -1
- package/cjs/index.cjs.map +0 -1
- package/esm/Spotlight.module.css.mjs +0 -5
- package/esm/Spotlight.module.css.mjs.map +0 -1
- package/esm/index.mjs.map +0 -1
|
@@ -1,41 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
...others,
|
|
33
|
-
children
|
|
34
|
-
}
|
|
35
|
-
);
|
|
1
|
+
"use client";
|
|
2
|
+
const require_spotlight_store = require("./spotlight.store.cjs");
|
|
3
|
+
const require_Spotlight_context = require("./Spotlight.context.cjs");
|
|
4
|
+
const require_Spotlight_module = require("./Spotlight.module.cjs");
|
|
5
|
+
let _mantine_core = require("@mantine/core");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let react = require("react");
|
|
8
|
+
//#region packages/@mantine/spotlight/src/SpotlightActionsList.tsx
|
|
9
|
+
const SpotlightActionsList = (0, _mantine_core.factory)((props) => {
|
|
10
|
+
const { className, style, id, children, vars, classNames, styles, ...others } = (0, _mantine_core.useProps)("SpotlightActionsList", null, props);
|
|
11
|
+
const ctx = require_Spotlight_context.useSpotlightContext();
|
|
12
|
+
const generatedId = `mantine-${(0, react.useId)().replace(/:/g, "")}`;
|
|
13
|
+
const listId = id || generatedId;
|
|
14
|
+
(0, react.useEffect)(() => {
|
|
15
|
+
require_spotlight_store.spotlightActions.setListId(listId, ctx.store);
|
|
16
|
+
return () => require_spotlight_store.spotlightActions.setListId("", ctx.store);
|
|
17
|
+
}, []);
|
|
18
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.ScrollArea.Autosize, {
|
|
19
|
+
...ctx.getStyles("actionsList", {
|
|
20
|
+
className,
|
|
21
|
+
style,
|
|
22
|
+
classNames,
|
|
23
|
+
styles
|
|
24
|
+
}),
|
|
25
|
+
type: "scroll",
|
|
26
|
+
scrollbarSize: "var(--spotlight-actions-list-padding)",
|
|
27
|
+
offsetScrollbars: "y",
|
|
28
|
+
id: listId,
|
|
29
|
+
...others,
|
|
30
|
+
children
|
|
31
|
+
});
|
|
36
32
|
});
|
|
37
|
-
SpotlightActionsList.classes =
|
|
33
|
+
SpotlightActionsList.classes = require_Spotlight_module.default;
|
|
38
34
|
SpotlightActionsList.displayName = "@mantine/spotlight/SpotlightActionsList";
|
|
39
|
-
|
|
35
|
+
//#endregion
|
|
40
36
|
exports.SpotlightActionsList = SpotlightActionsList;
|
|
41
|
-
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=SpotlightActionsList.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotlightActionsList.cjs","sources":["../src/SpotlightActionsList.tsx"],"sourcesContent":["import { useEffect, useId } from 'react';\nimport {\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n ScrollArea,\n useProps,\n} from '@mantine/core';\nimport { useSpotlightContext } from './Spotlight.context';\nimport { spotlightActions } from './spotlight.store';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightActionsListStylesNames = 'actionsList' | 'actionsListInner';\n\nexport interface SpotlightActionsListProps\n extends BoxProps, CompoundStylesApiProps<SpotlightActionsListFactory>, ElementProps<'div'> {}\n\nexport type SpotlightActionsListFactory = Factory<{\n props: SpotlightActionsListProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightActionsListStylesNames;\n compound: true;\n}>;\n\nexport const SpotlightActionsList = factory<SpotlightActionsListFactory>((props) => {\n const { className, style, id, children, vars, classNames, styles, ...others } = useProps(\n 'SpotlightActionsList',\n null,\n props\n );\n const ctx = useSpotlightContext();\n const generatedId = `mantine-${useId().replace(/:/g, '')}`;\n const listId = id || generatedId;\n\n useEffect(() => {\n spotlightActions.setListId(listId, ctx.store);\n return () => spotlightActions.setListId('', ctx.store);\n }, []);\n\n return (\n <ScrollArea.Autosize\n {...ctx.getStyles('actionsList', { className, style, classNames, styles })}\n type=\"scroll\"\n scrollbarSize=\"var(--spotlight-actions-list-padding)\"\n offsetScrollbars=\"y\"\n id={listId}\n {...others}\n >\n {children}\n </ScrollArea.Autosize>\n );\n});\n\nSpotlightActionsList.classes = classes;\nSpotlightActionsList.displayName = '@mantine/spotlight/SpotlightActionsList';\n"],"
|
|
1
|
+
{"version":3,"file":"SpotlightActionsList.cjs","names":["useSpotlightContext","spotlightActions","ScrollArea","classes"],"sources":["../src/SpotlightActionsList.tsx"],"sourcesContent":["import { useEffect, useId } from 'react';\nimport {\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n ScrollArea,\n useProps,\n} from '@mantine/core';\nimport { useSpotlightContext } from './Spotlight.context';\nimport { spotlightActions } from './spotlight.store';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightActionsListStylesNames = 'actionsList' | 'actionsListInner';\n\nexport interface SpotlightActionsListProps\n extends BoxProps, CompoundStylesApiProps<SpotlightActionsListFactory>, ElementProps<'div'> {}\n\nexport type SpotlightActionsListFactory = Factory<{\n props: SpotlightActionsListProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightActionsListStylesNames;\n compound: true;\n}>;\n\nexport const SpotlightActionsList = factory<SpotlightActionsListFactory>((props) => {\n const { className, style, id, children, vars, classNames, styles, ...others } = useProps(\n 'SpotlightActionsList',\n null,\n props\n );\n const ctx = useSpotlightContext();\n const generatedId = `mantine-${useId().replace(/:/g, '')}`;\n const listId = id || generatedId;\n\n useEffect(() => {\n spotlightActions.setListId(listId, ctx.store);\n return () => spotlightActions.setListId('', ctx.store);\n }, []);\n\n return (\n <ScrollArea.Autosize\n {...ctx.getStyles('actionsList', { className, style, classNames, styles })}\n type=\"scroll\"\n scrollbarSize=\"var(--spotlight-actions-list-padding)\"\n offsetScrollbars=\"y\"\n id={listId}\n {...others}\n >\n {children}\n </ScrollArea.Autosize>\n );\n});\n\nSpotlightActionsList.classes = classes;\nSpotlightActionsList.displayName = '@mantine/spotlight/SpotlightActionsList';\n"],"mappings":";;;;;;;;AA0BA,MAAa,wBAAA,GAAA,cAAA,UAA6D,UAAU;CAClF,MAAM,EAAE,WAAW,OAAO,IAAI,UAAU,MAAM,YAAY,QAAQ,GAAG,YAAA,GAAA,cAAA,UACnE,wBACA,MACA,MACD;CACD,MAAM,MAAMA,0BAAAA,qBAAqB;CACjC,MAAM,cAAc,YAAA,GAAA,MAAA,QAAkB,CAAC,QAAQ,MAAM,GAAG;CACxD,MAAM,SAAS,MAAM;AAErB,EAAA,GAAA,MAAA,iBAAgB;AACd,0BAAA,iBAAiB,UAAU,QAAQ,IAAI,MAAM;AAC7C,eAAaC,wBAAAA,iBAAiB,UAAU,IAAI,IAAI,MAAM;IACrD,EAAE,CAAC;AAEN,QACE,iBAAA,GAAA,kBAAA,KAACC,cAAAA,WAAW,UAAZ;EACE,GAAI,IAAI,UAAU,eAAe;GAAE;GAAW;GAAO;GAAY;GAAQ,CAAC;EAC1E,MAAK;EACL,eAAc;EACd,kBAAiB;EACjB,IAAI;EACJ,GAAI;EAEH;EACmB,CAAA;EAExB;AAEF,qBAAqB,UAAUC,yBAAAA;AAC/B,qBAAqB,cAAc"}
|
package/cjs/SpotlightEmpty.cjs
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
const require_Spotlight_context = require("./Spotlight.context.cjs");
|
|
3
|
+
const require_Spotlight_module = require("./Spotlight.module.cjs");
|
|
4
|
+
let _mantine_core = require("@mantine/core");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
//#region packages/@mantine/spotlight/src/SpotlightEmpty.tsx
|
|
7
|
+
const SpotlightEmpty = (0, _mantine_core.factory)((props) => {
|
|
8
|
+
const { className, style, classNames, styles, ...others } = (0, _mantine_core.useProps)("SpotlightEmpty", null, props);
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
|
|
10
|
+
...require_Spotlight_context.useSpotlightContext().getStyles("empty", {
|
|
11
|
+
classNames,
|
|
12
|
+
styles,
|
|
13
|
+
className,
|
|
14
|
+
style
|
|
15
|
+
}),
|
|
16
|
+
...others
|
|
17
|
+
});
|
|
17
18
|
});
|
|
18
|
-
SpotlightEmpty.classes =
|
|
19
|
+
SpotlightEmpty.classes = require_Spotlight_module.default;
|
|
19
20
|
SpotlightEmpty.displayName = "@mantine/spotlight/SpotlightEmpty";
|
|
20
|
-
|
|
21
|
+
//#endregion
|
|
21
22
|
exports.SpotlightEmpty = SpotlightEmpty;
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=SpotlightEmpty.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotlightEmpty.cjs","sources":["../src/SpotlightEmpty.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '@mantine/core';\nimport { useSpotlightContext } from './Spotlight.context';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightEmptyStylesNames = 'empty';\n\nexport interface SpotlightEmptyProps\n extends BoxProps, CompoundStylesApiProps<SpotlightEmptyFactory>, ElementProps<'div'> {}\n\nexport type SpotlightEmptyFactory = Factory<{\n props: SpotlightEmptyProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightEmptyStylesNames;\n compound: true;\n}>;\n\nexport const SpotlightEmpty = factory<SpotlightEmptyFactory>((props) => {\n const { className, style, classNames, styles, ...others } = useProps(\n 'SpotlightEmpty',\n null,\n props\n );\n\n const ctx = useSpotlightContext();\n\n return <Box {...ctx.getStyles('empty', { classNames, styles, className, style })} {...others} />;\n});\n\nSpotlightEmpty.classes = classes;\nSpotlightEmpty.displayName = '@mantine/spotlight/SpotlightEmpty';\n"],"
|
|
1
|
+
{"version":3,"file":"SpotlightEmpty.cjs","names":["Box","useSpotlightContext","classes"],"sources":["../src/SpotlightEmpty.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '@mantine/core';\nimport { useSpotlightContext } from './Spotlight.context';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightEmptyStylesNames = 'empty';\n\nexport interface SpotlightEmptyProps\n extends BoxProps, CompoundStylesApiProps<SpotlightEmptyFactory>, ElementProps<'div'> {}\n\nexport type SpotlightEmptyFactory = Factory<{\n props: SpotlightEmptyProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightEmptyStylesNames;\n compound: true;\n}>;\n\nexport const SpotlightEmpty = factory<SpotlightEmptyFactory>((props) => {\n const { className, style, classNames, styles, ...others } = useProps(\n 'SpotlightEmpty',\n null,\n props\n );\n\n const ctx = useSpotlightContext();\n\n return <Box {...ctx.getStyles('empty', { classNames, styles, className, style })} {...others} />;\n});\n\nSpotlightEmpty.classes = classes;\nSpotlightEmpty.displayName = '@mantine/spotlight/SpotlightEmpty';\n"],"mappings":";;;;;;AAwBA,MAAa,kBAAA,GAAA,cAAA,UAAiD,UAAU;CACtE,MAAM,EAAE,WAAW,OAAO,YAAY,QAAQ,GAAG,YAAA,GAAA,cAAA,UAC/C,kBACA,MACA,MACD;AAID,QAAO,iBAAA,GAAA,kBAAA,KAACA,cAAAA,KAAD;EAAK,GAFAC,0BAAAA,qBAAqB,CAEb,UAAU,SAAS;GAAE;GAAY;GAAQ;GAAW;GAAO,CAAC;EAAE,GAAI;EAAU,CAAA;EAChG;AAEF,eAAe,UAAUC,yBAAAA;AACzB,eAAe,cAAc"}
|
package/cjs/SpotlightFooter.cjs
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
const require_Spotlight_context = require("./Spotlight.context.cjs");
|
|
3
|
+
const require_Spotlight_module = require("./Spotlight.module.cjs");
|
|
4
|
+
let _mantine_core = require("@mantine/core");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
//#region packages/@mantine/spotlight/src/SpotlightFooter.tsx
|
|
7
|
+
const SpotlightFooter = (0, _mantine_core.factory)((props) => {
|
|
8
|
+
const { className, style, classNames, styles, ...others } = (0, _mantine_core.useProps)("SpotlightFooter", null, props);
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
|
|
10
|
+
...require_Spotlight_context.useSpotlightContext().getStyles("footer", {
|
|
11
|
+
className,
|
|
12
|
+
classNames,
|
|
13
|
+
style,
|
|
14
|
+
styles
|
|
15
|
+
}),
|
|
16
|
+
...others
|
|
17
|
+
});
|
|
17
18
|
});
|
|
18
|
-
SpotlightFooter.classes =
|
|
19
|
+
SpotlightFooter.classes = require_Spotlight_module.default;
|
|
19
20
|
SpotlightFooter.displayName = "@mantine/spotlight/SpotlightFooter";
|
|
20
|
-
|
|
21
|
+
//#endregion
|
|
21
22
|
exports.SpotlightFooter = SpotlightFooter;
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=SpotlightFooter.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotlightFooter.cjs","sources":["../src/SpotlightFooter.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '@mantine/core';\nimport { useSpotlightContext } from './Spotlight.context';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightFooterStylesNames = 'footer';\n\nexport interface SpotlightFooterProps\n extends BoxProps, CompoundStylesApiProps<SpotlightFooterFactory>, ElementProps<'div'> {}\n\nexport type SpotlightFooterFactory = Factory<{\n props: SpotlightFooterProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightFooterStylesNames;\n compound: true;\n}>;\n\nexport const SpotlightFooter = factory<SpotlightFooterFactory>((props) => {\n const { className, style, classNames, styles, ...others } = useProps(\n 'SpotlightFooter',\n null,\n props\n );\n const ctx = useSpotlightContext();\n return <Box {...ctx.getStyles('footer', { className, classNames, style, styles })} {...others} />;\n});\n\nSpotlightFooter.classes = classes;\nSpotlightFooter.displayName = '@mantine/spotlight/SpotlightFooter';\n"],"
|
|
1
|
+
{"version":3,"file":"SpotlightFooter.cjs","names":["Box","useSpotlightContext","classes"],"sources":["../src/SpotlightFooter.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '@mantine/core';\nimport { useSpotlightContext } from './Spotlight.context';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightFooterStylesNames = 'footer';\n\nexport interface SpotlightFooterProps\n extends BoxProps, CompoundStylesApiProps<SpotlightFooterFactory>, ElementProps<'div'> {}\n\nexport type SpotlightFooterFactory = Factory<{\n props: SpotlightFooterProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightFooterStylesNames;\n compound: true;\n}>;\n\nexport const SpotlightFooter = factory<SpotlightFooterFactory>((props) => {\n const { className, style, classNames, styles, ...others } = useProps(\n 'SpotlightFooter',\n null,\n props\n );\n const ctx = useSpotlightContext();\n return <Box {...ctx.getStyles('footer', { className, classNames, style, styles })} {...others} />;\n});\n\nSpotlightFooter.classes = classes;\nSpotlightFooter.displayName = '@mantine/spotlight/SpotlightFooter';\n"],"mappings":";;;;;;AAwBA,MAAa,mBAAA,GAAA,cAAA,UAAmD,UAAU;CACxE,MAAM,EAAE,WAAW,OAAO,YAAY,QAAQ,GAAG,YAAA,GAAA,cAAA,UAC/C,mBACA,MACA,MACD;AAED,QAAO,iBAAA,GAAA,kBAAA,KAACA,cAAAA,KAAD;EAAK,GADAC,0BAAAA,qBAAqB,CACb,UAAU,UAAU;GAAE;GAAW;GAAY;GAAO;GAAQ,CAAC;EAAE,GAAI;EAAU,CAAA;EACjG;AAEF,gBAAgB,UAAUC,yBAAAA;AAC1B,gBAAgB,cAAc"}
|
package/cjs/SpotlightRoot.cjs
CHANGED
|
@@ -1,125 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var Spotlight_module = require('./Spotlight.module.css.cjs');
|
|
11
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
const require_spotlight_store = require("./spotlight.store.cjs");
|
|
3
|
+
const require_Spotlight_context = require("./Spotlight.context.cjs");
|
|
4
|
+
const require_Spotlight_module = require("./Spotlight.module.cjs");
|
|
5
|
+
const require_get_hotkeys = require("./get-hotkeys.cjs");
|
|
6
|
+
let _mantine_hooks = require("@mantine/hooks");
|
|
7
|
+
let _mantine_core = require("@mantine/core");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
//#region packages/@mantine/spotlight/src/SpotlightRoot.tsx
|
|
12
10
|
const defaultProps = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
size: 600,
|
|
12
|
+
yOffset: 80,
|
|
13
|
+
zIndex: (0, _mantine_core.getDefaultZIndex)("max"),
|
|
14
|
+
overlayProps: {
|
|
15
|
+
backgroundOpacity: .35,
|
|
16
|
+
blur: 7
|
|
17
|
+
},
|
|
18
|
+
transitionProps: {
|
|
19
|
+
duration: 200,
|
|
20
|
+
transition: "pop"
|
|
21
|
+
},
|
|
22
|
+
store: require_spotlight_store.spotlightStore,
|
|
23
|
+
clearQueryOnClose: true,
|
|
24
|
+
closeOnActionTrigger: true,
|
|
25
|
+
shortcut: "mod + K",
|
|
26
|
+
maxHeight: 400
|
|
23
27
|
};
|
|
24
|
-
const SpotlightRoot =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
setQuery,
|
|
88
|
-
store,
|
|
89
|
-
closeOnActionTrigger
|
|
90
|
-
},
|
|
91
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
92
|
-
core.Modal,
|
|
93
|
-
{
|
|
94
|
-
...others,
|
|
95
|
-
withCloseButton: false,
|
|
96
|
-
opened: opened || !!forceOpened,
|
|
97
|
-
padding: 0,
|
|
98
|
-
onClose: () => spotlight_store.spotlightActions.close(store),
|
|
99
|
-
className,
|
|
100
|
-
style,
|
|
101
|
-
classNames: resolvedClassNames,
|
|
102
|
-
styles: resolvedStyles,
|
|
103
|
-
attributes,
|
|
104
|
-
transitionProps: {
|
|
105
|
-
...transitionProps,
|
|
106
|
-
onExited: () => {
|
|
107
|
-
clearQueryOnClose && setQuery("");
|
|
108
|
-
spotlight_store.spotlightActions.clearSpotlightState({ clearQuery: clearQueryOnClose }, store);
|
|
109
|
-
transitionProps?.onExited?.();
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
__vars: { "--spotlight-max-height": scrollable ? core.rem(maxHeight) : void 0 },
|
|
113
|
-
__staticSelector: "Spotlight",
|
|
114
|
-
"data-scrollable": scrollable || void 0,
|
|
115
|
-
children
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
}
|
|
119
|
-
);
|
|
28
|
+
const SpotlightRoot = (0, _mantine_core.factory)((_props) => {
|
|
29
|
+
const props = (0, _mantine_core.useProps)("SpotlightRoot", defaultProps, _props);
|
|
30
|
+
const { classNames, className, style, styles, unstyled, vars, store, children, query, onQueryChange, transitionProps, clearQueryOnClose, shortcut, tagsToIgnore, triggerOnContentEditable, disabled, onSpotlightOpen, onSpotlightClose, forceOpened, closeOnActionTrigger, maxHeight, scrollable, attributes, ...others } = props;
|
|
31
|
+
const { opened, query: storeQuery } = require_spotlight_store.useSpotlight(store);
|
|
32
|
+
const _query = typeof query === "string" ? query : storeQuery;
|
|
33
|
+
const setQuery = (q) => {
|
|
34
|
+
onQueryChange?.(q);
|
|
35
|
+
require_spotlight_store.spotlightActions.setQuery(q, store);
|
|
36
|
+
};
|
|
37
|
+
const getStyles = (0, _mantine_core.useStyles)({
|
|
38
|
+
name: "Spotlight",
|
|
39
|
+
classes: require_Spotlight_module.default,
|
|
40
|
+
props,
|
|
41
|
+
className,
|
|
42
|
+
style,
|
|
43
|
+
classNames,
|
|
44
|
+
styles,
|
|
45
|
+
unstyled,
|
|
46
|
+
attributes
|
|
47
|
+
});
|
|
48
|
+
const { resolvedClassNames, resolvedStyles } = (0, _mantine_core.useResolvedStylesApi)({
|
|
49
|
+
classNames,
|
|
50
|
+
styles,
|
|
51
|
+
props
|
|
52
|
+
});
|
|
53
|
+
(0, _mantine_hooks.useHotkeys)(require_get_hotkeys.getHotkeys(shortcut, store), tagsToIgnore, triggerOnContentEditable);
|
|
54
|
+
(0, _mantine_hooks.useDidUpdate)(() => {
|
|
55
|
+
opened ? onSpotlightOpen?.() : onSpotlightClose?.();
|
|
56
|
+
}, [opened]);
|
|
57
|
+
if (disabled) return null;
|
|
58
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Spotlight_context.SpotlightProvider, {
|
|
59
|
+
value: {
|
|
60
|
+
getStyles,
|
|
61
|
+
query: _query,
|
|
62
|
+
setQuery,
|
|
63
|
+
store,
|
|
64
|
+
closeOnActionTrigger
|
|
65
|
+
},
|
|
66
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Modal, {
|
|
67
|
+
...others,
|
|
68
|
+
withCloseButton: false,
|
|
69
|
+
opened: opened || !!forceOpened,
|
|
70
|
+
padding: 0,
|
|
71
|
+
onClose: () => require_spotlight_store.spotlightActions.close(store),
|
|
72
|
+
className,
|
|
73
|
+
style,
|
|
74
|
+
classNames: resolvedClassNames,
|
|
75
|
+
styles: resolvedStyles,
|
|
76
|
+
attributes,
|
|
77
|
+
transitionProps: {
|
|
78
|
+
...transitionProps,
|
|
79
|
+
onExited: () => {
|
|
80
|
+
clearQueryOnClose && setQuery("");
|
|
81
|
+
require_spotlight_store.spotlightActions.clearSpotlightState({ clearQuery: clearQueryOnClose }, store);
|
|
82
|
+
transitionProps?.onExited?.();
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
__vars: { "--spotlight-max-height": scrollable ? (0, _mantine_core.rem)(maxHeight) : void 0 },
|
|
86
|
+
__staticSelector: "Spotlight",
|
|
87
|
+
"data-scrollable": scrollable || void 0,
|
|
88
|
+
children
|
|
89
|
+
})
|
|
90
|
+
});
|
|
120
91
|
});
|
|
121
|
-
SpotlightRoot.classes =
|
|
92
|
+
SpotlightRoot.classes = require_Spotlight_module.default;
|
|
122
93
|
SpotlightRoot.displayName = "@mantine/spotlight/SpotlightRoot";
|
|
123
|
-
|
|
94
|
+
//#endregion
|
|
124
95
|
exports.SpotlightRoot = SpotlightRoot;
|
|
125
|
-
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=SpotlightRoot.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotlightRoot.cjs","sources":["../src/SpotlightRoot.tsx"],"sourcesContent":["import {\n factory,\n Factory,\n getDefaultZIndex,\n Modal,\n ModalProps,\n ModalStylesNames,\n rem,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDidUpdate, useHotkeys } from '@mantine/hooks';\nimport { getHotkeys } from './get-hotkeys';\nimport { SpotlightProvider } from './Spotlight.context';\nimport { spotlightActions, SpotlightStore, spotlightStore, useSpotlight } from './spotlight.store';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightRootStylesNames =\n | ModalStylesNames\n | 'search'\n | 'actionsList'\n | 'action'\n | 'empty'\n | 'footer'\n | 'actionBody'\n | 'actionLabel'\n | 'actionDescription'\n | 'actionSection'\n | 'actionsGroup';\n\nexport interface SpotlightRootProps\n extends\n StylesApiProps<SpotlightRootFactory>,\n Omit<\n ModalProps,\n | 'styles'\n | 'classNames'\n | 'vars'\n | 'variant'\n | 'opened'\n | 'onClose'\n | 'closeButtonProps'\n | 'withCloseButton'\n > {\n /** Spotlight store, can be used to create multiple instances of spotlight */\n store?: SpotlightStore;\n\n /** Controlled Spotlight search query */\n query?: string;\n\n /** Called when query changes */\n onQueryChange?: (query: string) => void;\n\n /** Determines whether the search query should be cleared when the spotlight is closed @default true */\n clearQueryOnClose?: boolean;\n\n /** Keyboard shortcut or a list of shortcuts to trigger spotlight @default 'mod + K' */\n shortcut?: string | string[] | null;\n\n /** A list of tags which when focused will be ignored by shortcut @default ['input', 'textarea', 'select'] */\n tagsToIgnore?: string[];\n\n /** Determines whether shortcut should trigger based in contentEditable @default false */\n triggerOnContentEditable?: boolean;\n\n /** If set, spotlight will not be rendered */\n disabled?: boolean;\n\n /** Called when spotlight opens */\n onSpotlightOpen?: () => void;\n\n /** Called when spotlight closes */\n onSpotlightClose?: () => void;\n\n /** Forces opened state, useful for tests */\n forceOpened?: boolean;\n\n /** Determines whether spotlight should be closed when one of the actions is triggered @default true */\n closeOnActionTrigger?: boolean;\n\n /** Spotlight content max-height. Ignored unless `scrollable` prop is set. @default 400 */\n maxHeight?: React.CSSProperties['maxHeight'];\n\n /** Determines whether the actions list should be scrollable. If not set, `maxHeight` is ignored @default false */\n scrollable?: boolean;\n}\n\nexport type SpotlightRootFactory = Factory<{\n props: SpotlightRootProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightRootStylesNames;\n compound: true;\n}>;\n\nconst defaultProps = {\n size: 600,\n yOffset: 80,\n zIndex: getDefaultZIndex('max'),\n overlayProps: { backgroundOpacity: 0.35, blur: 7 },\n transitionProps: { duration: 200, transition: 'pop' },\n store: spotlightStore,\n clearQueryOnClose: true,\n closeOnActionTrigger: true,\n shortcut: 'mod + K',\n maxHeight: 400,\n} satisfies Partial<SpotlightRootProps>;\n\nexport const SpotlightRoot = factory<SpotlightRootFactory>((_props) => {\n const props = useProps('SpotlightRoot', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n store,\n children,\n query,\n onQueryChange,\n transitionProps,\n clearQueryOnClose,\n shortcut,\n tagsToIgnore,\n triggerOnContentEditable,\n disabled,\n onSpotlightOpen,\n onSpotlightClose,\n forceOpened,\n closeOnActionTrigger,\n maxHeight,\n scrollable,\n attributes,\n ...others\n } = props;\n\n const { opened, query: storeQuery } = useSpotlight(store);\n const _query = typeof query === 'string' ? query : storeQuery;\n const setQuery = (q: string) => {\n onQueryChange?.(q);\n spotlightActions.setQuery(q, store);\n };\n\n const getStyles = useStyles<SpotlightRootFactory>({\n name: 'Spotlight',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<SpotlightRootFactory>({\n classNames,\n styles,\n props,\n });\n\n useHotkeys(getHotkeys(shortcut, store), tagsToIgnore, triggerOnContentEditable);\n\n useDidUpdate(() => {\n opened ? onSpotlightOpen?.() : onSpotlightClose?.();\n }, [opened]);\n\n if (disabled) {\n return null;\n }\n\n return (\n <SpotlightProvider\n value={{\n getStyles,\n query: _query,\n setQuery,\n store,\n closeOnActionTrigger,\n }}\n >\n <Modal\n {...others}\n withCloseButton={false}\n opened={opened || !!forceOpened}\n padding={0}\n onClose={() => spotlightActions.close(store)}\n className={className}\n style={style}\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n attributes={attributes}\n transitionProps={{\n ...transitionProps,\n onExited: () => {\n clearQueryOnClose && setQuery('');\n spotlightActions.clearSpotlightState({ clearQuery: clearQueryOnClose }, store);\n transitionProps?.onExited?.();\n },\n }}\n __vars={{ '--spotlight-max-height': scrollable ? rem(maxHeight) : undefined }}\n __staticSelector=\"Spotlight\"\n data-scrollable={scrollable || undefined}\n >\n {children}\n </Modal>\n </SpotlightProvider>\n );\n});\n\nSpotlightRoot.classes = classes;\nSpotlightRoot.displayName = '@mantine/spotlight/SpotlightRoot';\n"],"names":["getDefaultZIndex","spotlightStore","factory","useProps","useSpotlight","spotlightActions","useStyles","classes","useResolvedStylesApi","useHotkeys","getHotkeys","useDidUpdate","jsx","SpotlightProvider","Modal","rem"],"mappings":";;;;;;;;;;;AAgGA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,YAAA,CAAA,CAAA,CAAe,CAAA;AAAA,CAAA,CACnB,CAAA,CAAA,CAAA,CAAA,EAAM,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACN,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"SpotlightRoot.cjs","names":["spotlightStore","useSpotlight","getHotkeys","SpotlightProvider","Modal","spotlightActions","classes"],"sources":["../src/SpotlightRoot.tsx"],"sourcesContent":["import {\n factory,\n Factory,\n getDefaultZIndex,\n Modal,\n ModalProps,\n ModalStylesNames,\n rem,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDidUpdate, useHotkeys } from '@mantine/hooks';\nimport { getHotkeys } from './get-hotkeys';\nimport { SpotlightProvider } from './Spotlight.context';\nimport { spotlightActions, SpotlightStore, spotlightStore, useSpotlight } from './spotlight.store';\nimport classes from './Spotlight.module.css';\n\nexport type SpotlightRootStylesNames =\n | ModalStylesNames\n | 'search'\n | 'actionsList'\n | 'action'\n | 'empty'\n | 'footer'\n | 'actionBody'\n | 'actionLabel'\n | 'actionDescription'\n | 'actionSection'\n | 'actionsGroup';\n\nexport interface SpotlightRootProps\n extends\n StylesApiProps<SpotlightRootFactory>,\n Omit<\n ModalProps,\n | 'styles'\n | 'classNames'\n | 'vars'\n | 'variant'\n | 'opened'\n | 'onClose'\n | 'closeButtonProps'\n | 'withCloseButton'\n > {\n /** Spotlight store, can be used to create multiple instances of spotlight */\n store?: SpotlightStore;\n\n /** Controlled Spotlight search query */\n query?: string;\n\n /** Called when query changes */\n onQueryChange?: (query: string) => void;\n\n /** Determines whether the search query should be cleared when the spotlight is closed @default true */\n clearQueryOnClose?: boolean;\n\n /** Keyboard shortcut or a list of shortcuts to trigger spotlight @default 'mod + K' */\n shortcut?: string | string[] | null;\n\n /** A list of tags which when focused will be ignored by shortcut @default ['input', 'textarea', 'select'] */\n tagsToIgnore?: string[];\n\n /** Determines whether shortcut should trigger based in contentEditable @default false */\n triggerOnContentEditable?: boolean;\n\n /** If set, spotlight will not be rendered */\n disabled?: boolean;\n\n /** Called when spotlight opens */\n onSpotlightOpen?: () => void;\n\n /** Called when spotlight closes */\n onSpotlightClose?: () => void;\n\n /** Forces opened state, useful for tests */\n forceOpened?: boolean;\n\n /** Determines whether spotlight should be closed when one of the actions is triggered @default true */\n closeOnActionTrigger?: boolean;\n\n /** Spotlight content max-height. Ignored unless `scrollable` prop is set. @default 400 */\n maxHeight?: React.CSSProperties['maxHeight'];\n\n /** Determines whether the actions list should be scrollable. If not set, `maxHeight` is ignored @default false */\n scrollable?: boolean;\n}\n\nexport type SpotlightRootFactory = Factory<{\n props: SpotlightRootProps;\n ref: HTMLDivElement;\n stylesNames: SpotlightRootStylesNames;\n compound: true;\n}>;\n\nconst defaultProps = {\n size: 600,\n yOffset: 80,\n zIndex: getDefaultZIndex('max'),\n overlayProps: { backgroundOpacity: 0.35, blur: 7 },\n transitionProps: { duration: 200, transition: 'pop' },\n store: spotlightStore,\n clearQueryOnClose: true,\n closeOnActionTrigger: true,\n shortcut: 'mod + K',\n maxHeight: 400,\n} satisfies Partial<SpotlightRootProps>;\n\nexport const SpotlightRoot = factory<SpotlightRootFactory>((_props) => {\n const props = useProps('SpotlightRoot', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n store,\n children,\n query,\n onQueryChange,\n transitionProps,\n clearQueryOnClose,\n shortcut,\n tagsToIgnore,\n triggerOnContentEditable,\n disabled,\n onSpotlightOpen,\n onSpotlightClose,\n forceOpened,\n closeOnActionTrigger,\n maxHeight,\n scrollable,\n attributes,\n ...others\n } = props;\n\n const { opened, query: storeQuery } = useSpotlight(store);\n const _query = typeof query === 'string' ? query : storeQuery;\n const setQuery = (q: string) => {\n onQueryChange?.(q);\n spotlightActions.setQuery(q, store);\n };\n\n const getStyles = useStyles<SpotlightRootFactory>({\n name: 'Spotlight',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<SpotlightRootFactory>({\n classNames,\n styles,\n props,\n });\n\n useHotkeys(getHotkeys(shortcut, store), tagsToIgnore, triggerOnContentEditable);\n\n useDidUpdate(() => {\n opened ? onSpotlightOpen?.() : onSpotlightClose?.();\n }, [opened]);\n\n if (disabled) {\n return null;\n }\n\n return (\n <SpotlightProvider\n value={{\n getStyles,\n query: _query,\n setQuery,\n store,\n closeOnActionTrigger,\n }}\n >\n <Modal\n {...others}\n withCloseButton={false}\n opened={opened || !!forceOpened}\n padding={0}\n onClose={() => spotlightActions.close(store)}\n className={className}\n style={style}\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n attributes={attributes}\n transitionProps={{\n ...transitionProps,\n onExited: () => {\n clearQueryOnClose && setQuery('');\n spotlightActions.clearSpotlightState({ clearQuery: clearQueryOnClose }, store);\n transitionProps?.onExited?.();\n },\n }}\n __vars={{ '--spotlight-max-height': scrollable ? rem(maxHeight) : undefined }}\n __staticSelector=\"Spotlight\"\n data-scrollable={scrollable || undefined}\n >\n {children}\n </Modal>\n </SpotlightProvider>\n );\n});\n\nSpotlightRoot.classes = classes;\nSpotlightRoot.displayName = '@mantine/spotlight/SpotlightRoot';\n"],"mappings":";;;;;;;;;AAgGA,MAAM,eAAe;CACnB,MAAM;CACN,SAAS;CACT,SAAA,GAAA,cAAA,kBAAyB,MAAM;CAC/B,cAAc;EAAE,mBAAmB;EAAM,MAAM;EAAG;CAClD,iBAAiB;EAAE,UAAU;EAAK,YAAY;EAAO;CACrD,OAAOA,wBAAAA;CACP,mBAAmB;CACnB,sBAAsB;CACtB,UAAU;CACV,WAAW;CACZ;AAED,MAAa,iBAAA,GAAA,cAAA,UAA+C,WAAW;CACrE,MAAM,SAAA,GAAA,cAAA,UAAiB,iBAAiB,cAAc,OAAO;CAC7D,MAAM,EACJ,YACA,WACA,OACA,QACA,UAC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