@mantine/code-highlight 7.2.2 → 7.3.0-alpha.1
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/CodeHighlight.cjs +58 -0
- package/cjs/CodeHighlight.cjs.map +1 -0
- package/cjs/{CodeHighlight.module.css.js → CodeHighlight.module.css.cjs} +2 -4
- package/cjs/CodeHighlight.module.css.cjs.map +1 -0
- package/cjs/CodeHighlight.theme.module.css.cjs +7 -0
- package/cjs/CodeHighlight.theme.module.css.cjs.map +1 -0
- package/cjs/CodeHighlightTabs.cjs +142 -0
- package/cjs/CodeHighlightTabs.cjs.map +1 -0
- package/cjs/CopyIcon.cjs +27 -0
- package/cjs/CopyIcon.cjs.map +1 -0
- package/cjs/ExpandIcon.cjs +26 -0
- package/cjs/ExpandIcon.cjs.map +1 -0
- package/cjs/FileIcon.cjs +17 -0
- package/cjs/FileIcon.cjs.map +1 -0
- package/cjs/InlineCodeHighlight.cjs +44 -0
- package/cjs/InlineCodeHighlight.cjs.map +1 -0
- package/cjs/index.cjs +12 -0
- package/cjs/index.cjs.map +1 -0
- package/cjs/index.css +1 -1
- package/cjs/{use-highlight.js → use-highlight.cjs} +3 -9
- package/cjs/use-highlight.cjs.map +1 -0
- package/esm/CodeHighlight.mjs +8 -52
- package/esm/CodeHighlight.mjs.map +1 -1
- package/esm/{CodeHighlight.module.mjs → CodeHighlight.module.css.mjs} +2 -2
- package/esm/CodeHighlight.module.css.mjs.map +1 -0
- package/esm/CodeHighlight.theme.module.css.mjs +5 -0
- package/esm/CodeHighlight.theme.module.css.mjs.map +1 -0
- package/esm/CodeHighlightTabs.mjs +27 -76
- package/esm/CodeHighlightTabs.mjs.map +1 -1
- package/esm/CopyIcon.mjs +6 -34
- package/esm/CopyIcon.mjs.map +1 -1
- package/esm/ExpandIcon.mjs +6 -34
- package/esm/ExpandIcon.mjs.map +1 -1
- package/esm/FileIcon.mjs.map +1 -1
- package/esm/InlineCodeHighlight.mjs +9 -39
- package/esm/InlineCodeHighlight.mjs.map +1 -1
- package/esm/index.css +1 -1
- package/esm/index.layer.css +1 -1
- package/esm/use-highlight.mjs.map +1 -1
- package/package.json +34 -30
- package/src/CodeHighlight.test.tsx +1 -1
- package/src/CodeHighlightTabs.test.tsx +1 -1
- package/src/InlineCodeHighlight.test.tsx +1 -1
- package/tsconfig.build.json +4 -14
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.json +4 -14
- package/cjs/CodeHighlight.js +0 -109
- package/cjs/CodeHighlight.js.map +0 -1
- package/cjs/CodeHighlight.module.css.js.map +0 -1
- package/cjs/CodeHighlight.theme.module.css.js +0 -9
- package/cjs/CodeHighlight.theme.module.css.js.map +0 -1
- package/cjs/CodeHighlightTabs.js +0 -199
- package/cjs/CodeHighlightTabs.js.map +0 -1
- package/cjs/CopyIcon.js +0 -61
- package/cjs/CopyIcon.js.map +0 -1
- package/cjs/ExpandIcon.js +0 -60
- package/cjs/ExpandIcon.js.map +0 -1
- package/cjs/FileIcon.js +0 -23
- package/cjs/FileIcon.js.map +0 -1
- package/cjs/InlineCodeHighlight.js +0 -82
- package/cjs/InlineCodeHighlight.js.map +0 -1
- package/cjs/index.js +0 -14
- package/cjs/index.js.map +0 -1
- package/cjs/use-highlight.js.map +0 -1
- package/esm/CodeHighlight.module.mjs.map +0 -1
- package/esm/CodeHighlight.theme.module.mjs +0 -5
- package/esm/CodeHighlight.theme.module.mjs.map +0 -1
package/esm/ExpandIcon.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandIcon.mjs","sources":["../src/ExpandIcon.tsx"],"sourcesContent":["import { rem } from '@mantine/core';\nimport React from 'react';\n\ninterface ExpandIconProps extends React.ComponentPropsWithoutRef<'svg'> {\n expanded: boolean;\n}\n\nexport function ExpandIcon({ expanded, style, ...others }: ExpandIconProps) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ width: rem(18), height: rem(18), ...style }}\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...others}\n >\n {expanded ? (\n <>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 13v-8l-3 3m6 0l-3 -3\" />\n <path d=\"M9 17l1 0\" />\n <path d=\"M14 17l1 0\" />\n <path d=\"M19 17l1 0\" />\n <path d=\"M4 17l1 0\" />\n </>\n ) : (\n <>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 11v8l3 -3m-6 0l3 3\" />\n <path d=\"M9 7l1 0\" />\n <path d=\"M14 7l1 0\" />\n <path d=\"M19 7l1 0\" />\n <path d=\"M4 7l1 0\" />\n </>\n )}\n </svg>\n );\n}\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ExpandIcon.mjs","sources":["../src/ExpandIcon.tsx"],"sourcesContent":["import { rem } from '@mantine/core';\nimport React from 'react';\n\ninterface ExpandIconProps extends React.ComponentPropsWithoutRef<'svg'> {\n expanded: boolean;\n}\n\nexport function ExpandIcon({ expanded, style, ...others }: ExpandIconProps) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ width: rem(18), height: rem(18), ...style }}\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...others}\n >\n {expanded ? (\n <>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 13v-8l-3 3m6 0l-3 -3\" />\n <path d=\"M9 17l1 0\" />\n <path d=\"M14 17l1 0\" />\n <path d=\"M19 17l1 0\" />\n <path d=\"M4 17l1 0\" />\n </>\n ) : (\n <>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 11v8l3 -3m-6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AAA,CAAa,CAAC,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,EAAE,CAAC,CAAA,CAAE,UAAU,CAAE,CAAA,CAAC,kBAAkB,CAAK,CAAA,CAAA,CAAA,CAAA,CAAC,aAAa,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,EAAE,CAAE,CAAA,CAAC,EAAE,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,CAAK,CAAA,CAAA,CAAA,CAAA,CAAC,aAAa,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,EAAE,CAAE,CAAA,CAAC,EAAE,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAC,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAC,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,MAAM,CAAE,CAAA,CAAA,CAAE,CAAC,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAE,CAAA,CAAC,CAAC;AACh/B,CAAA,CAAA,CAAG,CAAC;AACJ,CAAA;;"}
|
package/esm/FileIcon.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileIcon.mjs","sources":["../src/FileIcon.tsx"],"sourcesContent":["import React from 'react';\n\ninterface FileIconProps {\n fileName: string | undefined;\n getFileIcon?: ((fileName: string) => React.ReactNode) | undefined;\n fileIcon: React.ReactNode | undefined;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function FileIcon({ fileIcon, fileName, getFileIcon, className, style }: FileIconProps) {\n if (fileIcon) {\n return (\n <span className={className} style={style}>\n {fileIcon}\n </span>\n );\n }\n\n if (getFileIcon && fileName) {\n return (\n <span className={className} style={style}>\n {getFileIcon(fileName)}\n </span>\n );\n }\n\n return null;\n}\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"FileIcon.mjs","sources":["../src/FileIcon.tsx"],"sourcesContent":["import React from 'react';\n\ninterface FileIconProps {\n fileName: string | undefined;\n getFileIcon?: ((fileName: string) => React.ReactNode) | undefined;\n fileIcon: React.ReactNode | undefined;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function FileIcon({ fileIcon, fileName, getFileIcon, className, style }: FileIconProps) {\n if (fileIcon) {\n return (\n <span className={className} style={style}>\n {fileIcon}\n </span>\n );\n }\n\n if (getFileIcon && fileName) {\n return (\n <span className={className} style={style}>\n {getFileIcon(fileName)}\n </span>\n );\n }\n\n return null;\n}\n"],"names":[],"mappings":";;;AAEO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAE,CAAE,CAAA,CAAA;AAChF,CAAE,CAAA,CAAA,CAAA,CAAA,CAAI,QAAQ,CAAE,CAAA,CAAA;AAChB,CAAA,CAAA,CAAA,CA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
@@ -3,47 +3,16 @@ import React from 'react';
|
|
|
3
3
|
import cx from 'clsx';
|
|
4
4
|
import { factory, useProps, useStyles, Box } from '@mantine/core';
|
|
5
5
|
import hljs from 'highlight.js';
|
|
6
|
-
import _classes from './CodeHighlight.module.mjs';
|
|
7
|
-
import themeClasses from './CodeHighlight.theme.module.mjs';
|
|
6
|
+
import _classes from './CodeHighlight.module.css.mjs';
|
|
7
|
+
import themeClasses from './CodeHighlight.theme.module.css.mjs';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
var __defProps = Object.defineProperties;
|
|
11
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
12
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
15
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16
|
-
var __spreadValues = (a, b) => {
|
|
17
|
-
for (var prop in b || (b = {}))
|
|
18
|
-
if (__hasOwnProp.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
if (__getOwnPropSymbols)
|
|
21
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
22
|
-
if (__propIsEnum.call(b, prop))
|
|
23
|
-
__defNormalProp(a, prop, b[prop]);
|
|
24
|
-
}
|
|
25
|
-
return a;
|
|
26
|
-
};
|
|
27
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
28
|
-
var __objRest = (source, exclude) => {
|
|
29
|
-
var target = {};
|
|
30
|
-
for (var prop in source)
|
|
31
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
if (source != null && __getOwnPropSymbols)
|
|
34
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
35
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
36
|
-
target[prop] = source[prop];
|
|
37
|
-
}
|
|
38
|
-
return target;
|
|
39
|
-
};
|
|
40
|
-
const classes = __spreadProps(__spreadValues({}, _classes), { code: cx(_classes.code, themeClasses.theme) });
|
|
9
|
+
const classes = { ..._classes, code: cx(_classes.code, themeClasses.theme) };
|
|
41
10
|
const defaultProps = {
|
|
42
11
|
language: "tsx"
|
|
43
12
|
};
|
|
44
13
|
const InlineCodeHighlight = factory((_props, ref) => {
|
|
45
14
|
const props = useProps("InlineCodeHighlight", defaultProps, _props);
|
|
46
|
-
const
|
|
15
|
+
const { classNames, className, style, styles, unstyled, vars, code, language, ...others } = props;
|
|
47
16
|
const getStyles = useStyles({
|
|
48
17
|
name: "InlineCodeHighlight",
|
|
49
18
|
props,
|
|
@@ -58,12 +27,13 @@ const InlineCodeHighlight = factory((_props, ref) => {
|
|
|
58
27
|
const highlighted = hljs.highlight(code.trim(), { language }).value;
|
|
59
28
|
return /* @__PURE__ */ React.createElement(
|
|
60
29
|
Box,
|
|
61
|
-
|
|
30
|
+
{
|
|
31
|
+
...getStyles("code"),
|
|
62
32
|
component: "code",
|
|
63
|
-
ref
|
|
64
|
-
|
|
33
|
+
ref,
|
|
34
|
+
...others,
|
|
65
35
|
dangerouslySetInnerHTML: { __html: highlighted }
|
|
66
|
-
}
|
|
36
|
+
}
|
|
67
37
|
);
|
|
68
38
|
});
|
|
69
39
|
InlineCodeHighlight.displayName = "@mantine/core/InlineCodeHighlight";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineCodeHighlight.mjs","sources":["../src/InlineCodeHighlight.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'clsx';\nimport {\n Box,\n BoxProps,\n StylesApiProps,\n factory,\n ElementProps,\n useProps,\n useStyles,\n Factory,\n} from '@mantine/core';\nimport hljs from 'highlight.js';\nimport _classes from './CodeHighlight.module.css';\nimport themeClasses from './CodeHighlight.theme.module.css';\n\nconst classes = { ..._classes, code: cx(_classes.code, themeClasses.theme) };\n\nexport type InlineCodeHighlightStylesNames = 'code';\n\nexport interface InlineCodeHighlightProps\n extends BoxProps,\n StylesApiProps<InlineCodeHighlightFactory>,\n ElementProps<'div'> {\n /** Code to highlight */\n code: string;\n\n /** Code language, `'tsx'` by default */\n language?: string;\n}\n\nexport type InlineCodeHighlightFactory = Factory<{\n props: InlineCodeHighlightProps;\n ref: HTMLElement;\n stylesNames: InlineCodeHighlightStylesNames;\n}>;\n\nconst defaultProps: Partial<InlineCodeHighlightProps> = {\n language: 'tsx',\n};\n\nexport const InlineCodeHighlight = factory<InlineCodeHighlightFactory>((_props, ref) => {\n const props = useProps('InlineCodeHighlight', defaultProps, _props);\n const { classNames, className, style, styles, unstyled, vars, code, language, ...others } = props;\n\n const getStyles = useStyles<InlineCodeHighlightFactory>({\n name: 'InlineCodeHighlight',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n rootSelector: 'code',\n });\n\n const highlighted = hljs.highlight(code.trim(), { language: language! }).value;\n\n return (\n <Box\n {...getStyles('code')}\n component=\"code\"\n ref={ref}\n {...others}\n dangerouslySetInnerHTML={{ __html: highlighted }}\n />\n );\n});\n\nInlineCodeHighlight.displayName = '@mantine/core/InlineCodeHighlight';\n"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"InlineCodeHighlight.mjs","sources":["../src/InlineCodeHighlight.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'clsx';\nimport {\n Box,\n BoxProps,\n StylesApiProps,\n factory,\n ElementProps,\n useProps,\n useStyles,\n Factory,\n} from '@mantine/core';\nimport hljs from 'highlight.js';\nimport _classes from './CodeHighlight.module.css';\nimport themeClasses from './CodeHighlight.theme.module.css';\n\nconst classes = { ..._classes, code: cx(_classes.code, themeClasses.theme) };\n\nexport type InlineCodeHighlightStylesNames = 'code';\n\nexport interface InlineCodeHighlightProps\n extends BoxProps,\n StylesApiProps<InlineCodeHighlightFactory>,\n ElementProps<'div'> {\n /** Code to highlight */\n code: string;\n\n /** Code language, `'tsx'` by default */\n language?: string;\n}\n\nexport type InlineCodeHighlightFactory = Factory<{\n props: InlineCodeHighlightProps;\n ref: HTMLElement;\n stylesNames: InlineCodeHighlightStylesNames;\n}>;\n\nconst defaultProps: Partial<InlineCodeHighlightProps> = {\n language: 'tsx',\n};\n\nexport const InlineCodeHighlight = factory<InlineCodeHighlightFactory>((_props, ref) => {\n const props = useProps('InlineCodeHighlight', defaultProps, _props);\n const { classNames, className, style, styles, unstyled, vars, code, language, ...others } = props;\n\n const getStyles = useStyles<InlineCodeHighlightFactory>({\n name: 'InlineCodeHighlight',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n rootSelector: 'code',\n });\n\n const highlighted = hljs.highlight(code.trim(), { language: language! }).value;\n\n return (\n <Box\n {...getStyles('code')}\n component=\"code\"\n ref={ref}\n {...others}\n dangerouslySetInnerHTML={{ __html: highlighted }}\n />\n );\n});\n\nInlineCodeHighlight.displayName = '@mantine/core/InlineCodeHighlight';\n"],"names":[],"mappings":";;;;;;;;AAYA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,OAAO,CAAG,CAAA,CAAA,CAAA,CAAE,GAAG,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,IAAI,CAAE,CAAA,CAAA,CAAE,CAAC,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,IAAI,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAC,CAAK,CAAA,CAAA,CAAA,CAAA,CAAC,EAAE,CAAC;AAC7E,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,YAAY,CAAG,CAAA,CAAA,CAAA;AACrB,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,E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E,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,WAAW,CAAE,CAAA;AACtD,CAAK,CAAA,CAAA,CAAA,CAAA;AACL,CAAA,CAAA,CAAG,CAAC;AACJ,CAAC,CAAE,CAAA;AACH,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,CAAmC,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,CAAA,CAAA,CAAA,CAAA;;"}
|
package/esm/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-5caae6d3{border-radius:var(--mantine-radius-xs);display:inline-block;font-family:var(--mantine-font-family-monospace);font-size:calc(.8125rem*var(--mantine-scale));line-height:var(--_code-line-height,var(--mantine-line-height));padding:calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale))}.m-2c47c4fd{--_code-line-height:1.7;display:block;margin:0;padding:var(--mantine-spacing-xs) var(--mantine-spacing-md)}.m-e58679f3{align-items:flex-start;display:flex;justify-content:space-between}.m-be7e9c9c{display:flex;margin-right:calc(.4375rem*var(--mantine-scale));margin-top:calc(.4375rem*var(--mantine-scale))}.m-5caae85b,.m-d498bab7{background-color:transparent;color:var(--mantine-color-dimmed);margin:0;opacity:.8}@media (hover:hover){.m-5caae85b:hover,.m-d498bab7:hover{opacity:1}}@media (hover:none){.m-5caae85b:active,.m-d498bab7:active{opacity:1}}@media (max-width:40em){.m-5caae85b,.m-d498bab7{display:none}}.m-5caae85b{position:absolute;right:calc(.3125rem*var(--mantine-scale));top:calc(.3125rem*var(--mantine-scale));z-index:1}.m-5cac2e62{align-items:center;background-color:var(--_file-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_file-bd);border-left:0;border-top:0;color:var(--_file-color);cursor:var(--_file-cursor);display:flex;font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);font-weight:700;gap:calc(.4375rem*var(--mantine-scale));justify-content:center;line-height:1;margin:0;opacity:var(--_file-opacity);padding:calc(.4375rem*var(--mantine-scale)) calc(.75rem*var(--mantine-scale));user-select:none;white-space:nowrap}@media (hover:hover){.m-5cac2e62:hover{--_file-opacity:1}}@media (hover:none){.m-5cac2e62:active{--_file-opacity:1}}.m-5cac2e62:last-of-type{border-bottom-right-radius:var(--mantine-radius-sm)}.m-5cac2e62:only-child{--_file-cursor:default}.m-5cac2e62[data-active]{--_file-opacity:1;--_file-color:var(--_file-active-color)!important;--_file-bg:var(--_file-active-bg)}.m-5cac2e62{--_file-opacity:0.8;--_file-cursor:pointer}[data-mantine-color-scheme=light] .m-5cac2e62{--_file-color:var(--mantine-color-gray-8);--_file-bd:var(--mantine-color-gray-2);--_file-active-bg:var(--mantine-color-white);--_file-active-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-5cac2e62{--_file-color:var(--mantine-color-dark-0);--_file-bd:var(--mantine-color-dark-4);--_file-active-bg:var(--mantine-color-dark-6);--_file-active-color:var(--mantine-color-white)}.m-38d99e51{display:flex}.m-9f507240{max-height:var(--ch-max-collapsed-height);overflow:hidden;position:relative}.m-9f507240:before{background-image:linear-gradient(0deg,var(--_background) 16%,transparent 100%);border-radius:calc(var(--mantine-radius-md) - .0625rem*var(--mantine-scale));content:"";inset:0;pointer-events:none;position:absolute;z-index:100}.m-9f507240[data-expanded]{max-height:none}.m-9f507240[data-expanded]:before{display:none}.m-c9378bc2{bottom:0;color:var(--mantine-color-anchor);font-size:var(--mantine-font-size-sm);left:50%;padding-bottom:var(--mantine-spacing-xs);padding-top:var(--mantine-spacing-xs);position:absolute;text-align:center;transform:translateX(-50%);width:100%;z-index:101}.m-c9378bc2[data-hidden]{display:none}.m-5cb1b9c8{margin-top:0;position:relative}.m-5cb1b9c8[data-collapsed] .mantine-ScrollArea-viewport>div{display:block!important}.m-b46cddfb{align-items:center;display:flex;flex:0
|
|
1
|
+
.m-5caae6d3{border-radius:var(--mantine-radius-xs);display:inline-block;font-family:var(--mantine-font-family-monospace);font-size:calc(.8125rem*var(--mantine-scale));line-height:var(--_code-line-height,var(--mantine-line-height));padding:calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale))}.m-2c47c4fd{--_code-line-height:1.7;display:block;margin:0;padding:var(--mantine-spacing-xs) var(--mantine-spacing-md)}.m-e58679f3{align-items:flex-start;display:flex;justify-content:space-between}.m-be7e9c9c{display:flex;margin-right:calc(.4375rem*var(--mantine-scale));margin-top:calc(.4375rem*var(--mantine-scale))}.m-5caae85b,.m-d498bab7{background-color:transparent;color:var(--mantine-color-dimmed);margin:0;opacity:.8}@media (hover:hover){.m-5caae85b:hover,.m-d498bab7:hover{opacity:1}}@media (hover:none){.m-5caae85b:active,.m-d498bab7:active{opacity:1}}@media (max-width:40em){.m-5caae85b,.m-d498bab7{display:none}}.m-5caae85b{position:absolute;right:calc(.3125rem*var(--mantine-scale));top:calc(.3125rem*var(--mantine-scale));z-index:1}.m-5cac2e62{align-items:center;background-color:var(--_file-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_file-bd);border-left:0;border-top:0;color:var(--_file-color);cursor:var(--_file-cursor);display:flex;font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);font-weight:700;gap:calc(.4375rem*var(--mantine-scale));justify-content:center;line-height:1;margin:0;opacity:var(--_file-opacity);padding:calc(.4375rem*var(--mantine-scale)) calc(.75rem*var(--mantine-scale));user-select:none;white-space:nowrap}@media (hover:hover){.m-5cac2e62:hover{--_file-opacity:1}}@media (hover:none){.m-5cac2e62:active{--_file-opacity:1}}.m-5cac2e62:last-of-type{border-bottom-right-radius:var(--mantine-radius-sm)}.m-5cac2e62:only-child{--_file-cursor:default}.m-5cac2e62[data-active]{--_file-opacity:1;--_file-color:var(--_file-active-color)!important;--_file-bg:var(--_file-active-bg)}.m-5cac2e62{--_file-opacity:0.8;--_file-cursor:pointer}[data-mantine-color-scheme=light] .m-5cac2e62{--_file-color:var(--mantine-color-gray-8);--_file-bd:var(--mantine-color-gray-2);--_file-active-bg:var(--mantine-color-white);--_file-active-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-5cac2e62{--_file-color:var(--mantine-color-dark-0);--_file-bd:var(--mantine-color-dark-4);--_file-active-bg:var(--mantine-color-dark-6);--_file-active-color:var(--mantine-color-white)}.m-38d99e51{display:flex}.m-9f507240{max-height:var(--ch-max-collapsed-height);overflow:hidden;position:relative}.m-9f507240:before{background-image:linear-gradient(0deg,var(--_background) 16%,transparent 100%);border-radius:calc(var(--mantine-radius-md) - .0625rem*var(--mantine-scale));content:"";inset:0;pointer-events:none;position:absolute;z-index:100}.m-9f507240[data-expanded]{max-height:none}.m-9f507240[data-expanded]:before{display:none}.m-c9378bc2{bottom:0;color:var(--mantine-color-anchor);font-size:var(--mantine-font-size-sm);left:50%;padding-bottom:var(--mantine-spacing-xs);padding-top:var(--mantine-spacing-xs);position:absolute;text-align:center;transform:translateX(-50%);width:100%;z-index:101}.m-c9378bc2[data-hidden]{display:none}.m-5cb1b9c8{margin-top:0;position:relative}.m-5cb1b9c8[data-collapsed] .mantine-ScrollArea-viewport>div{display:block!important}.m-b46cddfb{align-items:center;display:flex;flex:0;justify-content:center}.m-b46cddfb>svg{display:block}.m-1f5e827e{background:var(--_background);color:var(--_color)}[data-mantine-color-scheme=light] .m-1f5e827e{--_color:var(--mantine-color-gray-7);--_background:var(--mantine-color-gray-0);--code-comment-color:var(--mantine-color-gray-6);--code-keyword-color:var(--mantine-color-violet-8);--code-tag-color:var(--mantine-color-red-9);--code-literal-color:var(--mantine-color-blue-6);--code-string-color:var(--mantine-color-blue-9);--code-variable-color:var(--mantine-color-lime-9);--code-class-color:var(--mantine-color-orange-9)}[data-mantine-color-scheme=dark] .m-1f5e827e{--_color:var(--mantine-color-dark-1);--_background:var(--mantine-color-dark-8);--code-comment-color:var(--mantine-color-dark-3);--code-keyword-color:var(--mantine-color-violet-3);--code-tag-color:var(--mantine-color-yellow-4);--code-literal-color:var(--mantine-color-blue-4);--code-string-color:var(--mantine-color-green-6);--code-variable-color:var(--mantine-color-blue-2);--code-class-color:var(--mantine-color-orange-5)}.m-1f5e827e .hljs-comment,.m-1f5e827e .hljs-quote{color:var(--code-comment-color);font-style:italic}.m-1f5e827e .hljs-doctag,.m-1f5e827e .hljs-formula,.m-1f5e827e .hljs-keyword{color:var(--code-keyword-color)}.m-1f5e827e .hljs-deletion,.m-1f5e827e .hljs-name,.m-1f5e827e .hljs-section,.m-1f5e827e .hljs-selector-tag,.m-1f5e827e .hljs-subst{color:var(--code-tag-color)}.m-1f5e827e .hljs-literal{color:var(--code-literal-color)}.m-1f5e827e .hljs-addition,.m-1f5e827e .hljs-attribute,.m-1f5e827e .hljs-meta .hljs-string,.m-1f5e827e .hljs-regexp,.m-1f5e827e .hljs-string{color:var(--code-string-color)}.m-1f5e827e .hljs-attr,.m-1f5e827e .hljs-number,.m-1f5e827e .hljs-selector-attr,.m-1f5e827e .hljs-selector-class,.m-1f5e827e .hljs-selector-pseudo,.m-1f5e827e .hljs-template-variable,.m-1f5e827e .hljs-type,.m-1f5e827e .hljs-variable{color:var(--code-variable-color)}.m-1f5e827e .hljs-built_in,.m-1f5e827e .hljs-bullet,.m-1f5e827e .hljs-class .hljs-title,.m-1f5e827e .hljs-link,.m-1f5e827e .hljs-meta,.m-1f5e827e .hljs-selector-id,.m-1f5e827e .hljs-symbol,.m-1f5e827e .hljs-title,.m-1f5e827e .hljs-title.class_{color:var(--code-class-color)}.m-1f5e827e .hljs-emphasis{font-style:italic}.m-1f5e827e .hljs-strong{font-weight:700}.m-1f5e827e .hljs-link{text-decoration:underline}
|
package/esm/index.layer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer mantine {.m-5caae6d3{border-radius:var(--mantine-radius-xs);display:inline-block;font-family:var(--mantine-font-family-monospace);font-size:calc(.8125rem*var(--mantine-scale));line-height:var(--_code-line-height,var(--mantine-line-height));padding:calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale))}.m-2c47c4fd{--_code-line-height:1.7;display:block;margin:0;padding:var(--mantine-spacing-xs) var(--mantine-spacing-md)}.m-e58679f3{align-items:flex-start;display:flex;justify-content:space-between}.m-be7e9c9c{display:flex;margin-right:calc(.4375rem*var(--mantine-scale));margin-top:calc(.4375rem*var(--mantine-scale))}.m-5caae85b,.m-d498bab7{background-color:transparent;color:var(--mantine-color-dimmed);margin:0;opacity:.8}@media (hover:hover){.m-5caae85b:hover,.m-d498bab7:hover{opacity:1}}@media (hover:none){.m-5caae85b:active,.m-d498bab7:active{opacity:1}}@media (max-width:40em){.m-5caae85b,.m-d498bab7{display:none}}.m-5caae85b{position:absolute;right:calc(.3125rem*var(--mantine-scale));top:calc(.3125rem*var(--mantine-scale));z-index:1}.m-5cac2e62{align-items:center;background-color:var(--_file-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_file-bd);border-left:0;border-top:0;color:var(--_file-color);cursor:var(--_file-cursor);display:flex;font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);font-weight:700;gap:calc(.4375rem*var(--mantine-scale));justify-content:center;line-height:1;margin:0;opacity:var(--_file-opacity);padding:calc(.4375rem*var(--mantine-scale)) calc(.75rem*var(--mantine-scale));user-select:none;white-space:nowrap}@media (hover:hover){.m-5cac2e62:hover{--_file-opacity:1}}@media (hover:none){.m-5cac2e62:active{--_file-opacity:1}}.m-5cac2e62:last-of-type{border-bottom-right-radius:var(--mantine-radius-sm)}.m-5cac2e62:only-child{--_file-cursor:default}.m-5cac2e62[data-active]{--_file-opacity:1;--_file-color:var(--_file-active-color)!important;--_file-bg:var(--_file-active-bg)}.m-5cac2e62{--_file-opacity:0.8;--_file-cursor:pointer}[data-mantine-color-scheme=light] .m-5cac2e62{--_file-color:var(--mantine-color-gray-8);--_file-bd:var(--mantine-color-gray-2);--_file-active-bg:var(--mantine-color-white);--_file-active-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-5cac2e62{--_file-color:var(--mantine-color-dark-0);--_file-bd:var(--mantine-color-dark-4);--_file-active-bg:var(--mantine-color-dark-6);--_file-active-color:var(--mantine-color-white)}.m-38d99e51{display:flex}.m-9f507240{max-height:var(--ch-max-collapsed-height);overflow:hidden;position:relative}.m-9f507240:before{background-image:linear-gradient(0deg,var(--_background) 16%,transparent 100%);border-radius:calc(var(--mantine-radius-md) - .0625rem*var(--mantine-scale));content:"";inset:0;pointer-events:none;position:absolute;z-index:100}.m-9f507240[data-expanded]{max-height:none}.m-9f507240[data-expanded]:before{display:none}.m-c9378bc2{bottom:0;color:var(--mantine-color-anchor);font-size:var(--mantine-font-size-sm);left:50%;padding-bottom:var(--mantine-spacing-xs);padding-top:var(--mantine-spacing-xs);position:absolute;text-align:center;transform:translateX(-50%);width:100%;z-index:101}.m-c9378bc2[data-hidden]{display:none}.m-5cb1b9c8{margin-top:0;position:relative}.m-5cb1b9c8[data-collapsed] .mantine-ScrollArea-viewport>div{display:block!important}.m-b46cddfb{align-items:center;display:flex;flex:0
|
|
1
|
+
@layer mantine {.m-5caae6d3{border-radius:var(--mantine-radius-xs);display:inline-block;font-family:var(--mantine-font-family-monospace);font-size:calc(.8125rem*var(--mantine-scale));line-height:var(--_code-line-height,var(--mantine-line-height));padding:calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale))}.m-2c47c4fd{--_code-line-height:1.7;display:block;margin:0;padding:var(--mantine-spacing-xs) var(--mantine-spacing-md)}.m-e58679f3{align-items:flex-start;display:flex;justify-content:space-between}.m-be7e9c9c{display:flex;margin-right:calc(.4375rem*var(--mantine-scale));margin-top:calc(.4375rem*var(--mantine-scale))}.m-5caae85b,.m-d498bab7{background-color:transparent;color:var(--mantine-color-dimmed);margin:0;opacity:.8}@media (hover:hover){.m-5caae85b:hover,.m-d498bab7:hover{opacity:1}}@media (hover:none){.m-5caae85b:active,.m-d498bab7:active{opacity:1}}@media (max-width:40em){.m-5caae85b,.m-d498bab7{display:none}}.m-5caae85b{position:absolute;right:calc(.3125rem*var(--mantine-scale));top:calc(.3125rem*var(--mantine-scale));z-index:1}.m-5cac2e62{align-items:center;background-color:var(--_file-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_file-bd);border-left:0;border-top:0;color:var(--_file-color);cursor:var(--_file-cursor);display:flex;font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);font-weight:700;gap:calc(.4375rem*var(--mantine-scale));justify-content:center;line-height:1;margin:0;opacity:var(--_file-opacity);padding:calc(.4375rem*var(--mantine-scale)) calc(.75rem*var(--mantine-scale));user-select:none;white-space:nowrap}@media (hover:hover){.m-5cac2e62:hover{--_file-opacity:1}}@media (hover:none){.m-5cac2e62:active{--_file-opacity:1}}.m-5cac2e62:last-of-type{border-bottom-right-radius:var(--mantine-radius-sm)}.m-5cac2e62:only-child{--_file-cursor:default}.m-5cac2e62[data-active]{--_file-opacity:1;--_file-color:var(--_file-active-color)!important;--_file-bg:var(--_file-active-bg)}.m-5cac2e62{--_file-opacity:0.8;--_file-cursor:pointer}[data-mantine-color-scheme=light] .m-5cac2e62{--_file-color:var(--mantine-color-gray-8);--_file-bd:var(--mantine-color-gray-2);--_file-active-bg:var(--mantine-color-white);--_file-active-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-5cac2e62{--_file-color:var(--mantine-color-dark-0);--_file-bd:var(--mantine-color-dark-4);--_file-active-bg:var(--mantine-color-dark-6);--_file-active-color:var(--mantine-color-white)}.m-38d99e51{display:flex}.m-9f507240{max-height:var(--ch-max-collapsed-height);overflow:hidden;position:relative}.m-9f507240:before{background-image:linear-gradient(0deg,var(--_background) 16%,transparent 100%);border-radius:calc(var(--mantine-radius-md) - .0625rem*var(--mantine-scale));content:"";inset:0;pointer-events:none;position:absolute;z-index:100}.m-9f507240[data-expanded]{max-height:none}.m-9f507240[data-expanded]:before{display:none}.m-c9378bc2{bottom:0;color:var(--mantine-color-anchor);font-size:var(--mantine-font-size-sm);left:50%;padding-bottom:var(--mantine-spacing-xs);padding-top:var(--mantine-spacing-xs);position:absolute;text-align:center;transform:translateX(-50%);width:100%;z-index:101}.m-c9378bc2[data-hidden]{display:none}.m-5cb1b9c8{margin-top:0;position:relative}.m-5cb1b9c8[data-collapsed] .mantine-ScrollArea-viewport>div{display:block!important}.m-b46cddfb{align-items:center;display:flex;flex:0;justify-content:center}.m-b46cddfb>svg{display:block}.m-1f5e827e{background:var(--_background);color:var(--_color)}[data-mantine-color-scheme=light] .m-1f5e827e{--_color:var(--mantine-color-gray-7);--_background:var(--mantine-color-gray-0);--code-comment-color:var(--mantine-color-gray-6);--code-keyword-color:var(--mantine-color-violet-8);--code-tag-color:var(--mantine-color-red-9);--code-literal-color:var(--mantine-color-blue-6);--code-string-color:var(--mantine-color-blue-9);--code-variable-color:var(--mantine-color-lime-9);--code-class-color:var(--mantine-color-orange-9)}[data-mantine-color-scheme=dark] .m-1f5e827e{--_color:var(--mantine-color-dark-1);--_background:var(--mantine-color-dark-8);--code-comment-color:var(--mantine-color-dark-3);--code-keyword-color:var(--mantine-color-violet-3);--code-tag-color:var(--mantine-color-yellow-4);--code-literal-color:var(--mantine-color-blue-4);--code-string-color:var(--mantine-color-green-6);--code-variable-color:var(--mantine-color-blue-2);--code-class-color:var(--mantine-color-orange-5)}.m-1f5e827e .hljs-comment,.m-1f5e827e .hljs-quote{color:var(--code-comment-color);font-style:italic}.m-1f5e827e .hljs-doctag,.m-1f5e827e .hljs-formula,.m-1f5e827e .hljs-keyword{color:var(--code-keyword-color)}.m-1f5e827e .hljs-deletion,.m-1f5e827e .hljs-name,.m-1f5e827e .hljs-section,.m-1f5e827e .hljs-selector-tag,.m-1f5e827e .hljs-subst{color:var(--code-tag-color)}.m-1f5e827e .hljs-literal{color:var(--code-literal-color)}.m-1f5e827e .hljs-addition,.m-1f5e827e .hljs-attribute,.m-1f5e827e .hljs-meta .hljs-string,.m-1f5e827e .hljs-regexp,.m-1f5e827e .hljs-string{color:var(--code-string-color)}.m-1f5e827e .hljs-attr,.m-1f5e827e .hljs-number,.m-1f5e827e .hljs-selector-attr,.m-1f5e827e .hljs-selector-class,.m-1f5e827e .hljs-selector-pseudo,.m-1f5e827e .hljs-template-variable,.m-1f5e827e .hljs-type,.m-1f5e827e .hljs-variable{color:var(--code-variable-color)}.m-1f5e827e .hljs-built_in,.m-1f5e827e .hljs-bullet,.m-1f5e827e .hljs-class .hljs-title,.m-1f5e827e .hljs-link,.m-1f5e827e .hljs-meta,.m-1f5e827e .hljs-selector-id,.m-1f5e827e .hljs-symbol,.m-1f5e827e .hljs-title,.m-1f5e827e .hljs-title.class_{color:var(--code-class-color)}.m-1f5e827e .hljs-emphasis{font-style:italic}.m-1f5e827e .hljs-strong{font-weight:700}.m-1f5e827e .hljs-link{text-decoration:underline}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-highlight.mjs","sources":["../src/use-highlight.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport hljs from 'highlight.js';\n\ninterface UseHighlightInput {\n code: string;\n language: string;\n highlightOnClient: boolean | undefined;\n}\n\nexport function useHighlight({ code, language, highlightOnClient }: UseHighlightInput) {\n const lang = hljs.getLanguage(language) ? language : 'plaintext';\n const getHighlightedCode = () => hljs.highlight(code.trim(), { language: lang }).value;\n const [highlighted, setHighlighted] = useState(!highlightOnClient);\n const [highlightedCode, setHighlightedCode] = useState(\n highlightOnClient ? code : getHighlightedCode()\n );\n\n const getCodeProps = () =>\n highlighted\n ? { dangerouslySetInnerHTML: { __html: highlightedCode } }\n : { children: code.trim() };\n\n useEffect(() => {\n if (highlightOnClient) {\n setHighlightedCode(getHighlightedCode());\n setHighlighted(true);\n }\n }, []);\n\n useEffect(() => {\n setHighlightedCode(getHighlightedCode());\n }, [code]);\n\n return getCodeProps;\n}\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"use-highlight.mjs","sources":["../src/use-highlight.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport hljs from 'highlight.js';\n\ninterface UseHighlightInput {\n code: string;\n language: string;\n highlightOnClient: boolean | undefined;\n}\n\nexport function useHighlight({ code, language, highlightOnClient }: UseHighlightInput) {\n const lang = hljs.getLanguage(language) ? language : 'plaintext';\n const getHighlightedCode = () => hljs.highlight(code.trim(), { language: lang }).value;\n const [highlighted, setHighlighted] = useState(!highlightOnClient);\n const [highlightedCode, setHighlightedCode] = useState(\n highlightOnClient ? code : getHighlightedCode()\n );\n\n const getCodeProps = () =>\n highlighted\n ? { dangerouslySetInnerHTML: { __html: highlightedCode } }\n : { children: code.trim() };\n\n useEffect(() => {\n if (highlightOnClient) {\n setHighlightedCode(getHighlightedCode());\n setHighlighted(true);\n }\n }, []);\n\n useEffect(() => {\n setHighlightedCode(getHighlightedCode());\n }, [code]);\n\n return getCodeProps;\n}\n"],"names":[],"mappings":";;;;AAGO,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAC,CAAE,CAAA,CAAA,CAAA,CAAA,CAAI,EAAE,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAE,CAAA,CAAA;AACpE,CAAA,CAAE,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAG,CAAA,CAAA,CA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
+
"version": "7.3.0-alpha.1",
|
|
3
4
|
"description": "Code highlight with Mantine theme",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"homepage": "https://mantine.dev/others/prism/",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Vitaly Rtishchev <rtivital@gmail.com>",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"code",
|
|
10
|
+
"components",
|
|
11
|
+
"frontend",
|
|
12
|
+
"highlight",
|
|
13
|
+
"library",
|
|
14
|
+
"next",
|
|
15
|
+
"nextjs",
|
|
16
|
+
"react",
|
|
17
|
+
"syntax",
|
|
18
|
+
"syntax-highlight",
|
|
19
|
+
"ui",
|
|
20
|
+
"ui-kit"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"*.css"
|
|
24
|
+
],
|
|
25
|
+
"main": "./cjs/index.cjs",
|
|
7
26
|
"module": "./esm/index.mjs",
|
|
27
|
+
"types": "./lib/index.d.ts",
|
|
8
28
|
"exports": {
|
|
9
29
|
".": {
|
|
10
30
|
"import": {
|
|
@@ -13,46 +33,30 @@
|
|
|
13
33
|
},
|
|
14
34
|
"require": {
|
|
15
35
|
"types": "./lib/index.d.ts",
|
|
16
|
-
"default": "./cjs/index.
|
|
36
|
+
"default": "./cjs/index.cjs"
|
|
17
37
|
}
|
|
18
38
|
},
|
|
19
39
|
"./styles.css": "./esm/index.css",
|
|
20
40
|
"./styles.layer.css": "./esm/index.layer.css"
|
|
21
41
|
},
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"author": "Vitaly Rtishchev <rtivital@gmail.com>",
|
|
24
|
-
"sideEffects": [
|
|
25
|
-
"*.css"
|
|
26
|
-
],
|
|
27
|
-
"homepage": "https://mantine.dev/others/prism/",
|
|
28
42
|
"repository": {
|
|
29
43
|
"url": "https://github.com/mantinedev/mantine.git",
|
|
30
44
|
"type": "git",
|
|
31
45
|
"directory": "src/mantine-prism"
|
|
32
46
|
},
|
|
33
|
-
"keywords": [
|
|
34
|
-
"react",
|
|
35
|
-
"next",
|
|
36
|
-
"nextjs",
|
|
37
|
-
"ui",
|
|
38
|
-
"components",
|
|
39
|
-
"ui-kit",
|
|
40
|
-
"library",
|
|
41
|
-
"frontend",
|
|
42
|
-
"code",
|
|
43
|
-
"highlight",
|
|
44
|
-
"syntax",
|
|
45
|
-
"syntax-highlight"
|
|
46
|
-
],
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@mantine/core": "7.
|
|
49
|
-
"@mantine/hooks": "7.
|
|
48
|
+
"@mantine/core": "7.3.0-alpha.1",
|
|
49
|
+
"@mantine/hooks": "7.3.0-alpha.1",
|
|
50
50
|
"react": "^18.2.0",
|
|
51
51
|
"react-dom": "^18.2.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
54
|
+
"clsx": "2.0.0",
|
|
55
|
+
"highlight.js": "^11.9.0"
|
|
56
56
|
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@mantine/core": "7.3.0-alpha.1",
|
|
59
|
+
"@mantine/hooks": "7.3.0-alpha.1",
|
|
60
|
+
"@tests/core": "1.0.0"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/tsconfig.build.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "
|
|
3
|
-
"include": ["./src", "./types", "
|
|
2
|
+
"extends": "../../../tsconfig.base.json",
|
|
3
|
+
"include": ["./src", "./types", "../../../@types"],
|
|
4
4
|
"exclude": ["./lib", "./esm", "./cjs", "**/*.story.tsx", "**/*.test.tsx", "**/*.test.ts"],
|
|
5
5
|
"compilerOptions": {
|
|
6
6
|
"rootDir": "src",
|
|
@@ -8,16 +8,6 @@
|
|
|
8
8
|
"outDir": "lib",
|
|
9
9
|
"declaration": true,
|
|
10
10
|
"declarationDir": "lib",
|
|
11
|
-
"composite": true
|
|
12
|
-
|
|
13
|
-
"@mantine/core": ["../mantine-core/src"],
|
|
14
|
-
"@mantine/hooks": ["../mantine-hooks/src"],
|
|
15
|
-
"@mantine/tests": ["../mantine-tests/src"]
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"references": [
|
|
19
|
-
{ "path": "../mantine-core" },
|
|
20
|
-
{ "path": "../mantine-hooks" },
|
|
21
|
-
{ "path": "../mantine-tests" }
|
|
22
|
-
]
|
|
11
|
+
"composite": true
|
|
12
|
+
}
|
|
23
13
|
}
|