zss-engine 0.2.67 → 0.2.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.splitAtomicAndNested = splitAtomicAndNested;
4
4
  exports.processAtomicProps = processAtomicProps;
5
5
  const index_js_1 = require("../index.js");
6
- const shorthand_1 = require("./shorthand");
6
+ const shorthand_js_1 = require("./shorthand.js");
7
7
  function splitAtomicAndNested(obj, flat, nonFlat) {
8
8
  Object.entries(obj).forEach(([property, value]) => {
9
9
  if (property.startsWith(':') || property.startsWith('&')) {
@@ -27,7 +27,7 @@ function splitAtomicAndNested(obj, flat, nonFlat) {
27
27
  });
28
28
  }
29
29
  const LONG_TO_SHORT = {};
30
- Object.entries(shorthand_1.SHORTHAND_PROPERTIES).forEach(([shorthand, longhands]) => {
30
+ Object.entries(shorthand_js_1.SHORTHAND_PROPERTIES).forEach(([shorthand, longhands]) => {
31
31
  longhands.forEach(long => {
32
32
  LONG_TO_SHORT[long] = shorthand;
33
33
  });
@@ -41,8 +41,8 @@ function processAtomicProps(flatProps, atomicHashes, allStyleSheets, parentAtRul
41
41
  continue;
42
42
  }
43
43
  const kebab = (0, index_js_1.camelToKebabCase)(property);
44
- if (shorthand_1.SHORTHAND_PROPERTIES[kebab]) {
45
- const longhands = shorthand_1.SHORTHAND_PROPERTIES[kebab];
44
+ if (shorthand_js_1.SHORTHAND_PROPERTIES[kebab]) {
45
+ const longhands = shorthand_js_1.SHORTHAND_PROPERTIES[kebab];
46
46
  longhands.forEach(l => seen.delete(l));
47
47
  seen.add(kebab);
48
48
  resultQueue.push([property, value]);
@@ -1,5 +1,5 @@
1
1
  import { camelToKebabCase, genBase36Hash, applyCssValue, transpileAtomic } from '../index.js';
2
- import { SHORTHAND_PROPERTIES } from './shorthand';
2
+ import { SHORTHAND_PROPERTIES } from './shorthand.js';
3
3
  function splitAtomicAndNested(obj, flat, nonFlat) {
4
4
  Object.entries(obj).forEach(([property, value]) => {
5
5
  if (property.startsWith(':') || property.startsWith('&')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zss-engine",
3
- "version": "0.2.67",
3
+ "version": "0.2.69",
4
4
  "description": "Zero-runtime StyleSheet Engine",
5
5
  "keywords": [
6
6
  "zero-runtime",
@@ -3,6 +3,10 @@ type JSXType = keyof HTMLElementTagNameMap | '*' | ':root';
3
3
  type HTMLSelector = {
4
4
  [K in JSXType]: CSSProperties;
5
5
  };
6
+ type ClassName = `.${string}`;
7
+ type ClassNameSelector = {
8
+ [K in ClassName]: CSSProperties;
9
+ };
6
10
  type Attribute = `${string}[${string}]${string}`;
7
11
  type AttributeSelector = {
8
12
  [K in Attribute]: CSSProperties;
@@ -29,5 +33,5 @@ type KeyframesSelector = {
29
33
  type QuerySelectorHTML = {
30
34
  [K in Query]: CSSHTML;
31
35
  };
32
- export type CSSHTML = HTMLSelector | AttributeSelector | ConsecutiveSelector | PseudoClassSelector | PseudoElementSelector | KeyframesSelector | QuerySelectorHTML;
36
+ export type CSSHTML = HTMLSelector | ClassNameSelector | AttributeSelector | ConsecutiveSelector | PseudoClassSelector | PseudoElementSelector | KeyframesSelector | QuerySelectorHTML;
33
37
  export {};