New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@codemirror/lang-css

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/lang-css - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

6

CHANGELOG.md

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

## 6.1.1 (2023-03-08)
### Bug fixes
Provide better completions when completing directly in a `Styles` top node.
## 6.1.0 (2023-03-06)

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

16

dist/index.js

@@ -145,2 +145,10 @@ import { parser } from '@lezer/css';

const declSelector = ["Declaration"];
function astTop(node) {
for (let cur = node;;) {
if (cur.type.isTop)
return cur;
if (!(cur = cur.parent))
return node;
}
}
function variableNames(doc, node) {

@@ -182,6 +190,6 @@ if (node.to - node.from > 4096) {

const cssCompletionSource = context => {
var _a;
let { state, pos } = context, node = syntaxTree(state).resolveInner(pos, -1);
let isDash = node.type.isError && node.from == node.to - 1 && state.doc.sliceString(node.from, node.to) == "-";
if (node.name == "PropertyName" || isDash && ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.name) == "Block")
if (node.name == "PropertyName" ||
(isDash || node.name == "TagName") && /^(Block|Styles)$/.test(node.resolve(node.to).name))
return { from: node.from, options: properties(), validFor: identifier };

@@ -194,3 +202,3 @@ if (node.name == "ValueName")

return { from: node.name == "VariableName" ? node.from : pos,
options: variableNames(state.doc, syntaxTree(state).topNode),
options: variableNames(state.doc, astTop(node)),
validFor: variable };

@@ -210,3 +218,3 @@ if (node.name == "TagName") {

return { from: pos, options: values, validFor: identifier };
if (above.name == "Block")
if (above.name == "Block" || above.name == "Styles")
return { from: pos, options: properties(), validFor: identifier };

@@ -213,0 +221,0 @@ return null;

{
"name": "@codemirror/lang-css",
"version": "6.1.0",
"version": "6.1.1",
"description": "CSS language support for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

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