npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@snack-uikit/code-editor

v0.2.0

Published

## Installation

Downloads

279

Readme

Code Editor

Installation

npm i @snack-uikit/code-editor

Changelog

CodeEditor

Props

| name | type | default value | description | |------|------|---------------|-------------| | themeClassName | string | - | Класснейм подключенной темы (из хука useThemeConfig() или ThemeProvider) По дефолту берется значение из useTheme внутри | | hasBackground | boolean | true | Включение/отключение псевдобекграунда | | defaultValue | string | - | Default value of the current model | | defaultLanguage | string | - | Default language of the current model | | defaultPath | string | - | Default path of the current model Will be passed as the third argument to .createModel method monaco.editor.createModel(..., ..., monaco.Uri.parse(defaultPath)) | | value | string | - | Value of the current model | | language | string | - | Language of the current model | | path | string | - | Path of the current model Will be passed as the third argument to .createModel method monaco.editor.createModel(..., ..., monaco.Uri.parse(defaultPath)) | | theme | string | "light" | The theme for the monaco Available options "vs-dark" | "light" Define new themes by monaco.editor.defineTheme | | line | number | - | The line to jump on it | | loading | ReactNode | "Loading..." | The loading screen before the editor will be mounted | | options | IStandaloneEditorConstructionOptions | - | IStandaloneEditorConstructionOptions | | overrideServices | IEditorOverrideServices | - | IEditorOverrideServices | | saveViewState | boolean | - | Indicator whether to save the models' view states between model changes or not Defaults to true | | keepCurrentModel | boolean | false | Indicator whether to dispose the current model when the Editor is unmounted or not | | width | string \| number | "100%" | Width of the editor wrapper | | height | string \| number | "100%" | Height of the editor wrapper | | className | string | - | Class name for the editor container | | wrapperProps | object | - | Props applied to the wrapper element | | beforeMount | BeforeMount | - | Signature: function(monaco: Monaco) => void An event is emitted before the editor is mounted It gets the monaco instance as a first argument Defaults to "noop" | | onMount | OnMount | - | Signature: function(editor: monaco.editor.IStandaloneCodeEditor, monaco: Monaco) => void An event is emitted when the editor is mounted It gets the editor instance as a first argument and the monaco instance as a second Defaults to "noop" | | onChange | OnChange | - | Signature: function(value: string | undefined, ev: monaco.editor.IModelContentChangedEvent) => void An event is emitted when the content of the current model is changed | | onValidate | OnValidate | - | Signature: function(markers: monaco.editor.IMarker[]) => void An event is emitted when the content of the current model is changed and the current model markers are ready Defaults to "noop" |