Socket
Socket
Sign inDemoInstall

@codemirror/panel

Package Overview
Dependencies
6
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.17.1 to 0.18.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.18.0 (2021-03-03)
### Breaking changes
Extra CSS classes for panels must now be specified with the `class` option. The `style` option no longer exists.
## 0.17.1 (2021-01-06)

@@ -2,0 +8,0 @@

2

dist/index.d.ts

@@ -13,3 +13,3 @@ import { ViewUpdate, EditorView } from '@codemirror/view';

update?(update: ViewUpdate): void;
style?: string;
class?: string;
top?: boolean;

@@ -16,0 +16,0 @@ pos?: number;

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

import { ViewPlugin, themeClass, PluginField, EditorView } from '@codemirror/view';
import { ViewPlugin, PluginField, EditorView } from '@codemirror/view';
import { Facet } from '@codemirror/state';

@@ -43,3 +43,5 @@

for (let p of this.panels) {
p.dom.className += " " + panelClass(p);
p.dom.classList.add("cm-panel");
if (p.class)
p.dom.classList.add(p.class);
if (p.mount)

@@ -83,3 +85,5 @@ p.mount();

for (let p of mount) {
p.dom.className += " " + panelClass(p);
p.dom.classList.add("cm-panel");
if (p.class)
p.dom.classList.add(p.class);
if (p.mount)

@@ -102,5 +106,2 @@ p.mount();

});
function panelClass(panel) {
return themeClass(panel.style ? `panel.${panel.style}` : "panel");
}
class PanelGroup {

@@ -130,3 +131,3 @@ constructor(view, top, container) {

this.dom = document.createElement("div");
this.dom.className = themeClass(this.top ? "panels.top" : "panels.bottom");
this.dom.className = this.top ? "cm-panels cm-panels-top" : "cm-panels cm-panels-bottom";
this.dom.style[this.top ? "top" : "bottom"] = "0";

@@ -172,3 +173,3 @@ let parent = this.container || this.view.dom;

const baseTheme = EditorView.baseTheme({
$panels: {
".cm-panels": {
boxSizing: "border-box",

@@ -179,13 +180,13 @@ position: "sticky",

},
"$$light $panels": {
"&light .cm-panels": {
backgroundColor: "#f5f5f5",
color: "black"
},
"$$light $panels.top": {
"&light .cm-panels-top": {
borderBottom: "1px solid #ddd"
},
"$$light $panels.bottom": {
"&light .cm-panels-bottom": {
borderTop: "1px solid #ddd"
},
"$$dark $panels": {
"&dark .cm-panels": {
backgroundColor: "#333338",

@@ -192,0 +193,0 @@ color: "white"

{
"name": "@codemirror/panel",
"version": "0.17.1",
"version": "0.18.0",
"description": "UI panels for the CodeMirror code editor",

@@ -29,4 +29,4 @@ "scripts": {

"dependencies": {
"@codemirror/state": "^0.17.0",
"@codemirror/view": "^0.17.0"
"@codemirror/state": "^0.18.0",
"@codemirror/view": "^0.18.0"
},

@@ -33,0 +33,0 @@ "devDependencies": {

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc