mokkun 0.1.5 → 0.2.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/README.md +18 -6
- package/bin/cli.mjs +6 -6
- package/bin/viewer.html +78 -3
- package/dist/example.html +225 -0
- package/dist/mokkun.css +1 -1
- package/dist/mokkun.esm.js +14476 -9626
- package/dist/mokkun.esm.js.map +1 -1
- package/dist/mokkun.js +761 -363
- package/dist/mokkun.js.map +1 -1
- package/dist/types/lib.d.ts +109 -0
- package/dist/types/loader/file-loader.d.ts +118 -0
- package/dist/types/loader/index.d.ts +4 -0
- package/dist/types/parser/index.d.ts +5 -0
- package/dist/types/parser/key-normalizer.d.ts +24 -0
- package/dist/types/parser/v2/compile-expand.d.ts +23 -0
- package/dist/types/parser/v2/compile-field.d.ts +28 -0
- package/dist/types/parser/v2/compile-section.d.ts +6 -0
- package/dist/types/parser/v2/compile-v2.d.ts +14 -0
- package/dist/types/parser/v2/compile-warnings.d.ts +17 -0
- package/dist/types/parser/v2/file-spec.d.ts +24 -0
- package/dist/types/parser/v2/index.d.ts +5 -0
- package/dist/types/parser/v2/iso-date.d.ts +10 -0
- package/dist/types/parser/v2/parse-v2.d.ts +24 -0
- package/dist/types/parser/v2/validate-action.d.ts +11 -0
- package/dist/types/parser/v2/validate-app.d.ts +9 -0
- package/dist/types/parser/v2/validate-context.d.ts +41 -0
- package/dist/types/parser/v2/validate-field.d.ts +17 -0
- package/dist/types/parser/v2/validate-keys.d.ts +29 -0
- package/dist/types/parser/v2/validate-list.d.ts +5 -0
- package/dist/types/parser/v2/validate-v2.d.ts +6 -0
- package/dist/types/parser/v2/validate-view.d.ts +6 -0
- package/dist/types/parser/yaml-parser.d.ts +68 -0
- package/dist/types/renderer/action-handler.d.ts +76 -0
- package/dist/types/renderer/components/accordion-panel.d.ts +144 -0
- package/dist/types/renderer/components/action-buttons.d.ts +183 -0
- package/dist/types/renderer/components/alert-banner.d.ts +43 -0
- package/dist/types/renderer/components/app-header.d.ts +277 -0
- package/dist/types/renderer/components/app-navi.d.ts +167 -0
- package/dist/types/renderer/components/badge.d.ts +134 -0
- package/dist/types/renderer/components/browser.d.ts +134 -0
- package/dist/types/renderer/components/calendar.d.ts +198 -0
- package/dist/types/renderer/components/checkbox.d.ts +132 -0
- package/dist/types/renderer/components/chip.d.ts +120 -0
- package/dist/types/renderer/components/combobox.d.ts +217 -0
- package/dist/types/renderer/components/data-table.d.ts +186 -0
- package/dist/types/renderer/components/date-range-picker.d.ts +203 -0
- package/dist/types/renderer/components/definition-list.d.ts +165 -0
- package/dist/types/renderer/components/delete-confirm-dialog.d.ts +151 -0
- package/dist/types/renderer/components/dialog/action-dialog.d.ts +61 -0
- package/dist/types/renderer/components/dialog/base-dialog.d.ts +125 -0
- package/dist/types/renderer/components/dialog/dialog-types.d.ts +96 -0
- package/dist/types/renderer/components/disclosure.d.ts +118 -0
- package/dist/types/renderer/components/dropdown.d.ts +220 -0
- package/dist/types/renderer/components/duration-input.d.ts +154 -0
- package/dist/types/renderer/components/duration-picker.d.ts +108 -0
- package/dist/types/renderer/components/field-renderer.d.ts +22 -0
- package/dist/types/renderer/components/float-area.d.ts +196 -0
- package/dist/types/renderer/components/form-fields.d.ts +94 -0
- package/dist/types/renderer/components/form-section.d.ts +118 -0
- package/dist/types/renderer/components/google-map-embed.d.ts +88 -0
- package/dist/types/renderer/components/heading.d.ts +119 -0
- package/dist/types/renderer/components/image-uploader.d.ts +271 -0
- package/dist/types/renderer/components/index.d.ts +48 -0
- package/dist/types/renderer/components/information-panel.d.ts +139 -0
- package/dist/types/renderer/components/input.d.ts +222 -0
- package/dist/types/renderer/components/layout.d.ts +71 -0
- package/dist/types/renderer/components/line-clamp.d.ts +170 -0
- package/dist/types/renderer/components/loader.d.ts +104 -0
- package/dist/types/renderer/components/notification-bar.d.ts +251 -0
- package/dist/types/renderer/components/pagination.d.ts +167 -0
- package/dist/types/renderer/components/photo-manager-renderer.d.ts +9 -0
- package/dist/types/renderer/components/radio-button-panel.d.ts +152 -0
- package/dist/types/renderer/components/radio.d.ts +117 -0
- package/dist/types/renderer/components/repeater.d.ts +116 -0
- package/dist/types/renderer/components/response-message.d.ts +180 -0
- package/dist/types/renderer/components/search-input.d.ts +198 -0
- package/dist/types/renderer/components/section-nav.d.ts +151 -0
- package/dist/types/renderer/components/segmented-control.d.ts +143 -0
- package/dist/types/renderer/components/select.d.ts +98 -0
- package/dist/types/renderer/components/status-label.d.ts +146 -0
- package/dist/types/renderer/components/stepper.d.ts +123 -0
- package/dist/types/renderer/components/tabs.d.ts +185 -0
- package/dist/types/renderer/components/textarea.d.ts +173 -0
- package/dist/types/renderer/components/timeline.d.ts +146 -0
- package/dist/types/renderer/components/toggle.d.ts +109 -0
- package/dist/types/renderer/components/tooltip.d.ts +158 -0
- package/dist/types/renderer/components/wizard.d.ts +118 -0
- package/dist/types/renderer/layouts/index.d.ts +5 -0
- package/dist/types/renderer/layouts/shell.d.ts +7 -0
- package/dist/types/renderer/layouts/types.d.ts +34 -0
- package/dist/types/renderer/screen-renderer.d.ts +57 -0
- package/dist/types/renderer/utils/dom.d.ts +29 -0
- package/dist/types/renderer/utils/dummy-data.d.ts +13 -0
- package/dist/types/renderer/utils/field-helpers.d.ts +90 -0
- package/dist/types/renderer/utils/icons.d.ts +13 -0
- package/dist/types/renderer/utils/index.d.ts +6 -0
- package/dist/types/renderer-v2/actions.d.ts +30 -0
- package/dist/types/renderer-v2/app-shell.d.ts +15 -0
- package/dist/types/renderer-v2/condition.d.ts +19 -0
- package/dist/types/renderer-v2/context.d.ts +37 -0
- package/dist/types/renderer-v2/fields/choice.d.ts +12 -0
- package/dist/types/renderer-v2/fields/control-label.d.ts +57 -0
- package/dist/types/renderer-v2/fields/date.d.ts +6 -0
- package/dist/types/renderer-v2/fields/display.d.ts +22 -0
- package/dist/types/renderer-v2/fields/file-support.d.ts +15 -0
- package/dist/types/renderer-v2/fields/file.d.ts +9 -0
- package/dist/types/renderer-v2/fields/index.d.ts +20 -0
- package/dist/types/renderer-v2/fields/select.d.ts +17 -0
- package/dist/types/renderer-v2/fields/text.d.ts +26 -0
- package/dist/types/renderer-v2/fields/textarea.d.ts +5 -0
- package/dist/types/renderer-v2/fields/toggle.d.ts +6 -0
- package/dist/types/renderer-v2/icons.d.ts +35 -0
- package/dist/types/renderer-v2/index.d.ts +45 -0
- package/dist/types/renderer-v2/list-cells.d.ts +6 -0
- package/dist/types/renderer-v2/list-data.d.ts +53 -0
- package/dist/types/renderer-v2/mount-parts.d.ts +19 -0
- package/dist/types/renderer-v2/mount-repeat.d.ts +8 -0
- package/dist/types/renderer-v2/mount-section.d.ts +10 -0
- package/dist/types/renderer-v2/mount-visibility.d.ts +13 -0
- package/dist/types/renderer-v2/mount.d.ts +9 -0
- package/dist/types/renderer-v2/role.d.ts +15 -0
- package/dist/types/renderer-v2/section-fields.d.ts +11 -0
- package/dist/types/renderer-v2/section-list.d.ts +8 -0
- package/dist/types/renderer-v2/section-readonly.d.ts +8 -0
- package/dist/types/renderer-v2/section.d.ts +15 -0
- package/dist/types/renderer-v2/styles.d.ts +13 -0
- package/dist/types/renderer-v2/util.d.ts +28 -0
- package/dist/types/renderer-v2/view-state.d.ts +25 -0
- package/dist/types/renderer-v2/view.d.ts +8 -0
- package/dist/types/theme/index.d.ts +6 -0
- package/dist/types/theme/theme-manager.d.ts +102 -0
- package/dist/types/types/field-renderable.d.ts +40 -0
- package/dist/types/types/index.d.ts +7 -0
- package/dist/types/types/schema-v2.d.ts +270 -0
- package/dist/types/types/schema.d.ts +1712 -0
- package/dist/types/types/theme.d.ts +111 -0
- package/package.json +3 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mokkun Library Entry Point
|
|
3
|
+
* YAML-based presentation and form builder
|
|
4
|
+
*/
|
|
5
|
+
import './style.css';
|
|
6
|
+
import { parseYaml, parseYamlV2, parseV2Document, isV2Document, getScreen, getScreenNames, findFieldById } from './parser';
|
|
7
|
+
import { mountViewV2, renderViewV2, type V2Controller, type V2Callbacks, type V2ViewState } from './renderer-v2';
|
|
8
|
+
import { compileV2Warnings } from './parser/v2/compile-warnings';
|
|
9
|
+
import type { MokkunSchema, ScreenDefinition, BuiltInThemeId } from './types';
|
|
10
|
+
import type { MokkunV2Schema } from './types/schema-v2';
|
|
11
|
+
/**
|
|
12
|
+
* Mokkun initialization options
|
|
13
|
+
*/
|
|
14
|
+
export interface MokkunInitOptions {
|
|
15
|
+
/** Container selector or element */
|
|
16
|
+
container: string | HTMLElement;
|
|
17
|
+
/** URL to YAML file */
|
|
18
|
+
yamlUrl?: string;
|
|
19
|
+
/** Inline YAML content */
|
|
20
|
+
yamlContent?: string;
|
|
21
|
+
/** Initial theme ('light' | 'dark') */
|
|
22
|
+
theme?: BuiltInThemeId | string;
|
|
23
|
+
/** v2 文書で、画面遷移時に location.hash も書き換える(既定 false) */
|
|
24
|
+
syncHash?: boolean;
|
|
25
|
+
/** Initial screen to display */
|
|
26
|
+
initialScreen?: string;
|
|
27
|
+
/** v2 文書: 現在のロール(app.roles の値)。ロール外の操作・ナビ・通知を出さない。未指定は全ロール分を表示 */
|
|
28
|
+
role?: string;
|
|
29
|
+
/** v2 文書: 最初の画面の状態(normal / success / error / empty / loading)。既定 normal(状態バナーなし) */
|
|
30
|
+
initialState?: V2ViewState;
|
|
31
|
+
/** Callback when ready */
|
|
32
|
+
onReady?: (instance: MokkunInstance) => void;
|
|
33
|
+
/** Callback on error */
|
|
34
|
+
onError?: (error: Error) => void;
|
|
35
|
+
/** Callback when navigating between screens */
|
|
36
|
+
onNavigate?: (fromScreen: string, toScreen: string) => void;
|
|
37
|
+
/** Callback when form is submitted */
|
|
38
|
+
onSubmit?: (screenName: string, formData: Record<string, unknown>) => void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Mokkun instance returned by init()
|
|
42
|
+
*/
|
|
43
|
+
export interface MokkunInstance {
|
|
44
|
+
/** Current schema(v2 文書のときは null。schemaV2 を使う) */
|
|
45
|
+
readonly schema: MokkunSchema | null;
|
|
46
|
+
/** Current v2 schema(v1 文書のときは null) */
|
|
47
|
+
readonly schemaV2: MokkunV2Schema | null;
|
|
48
|
+
/** Current screen name */
|
|
49
|
+
readonly currentScreen: string | null;
|
|
50
|
+
/** Navigate to a screen */
|
|
51
|
+
showScreen: (screenName: string) => void;
|
|
52
|
+
/** v2 文書: 現在のロール。変更すると現在の画面を描き直す(undefined は全ロール) */
|
|
53
|
+
setRole: (role: string | undefined) => void;
|
|
54
|
+
/** v2 文書: 現在の画面の状態。変更すると描き直す */
|
|
55
|
+
setState: (viewState: V2ViewState) => void;
|
|
56
|
+
/** v2 文書: 現在の画面で選べる状態(normal は常に。success / error / empty / loading は対応する states.* があるとき) */
|
|
57
|
+
getAvailableStates: () => V2ViewState[];
|
|
58
|
+
/** v2 文書: 現在のロール */
|
|
59
|
+
readonly role: string | undefined;
|
|
60
|
+
/** v2 文書: 現在の画面の状態 */
|
|
61
|
+
readonly viewState: V2ViewState;
|
|
62
|
+
/** Get available screen names */
|
|
63
|
+
getScreenNames: () => string[];
|
|
64
|
+
/** Change theme */
|
|
65
|
+
setTheme: (themeId: string) => void;
|
|
66
|
+
/** Get current theme */
|
|
67
|
+
getTheme: () => string | null;
|
|
68
|
+
/** Get current form data */
|
|
69
|
+
getFormData: () => Record<string, unknown> | null;
|
|
70
|
+
/** Destroy instance and cleanup */
|
|
71
|
+
destroy: () => void;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Initialize Mokkun with the given options
|
|
75
|
+
*/
|
|
76
|
+
declare function init(options: MokkunInitOptions): Promise<MokkunInstance>;
|
|
77
|
+
/**
|
|
78
|
+
* Mokkun - YAML-based presentation and form builder
|
|
79
|
+
*/
|
|
80
|
+
export declare const Mokkun: {
|
|
81
|
+
/** Initialize Mokkun */
|
|
82
|
+
init: typeof init;
|
|
83
|
+
/** Library version */
|
|
84
|
+
VERSION: string;
|
|
85
|
+
/** Utility functions */
|
|
86
|
+
utils: {
|
|
87
|
+
parseYaml: typeof parseYaml;
|
|
88
|
+
parseYamlV2: typeof parseYamlV2;
|
|
89
|
+
compileV2Warnings: typeof compileV2Warnings;
|
|
90
|
+
/** v2 の状態の表示名(ビューアーのセレクトに使う) */
|
|
91
|
+
V2_STATE_LABELS: Record<V2ViewState, string>;
|
|
92
|
+
getScreen: typeof getScreen;
|
|
93
|
+
getScreenNames: typeof getScreenNames;
|
|
94
|
+
findFieldById: typeof findFieldById;
|
|
95
|
+
};
|
|
96
|
+
/** Theme management */
|
|
97
|
+
theme: {
|
|
98
|
+
apply: (id: string) => boolean;
|
|
99
|
+
getCurrent: () => string | null;
|
|
100
|
+
getAvailable: () => import("./types").ThemeDefinition[];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export type { MokkunSchema, ScreenDefinition, BuiltInThemeId, MokkunV2Schema };
|
|
104
|
+
export { renderViewV2, mountViewV2, parseYamlV2, parseV2Document, isV2Document, compileV2Warnings };
|
|
105
|
+
export type { V2Controller, V2Callbacks, V2ViewState };
|
|
106
|
+
export type { V2RenderOptions, V2ActionPayload } from './renderer-v2';
|
|
107
|
+
export type { V2CompileWarning } from './parser/v2/compile-warnings';
|
|
108
|
+
export { Textarea, createTextarea, type TextareaState, type TextareaCallbacks, type TextareaConfig, } from './renderer/components/textarea';
|
|
109
|
+
export { Combobox, type ComboboxOption, type ComboboxConfig, type ComboboxState, type ComboboxCallbacks, } from './renderer/components';
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mokkun - File Loader Module
|
|
3
|
+
* YAMLファイルの読み込み機能を提供
|
|
4
|
+
*/
|
|
5
|
+
import type { MokkunSchema } from '../types/schema';
|
|
6
|
+
import type { MokkunV2Schema } from '../types/schema-v2';
|
|
7
|
+
import type { ParseError } from '../parser/yaml-parser';
|
|
8
|
+
/**
|
|
9
|
+
* ファイル読み込みエラーの種類
|
|
10
|
+
*/
|
|
11
|
+
export type FileLoadErrorType = 'INVALID_FILE_TYPE' | 'FILE_READ_ERROR' | 'FETCH_ERROR' | 'YAML_PARSE_ERROR' | 'NETWORK_ERROR';
|
|
12
|
+
/**
|
|
13
|
+
* ファイル読み込みエラー
|
|
14
|
+
*/
|
|
15
|
+
export interface FileLoadError {
|
|
16
|
+
type: FileLoadErrorType;
|
|
17
|
+
message: string;
|
|
18
|
+
details?: string;
|
|
19
|
+
parseErrors?: ParseError[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* ファイル読み込み成功結果
|
|
23
|
+
*/
|
|
24
|
+
export interface FileLoadSuccess {
|
|
25
|
+
success: true;
|
|
26
|
+
/** v1 スキーマ。v2 文書では compileV2 の結果(変換できなければ null) */
|
|
27
|
+
schema: MokkunSchema | null;
|
|
28
|
+
/** v2 文書(mokkun: 2)のとき、検証済みの v2 スキーマ。v2 専用レンダラーの入力 */
|
|
29
|
+
schemaV2?: MokkunV2Schema;
|
|
30
|
+
fileName: string;
|
|
31
|
+
source: 'file' | 'url' | 'drop';
|
|
32
|
+
/** 読み込んだ YAML の原文(コメント・順序を保持) */
|
|
33
|
+
content: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* ファイル読み込み失敗結果
|
|
37
|
+
*/
|
|
38
|
+
export interface FileLoadFailure {
|
|
39
|
+
success: false;
|
|
40
|
+
error: FileLoadError;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* ファイル読み込み結果
|
|
44
|
+
*/
|
|
45
|
+
export type FileLoadResult = FileLoadSuccess | FileLoadFailure;
|
|
46
|
+
/**
|
|
47
|
+
* ファイル読み込みコールバック
|
|
48
|
+
*/
|
|
49
|
+
export type FileLoadCallback = (result: FileLoadResult) => void;
|
|
50
|
+
/**
|
|
51
|
+
* ドロップゾーンオプション
|
|
52
|
+
*/
|
|
53
|
+
export interface DropZoneOptions {
|
|
54
|
+
element: HTMLElement;
|
|
55
|
+
onLoad: FileLoadCallback;
|
|
56
|
+
onDragOver?: () => void;
|
|
57
|
+
onDragLeave?: () => void;
|
|
58
|
+
multiple?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* ファイル選択オプション
|
|
62
|
+
*/
|
|
63
|
+
export interface FileSelectOptions {
|
|
64
|
+
onLoad: FileLoadCallback;
|
|
65
|
+
multiple?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* ファイル名が許可された拡張子かチェック
|
|
69
|
+
*/
|
|
70
|
+
export declare function isValidFileName(fileName: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* ファイルタイプが許可されているかチェック
|
|
73
|
+
*/
|
|
74
|
+
export declare function isValidFileType(file: File): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* FileReaderでファイルを読み込み
|
|
77
|
+
*/
|
|
78
|
+
export declare function readFile(file: File, source: 'file' | 'drop'): Promise<FileLoadResult>;
|
|
79
|
+
/**
|
|
80
|
+
* 複数ファイルを読み込み
|
|
81
|
+
*/
|
|
82
|
+
export declare function readFiles(files: FileList | File[], source: 'file' | 'drop'): Promise<FileLoadResult[]>;
|
|
83
|
+
/**
|
|
84
|
+
* URLからYAMLファイルを読み込み
|
|
85
|
+
*/
|
|
86
|
+
export declare function loadFromUrl(url: string): Promise<FileLoadResult>;
|
|
87
|
+
/**
|
|
88
|
+
* URLパラメータからYAMLパスを取得
|
|
89
|
+
*/
|
|
90
|
+
export declare function getYamlUrlFromParams(): string | null;
|
|
91
|
+
/**
|
|
92
|
+
* URLパラメータで指定されたYAMLを読み込み
|
|
93
|
+
*/
|
|
94
|
+
export declare function loadFromUrlParams(): Promise<FileLoadResult | null>;
|
|
95
|
+
/**
|
|
96
|
+
* ファイル選択input要素を作成
|
|
97
|
+
*/
|
|
98
|
+
export declare function createFileInput(options: FileSelectOptions): HTMLInputElement;
|
|
99
|
+
/**
|
|
100
|
+
* ファイル選択ダイアログを開く
|
|
101
|
+
*/
|
|
102
|
+
export declare function openFileDialog(options: FileSelectOptions): void;
|
|
103
|
+
/**
|
|
104
|
+
* ドロップゾーンをセットアップ
|
|
105
|
+
*/
|
|
106
|
+
export declare function setupDropZone(options: DropZoneOptions): () => void;
|
|
107
|
+
/**
|
|
108
|
+
* エラーをフォーマットして表示用文字列に変換
|
|
109
|
+
*/
|
|
110
|
+
export declare function formatFileLoadError(error: FileLoadError): string;
|
|
111
|
+
/**
|
|
112
|
+
* ファイル読み込みUIを生成
|
|
113
|
+
*/
|
|
114
|
+
export declare function renderFileLoaderUI(): string;
|
|
115
|
+
/**
|
|
116
|
+
* ファイルローダーUIにイベントをアタッチ
|
|
117
|
+
*/
|
|
118
|
+
export declare function attachFileLoaderEvents(container: HTMLElement, onLoad: FileLoadCallback): () => void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YAML キー正規化
|
|
3
|
+
*
|
|
4
|
+
* YAML の正規形は camelCase。内部表現は snake_case のまま維持するため、
|
|
5
|
+
* パーサーの入口で camelCase キーを内部の snake_case キーへ変換する。
|
|
6
|
+
* snake_case の YAML(teamkit generate-ui の出力など)は変換せずそのまま通す(後方互換)。
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* 内部で使用する snake_case キーの完全な集合(ソート済み、113 個)。
|
|
10
|
+
* schema.json のプロパティ名 / src/types/schema.ts のプロパティ名 /
|
|
11
|
+
* yaml-parser.ts が読むキーの和集合。key-normalizer.test.ts で schema.json と突き合わせる。
|
|
12
|
+
*
|
|
13
|
+
* 注意: 内部で元から camelCase のプロパティ(dropdownItems, maxColumns, weekStartsOn, loaderType,
|
|
14
|
+
* showProgress, initialProgress, ariaLabel, defaultValue)は snake_case 版と衝突するため、パーサーは snake 形で読む。
|
|
15
|
+
* definition_list の group/item の maxColumns はレンダラーが camelCase で読むが、静的 renderField では無視される。
|
|
16
|
+
*/
|
|
17
|
+
export declare const KNOWN_KEYS: readonly string[];
|
|
18
|
+
/** snake_case を camelCase に変換(use_24_hour → use24Hour) */
|
|
19
|
+
export declare function toCamel(snake: string): string;
|
|
20
|
+
/** camelCase を snake_case に変換(use24Hour → use_24_hour) */
|
|
21
|
+
export declare function toSnake(camel: string): string;
|
|
22
|
+
/** camelCase キー → 内部 snake_case キー */
|
|
23
|
+
export declare const CAMEL_TO_SNAKE: Record<string, string>;
|
|
24
|
+
export declare function normalizeKeysDeep(value: unknown, parentKey?: string, verbatimSelf?: boolean, isNamedEntry?: boolean): unknown;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section の項目展開(patterns の use)。パーサー・コンパイラ・レンダラーで共有する軽量モジュール
|
|
3
|
+
*/
|
|
4
|
+
import type { FieldV2, PatternV2, SectionV2 } from '../../types/schema-v2';
|
|
5
|
+
/**
|
|
6
|
+
* 合成フィールド(stepper / 通知 / 一覧など)の id 接頭辞。item と衝突しない。
|
|
7
|
+
* セクション由来は `_v2_s_`(本体)/ `_v2_n_`(note)/ `_v2_p_`(accordion)+ section.id、
|
|
8
|
+
* view 由来は `_v2_` + 固定名で、互いに衝突しない。
|
|
9
|
+
*/
|
|
10
|
+
export declare const SYNTH_PREFIX = "_v2_";
|
|
11
|
+
/** section 内の展開済みフィールド(use 由来は id に section.id を前置) */
|
|
12
|
+
export interface ExpandedField {
|
|
13
|
+
field: FieldV2;
|
|
14
|
+
id: string;
|
|
15
|
+
/** patterns 由来か */
|
|
16
|
+
fromPattern: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* section.fields と patterns[use].fields を展開する。
|
|
20
|
+
* pattern 由来のフィールドは id を `<sectionId>_<item>` にし、
|
|
21
|
+
* pattern 内で同じ pattern のフィールドを指す visibleWhen / requiredWhen は前置した id に書き換える。
|
|
22
|
+
*/
|
|
23
|
+
export declare function expandSectionFields(section: SectionV2, patterns: Record<string, PatternV2> | undefined): ExpandedField[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 の Field / Condition を旧フォーマットの InputField / Condition に変換する
|
|
3
|
+
*/
|
|
4
|
+
import type { Condition, InputField } from '../../types/schema';
|
|
5
|
+
import type { ConditionV2, FieldV2, RuleV2 } from '../../types/schema-v2';
|
|
6
|
+
import type { ExpandedField } from './compile-expand';
|
|
7
|
+
/** 緩い型のフィールド(旧フォーマットは種類ごとに属性が異なるため) */
|
|
8
|
+
export type LooseField = Record<string, unknown> & {
|
|
9
|
+
id: string;
|
|
10
|
+
type: string;
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 条件を旧フォーマットの条件にする。
|
|
15
|
+
* equals → eq、notEquals → ne、in → in(旧スキーマの SimpleCondition が持つ演算子)
|
|
16
|
+
*/
|
|
17
|
+
export declare function compileCondition(cond: ConditionV2): Condition;
|
|
18
|
+
/** v2 の accept → 旧 file_upload の accept 配列(image は image_uploader になるため扱わない) */
|
|
19
|
+
export declare function legacyAccept(accept: FieldV2['accept']): string[] | undefined;
|
|
20
|
+
/** timeline の value({ at, label, text? }[])→ 旧 timeline の items */
|
|
21
|
+
export declare function legacyTimelineItems(value: unknown): Array<{
|
|
22
|
+
time: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
}> | undefined;
|
|
26
|
+
export declare function compileField(ef: ExpandedField, ruleDefs: Record<string, RuleV2> | undefined): InputField;
|
|
27
|
+
/** トップレベルのフィールドに section の表示条件を付与(既に条件があるものは維持) */
|
|
28
|
+
export declare function applySectionCondition(fields: InputField[], cond: ConditionV2 | undefined): InputField[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 の Section を旧フォーマットの FormSection に変換する
|
|
3
|
+
*/
|
|
4
|
+
import type { FormSection } from '../../types/schema';
|
|
5
|
+
import type { MokkunV2Schema, SectionV2, ViewV2 } from '../../types/schema-v2';
|
|
6
|
+
export declare function compileSection(section: SectionV2, v2: MokkunV2Schema, view: ViewV2): FormSection;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mokkun v2 コンパイラ
|
|
3
|
+
* v2 フォーマット(camelCase, 6層)を旧フォーマット(MokkunSchema, snake_case 内部キー)へ変換する。
|
|
4
|
+
* 規則: docs/format-redesign/02-schema-v2.md 末尾の「コンパイル規則」
|
|
5
|
+
* 旧フォーマットで表現できないキーは compileV2Warnings(compile-warnings.ts)が列挙する。
|
|
6
|
+
*/
|
|
7
|
+
import type { MokkunSchema } from '../../types/schema';
|
|
8
|
+
import type { MokkunV2Schema } from '../../types/schema-v2';
|
|
9
|
+
export { SYNTH_PREFIX, expandSectionFields, type ExpandedField } from './compile-expand';
|
|
10
|
+
export { compileV2Warnings, type V2CompileWarning } from './compile-warnings';
|
|
11
|
+
/**
|
|
12
|
+
* v2 スキーマを旧フォーマット(MokkunSchema)へコンパイル
|
|
13
|
+
*/
|
|
14
|
+
export declare function compileV2(v2: MokkunV2Schema): MokkunSchema;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 → 旧フォーマットの変換で、旧スキーマ/旧レンダラーが表現できずに落ちるキーの一覧。
|
|
3
|
+
* ビューアーはコンソールにだけ出す(画面には出さない)。仕様の「コンパイル規則」の「未対応」と対応する。
|
|
4
|
+
*/
|
|
5
|
+
import type { MokkunV2Schema } from '../../types/schema-v2';
|
|
6
|
+
export interface V2CompileWarning {
|
|
7
|
+
/** 対象の位置(パーサーのエラーと同じ書き方。例 views.order_form.sections[0].fields[1]) */
|
|
8
|
+
path: string;
|
|
9
|
+
/** 落ちるキー(例 unit、list.bulkActions) */
|
|
10
|
+
key: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* compileV2 が旧フォーマットへ変換するときに無視するキーを列挙する(検証済みの v2 スキーマを渡す)。
|
|
15
|
+
* 変換結果は変えない。
|
|
16
|
+
*/
|
|
17
|
+
export declare function compileV2Warnings(schema: MokkunV2Schema): V2CompileWarning[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* file の accept / maxSize の仕様(パーサー・コンパイラ・レンダラーで共有)
|
|
3
|
+
*/
|
|
4
|
+
/** accept のキーワード */
|
|
5
|
+
export declare const ACCEPT_KEYWORDS: readonly ["image", "pdf", "document"];
|
|
6
|
+
/** accept の配列要素: 拡張子(.pdf)または MIME タイプ(image/png, image/*) */
|
|
7
|
+
export declare const ACCEPT_EXT_PATTERN: RegExp;
|
|
8
|
+
export declare const ACCEPT_MIME_PATTERN: RegExp;
|
|
9
|
+
/** 旧来の HTML accept 文字列(".pdf" "image/png"。カンマ区切りも可)を許す判定 */
|
|
10
|
+
export declare const ACCEPT_LEGACY_PATTERN: RegExp;
|
|
11
|
+
/** maxSize: 正の整数 + KB / MB / GB("0MB" や "010MB" は不可) */
|
|
12
|
+
export declare const MAX_SIZE_PATTERN: RegExp;
|
|
13
|
+
export declare const ACCEPT_FORMS = "image / pdf / document\u3001\u307E\u305F\u306F [\".pdf\", \"image/png\"] \u306E\u3088\u3046\u306A\u62E1\u5F35\u5B50\u30FBMIME \u30BF\u30A4\u30D7\u306E\u914D\u5217";
|
|
14
|
+
export declare const MAX_SIZE_FORMS = "\u6B63\u306E\u6574\u6570 + KB / MB / GB\uFF08\u4F8B: \"10MB\"\uFF09";
|
|
15
|
+
/** 配列要素として正しいか */
|
|
16
|
+
export declare function isAcceptToken(token: unknown): boolean;
|
|
17
|
+
/** キーワード → `<input accept>` */
|
|
18
|
+
export declare const ACCEPT_INPUT_ATTR: Record<string, string>;
|
|
19
|
+
/** キーワード → サポートテキストの形式名 */
|
|
20
|
+
export declare const ACCEPT_LABEL: Record<string, string>;
|
|
21
|
+
/** キーワード → 旧 file_upload の accept(拡張子・MIME タイプの配列) */
|
|
22
|
+
export declare const ACCEPT_LEGACY_LIST: Record<string, string[]>;
|
|
23
|
+
/** "10MB" → バイト数(書式外は undefined) */
|
|
24
|
+
export declare function maxSizeToBytes(text: string | undefined): number | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISO 日付(YYYY-MM-DD)と、YAML の日付リテラル(js-yaml が Date にする)の正規化
|
|
3
|
+
*/
|
|
4
|
+
/** YYYY-MM-DD として実在する日付か */
|
|
5
|
+
export declare function isIsoDate(text: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* 値の中の Date(引用符なしの `2026-11-20` を js-yaml が変換したもの)を、再帰的に UTC の `YYYY-MM-DD` 文字列にする。
|
|
8
|
+
* 元のデータは変更せず、Date を含むときだけ複製する。
|
|
9
|
+
*/
|
|
10
|
+
export declare function normalizeDates<T>(value: T): T;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mokkun v2 パーサー
|
|
3
|
+
* 判別(isV2Document)、構造検証(ajv に依存せず手書き)、compileV2 による旧フォーマットへの変換
|
|
4
|
+
*/
|
|
5
|
+
import type { MokkunSchema } from '../../types/schema';
|
|
6
|
+
import type { MokkunV2Schema } from '../../types/schema-v2';
|
|
7
|
+
import type { ParseResult } from '../yaml-parser';
|
|
8
|
+
/**
|
|
9
|
+
* v2 ドキュメントかどうか(トップレベルの `mokkun` が 2)
|
|
10
|
+
*/
|
|
11
|
+
export declare function isV2Document(data: unknown): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* トップレベルに `mokkun` キーがあるか(バージョン不一致を v1 として扱わないための判定)
|
|
14
|
+
*/
|
|
15
|
+
export declare function hasMokkunVersionKey(data: unknown): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* v2 ドキュメント(yaml.load 済みの生データ)を検証し、検証済みの MokkunV2Schema を返す(コンパイルしない)
|
|
18
|
+
* v2 専用レンダラー(renderer-v2)の入力に使う
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseV2Document(raw: unknown): ParseResult<MokkunV2Schema>;
|
|
21
|
+
/**
|
|
22
|
+
* v2 ドキュメント(yaml.load 済みの生データ)を検証し、旧フォーマットへコンパイルする
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseV2(data: unknown): ParseResult<MokkunSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action の検証(View の主・副アクション、rowActions、bulkActions、Section.actions で共通)
|
|
3
|
+
*/
|
|
4
|
+
import { type VCtx } from './validate-context';
|
|
5
|
+
export interface ActionCheckOptions {
|
|
6
|
+
/** Section.actions のとき true。primary を持てるのは View だけなので style: primary を拒否する */
|
|
7
|
+
section?: boolean;
|
|
8
|
+
/** list.rowActions[] のとき true。id / label / kind / to だけを持てる(role・confirm・style・placement は不可) */
|
|
9
|
+
row?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function checkAction(v: VCtx, action: unknown, path: string, opts?: ActionCheckOptions): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App 層(app / navigation / notifications)と Flow 層の検証
|
|
3
|
+
*/
|
|
4
|
+
import { type Obj, type VCtx } from './validate-context';
|
|
5
|
+
/** app の形(views が無くても検証できる部分) */
|
|
6
|
+
export declare function checkApp(v: VCtx, app: Obj | undefined): void;
|
|
7
|
+
/** navigation を検証し、載っている view 名の集合を返す(undefined は navigation 未定義) */
|
|
8
|
+
export declare function checkNavigation(v: VCtx, navigation: unknown): Set<string> | undefined;
|
|
9
|
+
export declare function checkFlows(v: VCtx, flows: unknown): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 検証の共通部分: 型ガード、列挙値、エラー収集のヘルパー
|
|
3
|
+
*/
|
|
4
|
+
import type { ParseError, ParseErrorType } from '../yaml-parser';
|
|
5
|
+
export type Obj = Record<string, unknown>;
|
|
6
|
+
export declare function isObject(value: unknown): value is Obj;
|
|
7
|
+
export declare function isNonEmptyString(value: unknown): value is string;
|
|
8
|
+
export declare const APP_LAYOUTS: string[];
|
|
9
|
+
export declare const FLOW_PROGRESS: string[];
|
|
10
|
+
export declare const VIEW_LAYOUTS: string[];
|
|
11
|
+
export declare const SECTION_KINDS: string[];
|
|
12
|
+
export declare const REVEALS: string[];
|
|
13
|
+
export declare const ACTION_KINDS: string[];
|
|
14
|
+
export declare const ACTION_PLACEMENTS: string[];
|
|
15
|
+
export declare const ACTION_STYLES: string[];
|
|
16
|
+
export declare const FIELD_WIDTHS: string[];
|
|
17
|
+
export declare const SELECTIONS: string[];
|
|
18
|
+
export declare const NOTICE_VARIANTS: string[];
|
|
19
|
+
export declare const PATTERN_KEYS: string[];
|
|
20
|
+
export declare const COLUMN_TYPES: string[];
|
|
21
|
+
export declare const DATE_PRECISIONS: string[];
|
|
22
|
+
/** 一覧セルに置ける入力の component */
|
|
23
|
+
export declare const COLUMN_FIELD_COMPONENTS: string[];
|
|
24
|
+
/** 条件の比較キー(exactly one) */
|
|
25
|
+
export declare const CONDITION_KEYS: string[];
|
|
26
|
+
/** 検証の共有状態(エラーの収集と、参照先の存在確認に使う集合) */
|
|
27
|
+
export interface VCtx {
|
|
28
|
+
add: (type: ParseErrorType, message: string, path: string) => void;
|
|
29
|
+
checkEnum: (value: unknown, allowed: Array<string | number>, path: string, name: string) => void;
|
|
30
|
+
checkString: (value: unknown, path: string, name: string, required?: boolean) => void;
|
|
31
|
+
/** views のキーを参照しているか */
|
|
32
|
+
/** obj に allowed 以外のキーがあればエラー(schema-v2.json の additionalProperties: false に対応) */
|
|
33
|
+
checkKeys: (obj: Obj, allowed: readonly string[], path: string) => void;
|
|
34
|
+
checkViewRef: (name: unknown, path: string) => void;
|
|
35
|
+
/** role(文字列または配列)の形と、app.roles にあるかを確かめる */
|
|
36
|
+
checkRole: (value: unknown, path: string) => void;
|
|
37
|
+
/** トップレベル rules */
|
|
38
|
+
rules: Obj;
|
|
39
|
+
viewNames: Set<string>;
|
|
40
|
+
}
|
|
41
|
+
export declare function createVCtx(errors: ParseError[], data: Obj): VCtx;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field と Condition の検証
|
|
3
|
+
*/
|
|
4
|
+
import { type VCtx } from './validate-context';
|
|
5
|
+
/**
|
|
6
|
+
* 条件(visibleWhen / requiredWhen)の形だけを検証する(参照先の存在は view 単位で後段チェック)。
|
|
7
|
+
* equals / notEquals / in のうちちょうど 1 つが必要。
|
|
8
|
+
*/
|
|
9
|
+
export declare function checkConditionShape(v: VCtx, cond: unknown, path: string, name?: string): boolean;
|
|
10
|
+
export interface FieldCheckOptions {
|
|
11
|
+
/** 一覧セルの入力欄(item / label を持たず、component は text / number / select / checkbox のみ) */
|
|
12
|
+
column?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** 項目の検証。条件の参照先と pattern 由来の展開は view 単位で後段チェックする */
|
|
15
|
+
export declare function checkField(v: VCtx, field: unknown, path: string, opts?: FieldCheckOptions): void;
|
|
16
|
+
/** 条件の参照先 item(形が正しいときだけ) */
|
|
17
|
+
export declare function conditionItem(cond: unknown): string | undefined;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 各オブジェクトに書けるキー(schema-v2.json の additionalProperties: false と同じ)
|
|
3
|
+
*/
|
|
4
|
+
export declare const TOP_KEYS: string[];
|
|
5
|
+
export declare const APP_KEYS: string[];
|
|
6
|
+
export declare const HEADER_KEYS: string[];
|
|
7
|
+
export declare const NOTICE_KEYS: string[];
|
|
8
|
+
export declare const NAV_GROUP_KEYS: string[];
|
|
9
|
+
export declare const NAV_ITEM_KEYS: string[];
|
|
10
|
+
export declare const FLOW_KEYS: string[];
|
|
11
|
+
export declare const FLOW_STEP_KEYS: string[];
|
|
12
|
+
export declare const VIEW_KEYS: string[];
|
|
13
|
+
export declare const STATE_KEYS: string[];
|
|
14
|
+
export declare const STATE_MESSAGE_KEYS: string[];
|
|
15
|
+
export declare const SECTION_KEYS: string[];
|
|
16
|
+
export declare const REPEATABLE_KEYS: string[];
|
|
17
|
+
export declare const ACTION_KEYS: string[];
|
|
18
|
+
/** list.rowActions[] は id / label / kind / to だけ(role・confirm・style・placement は持てない) */
|
|
19
|
+
export declare const ROW_ACTION_KEYS: string[];
|
|
20
|
+
export declare const CONFIRM_KEYS: string[];
|
|
21
|
+
export declare const LIST_KEYS: string[];
|
|
22
|
+
export declare const COLUMN_KEYS: string[];
|
|
23
|
+
export declare const PAGING_KEYS: string[];
|
|
24
|
+
export declare const CONDITION_ALLOWED_KEYS: string[];
|
|
25
|
+
export declare const OPTION_KEYS: string[];
|
|
26
|
+
export declare const FIELD_KEYS: string[];
|
|
27
|
+
/** 一覧セルの入力欄: item / label / 条件 / to / links / precision / accept / maxSize / rules / whyRequired / example / format は持てない */
|
|
28
|
+
export declare const COLUMN_FIELD_KEYS: string[];
|
|
29
|
+
export declare const LINK_KEYS: string[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View 層と Section 層の検証(項目 id の重複、条件の参照先、action id の一意性を含む)
|
|
3
|
+
*/
|
|
4
|
+
import type { PatternV2 } from '../../types/schema-v2';
|
|
5
|
+
import { type Obj, type VCtx } from './validate-context';
|
|
6
|
+
export declare function checkViews(v: VCtx, views: Obj, patterns: Record<string, PatternV2>, navViews: Set<string> | undefined): void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mokkun YAML Parser
|
|
3
|
+
* YAMLテキストを型安全にパースする
|
|
4
|
+
*/
|
|
5
|
+
import type { MokkunV2Schema } from '../types/schema-v2';
|
|
6
|
+
import type { MokkunSchema, ScreenDefinition, InputField, InputFieldType, CommonComponent, ValidationRule } from '../types/schema';
|
|
7
|
+
/**
|
|
8
|
+
* パースエラーの種類
|
|
9
|
+
*/
|
|
10
|
+
export type ParseErrorType = 'YAML_SYNTAX_ERROR' | 'SCHEMA_VALIDATION_ERROR' | 'MISSING_REQUIRED_FIELD' | 'INVALID_FIELD_TYPE' | 'INVALID_VALUE';
|
|
11
|
+
/**
|
|
12
|
+
* パースエラー
|
|
13
|
+
*/
|
|
14
|
+
export interface ParseError {
|
|
15
|
+
type: ParseErrorType;
|
|
16
|
+
message: string;
|
|
17
|
+
path?: string;
|
|
18
|
+
line?: number;
|
|
19
|
+
column?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* パース結果
|
|
23
|
+
*/
|
|
24
|
+
export type ParseResult<T> = {
|
|
25
|
+
success: true;
|
|
26
|
+
data: T;
|
|
27
|
+
} | {
|
|
28
|
+
success: false;
|
|
29
|
+
errors: ParseError[];
|
|
30
|
+
};
|
|
31
|
+
export declare const VALID_FIELD_TYPES: InputFieldType[];
|
|
32
|
+
/**
|
|
33
|
+
* YAMLテキストをパースしてMokkunSchemaに変換
|
|
34
|
+
*/
|
|
35
|
+
export declare function parseYaml(yamlText: string): ParseResult<MokkunSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* YAMLテキストが v2 フォーマット(トップレベルの `mokkun: 2`)か判定する。YAML として読めない場合は false
|
|
38
|
+
*/
|
|
39
|
+
export declare function isV2Yaml(yamlText: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* v2 の YAMLテキストをパースし、検証済みの MokkunV2Schema を返す(旧フォーマットへはコンパイルしない)
|
|
42
|
+
* 既存の parseYaml の挙動は変えない
|
|
43
|
+
*/
|
|
44
|
+
export declare function parseYamlV2(yamlText: string): ParseResult<MokkunV2Schema>;
|
|
45
|
+
/**
|
|
46
|
+
* パースエラーを整形して文字列に変換
|
|
47
|
+
*/
|
|
48
|
+
export declare function formatParseErrors(errors: ParseError[]): string;
|
|
49
|
+
/**
|
|
50
|
+
* 画面定義を取得
|
|
51
|
+
*/
|
|
52
|
+
export declare function getScreen(schema: MokkunSchema, screenName: string): ScreenDefinition | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* 全ての画面名を取得
|
|
55
|
+
*/
|
|
56
|
+
export declare function getScreenNames(schema: MokkunSchema): string[];
|
|
57
|
+
/**
|
|
58
|
+
* フィールドをIDで検索
|
|
59
|
+
*/
|
|
60
|
+
export declare function findFieldById(fields: InputField[], fieldId: string): InputField | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* 共通コンポーネントを取得
|
|
63
|
+
*/
|
|
64
|
+
export declare function getCommonComponent(schema: MokkunSchema, componentName: string): CommonComponent | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* バリデーションルールを取得
|
|
67
|
+
*/
|
|
68
|
+
export declare function getValidationRule(schema: MokkunSchema, ruleName: string): ValidationRule | undefined;
|