@lssm/lib.presentation-runtime-react-native 0.0.0-canary-20251217083314 → 1.41.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/dist/index.js +1 -1
- package/dist/nativewind-env.d.js +0 -0
- package/package.json +5 -6
- package/dist/index.d.ts +0 -111
- package/dist/nativewind-env.d.ts +0 -1
- package/dist/ui-kit/dist/ui/form.js +0 -15
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useForm } from "./ui-kit/dist/ui/form.js";
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import { useForm } from "@lssm/lib.ui-kit/ui/form";
|
|
3
3
|
|
|
4
4
|
//#region src/index.ts
|
|
5
5
|
function usePresentationController({ defaults, form: formOpts, toVariables, fetcher, toChips, useUrlState, replace }) {
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.presentation-runtime-react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"scripts": {
|
|
10
10
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
11
|
-
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
12
11
|
"build": "bun build:bundle && bun build:types",
|
|
13
12
|
"build:bundle": "tsdown",
|
|
14
13
|
"build:types": "tsc --noEmit -p tsconfig.json",
|
|
@@ -22,18 +21,18 @@
|
|
|
22
21
|
"react-native": "*",
|
|
23
22
|
"react-hook-form": "^7.68.0",
|
|
24
23
|
"zod": "^4.1.13",
|
|
25
|
-
"@lssm/lib.presentation-runtime-core": "
|
|
24
|
+
"@lssm/lib.presentation-runtime-core": "workspace:*"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
28
|
-
"@lssm/lib.presentation-runtime-core": "
|
|
29
|
-
"@lssm/lib.ui-kit": "
|
|
27
|
+
"@lssm/lib.presentation-runtime-core": "workspace:*",
|
|
28
|
+
"@lssm/lib.ui-kit": "workspace:*"
|
|
30
29
|
},
|
|
31
30
|
"files": [
|
|
32
31
|
"dist",
|
|
33
32
|
"README.md"
|
|
34
33
|
],
|
|
35
34
|
"exports": {
|
|
36
|
-
".": "./
|
|
35
|
+
".": "./src/index.ts",
|
|
37
36
|
"./*": "./*"
|
|
38
37
|
},
|
|
39
38
|
"publishConfig": {
|
package/dist/index.d.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { DefaultValues, Resolver, UseFormReturn } from "react-hook-form";
|
|
3
|
-
import { ListFetcher, ListState } from "@lssm/lib.presentation-runtime-core";
|
|
4
|
-
|
|
5
|
-
//#region src/index.d.ts
|
|
6
|
-
interface UsePresentationControllerOpts<TFilters extends Record<string, unknown>, TVars, TItem> {
|
|
7
|
-
defaults: ListState<TFilters>;
|
|
8
|
-
form: {
|
|
9
|
-
defaultValues: DefaultValues<TFilters>;
|
|
10
|
-
resolver?: Resolver<TFilters>;
|
|
11
|
-
};
|
|
12
|
-
toVariables: (input: ListState<TFilters>) => TVars;
|
|
13
|
-
fetcher: ListFetcher<TVars, TItem>;
|
|
14
|
-
toChips?: (filters: TFilters, setFilter: (key: keyof TFilters, value: TFilters[keyof TFilters] | null) => void) => {
|
|
15
|
-
key: string;
|
|
16
|
-
label: React.ReactNode;
|
|
17
|
-
onRemove?: () => void;
|
|
18
|
-
}[];
|
|
19
|
-
useUrlState: (args: {
|
|
20
|
-
defaults: ListState<TFilters>;
|
|
21
|
-
replace?: boolean;
|
|
22
|
-
}) => {
|
|
23
|
-
state: ListState<TFilters>;
|
|
24
|
-
setState: (next: Partial<ListState<TFilters>>) => void;
|
|
25
|
-
setFilter: (key: keyof TFilters, value: TFilters[keyof TFilters] | null) => void;
|
|
26
|
-
clearFilters: () => void;
|
|
27
|
-
};
|
|
28
|
-
replace?: boolean;
|
|
29
|
-
}
|
|
30
|
-
declare function usePresentationController<TFilters extends Record<string, unknown>, TVars, TItem>({
|
|
31
|
-
defaults,
|
|
32
|
-
form: formOpts,
|
|
33
|
-
toVariables,
|
|
34
|
-
fetcher,
|
|
35
|
-
toChips,
|
|
36
|
-
useUrlState,
|
|
37
|
-
replace
|
|
38
|
-
}: UsePresentationControllerOpts<TFilters, TVars, TItem>): {
|
|
39
|
-
readonly form: UseFormReturn<TFilters>;
|
|
40
|
-
readonly url: {
|
|
41
|
-
state: ListState<TFilters>;
|
|
42
|
-
setState: (next: Partial<ListState<TFilters>>) => void;
|
|
43
|
-
setFilter: (key: keyof TFilters, value: TFilters[keyof TFilters] | null) => void;
|
|
44
|
-
clearFilters: () => void;
|
|
45
|
-
};
|
|
46
|
-
readonly variables: TVars;
|
|
47
|
-
readonly data: TItem[];
|
|
48
|
-
readonly loading: boolean;
|
|
49
|
-
readonly error: unknown;
|
|
50
|
-
readonly totalItems: number | undefined;
|
|
51
|
-
readonly totalPages: number | undefined;
|
|
52
|
-
readonly refetch: () => Promise<void>;
|
|
53
|
-
readonly chips: {
|
|
54
|
-
key: string;
|
|
55
|
-
label: React.ReactNode;
|
|
56
|
-
onRemove?: () => void;
|
|
57
|
-
}[];
|
|
58
|
-
readonly setSearch: (q: string) => void;
|
|
59
|
-
readonly submitFilters: (e?: React.BaseSyntheticEvent) => Promise<void>;
|
|
60
|
-
readonly clearAll: () => void;
|
|
61
|
-
};
|
|
62
|
-
interface UseListCoordinatorOpts<TFilters extends Record<string, unknown>, TVars> {
|
|
63
|
-
defaults: ListState<TFilters>;
|
|
64
|
-
form: {
|
|
65
|
-
defaultValues: DefaultValues<TFilters>;
|
|
66
|
-
resolver?: Resolver<TFilters>;
|
|
67
|
-
};
|
|
68
|
-
toVariables: (input: ListState<TFilters>) => TVars;
|
|
69
|
-
toChips?: (filters: TFilters, setFilter: (key: keyof TFilters, value: TFilters[keyof TFilters] | null) => void) => {
|
|
70
|
-
key: string;
|
|
71
|
-
label: React.ReactNode;
|
|
72
|
-
onRemove?: () => void;
|
|
73
|
-
}[];
|
|
74
|
-
useUrlState: (args: {
|
|
75
|
-
defaults: ListState<TFilters>;
|
|
76
|
-
replace?: boolean;
|
|
77
|
-
}) => {
|
|
78
|
-
state: ListState<TFilters>;
|
|
79
|
-
setState: (next: Partial<ListState<TFilters>>) => void;
|
|
80
|
-
setFilter: (key: keyof TFilters, value: TFilters[keyof TFilters] | null) => void;
|
|
81
|
-
clearFilters: () => void;
|
|
82
|
-
};
|
|
83
|
-
replace?: boolean;
|
|
84
|
-
}
|
|
85
|
-
declare function useListCoordinator<TFilters extends Record<string, unknown>, TVars>({
|
|
86
|
-
defaults,
|
|
87
|
-
form: formOpts,
|
|
88
|
-
toVariables,
|
|
89
|
-
toChips,
|
|
90
|
-
useUrlState,
|
|
91
|
-
replace
|
|
92
|
-
}: UseListCoordinatorOpts<TFilters, TVars>): {
|
|
93
|
-
readonly form: UseFormReturn<TFilters>;
|
|
94
|
-
readonly url: {
|
|
95
|
-
state: ListState<TFilters>;
|
|
96
|
-
setState: (next: Partial<ListState<TFilters>>) => void;
|
|
97
|
-
setFilter: (key: keyof TFilters, value: TFilters[keyof TFilters] | null) => void;
|
|
98
|
-
clearFilters: () => void;
|
|
99
|
-
};
|
|
100
|
-
readonly variables: TVars;
|
|
101
|
-
readonly chips: {
|
|
102
|
-
key: string;
|
|
103
|
-
label: React.ReactNode;
|
|
104
|
-
onRemove?: () => void;
|
|
105
|
-
}[];
|
|
106
|
-
readonly setSearch: (q: string) => void;
|
|
107
|
-
readonly submitFilters: (e?: React.BaseSyntheticEvent) => Promise<void>;
|
|
108
|
-
readonly clearAll: () => void;
|
|
109
|
-
};
|
|
110
|
-
//#endregion
|
|
111
|
-
export { UseListCoordinatorOpts, UsePresentationControllerOpts, useListCoordinator, usePresentationController };
|
package/dist/nativewind-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React$1 from "react";
|
|
4
|
-
import "react-native";
|
|
5
|
-
import "react/jsx-runtime";
|
|
6
|
-
import "@rn-primitives/slot";
|
|
7
|
-
import { useForm } from "react-hook-form";
|
|
8
|
-
import "@hookform/resolvers/zod";
|
|
9
|
-
|
|
10
|
-
//#region ../ui-kit/dist/ui/form.js
|
|
11
|
-
const FormFieldContext = React$1.createContext({});
|
|
12
|
-
const FormItemContext = React$1.createContext({});
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { useForm };
|