Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mattsjones/css-core

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mattsjones/css-core - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

CHANGELOG.md

7

adapter/dist/mattsjones-css-core-adapter.browser.cjs.js

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

registerClassName: () => {},
getRegisteredClassNames: () => []
getRegisteredClassNames: () => [],
onEndFileScope: () => {}
};

@@ -23,6 +24,10 @@ const setAdapter = newAdapter => {

};
const onEndFileScope = (...props) => {
return adapter.onEndFileScope(...props);
};
exports.appendCss = appendCss;
exports.getRegisteredClassNames = getRegisteredClassNames;
exports.onEndFileScope = onEndFileScope;
exports.registerClassName = registerClassName;
exports.setAdapter = setAdapter;

8

adapter/dist/mattsjones-css-core-adapter.browser.esm.js
let adapter = {
appendCss: () => {},
registerClassName: () => {},
getRegisteredClassNames: () => []
getRegisteredClassNames: () => [],
onEndFileScope: () => {}
};

@@ -18,3 +19,6 @@ const setAdapter = newAdapter => {

};
const onEndFileScope = (...props) => {
return adapter.onEndFileScope(...props);
};
export { appendCss, getRegisteredClassNames, registerClassName, setAdapter };
export { appendCss, getRegisteredClassNames, onEndFileScope, registerClassName, setAdapter };

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

registerClassName: () => {},
getRegisteredClassNames: () => []
getRegisteredClassNames: () => [],
onEndFileScope: () => {}
};

@@ -23,6 +24,10 @@ const setAdapter = newAdapter => {

};
const onEndFileScope = (...props) => {
return adapter.onEndFileScope(...props);
};
exports.appendCss = appendCss;
exports.getRegisteredClassNames = getRegisteredClassNames;
exports.onEndFileScope = onEndFileScope;
exports.registerClassName = registerClassName;
exports.setAdapter = setAdapter;

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

registerClassName: () => {},
getRegisteredClassNames: () => []
getRegisteredClassNames: () => [],
onEndFileScope: () => {}
};

@@ -23,6 +24,10 @@ const setAdapter = newAdapter => {

};
const onEndFileScope = (...props) => {
return adapter.onEndFileScope(...props);
};
exports.appendCss = appendCss;
exports.getRegisteredClassNames = getRegisteredClassNames;
exports.onEndFileScope = onEndFileScope;
exports.registerClassName = registerClassName;
exports.setAdapter = setAdapter;
let adapter = {
appendCss: () => {},
registerClassName: () => {},
getRegisteredClassNames: () => []
getRegisteredClassNames: () => [],
onEndFileScope: () => {}
};

@@ -18,3 +19,6 @@ const setAdapter = newAdapter => {

};
const onEndFileScope = (...props) => {
return adapter.onEndFileScope(...props);
};
export { appendCss, getRegisteredClassNames, registerClassName, setAdapter };
export { appendCss, getRegisteredClassNames, onEndFileScope, registerClassName, setAdapter };

@@ -6,1 +6,2 @@ import type { Adapter } from './types';

export declare const getRegisteredClassNames: Adapter['getRegisteredClassNames'];
export declare const onEndFileScope: Adapter['onEndFileScope'];

@@ -42,3 +42,4 @@ import type { PropertiesFallback } from 'csstype';

getRegisteredClassNames: () => Array<string>;
onEndFileScope: (fileScope: string) => void;
}
export {};

@@ -5,3 +5,3 @@ 'use strict';

var generateCss_dist_mattsjonesCssCoreGenerateCss = require('./generateCss-b6aae341.browser.cjs.js');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('./generateCss-0f19bc03.browser.cjs.js');
var adapter_dist_mattsjonesCssCoreAdapter = require('../adapter/dist/mattsjones-css-core-adapter.browser.cjs.js');

@@ -27,2 +27,3 @@ var hash = require('@emotion/hash');

const localClassNames = new Set();
let bufferedCSSObjs = [];

@@ -47,7 +48,3 @@ function getStylesheet() {

appendCss: cssObj => {
const css = generateCss_dist_mattsjonesCssCoreGenerateCss.generateCss(cssObj);
for (const rule of css) {
getStylesheet().insertRule(rule);
}
bufferedCSSObjs.push(cssObj);
},

@@ -57,3 +54,17 @@ registerClassName: className => {

},
getRegisteredClassNames: () => Array.from(localClassNames)
getRegisteredClassNames: () => Array.from(localClassNames),
onEndFileScope: () => {
const css = generateCss_dist_mattsjonesCssCoreGenerateCss.generateCss(...bufferedCSSObjs);
const stylesheet = getStylesheet();
for (const rule of css) {
try {
stylesheet.insertRule(rule, stylesheet.cssRules.length);
} catch (e) {
console.warn(e);
}
}
bufferedCSSObjs = [];
}
};

@@ -60,0 +71,0 @@

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

import { g as generateCss, s as sanitiseIdent } from './generateCss-b00bb8d0.browser.esm.js';
import { g as generateCss, s as sanitiseIdent } from './generateCss-a758bf8f.browser.esm.js';
import { registerClassName, appendCss, setAdapter } from '../adapter/dist/mattsjones-css-core-adapter.browser.esm.js';

@@ -17,2 +17,3 @@ import hash from '@emotion/hash';

const localClassNames = new Set();
let bufferedCSSObjs = [];

@@ -37,7 +38,3 @@ function getStylesheet() {

appendCss: cssObj => {
const css = generateCss(cssObj);
for (const rule of css) {
getStylesheet().insertRule(rule);
}
bufferedCSSObjs.push(cssObj);
},

@@ -47,3 +44,17 @@ registerClassName: className => {

},
getRegisteredClassNames: () => Array.from(localClassNames)
getRegisteredClassNames: () => Array.from(localClassNames),
onEndFileScope: () => {
const css = generateCss(...bufferedCSSObjs);
const stylesheet = getStylesheet();
for (const rule of css) {
try {
stylesheet.insertRule(rule, stylesheet.cssRules.length);
} catch (e) {
console.warn(e);
}
}
bufferedCSSObjs = [];
}
};

@@ -50,0 +61,0 @@

@@ -5,3 +5,3 @@ 'use strict';

var generateCss_dist_mattsjonesCssCoreGenerateCss = require('./generateCss-6be1a9e9.cjs.dev.js');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('./generateCss-35f6aedf.cjs.dev.js');
var adapter_dist_mattsjonesCssCoreAdapter = require('../adapter/dist/mattsjones-css-core-adapter.cjs.dev.js');

@@ -27,2 +27,3 @@ var hash = require('@emotion/hash');

const localClassNames = new Set();
let bufferedCSSObjs = [];

@@ -47,7 +48,3 @@ function getStylesheet() {

appendCss: cssObj => {
const css = generateCss_dist_mattsjonesCssCoreGenerateCss.generateCss(cssObj);
for (const rule of css) {
getStylesheet().insertRule(rule);
}
bufferedCSSObjs.push(cssObj);
},

@@ -57,3 +54,17 @@ registerClassName: className => {

},
getRegisteredClassNames: () => Array.from(localClassNames)
getRegisteredClassNames: () => Array.from(localClassNames),
onEndFileScope: () => {
const css = generateCss_dist_mattsjonesCssCoreGenerateCss.generateCss(...bufferedCSSObjs);
const stylesheet = getStylesheet();
for (const rule of css) {
try {
stylesheet.insertRule(rule, stylesheet.cssRules.length);
} catch (e) {
console.warn(e);
}
}
bufferedCSSObjs = [];
}
};

@@ -60,0 +71,0 @@

@@ -5,3 +5,3 @@ 'use strict';

var generateCss_dist_mattsjonesCssCoreGenerateCss = require('./generateCss-1c3288df.cjs.prod.js');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('./generateCss-0e42352c.cjs.prod.js');
var adapter_dist_mattsjonesCssCoreAdapter = require('../adapter/dist/mattsjones-css-core-adapter.cjs.prod.js');

@@ -27,2 +27,3 @@ var hash = require('@emotion/hash');

const localClassNames = new Set();
let bufferedCSSObjs = [];

@@ -47,7 +48,3 @@ function getStylesheet() {

appendCss: cssObj => {
const css = generateCss_dist_mattsjonesCssCoreGenerateCss.generateCss(cssObj);
for (const rule of css) {
getStylesheet().insertRule(rule);
}
bufferedCSSObjs.push(cssObj);
},

@@ -57,3 +54,17 @@ registerClassName: className => {

},
getRegisteredClassNames: () => Array.from(localClassNames)
getRegisteredClassNames: () => Array.from(localClassNames),
onEndFileScope: () => {
const css = generateCss_dist_mattsjonesCssCoreGenerateCss.generateCss(...bufferedCSSObjs);
const stylesheet = getStylesheet();
for (const rule of css) {
try {
stylesheet.insertRule(rule, stylesheet.cssRules.length);
} catch (e) {
console.warn(e);
}
}
bufferedCSSObjs = [];
}
};

@@ -60,0 +71,0 @@

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

import { g as generateCss, s as sanitiseIdent } from './generateCss-23bcc40e.esm.js';
import { g as generateCss, s as sanitiseIdent } from './generateCss-addefd6f.esm.js';
import { registerClassName, appendCss, setAdapter } from '../adapter/dist/mattsjones-css-core-adapter.esm.js';

@@ -17,2 +17,3 @@ import hash from '@emotion/hash';

const localClassNames = new Set();
let bufferedCSSObjs = [];

@@ -37,7 +38,3 @@ function getStylesheet() {

appendCss: cssObj => {
const css = generateCss(cssObj);
for (const rule of css) {
getStylesheet().insertRule(rule);
}
bufferedCSSObjs.push(cssObj);
},

@@ -47,3 +44,17 @@ registerClassName: className => {

},
getRegisteredClassNames: () => Array.from(localClassNames)
getRegisteredClassNames: () => Array.from(localClassNames),
onEndFileScope: () => {
const css = generateCss(...bufferedCSSObjs);
const stylesheet = getStylesheet();
for (const rule of css) {
try {
stylesheet.insertRule(rule, stylesheet.cssRules.length);
} catch (e) {
console.warn(e);
}
}
bufferedCSSObjs = [];
}
};

@@ -50,0 +61,0 @@

@@ -5,2 +5,4 @@ 'use strict';

var adapter_dist_mattsjonesCssCoreAdapter = require('../../adapter/dist/mattsjones-css-core-adapter.browser.cjs.js');
let refCounter = 0;

@@ -14,2 +16,3 @@ const defaultFileScope = 'DEFAULT_FILE_SCOPE';

function endFileScope() {
adapter_dist_mattsjonesCssCoreAdapter.onEndFileScope(getFileScope());
refCounter = 0;

@@ -16,0 +19,0 @@ fileScopes.splice(0, 1);

@@ -0,1 +1,3 @@

import { onEndFileScope } from '../../adapter/dist/mattsjones-css-core-adapter.browser.esm.js';
let refCounter = 0;

@@ -9,2 +11,3 @@ const defaultFileScope = 'DEFAULT_FILE_SCOPE';

function endFileScope() {
onEndFileScope(getFileScope());
refCounter = 0;

@@ -11,0 +14,0 @@ fileScopes.splice(0, 1);

@@ -5,2 +5,4 @@ 'use strict';

var adapter_dist_mattsjonesCssCoreAdapter = require('../../adapter/dist/mattsjones-css-core-adapter.cjs.dev.js');
let refCounter = 0;

@@ -14,2 +16,3 @@ const defaultFileScope = 'DEFAULT_FILE_SCOPE';

function endFileScope() {
adapter_dist_mattsjonesCssCoreAdapter.onEndFileScope(getFileScope());
refCounter = 0;

@@ -16,0 +19,0 @@ fileScopes.splice(0, 1);

@@ -5,2 +5,4 @@ 'use strict';

var adapter_dist_mattsjonesCssCoreAdapter = require('../../adapter/dist/mattsjones-css-core-adapter.cjs.prod.js');
let refCounter = 0;

@@ -14,2 +16,3 @@ const defaultFileScope = 'DEFAULT_FILE_SCOPE';

function endFileScope() {
adapter_dist_mattsjonesCssCoreAdapter.onEndFileScope(getFileScope());
refCounter = 0;

@@ -16,0 +19,0 @@ fileScopes.splice(0, 1);

@@ -0,1 +1,3 @@

import { onEndFileScope } from '../../adapter/dist/mattsjones-css-core-adapter.esm.js';
let refCounter = 0;

@@ -9,2 +11,3 @@ const defaultFileScope = 'DEFAULT_FILE_SCOPE';

function endFileScope() {
onEndFileScope(getFileScope());
refCounter = 0;

@@ -11,0 +14,0 @@ fileScopes.splice(0, 1);

@@ -7,3 +7,3 @@ 'use strict';

require('postcss');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('../../dist/generateCss-b6aae341.browser.cjs.js');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('../../dist/generateCss-0f19bc03.browser.cjs.js');
require('@emotion/hash');

@@ -10,0 +10,0 @@ require('lodash/each');

import 'postcss-js';
import 'postcss';
export { g as generateCss } from '../../dist/generateCss-b00bb8d0.browser.esm.js';
export { g as generateCss } from '../../dist/generateCss-a758bf8f.browser.esm.js';
import '@emotion/hash';

@@ -5,0 +5,0 @@ import 'lodash/each';

@@ -7,3 +7,3 @@ 'use strict';

require('postcss');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('../../dist/generateCss-6be1a9e9.cjs.dev.js');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('../../dist/generateCss-35f6aedf.cjs.dev.js');
require('@emotion/hash');

@@ -10,0 +10,0 @@ require('lodash/each');

@@ -7,3 +7,3 @@ 'use strict';

require('postcss');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('../../dist/generateCss-1c3288df.cjs.prod.js');
var generateCss_dist_mattsjonesCssCoreGenerateCss = require('../../dist/generateCss-0e42352c.cjs.prod.js');
require('@emotion/hash');

@@ -10,0 +10,0 @@ require('lodash/each');

import 'postcss-js';
import 'postcss';
export { g as generateCss } from '../../dist/generateCss-23bcc40e.esm.js';
export { g as generateCss } from '../../dist/generateCss-addefd6f.esm.js';
import '@emotion/hash';

@@ -5,0 +5,0 @@ import 'lodash/each';

{
"name": "@mattsjones/css-core",
"version": "0.0.8",
"version": "0.0.9",
"main": "dist/mattsjones-css-core.cjs.js",

@@ -5,0 +5,0 @@ "module": "dist/mattsjones-css-core.esm.js",

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