@timeax/form-palette 0.0.29 → 0.0.30
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/Readme.md +416 -122
- package/dist/adapter-CvjXO9Gi.d.mts +253 -0
- package/dist/adapter-CvjXO9Gi.d.ts +253 -0
- package/dist/adapters.d.mts +5 -252
- package/dist/adapters.d.ts +5 -252
- package/dist/adapters.js +13 -2618
- package/dist/adapters.js.map +1 -1
- package/dist/adapters.mjs +11 -2620
- package/dist/adapters.mjs.map +1 -1
- package/dist/extra.d.mts +127 -0
- package/dist/extra.d.ts +127 -0
- package/dist/extra.js +26347 -0
- package/dist/extra.js.map +1 -0
- package/dist/extra.mjs +26303 -0
- package/dist/extra.mjs.map +1 -0
- package/dist/index.d.mts +11 -3792
- package/dist/index.d.ts +11 -3792
- package/dist/index.js +4514 -3996
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4438 -3921
- package/dist/index.mjs.map +1 -1
- package/dist/variant-BPDyK780.d.mts +4337 -0
- package/dist/variant-v0LBdshU.d.ts +4337 -0
- package/package.json +8 -2
package/dist/extra.d.mts
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { M as ListerProviderHost, P as PresetMap, N as ListerApi, O as ListerStoreState, Q as ListerRuntimeState, U as ListerSessionId, W as ListerId, X as ListerSearchMode, Y as ListerSearchTarget, Z as ListerSearchPayload, _ as ListerFilterCtx, $ as ListerDefinition, a0 as ListerMode, a1 as ShadcnJsonEditorProps, a2 as JsonEditorIndexHandle } from './variant-BPDyK780.mjs';
|
|
4
|
+
export { a7 as ListerChangeEvent, as as ListerDetails, ah as ListerFilterApply, ag as ListerFilterApplyMode, ai as ListerFilterBindKey, ak as ListerFilterGroupOption, aj as ListerFilterInput, am as ListerFilterInputOption, an as ListerFilterOption, ao as ListerFilterSpec, al as ListerFilterValueOption, a9 as ListerLogCode, aa as ListerLogEntry, a8 as ListerLogLevel, ad as ListerMapping, at as ListerOpenOptions, a3 as ListerOpenReason, au as ListerOpenResult, ac as ListerOption, ar as ListerOptionsForMode, ab as ListerPermissionCtx, aq as ListerRawForMode, af as ListerSearchSpec, az as ListerSessionState, ae as ListerSource, ap as ListerValueForMode, a6 as OpenAnchor, ax as PresetFilters, ay as PresetMeta, av as PresetRaw, aw as PresetValue, a5 as Resolver, a4 as Selector } from './variant-BPDyK780.mjs';
|
|
5
|
+
import 'zod';
|
|
6
|
+
import './adapter-CvjXO9Gi.mjs';
|
|
7
|
+
import '@inertiajs/core';
|
|
8
|
+
import 'axios';
|
|
9
|
+
import 'react-day-picker';
|
|
10
|
+
import 'class-variance-authority/types';
|
|
11
|
+
import 'class-variance-authority';
|
|
12
|
+
import '@radix-ui/react-switch';
|
|
13
|
+
|
|
14
|
+
type HttpReq = {
|
|
15
|
+
endpoint: string;
|
|
16
|
+
method: "GET" | "POST";
|
|
17
|
+
params?: any;
|
|
18
|
+
body?: any;
|
|
19
|
+
headers?: any;
|
|
20
|
+
};
|
|
21
|
+
type ListerHttpClient = (req: HttpReq) => Promise<any>;
|
|
22
|
+
|
|
23
|
+
type AnyDef = ListerDefinition<any, any, any, any>;
|
|
24
|
+
/**
|
|
25
|
+
* IMPORTANT:
|
|
26
|
+
* Your types file may not yet include these runtime-only fields (searchSpec/searchTarget).
|
|
27
|
+
* Without widening here, TS2353 will fire when we create session objects containing them.
|
|
28
|
+
*
|
|
29
|
+
* This keeps compilation green while you finish syncing the types.
|
|
30
|
+
*/
|
|
31
|
+
type AnyState = ListerRuntimeState<any, any, any, any, any> & {
|
|
32
|
+
searchSpec?: any;
|
|
33
|
+
searchTarget?: any;
|
|
34
|
+
ownerKey?: string;
|
|
35
|
+
};
|
|
36
|
+
declare function ListerProvider(props: {
|
|
37
|
+
host: ListerProviderHost;
|
|
38
|
+
presets?: PresetMap;
|
|
39
|
+
http?: ListerHttpClient;
|
|
40
|
+
/** provider-side debounce for remote search (default 300ms) */
|
|
41
|
+
remoteDebounceMs?: number;
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
}): react_jsx_runtime.JSX.Element;
|
|
44
|
+
declare function useLister<P extends PresetMap>(): {
|
|
45
|
+
api: ListerApi<P>;
|
|
46
|
+
store: ListerStoreState;
|
|
47
|
+
/** active session convenience (can be undefined if none open) */
|
|
48
|
+
state: AnyState | undefined;
|
|
49
|
+
actions: {
|
|
50
|
+
focus(id: ListerSessionId): void;
|
|
51
|
+
dispose(id: ListerSessionId): void;
|
|
52
|
+
apply(id: ListerSessionId): void;
|
|
53
|
+
cancel(id: ListerSessionId): void;
|
|
54
|
+
close(id: ListerSessionId): void;
|
|
55
|
+
toggle(id: ListerSessionId, value: ListerId): void;
|
|
56
|
+
select(id: ListerSessionId, value: ListerId): void;
|
|
57
|
+
deselect(id: ListerSessionId, value: ListerId): void;
|
|
58
|
+
clear(id: ListerSessionId): void;
|
|
59
|
+
setQuery(id: ListerSessionId, q: string): void;
|
|
60
|
+
setSearchMode(id: ListerSessionId, mode: ListerSearchMode): void;
|
|
61
|
+
setSearchTarget(id: ListerSessionId, target: ListerSearchTarget): void;
|
|
62
|
+
searchLocal: {
|
|
63
|
+
(id: ListerSessionId, q: string): void;
|
|
64
|
+
(id: ListerSessionId, q: string, payload?: ListerSearchPayload): void;
|
|
65
|
+
};
|
|
66
|
+
searchRemote: {
|
|
67
|
+
(id: ListerSessionId, q: string): void;
|
|
68
|
+
(id: ListerSessionId, q: string, payload?: ListerSearchPayload): void;
|
|
69
|
+
};
|
|
70
|
+
refresh(id: ListerSessionId): void;
|
|
71
|
+
setPosition(id: ListerSessionId, pos: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
} | null): void;
|
|
75
|
+
/** Filters (non-UI logic) */
|
|
76
|
+
getFilterCtx<TFilters>(id: ListerSessionId): ListerFilterCtx<TFilters>;
|
|
77
|
+
applyFilterOption(id: ListerSessionId, optionId: string | number): void;
|
|
78
|
+
registerPreset(kind: string, def: AnyDef): void;
|
|
79
|
+
getPreset(kind: string): AnyDef | undefined;
|
|
80
|
+
getVisibleOptions(id: ListerSessionId): any[];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Search bar + trailing controls:
|
|
86
|
+
* - Search target (all/subject/only) popover (leading control)
|
|
87
|
+
* - Search mode toggle (remote/local/hybrid)
|
|
88
|
+
* - Filters UI (custom popover button)
|
|
89
|
+
*
|
|
90
|
+
* Notes:
|
|
91
|
+
* - Search mode is bound to session.searchMode via actions.setSearchMode(id, mode)
|
|
92
|
+
* - Search target is bound to session.searchTarget via actions.setSearchTarget(id, target)
|
|
93
|
+
* - Filters live in session.filtersSpec?.options and session.selectedFilterValues
|
|
94
|
+
*/
|
|
95
|
+
declare function SearchBar(props: {
|
|
96
|
+
id: ListerSessionId;
|
|
97
|
+
store: ListerStoreState;
|
|
98
|
+
}): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
declare function ListerUI(): react_jsx_runtime.JSX.Element | null;
|
|
101
|
+
declare function HeaderBar(props: {
|
|
102
|
+
id: ListerSessionId;
|
|
103
|
+
title: string;
|
|
104
|
+
loading: boolean;
|
|
105
|
+
refreshing: boolean;
|
|
106
|
+
showRefresh: boolean;
|
|
107
|
+
draggable: boolean;
|
|
108
|
+
onRefresh(): void;
|
|
109
|
+
onClose(): void;
|
|
110
|
+
}): react_jsx_runtime.JSX.Element;
|
|
111
|
+
|
|
112
|
+
declare function OptionList(props: {
|
|
113
|
+
id: ListerSessionId;
|
|
114
|
+
className?: string;
|
|
115
|
+
}): react_jsx_runtime.JSX.Element;
|
|
116
|
+
declare function FooterBar(props: {
|
|
117
|
+
id: ListerSessionId;
|
|
118
|
+
mode: ListerMode;
|
|
119
|
+
confirm: boolean;
|
|
120
|
+
onClear(): void;
|
|
121
|
+
onCancel(): void;
|
|
122
|
+
onApply(): void;
|
|
123
|
+
}): react_jsx_runtime.JSX.Element;
|
|
124
|
+
|
|
125
|
+
declare const ShadcnJsonEditorVariant: React.ForwardRefExoticComponent<ShadcnJsonEditorProps & React.RefAttributes<JsonEditorIndexHandle>>;
|
|
126
|
+
|
|
127
|
+
export { FooterBar, HeaderBar, ShadcnJsonEditorVariant as JsonEditor, ListerApi, ListerDefinition, ListerFilterCtx, ListerId, ListerMode, ListerProvider, ListerProviderHost, ListerRuntimeState, ListerSearchMode, ListerSearchPayload, ListerSearchTarget, ListerSessionId, ListerStoreState, ListerUI, OptionList, PresetMap, SearchBar, useLister };
|
package/dist/extra.d.ts
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { M as ListerProviderHost, P as PresetMap, N as ListerApi, O as ListerStoreState, Q as ListerRuntimeState, U as ListerSessionId, W as ListerId, X as ListerSearchMode, Y as ListerSearchTarget, Z as ListerSearchPayload, _ as ListerFilterCtx, $ as ListerDefinition, a0 as ListerMode, a1 as ShadcnJsonEditorProps, a2 as JsonEditorIndexHandle } from './variant-v0LBdshU.js';
|
|
4
|
+
export { a7 as ListerChangeEvent, as as ListerDetails, ah as ListerFilterApply, ag as ListerFilterApplyMode, ai as ListerFilterBindKey, ak as ListerFilterGroupOption, aj as ListerFilterInput, am as ListerFilterInputOption, an as ListerFilterOption, ao as ListerFilterSpec, al as ListerFilterValueOption, a9 as ListerLogCode, aa as ListerLogEntry, a8 as ListerLogLevel, ad as ListerMapping, at as ListerOpenOptions, a3 as ListerOpenReason, au as ListerOpenResult, ac as ListerOption, ar as ListerOptionsForMode, ab as ListerPermissionCtx, aq as ListerRawForMode, af as ListerSearchSpec, az as ListerSessionState, ae as ListerSource, ap as ListerValueForMode, a6 as OpenAnchor, ax as PresetFilters, ay as PresetMeta, av as PresetRaw, aw as PresetValue, a5 as Resolver, a4 as Selector } from './variant-v0LBdshU.js';
|
|
5
|
+
import 'zod';
|
|
6
|
+
import './adapter-CvjXO9Gi.js';
|
|
7
|
+
import '@inertiajs/core';
|
|
8
|
+
import 'axios';
|
|
9
|
+
import 'react-day-picker';
|
|
10
|
+
import 'class-variance-authority/types';
|
|
11
|
+
import 'class-variance-authority';
|
|
12
|
+
import '@radix-ui/react-switch';
|
|
13
|
+
|
|
14
|
+
type HttpReq = {
|
|
15
|
+
endpoint: string;
|
|
16
|
+
method: "GET" | "POST";
|
|
17
|
+
params?: any;
|
|
18
|
+
body?: any;
|
|
19
|
+
headers?: any;
|
|
20
|
+
};
|
|
21
|
+
type ListerHttpClient = (req: HttpReq) => Promise<any>;
|
|
22
|
+
|
|
23
|
+
type AnyDef = ListerDefinition<any, any, any, any>;
|
|
24
|
+
/**
|
|
25
|
+
* IMPORTANT:
|
|
26
|
+
* Your types file may not yet include these runtime-only fields (searchSpec/searchTarget).
|
|
27
|
+
* Without widening here, TS2353 will fire when we create session objects containing them.
|
|
28
|
+
*
|
|
29
|
+
* This keeps compilation green while you finish syncing the types.
|
|
30
|
+
*/
|
|
31
|
+
type AnyState = ListerRuntimeState<any, any, any, any, any> & {
|
|
32
|
+
searchSpec?: any;
|
|
33
|
+
searchTarget?: any;
|
|
34
|
+
ownerKey?: string;
|
|
35
|
+
};
|
|
36
|
+
declare function ListerProvider(props: {
|
|
37
|
+
host: ListerProviderHost;
|
|
38
|
+
presets?: PresetMap;
|
|
39
|
+
http?: ListerHttpClient;
|
|
40
|
+
/** provider-side debounce for remote search (default 300ms) */
|
|
41
|
+
remoteDebounceMs?: number;
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
}): react_jsx_runtime.JSX.Element;
|
|
44
|
+
declare function useLister<P extends PresetMap>(): {
|
|
45
|
+
api: ListerApi<P>;
|
|
46
|
+
store: ListerStoreState;
|
|
47
|
+
/** active session convenience (can be undefined if none open) */
|
|
48
|
+
state: AnyState | undefined;
|
|
49
|
+
actions: {
|
|
50
|
+
focus(id: ListerSessionId): void;
|
|
51
|
+
dispose(id: ListerSessionId): void;
|
|
52
|
+
apply(id: ListerSessionId): void;
|
|
53
|
+
cancel(id: ListerSessionId): void;
|
|
54
|
+
close(id: ListerSessionId): void;
|
|
55
|
+
toggle(id: ListerSessionId, value: ListerId): void;
|
|
56
|
+
select(id: ListerSessionId, value: ListerId): void;
|
|
57
|
+
deselect(id: ListerSessionId, value: ListerId): void;
|
|
58
|
+
clear(id: ListerSessionId): void;
|
|
59
|
+
setQuery(id: ListerSessionId, q: string): void;
|
|
60
|
+
setSearchMode(id: ListerSessionId, mode: ListerSearchMode): void;
|
|
61
|
+
setSearchTarget(id: ListerSessionId, target: ListerSearchTarget): void;
|
|
62
|
+
searchLocal: {
|
|
63
|
+
(id: ListerSessionId, q: string): void;
|
|
64
|
+
(id: ListerSessionId, q: string, payload?: ListerSearchPayload): void;
|
|
65
|
+
};
|
|
66
|
+
searchRemote: {
|
|
67
|
+
(id: ListerSessionId, q: string): void;
|
|
68
|
+
(id: ListerSessionId, q: string, payload?: ListerSearchPayload): void;
|
|
69
|
+
};
|
|
70
|
+
refresh(id: ListerSessionId): void;
|
|
71
|
+
setPosition(id: ListerSessionId, pos: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
} | null): void;
|
|
75
|
+
/** Filters (non-UI logic) */
|
|
76
|
+
getFilterCtx<TFilters>(id: ListerSessionId): ListerFilterCtx<TFilters>;
|
|
77
|
+
applyFilterOption(id: ListerSessionId, optionId: string | number): void;
|
|
78
|
+
registerPreset(kind: string, def: AnyDef): void;
|
|
79
|
+
getPreset(kind: string): AnyDef | undefined;
|
|
80
|
+
getVisibleOptions(id: ListerSessionId): any[];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Search bar + trailing controls:
|
|
86
|
+
* - Search target (all/subject/only) popover (leading control)
|
|
87
|
+
* - Search mode toggle (remote/local/hybrid)
|
|
88
|
+
* - Filters UI (custom popover button)
|
|
89
|
+
*
|
|
90
|
+
* Notes:
|
|
91
|
+
* - Search mode is bound to session.searchMode via actions.setSearchMode(id, mode)
|
|
92
|
+
* - Search target is bound to session.searchTarget via actions.setSearchTarget(id, target)
|
|
93
|
+
* - Filters live in session.filtersSpec?.options and session.selectedFilterValues
|
|
94
|
+
*/
|
|
95
|
+
declare function SearchBar(props: {
|
|
96
|
+
id: ListerSessionId;
|
|
97
|
+
store: ListerStoreState;
|
|
98
|
+
}): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
declare function ListerUI(): react_jsx_runtime.JSX.Element | null;
|
|
101
|
+
declare function HeaderBar(props: {
|
|
102
|
+
id: ListerSessionId;
|
|
103
|
+
title: string;
|
|
104
|
+
loading: boolean;
|
|
105
|
+
refreshing: boolean;
|
|
106
|
+
showRefresh: boolean;
|
|
107
|
+
draggable: boolean;
|
|
108
|
+
onRefresh(): void;
|
|
109
|
+
onClose(): void;
|
|
110
|
+
}): react_jsx_runtime.JSX.Element;
|
|
111
|
+
|
|
112
|
+
declare function OptionList(props: {
|
|
113
|
+
id: ListerSessionId;
|
|
114
|
+
className?: string;
|
|
115
|
+
}): react_jsx_runtime.JSX.Element;
|
|
116
|
+
declare function FooterBar(props: {
|
|
117
|
+
id: ListerSessionId;
|
|
118
|
+
mode: ListerMode;
|
|
119
|
+
confirm: boolean;
|
|
120
|
+
onClear(): void;
|
|
121
|
+
onCancel(): void;
|
|
122
|
+
onApply(): void;
|
|
123
|
+
}): react_jsx_runtime.JSX.Element;
|
|
124
|
+
|
|
125
|
+
declare const ShadcnJsonEditorVariant: React.ForwardRefExoticComponent<ShadcnJsonEditorProps & React.RefAttributes<JsonEditorIndexHandle>>;
|
|
126
|
+
|
|
127
|
+
export { FooterBar, HeaderBar, ShadcnJsonEditorVariant as JsonEditor, ListerApi, ListerDefinition, ListerFilterCtx, ListerId, ListerMode, ListerProvider, ListerProviderHost, ListerRuntimeState, ListerSearchMode, ListerSearchPayload, ListerSearchTarget, ListerSessionId, ListerStoreState, ListerUI, OptionList, PresetMap, SearchBar, useLister };
|