Socket
Socket
Sign inDemoInstall

@mantine/prism

Package Overview
Dependencies
Maintainers
1
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mantine/prism - npm Package Compare versions

Comparing version 5.10.1 to 6.0.0-alpha.0

4

cjs/Prism/CopyIcon.js

@@ -13,4 +13,4 @@ 'use strict';

return /* @__PURE__ */ React__default.createElement("svg", {
width: "15",
height: "15",
width: "1rem",
height: "1rem",
viewBox: "0 0 15 15",

@@ -17,0 +17,0 @@ fill: "none",

@@ -76,3 +76,4 @@ 'use strict';

radius,
getPrismTheme
getPrismTheme,
variant
} = _a, others = __objRest(_a, [

@@ -94,3 +95,4 @@ "className",

"radius",
"getPrismTheme"
"getPrismTheme",
"variant"
]);

@@ -107,3 +109,3 @@ const code = trim && typeof children === "string" ? children.trim() : children;

radius
}, { classNames, styles, unstyled, name: "Prism" });
}, { name: "Prism", classNames, styles, unstyled, variant });
return /* @__PURE__ */ React__default.createElement(core.Box, __spreadProps(__spreadValues({

@@ -110,0 +112,0 @@ className: cx(classes.root, className),

@@ -17,6 +17,6 @@ 'use strict';

lineHeight: 1.7,
fontSize: 13,
fontSize: core.rem(13),
overflowX: native ? "auto" : void 0,
borderRadius: theme.fn.radius(radius),
padding: `${theme.spacing.sm}px 0`,
padding: `${theme.spacing.sm} 0`,
marginTop: 0,

@@ -38,3 +38,3 @@ marginBottom: 0

width: "100%",
padding: `0 ${theme.spacing.md}px`
padding: `0 ${theme.spacing.md}`
},

@@ -44,3 +44,3 @@ lineNumber: {

textAlign: "right",
width: 8 * maxLineSize,
width: `calc(8 * ${core.rem(maxLineSize)})`,
marginRight: theme.dir === "ltr" ? theme.spacing.xs : void 0,

@@ -47,0 +47,0 @@ marginLeft: theme.dir === "rtl" ? theme.spacing.xs : void 0,

@@ -66,3 +66,4 @@ 'use strict';

getPrismTheme,
colorScheme
colorScheme,
variant
} = _b, others = __objRest(_b, [

@@ -80,3 +81,4 @@ "language",

"getPrismTheme",
"colorScheme"
"colorScheme",
"variant"
]);

@@ -96,3 +98,4 @@ const { classes } = PrismTabs_styles['default']({ radius });

getPrismTheme,
colorScheme
colorScheme,
variant
}, children));

@@ -99,0 +102,0 @@ }

@@ -11,4 +11,4 @@ 'use strict';

paddingRight: theme.spacing.sm,
height: 34,
border: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[3]}`,
height: core.rem(34),
border: `${core.rem(1)} solid ${theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[3]}`,
borderBottom: 0,

@@ -43,3 +43,3 @@ fontSize: theme.fontSizes.sm,

borderTopLeftRadius: 0,
border: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[3]}`,
border: `${core.rem(1)} solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[3]}`,
borderTop: 0,

@@ -46,0 +46,0 @@ overflow: "hidden"

@@ -5,4 +5,4 @@ import React from 'react';

return /* @__PURE__ */ React.createElement("svg", {
width: "15",
height: "15",
width: "1rem",
height: "1rem",
viewBox: "0 0 15 15",

@@ -9,0 +9,0 @@ fill: "none",

@@ -67,3 +67,4 @@ import React, { forwardRef } from 'react';

radius,
getPrismTheme
getPrismTheme,
variant
} = _a, others = __objRest(_a, [

@@ -85,3 +86,4 @@ "className",

"radius",
"getPrismTheme"
"getPrismTheme",
"variant"
]);

@@ -98,3 +100,3 @@ const code = trim && typeof children === "string" ? children.trim() : children;

radius
}, { classNames, styles, unstyled, name: "Prism" });
}, { name: "Prism", classNames, styles, unstyled, variant });
return /* @__PURE__ */ React.createElement(Box, __spreadProps(__spreadValues({

@@ -101,0 +103,0 @@ className: cx(classes.root, className),

@@ -1,2 +0,2 @@

import { createStyles } from '@mantine/core';
import { createStyles, rem } from '@mantine/core';

@@ -13,6 +13,6 @@ var useStyles = createStyles((theme, { colorScheme, native, maxLineSize, radius }) => ({

lineHeight: 1.7,
fontSize: 13,
fontSize: rem(13),
overflowX: native ? "auto" : void 0,
borderRadius: theme.fn.radius(radius),
padding: `${theme.spacing.sm}px 0`,
padding: `${theme.spacing.sm} 0`,
marginTop: 0,

@@ -34,3 +34,3 @@ marginBottom: 0

width: "100%",
padding: `0 ${theme.spacing.md}px`
padding: `0 ${theme.spacing.md}`
},

@@ -40,3 +40,3 @@ lineNumber: {

textAlign: "right",
width: 8 * maxLineSize,
width: `calc(8 * ${rem(maxLineSize)})`,
marginRight: theme.dir === "ltr" ? theme.spacing.xs : void 0,

@@ -43,0 +43,0 @@ marginLeft: theme.dir === "rtl" ? theme.spacing.xs : void 0,

@@ -58,3 +58,4 @@ import React from 'react';

getPrismTheme,
colorScheme
colorScheme,
variant
} = _b, others = __objRest(_b, [

@@ -72,3 +73,4 @@ "language",

"getPrismTheme",
"colorScheme"
"colorScheme",
"variant"
]);

@@ -88,3 +90,4 @@ const { classes } = useStyles({ radius });

getPrismTheme,
colorScheme
colorScheme,
variant
}, children));

@@ -91,0 +94,0 @@ }

@@ -1,2 +0,2 @@

import { createStyles } from '@mantine/core';
import { createStyles, rem } from '@mantine/core';

@@ -7,4 +7,4 @@ var useStyles = createStyles((theme, { radius }) => ({

paddingRight: theme.spacing.sm,
height: 34,
border: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[3]}`,
height: rem(34),
border: `${rem(1)} solid ${theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[3]}`,
borderBottom: 0,

@@ -39,3 +39,3 @@ fontSize: theme.fontSizes.sm,

borderTopLeftRadius: 0,
border: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[3]}`,
border: `${rem(1)} solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[3]}`,
borderTop: 0,

@@ -42,0 +42,0 @@ overflow: "hidden"

@@ -7,2 +7,3 @@ import React from 'react';

export interface PrismProps extends DefaultProps<PrismStylesNames>, Omit<React.ComponentPropsWithRef<'div'>, 'children'> {
variant?: string;
/** Code which will be highlighted */

@@ -31,3 +32,3 @@ children: string;

trim?: boolean;
/** Key of theme.radius or number to set border-radius in px */
/** Key of theme.radius or any valid CSS value to set border-radius, theme.defaultRadius by default */
radius?: MantineNumberSize;

@@ -37,3 +38,3 @@ /** Provide custom color scheme */

}
export declare const Prism: React.ForwardRefExoticComponent<Pick<PrismProps, "trim" | "p" | "slot" | "style" | "td" | "title" | "color" | "bottom" | "colorScheme" | "display" | "inset" | "left" | "opacity" | "right" | "top" | "translate" | "hidden" | "radius" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "language" | "noCopy" | "copyLabel" | "copiedLabel" | "withLineNumbers" | "highlightLines" | "scrollAreaComponent" | "getPrismTheme" | "c" | "sx" | "classNames" | "styles" | "unstyled" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "py" | "px" | "pt" | "pb" | "pl" | "pr" | "bg" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "bgsz" | "bgp" | "bgr" | "bga" | "pos"> & React.RefAttributes<HTMLDivElement>>;
export declare const Prism: React.ForwardRefExoticComponent<Pick<PrismProps, "color" | "bottom" | "colorScheme" | "display" | "inset" | "left" | "opacity" | "right" | "top" | "translate" | "hidden" | "radius" | "trim" | "p" | "slot" | "style" | "td" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "language" | "noCopy" | "copyLabel" | "copiedLabel" | "withLineNumbers" | "highlightLines" | "scrollAreaComponent" | "getPrismTheme" | "c" | "sx" | "classNames" | "styles" | "unstyled" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "py" | "px" | "pt" | "pb" | "pl" | "pr" | "bg" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "bgsz" | "bgp" | "bgr" | "bga" | "pos"> & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=Prism.d.ts.map

@@ -5,3 +5,3 @@ import { MantineNumberSize } from '@mantine/core';

native: boolean;
maxLineSize: number;
maxLineSize: number | string;
radius: MantineNumberSize;

@@ -8,0 +8,0 @@ }

@@ -5,3 +5,3 @@ /// <reference types="react" />

export declare function PrismTabs(props: TabsProps): JSX.Element;
export declare function PrismPanel({ language, children, radius, noCopy, copyLabel, copiedLabel, withLineNumbers, highlightLines, scrollAreaComponent, trim, getPrismTheme, colorScheme, ...others }: PrismProps & TabsPanelProps): JSX.Element;
export declare function PrismPanel({ language, children, radius, noCopy, copyLabel, copiedLabel, withLineNumbers, highlightLines, scrollAreaComponent, trim, getPrismTheme, colorScheme, variant, ...others }: PrismProps & TabsPanelProps): JSX.Element;
//# sourceMappingURL=PrismTabs.d.ts.map
{
"name": "@mantine/prism",
"description": "Code highlight with Mantine theme",
"version": "5.10.1",
"version": "6.0.0-alpha.0",
"main": "cjs/index.js",

@@ -32,4 +32,4 @@ "module": "esm/index.js",

"peerDependencies": {
"@mantine/core": "5.10.1",
"@mantine/hooks": "5.10.1",
"@mantine/core": "6.0.0-alpha.0",
"@mantine/hooks": "6.0.0-alpha.0",
"react": ">=16.8.0",

@@ -40,5 +40,5 @@ "react-dom": ">=16.8.0"

"prism-react-renderer": "^1.2.1",
"@mantine/utils": "5.10.1"
"@mantine/utils": "6.0.0-alpha.0"
},
"devDependencies": {}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc