@yummacss/api 1.3.1 → 1.4.1

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2024-present Yumma CSS, including Yumma CSS API, maintained by Renildo Pereira.
1
+ Copyright (c) 2024-present Yumma CSS API maintained by Renildo Pereira.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -7,7 +7,7 @@ Yumma CSS definitions for Javascript apps.
7
7
 
8
8
  ## Getting started
9
9
 
10
- Yumma CSS API provides access to Yumma CSS utilities through JavaScript functions.
10
+ Yumma CSS API provides access to Yumma CSS utilities through Javascript functions.
11
11
 
12
12
  ### Installing
13
13
 
@@ -15,63 +15,9 @@ Yumma CSS API provides access to Yumma CSS utilities through JavaScript function
15
15
  npm i @yummacss/api
16
16
  ```
17
17
 
18
- ## Usage examples
18
+ ## Documentation
19
19
 
20
- Get all utilities at once:
21
-
22
- ```ts
23
- import { getAllUtils } from "@yummacss/api";
24
-
25
- const all = getAllUtils();
26
- ```
27
-
28
- Get only background utilities:
29
-
30
- ```ts
31
- import { getBackgroundUtils } from "@yummacss/api";
32
-
33
- const backgrounds = getBackgroundUtils();
34
- ```
35
-
36
- Access a specific utility from a category:
37
-
38
- ```ts
39
- import { getBoxModelUtils } from "@yummacss/api";
40
-
41
- const boxModel = getBoxModelUtils();
42
- const margin = boxModel["margin"];
43
- ```
44
-
45
- ## Available API
46
-
47
- Import utility group functions individually:
48
-
49
- ```ts
50
- import {
51
- getAllUtils,
52
- getBackgroundUtils,
53
- getBorderUtils,
54
- getBoxModelUtils,
55
- getColorUtils,
56
- getEffectUtils,
57
- getFlexboxUtils,
58
- getFontUtils,
59
- getGridUtils,
60
- getInteractivityUtils,
61
- getOutlineUtils,
62
- getPositioningUtils,
63
- getSvgUtils,
64
- getTableUtils,
65
- getTextUtils,
66
- getTransformUtils,
67
- } from "@yummacss/api";
68
- ```
69
-
70
- For advanced use cases use these types:
71
-
72
- ```ts
73
- import type { UtilityMap, UtilityItem } from "@yummacss/api";
74
- ```
20
+ Head over to the [Yumma CSS docs](https://www.yummacss.com/docs/dev-api) for full API to learn more.
75
21
 
76
22
  ## Built with
77
23
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- //#region src/interfaces/color-item.d.ts
2
- interface ColorUtilityItem {
1
+ //#region src/interfaces/color.d.ts
2
+ interface Color {
3
3
  prefix: string;
4
4
  properties: string[];
5
5
  slug: string;
@@ -7,19 +7,12 @@ interface ColorUtilityItem {
7
7
  [key: string]: string;
8
8
  };
9
9
  }
10
- interface ColorUtilityMap {
11
- [key: string]: ColorUtilityItem;
10
+ interface Colors {
11
+ [key: string]: Color;
12
12
  }
13
13
  //#endregion
14
- //#region src/interfaces/response.d.ts
15
- interface ApiResponse {
16
- slug: string;
17
- utility: string;
18
- property: string[];
19
- }
20
- //#endregion
21
- //#region src/interfaces/utility-item.d.ts
22
- interface UtilityItem {
14
+ //#region src/interfaces/utility.d.ts
15
+ interface Utility {
23
16
  prefix: string;
24
17
  properties: string[];
25
18
  slug: string;
@@ -27,26 +20,26 @@ interface UtilityItem {
27
20
  [key: string]: string;
28
21
  };
29
22
  }
30
- interface UtilityMap {
31
- [key: string]: UtilityItem;
23
+ interface Utilities {
24
+ [key: string]: Utility;
32
25
  }
33
26
  //#endregion
34
27
  //#region src/index.d.ts
35
- declare const getAllUtils: () => UtilityMap;
36
- declare const getBackgroundUtils: () => UtilityMap;
37
- declare const getBorderUtils: () => UtilityMap;
38
- declare const getBoxModelUtils: () => UtilityMap;
39
- declare const getColorUtils: () => UtilityMap;
40
- declare const getEffectUtils: () => UtilityMap;
41
- declare const getFlexboxUtils: () => UtilityMap;
42
- declare const getFontUtils: () => UtilityMap;
43
- declare const getGridUtils: () => UtilityMap;
44
- declare const getInteractivityUtils: () => UtilityMap;
45
- declare const getOutlineUtils: () => UtilityMap;
46
- declare const getPositioningUtils: () => UtilityMap;
47
- declare const getSvgUtils: () => UtilityMap;
48
- declare const getTableUtils: () => UtilityMap;
49
- declare const getTextUtils: () => UtilityMap;
50
- declare const getTransformUtils: () => UtilityMap;
28
+ declare const getAllUtils: () => Utilities;
29
+ declare const getBackgroundUtils: () => Utilities;
30
+ declare const getBorderUtils: () => Utilities;
31
+ declare const getBoxModelUtils: () => Utilities;
32
+ declare const getColorUtils: () => Utilities;
33
+ declare const getEffectUtils: () => Utilities;
34
+ declare const getFlexboxUtils: () => Utilities;
35
+ declare const getFontUtils: () => Utilities;
36
+ declare const getGridUtils: () => Utilities;
37
+ declare const getInteractivityUtils: () => Utilities;
38
+ declare const getOutlineUtils: () => Utilities;
39
+ declare const getPositioningUtils: () => Utilities;
40
+ declare const getSvgUtils: () => Utilities;
41
+ declare const getTableUtils: () => Utilities;
42
+ declare const getTextUtils: () => Utilities;
43
+ declare const getTransformUtils: () => Utilities;
51
44
  //#endregion
52
- export { ApiResponse, ColorUtilityItem, ColorUtilityMap, UtilityItem, UtilityMap, getAllUtils, getBackgroundUtils, getBorderUtils, getBoxModelUtils, getColorUtils, getEffectUtils, getFlexboxUtils, getFontUtils, getGridUtils, getInteractivityUtils, getOutlineUtils, getPositioningUtils, getSvgUtils, getTableUtils, getTextUtils, getTransformUtils };
45
+ export { Color, Colors, Utilities, Utility, getAllUtils, getBackgroundUtils, getBorderUtils, getBoxModelUtils, getColorUtils, getEffectUtils, getFlexboxUtils, getFontUtils, getGridUtils, getInteractivityUtils, getOutlineUtils, getPositioningUtils, getSvgUtils, getTableUtils, getTextUtils, getTransformUtils };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yummacss/api",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "Yumma CSS definitions for Javascript apps.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -39,7 +39,8 @@
39
39
  "typescript": "^5.8.2"
40
40
  },
41
41
  "publishConfig": {
42
- "access": "public"
42
+ "access": "public",
43
+ "provenance": true
43
44
  },
44
45
  "scripts": {
45
46
  "build": "tsdown",