@tailorkit/react 0.1.0-beta.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/LICENSE +674 -0
- package/dist/components/context.d.ts +11 -0
- package/dist/components/context.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/render.d.ts +20 -0
- package/dist/components/render.d.ts.map +1 -0
- package/dist/components/root.d.ts +11 -0
- package/dist/components/root.d.ts.map +1 -0
- package/dist/hooks/use-apps.d.ts +13 -0
- package/dist/hooks/use-apps.d.ts.map +1 -0
- package/dist/hooks/use-current-screen.d.ts +24 -0
- package/dist/hooks/use-current-screen.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +920 -0
- package/dist/node-store.d.ts +17 -0
- package/dist/node-store.d.ts.map +1 -0
- package/dist/primitives.d.ts +38 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/remote-context.d.ts +9 -0
- package/dist/remote-context.d.ts.map +1 -0
- package/dist/remote-view.d.ts +15 -0
- package/dist/remote-view.d.ts.map +1 -0
- package/dist/tailor-kit.d.ts +117 -0
- package/dist/tailor-kit.d.ts.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RemoteNode } from "@tailorkit/sandbox/protocol";
|
|
2
|
+
type Listener = () => void;
|
|
3
|
+
export declare class NodeStore {
|
|
4
|
+
private nodes;
|
|
5
|
+
private signatures;
|
|
6
|
+
private nodeListeners;
|
|
7
|
+
private rootListeners;
|
|
8
|
+
private rootId;
|
|
9
|
+
clear(): void;
|
|
10
|
+
setSnapshot(tree: RemoteNode): void;
|
|
11
|
+
getRootId(): string | null;
|
|
12
|
+
getNode(id: string): RemoteNode | null;
|
|
13
|
+
subscribe(id: string, listener: Listener): () => void;
|
|
14
|
+
subscribeRoot(listener: Listener): () => void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=node-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-store.d.ts","sourceRoot":"","sources":["../src/node-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AA6B3B,qBAAa,SAAS;IACpB,OAAO,CAAC,KAAK,CAAiC;IAC9C,OAAO,CAAC,UAAU,CAA6B;IAC/C,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,MAAM,CAAuB;IAErC,KAAK,IAAI,IAAI,CAsBZ;IAED,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAuClC;IAED,SAAS,IAAI,MAAM,GAAG,IAAI,CAEzB;IAED,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAErC;IAED,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAapD;IAED,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAG5C;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import type { TailorKitTheme } from "@tailorkit/core/schema";
|
|
3
|
+
type PrimitiveProps = Record<string, unknown>;
|
|
4
|
+
interface PrimitiveThemeContextValue {
|
|
5
|
+
screenId: string;
|
|
6
|
+
theme: TailorKitTheme;
|
|
7
|
+
}
|
|
8
|
+
export declare const PrimitiveThemeContext: import("react").Context<PrimitiveThemeContextValue | null>;
|
|
9
|
+
export declare const buildThemeCss: (screenId: string, theme: TailorKitTheme) => string;
|
|
10
|
+
export declare const primitives: {
|
|
11
|
+
readonly Box: ({ props, slots }: {
|
|
12
|
+
props: PrimitiveProps;
|
|
13
|
+
slots: {
|
|
14
|
+
default?: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
}) => import("react").JSX.Element;
|
|
17
|
+
readonly Flex: ({ props, slots }: {
|
|
18
|
+
props: PrimitiveProps;
|
|
19
|
+
slots: {
|
|
20
|
+
default?: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
}) => import("react").JSX.Element;
|
|
23
|
+
readonly Grid: ({ props, slots }: {
|
|
24
|
+
props: PrimitiveProps;
|
|
25
|
+
slots: {
|
|
26
|
+
default?: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
}) => import("react").JSX.Element;
|
|
29
|
+
readonly Inline: ({ props, slots }: {
|
|
30
|
+
props: PrimitiveProps;
|
|
31
|
+
slots: {
|
|
32
|
+
default?: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
}) => import("react").JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
export type PrimitiveStyle = CSSProperties;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/primitives.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAK7D,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE9C,UAAU,0BAA0B;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,cAAc,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,4DAAyD,CAAC;AA4K5F,eAAO,MAAM,aAAa,aAAc,MAAM,SAAS,cAAc,KAAG,MAYvE,CAAC;AAuCF,eAAO,MAAM,UAAU;aACrB,GAAG,qBAAqB;QAAE,KAAK,EAAE,cAAc,CAAC;QAAC,KAAK,EAAE;YAAE,OAAO,CAAC,EAAE,SAAS,CAAA;SAAE,CAAA;KAAE;aAKjF,IAAI,qBAAqB;QAAE,KAAK,EAAE,cAAc,CAAC;QAAC,KAAK,EAAE;YAAE,OAAO,CAAC,EAAE,SAAS,CAAA;SAAE,CAAA;KAAE;aAKlF,IAAI,qBAAqB;QAAE,KAAK,EAAE,cAAc,CAAC;QAAC,KAAK,EAAE;YAAE,OAAO,CAAC,EAAE,SAAS,CAAA;SAAE,CAAA;KAAE;aAKlF,MAAM,qBAAqB;QAAE,KAAK,EAAE,cAAc,CAAC;QAAC,KAAK,EAAE;YAAE,OAAO,CAAC,EAAE,SAAS,CAAA;SAAE,CAAA;KAAE;CAK5E,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HostToWorkerPayload } from "@tailorkit/sandbox/protocol";
|
|
2
|
+
import type { NodeStore } from "./node-store";
|
|
3
|
+
export interface RemoteViewContext {
|
|
4
|
+
components: Record<string, unknown>;
|
|
5
|
+
dispatch: (payload: HostToWorkerPayload) => void;
|
|
6
|
+
store: NodeStore;
|
|
7
|
+
}
|
|
8
|
+
export declare const RemoteUIContext: import("react").Context<RemoteViewContext | null>;
|
|
9
|
+
//# sourceMappingURL=remote-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-context.d.ts","sourceRoot":"","sources":["../src/remote-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACjD,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,mDAAgD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface RemoteViewHostProps {
|
|
3
|
+
appUrl: string | URL;
|
|
4
|
+
components: Record<string, unknown>;
|
|
5
|
+
createIframe?: () => HTMLIFrameElement;
|
|
6
|
+
props?: Record<string, unknown>;
|
|
7
|
+
runtimeUrl?: string | URL;
|
|
8
|
+
}
|
|
9
|
+
export declare function RemoteViewHost({ appUrl, components, createIframe, props, runtimeUrl, }: RemoteViewHostProps): ReactNode;
|
|
10
|
+
interface RemoteViewProps {
|
|
11
|
+
nodeId: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const RemoteView: import("react").MemoExoticComponent<({ nodeId }: RemoteViewProps) => ReactNode>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=remote-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-view.d.ts","sourceRoot":"","sources":["../src/remote-view.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAqCvC,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,iBAAiB,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAC3B;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,UAAU,EACV,YAAY,EACZ,KAAK,EACL,UAAU,GACX,EAAE,mBAAmB,GAAG,SAAS,CA8EjC;AAqDD,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,mDAAwC,eAAe,KAAG,SAAS,CAgCxF,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TailorKitSchemaSpecType } from "@tailorkit/core/spec";
|
|
3
|
+
import type { TailorKitTheme, CallbackMap, ComponentDefinition, ComponentProps, ComponentSlots, Schema, ScreenDefinition, TailorKitSchema } from "@tailorkit/core/schema";
|
|
4
|
+
import type { primitives } from "./primitives";
|
|
5
|
+
import { Root } from "./components";
|
|
6
|
+
import type { UseAppsResult } from "./hooks/use-apps";
|
|
7
|
+
import type { CurrentScreenOptions, ScreenName } from "./hooks/use-current-screen";
|
|
8
|
+
type ReactComponentSlots<TComponent> = {
|
|
9
|
+
[TSlot in keyof ComponentSlots<TComponent>]: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
type AnyComponentDefinition = ComponentDefinition<Schema | undefined, CallbackMap, readonly string[] | undefined>;
|
|
12
|
+
type ComponentRenderer<TComponent extends AnyComponentDefinition> = (args: {
|
|
13
|
+
props: ComponentProps<TComponent>;
|
|
14
|
+
slots: ReactComponentSlots<TComponent>;
|
|
15
|
+
}) => ReactNode;
|
|
16
|
+
type ComponentRenderers<TComponents extends Record<string, AnyComponentDefinition>> = {
|
|
17
|
+
[TName in keyof TComponents]?: ComponentRenderer<TComponents[TName]>;
|
|
18
|
+
};
|
|
19
|
+
type CompleteComponentRenderers<TComponents extends Record<string, AnyComponentDefinition>> = {
|
|
20
|
+
[TName in keyof TComponents]-?: ComponentRenderer<TComponents[TName]>;
|
|
21
|
+
};
|
|
22
|
+
export interface TailorKitApp {
|
|
23
|
+
clientPath?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
id: string;
|
|
26
|
+
projectId?: string;
|
|
27
|
+
currentDeployment?: {
|
|
28
|
+
id: string;
|
|
29
|
+
} | null;
|
|
30
|
+
name?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface TailorKitAppsSnapshot {
|
|
33
|
+
apps: TailorKitApp[];
|
|
34
|
+
error: Error | null;
|
|
35
|
+
status: "error" | "idle" | "loading" | "ready";
|
|
36
|
+
}
|
|
37
|
+
interface TailorKitMetaSnapshot {
|
|
38
|
+
assetsBaseUrl: string | null;
|
|
39
|
+
error: Error | null;
|
|
40
|
+
schema: TailorKitSchemaSpecType | null;
|
|
41
|
+
status: "error" | "idle" | "loading" | "ready";
|
|
42
|
+
}
|
|
43
|
+
export interface CurrentScreenEntry {
|
|
44
|
+
context: unknown;
|
|
45
|
+
id: symbol;
|
|
46
|
+
order: number;
|
|
47
|
+
screen: string;
|
|
48
|
+
status: "error" | "loading" | "ready";
|
|
49
|
+
}
|
|
50
|
+
interface AppViewBaseProps {
|
|
51
|
+
app: TailorKitApp;
|
|
52
|
+
createIframe?: () => HTMLIFrameElement;
|
|
53
|
+
fallback?: ReactNode;
|
|
54
|
+
runtimeUrl?: string | URL;
|
|
55
|
+
}
|
|
56
|
+
type AppViewScreenProps<TScreens extends Record<string, ScreenDefinition>, TScreen extends ScreenName<TScreens> = ScreenName<TScreens>> = [ScreenName<TScreens>] extends [never] ? {
|
|
57
|
+
context?: never;
|
|
58
|
+
screen?: never;
|
|
59
|
+
status?: never;
|
|
60
|
+
} : {
|
|
61
|
+
context?: never;
|
|
62
|
+
screen?: never;
|
|
63
|
+
status?: never;
|
|
64
|
+
} | CurrentScreenOptions<TScreens, TScreen>;
|
|
65
|
+
export type AppViewProps<TScreens extends Record<string, ScreenDefinition>, TScreen extends ScreenName<TScreens> = ScreenName<TScreens>> = AppViewBaseProps & AppViewScreenProps<TScreens, TScreen>;
|
|
66
|
+
export interface TailorKitInstance<TScreens extends Record<string, ScreenDefinition> = Record<string, never>> {
|
|
67
|
+
AppView: (props: AppViewProps<TScreens>) => ReactNode;
|
|
68
|
+
Root: (props: Omit<Parameters<typeof Root>[0], "tailor">) => ReactNode;
|
|
69
|
+
getApp: (id: string) => TailorKitApp | undefined;
|
|
70
|
+
getApps: () => TailorKitApp[];
|
|
71
|
+
useApps: () => UseAppsResult;
|
|
72
|
+
useCurrentScreen: <TScreen extends ScreenName<TScreens>>(options: CurrentScreenOptions<TScreens, TScreen>) => void;
|
|
73
|
+
}
|
|
74
|
+
type PrimitiveRenderers = typeof primitives;
|
|
75
|
+
type CustomComponentRenderers<TComponents extends Record<string, AnyComponentDefinition>> = {
|
|
76
|
+
[TName in Exclude<keyof TComponents, keyof PrimitiveRenderers>]?: ComponentRenderer<TComponents[TName]>;
|
|
77
|
+
};
|
|
78
|
+
export declare function components<TComponents extends Record<string, AnyComponentDefinition>>(_schema: TailorKitSchema<TComponents, Record<string, ScreenDefinition>>, customComponents: CustomComponentRenderers<TComponents>): ComponentRenderers<TComponents>;
|
|
79
|
+
interface TailorKitServerShape {
|
|
80
|
+
$internal: {
|
|
81
|
+
schema: {
|
|
82
|
+
components: Record<string, unknown>;
|
|
83
|
+
screens: Record<string, unknown>;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
type ServerComponentMap<TTailor extends TailorKitServerShape> = TTailor["$internal"]["schema"]["components"];
|
|
88
|
+
type ServerComponents<TTailor extends TailorKitServerShape> = {
|
|
89
|
+
[TName in keyof ServerComponentMap<TTailor>]: ServerComponentMap<TTailor>[TName] extends AnyComponentDefinition ? ServerComponentMap<TTailor>[TName] : never;
|
|
90
|
+
};
|
|
91
|
+
type ServerScreenMap<TTailor extends TailorKitServerShape> = TTailor["$internal"]["schema"]["screens"];
|
|
92
|
+
type ServerScreens<TTailor extends TailorKitServerShape> = {
|
|
93
|
+
[TName in keyof ServerScreenMap<TTailor>]: ServerScreenMap<TTailor>[TName] extends ScreenDefinition ? ServerScreenMap<TTailor>[TName] : never;
|
|
94
|
+
};
|
|
95
|
+
export declare function createTailorKitClient<TTailor extends TailorKitServerShape>(options: {
|
|
96
|
+
baseUrl: string | URL;
|
|
97
|
+
components?: CompleteComponentRenderers<ServerComponents<TTailor>>;
|
|
98
|
+
theme?: TailorKitTheme;
|
|
99
|
+
}): TailorKitInstance<ServerScreens<TTailor>>;
|
|
100
|
+
export type TailorKitStore = ReturnType<typeof createTailorKitStore>;
|
|
101
|
+
declare function createTailorKitStore(baseUrlInput: string | URL): {
|
|
102
|
+
baseUrl: URL;
|
|
103
|
+
fetchApps: (options?: {
|
|
104
|
+
force?: boolean;
|
|
105
|
+
}) => Promise<void>;
|
|
106
|
+
fetchMeta: () => Promise<void>;
|
|
107
|
+
getApp: (id: string) => TailorKitApp | undefined;
|
|
108
|
+
getApps: () => TailorKitApp[];
|
|
109
|
+
getAppsSnapshot: () => TailorKitAppsSnapshot;
|
|
110
|
+
getCurrentScreen: () => CurrentScreenEntry | null;
|
|
111
|
+
getMetaSnapshot: () => TailorKitMetaSnapshot;
|
|
112
|
+
registerScreen: (entry: Omit<CurrentScreenEntry, "order">) => void;
|
|
113
|
+
subscribe: (listener: () => void) => (() => void);
|
|
114
|
+
unregisterScreen: (id: symbol) => void;
|
|
115
|
+
};
|
|
116
|
+
export type { CurrentScreenOptions } from "./hooks/use-current-screen";
|
|
117
|
+
//# sourceMappingURL=tailor-kit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailor-kit.d.ts","sourceRoot":"","sources":["../src/tailor-kit.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,MAAM,EACN,gBAAgB,EAChB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAInF,KAAK,mBAAmB,CAA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C,CAAC,CAE5C;AA2HD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE,iBAAS,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG;;0BA8D/B;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAQ,OAAO,CAAC,IAAI,CAAC;qBAwC9C,OAAO,CAAC,IAAI,CAAC;iBAoCf,MAAM,KAAG,YAAY,GAAG,SAAS;mBAEjC,YAAY,EAAE;2BACN,qBAAqB;4BACpB,kBAAkB,GAAG,IAAI;2BAC1B,qBAAqB;4BAClB,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,KAAG,IAAI;0BAY1C,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;2BAMxB,MAAM,KAAG,IAAI;EAMvC;AAMD,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tailorkit/react",
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
|
+
"license": "AGPL-3.0-only",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/AlfieJones/tailorkit.git",
|
|
8
|
+
"directory": "packages/react"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"imports": {
|
|
15
|
+
"#*": [
|
|
16
|
+
"./src/*",
|
|
17
|
+
"./src/*.ts",
|
|
18
|
+
"./src/*.tsx",
|
|
19
|
+
"./src/*/index.ts",
|
|
20
|
+
"./src/*/index.tsx"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"development": "./src/index.ts",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@floating-ui/react-dom": "^2.1.9",
|
|
35
|
+
"@standard-schema/spec": "^1.1.0",
|
|
36
|
+
"@tailorkit/core": "0.1.0-beta.0",
|
|
37
|
+
"@tailorkit/sandbox": "0.1.0-beta.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@tailorkit/config": "0.0.0",
|
|
41
|
+
"@testing-library/react": "^16.3.2",
|
|
42
|
+
"@types/node": "26.2.0",
|
|
43
|
+
"@types/react": "^19.2.18",
|
|
44
|
+
"happy-dom": "^20.11.6",
|
|
45
|
+
"react": "^19.2.8",
|
|
46
|
+
"react-dom": "^19.2.8",
|
|
47
|
+
"tsup": "^8.5.1",
|
|
48
|
+
"typescript": "^7.0.2",
|
|
49
|
+
"vitest": "^4.1.11"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"react": ">=19.2.6"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsup src/index.ts --format esm --target node20 --clean && tsc -p tsconfig.build.json",
|
|
56
|
+
"check-types": "tsc --noEmit",
|
|
57
|
+
"test": "vitest run"
|
|
58
|
+
}
|
|
59
|
+
}
|