@ostack.tech/kform-scaffolder 0.31.0 → 0.31.2

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,10 +1,10 @@
1
- import * as React from "react";
1
+ import { type ReactNode } from "react";
2
2
  import { type Scaffolder } from "./scaffolding/scaffold.ts";
3
3
  import { type Schematic } from "./Schematic.ts";
4
4
  import { type SchematicKind } from "./SchematicKind.ts";
5
5
  export interface SchematicBuilderProps {
6
6
  name?: string;
7
- title?: React.ReactNode;
7
+ title?: ReactNode;
8
8
  basePath?: string;
9
9
  basePackage?: string;
10
10
  baseDir?: string | ((schematic: Schematic) => string);
@@ -13,7 +13,7 @@ export interface SchematicBuilderProps {
13
13
  schematicKinds?: SchematicKind[];
14
14
  scaffolders?: Scaffolder<any>[] | ((schematic: Schematic) => Scaffolder<any>[]);
15
15
  scaffoldingData?: Record<string, any> | ((schematic: Schematic) => Record<string, any>);
16
- actions?: React.ReactNode;
17
- configs?: React.ReactNode;
16
+ actions?: ReactNode;
17
+ configs?: ReactNode;
18
18
  }
19
19
  export declare function SchematicBuilder({ name, title, basePath, basePackage, baseDir, defaultRootClassPackage, defaultRootClassName, schematicKinds, scaffolders, scaffoldingData, actions, configs, }: SchematicBuilderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
1
+ import { type ReactNode } from "react";
2
2
  export interface SchematicBuilderConfigProps {
3
- children?: React.ReactNode;
3
+ children?: ReactNode;
4
4
  }
5
5
  export declare function SchematicBuilderConfig({ children, }: SchematicBuilderConfigProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,11 @@
1
- import * as React from "react";
1
+ import { type ReactNode, type RefObject } from "react";
2
2
  import { type Scaffolder } from "./scaffolding/scaffold.ts";
3
3
  import { type Schematic } from "./Schematic.ts";
4
4
  import { type SchematicKind } from "./SchematicKind.ts";
5
5
  export interface DraggedSchematic {
6
6
  id: string;
7
7
  type: string;
8
- node: React.ReactNode;
8
+ node: ReactNode;
9
9
  }
10
10
  export interface SchematicBuilderContextValue {
11
11
  name: string;
@@ -25,7 +25,7 @@ export interface SchematicBuilderContextValue {
25
25
  draggedSchematic: DraggedSchematic | null;
26
26
  disableDrop?: boolean;
27
27
  ignoreDrop?: boolean;
28
- latestSchematicFileHandleRef: React.RefObject<FileSystemFileHandle | null>;
28
+ latestSchematicFileHandleRef: RefObject<FileSystemFileHandle | null>;
29
29
  }
30
- export declare const SchematicBuilderContext: React.Context<SchematicBuilderContextValue | null>;
30
+ export declare const SchematicBuilderContext: import("react").Context<SchematicBuilderContextValue | null>;
31
31
  export declare function useSchematicBuilderContext(): SchematicBuilderContextValue;
@@ -1,4 +1,4 @@
1
- import type * as React from "react";
1
+ import { type ComponentType } from "react";
2
2
  import { type KtData } from "./scaffolding/kotlin/KtData.ts";
3
3
  import { type Schematic } from "./Schematic.ts";
4
4
  export declare const NULLABLE_SCHEMA = "tech.ostack.kform.schemas.NullableSchema";
@@ -13,7 +13,7 @@ export interface SchematicKind {
13
13
  nullable?: boolean;
14
14
  defaultValue: string | ((schematic: Schematic, data: KtData) => string);
15
15
  propertyAnnotations?: string | string[] | ((schematic: Schematic, data: KtData) => string | string[] | undefined);
16
- builder?: React.ComponentType;
16
+ builder?: ComponentType;
17
17
  initChildren?: (childName: string) => Schematic[];
18
18
  defaultPackageSuffix?: (childName: string) => string;
19
19
  defaultName?: (childName: string) => string;
package/types/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import "./index.css";
2
1
  export * from "./Schematic.ts";
3
2
  export * from "./SchematicBuilder.tsx";
4
3
  export * from "./SchematicBuilderContext.ts";
package/types/main.d.ts CHANGED
@@ -1 +1 @@
1
- import "./index";
1
+ import "./index.css";
@@ -1,6 +1,6 @@
1
- import type * as React from "react";
1
+ import { type KeyboardEvent, type PointerEvent } from "react";
2
2
  /** Properties used to prevent an element from being dragged. */
3
3
  export declare const preventDrag: {
4
- onKeyDown: (evt: React.KeyboardEvent) => void;
5
- onPointerDown: (evt: React.PointerEvent) => void;
4
+ onKeyDown: (evt: KeyboardEvent) => void;
5
+ onPointerDown: (evt: PointerEvent) => void;
6
6
  };
@@ -1,3 +1,3 @@
1
- import * as React from "react";
1
+ import { useLayoutEffect as reactUseLayoutEffect } from "react";
2
2
  /** `useLayoutEffect` hook which performs a noop when run on the server. */
3
- export declare const useLayoutEffect: typeof React.useLayoutEffect;
3
+ export declare const useLayoutEffect: typeof reactUseLayoutEffect;