@cosmkiwi/nz-address-svelte 0.0.0-stage → 0.1.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.
@@ -0,0 +1,601 @@
1
+ <script lang="ts">
2
+ import {
3
+ NZAddressSearch,
4
+ formatCorridorLocality,
5
+ formatCorridorStreet,
6
+ matchLeaves,
7
+ resolveAddress,
8
+ type AddressLeaf,
9
+ type CorridorResult,
10
+ type ParsedAddressQuery,
11
+ } from "@cosmkiwi/nz-address";
12
+ import type { AddressCompleteProps } from "./types.js";
13
+
14
+ interface VerifiedCandidate {
15
+ corridor: CorridorResult;
16
+ leaf: AddressLeaf;
17
+ rank: number; // 0 = exact, 1 = same base num (unit/suffix), 2 = prefix, 3 = nearest fallback
18
+ }
19
+
20
+ let {
21
+ cdnUrl,
22
+ client,
23
+ value = $bindable(""),
24
+ placeholder = "Enter a New Zealand address...",
25
+ maxResults = 8,
26
+ minVerifyChars = 3,
27
+ probeLimit = 16,
28
+ disabled = false,
29
+ id,
30
+ name,
31
+ onSelect,
32
+ onTelemetry,
33
+ }: AddressCompleteProps = $props();
34
+
35
+ const listboxId = $derived(id ? `${id}-listbox` : "nz-address-listbox");
36
+ const engine = $derived(client ?? new NZAddressSearch({ cdnUrl }));
37
+
38
+ let inputEl = $state<HTMLInputElement | null>(null);
39
+ let isOpen = $state(false);
40
+ let isInitializing = $state(false);
41
+ let isLoadingNumbers = $state(false);
42
+ let errorMsg = $state<string | null>(null);
43
+
44
+ let parsedQuery = $state<ParsedAddressQuery | null>(null);
45
+ let corridors = $state<CorridorResult[]>([]);
46
+ let verifiedCandidates = $state<VerifiedCandidate[]>([]);
47
+ let verifiedHeader = $state<string | null>(null);
48
+
49
+ let highlightedIndex = $state(0);
50
+ let searchSeq = 0;
51
+ let verifyTimer: ReturnType<typeof setTimeout> | null = null;
52
+
53
+ const visibleItemCount = $derived(
54
+ verifiedCandidates.length > 0 ? verifiedCandidates.length : corridors.length,
55
+ );
56
+
57
+ async function ensureInit(): Promise<boolean> {
58
+ if (engine.isReady) return true;
59
+ isInitializing = true;
60
+ errorMsg = null;
61
+ const t0 = performance.now();
62
+ try {
63
+ await engine.init();
64
+ onTelemetry?.({
65
+ stage: "init",
66
+ durationMs: performance.now() - t0,
67
+ });
68
+ return true;
69
+ } catch (err) {
70
+ errorMsg =
71
+ err instanceof Error ? err.message : "Failed to load NZ address index";
72
+ return false;
73
+ } finally {
74
+ isInitializing = false;
75
+ }
76
+ }
77
+
78
+ async function verifyCorridorsForNumber(
79
+ seq: number,
80
+ candidateCorridors: CorridorResult[],
81
+ numberPart: NonNullable<ParsedAddressQuery["numberPart"]>,
82
+ ) {
83
+ isLoadingNumbers = true;
84
+ const t0 = performance.now();
85
+
86
+ try {
87
+ const slices = await Promise.all(
88
+ candidateCorridors.map(async (corridor) => ({
89
+ corridor,
90
+ stats: await engine.loadNumbersWithStats(corridor),
91
+ })),
92
+ );
93
+ if (seq !== searchSeq) return;
94
+
95
+ let totalBytes = 0;
96
+ let allCached = true;
97
+ for (const { stats } of slices) {
98
+ totalBytes += stats.byteLength;
99
+ if (!stats.fromCache) allCached = false;
100
+ }
101
+
102
+ const realMatches: VerifiedCandidate[] = [];
103
+ for (const { corridor, stats } of slices) {
104
+ const matched = matchLeaves(stats.leaves, numberPart, maxResults);
105
+ if (matched.isNearestFallback) continue;
106
+ for (const leaf of matched.matches) {
107
+ let rank = 2;
108
+ if (matched.exact && leaf.label === matched.exact.label) {
109
+ rank = 0;
110
+ } else if (leaf.num === numberPart.num) {
111
+ rank = 1;
112
+ }
113
+ realMatches.push({ corridor, leaf, rank });
114
+ }
115
+ }
116
+
117
+ onTelemetry?.({
118
+ stage: "range-fetch",
119
+ durationMs: performance.now() - t0,
120
+ byteLength: totalBytes,
121
+ fromCache: allCached,
122
+ resultCount: realMatches.length,
123
+ query: `${numberPart.raw} (${slices.length} street${slices.length === 1 ? "" : "s"})`,
124
+ });
125
+
126
+ if (realMatches.length > 0) {
127
+ realMatches.sort(
128
+ (a, b) =>
129
+ a.rank - b.rank || b.corridor.leafCount - a.corridor.leafCount,
130
+ );
131
+ verifiedCandidates = realMatches.slice(0, maxResults);
132
+ verifiedHeader = null;
133
+ highlightedIndex = 0;
134
+ isOpen = true;
135
+ return;
136
+ }
137
+
138
+ if (slices.length > 0) {
139
+ const top = slices[0];
140
+ const nearest = matchLeaves(
141
+ top.stats.leaves,
142
+ numberPart,
143
+ Math.min(maxResults, 6),
144
+ );
145
+ verifiedCandidates = nearest.matches.map((leaf) => ({
146
+ corridor: top.corridor,
147
+ leaf,
148
+ rank: 3,
149
+ }));
150
+ verifiedHeader = `No exact match for ${numberPart.raw} — nearest on ${formatCorridorStreet(top.corridor)}`;
151
+ highlightedIndex = 0;
152
+ isOpen = true;
153
+ }
154
+ } catch (err) {
155
+ if (seq === searchSeq) {
156
+ errorMsg =
157
+ err instanceof Error ? err.message : "Failed to verify street numbers";
158
+ }
159
+ } finally {
160
+ if (seq === searchSeq) isLoadingNumbers = false;
161
+ }
162
+ }
163
+
164
+ async function runSearch(raw: string) {
165
+ if (verifyTimer) {
166
+ clearTimeout(verifyTimer);
167
+ verifyTimer = null;
168
+ }
169
+
170
+ const seq = ++searchSeq;
171
+ verifiedCandidates = [];
172
+ verifiedHeader = null;
173
+ errorMsg = null;
174
+
175
+ if (!raw.trim()) {
176
+ parsedQuery = null;
177
+ corridors = [];
178
+ isOpen = false;
179
+ return;
180
+ }
181
+
182
+ const ok = await ensureInit();
183
+ if (!ok || seq !== searchSeq) return;
184
+
185
+ const fetchLimit = Math.max(maxResults, probeLimit);
186
+ const result = await engine.search(raw, fetchLimit);
187
+ if (seq !== searchSeq) return;
188
+
189
+ parsedQuery = result.parsed;
190
+ corridors = result.corridors.slice(0, maxResults);
191
+ highlightedIndex = 0;
192
+ isOpen = true;
193
+
194
+ onTelemetry?.({
195
+ stage: "corridor-search",
196
+ durationMs: result.durationMs,
197
+ resultCount: result.corridors.length,
198
+ query: raw,
199
+ });
200
+
201
+ if (
202
+ result.parsed.numberPart &&
203
+ result.parsed.roadQuery.length >= minVerifyChars &&
204
+ result.corridors.length > 0
205
+ ) {
206
+ const numPart = result.parsed.numberPart;
207
+ const toProbe = result.corridors.slice(0, probeLimit);
208
+ verifyTimer = setTimeout(() => {
209
+ if (seq === searchSeq) {
210
+ void verifyCorridorsForNumber(seq, toProbe, numPart);
211
+ }
212
+ }, 80);
213
+ }
214
+ }
215
+
216
+ async function handleCorridorSelect(corridor: CorridorResult) {
217
+ const seq = ++searchSeq;
218
+ isLoadingNumbers = true;
219
+ errorMsg = null;
220
+
221
+ try {
222
+ const stats = await engine.loadNumbersWithStats(corridor);
223
+ if (seq !== searchSeq) return;
224
+
225
+ onTelemetry?.({
226
+ stage: "range-fetch",
227
+ durationMs: stats.durationMs,
228
+ byteLength: stats.byteLength,
229
+ fromCache: stats.fromCache,
230
+ resultCount: stats.leaves.length,
231
+ query: formatCorridorStreet(corridor),
232
+ });
233
+
234
+ const numPart = parsedQuery?.numberPart;
235
+ if (numPart) {
236
+ const matched = matchLeaves(stats.leaves, numPart, maxResults);
237
+ if (matched.exact) {
238
+ commitSelection(corridor, matched.exact);
239
+ return;
240
+ }
241
+ verifiedCandidates = matched.matches.map((leaf) => ({
242
+ corridor,
243
+ leaf,
244
+ rank: matched.isNearestFallback ? 3 : 1,
245
+ }));
246
+ verifiedHeader = matched.isNearestFallback
247
+ ? `No exact match for ${numPart.raw} — nearest on ${formatCorridorStreet(corridor)}`
248
+ : `Select number on ${formatCorridorStreet(corridor)}`;
249
+ highlightedIndex = 0;
250
+ isOpen = true;
251
+ inputEl?.focus();
252
+ return;
253
+ }
254
+
255
+ verifiedCandidates = stats.leaves
256
+ .slice(0, maxResults)
257
+ .map((leaf) => ({ corridor, leaf, rank: 0 }));
258
+ verifiedHeader = `Select number on ${formatCorridorStreet(corridor)}, ${formatCorridorLocality(corridor)}`;
259
+ highlightedIndex = 0;
260
+ isOpen = true;
261
+ inputEl?.focus();
262
+ } catch (err) {
263
+ errorMsg =
264
+ err instanceof Error ? err.message : "Failed to load street numbers";
265
+ } finally {
266
+ if (seq === searchSeq) isLoadingNumbers = false;
267
+ }
268
+ }
269
+
270
+ function commitSelection(corridor: CorridorResult, leaf: AddressLeaf) {
271
+ const resolved = resolveAddress(corridor, leaf);
272
+ value = resolved.fullAddress;
273
+ verifiedCandidates = [];
274
+ verifiedHeader = null;
275
+ corridors = [];
276
+ parsedQuery = null;
277
+ isOpen = false;
278
+ onSelect?.(resolved);
279
+ }
280
+
281
+ function handleInput(e: Event) {
282
+ const target = e.currentTarget as HTMLInputElement;
283
+ value = target.value;
284
+ void runSearch(value);
285
+ }
286
+
287
+ function handleFocus() {
288
+ void ensureInit();
289
+ if (
290
+ verifiedCandidates.length > 0 ||
291
+ corridors.length > 0 ||
292
+ parsedQuery?.numberPart
293
+ ) {
294
+ isOpen = true;
295
+ }
296
+ }
297
+
298
+ function handleKeydown(e: KeyboardEvent) {
299
+ if (e.key === "Escape") {
300
+ if (isOpen) {
301
+ e.preventDefault();
302
+ isOpen = false;
303
+ }
304
+ return;
305
+ }
306
+
307
+ if (!isOpen || visibleItemCount === 0) return;
308
+
309
+ if (e.key === "ArrowDown") {
310
+ e.preventDefault();
311
+ highlightedIndex = (highlightedIndex + 1) % visibleItemCount;
312
+ } else if (e.key === "ArrowUp") {
313
+ e.preventDefault();
314
+ highlightedIndex =
315
+ (highlightedIndex - 1 + visibleItemCount) % visibleItemCount;
316
+ } else if (e.key === "Enter") {
317
+ e.preventDefault();
318
+ if (verifiedCandidates.length > 0) {
319
+ const picked = verifiedCandidates[highlightedIndex];
320
+ if (picked) commitSelection(picked.corridor, picked.leaf);
321
+ } else {
322
+ const corridor = corridors[highlightedIndex];
323
+ if (corridor) void handleCorridorSelect(corridor);
324
+ }
325
+ }
326
+ }
327
+
328
+ function handleBlur(e: FocusEvent) {
329
+ const related = e.relatedTarget as HTMLElement | null;
330
+ const current = e.currentTarget as HTMLElement;
331
+ if (!related || !current.contains(related)) {
332
+ isOpen = false;
333
+ }
334
+ }
335
+ </script>
336
+
337
+ <div class="nz-addr-root" onfocusout={handleBlur}>
338
+ <div class="nz-addr-input-box" class:is-focused={isOpen} class:is-disabled={disabled}>
339
+ <input
340
+ bind:this={inputEl}
341
+ {id}
342
+ {name}
343
+ type="text"
344
+ class="nz-addr-input"
345
+ role="combobox"
346
+ autocomplete="off"
347
+ spellcheck="false"
348
+ aria-autocomplete="list"
349
+ aria-expanded={isOpen}
350
+ aria-controls={listboxId}
351
+ {disabled}
352
+ {value}
353
+ {placeholder}
354
+ oninput={handleInput}
355
+ onfocus={handleFocus}
356
+ onkeydown={handleKeydown}
357
+ />
358
+
359
+ {#if isInitializing || isLoadingNumbers}
360
+ <span class="nz-addr-spinner" aria-label="Loading"></span>
361
+ {:else if value}
362
+ <button
363
+ type="button"
364
+ class="nz-addr-clear"
365
+ aria-label="Clear address"
366
+ onclick={() => {
367
+ if (verifyTimer) clearTimeout(verifyTimer);
368
+ value = "";
369
+ verifiedCandidates = [];
370
+ verifiedHeader = null;
371
+ corridors = [];
372
+ parsedQuery = null;
373
+ isOpen = false;
374
+ inputEl?.focus();
375
+ }}
376
+ >
377
+ &times;
378
+ </button>
379
+ {/if}
380
+ </div>
381
+
382
+ {#if errorMsg}
383
+ <div class="nz-addr-error" role="alert">{errorMsg}</div>
384
+ {/if}
385
+
386
+ {#if isOpen && !errorMsg}
387
+ <div id={listboxId} class="nz-addr-dropdown" role="listbox">
388
+ {#if isInitializing}
389
+ <div class="nz-addr-hint">Loading NZ street index (~2 MB)...</div>
390
+
391
+ {:else if verifiedCandidates.length > 0}
392
+ {#if verifiedHeader}
393
+ <div class="nz-addr-header">{verifiedHeader}</div>
394
+ {/if}
395
+ {#each verifiedCandidates as item, i (item.corridor.id + ":" + item.leaf.label + ":" + i)}
396
+ <button
397
+ type="button"
398
+ role="option"
399
+ aria-selected={highlightedIndex === i}
400
+ class="nz-addr-option"
401
+ class:is-highlighted={highlightedIndex === i}
402
+ onmouseenter={() => (highlightedIndex = i)}
403
+ onmousedown={(e) => {
404
+ e.preventDefault();
405
+ commitSelection(item.corridor, item.leaf);
406
+ }}
407
+ >
408
+ <span class="nz-addr-primary">
409
+ <strong>{item.leaf.label}</strong> {formatCorridorStreet(item.corridor)}
410
+ </span>
411
+ <span class="nz-addr-secondary">
412
+ {formatCorridorLocality(item.corridor)}
413
+ </span>
414
+ </button>
415
+ {/each}
416
+
417
+ {:else if parsedQuery?.numberPart && parsedQuery.roadQuery.length < minVerifyChars}
418
+ <div class="nz-addr-hint">
419
+ Keep typing the street name...
420
+ </div>
421
+
422
+ {:else if corridors.length > 0}
423
+ {#if parsedQuery?.numberPart}
424
+ <div class="nz-addr-hint">Checking street numbers...</div>
425
+ {:else}
426
+ {#each corridors as corridor, i (corridor.id)}
427
+ <button
428
+ type="button"
429
+ role="option"
430
+ aria-selected={highlightedIndex === i}
431
+ class="nz-addr-option"
432
+ class:is-highlighted={highlightedIndex === i}
433
+ onmouseenter={() => (highlightedIndex = i)}
434
+ onmousedown={(e) => {
435
+ e.preventDefault();
436
+ void handleCorridorSelect(corridor);
437
+ }}
438
+ >
439
+ <span class="nz-addr-primary">
440
+ {formatCorridorStreet(corridor)}
441
+ </span>
442
+ <span class="nz-addr-secondary">
443
+ {formatCorridorLocality(corridor)}
444
+ <span class="nz-addr-count">· {corridor.leafCount} addresses</span>
445
+ </span>
446
+ </button>
447
+ {/each}
448
+ {/if}
449
+
450
+ {:else if value.trim().length >= 2}
451
+ <div class="nz-addr-hint">No matching NZ streets found.</div>
452
+ {/if}
453
+ </div>
454
+ {/if}
455
+ </div>
456
+
457
+ <style>
458
+ .nz-addr-root {
459
+ position: relative;
460
+ width: 100%;
461
+ font-family: var(--nz-addr-font, system-ui, -apple-system, sans-serif);
462
+ }
463
+
464
+ .nz-addr-input-box {
465
+ display: flex;
466
+ align-items: center;
467
+ gap: 0.4rem;
468
+ width: 100%;
469
+ padding: 0.45rem 0.7rem;
470
+ background: var(--nz-addr-bg, #ffffff);
471
+ border: 1px solid var(--nz-addr-border, #cbd5e1);
472
+ border-radius: var(--nz-addr-radius, 8px);
473
+ box-sizing: border-box;
474
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
475
+ }
476
+
477
+ .nz-addr-input-box.is-focused,
478
+ .nz-addr-input-box:focus-within {
479
+ border-color: var(--nz-addr-accent, #2563eb);
480
+ box-shadow: 0 0 0 3px var(--nz-addr-focus-ring, rgba(37, 99, 235, 0.15));
481
+ }
482
+
483
+ .nz-addr-input-box.is-disabled {
484
+ opacity: 0.6;
485
+ cursor: not-allowed;
486
+ }
487
+
488
+ .nz-addr-clear {
489
+ display: inline-flex;
490
+ align-items: center;
491
+ justify-content: center;
492
+ border: none;
493
+ background: transparent;
494
+ color: inherit;
495
+ cursor: pointer;
496
+ font-size: 1.1rem;
497
+ line-height: 1;
498
+ padding: 0 0.15rem;
499
+ opacity: 0.65;
500
+ }
501
+
502
+ .nz-addr-clear:hover {
503
+ opacity: 1;
504
+ }
505
+
506
+ .nz-addr-input {
507
+ flex: 1;
508
+ min-width: 0;
509
+ border: none;
510
+ outline: none;
511
+ background: transparent;
512
+ color: var(--nz-addr-fg, #0f172a);
513
+ font-size: var(--nz-addr-font-size, 0.95rem);
514
+ line-height: 1.4;
515
+ }
516
+
517
+ .nz-addr-spinner {
518
+ width: 1rem;
519
+ height: 1rem;
520
+ border: 2px solid var(--nz-addr-border, #cbd5e1);
521
+ border-top-color: var(--nz-addr-accent, #2563eb);
522
+ border-radius: 50%;
523
+ animation: nz-addr-spin 0.6s linear infinite;
524
+ flex-shrink: 0;
525
+ }
526
+
527
+ @keyframes nz-addr-spin {
528
+ to {
529
+ transform: rotate(360deg);
530
+ }
531
+ }
532
+
533
+ .nz-addr-dropdown {
534
+ position: absolute;
535
+ z-index: 50;
536
+ top: calc(100% + 4px);
537
+ left: 0;
538
+ right: 0;
539
+ max-height: 320px;
540
+ overflow-y: auto;
541
+ background: var(--nz-addr-bg, #ffffff);
542
+ border: 1px solid var(--nz-addr-border, #cbd5e1);
543
+ border-radius: var(--nz-addr-radius, 8px);
544
+ box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
545
+ padding: 0.25rem;
546
+ }
547
+
548
+ .nz-addr-header {
549
+ padding: 0.4rem 0.65rem 0.25rem;
550
+ font-size: 0.75rem;
551
+ font-weight: 600;
552
+ text-transform: uppercase;
553
+ letter-spacing: 0.03em;
554
+ color: var(--nz-addr-muted, #64748b);
555
+ }
556
+
557
+ .nz-addr-option {
558
+ display: flex;
559
+ flex-direction: column;
560
+ align-items: flex-start;
561
+ gap: 0.1rem;
562
+ width: 100%;
563
+ padding: 0.5rem 0.65rem;
564
+ border: none;
565
+ border-radius: 6px;
566
+ background: transparent;
567
+ text-align: left;
568
+ cursor: pointer;
569
+ color: var(--nz-addr-fg, #0f172a);
570
+ }
571
+
572
+ .nz-addr-option.is-highlighted {
573
+ background: var(--nz-addr-hover-bg, #f1f5f9);
574
+ }
575
+
576
+ .nz-addr-primary {
577
+ font-size: 0.92rem;
578
+ line-height: 1.3;
579
+ }
580
+
581
+ .nz-addr-secondary {
582
+ font-size: 0.8rem;
583
+ color: var(--nz-addr-muted, #64748b);
584
+ }
585
+
586
+ .nz-addr-count {
587
+ opacity: 0.8;
588
+ }
589
+
590
+ .nz-addr-hint {
591
+ padding: 0.65rem 0.75rem;
592
+ font-size: 0.85rem;
593
+ color: var(--nz-addr-muted, #64748b);
594
+ }
595
+
596
+ .nz-addr-error {
597
+ margin-top: 0.35rem;
598
+ font-size: 0.82rem;
599
+ color: #dc2626;
600
+ }
601
+ </style>
@@ -0,0 +1,10 @@
1
+ import type { Component } from "svelte";
2
+ import type { AddressCompleteProps } from "./types.js";
3
+
4
+ export declare const AddressComplete: Component<AddressCompleteProps, {}, "value">;
5
+ export type { AddressCompleteProps, AddressTelemetry } from "./types.js";
6
+ export type {
7
+ AddressLeaf,
8
+ CorridorResult,
9
+ ResolvedAddress,
10
+ } from "@cosmkiwi/nz-address";
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default as AddressComplete } from "./AddressComplete.svelte";
@@ -0,0 +1,37 @@
1
+ import type { NZAddressSearch, ResolvedAddress } from "@cosmkiwi/nz-address";
2
+
3
+ export interface AddressTelemetry {
4
+ stage: "init" | "corridor-search" | "range-fetch";
5
+ durationMs: number;
6
+ byteLength?: number;
7
+ fromCache?: boolean;
8
+ resultCount?: number;
9
+ query?: string;
10
+ }
11
+
12
+ export interface AddressCompleteProps {
13
+ /** Base URL where the 5 binary index files and manifest are hosted. */
14
+ cdnUrl?: string;
15
+ /** Optional pre-configured NZAddressSearch instance. */
16
+ client?: NZAddressSearch;
17
+ /** Bound text value of the input. */
18
+ value?: string;
19
+ /** Input placeholder text. */
20
+ placeholder?: string;
21
+ /** Maximum corridor or number suggestions to display. */
22
+ maxResults?: number;
23
+ /** Minimum road-name characters before firing Range verification for numbered queries (default 3). */
24
+ minVerifyChars?: number;
25
+ /** Maximum candidate corridors to Range-verify in parallel for numbered queries (default 16). */
26
+ probeLimit?: number;
27
+ /** Disable the input. */
28
+ disabled?: boolean;
29
+ /** Optional HTML id for the input element. */
30
+ id?: string;
31
+ /** Optional HTML name for form submission. */
32
+ name?: string;
33
+ /** Fired when a full address (with exact lat/lon) is selected. */
34
+ onSelect?: (address: ResolvedAddress) => void;
35
+ /** Optional telemetry callback for benchmarking latency & Range bytes. */
36
+ onTelemetry?: (event: AddressTelemetry) => void;
37
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,44 @@
1
1
  {
2
2
  "name": "@cosmkiwi/nz-address-svelte",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Svelte 5 Single Smart Input autocomplete component for @cosmkiwi/nz-address",
5
+ "type": "module",
6
+ "svelte": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "svelte": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "scripts": {
24
+ "build": "bun run scripts/build.ts"
25
+ },
26
+ "keywords": [
27
+ "new-zealand",
28
+ "nz",
29
+ "address",
30
+ "autocomplete",
31
+ "geocoding",
32
+ "linz",
33
+ "svelte",
34
+ "svelte-5"
35
+ ],
36
+ "homepage": "https://cosm.kiwi/nz-address/",
37
+ "peerDependencies": {
38
+ "svelte": "^5.0.0"
39
+ },
40
+ "dependencies": {
41
+ "@cosmkiwi/nz-address": "0.1.0"
42
+ },
43
+ "license": "MIT"
44
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.