@h-k-dev/angular-email-editor 0.0.0-stage → 0.0.2
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.
- package/README.md +127 -2
- package/fesm2022/h-k-dev-angular-email-editor-actions.mjs +179 -0
- package/fesm2022/h-k-dev-angular-email-editor-actions.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-address-chip.mjs +383 -0
- package/fesm2022/h-k-dev-angular-email-editor-address-chip.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-address-input.mjs +1106 -0
- package/fesm2022/h-k-dev-angular-email-editor-address-input.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-address.mjs +489 -0
- package/fesm2022/h-k-dev-angular-email-editor-address.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-anchor.mjs +64 -0
- package/fesm2022/h-k-dev-angular-email-editor-anchor.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-attachment-chip.mjs +387 -0
- package/fesm2022/h-k-dev-angular-email-editor-attachment-chip.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-attachment-chips.mjs +80 -0
- package/fesm2022/h-k-dev-angular-email-editor-attachment-chips.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-chat-input.mjs +346 -0
- package/fesm2022/h-k-dev-angular-email-editor-chat-input.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-focus.mjs +78 -0
- package/fesm2022/h-k-dev-angular-email-editor-focus.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-image.mjs +132 -0
- package/fesm2022/h-k-dev-angular-email-editor-image.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-material.mjs +124 -0
- package/fesm2022/h-k-dev-angular-email-editor-material.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-metrics.mjs +243 -0
- package/fesm2022/h-k-dev-angular-email-editor-metrics.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-palette.mjs +87 -0
- package/fesm2022/h-k-dev-angular-email-editor-palette.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-proposal.mjs +307 -0
- package/fesm2022/h-k-dev-angular-email-editor-proposal.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor-suggestion-menu.mjs +392 -0
- package/fesm2022/h-k-dev-angular-email-editor-suggestion-menu.mjs.map +1 -0
- package/fesm2022/h-k-dev-angular-email-editor.mjs +18820 -0
- package/fesm2022/h-k-dev-angular-email-editor.mjs.map +1 -0
- package/package.json +133 -3
- package/styles/_scroll.scss +101 -0
- package/types/h-k-dev-angular-email-editor-actions.d.ts +147 -0
- package/types/h-k-dev-angular-email-editor-address-chip.d.ts +234 -0
- package/types/h-k-dev-angular-email-editor-address-input.d.ts +449 -0
- package/types/h-k-dev-angular-email-editor-address.d.ts +125 -0
- package/types/h-k-dev-angular-email-editor-anchor.d.ts +44 -0
- package/types/h-k-dev-angular-email-editor-attachment-chip.d.ts +271 -0
- package/types/h-k-dev-angular-email-editor-attachment-chips.d.ts +48 -0
- package/types/h-k-dev-angular-email-editor-chat-input.d.ts +101 -0
- package/types/h-k-dev-angular-email-editor-focus.d.ts +46 -0
- package/types/h-k-dev-angular-email-editor-image.d.ts +66 -0
- package/types/h-k-dev-angular-email-editor-material.d.ts +65 -0
- package/types/h-k-dev-angular-email-editor-metrics.d.ts +110 -0
- package/types/h-k-dev-angular-email-editor-palette.d.ts +51 -0
- package/types/h-k-dev-angular-email-editor-proposal.d.ts +170 -0
- package/types/h-k-dev-angular-email-editor-suggestion-menu.d.ts +177 -0
- package/types/h-k-dev-angular-email-editor.d.ts +3959 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h-k-dev-angular-email-editor-address-input.mjs","sources":["../../../projects/angular-email-editor/address-input/address-drag-group.ts","../../../projects/angular-email-editor/address-input/address-input.slots.ts","../../../projects/angular-email-editor/address-input/address-input.ts","../../../projects/angular-email-editor/address-input/address-input.html","../../../projects/angular-email-editor/address-input/address-rules.ts","../../../projects/angular-email-editor/address-input/public-api.ts","../../../projects/angular-email-editor/address-input/h-k-dev-angular-email-editor-address-input.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Scopes chip drag and drop to the address inputs inside it: they trade\n * chips with each other and refuse anyone else's — a writer's From, To, Cc\n * and Bcc, and not the rows of another writer on the same page. Put it on\n * whatever holds the rows:\n *\n * <form emailAddressDragGroup [formRoot]=\"envelope\">\n * <div email-address-input [formField]=\"envelope.from\" limit=\"1\"></div>\n * <div email-address-input [formField]=\"envelope.to\"></div>\n * …\n * </form>\n *\n * The nearest group around an input is its group. Inputs in no group make\n * up one group of their own, so a page with a single writer needs none.\n * Behaviour only: it renders nothing and sets no attribute.\n *\n * A chip lands in an address input or nowhere — it carries no plain text,\n * so a subject line, an editor or any other field leaves it alone.\n */\n@Directive({ selector: '[emailAddressDragGroup]', exportAs: 'emailAddressDragGroup' })\nexport class AddressDragGroup {}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * The address input's label slot — opt in. By default the control owns no\n * label: the template that holds the form draws the row and the label beside\n * it, as it does for a plain `<input>`. A host that wants the label *inside*\n * the control — at the start of the chips, the chips wrapping under it, the\n * whole control one box (a Material form field around it, as iusta core\n * writes its rows) — hands the control a template:\n *\n * <div email-address-input [formField]=\"envelope.to\">\n * <ng-template emailAddressLabel>To</ng-template>\n * </div>\n *\n * The control renders it first in its row, in a box of its own\n * (`[data-slot=label]`), and names its text input by it — unless the host\n * named the input itself (`aria-labelledby` / `aria-label`).\n */\n@Directive({ selector: 'ng-template[emailAddressLabel]' })\nexport class AddressInputLabel {\n readonly template = inject(TemplateRef);\n}\n","import {\n Component,\n ElementRef,\n Injector,\n afterNextRender,\n inject,\n\n // Signals\n booleanAttribute,\n computed,\n contentChild,\n input,\n model,\n numberAttribute,\n output,\n signal,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\nimport { ADDRESS_RULES, addressKey, isMailbox, isPending, separatesAt } from '@h-k-dev/angular-email-editor/address';\nimport {\n ADDRESS_DRAG_TYPE,\n AddressChip,\n AddressChipRemove,\n} from '@h-k-dev/angular-email-editor/address-chip';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AddressDragGroup } from './address-drag-group';\nimport { AddressInputLabel } from './address-input.slots';\n\nlet nextId = 0;\n\n/** Where a drag over an input would land — the index in its list — and the\n line drawn there, in the chip list's own coordinates. */\ninterface DropMarker {\n index: number;\n x: number;\n y: number;\n height: number;\n}\n\n/** The chip drag in flight from an address input on this page: where it\n came from, and whether an address input took it as a move. The drag\n data can't be read until the drop, and `dropEffect` at the drag's end is\n not to be trusted (WebKit reports `all`): this is how a target refuses\n a duplicate before the drop and how the source learns to let go. */\nlet drag: {\n source: AddressInput;\n group: AddressDragGroup | null;\n address: string;\n moved: boolean;\n} | null = null;\n\n/** The entry a chip on this page last put on the clipboard — by a hold, by\n Ctrl+C or by Ctrl+X. A hold writes plain text only (the async clipboard\n takes no type of ours), so a paste of exactly this text is known to be a\n chip's, and comes back as one. */\nlet clipboardEntry: string | null = null;\n\n/**\n * An address field the way Gmail's works: committed addresses as chips,\n * free typing after them. Enter, comma, semicolon or a paste commits what\n * was typed — a comma or semicolon inside a quoted name or angle brackets is\n * just typed, and no key commits while an IME is composing; Backspace on the empty input takes the chip before the caret\n * back for editing; `limit` caps the count (From takes one) and hides the\n * input once reached.\n *\n * **Only an address becomes a chip while typing.** Enter, comma, semicolon,\n * Tab and a paste commit the addresses in what was typed and leave the rest —\n * what is not an address yet — in the input, flagged, for the user to\n * finish. Leaving the field commits everything, so the form sees the typo\n * and flags it; and focus coming back hands the malformed entries at the\n * end of the list straight back to the input, as plain typing again.\n *\n * **The input is always at the end, and editing happens there.** A chip\n * taken back for editing — a double click, Enter on a picked chip,\n * Backspace, `edit()` — leaves its place: its address goes into the input,\n * after the last chip, exactly like a typo the field handed back — and what\n * is committed from it joins the end of the list. There is one place where\n * text is typed, and it never moves.\n *\n * **One pending edit at a time.** There is only ever one thing being fixed,\n * and it is what the caret is on. Starting another edit — `edit()`, Enter\n * on a picked chip, Backspace taking the chip before the caret back — ends\n * the one pending: a typo left in the input and any chip that is not an\n * address go.\n *\n * **Chips while focused, a line of text otherwise.** With focus elsewhere\n * the addresses read as a comma-separated line — no surface, no buttons;\n * focus in the input turns them into chips.\n *\n * **The arrow keys rove the chips; the caret stays in the input.** With\n * the caret at the start of the typing, ← puts a highlight on the last chip\n * and walks back along the list; → walks forward, and past the last chip\n * returns to the caret. Enter or F2 — or a double click on\n * any chip — edits it, Alt+← and Alt+→ move it a place along the list,\n * Ctrl+C (Cmd+C) copies it, as a hold does, and Ctrl+X cuts it — unless\n * text is selected in the input, which copies as ever —\n * Backspace or Delete removes it, Escape drops the highlight, and so does\n * typing. A click on a chip highlights it. Reaching a chip either way is\n * being done with the typing: an address in the input becomes a chip first,\n * as Enter would make it. The highlight is\n * `aria-activedescendant` on the input and `aria-current` on the chip, and the\n * chips' remove buttons stay out of the tab order — Tab lands on the input —\n * except when the field is full and has no input to land on.\n *\n * A display name is kept — `Ada Lovelace <ada@example.com>` is one chip\n * that shows \"Ada Lovelace\" — and the value stays `string[]` in header\n * form, ready for a `To:` line. Typed bare, `Ada Lovelace ada@example.com`\n * becomes that same chip. An address is in the list once: another entry\n * with the same address — in any case, under any name — is dropped.\n *\n * **The control, not the row.** By default it owns no label and draws no row: the\n * template that holds the form puts it in a row of its own making, beside a\n * label of its own making, exactly as it does for a plain `<input>` — and\n * names the control through `aria-labelledby` (the label's id) or\n * `aria-label`, which land on the text input inside, the element assistive\n * tech reaches. Clicking anywhere on the control puts the caret in; a row\n * that wants its label to do the same calls `focus()`.\n *\n * **A signal-forms control, optionally.** It implements `FormValueControl`\n * for `string[]`: bind a field with `[formField]=\"envelope.to\"` and the\n * directive drives `value` both ways, pushes `invalid`, `touched`,\n * `disabled`, `readonly`, `required` and `name` in, and hears `touch` when\n * focus leaves the input. Without a form, `[(value)]` alone is the whole\n * contract; the state inputs are optional and the chips still flag a\n * malformed address on their own. The rules that go with it — `addressList`\n * — live beside it, because the built-in `required` and `email` know\n * nothing of an array of mailboxes.\n *\n * **No messages of its own.** The control reflects the field's state —\n * invalid *and* touched, so nothing shouts before the user has left it —\n * and a malformed address is flagged on its chip; wording what is wrong is\n * the job of the component that owns the form, which has the errors.\n *\n * **Parts are `data-slot`s** — `chips`, `entry`, `input` — plus the chips'\n * own; that is how the control is styled from outside: theme it through\n * the `--email-*` tokens, and reach a part for a structural override with\n * two attributes.\n *\n * **The selection and its commands are public.** A host's own controls —\n * a bar over the writer, the way a phone's action bar sits over the app\n * bar — work the picked chip through `current()` and `select()` for the\n * state and `edit()`, `remove()` and `copy()` for the commands, each on the\n * current chip unless given another. Such a bar's buttons must decline\n * their mousedown (`(mousedown)=\"$event.preventDefault()\"`): focus stays in\n * the input, and the selection with it — focus leaving the control clears\n * the selection.\n *\n * **Chips move between inputs by drag and drop.** A chip of an editable\n * input can be dragged to another — To into Cc, as Gmail and Outlook do —\n * and leaves its own list when the other takes it. The other commits it\n * as it was, flagged or pending alike. A chip whose address the other\n * already holds is absorbed, as Gmail does: it leaves its list and the\n * other keeps its own entry. A full list (From holds one) refuses the\n * drop, and the chip stays. Dropped in its own list, a chip is reordered:\n * it moves to the line; the line is not drawn where the chip already is. Alt (Option), or Ctrl, makes\n * it a copy — onto a duplicate, a copy is nothing, so refused. Nothing\n * moves while a drag is over a target: a thin line between its chips\n * (`drop-marker`) shows where the chip will land, before or after the chip\n * under the pointer, and the drop puts it there; the host carries\n * `data-dropping` meanwhile. Only chips are places: a draft — typed in the\n * input, or left at the end of the list when the row lost focus — is not,\n * and a drop lands before it.\n * A drop counts as working both fields: each is touched.\n * A chip lands in an address input or nowhere: it carries no plain text,\n * so a subject line or an editor can't take it. `emailAddressDragGroup` on\n * the element around a writer's rows keeps its chips among them. Plain text\n * dropped from elsewhere is a paste — the addresses become chips, the rest\n * is left typed.\n * `moveTo()` is the same move for the keyboard — a host's \"Move to Cc\" —\n * and the moved chip says so (`movedLabel`). A touch is never a drag: on\n * a phone the press is the chip's hold-to-copy. `allowDrag` turns it off;\n * a disabled or read-only input is neither source nor target.\n *\n * **The chips' remove control is a template slot.** An\n * `ng-template[emailAddressChipRemove]` in the input's content is handed to\n * every chip it renders, in place of the default × button.\n *\n * **State on the host.** `aria-disabled` while disabled; `data-invalid`\n * while invalid and touched; `data-full` once `limit` is reached;\n * `data-focused` while focus is anywhere in the control. The text input\n * carries `data-refused` while it holds text a commit left behind.\n *\n * No Material, no icon font, no headless library. It holds the list it\n * shows and nothing else: contacts, lookups and sending are the host's.\n */\n@Component({\n selector: '[email-address-input]',\n imports: [AddressChip, NgTemplateOutlet],\n templateUrl: './address-input.html',\n styleUrl: './address-input.scss',\n host: {\n '[attr.aria-disabled]': 'disabled() || null',\n '[attr.data-invalid]': 'flagged() || null',\n '[attr.data-full]': 'full() || null',\n '[attr.data-focused]': 'focused() || null',\n '[attr.data-dropping]': 'dropping() || null',\n '(pointerdown)': 'onPointerdown($event)',\n '(mousedown)': 'keepCaret($event)',\n '(click)': 'focus()',\n '(focusin)': 'onFocusin()',\n '(focusout)': 'onFocusout($event)',\n '(dragenter)': 'onDragover($event)',\n '(dragover)': 'onDragover($event)',\n '(dragleave)': 'onDragleave($event)',\n '(drop)': 'onDrop($event)',\n },\n})\nexport class AddressInput implements FormValueControl<string[]> {\n /** The committed addresses, in header form. Two-way; the form's value. */\n readonly value = model<string[]>([]);\n\n readonly placeholder = input('');\n\n /** The id of the row's label, passed through to the text input — the\n host's label, wherever the host put it. */\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** A name for the text input when there is no visible label. */\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** The ids of whatever describes the field — a hint, an error line —\n passed through to the text input, where assistive tech reads them. */\n readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n readonly #frameIds = signal<readonly string[]>([]);\n\n /** What the text input's `aria-describedby` says: the host's own ids and a\n frame's, each once. */\n protected readonly describedBy = computed(() => {\n const ids = new Set([...(this.ariaDescribedby()?.split(/\\s+/) ?? []), ...this.#frameIds()]);\n ids.delete('');\n return ids.size ? [...ids].join(' ') : null;\n });\n\n /** Adds the ids of a frame's own lines — a form field's hint and error —\n to what describes the text input, beside the host's `aria-describedby`;\n each call replaces the frame's previous ids. */\n describe(ids: readonly string[]): void {\n this.#frameIds.set(ids);\n }\n\n /** Most addresses the field takes; the input hides once reached. Named\n `limit`, not `max`: the form contract keeps that name for the `max` rule. */\n readonly limit = input(Infinity, { transform: numberAttribute });\n\n /** Prefix for each chip's remove button — \"Remove ada@example.com\". */\n readonly removeLabel = input('Remove');\n\n /** What a malformed address is flagged as. */\n readonly invalidLabel = input('not an email address');\n\n /** The chips' note on a placeholder a template fills in later. */\n readonly pendingLabel = input('filled in when sent');\n\n /** What a chip moved into this input says, before its address — a host\n with labelled rows says where: \"Moved to Cc:\". */\n readonly movedLabel = input('Moved');\n\n /** Chips may be dragged out of this input and dropped into it. Set false\n for a row that only shows; a disabled or read-only input never takes\n part either way. */\n readonly allowDrag = input(true, { transform: booleanAttribute });\n\n // ── the form contract: pushed in by the field directive ───────────────\n\n /** The input's `name` attribute; the directive derives one from the path. */\n readonly name = input('');\n\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly readonly = input(false, { transform: booleanAttribute });\n readonly required = input(false, { transform: booleanAttribute });\n readonly invalid = input(false, { transform: booleanAttribute });\n readonly touched = input(false, { transform: booleanAttribute });\n\n /** Focus left the input. The directive marks the field touched on it. */\n readonly touch = output<void>();\n\n /** The text input's id, for a host label's `for`. */\n readonly id = `email-address-input-${nextId++}`;\n\n /** The host's label template, if it opted into one — rendered first in\n the row; the text input is named by it. */\n protected readonly labelSlot = contentChild(AddressInputLabel);\n\n /** The label box's id, for the text input's `aria-labelledby`. */\n protected readonly labelId = `${this.id}-label`;\n\n /** What names the text input: the host's own `aria-labelledby`; else the\n label slot — unless the host gave an `aria-label` instead. */\n protected readonly labelledBy = computed(\n () => this.ariaLabelledby() ?? (this.labelSlot() && !this.ariaLabel() ? this.labelId : null),\n );\n\n /** The host's remove template, passed on to every chip. */\n protected readonly removeSlot = contentChild(AddressChipRemove);\n\n protected readonly field = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n /** The list of chips, where a press on a draggable chip parks focus. */\n protected readonly chipList = viewChild.required<ElementRef<HTMLElement>>('chipList');\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #injector = inject(Injector);\n\n /** The address rule in force — ours, or the host's (`provideAddressRules`):\n how typing splits, what is an address, what is one recipient. */\n readonly #rules = inject(ADDRESS_RULES);\n /** What becomes a chip: a well-formed mailbox, or a placeholder a\n template fills in later. Everything else is a typo to hand back. */\n #accepts = (raw: string) => isMailbox(raw, this.#rules) || isPending(raw, this.#rules);\n #key = (raw: string) => addressKey(raw, this.#rules);\n /** The list has this address already — in any case, under any name. */\n #holds = (raw: string) => this.#keys().has(this.#key(raw));\n /** The list's addresses by key, parsed once a change — not on every\n `dragover`. */\n readonly #keys = computed(() => new Set(this.value().map(this.#key)));\n\n /** The chips this input trades with: those of the nearest\n `emailAddressDragGroup`, or of every input in none. */\n readonly #group = inject(AddressDragGroup, { optional: true });\n\n readonly #focused = signal(false);\n\n /** Focus is somewhere in the control — the input or a chip's remove\n button. The chips are chips only then. Read-only; for a host's own\n frame (a form field whose label floats on it). */\n readonly focused = this.#focused.asReadonly();\n\n readonly #text = signal('');\n\n /** What is typed in the input and not committed yet — for a host's own\n frame, where a field with typing in it is not empty. */\n readonly text = this.#text.asReadonly();\n\n /** The input holds text a commit left behind: not an address yet. */\n protected readonly refused = signal(false);\n\n /** The chip the arrow keys or a click picked, by index in the value — the\n one Enter, Backspace and Delete act on while the caret stays in the\n input. */\n protected readonly active = signal<number | null>(null);\n\n /** The picked chip's address — the one the arrow keys or a click reached\n and the commands act on — or null. Public, for a host's own controls. */\n readonly current = computed<string | null>(() => {\n const index = this.active();\n return index === null ? null : (this.value()[index] ?? null);\n });\n\n /** Picks a chip by address, or none. */\n select(address: string | null): void {\n const index = address === null ? -1 : this.value().indexOf(address);\n this.active.set(index < 0 ? null : index);\n }\n\n /** The chips as rendered, for the commands that are the chip's own. */\n protected readonly chips = viewChildren(AddressChip);\n\n /** The active chip's id, for the input's `aria-activedescendant`. */\n protected readonly activeId = computed(() => {\n const index = this.active();\n return index !== null && index < this.value().length ? this.chipId(index) : null;\n });\n\n protected chipId(index: number): string {\n return `${this.id}-chip-${index}`;\n }\n\n /** The cap is reached: a further address is refused. */\n readonly full = computed(() => this.value().length >= this.limit());\n\n /** The malformed addresses at the end of the list — what focus hands back\n to the input. */\n readonly #trailingMalformed = computed(() => {\n const value = this.value();\n let start = value.length;\n while (start > 0 && !this.#accepts(value[start - 1])) start--;\n return value.slice(start);\n });\n\n /** Where the draft starts in the list: the trailing malformed entries are\n the typing the row was left with — what focus hands back to the input\n — and no chip is placed among or after them. A drop, or `moveTo()`,\n lands before. */\n readonly #draftStart = computed(() => this.value().length - this.#trailingMalformed().length);\n\n /** Full, and nothing in it to fix: the input hides — the chips say\n everything. A full list ending in a typo keeps it, so focus can hand\n the typo back. */\n protected readonly closed = computed(() => this.full() && !this.#trailingMalformed().length);\n\n /** Nothing may change: disabled or read-only. Chips lose their remove\n button, the input is out of play. */\n protected readonly locked = computed(() => this.disabled() || this.readonly());\n\n /** Chips can be dragged out of the list, and dropped into it. */\n protected readonly canDrag = computed(() => this.allowDrag() && !this.locked());\n\n /** Where a drag over the input would land: the index in the list, and\n the line drawn there — in the chip list's own coordinates. Null while\n no drag the input would take is over it. Drawn on top, out of the\n flow, so nothing moves under the pointer. */\n protected readonly dropMarker = signal<DropMarker | null>(null, {\n // A drag sends `dragover` every few dozen milliseconds, moving or not:\n // the same place again is no change, and renders nothing.\n equal: (a, b) =>\n a === b ||\n (!!a && !!b && a.index === b.index && a.x === b.x && a.y === b.y && a.height === b.height),\n });\n\n /** A drag the input would take is over it. */\n protected readonly dropping = computed(() => this.dropMarker() !== null);\n\n /** The press under way is a mouse's (or a pen's) on a draggable chip:\n its default has to stay, or the browser never starts the drag. */\n #dragPress = false;\n\n /** Invalid *and* touched — the moment the state becomes the user's business. */\n protected readonly flagged = computed(() => this.invalid() && this.touched());\n\n /** Splits a run into addresses and adds the new ones to the end of the\n list, up to `limit`. Duplicates — by address, case-insensitively —\n are dropped; a malformed one is kept and\n flagged — this is the host's way in, and the host decides what it\n holds. */\n commit(raw: string): void {\n this.#insert(this.#rules.split(raw));\n }\n\n /** Drops one address — the picked chip's by default. Identity by string:\n the list never holds the same header form twice, so this takes exactly\n the chip that asked. */\n remove(address: string | null = this.current()): void {\n if (this.locked() || address === null) return;\n this.active.set(null);\n const index = this.value().indexOf(address);\n if (index < 0) return;\n this.value.update((current) => current.filter((a) => a !== address));\n }\n\n /** A chip's remove control was used: the address goes, and the caret\n comes back to the input — the focused button went with its chip, and\n focus left on nothing would strand a keyboard user and read to a host\n as the field being left. */\n protected removeChip(address: string): void {\n this.remove(address);\n this.focus();\n }\n\n /** Takes a chip — the picked one by default — back for editing: it\n leaves the list and the input, at the end, holds its address, caret at\n the end. The edit pending until now ends first. A locked list edits\n nothing. */\n edit(\n address: string | null = this.current(),\n input: HTMLInputElement = this.field().nativeElement,\n ): void {\n if (this.locked() || address === null) return;\n this.active.set(null);\n this.#endPending(input, address);\n if (!this.value().includes(address)) return;\n this.remove(address);\n this.#write(input, address);\n input.focus();\n input.setSelectionRange(input.value.length, input.value.length);\n }\n\n /** Ends the pending edit so another can start: the addresses typed so far\n become chips, the rest of the typing goes, and so\n does every chip that is not an address — but `keep`, the one about to\n be edited. */\n #endPending(input: HTMLInputElement, keep?: string): void {\n this.#insert(this.#rules.split(input.value).filter((token) => this.#accepts(token)));\n this.#write(input, '');\n this.refused.set(false);\n const value = this.value();\n const kept = value.filter((address) => this.#accepts(address) || address === keep);\n if (kept.length !== value.length) this.value.set(kept);\n }\n\n /** Puts the caret in the input — the whole control is the field, and a\n host's label row may forward its own clicks here. A full field has no\n input to put it in: focus goes to the last chip's remove control. */\n focus(): void {\n if (this.locked()) return;\n if (!this.closed()) {\n this.field().nativeElement.focus();\n return;\n }\n const controls = this.#host.nativeElement.querySelectorAll<HTMLElement>(\n '[data-slot=trailing] :is(button, [href], input, [tabindex]:not([tabindex=\"-1\"]))',\n );\n controls[controls.length - 1]?.focus();\n }\n\n /** A press anywhere on the control is the input's from that moment: it\n takes focus at the press, not at the click after the release — so a\n chip pressed in a line of text turns the line to chips at once, and a\n hold on a chip runs with the document focused, which the clipboard\n insists on. `keepCaret` then declines the press's own default, which\n would move focus off again. */\n protected onPointerdown(event: PointerEvent): void {\n const input = this.field().nativeElement;\n const target = event.target as Element;\n this.#dragPress =\n event.pointerType !== 'touch' &&\n this.canDrag() &&\n !!target.closest?.('[email-address-chip]') &&\n !target.closest('[data-slot=trailing]');\n if (target === input || this.locked() || this.closed()) return;\n input.focus();\n }\n\n /** A press anywhere on the control but the text input itself — a chip,\n its button, the gap between — leaves the caret where it is. The\n browser would otherwise move focus to the body for the press and back\n on the click, and in that instant the row would drop to text and\n reflow: a flash, and a blur that commits and touches for nothing.\n Except a mouse's press on a draggable chip: no engine starts a drag\n from a press whose default was declined, so it keeps it, and the\n press's focus lands on the chip list instead (`tabindex=\"-1\"`) —\n still inside the control, so nothing commits; the click or the drag's\n end brings the caret back. */\n protected keepCaret(event: MouseEvent): void {\n if (event.target === this.field().nativeElement || this.#dragPress) return;\n event.preventDefault();\n }\n\n /** A click on a chip — not on its remove control — picks it, and only\n that: a click on the picked chip picks it again. The caret is in the\n input either way. */\n protected onChipClick(event: MouseEvent, index: number, input: HTMLInputElement): void {\n if ((event.target as Element).closest('[data-slot=trailing]') || this.locked()) return;\n this.#pick(index, input);\n input.focus();\n }\n\n /** A double click on a chip — not on its remove control — takes it back\n for editing. */\n protected onChipDblclick(event: MouseEvent, address: string, input: HTMLInputElement): void {\n if ((event.target as Element).closest('[data-slot=trailing]')) return;\n this.edit(address, input);\n }\n\n /** Copies a chip's address — the picked one by default — to the\n clipboard, as a hold on the chip does; the chip shows and says so.\n Resolves to whether the copy went. */\n async copy(address: string | null = this.current()): Promise<boolean> {\n const chip = this.chips().find((candidate) => candidate.address() === address);\n return chip ? chip.copy() : false;\n }\n\n /** Moves a chip — the picked one by default — to another address input:\n the keyboard's way to do what a drag does, for a host's own \"Move to\n Cc\". The target takes it as it is, to the end of its list — before\n a draft the row was left with — and it\n leaves this one; both are touched, and the moved chip says so\n (`movedLabel`). One the target already holds is absorbed: it leaves\n here, and the target keeps its own entry. A full target, or either\n input locked, moves nothing. Returns whether it moved. */\n moveTo(target: AddressInput, address: string | null = this.current()): boolean {\n if (address === null || target === this || this.locked() || target.locked()) return false;\n if (!this.value().includes(address)) return false;\n if (!target.#holds(address) && !target.#insert([address], target.#draftStart()).length) {\n return false;\n }\n this.remove(address);\n this.touch.emit();\n target.touch.emit();\n target.#announceMoved(address);\n return true;\n }\n\n /** The chip that arrived by a move — or the entry that absorbed it —\n says so, once it is drawn. */\n #announceMoved(address: string): void {\n const key = this.#key(address);\n afterNextRender(\n () =>\n this.chips()\n .find((chip) => this.#key(chip.address()) === key)\n ?.announce(`${this.movedLabel()} ${address}`),\n { injector: this.#injector },\n );\n }\n\n // ── drag and drop ─────────────────────────────────────────────────────\n\n /** A chip of this list started a drag: remember it, so a target on the\n page can judge the drop before it happens and tell this list to let\n go after. */\n protected onChipDragstart(address: string): void {\n drag = this.canDrag() ? { source: this, group: this.#group, address, moved: false } : null;\n }\n\n /** The drag ended: if an address input took the chip as a move, it\n leaves — through `remove()`, as the × takes it — and the field is\n touched. The press parked focus on the list; the caret comes back. */\n protected onChipDragend(): void {\n const ended = drag;\n drag = null;\n if (ended?.source === this && ended.moved) {\n this.remove(ended.address);\n this.touch.emit();\n }\n if (document.activeElement === this.chipList().nativeElement) this.focus();\n }\n\n /** What a drop here would be: `move` or `copy` for a drag the input\n takes, `none` for one it refuses — said, so the text input inside\n can't take the text in its place — and null for a drag that isn't an\n address (files: the page's drop zone's), left to the page. A chip is\n taken only from another input of the same group, while this page's\n drag is in flight — a chip from anywhere else is refused. */\n #dropEffect(event: DragEvent): 'move' | 'copy' | 'none' | null {\n const types = event.dataTransfer?.types ?? [];\n const chip = types.includes(ADDRESS_DRAG_TYPE);\n if (!chip && !types.includes('text/plain')) return null;\n if (!this.canDrag()) return chip ? 'none' : null;\n if (!chip) return this.full() ? 'none' : 'copy';\n const from = drag;\n if (!from || from.group !== this.#group) return 'none';\n const copy = event.altKey || event.ctrlKey;\n // Its own list: a move is a reorder; a copy would add nothing.\n if (from.source === this) return copy ? 'none' : 'move';\n // Held already: a move is absorbed, even into a full list; a copy is\n // nothing.\n if (this.#holds(from.address)) return copy ? 'none' : 'move';\n if (this.full()) return 'none';\n return copy ? 'copy' : 'move';\n }\n\n protected onDragover(event: DragEvent): void {\n const effect = this.#dropEffect(event);\n if (effect === null) return;\n event.preventDefault();\n event.dataTransfer!.dropEffect = effect;\n const marker = effect === 'none' ? null : this.#dropAt(event);\n this.dropMarker.set(marker && this.#inPlace(marker.index) ? null : marker);\n }\n\n /** A drop at this index would leave the dragged chip where it is: right\n before or right after itself, in its own list. No line there. */\n #inPlace(index: number): boolean {\n if (drag?.source !== this) return false;\n const at = this.value().indexOf(drag.address);\n return index === at || index === at + 1;\n }\n\n /** Moves a chip of the list to stand before the entry at `at` (the end,\n past the last). True when it moved — not when it would stay put. */\n #reorder(address: string, at: number): boolean {\n const from = this.value().indexOf(address);\n if (from < 0 || at < 0 || at > this.value().length || at === from || at === from + 1) {\n return false;\n }\n const to = at > from ? at - 1 : at;\n this.value.update((current) => {\n const next = current.filter((held) => held !== address);\n next.splice(to, 0, address);\n return next;\n });\n return true;\n }\n\n /** Where a drop at the pointer lands, in reading order: before the first\n entry that starts after the pointer — on a later line, or on its line\n past the pointer's side of the entry's middle — else at the end. And\n the line that says so: midway between two entries on one line, or\n just outside the entry at a line's start or end. */\n #dropAt(event: DragEvent): DropMarker {\n const list = this.chipList().nativeElement;\n const box = list.getBoundingClientRect();\n const rtl = getComputedStyle(list).direction === 'rtl';\n const x = event.clientX ?? 0;\n const y = event.clientY ?? 0;\n const chips = [...list.querySelectorAll(':scope > [email-address-chip]')];\n // Only the chips before the draft are places; the draft is not.\n const rects = chips.slice(0, this.#draftStart()).map((chip) => chip.getBoundingClientRect());\n let index = rects.findIndex(\n (r) =>\n y < r.top || (y <= r.bottom && (rtl ? x > r.left + r.width / 2 : x < r.left + r.width / 2)),\n );\n if (index < 0) index = rects.length;\n const start = (r: DOMRect) => (rtl ? r.right : r.left);\n const end = (r: DOMRect) => (rtl ? r.left : r.right);\n // At a line's start or end the line stands a gap off the entry, as Gmail's does.\n const out = rtl ? 4 : -4;\n const at = rects[index];\n const before = rects[index - 1];\n let line: { x: number; top: number; height: number };\n if (at && before && Math.abs(before.top - at.top) < 1) {\n line = { x: (end(before) + start(at)) / 2, top: at.top, height: at.height };\n } else if (at) {\n line = { x: start(at) + out, top: at.top, height: at.height };\n } else if (before) {\n line = { x: end(before) - out, top: before.top, height: before.height };\n } else {\n // No chip yet: at the start — of the draft, if the row was left with one.\n const first = (chips[0] ?? list.querySelector('[data-slot=entry]')!).getBoundingClientRect();\n line = { x: start(first) + (chips[0] ? out : 0), top: first.top, height: first.height };\n }\n return { index, x: line.x - box.left, y: line.top - box.top, height: line.height };\n }\n\n /** Leaving for somewhere outside the control: the drag is no longer over\n it. (A leave with nowhere named — some engines — ends it too; the\n next `dragover` inside brings it back.) */\n protected onDragleave(event: DragEvent): void {\n const to = event.relatedTarget as Node | null;\n if (!to || !this.#host.nativeElement.contains(to)) this.dropMarker.set(null);\n }\n\n /** The drop: a chip is committed as it was; plain text from elsewhere is\n a paste — its addresses become chips, the rest joins the typing. What\n was typed stays. A chip the list holds already is absorbed by a move:\n nothing is added, and the source lets it go. Nothing added otherwise\n (the limit) is no drop: the source keeps its chip. */\n protected onDrop(event: DragEvent): void {\n const effect = this.#dropEffect(event);\n this.dropMarker.set(null);\n if (effect === null) return;\n event.preventDefault();\n const transfer = event.dataTransfer!;\n if (effect === 'none') {\n transfer.dropEffect = 'none';\n return;\n }\n const entry = transfer.getData(ADDRESS_DRAG_TYPE);\n const { index } = this.#dropAt(event);\n let changed: boolean;\n if (entry && drag?.source === this) {\n // Its own chip: a reorder. The source is this list; nothing leaves.\n changed = this.#reorder(entry, index);\n if (changed) this.active.set(null);\n } else if (entry) {\n const absorbed = effect === 'move' && this.#holds(entry);\n changed = absorbed || this.#insert([entry], index).length > 0;\n if (changed && drag?.address === entry) {\n drag.moved = effect === 'move';\n if (drag.moved) this.#announceMoved(entry);\n }\n } else {\n const tokens = this.#rules.split(transfer.getData('text/plain'));\n changed =\n this.#insert(\n tokens.filter((token) => this.#accepts(token)),\n index,\n ).length > 0;\n const rest = tokens.filter((token) => !this.#accepts(token));\n if (rest.length) {\n const input = this.field().nativeElement;\n this.#write(input, [input.value, ...rest].filter(Boolean).join(', '));\n this.refused.set(true);\n input.focus();\n changed = true;\n }\n }\n if (!changed) {\n transfer.dropEffect = 'none';\n return;\n }\n this.touch.emit();\n }\n\n /** Picking a chip is being done with the typing: the addresses in it\n become chips first, as Enter would make them, and what is not an\n address stays behind, flagged. */\n #pick(index: number, input: HTMLInputElement): void {\n const address = this.value()[index];\n this.#settle(input, input.value);\n this.active.set(address === undefined ? null : this.value().indexOf(address));\n }\n\n protected onFocusin(): void {\n this.#focused.set(true);\n }\n\n protected onInput(input: HTMLInputElement): void {\n this.#text.set(input.value);\n this.refused.set(false);\n this.active.set(null);\n }\n\n protected onKeydown(event: KeyboardEvent, input: HTMLInputElement): void {\n // An IME's own Enter picks its candidate; nothing here may act on it.\n if (event.isComposing) return;\n const active = this.active();\n if (active !== null && this.#onActiveKey(event, active, input)) return;\n switch (event.key) {\n case 'ArrowLeft': {\n // From the start of the typing, ← reaches the last chip — the\n // typing becoming chips first, when it holds an address.\n if (input.selectionStart !== 0 || input.selectionEnd !== 0 || this.locked()) return;\n const typed = this.#rules.split(input.value).some((token) => this.#accepts(token));\n if (typed) this.#settle(input, input.value);\n const last = this.value().length - 1;\n if (typed || last >= 0) event.preventDefault();\n if (last >= 0) this.active.set(last);\n return;\n }\n case ',':\n case ';':\n // Inside a quoted name or angle brackets the character is the\n // mailbox's own: `\"Lovelace, Ada\"`.\n if (!separatesAt(input.value, input.selectionStart ?? input.value.length)) return;\n event.preventDefault();\n this.#settle(input, input.value);\n return;\n case 'Enter':\n // Swallowed even with nothing typed: Enter in an address row must\n // never submit the form around it. The subject line is where Enter\n // sends.\n event.preventDefault();\n this.#settle(input, input.value);\n return;\n case 'Tab':\n // Tab on an address commits it and keeps the caret here, ready for\n // the next one — the list is not left until there is nothing more\n // to commit. Tab on nothing, on a typo, or backwards leaves the\n // field as ever, and leaving commits and flags what was typed.\n if (event.shiftKey || !this.#rules.split(input.value).some((token) => this.#accepts(token))) {\n return;\n }\n event.preventDefault();\n this.#settle(input, input.value);\n return;\n case 'Backspace': {\n // On nothing typed, the last chip comes back to be edited — the one\n // pending edit.\n if (input.value) return;\n const previous = this.value().at(-1);\n if (previous === undefined || this.locked()) return;\n event.preventDefault();\n this.edit(previous, input);\n return;\n }\n }\n }\n\n /** The keys that act on the highlighted chip. True when one did. The\n arrows walk the chips: ← stops at the first, → past the last returns\n to the caret. */\n #onActiveKey(event: KeyboardEvent, active: number, input: HTMLInputElement): boolean {\n const chips = this.value();\n if (event.altKey && (event.key === 'ArrowLeft' || event.key === 'ArrowRight')) {\n // Alt+← / Alt+→ move the chip a place — the drag's reorder, by key.\n // At either end there is nowhere to go, and the key is still the\n // chip's: it never walks the highlight instead.\n if (this.locked()) return false;\n const address = chips[active];\n if (this.#reorder(address, event.key === 'ArrowLeft' ? active - 1 : active + 2)) {\n this.active.set(this.value().indexOf(address));\n this.touch.emit();\n }\n event.preventDefault();\n return true;\n }\n switch (event.key) {\n case 'ArrowLeft':\n this.active.set(Math.max(0, active - 1));\n break;\n case 'ArrowRight':\n if (active + 1 < chips.length) {\n this.active.set(active + 1);\n } else {\n this.active.set(null);\n input.setSelectionRange(0, 0);\n }\n break;\n case 'Escape':\n this.active.set(null);\n break;\n case 'Enter':\n case 'F2':\n this.edit(chips[active], input);\n break;\n case 'Backspace':\n case 'Delete':\n if (this.locked()) return false;\n this.remove(chips[active]);\n break;\n default:\n return false;\n }\n event.preventDefault();\n return true;\n }\n\n /** A paste of several addresses: the addresses become chips, the rest\n joins what the input already holds. A single token is left to the\n input, so a name with spaces can still be edited before it commits —\n but a chip's own copy (Ctrl+C, Ctrl+X, a hold) comes back as a chip,\n as it was. With a chip picked, what is pasted goes right after it. */\n protected onPaste(event: ClipboardEvent, input: HTMLInputElement): void {\n if (this.locked()) return;\n const data = event.clipboardData;\n const text = data?.getData('text') ?? '';\n const chip = [...(data?.types ?? [])].includes(ADDRESS_DRAG_TYPE);\n const entry =\n (chip && data!.getData(ADDRESS_DRAG_TYPE)) || (text === clipboardEntry ? text : '');\n const active = this.active();\n const at = active === null ? this.#draftStart() : active + 1;\n if (entry) {\n event.preventDefault();\n this.#insert([entry], at);\n this.active.set(null);\n return;\n }\n const tokens = this.#rules.split(text);\n if (tokens.length < 2 && active === null) return;\n event.preventDefault();\n if (active === null) {\n this.#settle(input, `${input.value}, ${text}`);\n return;\n }\n const addresses = tokens.filter((token) => this.#accepts(token));\n this.#insert(addresses, at);\n const rest = tokens.filter((token) => !this.#accepts(token));\n if (rest.length) {\n this.#write(input, [input.value, ...rest].filter(Boolean).join(', '));\n this.refused.set(true);\n }\n this.active.set(null);\n }\n\n /** Ctrl+C or Ctrl+X (Cmd on a Mac, or the Edit menu) with a chip picked\n and no text selected: the chip goes on the clipboard — its header\n form, as text and as the library's own type, so a paste into an\n address input brings it back as a chip — and shows and says so, as a\n hold does. A cut then removes it, as the × would. */\n protected onClipboard(event: ClipboardEvent, input: HTMLInputElement, cut: boolean): void {\n const address = this.current();\n const data = event.clipboardData;\n if (address === null || !data || input.selectionStart !== input.selectionEnd) return;\n if (cut && this.locked()) return;\n event.preventDefault();\n data.setData('text/plain', address);\n data.setData(ADDRESS_DRAG_TYPE, address);\n clipboardEntry = address;\n if (cut) {\n this.remove(address);\n return;\n }\n this.chips()\n .find((chip) => chip.address() === address)\n ?.showCopied();\n }\n\n /** A chip's hold copied it: remembered, so a paste of it is a chip. */\n protected onChipCopied(address: string): void {\n clipboardEntry = address;\n }\n\n /** Focus arrived in the input: the typos at the end of the list come back\n into it, to be fixed — unless the user is already typing there. They\n come back as plain typing, not flagged: the caret is on them, and the\n next commit judges them again. */\n protected onFocus(input: HTMLInputElement): void {\n const typos = this.#trailingMalformed();\n if (input.value || !typos.length || this.locked()) return;\n this.value.update((current) => current.slice(0, current.length - typos.length));\n this.#write(input, typos.join(', '));\n input.setSelectionRange(input.value.length, input.value.length);\n this.refused.set(false);\n }\n\n /** Leaving the field commits everything typed — the addresses, then a\n typo at the end of the list, so the form sees it and the next focus\n hands it back — and is the touch. Moving to a chip's remove button is\n not leaving. */\n protected onBlur(event: FocusEvent, input: HTMLInputElement): void {\n if (this.#within(event)) return;\n this.#leave(input);\n }\n\n #leave(input: HTMLInputElement): void {\n const tokens = this.#rules.split(input.value);\n this.#insert(tokens.filter((token) => this.#accepts(token)));\n this.#insert(tokens.filter((token) => !this.#accepts(token)));\n this.#write(input, '');\n this.refused.set(false);\n this.touch.emit();\n }\n\n protected onFocusout(event: FocusEvent): void {\n if (this.#within(event)) return;\n // Focus parked on the chip list by a press that came to nothing leaves\n // from there: leaving is leaving, wherever the caret had got to.\n if (event.target === this.chipList().nativeElement) this.#leave(this.field().nativeElement);\n this.#focused.set(false);\n this.active.set(null);\n }\n\n /** Commits the addresses in a run and leaves the rest in the input. */\n #settle(input: HTMLInputElement, raw: string): void {\n const tokens = this.#rules.split(raw);\n this.#insert(tokens.filter((token) => this.#accepts(token)));\n this.#write(input, tokens.filter((token) => !this.#accepts(token)).join(', '));\n this.refused.set(!!input.value);\n }\n\n /** Adds the new addresses to the list — at the end, or before the entry\n at `at` (a drop) — up to `limit`, each only if its address is not in\n the list yet; the entry already there keeps its name. Returns what\n was added. */\n #insert(incoming: readonly string[], at = Infinity): string[] {\n const added: string[] = [];\n if (!incoming.length) return added;\n this.value.update((current) => {\n const seen = new Set(current.map(this.#key));\n for (const address of incoming) {\n if (current.length + added.length >= this.limit()) break;\n if (seen.has(this.#key(address))) continue;\n seen.add(this.#key(address));\n added.push(address);\n }\n return [...current.slice(0, at), ...added, ...current.slice(at)];\n });\n return added;\n }\n\n /** Puts text in the input — the one way it is written, so `text` follows. */\n #write(input: HTMLInputElement, text: string): void {\n input.value = text;\n this.#text.set(text);\n }\n\n /** Whether focus is moving to somewhere else inside the control. */\n #within(event: FocusEvent): boolean {\n const destination = event.relatedTarget as Node | null;\n return !!destination && this.#host.nativeElement.contains(destination);\n }\n}\n","<!-- No label here: the row around this control names it, through\n aria-labelledby or aria-label, both passed down to the text input. -->\n<!-- Focusable by script and by a press only (tabindex -1, while chips can\n be dragged): a press on a draggable chip must keep its default for the\n drag to start, and its focus lands here — inside the control. -->\n<ul #chipList data-slot=\"chips\" role=\"list\" [attr.tabindex]=\"canDrag() ? -1 : null\">\n <!-- The opt-in label (emailAddressLabel): first in the row, so the chips\n wrap under it. Hidden from assistive tech as text — it names the\n text input instead, through aria-labelledby. -->\n @if (labelSlot(); as slot) {\n <li data-slot=\"label\" aria-hidden=\"true\" [id]=\"labelId\">\n <ng-container [ngTemplateOutlet]=\"slot.template\" />\n </li>\n }\n @for (address of value(); track address) {\n <li\n email-address-chip\n [id]=\"chipId($index)\"\n [address]=\"address\"\n [removable]=\"!locked()\"\n [inline]=\"!focused()\"\n [draggable]=\"canDrag()\"\n [aria-current]=\"active() === $index\"\n [removeTabbable]=\"closed()\"\n [removeLabel]=\"removeLabel()\"\n [removeTemplate]=\"removeSlot()?.template ?? null\"\n [invalidLabel]=\"invalidLabel()\"\n [pendingLabel]=\"pendingLabel()\"\n [aria-disabled]=\"disabled()\"\n (removed)=\"removeChip(address)\"\n (copied)=\"onChipCopied($event)\"\n (click)=\"onChipClick($event, $index, field)\"\n (dblclick)=\"onChipDblclick($event, address, field)\"\n (dragstart)=\"onChipDragstart(address)\"\n (dragend)=\"onChipDragend()\"\n ></li>\n }\n <!-- Where a drag over the control would land: a line between entries,\n drawn on top and out of the flow — nothing moves under the pointer. -->\n @if (dropMarker(); as marker) {\n <li\n data-slot=\"drop-marker\"\n aria-hidden=\"true\"\n [style.left.px]=\"marker.x\"\n [style.top.px]=\"marker.y\"\n [style.height.px]=\"marker.height\"\n ></li>\n }\n <!-- The entry is a list item too, so the chips and the typing sit in one\n wrapping row — always after the last chip. Hidden once the field is full (From takes one address)\n with nothing to fix: the chips say everything, and a second address\n would only be refused. -->\n <li data-slot=\"entry\" [hidden]=\"closed()\">\n <input\n #field\n data-slot=\"input\"\n type=\"text\"\n inputmode=\"email\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [id]=\"id\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n [placeholder]=\"value().length ? '' : placeholder()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"flagged() || refused() || null\"\n [attr.aria-activedescendant]=\"activeId()\"\n [attr.data-refused]=\"refused() || null\"\n (keydown)=\"onKeydown($event, field)\"\n (paste)=\"onPaste($event, field)\"\n (copy)=\"onClipboard($event, field, false)\"\n (cut)=\"onClipboard($event, field, true)\"\n (input)=\"onInput(field)\"\n (mousedown)=\"active.set(null)\"\n (focus)=\"onFocus(field)\"\n (blur)=\"onBlur($event, field)\"\n />\n </li>\n</ul>\n","import { inject } from '@angular/core';\nimport {\n type PathKind,\n type SchemaPath,\n type SchemaPathRules,\n type ValidationError,\n validate,\n} from '@angular/forms/signals';\nimport {\n ADDRESS_RULES,\n AddressRules,\n defaultAddressRules,\n isMailbox,\n isPending,\n} from '@h-k-dev/angular-email-editor/address';\n\n/** The error kinds `addressList` reports, for a host that switches on them. */\nexport const ADDRESS_LIST_EMPTY = 'addressList.empty';\nexport const ADDRESS_LIST_INVALID = 'addressList.invalid';\nexport const ADDRESS_LIST_TOO_MANY = 'addressList.tooMany';\n\nexport interface AddressListOptions {\n /** Fewest addresses the list must hold. 1 by default; 0 for Cc and Bcc. */\n readonly min?: number;\n /** Most addresses the list may hold. Unbounded by default; 1 for From. */\n readonly max?: number;\n /** The address rule to judge by. By default the one in force where the\n form is made (`provideAddressRules`), else ours. */\n readonly rules?: AddressRules;\n /** The messages, for a host that words them itself or translates them. */\n readonly messages?: {\n readonly empty?: (min: number) => string;\n readonly invalid?: (offenders: readonly string[]) => string;\n readonly tooMany?: (max: number) => string;\n };\n}\n\nconst MESSAGES: Required<NonNullable<AddressListOptions['messages']>> = {\n empty: (min) => (min === 1 ? 'Add at least one address' : `Add at least ${min} addresses`),\n invalid: (offenders) => {\n const [first, ...rest] = offenders;\n if (!rest.length) return `“${first}” is not an email address`;\n return `“${first}” and ${rest.length} other${rest.length === 1 ? '' : 's'} are not email addresses`;\n },\n tooMany: (max) => (max === 1 ? 'Only one address here' : `At most ${max} addresses`),\n};\n\n/**\n * The rule an address field needs and the built-ins cannot give it:\n * `required` takes an empty array for a value, and `email` validates one\n * string. This validates a `string[]` of mailboxes in header form — the\n * address input's value — as a list: at least `min` of them (one, unless\n * told otherwise), at most `max`, and every one a well-formed address, with\n * the offenders named in the message so a chip can be found and fixed. A\n * placeholder a template fills in later (`{{contact.email}}`, by the rule's\n * `isPlaceholder`) is no offender — it counts toward `min` and `max`;\n * whether it may still be sent unresolved is the host's call.\n *\n * ```ts\n * const envelope = form(model, (p) => {\n * addressList(p.from, { max: 1 });\n * addressList(p.to);\n * addressList(p.cc, { min: 0 });\n * });\n * ```\n *\n * Errors carry a `kind` from the `ADDRESS_LIST_*` constants and a `message`\n * the input shows; pass `messages` to word or translate them.\n */\nexport function addressList<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string[], SchemaPathRules.Supported, TPathKind>,\n options: AddressListOptions = {},\n): void {\n const { min = 1, max = Infinity } = options;\n const messages = { ...MESSAGES, ...options.messages };\n const rules = options.rules ?? rulesInForce();\n validate(path, ({ value }) => {\n const addresses = value();\n const errors: ValidationError[] = [];\n if (addresses.length < min) {\n errors.push({ kind: ADDRESS_LIST_EMPTY, message: messages.empty(min) });\n }\n const offenders = addresses.filter(\n (address) => !isMailbox(address, rules) && !isPending(address, rules),\n );\n if (offenders.length) {\n errors.push({ kind: ADDRESS_LIST_INVALID, message: messages.invalid(offenders) });\n }\n if (addresses.length > max) {\n errors.push({ kind: ADDRESS_LIST_TOO_MANY, message: messages.tooMany(max) });\n }\n return errors.length ? errors : null;\n });\n}\n\n/** The rule provided where the schema runs — the form's injection context,\n when it was made in one — or ours. */\nfunction rulesInForce(): AddressRules {\n try {\n return inject(ADDRESS_RULES);\n } catch {\n return defaultAddressRules;\n }\n}\n","/*\n * Public API Surface of @h-k-dev/angular-email-editor/address-input\n */\n\nexport * from './address-input';\nexport * from './address-input.slots';\nexport * from './address-rules';\nexport * from './address-drag-group';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAEA;;;;;;;;;;;;;;;;;;AAkBG;MAEU,gBAAgB,CAAA;uGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,QAAA,EAAA,CAAA,uBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA,E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