@ostack.tech/kform-scaffolder 0.31.0 → 0.31.1
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/kform-scaffolder +1 -1
- package/ostack-kform-scaffolder.js +16 -16
- package/ostack-kform-scaffolder.js.map +1 -1
- package/package.json +4 -4
- package/types/SchematicBuilder.d.ts +4 -4
- package/types/SchematicBuilderConfig.d.ts +2 -2
- package/types/SchematicBuilderContext.d.ts +4 -4
- package/types/SchematicKind.d.ts +2 -2
- package/types/util/preventDrag.d.ts +3 -3
- package/types/util/useLayoutEffect.d.ts +2 -2
- package/ostack-kform-scaffolder.cjs +0 -1695
- package/ostack-kform-scaffolder.cjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
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?:
|
|
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?:
|
|
17
|
-
configs?:
|
|
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
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
export interface SchematicBuilderConfigProps {
|
|
3
|
-
children?:
|
|
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
|
|
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:
|
|
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:
|
|
28
|
+
latestSchematicFileHandleRef: RefObject<FileSystemFileHandle | null>;
|
|
29
29
|
}
|
|
30
|
-
export declare const SchematicBuilderContext:
|
|
30
|
+
export declare const SchematicBuilderContext: import("react").Context<SchematicBuilderContextValue | null>;
|
|
31
31
|
export declare function useSchematicBuilderContext(): SchematicBuilderContextValue;
|
package/types/SchematicKind.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
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?:
|
|
16
|
+
builder?: ComponentType;
|
|
17
17
|
initChildren?: (childName: string) => Schematic[];
|
|
18
18
|
defaultPackageSuffix?: (childName: string) => string;
|
|
19
19
|
defaultName?: (childName: string) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
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:
|
|
5
|
-
onPointerDown: (evt:
|
|
4
|
+
onKeyDown: (evt: KeyboardEvent) => void;
|
|
5
|
+
onPointerDown: (evt: PointerEvent) => void;
|
|
6
6
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
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
|
|
3
|
+
export declare const useLayoutEffect: typeof reactUseLayoutEffect;
|