Comparing version 0.3.0 to 0.4.0
@@ -7,2 +7,3 @@ import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
value?: string; | ||
controls?: boolean; | ||
onChange?: (code: string) => void; | ||
@@ -15,5 +16,7 @@ highlight?: (code: string) => string; | ||
declare function Code({ children: code, filename, controls, ...props }: { | ||
declare function Code({ children: code, title, controls, preformatted, ...props }: { | ||
children: string; | ||
filename?: string; | ||
/** Whether to use a preformatted block <pre><code> */ | ||
preformatted?: boolean; | ||
title?: string; | ||
controls?: boolean; | ||
@@ -20,0 +23,0 @@ } & React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element; |
import { jsxs, jsx } from 'react/jsx-runtime'; | ||
import { E as Editor$1 } from './editor-client-O9oTc_rQ.js'; | ||
export { C as Code } from './editor-client-O9oTc_rQ.js'; | ||
import { E as Editor$1 } from './editor-client-CWlfNaH4.js'; | ||
export { C as Code } from './editor-client-CWlfNaH4.js'; | ||
@@ -5,0 +5,0 @@ const css = ` |
{ | ||
"name": "codice", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"type": "module", | ||
@@ -14,2 +14,3 @@ "exports": "./dist/index.js", | ||
"build": "bunchee", | ||
"test": "vitest", | ||
"dev": "bunchee --watch", | ||
@@ -27,5 +28,7 @@ "site": "next dev site", | ||
"next": "15.1.5", | ||
"typescript": "^5.7.3" | ||
"react-dom": "^19.0.0", | ||
"typescript": "^5.7.3", | ||
"vitest": "^3.0.2" | ||
}, | ||
"packageManager": "pnpm@9.15.4" | ||
} |
@@ -44,3 +44,3 @@ # Codice | ||
<Code controls filename="app/index.js"> | ||
<Code controls title="app/index.js"> | ||
{'<div>Hello World</div>'} | ||
@@ -53,3 +53,3 @@ </Code> | ||
- `controls` (optional): A boolean value indicating whether to display the controls for the code block. | ||
- `filename` (optional): A string representing the filename of the code block. | ||
- `title` (optional): A string representing the title of the code block. | ||
@@ -65,2 +65,3 @@ ### Styling | ||
- `--codice-editor-caret-color`: The color of the caret in the editor. | ||
- `--codice-editor-control-color`: The color of the control items in the editor. | ||
@@ -84,5 +85,3 @@ For example, you can set the following CSS in your application: | ||
- `[data-codice-editor-controls]`: The class name for the controls in the editor. | ||
- `[data-codice-editor-controls-close]`: The class name for the close button. | ||
- `[data-codice-editor-controls-minimize]`: The class name for the minimize button. | ||
- `[data-codice-editor-controls-maximize]`: The class name for the maximize button. | ||
- `[data-codice-editor-control]`: The class name of control items, there're 3 of them. | ||
@@ -89,0 +88,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10943
251
6
87