@byyuurin/ui 0.0.1 → 0.0.2

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.
@@ -1,6 +1,7 @@
1
1
  import { cv } from "@byyuurin/ui-kit";
2
+ import { mergeConfigs, toArray } from "@unocss/core";
2
3
  import { h, isCSSMathFn, parseColor, splitShorthand } from "@unocss/preset-mini/utils";
3
- import { mergeConfigs, presetUno, toArray } from "unocss";
4
+ import { presetUno } from "@unocss/preset-uno";
4
5
  import presetUI, { cssVarsAll, cssVarsPrefix } from "../unocss-preset.mjs";
5
6
  const theme = mergeConfigs([
6
7
  presetUno(),
@@ -33,5 +33,5 @@ export declare const cssVarsPrefix = "ui";
33
33
  export declare const cssVarsBase: string[];
34
34
  export declare const cssVarsDynamic: string[];
35
35
  export declare const cssVarsAll: string[];
36
- declare const _default: import("unocss/index").PresetFactory<Theme, PresetOptions>;
36
+ declare const _default: import("@unocss/core").PresetFactory<Theme, PresetOptions>;
37
37
  export default _default;
@@ -1,5 +1,5 @@
1
+ import { definePreset } from "@unocss/core";
1
2
  import { parseColor, parseCssColor } from "@unocss/preset-mini/utils";
2
- import { definePreset } from "unocss";
3
3
  export const cssVarsPrefix = "ui";
4
4
  export const cssVarsBase = ["cb", "c1", "c2", "c3"];
5
5
  export const cssVarsDynamic = ["fill", "content"];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@byyuurin/ui",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "description": "",
6
6
  "author": "Yuurin <byyuurin@gmail.com>",
7
7
  "license": "MIT",
@@ -58,12 +58,13 @@
58
58
  "dependencies": {
59
59
  "@byyuurin/ui-kit": "^0.3.3",
60
60
  "@nuxt/kit": "^3.15.4",
61
+ "@unocss/core": "^65.4.3",
61
62
  "@unocss/preset-mini": "^65.4.3",
63
+ "@unocss/preset-uno": "^65.4.3",
62
64
  "@vueuse/core": "^12.5.0",
63
65
  "defu": "^6.1.4",
64
66
  "ohash": "^1.1.4",
65
67
  "reka-ui": "1.0.0-alpha.8",
66
- "unocss": "^65.4.3",
67
68
  "vaul-vue": "^0.2.1",
68
69
  "vue-component-type-helpers": "^2.2.0"
69
70
  },
@@ -1 +0,0 @@
1
- export {};
@@ -1,45 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { link } from "../theme/index.mjs";
3
- import { extendTheme } from "./extend-theme.mjs";
4
- describe("check defu result", () => {
5
- it("should merge", () => {
6
- const ui = {
7
- base: "el-link",
8
- variants: {
9
- active: {
10
- true: "el-link--active",
11
- false: " "
12
- }
13
- }
14
- };
15
- const result = extendTheme(ui, link);
16
- expect(result).toMatchInlineSnapshot(`
17
- {
18
- "base": "border-y border-t-transparent focus-visible:outline-ui-cb el-link",
19
- "compoundVariants": undefined,
20
- "slots": undefined,
21
- "variants": {
22
- "active": {
23
- "false": [
24
- "color-ui-cb hover:color-ui-cb/80 transition-colors",
25
- "disabled:hover:color-ui-cb aria-disabled:hover:color-ui-cb",
26
- " ",
27
- ],
28
- "true": [
29
- "color-ui-fill",
30
- "disabled:color-ui-fill aria-disabled:color-ui-fill",
31
- "el-link--active",
32
- ],
33
- },
34
- "disabled": {
35
- "true": "cursor-not-allowed opacity-50",
36
- },
37
- "underline": {
38
- "false": "border-transparent",
39
- "true": "border-current",
40
- },
41
- },
42
- }
43
- `);
44
- });
45
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { cr } from "@byyuurin/ui-kit";
2
- import { describe, expect, it } from "vitest";
3
- import { mergeRules } from "../composables/useTheme.mjs";
4
- describe("check style merge", () => {
5
- const merge = cr(mergeRules, { debug: true });
6
- it("should...", () => {
7
- const result = merge("grid gap-10 grid-cols-10 scale-1 translate-y-full");
8
- expect(result).toMatchInlineSnapshot(`"grid gap grid-cols-10 scale translate-y"`);
9
- });
10
- });