@stacksjs/ui 0.58.28 → 0.58.44

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.
Files changed (2) hide show
  1. package/dist/index.js +55 -3
  2. package/package.json +9 -8
package/dist/index.js CHANGED
@@ -9,16 +9,66 @@ import {ui as ui2} from "@stacksjs/config";
9
9
  // src/uno.config.ts
10
10
  import {
11
11
  defineConfig,
12
+ presetAttributify,
12
13
  presetIcons,
13
14
  presetTypography,
15
+ presetUno,
14
16
  presetWebFonts,
15
- presetWind,
16
17
  transformerCompileClass,
17
18
  transformerDirectives,
18
19
  transformerVariantGroup
19
20
  } from "unocss";
20
- import {presetForms} from "@julr/unocss-preset-forms";
21
+
22
+ // /home/runner/work/stacks/stacks/node_modules/unocss-preset-primitives/dist/index.mjs
23
+ var presetVariants = function(options = {}) {
24
+ const {
25
+ prefix = "ui",
26
+ variants = "open|checked|selected|active|disabled",
27
+ selector = "data-headlessui-state",
28
+ isAttrBoolean = false
29
+ } = options;
30
+ return {
31
+ name: "unocss-variant-primitives",
32
+ match: (matcher) => {
33
+ const regex = new RegExp(`^${prefix}(-not)?-(${variants})[:-]`);
34
+ const match = matcher.match(regex);
35
+ if (!match)
36
+ return matcher;
37
+ const attrGen = !isAttrBoolean ? `[${selector}~='${match[2]}']` : `[${selector}-${match[2]}]`;
38
+ return {
39
+ matcher: matcher.slice(match[0].length),
40
+ selector: (s) => match[1] === "-not" ? `${s}[${selector}]:not(${attrGen}),:where([${selector}]:not(${attrGen})) ${s}:not(${selector})` : `${s}${attrGen},:where(${attrGen}) ${s}`
41
+ };
42
+ }
43
+ };
44
+ };
45
+ var presetHeadlessUi = function(options = {}) {
46
+ const {
47
+ prefix = "ui"
48
+ } = options;
49
+ return {
50
+ name: "unocss-preset-primitives",
51
+ variants: [
52
+ presetVariants({ prefix }),
53
+ (matcher) => {
54
+ const regex = new RegExp(`${prefix}(-not)?-focus-visible[:-]`);
55
+ const match = matcher.match(regex);
56
+ if (!match)
57
+ return matcher;
58
+ return {
59
+ matcher: matcher.slice(match[0].length),
60
+ selector: (s) => {
61
+ return match[1] === "-not" ? `${s}:focus:where(:not([data-headlessui-focus-visible] ${s}))` : `:where([data-headlessui-focus-visible]) ${s}:focus`;
62
+ }
63
+ };
64
+ }
65
+ ]
66
+ };
67
+ };
68
+
69
+ // src/uno.config.ts
21
70
  import {ui} from "@stacksjs/config";
71
+ import {presetForms} from "@julr/unocss-preset-forms";
22
72
  var uno_config_default = defineConfig({
23
73
  shortcuts: ui.shortcuts,
24
74
  content: {
@@ -29,7 +79,9 @@ var uno_config_default = defineConfig({
29
79
  }
30
80
  },
31
81
  presets: [
32
- presetWind(),
82
+ presetUno(),
83
+ presetAttributify(),
84
+ presetHeadlessUi(),
33
85
  presetForms(),
34
86
  presetTypography(),
35
87
  presetIcons({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/ui",
3
3
  "type": "module",
4
- "version": "0.58.28",
4
+ "version": "0.58.44",
5
5
  "description": "The Stacks UI engine.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -62,9 +62,9 @@
62
62
  "@stacksjs/config": "workspace:*",
63
63
  "@stacksjs/router": "workspace:*",
64
64
  "pinia": "^2.1.7",
65
- "unocss": "^0.58.3",
65
+ "unocss": "^0.58.4",
66
66
  "vite-plugin-vue-layouts": "^0.11.0",
67
- "vue": "^3.4.13",
67
+ "vue": "^3.4.15",
68
68
  "vue-tsc": "^1.8.27"
69
69
  },
70
70
  "dependencies": {
@@ -72,17 +72,18 @@
72
72
  "@iconify-json/heroicons": "^1.1.19",
73
73
  "@iconify-json/heroicons-outline": "^1.1.10",
74
74
  "@iconify-json/heroicons-solid": "^1.1.11",
75
- "@iconify/json": "^2.2.168",
75
+ "@iconify/json": "^2.2.176",
76
76
  "@julr/unocss-preset-forms": "^0.1.0",
77
77
  "@stacksjs/build": "workspace:*",
78
78
  "@stacksjs/config": "workspace:*",
79
79
  "@stacksjs/router": "workspace:*",
80
- "@unhead/vue": "^1.8.9",
80
+ "@unhead/vue": "^1.8.10",
81
81
  "pinia": "^2.1.7",
82
- "unhead": "^1.8.9",
83
- "unocss": "^0.58.3",
82
+ "unhead": "^1.8.10",
83
+ "unocss": "^0.58.4",
84
+ "unocss-preset-primitives": "0.0.2-beta.0",
84
85
  "vite-plugin-vue-layouts": "^0.11.0",
85
- "vue": "^3.4.13",
86
+ "vue": "^3.4.15",
86
87
  "vue-tsc": "^1.8.27"
87
88
  },
88
89
  "devDependencies": {