npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ixo/surveys

v0.1.0

Published

An IXO survey.js library with custom integrations

Downloads

771

Readme

@ixo/surveys

A comprehensive survey library with map integration and custom widgets for impact measurement.

Features

  • Map Grid Selector Widget: Interactive map-based survey component with grid cell selection
  • UNL (Universal Natural Location) Integration: Precise location encoding and management
  • SurveyJS Integration: Seamless integration with SurveyJS Creator and React components
  • TypeScript Support: Full TypeScript support with type definitions
  • Responsive Design: Mobile-friendly components

Installation

npm install @ixo/surveys
# or
yarn add @ixo/surveys
# or
pnpm add @ixo/surveys

Peer Dependencies

This package requires React as a peer dependency:

npm install react react-dom

Usage

Basic Import

import { ITheme, Model, SurveyModel, SurveyCreator, SurveyCreatorComponent, Survey } from "@ixo/surveys";

Map Grid Selector Widget

The Map Grid Selector widget allows users to select precise geographic locations using a grid-based system:

import { registerMapGridSelectorCreator } from "@ixo/surveys";

// Register the widget with SurveyJS Creator
registerMapGridSelectorCreator();

Widget Configuration

The Map Grid Selector supports the following properties:

  • gridPrecision: Grid precision level (1-20, default: 7)
  • center: Map center coordinates [longitude, latitude]
  • initialZoom: Initial zoom level (default: 12)
  • maxZoom: Maximum zoom level (default: 20)
  • focusOnUser: Focus on user location (default: true)
  • allowMultiple: Allow multiple cell selections (default: false)
  • basemapToggle: Show basemap toggle (default: true)

Data Capture Options

Control which location data fields are captured:

  • Place information (identifier, name, distance)
  • Administrative boundaries (country, state, county, city)
  • Address components (postal code, house number, road name)

Custom Components

UNLMap Component

import { UNLMap } from '@ixo/surveys';

function MyMapComponent() {
	const handleFeatureClick = featureCollection => {
		console.log('Selected feature:', featureCollection);
	};

	return <UNLMap zoom={12} mapId="my-map" getFeatureCollectionOnClick={handleFeatureClick} />;
}

SurveyJS Integration

import { Survey, SurveyCreator } from '@ixo/surveys';

// Use in Survey runtime
function MySurvey() {
	const surveyJson = {
		elements: [
			{
				type: 'map-grid-selector',
				name: 'location',
				title: 'Select your location',
				gridPrecision: 7,
				allowMultiple: false,
			},
		],
	};

	return <Survey model={new SurveyModel(surveyJson)} />;
}

// Use in Survey Creator
function MySurveyCreator() {
	return <SurveyCreator />;
}

Development

Building the Package

# Build TypeScript
pnpm run build

# Build and create package
pnpm run build:local

# Clean build artifacts
pnpm run clean

Package Structure

dist/
├── components/          # React components
├── icons/              # Icon components
├── services/           # Utility services
├── widgets/            # SurveyJS widgets
├── config.js           # Configuration
├── index.js            # Main entry point
└── *.d.ts             # TypeScript definitions

API Reference

Core Exports

  • ITheme, Model, SurveyModel: SurveyJS core components
  • SurveyCreator, SurveyCreatorComponent: SurveyJS Creator components
  • Survey: SurveyJS React UI component

Custom Components

  • UNLMap: Interactive map component with UNL integration
  • MapIcon: Map icon component

Widgets

  • map-grid-selector: Grid-based location selector widget

Services

  • UNL encoding/decoding utilities
  • Map styling and configuration

Support

For issues and questions, please refer to the IXO documentation or create an issue in the repository.