spoko-design-system 0.2.42 → 0.2.43

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/index.ts CHANGED
@@ -1,13 +1,6 @@
1
1
  // Do not write code directly here, instead use the `src` folder!
2
2
  // Then, use this file to export everything you want your user to access.
3
3
 
4
- // import MyComponent from './src/src/MyComponent.astro';
5
-
6
-
7
-
8
- // export default MyComponent;
9
-
10
-
11
4
  // src/index.ts
12
5
 
13
6
  // Vue Components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "0.2.42",
3
+ "version": "0.2.43",
4
4
  "private": false,
5
5
  "main": "./index.ts",
6
6
  "module": "./index.ts",
@@ -41,6 +41,7 @@
41
41
  "@astrojs/mdx": "^3.1.9",
42
42
  "@astrojs/node": "^8.3.4",
43
43
  "@astrojs/sitemap": "^3.2.1",
44
+ "@astrojs/ts-plugin": "^1.10.4",
44
45
  "@astrojs/vue": "^4.5.2",
45
46
  "@docsearch/css": "^3.7.0",
46
47
  "@iconify-json/ant-design": "^1.2.2",
@@ -61,7 +62,7 @@
61
62
  "@iconify-json/ph": "^1.2.1",
62
63
  "@iconify-json/simple-icons": "^1.2.11",
63
64
  "@iconify-json/uil": "^1.2.1",
64
- "@iconify/json": "^2.2.268",
65
+ "@iconify/json": "^2.2.269",
65
66
  "@iconify/vue": "^4.1.2",
66
67
  "@playform/compress": "^0.1.6",
67
68
  "@playform/inline": "github:playform/inline",
@@ -1,5 +1,4 @@
1
-
2
1
  declare module '*.astro' {
3
- const component: any;
4
- export default component;
5
- }
2
+ const component: any;
3
+ export default component;
4
+ }
@@ -11,4 +11,6 @@ export const getPriceFormatted = (product: any) => {
11
11
  return 'no price'
12
12
  }
13
13
  }
14
-
14
+
15
+
16
+ export default getPriceFormatted;
@@ -13,3 +13,5 @@ export const getProductCheckList = (productDetails) => {
13
13
 
14
14
  return list.map(detail => t(`detail.value.${detail.value}`));
15
15
  }
16
+
17
+ export default getProductCheckList;
@@ -10,3 +10,5 @@ export const getShorterDescription = (description: string | null, limit = MAX_DE
10
10
  return description ? cutString(description, limit) || '' : '';
11
11
 
12
12
  }
13
+
14
+ export default getShorterDescription;
@@ -1,6 +1,6 @@
1
1
  /* Format date */
2
2
 
3
3
 
4
- export function formatDate(date: Date ) {
4
+ export default function formatDate(date: Date ) {
5
5
  return new Date(date);
6
6
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  import i18next from "i18next";
4
4
 
5
- export function formatLocaleNumber(number: number ) {
5
+ export default function formatLocaleNumber(number: number ) {
6
6
  return i18next.language === 'en' ? String(number).replace(/,/g, '.') : String(number);
7
7
  }
@@ -2,6 +2,7 @@ export const formatPad = (num: number, size: number) => {
2
2
  return String(num).padStart(size, '0');
3
3
  }
4
4
 
5
+ export default formatPad;
5
6
  // export const formatPad = (num: number, size: number) => {
6
7
  // let productId = String(num)
7
8
 
@@ -12,6 +12,7 @@ export const getNumberFormatted = (num, digits) => {
12
12
  return (num / item.value).toFixed(digits).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + item.symbol;
13
13
  }
14
14
 
15
+ export default getNumberFormatted;
15
16
  /*
16
17
  * Tests
17
18
  */
@@ -2,4 +2,6 @@ import i18next from "i18next";
2
2
 
3
3
  export const getTranslatedLink = ( link:string ) => {
4
4
  return i18next.language === 'en' ? link : `/pl${link}`
5
- }
5
+ }
6
+
7
+ export default getTranslatedLink;
package/tsconfig.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "moduleResolution": "node",
19
19
  "jsx": "preserve",
20
20
  "allowJs": true,
21
- "types": ["vitest, vite/client", "@astrojs/ts","unplugin-vue-macros/macros-global", "unplugin-icons/types/astro"],
21
+ "types": ["vitest, vite/client", "@astrojs/ts","unplugin-vue-macros/macros-global", "unplugin-icons/types/astro", "src/types/astro.d.ts", "@astrojs/ts-plugin"],
22
22
  "paths": {
23
23
  "@components/*": ["components/*"],
24
24
  "@utils/*": ["utils/*"],