@slotted/angular 0.1.0-beta.16 → 0.1.0-beta.18

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.
Files changed (59) hide show
  1. package/docs/alert.json +1 -1
  2. package/docs/alert.md +1 -1
  3. package/docs/app-shell.json +19 -2
  4. package/docs/app-shell.md +3 -1
  5. package/docs/dashboard-grid.json +6 -6
  6. package/docs/dashboard-grid.md +11 -5
  7. package/docs/description-list.json +9 -1
  8. package/docs/description-list.md +2 -1
  9. package/docs/guidelines/composition.md +12 -0
  10. package/docs/guidelines/errors-and-conflicts.md +7 -6
  11. package/docs/guidelines/index.md +3 -0
  12. package/docs/guidelines/layout-alignment.md +2 -2
  13. package/docs/guidelines/overviews.md +21 -1
  14. package/docs/guidelines/reading-permissions.md +2 -2
  15. package/docs/guidelines/reports.md +1 -1
  16. package/docs/index.md +2 -2
  17. package/docs/inline-message.json +5 -4
  18. package/docs/inline-message.md +6 -5
  19. package/docs/page.json +2 -2
  20. package/docs/page.md +1 -1
  21. package/docs/skills/compose-screen/SKILL.md +10 -1
  22. package/docs/skills/review-screen/SKILL.md +22 -20
  23. package/docs/stat-card.json +7 -4
  24. package/docs/stat-card.md +4 -4
  25. package/fesm2022/slotted-angular-app-shell.mjs +16 -5
  26. package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
  27. package/fesm2022/slotted-angular-chart.mjs +6 -0
  28. package/fesm2022/slotted-angular-chart.mjs.map +1 -1
  29. package/fesm2022/slotted-angular-currency-field.mjs.map +1 -1
  30. package/fesm2022/slotted-angular-dashboard-grid.mjs +60 -18
  31. package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
  32. package/fesm2022/slotted-angular-description-list.mjs +15 -6
  33. package/fesm2022/slotted-angular-description-list.mjs.map +1 -1
  34. package/fesm2022/slotted-angular-inline-message.mjs +2 -2
  35. package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
  36. package/fesm2022/slotted-angular-menubar.mjs +2 -1
  37. package/fesm2022/slotted-angular-menubar.mjs.map +1 -1
  38. package/fesm2022/slotted-angular-page.mjs +26 -6
  39. package/fesm2022/slotted-angular-page.mjs.map +1 -1
  40. package/fesm2022/slotted-angular-stat-card.mjs +37 -6
  41. package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
  42. package/package.json +3 -3
  43. package/types/slotted-angular-app-shell.d.ts +1 -1
  44. package/types/slotted-angular-app-shell.d.ts.map +1 -1
  45. package/types/slotted-angular-chart.d.ts +9 -9
  46. package/types/slotted-angular-chart.d.ts.map +1 -1
  47. package/types/slotted-angular-currency-field.d.ts +8 -8
  48. package/types/slotted-angular-currency-field.d.ts.map +1 -1
  49. package/types/slotted-angular-dashboard-grid.d.ts +27 -7
  50. package/types/slotted-angular-dashboard-grid.d.ts.map +1 -1
  51. package/types/slotted-angular-description-list.d.ts +11 -3
  52. package/types/slotted-angular-description-list.d.ts.map +1 -1
  53. package/types/slotted-angular-inline-message.d.ts +2 -2
  54. package/types/slotted-angular-menubar.d.ts +5 -4
  55. package/types/slotted-angular-menubar.d.ts.map +1 -1
  56. package/types/slotted-angular-page.d.ts +7 -1
  57. package/types/slotted-angular-page.d.ts.map +1 -1
  58. package/types/slotted-angular-stat-card.d.ts +8 -3
  59. package/types/slotted-angular-stat-card.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-inline-message.mjs","sources":["../../inline-message/src/inline-message-defaults.ts","../../inline-message/src/inline-message.ts","../../inline-message/src/inline-message-parts.ts","../../inline-message/src/slotted-angular-inline-message.ts"],"sourcesContent":["import { inject, Injectable, InjectionToken } from '@angular/core';\n\n/** Which of the five semantic colours the message speaks in. */\nexport type InlineMessageTone = 'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * The type step the message sits at. `sm` is the message of a field; `md` is\n * the message of a section. Both read the control scales, which the theme\n * restates per density.\n */\nexport type InlineMessageSize = 'sm' | 'md';\n\n/**\n * Which mark the message draws. `glyph` is the tone's own silhouette — the\n * circled information, check, diamond and circled exclamation. `dot` is a\n * neutral bullet in the tone's ink, the same shape for every tone including\n * the help tone that draws no silhouette at all, so a column of messages under\n * one field starts on one left edge. `none` draws nothing, and the tone is\n * then said by the ink and by the weight of the sentence: it is what `field`\n * and `field-group` ask for, because a silhouette repeated under every control\n * of a form is texture rather than a warning (F2).\n */\nexport type InlineMessageMark = 'glyph' | 'dot' | 'none';\n\n/**\n * Whether the message announces itself, and how loudly. `off` is the default,\n * because the WAI-ARIA APG records that a message already present when the page\n * finishes loading is not announced whatever role it carries.\n */\nexport type InlineMessageLive = 'off' | 'polite' | 'assertive';\n\n/**\n * The word a reader hears before the message. `null` is a tone that is not a\n * severity — help and information announce themselves by their sentence.\n */\nexport type InlineMessagePrefixes = Record<InlineMessageTone, string | null>;\n\n/**\n * The word a reader hears before the message, per tone.\n *\n * GOV.UK's Error message component publishes the idea and hard-codes the word;\n * this table generalises it to every tone that is a severity and puts it behind\n * the token below, which is the only translation surface this library has\n * today. `accent`, `secondary` and `info` carry none: information and help announce\n * themselves by their sentence, and a reader told “Information:” before every\n * hint hears one more word per field for nothing.\n */\nexport const INLINE_MESSAGE_PREFIXES: InlineMessagePrefixes = {\n accent: null,\n secondary: null,\n info: null,\n success: 'Success:',\n warning: 'Warning:',\n danger: 'Error:',\n};\n\nexport interface InlineMessageDefaults {\n live: InlineMessageLive;\n mark: InlineMessageMark;\n prefixes: InlineMessagePrefixes;\n size: InlineMessageSize;\n tone: InlineMessageTone;\n}\n\nconst FALLBACK: InlineMessageDefaults = {\n live: 'off',\n mark: 'glyph',\n prefixes: INLINE_MESSAGE_PREFIXES,\n size: 'sm',\n tone: 'secondary',\n};\n\nexport const INLINE_MESSAGE_DEFAULTS = new InjectionToken<InlineMessageDefaults>(\n 'slotted inline message defaults',\n { providedIn: 'root', factory: () => FALLBACK },\n);\n\n/**\n * An application decides once what its messages are painted like and — the one\n * that matters — what its severities are called, rather than repeating the same\n * inputs on every field in a form. A message that states any of them itself\n * still wins: an explicit input is never overridden by the token.\n *\n * `prefixes` is merged over the shipped table rather than replacing it, so a\n * Portuguese application writes the three words it has and inherits the shape.\n */\nexport function provideInlineMessageDefaults(\n defaults: Partial<Omit<InlineMessageDefaults, 'prefixes'>> & {\n prefixes?: Partial<InlineMessagePrefixes>;\n },\n) {\n return {\n provide: INLINE_MESSAGE_DEFAULTS,\n useFactory: (): InlineMessageDefaults => ({\n live: defaults.live ?? FALLBACK.live,\n mark: defaults.mark ?? FALLBACK.mark,\n prefixes: { ...FALLBACK.prefixes, ...defaults.prefixes },\n size: defaults.size ?? FALLBACK.size,\n tone: defaults.tone ?? FALLBACK.tone,\n }),\n };\n}\n\n/** What a message renders as here, before it states anything of its own. */\nexport function injectInlineMessageDefaults(): InlineMessageDefaults {\n return inject(INLINE_MESSAGE_DEFAULTS);\n}\n\n/**\n * Application-scoped rather than module-scoped, for the reason `tag` records: a\n * module-level counter produces colliding sequences when two applications\n * render in one server process, and the server and the client sequences must\n * match for hydration.\n */\n@Injectable({ providedIn: 'root' })\nexport class SlInlineMessageIdFactory {\n private count = 0;\n\n next() {\n this.count += 1;\n return `slotted-inline-message-${this.count}`;\n }\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { BUTTON_DEFAULTS_TOKEN } from '@slotted/angular/button';\nimport { SlGlyph, SlIcon } from '@slotted/angular/icon';\nimport type { GlyphName } from '@slotted/angular/icon';\n\nimport { injectInlineMessageDefaults, SlInlineMessageIdFactory } from './inline-message-defaults';\nimport type {\n InlineMessageLive,\n InlineMessageMark,\n InlineMessageSize,\n InlineMessageTone,\n} from './inline-message-defaults';\n\nexport type {\n InlineMessageLive,\n InlineMessageMark,\n InlineMessagePrefixes,\n InlineMessageSize,\n InlineMessageTone,\n} from './inline-message-defaults';\n\n/**\n * The glyph each tone draws: `specs/components/inline-message/contract.json`\n * holds the map. Help is not a severity and draws none.\n */\nconst TONE_GLYPH: Record<InlineMessageTone, GlyphName | null> = {\n accent: 'status-info',\n secondary: null,\n info: 'status-info',\n success: 'status-success',\n warning: 'status-warning',\n danger: 'status-danger',\n};\n\n/**\n * The two roles that announce, and the value that does not. Both roles imply\n * `aria-live` and `aria-atomic`, so the whole message is read rather than the\n * word that changed, and nothing here writes either attribute by hand.\n */\nconst LIVE_ROLE: Record<InlineMessageLive, string | null> = {\n off: null,\n polite: 'status',\n assertive: 'alert',\n};\n\n/**\n * One sentence about something else: a field, a section, an action. Help, an\n * error, a warning, a confirmation, or a wait.\n *\n * The directive is written on the consumer's own element, and the element it\n * belongs on is a `p`: the message is a sentence of prose about something else,\n * and a paragraph is the box a screen reader reads as one unit.\n *\n * **The severity is a word as well as a colour.** A reader who cannot see the\n * message hears the sentence and nothing else — neither the red ink nor the\n * crossed circle reaches the accessibility tree — so the family writes the\n * severity in clipped text before the message, which is GOV.UK's answer\n * generalised to every tone and to a table an application replaces once.\n *\n * **The role goes on this element, not on an inner one.** `slAlert` puts its\n * live role on the text part because it has a dismiss button beside the text,\n * and MDN's `alert` role reference is explicit that the role is for text\n * content alone. This family has no controls, so there is nothing to keep out.\n */\n/** What the message queries for, declared before the directive it stands for. */\nexport abstract class SlInlineMessageActionsRef {}\n\n@Component({\n selector: '[slInlineMessage]',\n standalone: true,\n exportAs: 'slInlineMessage',\n imports: [SlGlyph, SlIcon],\n template: `@if (prefixWord() !== '') {\n <span data-part=\"prefix\" data-part-prefix=\"\">{{ prefixWord() }}</span>\n }\n @if (!hideIcon()) {\n <span aria-hidden=\"true\" data-part=\"icon\" data-part-icon=\"\"\n ><ng-content select=\"[slInlineMessageIcon]\">\n @if (glyph(); as name) {\n <span slIcon><svg slGlyph [name]=\"name\"></svg></span>\n }</ng-content\n ></span>\n }\n <span\n data-part=\"text\"\n data-part-text=\"\"\n [attr.id]=\"grouped() ? textId : null\"\n [attr.role]=\"grouped() ? liveRole() : null\"\n ><ng-content\n /></span>\n <ng-content select=\"[slInlineMessageActions]\" />`,\n styleUrl: '../../../styles/src/inline-message/inline-message.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'inline-message',\n 'data-ui-inline-message': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-tone]': 'resolvedTone()',\n '[attr.data-size]': 'resolvedSize()',\n '[attr.data-live]': 'resolvedLive()',\n '[attr.data-mark]': 'resolvedMark()',\n '[attr.data-loading]': \"loading() ? '' : null\",\n '[attr.data-disabled]': \"disabled() === true ? '' : null\",\n '[attr.data-reserve]': \"reserve() ? '' : null\",\n '[attr.role]': 'role()',\n '[attr.aria-labelledby]': 'grouped() ? textId : null',\n '[attr.id]': 'messageId',\n },\n})\nexport class SlInlineMessage {\n /** Defaults to the token, then to `secondary` — help text. */\n readonly tone = input<InlineMessageTone | undefined>(undefined);\n /** Defaults to the token, then to `sm`. */\n readonly size = input<InlineMessageSize | undefined>(undefined);\n /** Defaults to the token, then to `off`. */\n readonly live = input<InlineMessageLive | undefined>(undefined);\n /**\n * Which mark is drawn. Defaults to the token, then to `glyph`. `slField` and\n * `slFieldGroup` ask for `none` instead, because a form reads a column of\n * sentences rather than a column of silhouettes.\n */\n readonly mark = input<InlineMessageMark | undefined>(undefined);\n /**\n * The word read before the message. Unstated is the tone's own — `Error:`,\n * `Warning:`, `Success:` — and the empty string removes it, for a message\n * whose sentence already names the severity.\n */\n readonly prefix = input<string | undefined>(undefined);\n /**\n * Removes the mark's box from the markup, for a message that carries its own\n * artwork beside it. `mark='none'` is the other way to draw nothing: it is an\n * axis a provider can set for every message under it, and it leaves the box\n * in place for `reserve` to hold a line open with.\n */\n readonly hideIcon = input(false, { transform: booleanAttribute });\n /** The message is waiting for something: the mark becomes a turning ring. */\n readonly loading = input(false, { transform: booleanAttribute });\n /**\n * Unstated rather than `false`, so a `field` can answer it once this family\n * is inside one. Stated, it wins.\n */\n readonly disabled = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /**\n * Holds one line box open whether or not there is a message, so the form\n * below does not move when the error arrives.\n */\n readonly reserve = input(false, { transform: booleanAttribute });\n\n private readonly defaults = injectInlineMessageDefaults();\n\n /**\n * An identifier bound by whatever renders the message. It is what a family\n * that composes with this one — `field`, whose description and error *are*\n * inline messages — uses to give the message an identifier derived from its\n * own base, which a static attribute cannot express and a directive on the\n * same element cannot write.\n */\n readonly id = input<string | undefined>(undefined);\n\n private readonly writtenId = inject(new HostAttributeToken('id'), { optional: true });\n private readonly generatedId = inject(SlInlineMessageIdFactory).next();\n\n /**\n * The identifier an `aria-describedby` or an `aria-errormessage` points at.\n * A consumer's own is never replaced, and the generated one is reachable from\n * a template through `exportAs` — which is the reach an Angular template has\n * and a React consumer answers with `useId` in their own component.\n *\n * A getter rather than a signal, so `message.messageId` keeps reading as a\n * value in every template that already writes it. The host binding below\n * calls it in a reactive context, so the `id` input above is tracked.\n */\n get messageId(): string {\n return this.id() ?? this.writtenId ?? this.generatedId;\n }\n /** The sentence's id, which names the group a message with actions becomes. */\n protected get textId(): string {\n return `${this.messageId}-text`;\n }\n\n /**\n * A role the consumer wrote is never replaced by the family's. A host binding\n * wins over a static attribute in Angular, so the written value has to be\n * read before the binding is computed rather than after — the asymmetry with\n * React, where a consumer's prop simply spreads over the family's.\n */\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n protected readonly resolvedTone = computed(() => this.tone() ?? this.defaults.tone);\n readonly resolvedSize = computed(() => this.size() ?? this.defaults.size);\n protected readonly resolvedLive = computed(() => this.live() ?? this.defaults.live);\n protected readonly resolvedMark = computed(() => this.mark() ?? this.defaults.mark);\n /* The glyph the family draws when the page supplies none. A message that is\n waiting draws a ring instead, and one that asked for no mark draws none. */\n protected readonly glyph = computed<GlyphName | null>(() => {\n const mark = this.resolvedMark();\n if (this.loading() || mark === 'none') return null;\n return mark === 'dot' ? 'dot' : TONE_GLYPH[this.resolvedTone()];\n });\n protected readonly liveRole = computed(() => LIVE_ROLE[this.resolvedLive()]);\n /**\n * A message that holds `[slInlineMessageActions]` is a group named by its\n * sentence, written on a `div`: a paragraph cannot hold a button. Its live\n * role moves to the sentence, so the buttons are not announced with it.\n */\n private readonly actions = contentChild(SlInlineMessageActionsRef);\n protected readonly grouped = computed(() => this.actions() !== undefined);\n protected readonly role = computed(\n () => this.writtenRole ?? (this.grouped() ? 'group' : this.liveRole()),\n );\n\n /* Unstated asks the table; the empty string is a consumer removing the word. */\n protected readonly prefixWord = computed(\n () => this.prefix() ?? this.defaults.prefixes[this.resolvedTone()] ?? '',\n );\n}\n\n/**\n * The answers a message offers, after its sentence: two amounts the reader\n * may have meant, a way to undo. Written on a `div` inside the message, which\n * is then a `div` itself; the buttons take the message's size.\n */\n@Directive({\n selector: '[slInlineMessageActions]',\n standalone: true,\n exportAs: 'slInlineMessageActions',\n host: { 'data-part': 'actions', 'data-part-actions': '' },\n providers: [\n { provide: SlInlineMessageActionsRef, useExisting: forwardRef(() => SlInlineMessageActions) },\n {\n provide: BUTTON_DEFAULTS_TOKEN,\n useFactory: () => ({\n ...inject(BUTTON_DEFAULTS_TOKEN, { skipSelf: true }),\n size: inject(SlInlineMessage).resolvedSize(),\n }),\n },\n ],\n})\nexport class SlInlineMessageActions {}\n","import { Directive } from '@angular/core';\n\n/**\n * A mark the page supplies instead of the tone's own. It is projected into the\n * box the family draws, so it keeps the size, the colour and the place on the\n * message's first line the tone's mark would have had.\n *\n * It is a marker rather than a component: what goes inside is the page's own\n * artwork, and the family has nothing to add to it beyond where it sits.\n */\n@Directive({\n selector: '[slInlineMessageIcon]',\n standalone: true,\n exportAs: 'slInlineMessageIcon',\n})\nexport class SlInlineMessageIcon {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAqCA;;;;;;;;;AASG;AACI,MAAM,uBAAuB,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OAAO;gCACjB,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACpD,gCAAA,IAAI,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC,YAAY,EAAE;6BAC7C,CAAC;AACH,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC3PD;;;;;;;AAOG;MAMU,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,qBAAqB;AAChC,iBAAA;;;ACdD;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-inline-message.mjs","sources":["../../inline-message/src/inline-message-defaults.ts","../../inline-message/src/inline-message.ts","../../inline-message/src/inline-message-parts.ts","../../inline-message/src/slotted-angular-inline-message.ts"],"sourcesContent":["import { inject, Injectable, InjectionToken } from '@angular/core';\n\n/** Which of the five semantic colours the message speaks in. */\nexport type InlineMessageTone = 'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * The type step the message sits at. `sm` sits beside a compact field; `md`\n * beside a large field. A message about a section is an alert. Both read the control scales, which the theme\n * restates per density.\n */\nexport type InlineMessageSize = 'sm' | 'md';\n\n/**\n * Which mark the message draws. `glyph` is the tone's own silhouette — the\n * circled information, check, diamond and circled exclamation. `dot` is a\n * neutral bullet in the tone's ink, the same shape for every tone including\n * the help tone that draws no silhouette at all, so a column of messages under\n * one field starts on one left edge. `none` draws nothing, and the tone is\n * then said by the ink and by the weight of the sentence: it is what `field`\n * and `field-group` ask for, because a silhouette repeated under every control\n * of a form is texture rather than a warning (F2).\n */\nexport type InlineMessageMark = 'glyph' | 'dot' | 'none';\n\n/**\n * Whether the message announces itself, and how loudly. `off` is the default,\n * because the WAI-ARIA APG records that a message already present when the page\n * finishes loading is not announced whatever role it carries.\n */\nexport type InlineMessageLive = 'off' | 'polite' | 'assertive';\n\n/**\n * The word a reader hears before the message. `null` is a tone that is not a\n * severity — help and information announce themselves by their sentence.\n */\nexport type InlineMessagePrefixes = Record<InlineMessageTone, string | null>;\n\n/**\n * The word a reader hears before the message, per tone.\n *\n * GOV.UK's Error message component publishes the idea and hard-codes the word;\n * this table generalises it to every tone that is a severity and puts it behind\n * the token below, which is the only translation surface this library has\n * today. `accent`, `secondary` and `info` carry none: information and help announce\n * themselves by their sentence, and a reader told “Information:” before every\n * hint hears one more word per field for nothing.\n */\nexport const INLINE_MESSAGE_PREFIXES: InlineMessagePrefixes = {\n accent: null,\n secondary: null,\n info: null,\n success: 'Success:',\n warning: 'Warning:',\n danger: 'Error:',\n};\n\nexport interface InlineMessageDefaults {\n live: InlineMessageLive;\n mark: InlineMessageMark;\n prefixes: InlineMessagePrefixes;\n size: InlineMessageSize;\n tone: InlineMessageTone;\n}\n\nconst FALLBACK: InlineMessageDefaults = {\n live: 'off',\n mark: 'glyph',\n prefixes: INLINE_MESSAGE_PREFIXES,\n size: 'sm',\n tone: 'secondary',\n};\n\nexport const INLINE_MESSAGE_DEFAULTS = new InjectionToken<InlineMessageDefaults>(\n 'slotted inline message defaults',\n { providedIn: 'root', factory: () => FALLBACK },\n);\n\n/**\n * An application decides once what its messages are painted like and — the one\n * that matters — what its severities are called, rather than repeating the same\n * inputs on every field in a form. A message that states any of them itself\n * still wins: an explicit input is never overridden by the token.\n *\n * `prefixes` is merged over the shipped table rather than replacing it, so a\n * Portuguese application writes the three words it has and inherits the shape.\n */\nexport function provideInlineMessageDefaults(\n defaults: Partial<Omit<InlineMessageDefaults, 'prefixes'>> & {\n prefixes?: Partial<InlineMessagePrefixes>;\n },\n) {\n return {\n provide: INLINE_MESSAGE_DEFAULTS,\n useFactory: (): InlineMessageDefaults => ({\n live: defaults.live ?? FALLBACK.live,\n mark: defaults.mark ?? FALLBACK.mark,\n prefixes: { ...FALLBACK.prefixes, ...defaults.prefixes },\n size: defaults.size ?? FALLBACK.size,\n tone: defaults.tone ?? FALLBACK.tone,\n }),\n };\n}\n\n/** What a message renders as here, before it states anything of its own. */\nexport function injectInlineMessageDefaults(): InlineMessageDefaults {\n return inject(INLINE_MESSAGE_DEFAULTS);\n}\n\n/**\n * Application-scoped rather than module-scoped, for the reason `tag` records: a\n * module-level counter produces colliding sequences when two applications\n * render in one server process, and the server and the client sequences must\n * match for hydration.\n */\n@Injectable({ providedIn: 'root' })\nexport class SlInlineMessageIdFactory {\n private count = 0;\n\n next() {\n this.count += 1;\n return `slotted-inline-message-${this.count}`;\n }\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { BUTTON_DEFAULTS_TOKEN } from '@slotted/angular/button';\nimport { SlGlyph, SlIcon } from '@slotted/angular/icon';\nimport type { GlyphName } from '@slotted/angular/icon';\n\nimport { injectInlineMessageDefaults, SlInlineMessageIdFactory } from './inline-message-defaults';\nimport type {\n InlineMessageLive,\n InlineMessageMark,\n InlineMessageSize,\n InlineMessageTone,\n} from './inline-message-defaults';\n\nexport type {\n InlineMessageLive,\n InlineMessageMark,\n InlineMessagePrefixes,\n InlineMessageSize,\n InlineMessageTone,\n} from './inline-message-defaults';\n\n/**\n * The glyph each tone draws: `specs/components/inline-message/contract.json`\n * holds the map. Help is not a severity and draws none.\n */\nconst TONE_GLYPH: Record<InlineMessageTone, GlyphName | null> = {\n accent: 'status-info',\n secondary: null,\n info: 'status-info',\n success: 'status-success',\n warning: 'status-warning',\n danger: 'status-danger',\n};\n\n/**\n * The two roles that announce, and the value that does not. Both roles imply\n * `aria-live` and `aria-atomic`, so the whole message is read rather than the\n * word that changed, and nothing here writes either attribute by hand.\n */\nconst LIVE_ROLE: Record<InlineMessageLive, string | null> = {\n off: null,\n polite: 'status',\n assertive: 'alert',\n};\n\n/**\n * One sentence about one field or one control; a message about a section is\n * an alert. Help, an error, a warning, a confirmation, or a wait.\n *\n * The directive is written on the consumer's own element, and the element it\n * belongs on is a `p`: the message is a sentence of prose about something else,\n * and a paragraph is the box a screen reader reads as one unit.\n *\n * **The severity is a word as well as a colour.** A reader who cannot see the\n * message hears the sentence and nothing else — neither the red ink nor the\n * crossed circle reaches the accessibility tree — so the family writes the\n * severity in clipped text before the message, which is GOV.UK's answer\n * generalised to every tone and to a table an application replaces once.\n *\n * **The role goes on this element, not on an inner one.** `slAlert` puts its\n * live role on the text part because it has a dismiss button beside the text,\n * and MDN's `alert` role reference is explicit that the role is for text\n * content alone. This family has no controls, so there is nothing to keep out.\n */\n/** What the message queries for, declared before the directive it stands for. */\nexport abstract class SlInlineMessageActionsRef {}\n\n@Component({\n selector: '[slInlineMessage]',\n standalone: true,\n exportAs: 'slInlineMessage',\n imports: [SlGlyph, SlIcon],\n template: `@if (prefixWord() !== '') {\n <span data-part=\"prefix\" data-part-prefix=\"\">{{ prefixWord() }}</span>\n }\n @if (!hideIcon()) {\n <span aria-hidden=\"true\" data-part=\"icon\" data-part-icon=\"\"\n ><ng-content select=\"[slInlineMessageIcon]\">\n @if (glyph(); as name) {\n <span slIcon><svg slGlyph [name]=\"name\"></svg></span>\n }</ng-content\n ></span>\n }\n <span\n data-part=\"text\"\n data-part-text=\"\"\n [attr.id]=\"grouped() ? textId : null\"\n [attr.role]=\"grouped() ? liveRole() : null\"\n ><ng-content\n /></span>\n <ng-content select=\"[slInlineMessageActions]\" />`,\n styleUrl: '../../../styles/src/inline-message/inline-message.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'inline-message',\n 'data-ui-inline-message': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-tone]': 'resolvedTone()',\n '[attr.data-size]': 'resolvedSize()',\n '[attr.data-live]': 'resolvedLive()',\n '[attr.data-mark]': 'resolvedMark()',\n '[attr.data-loading]': \"loading() ? '' : null\",\n '[attr.data-disabled]': \"disabled() === true ? '' : null\",\n '[attr.data-reserve]': \"reserve() ? '' : null\",\n '[attr.role]': 'role()',\n '[attr.aria-labelledby]': 'grouped() ? textId : null',\n '[attr.id]': 'messageId',\n },\n})\nexport class SlInlineMessage {\n /** Defaults to the token, then to `secondary` — help text. */\n readonly tone = input<InlineMessageTone | undefined>(undefined);\n /** Defaults to the token, then to `sm`. */\n readonly size = input<InlineMessageSize | undefined>(undefined);\n /** Defaults to the token, then to `off`. */\n readonly live = input<InlineMessageLive | undefined>(undefined);\n /**\n * Which mark is drawn. Defaults to the token, then to `glyph`. `slField` and\n * `slFieldGroup` ask for `none` instead, because a form reads a column of\n * sentences rather than a column of silhouettes.\n */\n readonly mark = input<InlineMessageMark | undefined>(undefined);\n /**\n * The word read before the message. Unstated is the tone's own — `Error:`,\n * `Warning:`, `Success:` — and the empty string removes it, for a message\n * whose sentence already names the severity.\n */\n readonly prefix = input<string | undefined>(undefined);\n /**\n * Removes the mark's box from the markup, for a message that carries its own\n * artwork beside it. `mark='none'` is the other way to draw nothing: it is an\n * axis a provider can set for every message under it, and it leaves the box\n * in place for `reserve` to hold a line open with.\n */\n readonly hideIcon = input(false, { transform: booleanAttribute });\n /** The message is waiting for something: the mark becomes a turning ring. */\n readonly loading = input(false, { transform: booleanAttribute });\n /**\n * Unstated rather than `false`, so a `field` can answer it once this family\n * is inside one. Stated, it wins.\n */\n readonly disabled = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /**\n * Holds one line box open whether or not there is a message, so the form\n * below does not move when the error arrives.\n */\n readonly reserve = input(false, { transform: booleanAttribute });\n\n private readonly defaults = injectInlineMessageDefaults();\n\n /**\n * An identifier bound by whatever renders the message. It is what a family\n * that composes with this one — `field`, whose description and error *are*\n * inline messages — uses to give the message an identifier derived from its\n * own base, which a static attribute cannot express and a directive on the\n * same element cannot write.\n */\n readonly id = input<string | undefined>(undefined);\n\n private readonly writtenId = inject(new HostAttributeToken('id'), { optional: true });\n private readonly generatedId = inject(SlInlineMessageIdFactory).next();\n\n /**\n * The identifier an `aria-describedby` or an `aria-errormessage` points at.\n * A consumer's own is never replaced, and the generated one is reachable from\n * a template through `exportAs` — which is the reach an Angular template has\n * and a React consumer answers with `useId` in their own component.\n *\n * A getter rather than a signal, so `message.messageId` keeps reading as a\n * value in every template that already writes it. The host binding below\n * calls it in a reactive context, so the `id` input above is tracked.\n */\n get messageId(): string {\n return this.id() ?? this.writtenId ?? this.generatedId;\n }\n /** The sentence's id, which names the group a message with actions becomes. */\n protected get textId(): string {\n return `${this.messageId}-text`;\n }\n\n /**\n * A role the consumer wrote is never replaced by the family's. A host binding\n * wins over a static attribute in Angular, so the written value has to be\n * read before the binding is computed rather than after — the asymmetry with\n * React, where a consumer's prop simply spreads over the family's.\n */\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n protected readonly resolvedTone = computed(() => this.tone() ?? this.defaults.tone);\n readonly resolvedSize = computed(() => this.size() ?? this.defaults.size);\n protected readonly resolvedLive = computed(() => this.live() ?? this.defaults.live);\n protected readonly resolvedMark = computed(() => this.mark() ?? this.defaults.mark);\n /* The glyph the family draws when the page supplies none. A message that is\n waiting draws a ring instead, and one that asked for no mark draws none. */\n protected readonly glyph = computed<GlyphName | null>(() => {\n const mark = this.resolvedMark();\n if (this.loading() || mark === 'none') return null;\n return mark === 'dot' ? 'dot' : TONE_GLYPH[this.resolvedTone()];\n });\n protected readonly liveRole = computed(() => LIVE_ROLE[this.resolvedLive()]);\n /**\n * A message that holds `[slInlineMessageActions]` is a group named by its\n * sentence, written on a `div`: a paragraph cannot hold a button. Its live\n * role moves to the sentence, so the buttons are not announced with it.\n */\n private readonly actions = contentChild(SlInlineMessageActionsRef);\n protected readonly grouped = computed(() => this.actions() !== undefined);\n protected readonly role = computed(\n () => this.writtenRole ?? (this.grouped() ? 'group' : this.liveRole()),\n );\n\n /* Unstated asks the table; the empty string is a consumer removing the word. */\n protected readonly prefixWord = computed(\n () => this.prefix() ?? this.defaults.prefixes[this.resolvedTone()] ?? '',\n );\n}\n\n/**\n * The answers a message offers, after its sentence: two amounts the reader\n * may have meant, a way to undo. Written on a `div` inside the message, which\n * is then a `div` itself; the buttons take the message's size.\n */\n@Directive({\n selector: '[slInlineMessageActions]',\n standalone: true,\n exportAs: 'slInlineMessageActions',\n host: { 'data-part': 'actions', 'data-part-actions': '' },\n providers: [\n { provide: SlInlineMessageActionsRef, useExisting: forwardRef(() => SlInlineMessageActions) },\n {\n provide: BUTTON_DEFAULTS_TOKEN,\n useFactory: () => ({\n ...inject(BUTTON_DEFAULTS_TOKEN, { skipSelf: true }),\n size: inject(SlInlineMessage).resolvedSize(),\n }),\n },\n ],\n})\nexport class SlInlineMessageActions {}\n","import { Directive } from '@angular/core';\n\n/**\n * A mark the page supplies instead of the tone's own. It is projected into the\n * box the family draws, so it keeps the size, the colour and the place on the\n * message's first line the tone's mark would have had.\n *\n * It is a marker rather than a component: what goes inside is the page's own\n * artwork, and the family has nothing to add to it beyond where it sits.\n */\n@Directive({\n selector: '[slInlineMessageIcon]',\n standalone: true,\n exportAs: 'slInlineMessageIcon',\n})\nexport class SlInlineMessageIcon {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAqCA;;;;;;;;;AASG;AACI,MAAM,uBAAuB,GAA0B;AAC5D,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,O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AAM,CAAC,eAAe,CAAC,CAAC,YAAY,EAAE;6BAC7C,CAAC;AACH,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC3PD;;;;;;;AAOG;MAMU,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,qBAAqB;AAChC,iBAAA;;;ACdD;;AAEG;;"}
@@ -56,7 +56,8 @@ class SlMenubar {
56
56
  * The inputs a consumer writes are stated as they are written and read as
57
57
  * what they resolve to: `orientation()`, `size()` and `disabled()` answer the
58
58
  * bar's actual decision, which is what a menu on the bar reads through
59
- * `MENUBAR_SURFACE`. The unresolved value belongs to nobody outside.
59
+ * `MENUBAR_SURFACE`. The inputs stay public: a template binding to a
60
+ * protected input fails a consumer's strict template check.
60
61
  */
61
62
  orientationInput = input(undefined, { ...(ngDevMode ? { debugName: "orientationInput" } : /* istanbul ignore next */ {}), alias: 'orientation' });
62
63
  sizeInput = input(undefined, { ...(ngDevMode ? { debugName: "sizeInput" } : /* istanbul ignore next */ {}), alias: 'size' });
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-menubar.mjs","sources":["../../menubar/src/menubar-defaults.ts","../../menubar/src/menubar.ts","../../menubar/src/slotted-angular-menubar.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\nimport type { MenuSize } from '@slotted/angular/menu';\n\nexport type MenubarOrientation = 'horizontal' | 'vertical';\n\nexport interface MenubarDefaults {\n disabled: boolean;\n loop: boolean;\n orientation: MenubarOrientation;\n size: MenuSize;\n typeahead: boolean;\n}\n\n/**\n * A bar is horizontal, wraps at its ends and answers typeahead — the three the\n * pattern describes. `size` is the one an application usually states, and it\n * reaches every menu the bar opens.\n */\nconst FALLBACK: MenubarDefaults = {\n disabled: false,\n loop: true,\n orientation: 'horizontal',\n size: 'md',\n typeahead: true,\n};\n\nexport const MENUBAR_DEFAULTS = new InjectionToken<MenubarDefaults>('slotted menubar defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/** The decisions an application takes once, in its bootstrap. */\nexport function provideMenubarDefaults(defaults: Partial<MenubarDefaults>) {\n return {\n provide: MENUBAR_DEFAULTS,\n useFactory: (): MenubarDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\nexport function injectMenubarDefaults(): MenubarDefaults {\n return inject(MENUBAR_DEFAULTS);\n}\n","import { createRovingTabindex } from '@slotted/core/focus';\nimport type { RovingTabindexHandle } from '@slotted/core/focus';\nimport { createControllable } from '@slotted/core/state';\nimport type { ChangeRequest } from '@slotted/core/state';\nimport { createTypeahead, isPrintable } from '@slotted/core/typeahead';\nimport type { TypeaheadHandle } from '@slotted/core/typeahead';\nimport { MENUBAR_SURFACE } from '@slotted/angular/menu';\nimport type { MenubarSurface, MenuOpenReason, MenuSize } from '@slotted/angular/menu';\nimport {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectMenubarDefaults } from './menubar-defaults';\nimport type { MenubarOrientation } from './menubar-defaults';\n\nexport type { MenubarDefaults, MenubarOrientation } from './menubar-defaults';\n\nconst TRIGGER_SELECTOR = \"[data-part='trigger']\";\n\n/**\n * A row of triggers with one tab stop, each opening a `menu`.\n *\n * The bar holds which menu is open and nothing else: every part inside it\n * belongs to the `menu` family and is imported from `@slotted/angular/menu`.\n * The CDK's menubar and Radix's each restate the whole menu API a second time,\n * which is two copies of one machine and one place for a later capability to go\n * missing.\n */\n@Component({\n selector: 'sl-menubar',\n standalone: true,\n exportAs: 'slMenubar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: '../../../styles/src/menubar/menubar.css',\n template: '<ng-content />',\n host: {\n 'data-ui': 'menubar',\n 'data-ui-menubar': '',\n 'data-part': 'root',\n 'data-part-root': '',\n role: 'menubar',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-size]': 'size()',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '[attr.aria-orientation]': 'ariaOrientation()',\n '(keydown)': 'onKeyDown($event)',\n },\n providers: [{ provide: MENUBAR_SURFACE, useExisting: forwardRef(() => SlMenubar) }],\n})\nexport class SlMenubar implements MenubarSurface {\n /**\n * The menu now open, named by its own `value`. A bar has at most one, so its\n * state is that name rather than a boolean on each menu — the one model that\n * cannot represent two open menus at once.\n */\n readonly value = model<string | undefined>(undefined);\n /** One output for one transition, carrying the reason and the event. */\n readonly valueChangeRequest = output<ChangeRequest<string>>();\n\n /**\n * The inputs a consumer writes are stated as they are written and read as\n * what they resolve to: `orientation()`, `size()` and `disabled()` answer the\n * bar's actual decision, which is what a menu on the bar reads through\n * `MENUBAR_SURFACE`. The unresolved value belongs to nobody outside.\n */\n protected readonly orientationInput = input<MenubarOrientation | undefined>(undefined, {\n alias: 'orientation',\n });\n protected readonly sizeInput = input<MenuSize | undefined>(undefined, { alias: 'size' });\n protected readonly disabledInput = input(undefined, {\n alias: 'disabled',\n transform: (given: boolean | string | undefined) =>\n given === undefined ? undefined : booleanAttribute(given),\n });\n readonly loop = input(undefined, {\n transform: (given: boolean | string | undefined) =>\n given === undefined ? undefined : booleanAttribute(given),\n });\n readonly typeahead = input(undefined, {\n transform: (given: boolean | string | undefined) =>\n given === undefined ? undefined : booleanAttribute(given),\n });\n\n private readonly defaults = injectMenubarDefaults();\n private readonly element: HTMLElement = inject(ElementRef).nativeElement;\n private readonly registry = new Map<string, HTMLElement>();\n private typeaheadHandle: TypeaheadHandle | null = null;\n\n /** Where focus goes when the bar opens one of its menus. */\n readonly entry: { current: 'first' | 'last' | 'trigger' } = { current: 'first' };\n\n readonly orientation = computed(() => this.orientationInput() ?? this.defaults.orientation);\n readonly size = computed(() => this.sizeInput() ?? this.defaults.size);\n readonly disabled = computed(() => this.disabledInput() ?? this.defaults.disabled);\n readonly resolvedLoop = computed(() => this.loop() ?? this.defaults.loop);\n readonly resolvedTypeahead = computed(() => this.typeahead() ?? this.defaults.typeahead);\n\n protected readonly ariaOrientation = computed(() =>\n this.orientation() === 'vertical' ? 'vertical' : null,\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n\n afterNextRender(() => {\n /**\n * One tab stop for the whole bar, and the trigger the reader last left.\n * Moving along a bar that already has a menu open switches menus, which\n * is what makes it a bar rather than a row of buttons.\n */\n const tabindex: RovingTabindexHandle = createRovingTabindex(this.element, {\n includeAriaDisabled: true,\n itemSelector: TRIGGER_SELECTOR,\n loop: () => this.resolvedLoop(),\n orientation: () => this.orientation(),\n onMove: (_index, trigger) => {\n if (this.value() === undefined) return;\n this.entry.current = 'trigger';\n this.move(this.nameOf(trigger), 'keyboard');\n },\n });\n\n /* A menu arriving or leaving has to reach the tab stop, and the DOM is\n the one thing the two bindings agree on. */\n const observer = new MutationObserver(() => tabindex.refresh());\n observer.observe(this.element, { childList: true, subtree: true });\n\n if (this.resolvedTypeahead()) this.typeaheadHandle = createTypeahead();\n\n destroyRef.onDestroy(() => {\n observer.disconnect();\n tabindex.destroy();\n this.typeaheadHandle?.destroy();\n });\n });\n }\n\n /** Opens the menu that answers to this name. */\n open(value: string, reason: MenuOpenReason, source?: Event) {\n this.move(value, reason, source);\n }\n\n close(reason: MenuOpenReason, source?: Event) {\n this.move(undefined, reason, source);\n }\n\n register(value: string, trigger: HTMLElement | null) {\n if (trigger === null) this.registry.delete(value);\n else this.registry.set(value, trigger);\n }\n\n /**\n * The pattern's three-step rule for the inline axis: close what is open, move\n * to the neighbouring trigger, and open its menu. Focus stays on the trigger\n * — the recommended half of the pattern's choice — so the next arrow keeps\n * moving along the bar rather than walking into a list nobody asked for.\n */\n step(direction: 1 | -1, options?: { open?: boolean }) {\n const list = this.triggers();\n if (list.length === 0) return;\n\n const active = this.element.ownerDocument.activeElement;\n const held = this.value();\n const from = list.findIndex((trigger) => trigger === active || this.nameOf(trigger) === held);\n const index = from === -1 ? 0 : from + direction;\n const wrapped = this.resolvedLoop()\n ? (index + list.length) % list.length\n : Math.min(Math.max(index, 0), list.length - 1);\n\n const next = list[wrapped];\n if (next === undefined) return;\n next.focus({ preventScroll: true });\n if (options?.open === true) {\n this.entry.current = 'trigger';\n this.move(this.nameOf(next), 'keyboard');\n }\n }\n\n private triggers(): HTMLElement[] {\n return [...this.element.querySelectorAll<HTMLElement>(TRIGGER_SELECTOR)];\n }\n\n private nameOf(trigger: HTMLElement | undefined): string | undefined {\n if (trigger === undefined) return undefined;\n for (const [name, candidate] of this.registry) if (candidate === trigger) return name;\n return undefined;\n }\n\n private move(next: string | undefined, reason: MenuOpenReason, source?: Event) {\n if (next === this.value()) return;\n\n let cancelled = false;\n const state = createControllable<string>({\n initial: this.value() ?? '',\n onRequest: (request) => {\n this.valueChangeRequest.emit(request);\n cancelled = request.cancelled;\n },\n });\n const moved = state.request(next ?? '', reason, source);\n if (cancelled) return;\n if (moved) this.value.set(next);\n }\n\n /** The pattern asks for typeahead on a menubar as well as inside a menu. */\n protected onKeyDown(event: KeyboardEvent) {\n const handle = this.typeaheadHandle;\n if (handle === null) return;\n if (event.ctrlKey || event.metaKey || event.altKey) return;\n if (!isPrintable(event.key, handle.query.length > 0)) return;\n\n const list = this.triggers();\n const from = list.findIndex((trigger) => trigger === event.target);\n const index = handle.match(\n event.key,\n list.map((trigger) => trigger.textContent?.trim() ?? ''),\n from,\n );\n if (index === -1) return;\n\n event.preventDefault();\n const trigger = list[index];\n trigger?.focus({ preventScroll: true });\n if (this.value() === undefined) return;\n this.entry.current = 'trigger';\n this.move(this.nameOf(trigger), 'keyboard');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAaA;;;;AAIG;AACH,MAAM,QAAQ,GAAoB;AAChC,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,IAAI;CAChB;MAEY,gBAAgB,GAAG,IAAI,cAAc,CAAkB,0BAA0B,EAAE;AAC9F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAED;AACM,SAAU,sBAAsB,CAAC,QAAkC,EAAA;IACvE,OAAO;AACL,QAAA,OAAO,EAAE,gBAAgB;AACzB,QAAA,UAAU,EAAE,OAAwB,EAAE,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;KAClE;AACH;SAEgB,qBAAqB,GAAA;AACnC,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAC;AACjC;;ACZA,MAAM,gBAAgB,GAAG,uBAAuB;AAEhD;;;;;;;;AAQG;MAwBU,SAAS,CAAA;AACpB;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAqB,SAAS;8EAAC;;IAE5C,kBAAkB,GAAG,MAAM,EAAyB;AAE7D;;;;;AAKG;IACgB,gBAAgB,GAAG,KAAK,CAAiC,SAAS,wFACnF,KAAK,EAAE,aAAa,EAAA,CACpB;IACiB,SAAS,GAAG,KAAK,CAAuB,SAAS,iFAAI,KAAK,EAAE,MAAM,EAAA,CAAG;AACrE,IAAA,aAAa,GAAG,KAAK,CAAC,SAAS,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAA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e;AAC1C,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,sBAAsB,EAAE,wBAAwB;AAChD,wBAAA,sBAAsB,EAAE,0BAA0B;AAClD,wBAAA,yBAAyB,EAAE,mBAAmB;AAC9C,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,SAAU,CAAC,EAAE,CAAC,EAAA,MAAA,EAAA,CAAA,u+FAAA,CAAA,EAAA;;;AC7DrF;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-menubar.mjs","sources":["../../menubar/src/menubar-defaults.ts","../../menubar/src/menubar.ts","../../menubar/src/slotted-angular-menubar.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\nimport type { MenuSize } from '@slotted/angular/menu';\n\nexport type MenubarOrientation = 'horizontal' | 'vertical';\n\nexport interface MenubarDefaults {\n disabled: boolean;\n loop: boolean;\n orientation: MenubarOrientation;\n size: MenuSize;\n typeahead: boolean;\n}\n\n/**\n * A bar is horizontal, wraps at its ends and answers typeahead — the three the\n * pattern describes. `size` is the one an application usually states, and it\n * reaches every menu the bar opens.\n */\nconst FALLBACK: MenubarDefaults = {\n disabled: false,\n loop: true,\n orientation: 'horizontal',\n size: 'md',\n typeahead: true,\n};\n\nexport const MENUBAR_DEFAULTS = new InjectionToken<MenubarDefaults>('slotted menubar defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/** The decisions an application takes once, in its bootstrap. */\nexport function provideMenubarDefaults(defaults: Partial<MenubarDefaults>) {\n return {\n provide: MENUBAR_DEFAULTS,\n useFactory: (): MenubarDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\nexport function injectMenubarDefaults(): MenubarDefaults {\n return inject(MENUBAR_DEFAULTS);\n}\n","import { createRovingTabindex } from '@slotted/core/focus';\nimport type { RovingTabindexHandle } from '@slotted/core/focus';\nimport { createControllable } from '@slotted/core/state';\nimport type { ChangeRequest } from '@slotted/core/state';\nimport { createTypeahead, isPrintable } from '@slotted/core/typeahead';\nimport type { TypeaheadHandle } from '@slotted/core/typeahead';\nimport { MENUBAR_SURFACE } from '@slotted/angular/menu';\nimport type { MenubarSurface, MenuOpenReason, MenuSize } from '@slotted/angular/menu';\nimport {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectMenubarDefaults } from './menubar-defaults';\nimport type { MenubarOrientation } from './menubar-defaults';\n\nexport type { MenubarDefaults, MenubarOrientation } from './menubar-defaults';\n\nconst TRIGGER_SELECTOR = \"[data-part='trigger']\";\n\n/**\n * A row of triggers with one tab stop, each opening a `menu`.\n *\n * The bar holds which menu is open and nothing else: every part inside it\n * belongs to the `menu` family and is imported from `@slotted/angular/menu`.\n * The CDK's menubar and Radix's each restate the whole menu API a second time,\n * which is two copies of one machine and one place for a later capability to go\n * missing.\n */\n@Component({\n selector: 'sl-menubar',\n standalone: true,\n exportAs: 'slMenubar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: '../../../styles/src/menubar/menubar.css',\n template: '<ng-content />',\n host: {\n 'data-ui': 'menubar',\n 'data-ui-menubar': '',\n 'data-part': 'root',\n 'data-part-root': '',\n role: 'menubar',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-size]': 'size()',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '[attr.aria-orientation]': 'ariaOrientation()',\n '(keydown)': 'onKeyDown($event)',\n },\n providers: [{ provide: MENUBAR_SURFACE, useExisting: forwardRef(() => SlMenubar) }],\n})\nexport class SlMenubar implements MenubarSurface {\n /**\n * The menu now open, named by its own `value`. A bar has at most one, so its\n * state is that name rather than a boolean on each menu — the one model that\n * cannot represent two open menus at once.\n */\n readonly value = model<string | undefined>(undefined);\n /** One output for one transition, carrying the reason and the event. */\n readonly valueChangeRequest = output<ChangeRequest<string>>();\n\n /**\n * The inputs a consumer writes are stated as they are written and read as\n * what they resolve to: `orientation()`, `size()` and `disabled()` answer the\n * bar's actual decision, which is what a menu on the bar reads through\n * `MENUBAR_SURFACE`. The inputs stay public: a template binding to a\n * protected input fails a consumer's strict template check.\n */\n readonly orientationInput = input<MenubarOrientation | undefined>(undefined, {\n alias: 'orientation',\n });\n readonly sizeInput = input<MenuSize | undefined>(undefined, { alias: 'size' });\n readonly disabledInput = input(undefined, {\n alias: 'disabled',\n transform: (given: boolean | string | undefined) =>\n given === undefined ? undefined : booleanAttribute(given),\n });\n readonly loop = input(undefined, {\n transform: (given: boolean | string | undefined) =>\n given === undefined ? undefined : booleanAttribute(given),\n });\n readonly typeahead = input(undefined, {\n transform: (given: boolean | string | undefined) =>\n given === undefined ? undefined : booleanAttribute(given),\n });\n\n private readonly defaults = injectMenubarDefaults();\n private readonly element: HTMLElement = inject(ElementRef).nativeElement;\n private readonly registry = new Map<string, HTMLElement>();\n private typeaheadHandle: TypeaheadHandle | null = null;\n\n /** Where focus goes when the bar opens one of its menus. */\n readonly entry: { current: 'first' | 'last' | 'trigger' } = { current: 'first' };\n\n readonly orientation = computed(() => this.orientationInput() ?? this.defaults.orientation);\n readonly size = computed(() => this.sizeInput() ?? this.defaults.size);\n readonly disabled = computed(() => this.disabledInput() ?? this.defaults.disabled);\n readonly resolvedLoop = computed(() => this.loop() ?? this.defaults.loop);\n readonly resolvedTypeahead = computed(() => this.typeahead() ?? this.defaults.typeahead);\n\n protected readonly ariaOrientation = computed(() =>\n this.orientation() === 'vertical' ? 'vertical' : null,\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n\n afterNextRender(() => {\n /**\n * One tab stop for the whole bar, and the trigger the reader last left.\n * Moving along a bar that already has a menu open switches menus, which\n * is what makes it a bar rather than a row of buttons.\n */\n const tabindex: RovingTabindexHandle = createRovingTabindex(this.element, {\n includeAriaDisabled: true,\n itemSelector: TRIGGER_SELECTOR,\n loop: () => this.resolvedLoop(),\n orientation: () => this.orientation(),\n onMove: (_index, trigger) => {\n if (this.value() === undefined) return;\n this.entry.current = 'trigger';\n this.move(this.nameOf(trigger), 'keyboard');\n },\n });\n\n /* A menu arriving or leaving has to reach the tab stop, and the DOM is\n the one thing the two bindings agree on. */\n const observer = new MutationObserver(() => tabindex.refresh());\n observer.observe(this.element, { childList: true, subtree: true });\n\n if (this.resolvedTypeahead()) this.typeaheadHandle = createTypeahead();\n\n destroyRef.onDestroy(() => {\n observer.disconnect();\n tabindex.destroy();\n this.typeaheadHandle?.destroy();\n });\n });\n }\n\n /** Opens the menu that answers to this name. */\n open(value: string, reason: MenuOpenReason, source?: Event) {\n this.move(value, reason, source);\n }\n\n close(reason: MenuOpenReason, source?: Event) {\n this.move(undefined, reason, source);\n }\n\n register(value: string, trigger: HTMLElement | null) {\n if (trigger === null) this.registry.delete(value);\n else this.registry.set(value, trigger);\n }\n\n /**\n * The pattern's three-step rule for the inline axis: close what is open, move\n * to the neighbouring trigger, and open its menu. Focus stays on the trigger\n * — the recommended half of the pattern's choice — so the next arrow keeps\n * moving along the bar rather than walking into a list nobody asked for.\n */\n step(direction: 1 | -1, options?: { open?: boolean }) {\n const list = this.triggers();\n if (list.length === 0) return;\n\n const active = this.element.ownerDocument.activeElement;\n const held = this.value();\n const from = list.findIndex((trigger) => trigger === active || this.nameOf(trigger) === held);\n const index = from === -1 ? 0 : from + direction;\n const wrapped = this.resolvedLoop()\n ? (index + list.length) % list.length\n : Math.min(Math.max(index, 0), list.length - 1);\n\n const next = list[wrapped];\n if (next === undefined) return;\n next.focus({ preventScroll: true });\n if (options?.open === true) {\n this.entry.current = 'trigger';\n this.move(this.nameOf(next), 'keyboard');\n }\n }\n\n private triggers(): HTMLElement[] {\n return [...this.element.querySelectorAll<HTMLElement>(TRIGGER_SELECTOR)];\n }\n\n private nameOf(trigger: HTMLElement | undefined): string | undefined {\n if (trigger === undefined) return undefined;\n for (const [name, candidate] of this.registry) if (candidate === trigger) return name;\n return undefined;\n }\n\n private move(next: string | undefined, reason: MenuOpenReason, source?: Event) {\n if (next === this.value()) return;\n\n let cancelled = false;\n const state = createControllable<string>({\n initial: this.value() ?? '',\n onRequest: (request) => {\n this.valueChangeRequest.emit(request);\n cancelled = request.cancelled;\n },\n });\n const moved = state.request(next ?? '', reason, source);\n if (cancelled) return;\n if (moved) this.value.set(next);\n }\n\n /** The pattern asks for typeahead on a menubar as well as inside a menu. */\n protected onKeyDown(event: KeyboardEvent) {\n const handle = this.typeaheadHandle;\n if (handle === null) return;\n if (event.ctrlKey || event.metaKey || event.altKey) return;\n if (!isPrintable(event.key, handle.query.length > 0)) return;\n\n const list = this.triggers();\n const from = list.findIndex((trigger) => trigger === event.target);\n const index = handle.match(\n event.key,\n list.map((trigger) => trigger.textContent?.trim() ?? ''),\n from,\n );\n if (index === -1) return;\n\n event.preventDefault();\n const trigger = list[index];\n trigger?.focus({ preventScroll: true });\n if (this.value() === undefined) return;\n this.entry.current = 'trigger';\n this.move(this.nameOf(trigger), 'keyboard');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAaA;;;;AAIG;AACH,MAAM,QAAQ,GAAoB;AAChC,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,IAAI;CAChB;MAEY,gBAAgB,GAAG,IAAI,cAAc,CAAkB,0BAA0B,EAAE;AAC9F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAED;AACM,SAAU,sBAAsB,CAAC,QAAkC,EAAA;IACvE,OAAO;AACL,QAAA,OAAO,EAAE,gBAAgB;AACzB,QAA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,u+FAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAgBf,SAAS,EAAA,UAAA,EAAA,CAAA;kBAvBrB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,UAAA,EACV,IAAI,EAAA,QAAA,EACN,WAAW,mBACJ,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAE3B,gBAAgB,EAAA,IAAA,EACpB;AACJ,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,iBAAiB,EAAE,EAAE;AACrB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,gBAAgB,EAAE,EAAE;AACpB,wBAAA,IAAI,EAAE,SAAS;AACf,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,sBAAsB,EAAE,wBAAwB;AAChD,wBAAA,sBAAsB,EAAE,0BAA0B;AAClD,wBAAA,yBAAyB,EAAE,mBAAmB;AAC9C,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,SAAU,CAAC,EAAE,CAAC,EAAA,MAAA,EAAA,CAAA,u+FAAA,CAAA,EAAA;;;AC7DrF;;AAEG;;"}
@@ -38,6 +38,12 @@ function injectPageDefaults() {
38
38
 
39
39
  /** The custom property the scroller carries for what sticks above the footer. */
40
40
  const STICKY_BOTTOM_PROPERTY = '--slotted-page-sticky-bottom';
41
+ /**
42
+ * The custom property the scroller carries for its own visible height: a
43
+ * sticky element of the consumer's caps its height by it rather than by the
44
+ * viewport, which an inset canvas makes taller than the scroller.
45
+ */
46
+ const SCROLLPORT_BLOCK_SIZE_PROPERTY = '--slotted-page-scrollport-block-size';
41
47
  /**
42
48
  * The inset lives on the body, so content written straight into the page is
43
49
  * drawn against the viewport's edges and nothing else says why. A header is
@@ -142,15 +148,28 @@ class SlPage {
142
148
  const bar = () => this.native.querySelector(':scope > [data-part="footer"]');
143
149
  /* The property inherits, so every write invalidates style for everything
144
150
  under the scroller: it is written only when the height changes. */
151
+ const write = (property, length) => {
152
+ const value = `${length}px`;
153
+ if (target.style.getPropertyValue(property) === value)
154
+ return;
155
+ target.style.setProperty(property, value);
156
+ };
157
+ /* Under `self` the page's own scroll part is what scrolls. */
158
+ const scroller = (this.resolvedScroll() === 'self'
159
+ ? this.native.querySelector(':scope > [data-part="scroll"]')
160
+ : null) ?? target;
145
161
  const publish = () => {
146
162
  const height = this.resolvedScroll() === 'self' ? 0 : (bar()?.offsetHeight ?? 0);
147
- const value = `${height}px`;
148
- if (target.style.getPropertyValue(STICKY_BOTTOM_PROPERTY) === value)
149
- return;
150
- target.style.setProperty(STICKY_BOTTOM_PROPERTY, value);
163
+ write(STICKY_BOTTOM_PROPERTY, height);
151
164
  };
152
- const observer = new ResizeObserver(publish);
165
+ /* The scroller is read on a size report only, never while rendering:
166
+ the observer reports once as soon as it observes. */
167
+ const observer = new ResizeObserver(() => {
168
+ publish();
169
+ write(SCROLLPORT_BLOCK_SIZE_PROPERTY, scroller.clientHeight);
170
+ });
153
171
  observer.observe(this.native);
172
+ observer.observe(scroller);
154
173
  const footer = bar();
155
174
  if (footer !== null)
156
175
  observer.observe(footer);
@@ -158,6 +177,7 @@ class SlPage {
158
177
  destroyRef.onDestroy(() => {
159
178
  observer.disconnect();
160
179
  target.style.removeProperty(STICKY_BOTTOM_PROPERTY);
180
+ target.style.removeProperty(SCROLLPORT_BLOCK_SIZE_PROPERTY);
161
181
  });
162
182
  });
163
183
  }
@@ -279,5 +299,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
279
299
  * Generated bundle index. Do not edit.
280
300
  */
281
301
 
282
- export { PAGE_DEFAULTS, STICKY_BOTTOM_PROPERTY, SlPage, SlPageBody, SlPageFooter, injectPageDefaults, providePageDefaults };
302
+ export { PAGE_DEFAULTS, SCROLLPORT_BLOCK_SIZE_PROPERTY, STICKY_BOTTOM_PROPERTY, SlPage, SlPageBody, SlPageFooter, injectPageDefaults, providePageDefaults };
283
303
  //# sourceMappingURL=slotted-angular-page.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-page.mjs","sources":["../../page/src/page-defaults.ts","../../page/src/page.ts","../../page/src/slotted-angular-page.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\n/** The width of the content column: the container's own sizes. */\nexport type PageWidth = 'measure' | 'content' | 'wide' | 'full' | 'bleed';\n\n/** The inset of the content column from the edge of the page: the container's own steps. */\nexport type PageInset = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\n/**\n * Who scrolls. `ancestor` puts the page inside whatever scrolls and makes it\n * at least as tall as that, so the footer has a bottom to stick to. `self`\n * makes the page's own scroll part the scroller, with the footer below it.\n */\nexport type PageScroll = 'ancestor' | 'self';\n\n/** The ground: the sunken canvas of an application, or the plain surface of a document. */\nexport type PageGround = 'sunken' | 'surface';\n\n/** Whether the root is the document's `main` landmark. */\nexport type PageLandmark = 'main' | 'none';\n\nexport interface PageDefaults {\n ground: PageGround;\n inset: PageInset;\n landmark: PageLandmark;\n scroll: PageScroll;\n width: PageWidth;\n}\n\nconst FALLBACK: PageDefaults = {\n ground: 'sunken',\n inset: 6,\n landmark: 'main',\n scroll: 'ancestor',\n width: 'wide',\n};\n\nexport const PAGE_DEFAULTS = new InjectionToken<PageDefaults>('slotted page defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/**\n * An application decides once how its pages are laid out — the measure, the\n * inset, who scrolls, the ground — rather than repeating the same inputs on\n * every route. A page that states any of them itself still wins. Its words\n * come from the language in force (`provideSlotted`).\n */\nexport function providePageDefaults(defaults: Partial<PageDefaults>) {\n return {\n provide: PAGE_DEFAULTS,\n useFactory: (): PageDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\n/** What a page renders as here, before it states anything of its own. */\nexport function injectPageDefaults(): PageDefaults {\n return inject(PAGE_DEFAULTS);\n}\n","import { createPresence } from '@slotted/core/presence';\nimport type { PresenceStatus } from '@slotted/core/presence';\nimport { findScrollParent } from '@slotted/core/sticky-header';\nimport { SlContainer } from '@slotted/angular/container';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport { SlHeadingLevel } from '@slotted/angular/typography';\nimport { pageMessages, type PageMessages, type PartialMessages } from '@slotted/core/i18n';\nimport {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n HostAttributeToken,\n inject,\n input,\n isDevMode,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectPageDefaults } from './page-defaults';\nimport type { PageGround, PageInset, PageLandmark, PageScroll, PageWidth } from './page-defaults';\n\nexport type {\n PageDefaults,\n PageGround,\n PageInset,\n PageLandmark,\n PageScroll,\n PageWidth,\n} from './page-defaults';\n\n/** The custom property the scroller carries for what sticks above the footer. */\nexport const STICKY_BOTTOM_PROPERTY = '--slotted-page-sticky-bottom';\n\n/**\n * The inset lives on the body, so content written straight into the page is\n * drawn against the viewport's edges and nothing else says why. A header is\n * not that content — it carries its own inset — so it is the one child the\n * check passes over.\n */\nfunction warnWithoutBody(root: HTMLElement) {\n const scroll = root.querySelector(':scope > [data-part=\"scroll\"]');\n if (scroll === null) return;\n const content = [...scroll.children].filter(\n (child) => child.getAttribute('data-ui') !== 'page-header',\n );\n if (content.length === 0) return;\n if (content.some((child) => child.getAttribute('data-part') === 'body')) return;\n console.warn(\n 'slPage has content outside slPageBody. Content outside the body receives no inset: wrap it in an element carrying slPageBody.',\n );\n}\n\n/**\n * The column of a screen: who scrolls, how wide the content is, where the\n * footer stays, how much air the body has.\n *\n * **The header is a direct child of what scrolls.** There is no header part: a\n * `sticky` element never leaves the box that contains it, so a wrapper exactly\n * the header's height would pin nothing. The element carrying `slPageHeader`\n * is projected first into the scroll part, beside the body.\n *\n * **The footer is projected outside the scroll part** — below the scroller\n * under `self`, stuck to the bottom of the root under `ancestor` — which is\n * what content projection is for. It keeps its box through its exit on\n * `open`, so the bar slides out rather than vanishing.\n *\n * **The element is the consumer's.** `<main slPage>` is the main landmark and\n * the directive adds nothing; `<div slPage>` gets `role=\"main\"` unless\n * `landmark=\"none\"` says the document already has one.\n */\n@Component({\n selector: '[slPage]',\n standalone: true,\n exportAs: 'slPage',\n template: `<div data-part=\"scroll\" data-part-scroll=\"\">\n <ng-content select=\"[slPageHeader]\" />\n <ng-content />\n </div>\n <ng-content select=\"[slPageFooter]\" />`,\n styleUrl: '../../../styles/src/page/page.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'page',\n 'data-ui-page': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.role]': 'role()',\n '[attr.data-width]': 'resolvedWidth()',\n '[attr.data-scroll]': 'resolvedScroll()',\n '[attr.data-ground]': 'resolvedGround()',\n '[attr.data-fill]': \"fill() ? '' : null\",\n '[attr.data-loading]': \"loading() ? '' : null\",\n },\n})\nexport class SlPage {\n /** Defaults to the provider, then `wide`. */\n readonly width = input<PageWidth | undefined>(undefined);\n /** Defaults to the provider, then `6`. */\n readonly inset = input<PageInset | undefined>(undefined);\n /** Defaults to the provider, then `ancestor`. */\n readonly scroll = input<PageScroll | undefined>(undefined);\n /** Defaults to the provider, then `sunken`. */\n readonly ground = input<PageGround | undefined>(undefined);\n /** Defaults to the provider, then `main`. */\n readonly landmark = input<PageLandmark | undefined>(undefined);\n /**\n * Fills the height it was given: the body stops growing with its content and\n * the container inside it stretches to what is left. With `scroll=\"self\"`\n * nothing then scrolls outside the body, so the body's principal scroller —\n * not a form control, and at least half the body's height — is what\n * collapses the header: past 16 pixels down it snaps the area shut, and back\n * at its top it opens it again. From 600 pixels of the page's width up;\n * below it the page scrolls as it does without `fill`.\n */\n readonly fill = input(false, { transform: booleanAttribute });\n /** The body carries `aria-busy`; what stands in for the content is each family's own placeholder. */\n readonly loading = input(false, { transform: booleanAttribute });\n /**\n * Words laid over the catalog of the language in force: the footer's\n * accessible name (`footer`). A static `aria-label` on the footer still wins.\n */\n readonly messages = input<PartialMessages<PageMessages> | undefined>(undefined);\n\n private readonly defaults = injectPageDefaults();\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n readonly resolvedWidth = computed(() => this.width() ?? this.defaults.width);\n readonly resolvedInset = computed(() => this.inset() ?? this.defaults.inset);\n readonly resolvedScroll = computed(() => this.scroll() ?? this.defaults.scroll);\n readonly resolvedGround = computed(() => this.ground() ?? this.defaults.ground);\n readonly resolvedLandmark = computed(() => this.landmark() ?? this.defaults.landmark);\n /** The family's words in the language in force, with this page's `messages` laid over them. */\n readonly t = injectMessages(pageMessages, this.messages);\n\n /** `role=\"main\"` only where the element is not already `main`, and only when asked. */\n protected readonly role = computed(() => {\n if (this.writtenRole !== null) return this.writtenRole;\n if (this.resolvedLandmark() !== 'main') return null;\n return this.native.tagName === 'MAIN' ? null : 'main';\n });\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n if (isDevMode()) warnWithoutBody(this.native);\n if (typeof ResizeObserver === 'undefined') return;\n const target = findScrollParent(this.native) ?? this.native.ownerDocument.documentElement;\n const bar = () => this.native.querySelector<HTMLElement>(':scope > [data-part=\"footer\"]');\n /* The property inherits, so every write invalidates style for everything\n under the scroller: it is written only when the height changes. */\n const publish = () => {\n const height = this.resolvedScroll() === 'self' ? 0 : (bar()?.offsetHeight ?? 0);\n const value = `${height}px`;\n if (target.style.getPropertyValue(STICKY_BOTTOM_PROPERTY) === value) return;\n target.style.setProperty(STICKY_BOTTOM_PROPERTY, value);\n };\n const observer = new ResizeObserver(publish);\n observer.observe(this.native);\n const footer = bar();\n if (footer !== null) observer.observe(footer);\n publish();\n destroyRef.onDestroy(() => {\n observer.disconnect();\n target.style.removeProperty(STICKY_BOTTOM_PROPERTY);\n });\n });\n }\n}\n\n/**\n * The padded column: one container at the page's width and inset, and one\n * outline step deeper than the header — `slHeadingLevel` is a host directive,\n * so a section written directly in the body takes `h2`.\n */\n@Component({\n selector: '[slPageBody]',\n standalone: true,\n exportAs: 'slPageBody',\n imports: [SlContainer],\n hostDirectives: [SlHeadingLevel],\n template: `<div slContainer [size]=\"page?.resolvedWidth()\" [inset]=\"page?.resolvedInset()\">\n <ng-content />\n </div>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'body',\n 'data-part-body': '',\n '[attr.aria-busy]': \"page?.loading() ? 'true' : null\",\n },\n})\nexport class SlPageBody {\n protected readonly page = inject(SlPage, { optional: true });\n}\n\n/**\n * The bar for the actions that finish the task. In the flow and never fixed:\n * it takes its own height, so the last line of content scrolls up to it\n * rather than under it. `open` keeps the element through its exit, so the bar\n * slides out rather than vanishing; the status reaches the DOM for the\n * stylesheet to transition on.\n */\n@Component({\n selector: '[slPageFooter]',\n standalone: true,\n exportAs: 'slPageFooter',\n imports: [SlContainer],\n template: `<div slContainer [size]=\"page?.resolvedWidth()\" [inset]=\"page?.resolvedInset()\">\n <div data-part=\"actions\" data-part-actions=\"\"><ng-content /></div>\n </div>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'footer',\n 'data-part-footer': '',\n '[attr.aria-label]': 'label()',\n '[attr.data-status]': 'status()',\n '[attr.hidden]': \"status() === 'unmounted' ? '' : null\",\n },\n})\nexport class SlPageFooter {\n /** Whether the bar is shown. `false` slides it out and hides it once it has left. */\n readonly open = input(true, { transform: booleanAttribute });\n\n protected readonly page = inject(SlPage, { optional: true });\n private readonly written = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n protected readonly status = signal<PresenceStatus>('open');\n /** A footer outside a page still speaks the language in force. */\n private readonly own = injectMessages(pageMessages);\n\n protected readonly label = computed(\n () => this.written ?? (this.page === null ? this.own('footer') : this.page.t('footer')),\n );\n\n constructor() {\n const presence = createPresence({\n present: this.open(),\n skipInitialAnimation: true,\n onStatusChange: (next) => this.status.set(next),\n });\n presence.setNode(this.native);\n effect(() => presence.sync(this.open()));\n inject(DestroyRef).onDestroy(() => presence.destroy());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AA6BA,MAAM,QAAQ,GAAiB;AAC7B,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,MAAM,EAAE,UAAU;AAClB,IAAA,KAAK,EAAE,MAAM;CACd;MAEY,aAAa,GAAG,IAAI,cAAc,CAAe,uBAAuB,EAAE;AACrF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAED;;;;;AAKG;AACG,SAAU,mBAAmB,CAAC,QAA+B,EAAA;IACjE,OAAO;AACL,QAAA,OAAO,EAAE,aAAa;AACtB,QAAA,UAAU,EAAE,OAAqB,EAAE,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;KAC/D;AACH;AAEA;SACgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC;AAC9B;;ACtBA;AACO,MAAM,sBAAsB,GAAG;AAEtC;;;;;AAKG;AACH,SAAS,eAAe,CAAC,IAAiB,EAAA;IACxC,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,+BAA+B,CAAC;IAClE,IAAI,MAAM,KAAK,IAAI;QAAE;IACrB,MAAM,OAAO,GAAG,CA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AAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAcV,YAAY,EAAA,UAAA,EAAA,CAAA;kBAlBxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,cAAc;oBACxB,OAAO,EAAE,CAAC,WAAW,CAAC;AACtB,oBAAA,QAAQ,EAAE,CAAA;;AAEH,QAAA,CAAA;oBACP,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,QAAQ;AACrB,wBAAA,kBAAkB,EAAE,EAAE;AACtB,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,oBAAoB,EAAE,UAAU;AAChC,wBAAA,eAAe,EAAE,sCAAsC;AACxD,qBAAA;AACF,iBAAA;;;ACnOD;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-page.mjs","sources":["../../page/src/page-defaults.ts","../../page/src/page.ts","../../page/src/slotted-angular-page.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\n/** The width of the content column: the container's own sizes. */\nexport type PageWidth = 'measure' | 'content' | 'wide' | 'full' | 'bleed';\n\n/** The inset of the content column from the edge of the page: the container's own steps. */\nexport type PageInset = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\n/**\n * Who scrolls. `ancestor` puts the page inside whatever scrolls and makes it\n * at least as tall as that, so the footer has a bottom to stick to. `self`\n * makes the page's own scroll part the scroller, with the footer below it.\n */\nexport type PageScroll = 'ancestor' | 'self';\n\n/** The ground: the sunken canvas of an application, or the plain surface of a document. */\nexport type PageGround = 'sunken' | 'surface';\n\n/** Whether the root is the document's `main` landmark. */\nexport type PageLandmark = 'main' | 'none';\n\nexport interface PageDefaults {\n ground: PageGround;\n inset: PageInset;\n landmark: PageLandmark;\n scroll: PageScroll;\n width: PageWidth;\n}\n\nconst FALLBACK: PageDefaults = {\n ground: 'sunken',\n inset: 6,\n landmark: 'main',\n scroll: 'ancestor',\n width: 'wide',\n};\n\nexport const PAGE_DEFAULTS = new InjectionToken<PageDefaults>('slotted page defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/**\n * An application decides once how its pages are laid out — the measure, the\n * inset, who scrolls, the ground — rather than repeating the same inputs on\n * every route. A page that states any of them itself still wins. Its words\n * come from the language in force (`provideSlotted`).\n */\nexport function providePageDefaults(defaults: Partial<PageDefaults>) {\n return {\n provide: PAGE_DEFAULTS,\n useFactory: (): PageDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\n/** What a page renders as here, before it states anything of its own. */\nexport function injectPageDefaults(): PageDefaults {\n return inject(PAGE_DEFAULTS);\n}\n","import { createPresence } from '@slotted/core/presence';\nimport type { PresenceStatus } from '@slotted/core/presence';\nimport { findScrollParent } from '@slotted/core/sticky-header';\nimport { SlContainer } from '@slotted/angular/container';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport { SlHeadingLevel } from '@slotted/angular/typography';\nimport { pageMessages, type PageMessages, type PartialMessages } from '@slotted/core/i18n';\nimport {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n HostAttributeToken,\n inject,\n input,\n isDevMode,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectPageDefaults } from './page-defaults';\nimport type { PageGround, PageInset, PageLandmark, PageScroll, PageWidth } from './page-defaults';\n\nexport type {\n PageDefaults,\n PageGround,\n PageInset,\n PageLandmark,\n PageScroll,\n PageWidth,\n} from './page-defaults';\n\n/** The custom property the scroller carries for what sticks above the footer. */\nexport const STICKY_BOTTOM_PROPERTY = '--slotted-page-sticky-bottom';\n\n/**\n * The custom property the scroller carries for its own visible height: a\n * sticky element of the consumer's caps its height by it rather than by the\n * viewport, which an inset canvas makes taller than the scroller.\n */\nexport const SCROLLPORT_BLOCK_SIZE_PROPERTY = '--slotted-page-scrollport-block-size';\n\n/**\n * The inset lives on the body, so content written straight into the page is\n * drawn against the viewport's edges and nothing else says why. A header is\n * not that content — it carries its own inset — so it is the one child the\n * check passes over.\n */\nfunction warnWithoutBody(root: HTMLElement) {\n const scroll = root.querySelector(':scope > [data-part=\"scroll\"]');\n if (scroll === null) return;\n const content = [...scroll.children].filter(\n (child) => child.getAttribute('data-ui') !== 'page-header',\n );\n if (content.length === 0) return;\n if (content.some((child) => child.getAttribute('data-part') === 'body')) return;\n console.warn(\n 'slPage has content outside slPageBody. Content outside the body receives no inset: wrap it in an element carrying slPageBody.',\n );\n}\n\n/**\n * The column of a screen: who scrolls, how wide the content is, where the\n * footer stays, how much air the body has.\n *\n * **The header is a direct child of what scrolls.** There is no header part: a\n * `sticky` element never leaves the box that contains it, so a wrapper exactly\n * the header's height would pin nothing. The element carrying `slPageHeader`\n * is projected first into the scroll part, beside the body.\n *\n * **The footer is projected outside the scroll part** — below the scroller\n * under `self`, stuck to the bottom of the root under `ancestor` — which is\n * what content projection is for. It keeps its box through its exit on\n * `open`, so the bar slides out rather than vanishing.\n *\n * **The element is the consumer's.** `<main slPage>` is the main landmark and\n * the directive adds nothing; `<div slPage>` gets `role=\"main\"` unless\n * `landmark=\"none\"` says the document already has one.\n */\n@Component({\n selector: '[slPage]',\n standalone: true,\n exportAs: 'slPage',\n template: `<div data-part=\"scroll\" data-part-scroll=\"\">\n <ng-content select=\"[slPageHeader]\" />\n <ng-content />\n </div>\n <ng-content select=\"[slPageFooter]\" />`,\n styleUrl: '../../../styles/src/page/page.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'page',\n 'data-ui-page': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.role]': 'role()',\n '[attr.data-width]': 'resolvedWidth()',\n '[attr.data-scroll]': 'resolvedScroll()',\n '[attr.data-ground]': 'resolvedGround()',\n '[attr.data-fill]': \"fill() ? '' : null\",\n '[attr.data-loading]': \"loading() ? '' : null\",\n },\n})\nexport class SlPage {\n /** Defaults to the provider, then `wide`. */\n readonly width = input<PageWidth | undefined>(undefined);\n /** Defaults to the provider, then `6`. */\n readonly inset = input<PageInset | undefined>(undefined);\n /** Defaults to the provider, then `ancestor`. */\n readonly scroll = input<PageScroll | undefined>(undefined);\n /** Defaults to the provider, then `sunken`. */\n readonly ground = input<PageGround | undefined>(undefined);\n /** Defaults to the provider, then `main`. */\n readonly landmark = input<PageLandmark | undefined>(undefined);\n /**\n * Fills the height it was given: the body stops growing with its content and\n * the container inside it stretches to what is left. With `scroll=\"self\"`\n * nothing then scrolls outside the body, so the body's principal scroller —\n * not a form control, and at least half the body's height — is what\n * collapses the header: past 16 pixels down it snaps the area shut, and back\n * at its top it opens it again. From 600 pixels of the page's width up;\n * below it the page scrolls as it does without `fill`.\n */\n readonly fill = input(false, { transform: booleanAttribute });\n /** The body carries `aria-busy`; what stands in for the content is each family's own placeholder. */\n readonly loading = input(false, { transform: booleanAttribute });\n /**\n * Words laid over the catalog of the language in force: the footer's\n * accessible name (`footer`). A static `aria-label` on the footer still wins.\n */\n readonly messages = input<PartialMessages<PageMessages> | undefined>(undefined);\n\n private readonly defaults = injectPageDefaults();\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n readonly resolvedWidth = computed(() => this.width() ?? this.defaults.width);\n readonly resolvedInset = computed(() => this.inset() ?? this.defaults.inset);\n readonly resolvedScroll = computed(() => this.scroll() ?? this.defaults.scroll);\n readonly resolvedGround = computed(() => this.ground() ?? this.defaults.ground);\n readonly resolvedLandmark = computed(() => this.landmark() ?? this.defaults.landmark);\n /** The family's words in the language in force, with this page's `messages` laid over them. */\n readonly t = injectMessages(pageMessages, this.messages);\n\n /** `role=\"main\"` only where the element is not already `main`, and only when asked. */\n protected readonly role = computed(() => {\n if (this.writtenRole !== null) return this.writtenRole;\n if (this.resolvedLandmark() !== 'main') return null;\n return this.native.tagName === 'MAIN' ? null : 'main';\n });\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n if (isDevMode()) warnWithoutBody(this.native);\n if (typeof ResizeObserver === 'undefined') return;\n const target = findScrollParent(this.native) ?? this.native.ownerDocument.documentElement;\n const bar = () => this.native.querySelector<HTMLElement>(':scope > [data-part=\"footer\"]');\n /* The property inherits, so every write invalidates style for everything\n under the scroller: it is written only when the height changes. */\n const write = (property: string, length: number) => {\n const value = `${length}px`;\n if (target.style.getPropertyValue(property) === value) return;\n target.style.setProperty(property, value);\n };\n /* Under `self` the page's own scroll part is what scrolls. */\n const scroller =\n (this.resolvedScroll() === 'self'\n ? this.native.querySelector<HTMLElement>(':scope > [data-part=\"scroll\"]')\n : null) ?? target;\n const publish = () => {\n const height = this.resolvedScroll() === 'self' ? 0 : (bar()?.offsetHeight ?? 0);\n write(STICKY_BOTTOM_PROPERTY, height);\n };\n /* The scroller is read on a size report only, never while rendering:\n the observer reports once as soon as it observes. */\n const observer = new ResizeObserver(() => {\n publish();\n write(SCROLLPORT_BLOCK_SIZE_PROPERTY, scroller.clientHeight);\n });\n observer.observe(this.native);\n observer.observe(scroller);\n const footer = bar();\n if (footer !== null) observer.observe(footer);\n publish();\n destroyRef.onDestroy(() => {\n observer.disconnect();\n target.style.removeProperty(STICKY_BOTTOM_PROPERTY);\n target.style.removeProperty(SCROLLPORT_BLOCK_SIZE_PROPERTY);\n });\n });\n }\n}\n\n/**\n * The padded column: one container at the page's width and inset, and one\n * outline step deeper than the header — `slHeadingLevel` is a host directive,\n * so a section written directly in the body takes `h2`.\n */\n@Component({\n selector: '[slPageBody]',\n standalone: true,\n exportAs: 'slPageBody',\n imports: [SlContainer],\n hostDirectives: [SlHeadingLevel],\n template: `<div slContainer [size]=\"page?.resolvedWidth()\" [inset]=\"page?.resolvedInset()\">\n <ng-content />\n </div>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'body',\n 'data-part-body': '',\n '[attr.aria-busy]': \"page?.loading() ? 'true' : null\",\n },\n})\nexport class SlPageBody {\n protected readonly page = inject(SlPage, { optional: true });\n}\n\n/**\n * The bar for the actions that finish the task. In the flow and never fixed:\n * it takes its own height, so the last line of content scrolls up to it\n * rather than under it. `open` keeps the element through its exit, so the bar\n * slides out rather than vanishing; the status reaches the DOM for the\n * stylesheet to transition on.\n */\n@Component({\n selector: '[slPageFooter]',\n standalone: true,\n exportAs: 'slPageFooter',\n imports: [SlContainer],\n template: `<div slContainer [size]=\"page?.resolvedWidth()\" [inset]=\"page?.resolvedInset()\">\n <div data-part=\"actions\" data-part-actions=\"\"><ng-content /></div>\n </div>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'footer',\n 'data-part-footer': '',\n '[attr.aria-label]': 'label()',\n '[attr.data-status]': 'status()',\n '[attr.hidden]': \"status() === 'unmounted' ? '' : null\",\n },\n})\nexport class SlPageFooter {\n /** Whether the bar is shown. `false` slides it out and hides it once it has left. */\n readonly open = input(true, { transform: booleanAttribute });\n\n protected readonly page = inject(SlPage, { optional: true });\n private readonly written = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n protected readonly status = signal<PresenceStatus>('open');\n /** A footer outside a page still speaks the language in force. */\n private readonly own = injectMessages(pageMessages);\n\n protected readonly label = computed(\n () => this.written ?? (this.page === null ? this.own('footer') : this.page.t('footer')),\n );\n\n constructor() {\n const presence = createPresence({\n present: this.open(),\n skipInitialAnimation: true,\n onStatusChange: (next) => this.status.set(next),\n });\n presence.setNode(this.native);\n effect(() => presence.sync(this.open()));\n inject(DestroyRef).onDestroy(() => presence.destroy());\n }\n}\n","/**\n * Generated b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