/** Unified Examples Tool */ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; /** Pattern definitions with minimal, brief, full, and explained content. */ export declare const PATTERNS: Record; /** Complete multi-page form example. */ export declare const COMPLETE_EXAMPLE = "# Complete Multi-Page Form Example\n\nThis is a **complete, copy-pasteable** form configuration that demonstrates:\n- Multi-page navigation\n- Value derivation (computed fields - self-targeting)\n- Conditional visibility (using logic blocks - NO hideWhen/showWhen shorthand)\n- Validation (required, email, minLength)\n- Groups for nested data\n- Various field types\n\n```typescript\nimport { FormConfig } from '@ng-forge/dynamic-forms';\n\nconst formConfig = {\n fields: [\n // ========== PAGE 1: Personal Info ==========\n {\n key: 'personalInfo',\n type: 'page',\n fields: [\n { key: 'header1', type: 'text', label: 'Personal Information', props: { elementType: 'h2' } },\n {\n key: 'nameRow',\n type: 'row',\n fields: [\n { key: 'firstName', type: 'input', label: 'First Name', required: true, minLength: 2, col: 6 },\n { key: 'lastName', type: 'input', label: 'Last Name', required: true, minLength: 2, col: 6 }\n ]\n },\n {\n key: 'fullName',\n type: 'input',\n label: 'Full Name',\n readonly: true,\n // Shorthand derivation - no targetField needed, derivation is on the target field itself\n derivation: '(formValue.firstName || \"\") + \" \" + (formValue.lastName || \"\")'\n },\n { key: 'email', type: 'input', label: 'Email', required: true, email: true, props: { type: 'email' } },\n { key: 'next1', type: 'next', label: 'Continue' }\n ]\n },\n // ========== PAGE 2: Address ==========\n {\n key: 'addressPage',\n type: 'page',\n fields: [\n { key: 'header2', type: 'text', label: 'Address', props: { elementType: 'h2' } },\n {\n key: 'address',\n type: 'group',\n fields: [\n { key: 'street', type: 'input', label: 'Street', required: true },\n {\n key: 'cityRow',\n type: 'row',\n fields: [\n { key: 'city', type: 'input', label: 'City', required: true, col: 6 },\n {\n key: 'state',\n type: 'select',\n label: 'State',\n required: true,\n col: 6,\n options: [\n { label: 'California', value: 'CA' },\n { label: 'New York', value: 'NY' },\n { label: 'Texas', value: 'TX' }\n ]\n }\n ]\n }\n ]\n },\n {\n key: 'navRow2',\n type: 'row',\n fields: [\n { key: 'back2', type: 'previous', label: 'Back', col: 6 },\n { key: 'next2', type: 'next', label: 'Continue', col: 6 }\n ]\n }\n ]\n },\n // ========== PAGE 3: Preferences ==========\n {\n key: 'prefsPage',\n type: 'page',\n fields: [\n { key: 'header3', type: 'text', label: 'Preferences', props: { elementType: 'h2' } },\n {\n key: 'accountType',\n type: 'radio',\n label: 'Account Type',\n required: true,\n options: [\n { label: 'Personal', value: 'personal' },\n { label: 'Business', value: 'business' }\n ]\n },\n {\n key: 'companyName',\n type: 'input',\n label: 'Company Name',\n logic: [\n { type: 'hidden', condition: { type: 'fieldValue', fieldPath: 'accountType', operator: 'notEquals', value: 'business' } },\n { type: 'required', condition: { type: 'fieldValue', fieldPath: 'accountType', operator: 'equals', value: 'business' } }\n ]\n },\n { key: 'acceptTerms', type: 'checkbox', label: 'I accept the terms', required: true },\n {\n key: 'navRow3',\n type: 'row',\n fields: [\n { key: 'back3', type: 'previous', label: 'Back', col: 6 },\n { key: 'submitBtn', type: 'submit', label: 'Submit', col: 6 }\n ]\n }\n ]\n }\n ]\n} as const satisfies FormConfig;\n```\n\n## Form Output Shape\n\n```typescript\n{\n firstName: string;\n lastName: string;\n fullName: string; // Computed via derivation\n email: string;\n address: { // Nested from group\n street: string;\n city: string;\n state: string;\n };\n accountType: 'personal' | 'business';\n companyName?: string; // Only present when accountType is 'business'\n acceptTerms: boolean;\n}\n```"; /** Mega kitchen sink example (abbreviated - full version exists in get-example.tool.ts). */ export declare const MEGA_EXAMPLE = "# Kitchen Sink Mega Example\n\nThis example demonstrates **EVERY feature** of ng-forge dynamic forms.\n\n**NOTE:** This is a comprehensive reference. For getting started, use the `complete` pattern instead.\n\n```typescript\nimport { FormConfig } from '@ng-forge/dynamic-forms';\n\nconst megaFormConfig = {\n fields: [\n // ========== PAGE 1: All Field Types ==========\n {\n key: 'fieldTypesPage',\n type: 'page',\n fields: [\n { key: 'pageHeader', type: 'text', label: 'All Field Types Demo', props: { elementType: 'h1' } },\n\n // TEXT INPUTS\n { key: 'textInput', type: 'input', label: 'Text Input', placeholder: 'Type here' },\n { key: 'emailInput', type: 'input', label: 'Email', email: true, props: { type: 'email' } },\n { key: 'passwordInput', type: 'input', label: 'Password', minLength: 8, props: { type: 'password' } },\n { key: 'numberInput', type: 'input', label: 'Number', min: 0, max: 100, props: { type: 'number' } },\n\n // SELECT & OPTIONS\n {\n key: 'selectField',\n type: 'select',\n label: 'Select (single)',\n options: [\n { label: 'Option A', value: 'a' },\n { label: 'Option B', value: 'b' }\n ]\n },\n {\n key: 'radioField',\n type: 'radio',\n label: 'Radio Group',\n options: [\n { label: 'Yes', value: true },\n { label: 'No', value: false }\n ]\n },\n {\n key: 'multiCheckbox',\n type: 'multi-checkbox',\n label: 'Multi-Checkbox',\n options: [\n { label: 'Red', value: 'red' },\n { label: 'Green', value: 'green' },\n { label: 'Blue', value: 'blue' }\n ]\n },\n\n // BOOLEAN FIELDS\n { key: 'checkboxField', type: 'checkbox', label: 'Single Checkbox' },\n { key: 'toggleField', type: 'toggle', label: 'Toggle Switch' },\n\n // NUMERIC FIELDS\n { key: 'sliderField', type: 'slider', label: 'Slider', minValue: 0, maxValue: 100, step: 5, value: 50 },\n\n // DATE FIELDS\n { key: 'datepickerField', type: 'datepicker', label: 'Date Picker' },\n\n // TEXT AREA\n { key: 'textareaField', type: 'textarea', label: 'Textarea', props: { rows: 4 } },\n\n // HIDDEN\n { key: 'hiddenField', type: 'hidden', value: 'secret-value' },\n\n { key: 'toLogicPage', type: 'next', label: 'Next: Logic Demo' }\n ]\n },\n\n // ========== PAGE 2: Logic Types ==========\n {\n key: 'logicPage',\n type: 'page',\n fields: [\n { key: 'logicHeader', type: 'text', label: 'Logic Types Demo', props: { elementType: 'h1' } },\n\n // DERIVATION\n {\n key: 'sourceA',\n type: 'input',\n label: 'Source A',\n value: '10'\n },\n {\n key: 'sourceB',\n type: 'input',\n label: 'Source B',\n value: '20'\n },\n {\n key: 'derived',\n type: 'input',\n label: 'Derived (A + B)',\n readonly: true,\n // Self-targeting derivation - no targetField needed\n derivation: 'parseInt(formValue.sourceA || 0) + parseInt(formValue.sourceB || 0)'\n },\n\n // CONDITIONAL VISIBILITY\n {\n key: 'showExtra',\n type: 'checkbox',\n label: 'Show extra field'\n },\n {\n key: 'extraField',\n type: 'input',\n label: 'Extra Field',\n logic: [{\n type: 'hidden',\n condition: { type: 'fieldValue', fieldPath: 'showExtra', operator: 'notEquals', value: true }\n }]\n },\n\n // CONDITIONAL REQUIRED\n {\n key: 'makeRequired',\n type: 'checkbox',\n label: 'Make field required'\n },\n {\n key: 'conditionalRequired',\n type: 'input',\n label: 'Conditionally Required',\n logic: [{\n type: 'required',\n condition: { type: 'fieldValue', fieldPath: 'makeRequired', operator: 'equals', value: true }\n }]\n },\n\n {\n key: 'logicNav',\n type: 'row',\n fields: [\n { key: 'backToFields', type: 'previous', label: 'Back', col: 6 },\n { key: 'toContainers', type: 'next', label: 'Next: Containers', col: 6 }\n ]\n }\n ]\n },\n\n // ========== PAGE 3: Containers ==========\n {\n key: 'containersPage',\n type: 'page',\n fields: [\n { key: 'containersHeader', type: 'text', label: 'Containers Demo', props: { elementType: 'h1' } },\n\n // ROW\n {\n key: 'demoRow',\n type: 'row',\n fields: [\n { key: 'col4', type: 'input', label: 'Col 4', col: 4 },\n { key: 'col4b', type: 'input', label: 'Col 4', col: 4 },\n { key: 'col4c', type: 'input', label: 'Col 4', col: 4 }\n ]\n },\n\n // GROUP\n {\n key: 'demoGroup',\n type: 'group',\n fields: [\n { key: 'groupText', type: 'text', label: 'Nested Group:', props: { elementType: 'h3' } },\n { key: 'nestedField1', type: 'input', label: 'Nested Field 1' },\n { key: 'nestedField2', type: 'input', label: 'Nested Field 2' }\n ]\n },\n\n // ARRAY (Simplified API - recommended)\n {\n key: 'itemsHeader', type: 'text', label: 'Dynamic Array:', props: { elementType: 'h3' }\n },\n {\n key: 'demoArray',\n type: 'array',\n template: [\n { key: 'itemName', type: 'input', label: 'Item Name' },\n { key: 'itemQty', type: 'input', label: 'Qty', props: { type: 'number' } }\n ],\n value: [{ itemName: 'Widget', itemQty: '5' }],\n addButton: { label: 'Add Item' }\n },\n\n {\n key: 'containersNav',\n type: 'row',\n fields: [\n { key: 'backToLogic', type: 'previous', label: 'Back', col: 6 },\n { key: 'submitFinal', type: 'submit', label: 'Submit', col: 6 }\n ]\n }\n ]\n }\n ]\n} as const satisfies FormConfig;\n```\n\n## Features Demonstrated\n\n- **All field types:** input, select, radio, checkbox, multi-checkbox, textarea, toggle, slider, datepicker, text, hidden\n- **All container types:** page, row, group, array\n- **All button types:** submit, next, previous, auto-generated add/remove (simplified array)\n- **Logic types:** hidden, required, derivation\n- **Condition types:** fieldValue with operators\n- **Layout:** col property for grid widths"; export declare function registerExamplesTool(server: McpServer): void; //# sourceMappingURL=examples.tool.d.ts.map