@skel-ui/core 1.0.0-alpha.d1c6e70 → 1.0.0-alpha.e356c3a

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/dist/index.cjs.js CHANGED
@@ -30,5 +30,5 @@ function SkelRoot({ children, isLoading = true }) {
30
30
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IsLoadingContext.Provider, { value: isLoading, children });
31
31
  }
32
32
  function generatePlaceholder(length, primary) {
33
- return Array(length).fill(null).map((_, index) => ({ [primary]: `${primary}-${index}` }));
33
+ return Array(length).fill(null).map((_, index) => ({ [primary]: `${String(primary)}-${index}` }));
34
34
  }
package/dist/index.d.ts CHANGED
@@ -10,5 +10,8 @@ export declare function SkelRoot({ children, isLoading }: {
10
10
  children: ReactNode;
11
11
  isLoading: boolean;
12
12
  }): import("react/jsx-runtime").JSX.Element;
13
- export declare function generatePlaceholder<T>(length: number, primary: string): T[];
13
+ type Placeholder<T, K extends keyof T> = {
14
+ [P in keyof T]: P extends K ? string : null;
15
+ };
16
+ export declare function generatePlaceholder<T, K extends keyof T>(length: number, primary: K): Placeholder<T, K>[];
14
17
  export {};
package/dist/index.esm.js CHANGED
@@ -5,7 +5,7 @@ function SkelRoot({ children, isLoading = true }) {
5
5
  return /* @__PURE__ */ jsx(IsLoadingContext.Provider, { value: isLoading, children });
6
6
  }
7
7
  function generatePlaceholder(length, primary) {
8
- return Array(length).fill(null).map((_, index) => ({ [primary]: `${primary}-${index}` }));
8
+ return Array(length).fill(null).map((_, index) => ({ [primary]: `${String(primary)}-${index}` }));
9
9
  }
10
10
  export {
11
11
  IsLoadingContext,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@skel-ui/core",
3
3
  "author": "https://github.com/sudoaugustin",
4
- "version": "1.0.0-alpha.d1c6e70",
4
+ "version": "1.0.0-alpha.e356c3a",
5
5
  "license": "MIT",
6
6
  "description": "Interal package for @skel-ui/react and @skel-ui/react-native",
7
7
  "files": [