@goodie-forms/react 1.0.0-alpha → 1.1.1-alpha

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,13 +1,13 @@
1
- export function groupBy<T, K extends PropertyKey>(
2
- items: readonly T[],
3
- key: (item: T) => K,
4
- ): Record<K, T[]> {
5
- const result = {} as Record<K, T[]>;
6
-
7
- for (const item of items) {
8
- const k = key(item);
9
- (result[k] ??= []).push(item);
10
- }
11
-
12
- return result;
13
- }
1
+ export function groupBy<T, K extends PropertyKey>(
2
+ items: readonly T[],
3
+ key: (item: T) => K,
4
+ ): Record<K, T[]> {
5
+ const result = {} as Record<K, T[]>;
6
+
7
+ for (const item of items) {
8
+ const k = key(item);
9
+ (result[k] ??= []).push(item);
10
+ }
11
+
12
+ return result;
13
+ }
package/tsconfig.json CHANGED
@@ -1,8 +1,8 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "jsx": "react-jsx"
6
- },
7
- "include": ["src"]
8
- }
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "jsx": "react-jsx"
6
+ },
7
+ "include": ["src"]
8
+ }
package/vite.config.ts CHANGED
@@ -1,23 +1,23 @@
1
- import { defineConfig } from "vite";
2
- import react from "@vitejs/plugin-react";
3
- import dts from "vite-plugin-dts";
4
-
5
- export default defineConfig({
6
- plugins: [
7
- react(),
8
- dts({
9
- entryRoot: "src",
10
- }),
11
- ],
12
- build: {
13
- lib: {
14
- entry: "src/index.ts",
15
- formats: ["es"],
16
- fileName: "index",
17
- },
18
- rollupOptions: {
19
- external: ["react", "react-dom", "@goodie-forms/core"],
20
- },
21
- sourcemap: true,
22
- },
23
- });
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+ import dts from "vite-plugin-dts";
4
+
5
+ export default defineConfig({
6
+ plugins: [
7
+ react(),
8
+ dts({
9
+ entryRoot: "src",
10
+ }),
11
+ ],
12
+ build: {
13
+ lib: {
14
+ entry: "src/index.ts",
15
+ formats: ["es"],
16
+ fileName: "index",
17
+ },
18
+ rollupOptions: {
19
+ external: ["react", "react-dom", "@goodie-forms/core"],
20
+ },
21
+ sourcemap: true,
22
+ },
23
+ });