{"_id":"smarty-address","_rev":"4-d4a12bae95891ae0bcf0c83a898249a7","name":"smarty-address","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"smarty-address","version":"1.0.0","keywords":["smarty","smartystreets","address","validation","verification","verify","validate","street-address","geocoding","addresses","zipcode","autocomplete","autosuggest","suggestions","international","http"],"author":{"url":"https://www.smarty.com","name":"Smarty Integrations Team","email":"support@smarty.com"},"license":"Apache-2.0","_id":"smarty-address@1.0.0","maintainers":[{"name":"smartymanwill","email":"mike.manwill@smarty.com"}],"dist":{"shasum":"8d4faebb146d32256a24e0419c21163511aa2f39","tarball":"https://registry.npmjs.org/smarty-address/-/smarty-address-1.0.0.tgz","fileCount":99,"integrity":"sha512-fQRdjycrf+mbyoPoR7Q+nqVtkX7rOM8QUuYumIaN2mewQSPR+vCZg15tSNUSqbQwV9FcoHLqcmkNURRYISPkUg==","signatures":[{"sig":"MEYCIQC/ZN1cKEfw00URdpVYSRulowFEITtrbRy+hI2PZ3stzgIhAOx6w6pBpJyq0+7h/rVjcMBRnBmBJZEfqtihbHoitmCo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":555737},"main":"dist/src/index.js","type":"module","types":"dist/src/index.d.ts","unpkg":"dist/smarty-address.iife.js","browser":"dist/smarty-address.iife.js","exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js"}},"gitHead":"1270186b7d956fedf59cccd09069a27cdf93d274","scripts":{"test":"jest","build":"npm run build:esm && npm run build:cdn","build:cdn":"vite build","build:esm":"tsc && cp -r assets dist/"},"_npmUser":{"name":"smartymanwill","email":"mike.manwill@smarty.com"},"jsdelivr":"dist/smarty-address.iife.js","_npmVersion":"11.7.0","description":"Quick and easy Smarty address autocomplete and validation.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","vite":"^7.2.7","ts-jest":"^29.4.6","prettier":"^3.6.2","typescript":"^5.2.2","@types/jest":"^30.0.0","jest-environment-jsdom":"^30.2.0"},"_npmOperationalInternal":{"tmp":"tmp/smarty-address_1.0.0_1773679765821_0.4147048125998769","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"smarty-address","version":"1.0.1","keywords":["smarty","smartystreets","address","validation","verification","verify","validate","street-address","geocoding","addresses","zipcode","autocomplete","autosuggest","suggestions","international","http"],"author":{"url":"https://www.smarty.com","name":"Smarty Integrations Team","email":"support@smarty.com"},"license":"Apache-2.0","_id":"smarty-address@1.0.1","maintainers":[{"name":"smartymanwill","email":"mike.manwill@smarty.com"}],"dist":{"shasum":"2597bf6625d801e7aec9e39d41b222777b356bde","tarball":"https://registry.npmjs.org/smarty-address/-/smarty-address-1.0.1.tgz","fileCount":99,"integrity":"sha512-7ZERaZJ677WAyUwkdEVP6vldkg8yO2yO86n7OBsj6gRjlfqlWC9HvvPv3iTwhU4xFkuvxDXtAyC5ZmU2gSqCZw==","signatures":[{"sig":"MEUCIQDkjMKzpVNh7ETijPmnn+RL5vAXP+YwH+E9+kn2XXfD/wIgHcbxxemHOHyomlOwqmtl2Lyly2uUnFbdNVyHLXDfETE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":556017},"main":"dist/src/index.js","type":"module","types":"dist/src/index.d.ts","unpkg":"dist/smarty-address.iife.js","browser":"dist/smarty-address.iife.js","exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js"}},"gitHead":"af658762be2680941966cc19b8e26c9307e6bce2","scripts":{"test":"jest","build":"npm run build:esm && npm run build:cdn","build:cdn":"vite build","build:esm":"tsc && cp -r assets dist/"},"_npmUser":{"name":"smartymanwill","email":"mike.manwill@smarty.com"},"jsdelivr":"dist/smarty-address.iife.js","_npmVersion":"11.7.0","description":"Quick and easy Smarty address autocomplete and validation.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","vite":"^7.2.7","ts-jest":"^29.4.6","prettier":"^3.6.2","typescript":"^5.2.2","@types/jest":"^30.0.0","jest-environment-jsdom":"^30.2.0"},"_npmOperationalInternal":{"tmp":"tmp/smarty-address_1.0.1_1773954125846_0.8551464873295374","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"smarty-address","version":"1.1.0","keywords":["smarty","smartystreets","address","validation","verification","verify","validate","street-address","geocoding","addresses","zipcode","autocomplete","autosuggest","suggestions","international","http"],"author":{"url":"https://www.smarty.com","name":"Smarty Integrations Team","email":"support@smarty.com"},"license":"Apache-2.0","_id":"smarty-address@1.1.0","maintainers":[{"name":"smartymanwill","email":"mike.manwill@smarty.com"}],"dist":{"shasum":"1450b8570a1fd634c96c26be15c7f91bc716ecea","tarball":"https://registry.npmjs.org/smarty-address/-/smarty-address-1.1.0.tgz","fileCount":65,"integrity":"sha512-/gH+g0n/zqmMGfv/un6d5uifCWkQXB3cr4eae0GBfxmWXC96HO2eXpEtNJ9Fpth7tg0x7HvY7qEz34B3Ek3+Mg==","signatures":[{"sig":"MEYCIQDBu6DdAYINvoztTaovK8CAbauwmBLiX5CVPJvwg2EdhAIhAKM3emJ8lcGAPWMqWHyioNdftSs+qmzpk+ZwOKUKdnvA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":462462},"main":"dist/src/index.js","type":"module","types":"dist/src/index.d.ts","unpkg":"dist/smarty-address.iife.js","browser":"dist/smarty-address.iife.js","exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js"}},"gitHead":"8525eaf68808404794ee70e4ee6a4b59a0f5a4ef","scripts":{"test":"jest","build":"npm run build:esm && npm run build:cdn","build:cdn":"vite build","build:esm":"tsc && cp -r assets dist/"},"_npmUser":{"name":"smartymanwill","email":"mike.manwill@smarty.com"},"jsdelivr":"dist/smarty-address.iife.js","_npmVersion":"11.7.0","description":"Quick and easy Smarty address autocomplete and validation.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","vite":"^7.2.7","ts-jest":"^29.4.6","prettier":"^3.6.2","typescript":"^5.2.2","@types/jest":"^30.0.0","jest-environment-jsdom":"^30.2.0"},"_npmOperationalInternal":{"tmp":"tmp/smarty-address_1.1.0_1779479566860_0.5776468325302302","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"_id":"smarty-address@1.1.2","bugs":{"url":"https://github.com/smarty/smarty-address/issues"},"dist":{"shasum":"ff7197a0094675797813e2bd5d019edd66661bc5","tarball":"https://registry.npmjs.org/smarty-address/-/smarty-address-1.1.2.tgz","fileCount":65,"integrity":"sha512-pC5HeFKhpJjjJbWM69FCmO4OYMkLbEF/+RXPvHbldnpHPPdCTYaPK7eTmursLfqxRTHRSqa9oAaiR9xBFELWAw==","signatures":[{"sig":"MEYCIQDkdEqennwSjCFPYTGhAc01LbDWRb+s6dOcOHD2lXU7FwIhAN6yv4hUIpKmlmKm2HSGDBKrz4I0EYLrpheYcNydb0gO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID5lj/A3P5xRaN9Pep6CTdUcO58w+BnwTtrXJlKHkODGAiEAwjsJPNESFDMlV8nscnHlpwHYrjOavoRphS8yt07DjKM="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/smarty-address@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":453973},"main":"dist/src/index.js","name":"smarty-address","type":"module","types":"dist/src/index.d.ts","unpkg":"dist/smarty-address.iife.js","author":{"url":"https://www.smarty.com","name":"Smarty Integrations Team","email":"support@smarty.com"},"browser":"dist/smarty-address.iife.js","exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js"}},"gitHead":"04a42c63b4421c144d7cfa37220b21006af9e6b6","license":"Apache-2.0","scripts":{"test":"jest","build":"npm run build:esm && npm run build:cdn","build:cdn":"vite build","build:esm":"tsc && cp -r assets dist/"},"version":"1.1.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:003db9d5-e172-48ed-8499-c25b38eaa43b"}},"homepage":"https://github.com/smarty/smarty-address#readme","jsdelivr":"dist/smarty-address.iife.js","keywords":["smarty","smartystreets","address","validation","verification","verify","validate","street-address","geocoding","addresses","zipcode","autocomplete","autosuggest","suggestions","international","http"],"repository":{"url":"git+https://github.com/smarty/smarty-address.git","type":"git"},"_npmVersion":"12.0.2","description":"Quick and easy Smarty address autocomplete and validation.","directories":{},"maintainers":[{"name":"smartymanwill","email":"mike.manwill@smarty.com"}],"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","vite":"^8.0.16","ts-jest":"^29.4.6","prettier":"^3.6.2","typescript":"^5.2.2","@types/jest":"^30.0.0","jest-environment-jsdom":"^30.2.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/smarty-address_1.1.2_1789595009352_0.27236509997561"}}},"time":{"created":"2026-03-16T16:49:25.821Z","modified":"2026-09-16T21:43:29.774Z","1.0.0":"2026-03-16T16:49:26.042Z","1.0.1":"2026-03-19T21:02:06.038Z","1.1.0":"2026-05-22T19:52:46.995Z","1.1.2":"2026-09-16T21:43:29.454Z"},"author":{"url":"https://www.smarty.com","name":"Smarty Integrations Team","email":"support@smarty.com"},"license":"Apache-2.0","keywords":["smarty","smartystreets","address","validation","verification","verify","validate","street-address","geocoding","addresses","zipcode","autocomplete","autosuggest","suggestions","international","http"],"description":"Quick and easy Smarty address autocomplete and validation.","maintainers":[{"name":"smartymanwill","email":"mike.manwill@smarty.com"}],"readme":"# smarty-address\n\nA lightweight TypeScript library for adding Smarty address autocomplete and validation to any web form.\n\n## Installation\n\n```bash\nnpm install smarty-address\n```\n\n## Quick Start\n\n```html\n<form>\n  <input type=\"text\" id=\"street\" placeholder=\"Start typing an address...\" />\n  <input type=\"text\" id=\"city\" />\n  <input type=\"text\" id=\"state\" />\n  <input type=\"text\" id=\"zipcode\" />\n</form>\n\n<script type=\"module\">\n  import SmartyAddress from \"smarty-address\";\n\n  const autocomplete = await SmartyAddress.create({\n    embeddedKey: \"your-smarty-embedded-key\",\n    streetSelector: \"#street\",\n    citySelector: \"#city\",\n    stateSelector: \"#state\",\n    zipcodeSelector: \"#zipcode\",\n  });\n</script>\n```\n\n### Via CDN\n\nUse the library directly in the browser without a build step:\n\n```html\n<form>\n  <input type=\"text\" id=\"street\" placeholder=\"Start typing an address...\" />\n  <input type=\"text\" id=\"city\" />\n  <input type=\"text\" id=\"state\" />\n  <input type=\"text\" id=\"zipcode\" />\n</form>\n\n<script src=\"https://cdn.jsdelivr.net/npm/smarty-address/dist/smarty-address.iife.js\"></script>\n<script>\n  SmartyAddress.create({\n    embeddedKey: \"your-smarty-embedded-key\",\n    streetSelector: \"#street\",\n    citySelector: \"#city\",\n    stateSelector: \"#state\",\n    zipcodeSelector: \"#zipcode\",\n  });\n</script>\n```\n\nThe CDN script adds a global `SmartyAddress` object with the same API as the module import. You can also use [unpkg](https://unpkg.com/smarty-address/dist/smarty-address.iife.js) as an alternative CDN.\n\nGet your embedded key from the [Smarty dashboard](https://www.smarty.com/account/keys).\n\n## Configuration\n\n### Required Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `embeddedKey` | `string` | Your Smarty embedded key |\n| `streetSelector` | `string` | CSS selector for street address field (also used as the autocomplete input unless `searchInputSelector` is provided) |\n\n### International Addresses\n\nBy default the plugin uses the US Autocomplete Pro API. To autocomplete addresses in other countries, set `country` (an [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code) or point `countrySelector` at a country `<input>` or `<select>` on your form. Anything other than `US`/`USA` (or empty) routes lookups through Smarty's [International Address Autocomplete API](https://www.smarty.com/docs/cloud/international-address-autocomplete-api). When neither is provided, the plugin defaults to US.\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `country` | `string` | Static ISO3 country code. Use `\"US\"`/`\"USA\"` (or omit) for US autocomplete; any other value (e.g. `\"CAN\"`, `\"GBR\"`) uses the international API. |\n| `countrySelector` | `string` | CSS selector for a country `<input>` or `<select>` whose `.value` is an [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code (e.g. `\"USA\"`, `\"CAN\"`, `\"GBR\"`; `\"US\"` also accepted). The plugin reads the value before each request, so users can switch country without reloading. Falls back to `country` (then to US) when blank. |\n\n```javascript\n// Static country\nconst autocomplete = await SmartyAddress.create({\n  embeddedKey: \"your-key\",\n  streetSelector: \"#street\",\n  country: \"CAN\",\n  citySelector: \"#city\",\n  stateSelector: \"#province\",\n  zipcodeSelector: \"#postal-code\",\n});\n\n// Country driven by a form field\nconst autocomplete = await SmartyAddress.create({\n  embeddedKey: \"your-key\",\n  streetSelector: \"#street\",\n  countrySelector: \"#country\",\n  localitySelector: \"#city\",\n  administrativeAreaSelector: \"#region\",\n  postalCodeSelector: \"#postal-code\",\n});\n```\n\n### Form Field Selectors\n\nThese selectors define where the selected address data gets populated:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `searchInputSelector` | `string` | CSS selector for the autocomplete input. Only needed when the autocomplete input is a different element from where the street address will be populated (e.g., a unified search field that populates separate street/city/state fields) |\n| `secondarySelector` | `string` | CSS selector for secondary address (apt, suite, etc.) |\n| `citySelector` | `string` | CSS selector for city field |\n| `stateSelector` | `string` | CSS selector for state field |\n| `zipcodeSelector` | `string` | CSS selector for ZIP code field |\n\n#### International Naming\n\nFor international address forms, you can use alternative names that align with Smarty's international API conventions:\n\n| US Name | International Alternative |\n|---------|--------------------------|\n| `citySelector` | `localitySelector` |\n| `stateSelector` | `administrativeAreaSelector`, `regionSelector`, `provinceSelector` |\n| `zipcodeSelector` | `postalCodeSelector`, `postcodeSelector`, `zipSelector` |\n\n### API Options\n\nThese options control the suggestions returned by the Smarty API:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `maxResults` | `number` | Maximum number of suggestions to return |\n| `includeOnlyCities` | `string[]` | Only return addresses in these cities |\n| `includeOnlyStates` | `string[]` | Only return addresses in these states (US only) |\n| `includeOnlyZipCodes` | `string[]` | Only return addresses in these ZIP/postal codes |\n| `excludeStates` | `string[]` | Exclude addresses in these states (US only) |\n| `preferCities` | `string[]` | Prefer addresses in these cities (US only) |\n| `preferStates` | `string[]` | Prefer addresses in these states (US only) |\n| `preferZipCodes` | `string[]` | Prefer addresses in these ZIP codes (US only) |\n| `preferRatio` | `number` | Ratio of preferred results, 0-100 (US only) |\n| `preferGeolocation` | `string` | US: name of a geolocation source; international: pass `\"on\"` to bias by sender IP (where supported by the API) |\n| `source` | `\"postal\" \\| \"all\"` | Address data source (US only) |\n\n#### International Naming\n\nAPI filter options also accept international alternatives:\n\n| US Name | International Alternative |\n|---------|--------------------------|\n| `includeOnlyCities` | `includeOnlyLocalities` |\n| `includeOnlyStates` | `includeOnlyAdministrativeAreas` |\n| `includeOnlyZipCodes` | `includeOnlyPostalCodes` |\n| `excludeStates` | `excludeAdministrativeAreas` |\n| `preferCities` | `preferLocalities` |\n| `preferStates` | `preferAdministrativeAreas` |\n| `preferZipCodes` | `preferPostalCodes` |\n\n## Lifecycle Hooks\n\nHooks let you respond to events and customize behavior:\n\n```javascript\nconst autocomplete = await SmartyAddress.create({\n  embeddedKey: \"your-key\",\n  streetSelector: \"#street\",\n\n  onAddressSelected: (address) => {\n    console.log(\"User selected:\", address);\n    // address contains: street_line, secondary, locality, administrativeArea, postalCode, country\n  },\n\n  onAutocompleteSuggestionsReceived: (suggestions) => {\n    // Filter or modify suggestions before display\n    return suggestions.filter((s) => s.administrativeArea !== \"CA\");\n  },\n\n  onDropdownOpen: () => {\n    console.log(\"Dropdown opened\");\n  },\n\n  onDropdownClose: () => {\n    console.log(\"Dropdown closed\");\n  },\n});\n```\n\n| Hook | Signature | Description |\n|------|-----------|-------------|\n| `onAddressSelected` | `(address: AutocompleteSuggestion) => void` | Called when user selects an address |\n| `onAutocompleteSuggestionsReceived` | `(suggestions: AutocompleteSuggestion[]) => AutocompleteSuggestion[]` | Called when suggestions arrive; return modified array |\n| `onDropdownOpen` | `() => void` | Called when dropdown opens |\n| `onDropdownClose` | `() => void` | Called when dropdown closes |\n\n## Themes\n\nFour built-in themes are available:\n\n```javascript\nimport SmartyAddress from \"smarty-address\";\n\n// Default theme (adapts to input colors)\nconst autocomplete = await SmartyAddress.create({\n  theme: SmartyAddress.themes.default,\n  // ...\n});\n\n// Light theme\nconst autocomplete = await SmartyAddress.create({\n  theme: SmartyAddress.themes.light,\n  // ...\n});\n\n// Dark theme\nconst autocomplete = await SmartyAddress.create({\n  theme: SmartyAddress.themes.dark,\n  // ...\n});\n\n// No styling (bring your own CSS)\nconst autocomplete = await SmartyAddress.create({\n  theme: SmartyAddress.themes.none,\n  // ...\n});\n```\n\n### Custom Themes\n\nThemes are arrays of CSS class names applied to the plugin components. Each class defines CSS variables that control the plugin's appearance (see `assets/styles/` for examples). Create a custom theme by providing your own array:\n\n```javascript\nconst autocomplete = await SmartyAddress.create({\n  theme: [\"my-dropdown-theme\", \"my-color-scheme\"],\n  // ...\n});\n```\n\nYou can also extend a built-in theme:\n\n```javascript\nconst autocomplete = await SmartyAddress.create({\n  theme: [...SmartyAddress.themes.dark, \"my-custom-overrides\"],\n  // ...\n});\n```\n\n## Multiple Instances\n\nCreate multiple autocomplete inputs on the same page by creating multiple `SmartyAddress` instances:\n\n```javascript\nconst shippingAutocomplete = await SmartyAddress.create({\n  embeddedKey: \"your-key\",\n  searchInputSelector: \"#shipping-address\",\n  streetSelector: \"#shipping-street\",\n  citySelector: \"#shipping-city\",\n  stateSelector: \"#shipping-state\",\n  zipcodeSelector: \"#shipping-zip\",\n});\n\nconst billingAutocomplete = await SmartyAddress.create({\n  embeddedKey: \"your-key\",\n  searchInputSelector: \"#billing-address\",\n  streetSelector: \"#billing-street\",\n  citySelector: \"#billing-city\",\n  stateSelector: \"#billing-state\",\n  zipcodeSelector: \"#billing-zip\",\n});\n```\n\nEach instance operates independently with isolated state.\n\n## Cleanup\n\nWhen you no longer need an autocomplete instance (e.g., when navigating away in a single-page application), call `destroy()` to clean up event listeners and DOM elements:\n\n```javascript\nconst autocomplete = await SmartyAddress.create({\n  embeddedKey: \"your-key\",\n  streetSelector: \"#street\",\n});\n\n// Later, when done with the autocomplete:\nautocomplete.destroy();\n```\n\nThis removes all event listeners, disconnects observers, and removes injected DOM elements to prevent memory leaks.\n\n## Service Overrides\n\nFor advanced customization, you can extend and replace any internal service:\n\n```javascript\nimport SmartyAddress from \"smarty-address\";\n\nclass CustomApiService extends SmartyAddress.services.ApiService {\n  // Override methods to customize API behavior\n}\n\nclass CustomFormService extends SmartyAddress.services.FormService {\n  // Override methods to customize form population\n}\n\nconst autocomplete = await SmartyAddress.create({\n  embeddedKey: \"your-key\",\n  streetSelector: \"#street\",\n  services: {\n    ApiService: CustomApiService,\n    FormService: CustomFormService,\n  },\n});\n```\n\n### Available Services\n\n| Service | Purpose |\n|---------|---------|\n| `ApiService` | Handles Smarty API calls and response processing |\n| `DropdownService` | Manages dropdown UI orchestration, DOM creation, and event handling |\n| `DropdownStateService` | Manages dropdown state (open/close, selected items, suggestion tracking) |\n| `KeyboardNavigationService` | Handles keyboard navigation within the dropdown (arrow keys, enter, escape) |\n| `FormService` | Populates form fields when an address is selected |\n| `DomService` | Generic DOM utilities for element creation, manipulation, and form value handling |\n| `StyleService` | CSS generation, dynamic style calculation, and style block formatting |\n| `FormatService` | Address formatting for display and text highlighting for search matches |\n| `ColorService` | Color conversion utilities (RGB/HSL), CSS color parsing, and percentage conversions |\n\nAll services extend `BaseService` which provides:\n- `setServices(services)` - Receives references to all other services\n- `init(config)` - Called with configuration (override as needed)\n- Typed protected getters (e.g., `this.apiService`, `this.formService`) to access other services\n\n## API Reference\n\n### Static Methods\n\n| Method | Signature | Description |\n|--------|-----------|-------------|\n| `SmartyAddress.create` | `(config: SmartyAddressConfig) => Promise<SmartyAddress>` | Creates and initializes a new autocomplete instance |\n\n### Instance Methods\n\n| Method | Signature | Description |\n|--------|-----------|-------------|\n| `destroy` | `() => void` | Removes all event listeners, observers, and DOM elements |\n\n### Static Properties\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `SmartyAddress.themes` | `object` | Built-in theme presets (`default`, `light`, `dark`, `none`) |\n| `SmartyAddress.services` | `object` | Service classes for extension |\n| `SmartyAddress.defaultConfig` | `object` | Default configuration values |\n\n### AutocompleteSuggestion Object\n\nThe address object passed to hooks contains:\n\n```typescript\ninterface AutocompleteSuggestion {\n  street_line: string;\n  secondary?: string;\n  locality: string;\n  administrativeArea: string;\n  postalCode: string;\n  country: string;\n  entries?: number;\n  metadata?: Record<string, unknown>;\n}\n```\n","readmeFilename":"README.md","homepage":"https://github.com/smarty/smarty-address#readme","repository":{"url":"git+https://github.com/smarty/smarty-address.git","type":"git"},"bugs":{"url":"https://github.com/smarty/smarty-address/issues"}}