@prisma/studio-core 0.0.0-dev.202506231506 → 0.0.0-dev.202506231832

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,101 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { A as Adapter, Q as Query, f as AdapterError } from '../query-C7LxjwdN.cjs';
3
- import { UseQueryStateOptions, UseQueryStateReturn, Options, UseQueryStatesOptions, UseQueryStatesReturn, Parser } from 'nuqs';
4
- export * from 'nuqs';
5
- import 'kysely';
6
-
7
- /**
8
- * Theme variables type - matches shadcn format
9
- */
10
- type ThemeVariables = Record<string, string>;
11
- /**
12
- * Custom theme configuration with light and dark variants
13
- */
14
- interface CustomTheme {
15
- light: ThemeVariables;
16
- dark: ThemeVariables;
17
- }
18
- /**
19
- * Parse CSS variables from shadcn format CSS string
20
- * Handles both :root and .dark selectors
21
- */
22
- declare function parseThemeFromCSS(cssString: string): CustomTheme | null;
23
-
24
- type StudioLaunchedEventBase = {
25
- name: "studio_launched";
26
- payload: {
27
- embeddingType?: string;
28
- vendorId?: string;
29
- tableCount: number;
30
- };
31
- };
32
- type StudioOperationErrorEventBase = {
33
- name: "studio_operation_error";
34
- payload: {
35
- operation: string;
36
- query: Query | undefined;
37
- error: AdapterError;
38
- };
39
- };
40
- type StudioOperationSuccessEventBase = {
41
- name: "studio_operation_success";
42
- payload: {
43
- operation: string;
44
- query: Query;
45
- error: undefined;
46
- };
47
- };
48
- type StudioOperationEventBase = StudioOperationSuccessEventBase | StudioOperationErrorEventBase;
49
- type StudioEventBase = StudioLaunchedEventBase | StudioOperationEventBase;
50
- type StudioEvent = StudioEventBase & {
51
- eventId: string;
52
- timestamp: string;
53
- };
54
- interface StudioProps {
55
- adapter: Adapter;
56
- onEvent?: (error: StudioEvent) => void;
57
- /**
58
- * Custom theme configuration or CSS string from shadcn
59
- * Supports both parsed theme object and raw CSS string
60
- */
61
- theme?: CustomTheme | string;
62
- }
63
- /**
64
- * Main Studio component that provides database visualization and management
65
- */
66
- declare function Studio(props: StudioProps): react_jsx_runtime.JSX.Element;
67
-
68
- type StateKey = "pageIndex" | "pageSize" | "table" | "sort" | "schema" | "test" | "filter" | "view";
69
- type Exact<A, W> = (A extends unknown ? W extends A ? {
70
- [K in keyof A]: Exact<A[K], W[K]>;
71
- } : W : never) | (A extends string | number | bigint | boolean | [] ? A : never);
72
- declare function keyMap<const Map extends Partial<Record<StateKey, any>>>(keyMap: Exact<Map, Partial<Record<StateKey, any>>>): BrandedKeyMap<Map>;
73
- declare function urlKeys<const Map extends Partial<Record<StateKey, string>>>(urlKeys: Exact<Map, Partial<Record<StateKey, string>>>): BrandedKeyMap<Map>;
74
- declare const _BRAND_SYMBOL: unique symbol;
75
- type BrandedKeyMap<Map> = Map & {
76
- [K in typeof _BRAND_SYMBOL]: never;
77
- };
78
- /**
79
- * @see {@link useQueryStateOriginal}
80
- */
81
- declare function useQueryState<T>(key: StateKey, options: UseQueryStateOptions<T> & {
82
- defaultValue: T;
83
- }): UseQueryStateReturn<NonNullable<ReturnType<typeof options.parse>>, typeof options.defaultValue>;
84
- declare function useQueryState<T>(key: StateKey, options: UseQueryStateOptions<T>): UseQueryStateReturn<NonNullable<ReturnType<typeof options.parse>>, undefined>;
85
- declare function useQueryState(key: StateKey, options: Options & {
86
- defaultValue: string;
87
- }): UseQueryStateReturn<string, typeof options.defaultValue>;
88
- declare function useQueryState(key: StateKey, options: Pick<UseQueryStateOptions<string>, keyof Options>): UseQueryStateReturn<string, undefined>;
89
- declare function useQueryState(key: StateKey): UseQueryStateReturn<string, undefined>;
90
- type UseQueryStatesKeysMap<Map extends Partial<Record<StateKey, any>> = Partial<Record<StateKey, any>>> = {
91
- [Key in keyof Map]: KeyMapValue<Map[Key]>;
92
- };
93
- type KeyMapValue<Type> = Parser<Type> & Options & {
94
- defaultValue?: Type;
95
- };
96
- /**
97
- * @see {@link useQueryStatesOriginal}
98
- */
99
- declare function useQueryStates<KeyMap extends UseQueryStatesKeysMap>(keyMap: BrandedKeyMap<KeyMap>, options?: Partial<UseQueryStatesOptions<KeyMap>>): UseQueryStatesReturn<KeyMap>;
100
-
101
- export { type CustomTheme, type StateKey, Studio, type StudioProps, type ThemeVariables, keyMap, parseThemeFromCSS, urlKeys, useQueryState, useQueryStates };
@@ -1,101 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { A as Adapter, Q as Query, f as AdapterError } from '../query-C7LxjwdN.js';
3
- import { UseQueryStateOptions, UseQueryStateReturn, Options, UseQueryStatesOptions, UseQueryStatesReturn, Parser } from 'nuqs';
4
- export * from 'nuqs';
5
- import 'kysely';
6
-
7
- /**
8
- * Theme variables type - matches shadcn format
9
- */
10
- type ThemeVariables = Record<string, string>;
11
- /**
12
- * Custom theme configuration with light and dark variants
13
- */
14
- interface CustomTheme {
15
- light: ThemeVariables;
16
- dark: ThemeVariables;
17
- }
18
- /**
19
- * Parse CSS variables from shadcn format CSS string
20
- * Handles both :root and .dark selectors
21
- */
22
- declare function parseThemeFromCSS(cssString: string): CustomTheme | null;
23
-
24
- type StudioLaunchedEventBase = {
25
- name: "studio_launched";
26
- payload: {
27
- embeddingType?: string;
28
- vendorId?: string;
29
- tableCount: number;
30
- };
31
- };
32
- type StudioOperationErrorEventBase = {
33
- name: "studio_operation_error";
34
- payload: {
35
- operation: string;
36
- query: Query | undefined;
37
- error: AdapterError;
38
- };
39
- };
40
- type StudioOperationSuccessEventBase = {
41
- name: "studio_operation_success";
42
- payload: {
43
- operation: string;
44
- query: Query;
45
- error: undefined;
46
- };
47
- };
48
- type StudioOperationEventBase = StudioOperationSuccessEventBase | StudioOperationErrorEventBase;
49
- type StudioEventBase = StudioLaunchedEventBase | StudioOperationEventBase;
50
- type StudioEvent = StudioEventBase & {
51
- eventId: string;
52
- timestamp: string;
53
- };
54
- interface StudioProps {
55
- adapter: Adapter;
56
- onEvent?: (error: StudioEvent) => void;
57
- /**
58
- * Custom theme configuration or CSS string from shadcn
59
- * Supports both parsed theme object and raw CSS string
60
- */
61
- theme?: CustomTheme | string;
62
- }
63
- /**
64
- * Main Studio component that provides database visualization and management
65
- */
66
- declare function Studio(props: StudioProps): react_jsx_runtime.JSX.Element;
67
-
68
- type StateKey = "pageIndex" | "pageSize" | "table" | "sort" | "schema" | "test" | "filter" | "view";
69
- type Exact<A, W> = (A extends unknown ? W extends A ? {
70
- [K in keyof A]: Exact<A[K], W[K]>;
71
- } : W : never) | (A extends string | number | bigint | boolean | [] ? A : never);
72
- declare function keyMap<const Map extends Partial<Record<StateKey, any>>>(keyMap: Exact<Map, Partial<Record<StateKey, any>>>): BrandedKeyMap<Map>;
73
- declare function urlKeys<const Map extends Partial<Record<StateKey, string>>>(urlKeys: Exact<Map, Partial<Record<StateKey, string>>>): BrandedKeyMap<Map>;
74
- declare const _BRAND_SYMBOL: unique symbol;
75
- type BrandedKeyMap<Map> = Map & {
76
- [K in typeof _BRAND_SYMBOL]: never;
77
- };
78
- /**
79
- * @see {@link useQueryStateOriginal}
80
- */
81
- declare function useQueryState<T>(key: StateKey, options: UseQueryStateOptions<T> & {
82
- defaultValue: T;
83
- }): UseQueryStateReturn<NonNullable<ReturnType<typeof options.parse>>, typeof options.defaultValue>;
84
- declare function useQueryState<T>(key: StateKey, options: UseQueryStateOptions<T>): UseQueryStateReturn<NonNullable<ReturnType<typeof options.parse>>, undefined>;
85
- declare function useQueryState(key: StateKey, options: Options & {
86
- defaultValue: string;
87
- }): UseQueryStateReturn<string, typeof options.defaultValue>;
88
- declare function useQueryState(key: StateKey, options: Pick<UseQueryStateOptions<string>, keyof Options>): UseQueryStateReturn<string, undefined>;
89
- declare function useQueryState(key: StateKey): UseQueryStateReturn<string, undefined>;
90
- type UseQueryStatesKeysMap<Map extends Partial<Record<StateKey, any>> = Partial<Record<StateKey, any>>> = {
91
- [Key in keyof Map]: KeyMapValue<Map[Key]>;
92
- };
93
- type KeyMapValue<Type> = Parser<Type> & Options & {
94
- defaultValue?: Type;
95
- };
96
- /**
97
- * @see {@link useQueryStatesOriginal}
98
- */
99
- declare function useQueryStates<KeyMap extends UseQueryStatesKeysMap>(keyMap: BrandedKeyMap<KeyMap>, options?: Partial<UseQueryStatesOptions<KeyMap>>): UseQueryStatesReturn<KeyMap>;
100
-
101
- export { type CustomTheme, type StateKey, Studio, type StudioProps, type ThemeVariables, keyMap, parseThemeFromCSS, urlKeys, useQueryState, useQueryStates };