@zayne-labs/toolkit-react 0.9.46 → 0.9.48
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/esm/hooks/index.d.ts +2 -199
- package/dist/esm/hooks/index.js +3 -3
- package/dist/esm/hooks-cJL0eNIo.js +575 -0
- package/dist/esm/hooks-cJL0eNIo.js.map +1 -0
- package/dist/esm/index-DasjkKek.d.ts +251 -0
- package/dist/esm/utils/index.d.ts +22 -15
- package/dist/esm/utils/index.js +115 -108
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/zustand/index.d.ts +34 -30
- package/dist/esm/zustand/index.js +48 -50
- package/dist/esm/zustand/index.js.map +1 -1
- package/package.json +10 -10
- package/dist/esm/chunk-KFK5FGDY.js +0 -495
- package/dist/esm/chunk-KFK5FGDY.js.map +0 -1
- package/dist/esm/createCustomContext-C57O-oeR.d.ts +0 -22
- package/dist/esm/hooks/index.js.map +0 -1
@@ -1,44 +1,48 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
import * as
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import { StoreApi as StoreApi$1 } from
|
1
|
+
import { CustomContextOptions } from "../index-DasjkKek.js";
|
2
|
+
import { AnyObject, Prettify, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
|
3
|
+
import * as react0 from "react";
|
4
|
+
import { StoreApi } from "@zayne-labs/toolkit-core";
|
5
|
+
import * as zustand2 from "zustand";
|
6
|
+
import { Mutate, StateCreator as StateCreator$1, StoreApi as StoreApi$1, StoreMutatorIdentifier, UseBoundStore } from "zustand";
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
//#region src/zustand/createZustandContext.d.ts
|
9
|
+
declare const createZustandContext: <TState extends Record<string, unknown>, TUseBoundStore extends UseBoundStore<StoreApi$1<TState>> = UseBoundStore<StoreApi$1<TState>>, TStore extends StoreApi$1<TState> = StoreApi$1<TState>>(options?: CustomContextOptions<TUseBoundStore, true>) => [ZustandProvider: (props: ({
|
10
|
+
store: TStore;
|
11
|
+
storeCreator?: undefined;
|
12
|
+
value?: undefined;
|
12
13
|
} | {
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
storeCreator: () => TUseBoundStore;
|
15
|
+
store?: undefined;
|
16
|
+
value?: undefined;
|
16
17
|
} | {
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
value: TUseBoundStore;
|
19
|
+
store?: undefined;
|
20
|
+
storeCreator?: undefined;
|
20
21
|
}) & {
|
21
|
-
|
22
|
-
}) =>
|
23
|
-
|
22
|
+
children: React.ReactNode;
|
23
|
+
}) => react0.DetailedReactHTMLElement<react0.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, useBoundStore: <TResult = TState>(selector?: SelectorFn<TState, TResult>) => TResult];
|
24
|
+
//#endregion
|
25
|
+
//#region src/zustand/createZustandStoreWithCombine.d.ts
|
24
26
|
type Write<TInitialState, TExtraState> = Prettify<Omit<TInitialState, keyof TExtraState> & TExtraState>;
|
25
27
|
declare const combine: <TInitialState extends AnyObject, TExtraState extends AnyObject, Mps extends Array<[StoreMutatorIdentifier, unknown]> = [], Mcs extends Array<[StoreMutatorIdentifier, unknown]> = []>(initialState: TInitialState, storeCreator: StateCreator$1<TInitialState, Mps, Mcs, TExtraState>) => StateCreator$1<Write<TInitialState, TExtraState>, Mps, Mcs>;
|
26
|
-
declare const createStoreWithCombine: <TInitialState extends AnyObject, TExtraState extends AnyObject>(...params: Parameters<typeof combine<TInitialState, TExtraState>>) =>
|
27
|
-
declare const createWithCombine: <TInitialState extends AnyObject, TExtraState extends AnyObject>(...params: Parameters<typeof combine<TInitialState, TExtraState>>) =>
|
28
|
-
|
28
|
+
declare const createStoreWithCombine: <TInitialState extends AnyObject, TExtraState extends AnyObject>(...params: Parameters<typeof combine<TInitialState, TExtraState>>) => zustand2.StoreApi<Omit<TInitialState, keyof TExtraState> & TExtraState extends infer T ? { [Key in keyof T]: (Omit<TInitialState, keyof TExtraState> & TExtraState)[Key] } : never>;
|
29
|
+
declare const createWithCombine: <TInitialState extends AnyObject, TExtraState extends AnyObject>(...params: Parameters<typeof combine<TInitialState, TExtraState>>) => zustand2.UseBoundStore<zustand2.StoreApi<Omit<TInitialState, keyof TExtraState> & TExtraState extends infer T ? { [Key in keyof T]: (Omit<TInitialState, keyof TExtraState> & TExtraState)[Key] } : never>>;
|
30
|
+
//#endregion
|
31
|
+
//#region src/zustand/createZustandStoreWithSubscribe.d.ts
|
29
32
|
type Get<T, K, F> = K extends keyof T ? T[K] : F;
|
30
33
|
type StateCreator<T, Mis extends Array<[StoreMutatorIdentifier, unknown]> = [], Mos extends Array<[StoreMutatorIdentifier, unknown]> = [], U = T> = {
|
31
|
-
|
32
|
-
} & ((setState: Get<Mutate<StoreApi
|
34
|
+
$$storeMutators?: Mos;
|
35
|
+
} & ((setState: Get<Mutate<StoreApi<T>, Mis>, "setState", never>, getState: Get<Mutate<StoreApi<T>, Mis>, "getState", never>, store: Mutate<StoreApi<T>, Mis>) => U);
|
33
36
|
type CreateStoreWithSubscribe = {
|
34
|
-
|
35
|
-
|
37
|
+
<T, Mos extends Array<[StoreMutatorIdentifier, unknown]> = []>(initializer: StateCreator<T, [], Mos>): Mutate<StoreApi<T>, Mos>;
|
38
|
+
<T>(): <Mos extends Array<[StoreMutatorIdentifier, unknown]> = []>(initializer: StateCreator<T, [], Mos>) => Mutate<StoreApi<T>, Mos>;
|
36
39
|
};
|
37
40
|
declare const createStoreWithSubscribe: CreateStoreWithSubscribe;
|
38
41
|
type CreateWithSubscribe = {
|
39
|
-
|
40
|
-
|
42
|
+
<T, Mos extends Array<[StoreMutatorIdentifier, unknown]> = []>(initializer: StateCreator<T, [], Mos>): UseBoundStore<Mutate<StoreApi<T>, Mos>>;
|
43
|
+
<T>(): <Mos extends Array<[StoreMutatorIdentifier, unknown]> = []>(initializer: StateCreator<T, [], Mos>) => UseBoundStore<Mutate<StoreApi<T>, Mos>>;
|
41
44
|
};
|
42
45
|
declare const createWithSubscribe: CreateWithSubscribe;
|
43
|
-
|
44
|
-
export { combine, createStoreWithCombine, createStoreWithSubscribe, createWithCombine, createWithSubscribe, createZustandContext };
|
46
|
+
//#endregion
|
47
|
+
export { StateCreator, combine, createStoreWithCombine, createStoreWithSubscribe, createWithCombine, createWithSubscribe, createZustandContext };
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1,56 +1,54 @@
|
|
1
|
-
import { createCustomContext,
|
2
|
-
import { createElement } from
|
3
|
-
import { createStore
|
4
|
-
import { createStore as createStore$1 } from
|
1
|
+
import { createCustomContext, useConstant, useStore } from "../hooks-cJL0eNIo.js";
|
2
|
+
import { createElement } from "react";
|
3
|
+
import { createStore } from "@zayne-labs/toolkit-core";
|
4
|
+
import { create, createStore as createStore$1, useStore as useStore$1 } from "zustand";
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
const useBoundStore = (selector) => {
|
31
|
-
const useZustandStore = useCustomContext();
|
32
|
-
return useZustandStore(selector);
|
33
|
-
};
|
34
|
-
return [ZustandProvider, useBoundStore];
|
6
|
+
//#region src/zustand/createZustandContext.ts
|
7
|
+
const createZustandContext = (options) => {
|
8
|
+
const [Provider, useCustomContext] = createCustomContext(options);
|
9
|
+
function ZustandProvider(props) {
|
10
|
+
const { children, store, storeCreator, value } = props;
|
11
|
+
const useZustandStore = useConstant(() => {
|
12
|
+
switch (true) {
|
13
|
+
case Boolean(storeCreator): return storeCreator();
|
14
|
+
case Boolean(value): return value;
|
15
|
+
case Boolean(store): {
|
16
|
+
const useBoundStore$1 = (selector) => useStore$1(store, selector);
|
17
|
+
Object.assign(useBoundStore$1, store);
|
18
|
+
return useBoundStore$1;
|
19
|
+
}
|
20
|
+
default: throw new Error("No store provided");
|
21
|
+
}
|
22
|
+
});
|
23
|
+
return createElement(Provider, { value: useZustandStore }, children);
|
24
|
+
}
|
25
|
+
const useBoundStore = (selector) => {
|
26
|
+
const useZustandStore = useCustomContext();
|
27
|
+
return useZustandStore(selector);
|
28
|
+
};
|
29
|
+
return [ZustandProvider, useBoundStore];
|
35
30
|
};
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
);
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
31
|
+
|
32
|
+
//#endregion
|
33
|
+
//#region src/zustand/createZustandStoreWithCombine.ts
|
34
|
+
const combine = (initialState, storeCreator) => (...params) => ({
|
35
|
+
...initialState,
|
36
|
+
...storeCreator(...params)
|
37
|
+
});
|
38
|
+
const createStoreWithCombine = (...params) => createStore$1(combine(...params));
|
39
|
+
const createWithCombine = (...params) => create(combine(...params));
|
40
|
+
|
41
|
+
//#endregion
|
42
|
+
//#region src/zustand/createZustandStoreWithSubscribe.ts
|
43
|
+
const createStoreWithSubscribe = (stateInitializer) => stateInitializer ? createStore(stateInitializer) : createStore;
|
44
|
+
const createWithSubscribeImpl = (createState) => {
|
45
|
+
const store = createStore(createState);
|
46
|
+
const useBoundStore = (selector) => useStore(store, selector);
|
47
|
+
Object.assign(useBoundStore, store);
|
48
|
+
return useBoundStore;
|
51
49
|
};
|
52
|
-
|
50
|
+
const createWithSubscribe = (stateInitializer) => stateInitializer ? createWithSubscribeImpl(stateInitializer) : createWithSubscribeImpl;
|
53
51
|
|
52
|
+
//#endregion
|
54
53
|
export { combine, createStoreWithCombine, createStoreWithSubscribe, createWithCombine, createWithSubscribe, createZustandContext };
|
55
|
-
//# sourceMappingURL=index.js.map
|
56
54
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"file":"index.js","names":["options?: CustomContextOptions<TUseBoundStore, true>","props: ZustandProviderProps","useBoundStore","selector: SelectorFn<TState, unknown>","selector?: SelectorFn<TState, TResult>","initialState: TInitialState","storeCreator: StateCreator<TInitialState, Mps, Mcs, TExtraState>","stateInitializer: StateCreator<TState> | undefined","createState: StateCreator<TState>","selector?: SelectorFn<TState, unknown>"],"sources":["../../../src/zustand/createZustandContext.ts","../../../src/zustand/createZustandStoreWithCombine.ts","../../../src/zustand/createZustandStoreWithSubscribe.ts"],"sourcesContent":["import type { SelectorFn, UnionDiscriminator } from \"@zayne-labs/toolkit-type-helpers\";\nimport { createElement } from \"react\";\nimport { type StoreApi, type UseBoundStore, useStore } from \"zustand\";\nimport { type CustomContextOptions, createCustomContext, useConstant } from \"../hooks\";\n\nconst createZustandContext = <\n\tTState extends Record<string, unknown>,\n\tTUseBoundStore extends UseBoundStore<StoreApi<TState>> = UseBoundStore<StoreApi<TState>>,\n\tTStore extends StoreApi<TState> = StoreApi<TState>,\n>(\n\toptions?: CustomContextOptions<TUseBoundStore, true>\n) => {\n\tconst [Provider, useCustomContext] = createCustomContext(options);\n\n\ttype ZustandProviderProps = UnionDiscriminator<\n\t\t[{ store: TStore }, { storeCreator: () => TUseBoundStore }, { value: TUseBoundStore }]\n\t> & { children: React.ReactNode };\n\n\tfunction ZustandProvider(props: ZustandProviderProps) {\n\t\tconst { children, store, storeCreator, value } = props;\n\n\t\tconst useZustandStore = useConstant(() => {\n\t\t\tswitch (true) {\n\t\t\t\tcase Boolean(storeCreator): {\n\t\t\t\t\treturn storeCreator();\n\t\t\t\t}\n\t\t\t\tcase Boolean(value): {\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t\tcase Boolean(store): {\n\t\t\t\t\tconst useBoundStore = (selector: SelectorFn<TState, unknown>) => useStore(store, selector);\n\t\t\t\t\tObject.assign(useBoundStore, store);\n\t\t\t\t\treturn useBoundStore as TUseBoundStore;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tthrow new Error(\"No store provided\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn createElement(Provider, { value: useZustandStore }, children);\n\t}\n\n\tconst useBoundStore = <TResult = TState>(selector?: SelectorFn<TState, TResult>): TResult => {\n\t\tconst useZustandStore = useCustomContext();\n\n\t\treturn useZustandStore(selector as never);\n\t};\n\n\treturn [ZustandProvider, useBoundStore] as [\n\t\tZustandProvider: typeof ZustandProvider,\n\t\tuseBoundStore: typeof useBoundStore,\n\t];\n};\n\nexport { createZustandContext };\n","import type { AnyFunction, AnyObject, Prettify } from \"@zayne-labs/toolkit-type-helpers\";\nimport { type StateCreator, type StoreMutatorIdentifier, create, createStore } from \"zustand\";\n\ntype Write<TInitialState, TExtraState> = Prettify<Omit<TInitialState, keyof TExtraState> & TExtraState>;\n\nexport const combine =\n\t<\n\t\tTInitialState extends AnyObject,\n\t\tTExtraState extends AnyObject,\n\t\tMps extends Array<[StoreMutatorIdentifier, unknown]> = [],\n\t\tMcs extends Array<[StoreMutatorIdentifier, unknown]> = [],\n\t>(\n\t\tinitialState: TInitialState,\n\t\tstoreCreator: StateCreator<TInitialState, Mps, Mcs, TExtraState>\n\t): StateCreator<Write<TInitialState, TExtraState>, Mps, Mcs> =>\n\t// eslint-disable-next-line ts-eslint/no-unsafe-return -- We don't know what the storeCreator will return\n\t(...params) => ({\n\t\t...initialState,\n\t\t...(storeCreator as AnyFunction)(...params),\n\t});\n\nexport const createStoreWithCombine = <TInitialState extends AnyObject, TExtraState extends AnyObject>(\n\t...params: Parameters<typeof combine<TInitialState, TExtraState>>\n) => createStore(combine(...params));\n\nexport const createWithCombine = <TInitialState extends AnyObject, TExtraState extends AnyObject>(\n\t...params: Parameters<typeof combine<TInitialState, TExtraState>>\n) => create(combine(...params));\n","import { useStore } from \"@/hooks\";\nimport { type StoreApi, createStore } from \"@zayne-labs/toolkit-core\";\nimport type { SelectorFn } from \"@zayne-labs/toolkit-type-helpers\";\nimport type { Mutate, StoreMutatorIdentifier, UseBoundStore } from \"zustand\";\n\ntype Get<T, K, F> = K extends keyof T ? T[K] : F;\n\nexport type StateCreator<\n\tT,\n\tMis extends Array<[StoreMutatorIdentifier, unknown]> = [],\n\tMos extends Array<[StoreMutatorIdentifier, unknown]> = [],\n\tU = T,\n> = { $$storeMutators?: Mos } & ((\n\tsetState: Get<Mutate<StoreApi<T>, Mis>, \"setState\", never>,\n\tgetState: Get<Mutate<StoreApi<T>, Mis>, \"getState\", never>,\n\tstore: Mutate<StoreApi<T>, Mis>\n) => U);\n\ntype CreateStoreWithSubscribe = {\n\t<T, Mos extends Array<[StoreMutatorIdentifier, unknown]> = []>(\n\t\tinitializer: StateCreator<T, [], Mos>\n\t): Mutate<StoreApi<T>, Mos>;\n\n\t<T>(): <Mos extends Array<[StoreMutatorIdentifier, unknown]> = []>(\n\t\tinitializer: StateCreator<T, [], Mos>\n\t) => Mutate<StoreApi<T>, Mos>;\n};\n\nexport const createStoreWithSubscribe = (<TState>(stateInitializer: StateCreator<TState> | undefined) =>\n\tstateInitializer ? createStore(stateInitializer) : createStore) as CreateStoreWithSubscribe;\n\ntype CreateWithSubscribe = {\n\t<T, Mos extends Array<[StoreMutatorIdentifier, unknown]> = []>(\n\t\tinitializer: StateCreator<T, [], Mos>\n\t): UseBoundStore<Mutate<StoreApi<T>, Mos>>;\n\t<T>(): <Mos extends Array<[StoreMutatorIdentifier, unknown]> = []>(\n\t\tinitializer: StateCreator<T, [], Mos>\n\t) => UseBoundStore<Mutate<StoreApi<T>, Mos>>;\n};\n\nconst createWithSubscribeImpl = <TState>(createState: StateCreator<TState>) => {\n\tconst store = createStore(createState);\n\n\tconst useBoundStore = (selector?: SelectorFn<TState, unknown>) => useStore(store, selector);\n\n\tObject.assign(useBoundStore, store);\n\n\treturn useBoundStore;\n};\n\nexport const createWithSubscribe = (<TState>(stateInitializer: StateCreator<TState> | undefined) =>\n\tstateInitializer\n\t\t? createWithSubscribeImpl(stateInitializer)\n\t\t: createWithSubscribeImpl) as CreateWithSubscribe;\n"],"mappings":";;;;;;AAKA,MAAM,uBAAuB,CAK5BA,YACI;CACJ,MAAM,CAAC,UAAU,iBAAiB,GAAG,oBAAoB,QAAQ;CAMjE,SAAS,gBAAgBC,OAA6B;EACrD,MAAM,EAAE,UAAU,OAAO,cAAc,OAAO,GAAG;EAEjD,MAAM,kBAAkB,YAAY,MAAM;AACzC,WAAQ,MAAR;IACC,KAAK,QAAQ,aAAa,CACzB,QAAO,cAAc;IAEtB,KAAK,QAAQ,MAAM,CAClB,QAAO;IAER,KAAK,QAAQ,MAAM,EAAE;KACpB,MAAMC,kBAAgB,CAACC,aAA0C,WAAS,OAAO,SAAS;AAC1F,YAAO,OAAOD,iBAAe,MAAM;AACnC,YAAOA;IACP;IACD,QACC,OAAM,IAAI,MAAM;GAEjB;EACD,EAAC;AAEF,SAAO,cAAc,UAAU,EAAE,OAAO,gBAAiB,GAAE,SAAS;CACpE;CAED,MAAM,gBAAgB,CAAmBE,aAAoD;EAC5F,MAAM,kBAAkB,kBAAkB;AAE1C,SAAO,gBAAgB,SAAkB;CACzC;AAED,QAAO,CAAC,iBAAiB,aAAc;AAIvC;;;;AChDD,MAAa,UACZ,CAMCC,cACAC,iBAGD,CAAC,GAAG,YAAY;CACf,GAAG;CACH,GAAG,AAAC,aAA6B,GAAG,OAAO;AAC3C;AAEF,MAAa,yBAAyB,CACrC,GAAG,WACC,cAAY,QAAQ,GAAG,OAAO,CAAC;AAEpC,MAAa,oBAAoB,CAChC,GAAG,WACC,OAAO,QAAQ,GAAG,OAAO,CAAC;;;;ACC/B,MAAa,2BAA4B,CAASC,qBACjD,mBAAmB,YAAY,iBAAiB,GAAG;AAWpD,MAAM,0BAA0B,CAASC,gBAAsC;CAC9E,MAAM,QAAQ,YAAY,YAAY;CAEtC,MAAM,gBAAgB,CAACC,aAA2C,SAAS,OAAO,SAAS;AAE3F,QAAO,OAAO,eAAe,MAAM;AAEnC,QAAO;AACP;AAED,MAAa,sBAAuB,CAASF,qBAC5C,mBACG,wBAAwB,iBAAiB,GACzC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zayne-labs/toolkit-react",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.9.
|
4
|
+
"version": "0.9.48",
|
5
5
|
"description": "A collection of utility functions, types and composables used by my other projects. Nothing too fancy but can be useful.",
|
6
6
|
"author": "Ryan Zayne",
|
7
7
|
"license": "MIT",
|
@@ -47,8 +47,8 @@
|
|
47
47
|
}
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
|
-
"@zayne-labs/toolkit-core": "0.9.
|
51
|
-
"@zayne-labs/toolkit-type-helpers": "0.9.
|
50
|
+
"@zayne-labs/toolkit-core": "0.9.48",
|
51
|
+
"@zayne-labs/toolkit-type-helpers": "0.9.48"
|
52
52
|
},
|
53
53
|
"devDependencies": {
|
54
54
|
"@arethetypeswrong/cli": "^0.18.1",
|
@@ -56,17 +56,17 @@
|
|
56
56
|
"@size-limit/esbuild-why": "^11.2.0",
|
57
57
|
"@size-limit/preset-small-lib": "^11.2.0",
|
58
58
|
"@total-typescript/ts-reset": "^0.6.1",
|
59
|
-
"@types/node": "^22.15.
|
60
|
-
"@types/react": "^19.1.
|
61
|
-
"@zayne-labs/tsconfig": "0.
|
59
|
+
"@types/node": "^22.15.30",
|
60
|
+
"@types/react": "^19.1.6",
|
61
|
+
"@zayne-labs/tsconfig": "0.9.1",
|
62
62
|
"concurrently": "^9.1.2",
|
63
63
|
"cross-env": "^7.0.3",
|
64
64
|
"publint": "^0.3.12",
|
65
65
|
"react": "^19.1.0",
|
66
66
|
"size-limit": "^11.2.0",
|
67
|
-
"
|
67
|
+
"tsdown": "^0.12.7",
|
68
68
|
"typescript": "5.8.3",
|
69
|
-
"zustand": "^5.0.
|
69
|
+
"zustand": "^5.0.5"
|
70
70
|
},
|
71
71
|
"publishConfig": {
|
72
72
|
"access": "public",
|
@@ -88,8 +88,8 @@
|
|
88
88
|
}
|
89
89
|
],
|
90
90
|
"scripts": {
|
91
|
-
"build": "
|
92
|
-
"build:dev": "cross-env NODE_ENV=development
|
91
|
+
"build": "tsdown",
|
92
|
+
"build:dev": "cross-env NODE_ENV=development tsdown",
|
93
93
|
"build:test": "concurrently --prefix-colors \"yellow.bold,#7da4f8.bold,magenta\" --names PUBLINT,TSUP 'pnpm:lint:publint' 'pnpm:build:dev'",
|
94
94
|
"dev": "pnpm build:dev --watch",
|
95
95
|
"lint:attw": "attw --pack . --ignore-rules=cjs-resolves-to-esm",
|