@unocss/preset-mini 0.58.3 → 0.58.5

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.
package/dist/index.cjs CHANGED
@@ -6,8 +6,8 @@ const core = require('@unocss/core');
6
6
  const extractorArbitraryVariants = require('@unocss/extractor-arbitrary-variants');
7
7
  const utilities = require('./shared/preset-mini.UhMMbd34.cjs');
8
8
  const _default = require('./shared/preset-mini.fgwIVvur.cjs');
9
- const _default$1 = require('./shared/preset-mini.Ot1_vHus.cjs');
10
- const _default$2 = require('./shared/preset-mini.jXC5Sr98.cjs');
9
+ const _default$1 = require('./shared/preset-mini.qKuB9vcd.cjs');
10
+ const _default$2 = require('./shared/preset-mini.e29ECnbA.cjs');
11
11
  const colors = require('./colors.cjs');
12
12
  require('@unocss/rule-utils');
13
13
  require('./shared/preset-mini.-3Qybdh5.cjs');
package/dist/index.mjs CHANGED
@@ -3,8 +3,8 @@ import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants
3
3
  import { g as globalKeywords } from './shared/preset-mini.0CcynBZx.mjs';
4
4
  export { f as parseColor } from './shared/preset-mini.0CcynBZx.mjs';
5
5
  import { t as theme } from './shared/preset-mini.zC_vZg74.mjs';
6
- import { r as rules } from './shared/preset-mini.i2BLKmj6.mjs';
7
- import { h as variants } from './shared/preset-mini.AVP8I7_j.mjs';
6
+ import { r as rules } from './shared/preset-mini.CoNueTEa.mjs';
7
+ import { h as variants } from './shared/preset-mini.eBWIK6gx.mjs';
8
8
  export { colors } from './colors.mjs';
9
9
  import '@unocss/rule-utils';
10
10
  import './shared/preset-mini.0UJFjS_1.mjs';
package/dist/rules.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const _default = require('./shared/preset-mini.Ot1_vHus.cjs');
3
+ const _default = require('./shared/preset-mini.qKuB9vcd.cjs');
4
4
  const transform = require('./shared/preset-mini.-3Qybdh5.cjs');
5
5
  require('./shared/preset-mini.UhMMbd34.cjs');
6
6
  require('@unocss/core');
package/dist/rules.d.cts CHANGED
@@ -37,7 +37,7 @@ declare const positions: Rule[];
37
37
  declare const justifies: StaticRule[];
38
38
  declare const orders: Rule[];
39
39
  declare const alignments: StaticRule[];
40
- declare const placements: Rule[];
40
+ declare const placements: StaticRule[];
41
41
  /**
42
42
  * This is to add `flex-` and `grid-` prefix to the alignment rules,
43
43
  * supporting `flex="~ items-center"` in attributify mode.
package/dist/rules.d.mts CHANGED
@@ -37,7 +37,7 @@ declare const positions: Rule[];
37
37
  declare const justifies: StaticRule[];
38
38
  declare const orders: Rule[];
39
39
  declare const alignments: StaticRule[];
40
- declare const placements: Rule[];
40
+ declare const placements: StaticRule[];
41
41
  /**
42
42
  * This is to add `flex-` and `grid-` prefix to the alignment rules,
43
43
  * supporting `flex="~ items-center"` in attributify mode.
package/dist/rules.d.ts CHANGED
@@ -37,7 +37,7 @@ declare const positions: Rule[];
37
37
  declare const justifies: StaticRule[];
38
38
  declare const orders: Rule[];
39
39
  declare const alignments: StaticRule[];
40
- declare const placements: Rule[];
40
+ declare const placements: StaticRule[];
41
41
  /**
42
42
  * This is to add `flex-` and `grid-` prefix to the alignment rules,
43
43
  * supporting `flex="~ items-center"` in attributify mode.
package/dist/rules.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { s as alignments, a as appearance, E as aspectRatio, e as bgColors, b as borderStyles, c as borders, B as boxSizing, f as colorScheme, g as containerParent, P as cssProperty, O as cssVariables, j as flex, x as flexGridJustifiesAlignments, z as floats, J as fonts, k as gaps, l as grids, h as handlerBorderStyle, y as insets, n as justifies, G as margins, d as opacity, q as orders, o as outline, m as overflows, F as paddings, u as placements, p as positions, C as questionMark, r as rules, D as sizes, H as svgUtilities, K as tabSizes, t as textAligns, i as textDecorations, L as textIndents, N as textShadows, M as textStrokes, I as transitions, v as verticalAligns, w as willChange, A as zIndexes } from './shared/preset-mini.i2BLKmj6.mjs';
1
+ export { s as alignments, a as appearance, E as aspectRatio, e as bgColors, b as borderStyles, c as borders, B as boxSizing, f as colorScheme, g as containerParent, P as cssProperty, O as cssVariables, j as flex, x as flexGridJustifiesAlignments, z as floats, J as fonts, k as gaps, l as grids, h as handlerBorderStyle, y as insets, n as justifies, G as margins, d as opacity, q as orders, o as outline, m as overflows, F as paddings, u as placements, p as positions, C as questionMark, r as rules, D as sizes, H as svgUtilities, K as tabSizes, t as textAligns, i as textDecorations, L as textIndents, N as textShadows, M as textStrokes, I as transitions, v as verticalAligns, w as willChange, A as zIndexes } from './shared/preset-mini.CoNueTEa.mjs';
2
2
  export { e as appearances, c as boxShadows, b as boxShadowsBase, k as breaks, g as contains, i as contentVisibility, j as contents, f as cursors, d as displays, o as fontSmoothings, n as fontStyles, p as pointerEvents, h as resizes, r as ringBase, a as rings, l as textOverflows, m as textTransforms, t as textWraps, q as transformBase, s as transforms, u as userSelects, v as varEmpty, w as whitespaces } from './shared/preset-mini.0UJFjS_1.mjs';
3
3
  import './shared/preset-mini.0CcynBZx.mjs';
4
4
  import '@unocss/core';
@@ -652,7 +652,7 @@ const placements = [
652
652
  ["place-self-stretch", { "place-self": "stretch" }],
653
653
  ...makeGlobalStaticRules("place-self")
654
654
  ];
655
- const flexGridJustifiesAlignments = [...justifies, ...alignments].flatMap(([k, v]) => [
655
+ const flexGridJustifiesAlignments = [...justifies, ...alignments, ...placements].flatMap(([k, v]) => [
656
656
  [`flex-${k}`, v],
657
657
  [`grid-${k}`, v]
658
658
  ]);
@@ -48,7 +48,7 @@ function variantBreakpoints() {
48
48
  continue;
49
49
  const isLtPrefix = pre.startsWith("lt-") || pre.startsWith("<") || pre.startsWith("max-");
50
50
  const isAtPrefix = pre.startsWith("at-") || pre.startsWith("~");
51
- let order = 1e3;
51
+ let order = 3e3;
52
52
  if (isLtPrefix) {
53
53
  order -= idx + 1;
54
54
  return {
@@ -142,11 +142,15 @@ const variantContainerQuery = {
142
142
  }
143
143
  if (container) {
144
144
  core.warnOnce("The container query variant is experimental and may not follow semver.");
145
+ let order = 1e3 + Object.keys(ctx.theme.containers ?? {}).indexOf(match);
146
+ if (label)
147
+ order += 1e3;
145
148
  return {
146
149
  matcher: rest,
147
150
  handle: (input, next) => next({
148
151
  ...input,
149
- parent: `${input.parent ? `${input.parent} $$ ` : ""}@container${label ? ` ${label} ` : " "}${container}`
152
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}@container${label ? ` ${label} ` : " "}${container}`,
153
+ parentOrder: order
150
154
  })
151
155
  };
152
156
  }
@@ -46,7 +46,7 @@ function variantBreakpoints() {
46
46
  continue;
47
47
  const isLtPrefix = pre.startsWith("lt-") || pre.startsWith("<") || pre.startsWith("max-");
48
48
  const isAtPrefix = pre.startsWith("at-") || pre.startsWith("~");
49
- let order = 1e3;
49
+ let order = 3e3;
50
50
  if (isLtPrefix) {
51
51
  order -= idx + 1;
52
52
  return {
@@ -140,11 +140,15 @@ const variantContainerQuery = {
140
140
  }
141
141
  if (container) {
142
142
  warnOnce("The container query variant is experimental and may not follow semver.");
143
+ let order = 1e3 + Object.keys(ctx.theme.containers ?? {}).indexOf(match);
144
+ if (label)
145
+ order += 1e3;
143
146
  return {
144
147
  matcher: rest,
145
148
  handle: (input, next) => next({
146
149
  ...input,
147
- parent: `${input.parent ? `${input.parent} $$ ` : ""}@container${label ? ` ${label} ` : " "}${container}`
150
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}@container${label ? ` ${label} ` : " "}${container}`,
151
+ parentOrder: order
148
152
  })
149
153
  };
150
154
  }
@@ -654,7 +654,7 @@ const placements = [
654
654
  ["place-self-stretch", { "place-self": "stretch" }],
655
655
  ...utilities.makeGlobalStaticRules("place-self")
656
656
  ];
657
- const flexGridJustifiesAlignments = [...justifies, ...alignments].flatMap(([k, v]) => [
657
+ const flexGridJustifiesAlignments = [...justifies, ...alignments, ...placements].flatMap(([k, v]) => [
658
658
  [`flex-${k}`, v],
659
659
  [`grid-${k}`, v]
660
660
  ]);
package/dist/utils.cjs CHANGED
@@ -29,5 +29,8 @@ exports.splitShorthand = utilities.splitShorthand;
29
29
  exports.valueHandlers = utilities.valueHandlers;
30
30
  exports.xyzMap = utilities.xyzMap;
31
31
  Object.keys(ruleUtils).forEach(function (k) {
32
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = ruleUtils[k];
32
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) k === '__proto__' ? Object.defineProperty(exports, k, {
33
+ enumerable: true,
34
+ value: ruleUtils[k]
35
+ }) : exports[k] = ruleUtils[k];
33
36
  });
package/dist/variants.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const _default = require('./shared/preset-mini.jXC5Sr98.cjs');
3
+ const _default = require('./shared/preset-mini.e29ECnbA.cjs');
4
4
  require('./shared/preset-mini.UhMMbd34.cjs');
5
5
  require('@unocss/core');
6
6
  require('@unocss/rule-utils');
package/dist/variants.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as calcMaxWidthBySize, v as variantAria, a as variantBreakpoints, e as variantColorsMediaOrClass, b as variantCombinators, d as variantContainerQuery, n as variantCssLayer, l as variantCustomMedia, f as variantDataAttribute, j as variantImportant, o as variantInternalLayer, i as variantLanguageDirections, r as variantNegative, w as variantPartClasses, k as variantPrint, t as variantPseudoClassFunctions, s as variantPseudoClassesAndElements, p as variantScope, m as variantSelector, x as variantSupports, g as variantTaggedDataAttributes, u as variantTaggedPseudoClasses, q as variantVariables, h as variants } from './shared/preset-mini.AVP8I7_j.mjs';
1
+ export { c as calcMaxWidthBySize, v as variantAria, a as variantBreakpoints, e as variantColorsMediaOrClass, b as variantCombinators, d as variantContainerQuery, n as variantCssLayer, l as variantCustomMedia, f as variantDataAttribute, j as variantImportant, o as variantInternalLayer, i as variantLanguageDirections, r as variantNegative, w as variantPartClasses, k as variantPrint, t as variantPseudoClassFunctions, s as variantPseudoClassesAndElements, p as variantScope, m as variantSelector, x as variantSupports, g as variantTaggedDataAttributes, u as variantTaggedPseudoClasses, q as variantVariables, h as variants } from './shared/preset-mini.eBWIK6gx.mjs';
2
2
  import './shared/preset-mini.0CcynBZx.mjs';
3
3
  import '@unocss/core';
4
4
  import '@unocss/rule-utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.58.3",
3
+ "version": "0.58.5",
4
4
  "description": "The minimal preset for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -61,9 +61,9 @@
61
61
  "dist"
62
62
  ],
63
63
  "dependencies": {
64
- "@unocss/core": "0.58.3",
65
- "@unocss/extractor-arbitrary-variants": "0.58.3",
66
- "@unocss/rule-utils": "0.58.3"
64
+ "@unocss/core": "0.58.5",
65
+ "@unocss/extractor-arbitrary-variants": "0.58.5",
66
+ "@unocss/rule-utils": "0.58.5"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "unbuild",