open-index/open-npm huggingface dataset:
npm package: @mieweb/forms-editor
Description: Embeddable questionnaire form editor component
Latest version: 2.1.5

# @mieweb/forms-editor

Visual questionnaire builder with three editing modes: Build, Code, and Preview.

## Installation

```bash
npm install @mieweb/forms-editor
```

**Requirements:** React 18+ and React DOM 18+

## Quick Start

```jsx
import { QuestionnaireEditor } from '@mieweb/forms-editor';

function App() {
  const [formData, setFormData] = React.useState({
    schemaType: 'mieforms-v1.0',
    fields: []
  });

  return (
    <QuestionnaireEditor 
      initialFormData={formData} 
      onChange={setFormData} 
    />
  );
}
```

## Documentation

**[Full Documentation](https://questionnaire-builder.opensource.mieweb.org/docs/editor/overview)**

For detailed information, see:
- [Quick Start Guide](https://questionnaire-builder.opensource.mieweb.org/docs/getting-started/quickstart-editor)
- [Props Reference](https://questionnaire-builder.opensource.mieweb.org/docs/editor/props)
- [Editor Modes](https://questionnaire-builder.opensource.mieweb.org/docs/editor/modes)
- [Field Editing](https://questionnaire-builder.opensource.mieweb.org/docs/editor/field-editing)
- [Import/Export](https://questionnaire-builder.opensource.mieweb.org/docs/editor/importing)

## License

MIT
npm package: @mieweb/forms-engine
Description: Field components and utilities for questionnaire builder
Latest version: 2.1.5

# @mieweb/forms-engine

Core state management and field components for FHIR-compatible questionnaires.

⚠️ **Note:** This package is primarily used internally by `@mieweb/forms-editor` and `@mieweb/forms-renderer`. Most users should use those packages instead.

## Installation

```bash
npm install @mieweb/forms-engine
```

**Requirements:** React 18+ and React DOM 18+

## Overview

Provides:
- 20+ field components
- Zustand state management
- Schema utilities (YAML/JSON parsing, auto-detection)
- Conditional logic evaluation

## Quick Start

```jsx
import { 
  FormStoreContext, 
  UIStoreContext,
  createFormStore, 
  createUIStore,
  Text_Field 
} from '@mieweb/forms-engine';

function MyApp() {
  const formStore = React.useRef(createFormStore()).current;
  const uiStore = React.useRef(createUIStore()).current;

  React.useEffect(() => {
    formStore.getState().replaceAll({
      schemaType: 'mieforms-v1.0',
      fields: [
        { id: 'name', fieldType: 'text', question: 'Name?', answer: '' }
      ]
    });
  }, [formStore]);

  return (
    <FormStoreContext.Provider value={formStore}>
      <UIStoreContext.Provider value={uiStore}>
        <Text_Field fieldId="name" />
      </UIStoreContext.Provider>
    </FormStoreContext.Provider>
  );
}
```

## Documentation

**[Full Documentation](https://questionnaire-builder.opensource.mieweb.org/)**

For detailed information, see:
- [Field Types](https://questionnaire-builder.opensource.mieweb.org/docs/field-types)
- [Schema Format](https://questionnaire-builder.opensource.mieweb.org/docs/schema-format)
- [Conditional Logic](https://questionnaire-builder.opensource.mieweb.org/docs/conditional-logic)

## License

MIT