@mgdis/stencil-helpers 1.1.8 → 2.0.0
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/README.md +2 -2
- package/dist/components/index.d.ts +7 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/ide/index.d.ts +25 -4
- package/dist/ide/index.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +150 -125
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.d.ts.map +1 -1
- package/dist/storybook/index.d.ts +1 -1
- package/dist/storybook/index.d.ts.map +1 -1
- package/dist/tests/index.d.ts.map +1 -0
- package/dist/tests/unit.conf.d.ts.map +1 -0
- package/dist/tests/unit.d.ts.map +1 -0
- package/dist/{locale/index.conf.d.ts → types/index.d.ts} +1 -1
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +8 -7
- package/dist/locale/index.conf.d.ts.map +0 -1
- package/dist/test/index.d.ts.map +0 -1
- package/dist/test/unit.conf.d.ts.map +0 -1
- package/dist/test/unit.d.ts.map +0 -1
- /package/dist/{test → tests}/index.d.ts +0 -0
- /package/dist/{test → tests}/unit.conf.d.ts +0 -0
- /package/dist/{test → tests}/unit.d.ts +0 -0
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ This package centralizes helper functions for your [Stencil](https://stenciljs.c
|
|
|
5
5
|
- **Components**: Centralizes all component utilities.
|
|
6
6
|
- **Locale**: Centralizes all necessary locale utilities for managing content translation.
|
|
7
7
|
- **Storybook**: Centralizes all Storybook helpers useful for building your own Storybook.
|
|
8
|
-
- **
|
|
8
|
+
- **Tests**: Centralizes all test utilities to simplify testing your components.
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -15,4 +15,4 @@ pnpm i @mgdis/stencil-helpers
|
|
|
15
15
|
|
|
16
16
|
## Documentation
|
|
17
17
|
|
|
18
|
-
Read the full [documentation](./
|
|
18
|
+
Read the full [documentation](./docs/README.md)
|
|
@@ -75,7 +75,13 @@ export declare const getParentWindows: (localWindow: Window, windows?: Window[])
|
|
|
75
75
|
* @param value - value to check
|
|
76
76
|
* @returns `true` if string is valid
|
|
77
77
|
*/
|
|
78
|
-
export declare const isValidString: (value: unknown) =>
|
|
78
|
+
export declare const isValidString: (value: unknown) => value is string;
|
|
79
|
+
/**
|
|
80
|
+
* Value to stringify
|
|
81
|
+
* @param value
|
|
82
|
+
* @returns stringified value
|
|
83
|
+
*/
|
|
84
|
+
export declare const toString: (value: unknown) => string;
|
|
79
85
|
/**
|
|
80
86
|
* Cleans string characters by removing special characters and converting to lowercase.
|
|
81
87
|
* @param text - text to clean
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,wCAA+B,MAWnD,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAS;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;gBAEN,SAAS,GAAE,MAAM,EAAO;IAIpC;;;OAGG;IACH,GAAG,cAAe,MAAM,KAAG,IAAI,CAI7B;IAEF;;;OAGG;IACH,MAAM,cAAe,MAAM,KAAG,IAAI,CAKhC;IAEF;;;;OAIG;IACH,GAAG,cAAe,MAAM,KAAG,OAAO,CAEhC;IAEF;;;OAGG;IACH,IAAI,QAAO,MAAM,CAEf;CACH;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UAAW,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,wCAA+B,MAWnD,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAS;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;gBAEN,SAAS,GAAE,MAAM,EAAO;IAIpC;;;OAGG;IACH,GAAG,cAAe,MAAM,KAAG,IAAI,CAI7B;IAEF;;;OAGG;IACH,MAAM,cAAe,MAAM,KAAG,IAAI,CAKhC;IAEF;;;;OAIG;IACH,GAAG,cAAe,MAAM,KAAG,OAAO,CAEhC;IAEF;;;OAGG;IACH,IAAI,QAAO,MAAM,CAEf;CACH;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UAAW,OAAO,sBAA6F,CAAC;AAE9I;;;;;GAKG;AACH,eAAO,MAAM,SAAS,YAAa,OAAO,YAAY,MAAM,EAAE,KAAG,OAEhE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,kHAAgH,CAAC;AAE/I;;;;GAIG;AACH,eAAO,MAAM,UAAU,gBAAiB,MAAM,KAAG,MAAM,EAItD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,YAAW,MAAM,EAAE,KAAQ,MAAM,EAgBpF,CAAC;AAkBF;;;;GAIG;AACH,eAAO,MAAM,aAAa,UAAW,OAAO,oBAAsE,CAAC;AAEnH;;;;GAIG;AACH,eAAO,MAAM,QAAQ,UAAW,OAAO,KAAG,MAGzC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,MAMjC,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,QAAQ,aAAoB,MAAM,IAAI,KAAG,QAAQ,IAAI,CAAe,CAAC"}
|
package/dist/ide/index.d.ts
CHANGED
|
@@ -49,23 +49,28 @@ export declare const webTypesGenerator: (name: string, version: string, jsonDocs
|
|
|
49
49
|
description: string;
|
|
50
50
|
}[];
|
|
51
51
|
};
|
|
52
|
+
css: {
|
|
53
|
+
properties: {
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
}[];
|
|
57
|
+
};
|
|
52
58
|
}[];
|
|
53
59
|
};
|
|
54
60
|
};
|
|
55
61
|
};
|
|
56
62
|
/**
|
|
57
63
|
* Generate custom HTML datasets for VS Code
|
|
58
|
-
* @param version - Library version
|
|
59
64
|
* @param jsonDocs - Stencil JSON doc
|
|
60
65
|
* @param storybookBaseUrl - Storybook Base Url
|
|
61
66
|
* @returns custom HTML datasets
|
|
62
67
|
* @example
|
|
63
68
|
* ```ts
|
|
64
|
-
* const customDataJson = vsCodeGenerator(
|
|
69
|
+
* const customDataJson = vsCodeGenerator(jsonDocs, 'https://storybook.example.com', 'https://sources.example.com');
|
|
65
70
|
* ```
|
|
66
71
|
*/
|
|
67
|
-
export declare const vsCodeGenerator: (
|
|
68
|
-
version:
|
|
72
|
+
export declare const vsCodeGenerator: (jsonDocs: JsonDocs, storybookBaseUrl: string, sourceBaseUrl: string) => {
|
|
73
|
+
version: number;
|
|
69
74
|
tags: {
|
|
70
75
|
name: string;
|
|
71
76
|
description: string;
|
|
@@ -86,4 +91,20 @@ export declare const vsCodeGenerator: (version: string, jsonDocs: JsonDocs, stor
|
|
|
86
91
|
globalAttributes: never[];
|
|
87
92
|
valueSets: never[];
|
|
88
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Generate custom CSS datasets for VS Code
|
|
96
|
+
* @param jsonDocs - Stencil JSON doc
|
|
97
|
+
* @returns custom CSS datasets
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const customDataJson = vsCodeCssGenerator(jsonDocs);
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare const vsCodeCssGenerator: (jsonDocs: JsonDocs) => {
|
|
104
|
+
version: number;
|
|
105
|
+
properties: {
|
|
106
|
+
name: string;
|
|
107
|
+
description: string;
|
|
108
|
+
}[];
|
|
109
|
+
};
|
|
89
110
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ide/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ide/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAmC,MAAM,wBAAwB,CAAC;AA2EnF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,SAAU,MAAM,WAAW,MAAM,YAAY,QAAQ,oBAAoB,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ide/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAmC,MAAM,wBAAwB,CAAC;AA2EnF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,SAAU,MAAM,WAAW,MAAM,YAAY,QAAQ,oBAAoB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD3G,CAAC;AA4BH;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,aAAc,QAAQ,oBAAoB,MAAM,iBAAiB,MAAM;;;;;;;;;;;;;;;;;;;;;CAkBjG,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,aAAc,QAAQ;;;;;;CAQnD,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|