@wp-typia/block-runtime 0.4.3 → 0.4.5
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.
|
@@ -3,7 +3,6 @@ import { type EditorFieldDescriptor, type EditorModelOptions, type ManifestDocum
|
|
|
3
3
|
import { type ValidationResult } from "./validation.js";
|
|
4
4
|
export type { EditorFieldDescriptor, EditorFieldOption, EditorModelOptions, ManifestAttribute, ManifestDocument, } from "./editor.js";
|
|
5
5
|
export type { ValidationResult } from "./validation.js";
|
|
6
|
-
type UnknownRecord = Record<string, unknown>;
|
|
7
6
|
export interface InspectorSelectOption {
|
|
8
7
|
label: string;
|
|
9
8
|
value: string;
|
|
@@ -63,11 +62,11 @@ export interface InspectorComponentMap {
|
|
|
63
62
|
export interface UseEditorFieldsResult {
|
|
64
63
|
fields: EditorFieldDescriptor[];
|
|
65
64
|
fieldMap: Map<string, EditorFieldDescriptor>;
|
|
66
|
-
getBooleanValue: (source:
|
|
65
|
+
getBooleanValue: (source: object, path: string, fallback: boolean) => boolean;
|
|
67
66
|
getField: (path: string) => EditorFieldDescriptor | undefined;
|
|
68
|
-
getNumberValue: (source:
|
|
67
|
+
getNumberValue: (source: object, path: string, fallback: number) => number;
|
|
69
68
|
getSelectOptions: (path: string, labelMap?: Record<string, string>) => InspectorSelectOption[];
|
|
70
|
-
getStringValue: (source:
|
|
69
|
+
getStringValue: (source: object, path: string, fallback: string) => string;
|
|
71
70
|
manualFields: EditorFieldDescriptor[];
|
|
72
71
|
supportedFields: EditorFieldDescriptor[];
|
|
73
72
|
}
|
|
@@ -112,7 +111,7 @@ export interface InspectorFieldOverride {
|
|
|
112
111
|
renderUnsupported?: (context: FieldControlRenderContext) => ReactNode;
|
|
113
112
|
step?: number;
|
|
114
113
|
}
|
|
115
|
-
export interface InspectorFromManifestProps<T extends
|
|
114
|
+
export interface InspectorFromManifestProps<T extends object> {
|
|
116
115
|
attributes: T;
|
|
117
116
|
children?: ReactNode;
|
|
118
117
|
components?: InspectorComponentMap;
|
|
@@ -126,4 +125,4 @@ export interface InspectorFromManifestProps<T extends UnknownRecord> {
|
|
|
126
125
|
export declare function useEditorFields(manifest: ManifestDocument, options?: EditorModelOptions): UseEditorFieldsResult;
|
|
127
126
|
export declare function useTypedAttributeUpdater<T extends object>(attributes: T, setAttributes: (attrs: Partial<T>) => void, validate?: (value: T) => ValidationResult<T>): TypedAttributeUpdater<T>;
|
|
128
127
|
export declare function FieldControl({ components, field, help, label, max, min, onChange, options, render, renderUnsupported, step, value, }: FieldControlProps): import("react/jsx-runtime").JSX.Element | null;
|
|
129
|
-
export declare function InspectorFromManifest<T extends
|
|
128
|
+
export declare function InspectorFromManifest<T extends object>({ attributes, children, components, fieldLookup, fieldOverrides, initialOpen, onChange, paths, title, }: InspectorFromManifestProps<T>): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-typia/block-runtime",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Generated-project runtime and metadata sync helpers for wp-typia",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"import": "./dist/blocks.js",
|
|
17
17
|
"default": "./dist/blocks.js"
|
|
18
18
|
},
|
|
19
|
+
"./schema-core": {
|
|
20
|
+
"types": "./dist/schema-core.d.ts",
|
|
21
|
+
"import": "./dist/schema-core.js",
|
|
22
|
+
"default": "./dist/schema-core.js"
|
|
23
|
+
},
|
|
19
24
|
"./metadata-core": {
|
|
20
25
|
"types": "./dist/metadata-core.d.ts",
|
|
21
26
|
"import": "./dist/metadata-core.js",
|