@mhmo91/schmancy 0.9.17 → 0.9.19

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 (111) hide show
  1. package/custom-elements.json +85 -46
  2. package/dist/agent/index.es-Dymj8REP.js +489 -0
  3. package/dist/agent/index.es-Dymj8REP.js.map +1 -0
  4. package/dist/agent/schmancy.agent.js +239 -580
  5. package/dist/agent/schmancy.agent.js.map +1 -1
  6. package/dist/agent/schmancy.manifest.json +198 -18
  7. package/dist/badge.cjs +1 -1
  8. package/dist/badge.js +1 -1
  9. package/dist/breadcrumb.cjs.map +1 -1
  10. package/dist/breadcrumb.js.map +1 -1
  11. package/dist/content-drawer.cjs +1 -1
  12. package/dist/content-drawer.js +1 -1
  13. package/dist/dialog.cjs.map +1 -1
  14. package/dist/dialog.js.map +1 -1
  15. package/dist/dropdown.cjs.map +1 -1
  16. package/dist/dropdown.js.map +1 -1
  17. package/dist/{flow-BGkHnOnd.js.map → flow-BPDtbhLe.js.map} +1 -1
  18. package/dist/{flow-ClAJ6Qby.cjs.map → flow-Dn9AZktE.cjs.map} +1 -1
  19. package/dist/handover/agent-runtime-followups.md +1 -1
  20. package/dist/handover/agent-runtime-v1.md +3 -3
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.es-BgmFX1JM.cjs +1 -0
  23. package/dist/index.es-BgmFX1JM.cjs.map +1 -0
  24. package/dist/index.es-CLyb_o3Y.js +489 -0
  25. package/dist/index.es-CLyb_o3Y.js.map +1 -0
  26. package/dist/index.js +4 -4
  27. package/dist/list-BpjKUOzM.js.map +1 -1
  28. package/dist/list-CMWHu6cV.cjs.map +1 -1
  29. package/dist/menu-BIBUgS1T.js.map +1 -1
  30. package/dist/menu-DS8Iz4fJ.cjs.map +1 -1
  31. package/dist/nav-drawer.cjs +1 -1
  32. package/dist/nav-drawer.js +1 -1
  33. package/dist/navigation-bar.cjs +1 -1
  34. package/dist/navigation-bar.js +1 -1
  35. package/dist/navigation-rail.cjs.map +1 -1
  36. package/dist/navigation-rail.js.map +1 -1
  37. package/dist/sheet-DdlZhnDG.cjs.map +1 -1
  38. package/dist/sheet-LFVo5iN4.js.map +1 -1
  39. package/dist/{splash-screen-COg3Z6n8.js.map → splash-screen-BHgb3c3Q.js.map} +1 -1
  40. package/dist/{splash-screen-C9HqX2nR.cjs.map → splash-screen-DteUfSV3.cjs.map} +1 -1
  41. package/dist/splash-screen.cjs +1 -1
  42. package/dist/splash-screen.js +1 -1
  43. package/dist/{src-C7niWYur.js → src-BGj6ufWS.js} +4 -4
  44. package/dist/src-BGj6ufWS.js.map +1 -0
  45. package/dist/{src-I4M33WK2.cjs → src-BPKGdQdp.cjs} +1 -1
  46. package/dist/src-BPKGdQdp.cjs.map +1 -0
  47. package/dist/{table-B-DsOqzT.cjs → table-DFlJhG5E.cjs} +1 -1
  48. package/dist/{table-B-DsOqzT.cjs.map → table-DFlJhG5E.cjs.map} +1 -1
  49. package/dist/{table-hBEZRxM_.js → table-Dwt66SR6.js} +1 -1
  50. package/dist/{table-hBEZRxM_.js.map → table-Dwt66SR6.js.map} +1 -1
  51. package/dist/table.cjs +1 -1
  52. package/dist/table.js +1 -1
  53. package/dist/teleport.cjs +1 -1
  54. package/dist/teleport.js +1 -1
  55. package/dist/typewriter.cjs +123 -1
  56. package/dist/typewriter.cjs.map +1 -0
  57. package/dist/typewriter.js +214 -2
  58. package/dist/typewriter.js.map +1 -0
  59. package/dist/{utils-xBXLvebz.js.map → utils-Bp2jhyZc.js.map} +1 -1
  60. package/dist/{utils-2qrmPb78.cjs.map → utils-CBPQvxNW.cjs.map} +1 -1
  61. package/dist/utils.cjs +1 -1
  62. package/dist/utils.js +1 -1
  63. package/package.json +1 -1
  64. package/src/breadcrumb/breadcrumb.ts +14 -4
  65. package/src/dialog/dialog.component.ts +9 -9
  66. package/src/dropdown/dropdown-component.ts +13 -1
  67. package/src/dropdown/dropdown-content.ts +11 -3
  68. package/src/list/list-item.ts +10 -0
  69. package/src/list/list.ts +7 -8
  70. package/src/menu/menu-item.ts +13 -0
  71. package/src/menu/menu.ts +10 -22
  72. package/src/nav-drawer/appbar.ts +11 -0
  73. package/src/nav-drawer/content.ts +11 -0
  74. package/src/nav-drawer/drawer.ts +15 -0
  75. package/src/nav-drawer/navbar.ts +14 -0
  76. package/src/navigation-bar/navigation-bar-item.ts +3 -4
  77. package/src/navigation-bar/navigation-bar.ts +3 -9
  78. package/src/navigation-rail/navigation-rail-item.ts +3 -7
  79. package/src/navigation-rail/navigation-rail.ts +12 -8
  80. package/src/sheet/sheet.ts +17 -0
  81. package/src/typewriter/typewriter.ts +26 -4
  82. package/types/src/breadcrumb/breadcrumb.d.ts +14 -4
  83. package/types/src/dialog/dialog.component.d.ts +9 -9
  84. package/types/src/dropdown/dropdown-component.d.ts +13 -1
  85. package/types/src/dropdown/dropdown-content.d.ts +11 -3
  86. package/types/src/list/list-item.d.ts +10 -0
  87. package/types/src/list/list.d.ts +7 -8
  88. package/types/src/menu/menu-item.d.ts +13 -0
  89. package/types/src/menu/menu.d.ts +10 -22
  90. package/types/src/nav-drawer/appbar.d.ts +11 -0
  91. package/types/src/nav-drawer/content.d.ts +11 -0
  92. package/types/src/nav-drawer/drawer.d.ts +15 -0
  93. package/types/src/nav-drawer/navbar.d.ts +14 -0
  94. package/types/src/navigation-bar/navigation-bar-item.d.ts +3 -4
  95. package/types/src/navigation-bar/navigation-bar.d.ts +3 -9
  96. package/types/src/navigation-rail/navigation-rail-item.d.ts +3 -7
  97. package/types/src/navigation-rail/navigation-rail.d.ts +12 -8
  98. package/types/src/sheet/sheet.d.ts +17 -0
  99. package/types/src/typewriter/typewriter.d.ts +4 -1
  100. package/dist/src-C7niWYur.js.map +0 -1
  101. package/dist/src-I4M33WK2.cjs.map +0 -1
  102. package/dist/typewriter-DyN7xa0n.js +0 -701
  103. package/dist/typewriter-DyN7xa0n.js.map +0 -1
  104. package/dist/typewriter-LK0S4NEr.cjs +0 -123
  105. package/dist/typewriter-LK0S4NEr.cjs.map +0 -1
  106. /package/dist/{flow-BGkHnOnd.js → flow-BPDtbhLe.js} +0 -0
  107. /package/dist/{flow-ClAJ6Qby.cjs → flow-Dn9AZktE.cjs} +0 -0
  108. /package/dist/{splash-screen-COg3Z6n8.js → splash-screen-BHgb3c3Q.js} +0 -0
  109. /package/dist/{splash-screen-C9HqX2nR.cjs → splash-screen-DteUfSV3.cjs} +0 -0
  110. /package/dist/{utils-xBXLvebz.js → utils-Bp2jhyZc.js} +0 -0
  111. /package/dist/{utils-2qrmPb78.cjs → utils-CBPQvxNW.cjs} +0 -0
@@ -6,7 +6,17 @@ import { css, html } from 'lit'
6
6
  import { customElement, property, queryAssignedElements } from 'lit/decorators.js'
7
7
 
8
8
  /**
9
+ * Single row in a schmancy-list — supports leading icon/avatar, main content, trailing actions. Clickable via click event, or used as a schmancy-menu-item's visual base.
10
+ *
9
11
  * @element schmancy-list-item
12
+ * @summary Prefer nesting inside schmancy-list for consistent spacing/surface. Use `href` to make the row a navigation target (renders as `<a>`), or a click handler for in-app actions.
13
+ * @example
14
+ * <schmancy-list-item href="/profile">
15
+ * <schmancy-icon slot="leading">person</schmancy-icon>
16
+ * Profile
17
+ * <schmancy-icon slot="trailing">chevron_right</schmancy-icon>
18
+ * </schmancy-list-item>
19
+ * @platform li click - Styled `<li>` or `<a>` depending on `href`. Degrades to a plain list item if the tag never registers.
10
20
  * @slot leading - leading content
11
21
  * @slot trailing - trailing content
12
22
  * @slot - default content
package/src/list/list.ts CHANGED
@@ -7,19 +7,18 @@ import { customElement, property } from 'lit/decorators.js'
7
7
  import { SchmancyListTypeContext } from './context'
8
8
 
9
9
  /**
10
- * `<schmancy-list>` component.
11
- *
12
- * A list component that wraps its content within a customizable surface.
13
- * It allows you to set the surface type and fill style, and can optionally
14
- * enable scrolling behavior by delegating the scroller attribute to the surface.
10
+ * Wrapped list container — holds schmancy-list-item children on a themed surface. Optionally scrollable.
15
11
  *
16
12
  * @element schmancy-list
17
- * @slot - The default slot for list items.
18
- *
13
+ * @summary Use for vertical lists of similarly-shaped items: settings entries, menu items, contact lists, notification lists. Pair with schmancy-list-item children.
19
14
  * @example
20
15
  * <schmancy-list surface="container" scroller>
21
- * <schmancy-list-item>List Item 1</schmancy-list-item>
16
+ * <schmancy-list-item>First</schmancy-list-item>
17
+ * <schmancy-list-item>Second</schmancy-list-item>
18
+ * <schmancy-list-item>Third</schmancy-list-item>
22
19
  * </schmancy-list>
20
+ * @platform ul - Styled list container. Degrades to a plain ul/div if the tag never registers.
21
+ * @slot - The default slot for list items.
23
22
  */
24
23
  @customElement('schmancy-list')
25
24
  export class List extends TailwindElement(css`
@@ -3,6 +3,19 @@ import { css, html } from 'lit'
3
3
  import { customElement } from 'lit/decorators.js'
4
4
  import { $dialog } from '../dialog/dialog-service'
5
5
 
6
+ /**
7
+ * Single item inside a schmancy-menu. Auto-dismisses the menu dialog on click — attach your action handler to `@click` and it just works.
8
+ *
9
+ * @element schmancy-menu-item
10
+ * @summary Always nested inside schmancy-menu. The click handler runs before the dialog closes, so `@click=${() => doThing()}` is the full pattern.
11
+ * @example
12
+ * <schmancy-menu-item @click=${() => archive()}>
13
+ * <schmancy-icon slot="leading">archive</schmancy-icon>
14
+ * Archive
15
+ * </schmancy-menu-item>
16
+ * @platform menuitem click - Wraps schmancy-list-item with auto-dismiss. Degrades to a styled `<button role="menuitem">` if the tag never registers.
17
+ * @slot - The item label and optional icons.
18
+ */
6
19
  @customElement('schmancy-menu-item')
7
20
  export default class SchmancyMenuItem extends $LitElement(css`
8
21
  :host {
package/src/menu/menu.ts CHANGED
@@ -4,31 +4,19 @@ import { customElement, query } from 'lit/decorators.js'
4
4
  import { $dialog } from '../dialog/dialog-service'
5
5
 
6
6
  /**
7
- * Menu Component
7
+ * Floating menu — a trigger button + a list of schmancy-menu-item children that open as a positioned dialog on click.
8
8
  *
9
- * CRITICAL: The dialog ONLY renders the raw menu items passed via the default slot.
10
- * NO <ul> wrapper, NO classes, NO additional markup in the dialog call.
11
- * The dialog service handles positioning and display - we just pass the pure content.
12
- *
13
- * @example Basic menu with auto-dismiss
14
- * ```typescript
9
+ * @element schmancy-menu
10
+ * @summary Use for dropdown menus attached to a button or icon — "More actions", "Account", row overflow menus in tables. Clicking a schmancy-menu-item inside auto-dismisses; custom components slotted inside must call `$dialog.dismiss()` themselves.
11
+ * @example
15
12
  * <schmancy-menu>
16
- * <schmancy-button slot="trigger">Actions</schmancy-button>
17
- * <schmancy-menu-item @click=${() => editItem()}>Edit</schmancy-menu-item>
18
- * <schmancy-menu-item @click=${() => deleteItem()}>Delete</schmancy-menu-item>
13
+ * <schmancy-icon-button slot="trigger" aria-label="Actions">
14
+ * <schmancy-icon>more_vert</schmancy-icon>
15
+ * </schmancy-icon-button>
16
+ * <schmancy-menu-item @click=${() => edit()}>Edit</schmancy-menu-item>
17
+ * <schmancy-menu-item @click=${() => remove()}>Delete</schmancy-menu-item>
19
18
  * </schmancy-menu>
20
- * ```
21
- * Note: Dialog auto-dismisses when schmancy-menu-item is clicked
22
- *
23
- * @example Custom component (manual dismiss)
24
- * ```typescript
25
- * <schmancy-menu>
26
- * <schmancy-icon-button slot="trigger">settings</schmancy-icon-button>
27
- * <my-settings-form @submit=${() => $dialog.dismiss()}></my-settings-form>
28
- * </schmancy-menu>
29
- * ```
30
- * Note: Custom components must call $dialog.dismiss() manually
31
- *
19
+ * @platform menu close - Trigger + floating listbox dialog. Degrades to a native `<select>` or inline list if the tag never registers.
32
20
  * @slot trigger - Button to open menu (new naming)
33
21
  * @slot button - Button to open menu (backward compatible)
34
22
  * @slot default - Menu items or any custom component to display in dialog
@@ -3,7 +3,18 @@ import { css, html } from 'lit'
3
3
  import { customElement } from 'lit/decorators.js'
4
4
 
5
5
  /**
6
+ * Top app bar region inside schmancy-nav-drawer — the horizontal strip above the content area that typically holds the page title, hamburger trigger, and contextual actions.
7
+ *
6
8
  * @element schmancy-nav-drawer-appbar
9
+ * @summary Always nested inside schmancy-nav-drawer. Holds the page-level title + top-right actions. On mobile, the drawer's hamburger button renders inside this region.
10
+ * @example
11
+ * <schmancy-nav-drawer-appbar>
12
+ * <schmancy-typography type="title" token="lg">Dashboard</schmancy-typography>
13
+ * <schmancy-icon-button slot="trailing" aria-label="Notifications">
14
+ * <schmancy-icon>notifications</schmancy-icon>
15
+ * </schmancy-icon-button>
16
+ * </schmancy-nav-drawer-appbar>
17
+ * @platform header - Styled horizontal bar. Degrades to a plain header element if the tag never registers.
7
18
  * @slot - The default slot
8
19
  */
9
20
  @customElement('schmancy-nav-drawer-appbar')
@@ -3,6 +3,17 @@ import { css, html } from 'lit'
3
3
  import { customElement } from 'lit/decorators.js'
4
4
  import { fromEvent, takeUntil } from 'rxjs'
5
5
 
6
+ /**
7
+ * Main content region inside schmancy-nav-drawer — typically hosts the router outlet or the page's body content.
8
+ *
9
+ * @element schmancy-nav-drawer-content
10
+ * @summary Always nested inside schmancy-nav-drawer. Scrollable by default; propagates scroll events up so the drawer can collapse app-bar on scroll.
11
+ * @example
12
+ * <schmancy-nav-drawer-content>
13
+ * <schmancy-area name="main"></schmancy-area>
14
+ * </schmancy-nav-drawer-content>
15
+ * @platform main scroll - Scrollable `<main>`. Degrades to a plain scrollable div if the tag never registers.
16
+ */
6
17
  @customElement('schmancy-nav-drawer-content')
7
18
  export class SchmancyNavigationDrawerContent extends $LitElement(css`
8
19
  :host {
@@ -12,8 +12,23 @@ import {
12
12
  } from './context'
13
13
 
14
14
  /**
15
+ * Responsive navigation drawer — a left sidebar that becomes a hamburger-triggered modal overlay on narrow viewports. Composes schmancy-nav-drawer-navbar (the nav rail), schmancy-nav-drawer-appbar (the top bar), and schmancy-nav-drawer-content (the main region).
16
+ *
15
17
  * @element schmancy-nav-drawer
18
+ * @summary The app-shell layout primitive. Wrap your whole app in this when you want "persistent sidebar on desktop, drawer on mobile" behavior. Mode auto-switches at the breakpoint.
19
+ * @example
20
+ * <schmancy-nav-drawer>
21
+ * <schmancy-nav-drawer-navbar>
22
+ * <!-- nav items, typically schmancy-list-item links -->
23
+ * </schmancy-nav-drawer-navbar>
24
+ * <schmancy-nav-drawer-appbar>App title</schmancy-nav-drawer-appbar>
25
+ * <schmancy-nav-drawer-content>
26
+ * <!-- router outlet / page content -->
27
+ * </schmancy-nav-drawer-content>
28
+ * </schmancy-nav-drawer>
29
+ * @platform div - Flex layout with viewport-width mode switching. Degrades to a stack of plain divs if the tag never registers.
16
30
  * @slot - The content slot
31
+ * @fires schmancy-drawer-state - When the drawer open/close state changes on mobile.
17
32
  */
18
33
  @customElement('schmancy-nav-drawer')
19
34
  export class SchmancyNavigationDrawer extends $LitElement(css`
@@ -16,6 +16,20 @@ const OVERLAY_ANIM_DURATION_OPEN = 200
16
16
  const OVERLAY_ANIM_DURATION_CLOSE = 150
17
17
  const NAV_ANIM_DURATION = 200
18
18
 
19
+ /**
20
+ * Sidebar region inside schmancy-nav-drawer — the persistent-on-desktop / modal-on-mobile nav rail.
21
+ *
22
+ * @element schmancy-nav-drawer-navbar
23
+ * @summary Always nested inside schmancy-nav-drawer. On desktop: pinned left sidebar. On mobile: modal overlay triggered by the hamburger button in schmancy-nav-drawer-appbar.
24
+ * @example
25
+ * <schmancy-nav-drawer-navbar>
26
+ * <schmancy-list>
27
+ * <schmancy-list-item href="/dashboard">Dashboard</schmancy-list-item>
28
+ * <schmancy-list-item href="/settings">Settings</schmancy-list-item>
29
+ * </schmancy-list>
30
+ * </schmancy-nav-drawer-navbar>
31
+ * @platform nav - Sidebar `<nav>` with responsive open/close behavior. Degrades to a plain sidebar div if the tag never registers.
32
+ */
19
33
  @customElement('schmancy-nav-drawer-navbar')
20
34
  export class SchmancyNavigationDrawerSidebar extends $LitElement() {
21
35
  // Consume context values. Renamed from "state" to "drawerState" to avoid confusion.
@@ -7,12 +7,11 @@ import { BehaviorSubject, fromEvent, merge, timer } from 'rxjs'
7
7
  import { takeUntil, tap, filter } from 'rxjs/operators'
8
8
 
9
9
  /**
10
- * `<schmancy-navigation-bar-item>` component
11
- *
12
- * Individual navigation item for use within a navigation bar.
13
- * Represents a single destination with an icon and optional label following Material Design 3 specifications.
10
+ * Single destination inside schmancy-navigation-bar — an icon + optional label representing one primary app destination.
14
11
  *
15
12
  * @element schmancy-navigation-bar-item
13
+ * @summary Always nested inside schmancy-navigation-bar. Use `icon` attr for a Material Symbols glyph or slot=icon for custom content.
14
+ * @platform button click - Styled navigation target. Degrades to a plain `<button>` if the tag never registers.
16
15
  * @slot icon - Slot for custom icon content
17
16
  * @slot - Default slot for custom content
18
17
  *
@@ -15,17 +15,11 @@ const NAV_BAR_HEIGHT = 80
15
15
  const MOBILE_BREAKPOINT = '(max-width: 767px)'
16
16
 
17
17
  /**
18
- * `<schmancy-navigation-bar>` component
19
- *
20
- * A horizontal navigation component following Material Design 3 specifications.
21
- * Navigation bars provide access to between 3-7 primary destinations.
22
- * Automatically hides in fullscreen mode when triggered via schmancyTheme.next({ fullscreen: true }).
23
- *
24
- * **IMPORTANT**: This component includes `z-10` by default (consistent with navigation-rail).
25
- * The consumer is responsible for positioning the navigation bar in their layout.
26
- * For typical bottom-fixed positioning, add: `class="fixed bottom-0 left-0 right-0"`.
18
+ * Bottom navigation bar — Material Design 3 horizontal nav for mobile primary destinations (3–7 items). Auto-hides in fullscreen mode.
27
19
  *
28
20
  * @element schmancy-navigation-bar
21
+ * @summary Use for mobile primary navigation (home, search, favorites, settings). For persistent desktop nav, prefer schmancy-navigation-rail or schmancy-nav-drawer. Consumer is responsible for fixed-bottom positioning via class.
22
+ * @platform nav - Styled horizontal nav with schmancy-navigation-bar-item children. Degrades to a plain flex container if the tag never registers.
29
23
  * @slot - Default slot for navigation bar items
30
24
  *
31
25
  * @fires navigation-change - When an item is selected
@@ -13,15 +13,11 @@ export type NavigationRailItemClickEvent = CustomEvent<{
13
13
  }>
14
14
 
15
15
  /**
16
- * Material Design 3 Navigation Rail Item Component
17
- * @see https://m3.material.io/components/navigation-rail/overview
18
- *
19
- * `<schmancy-navigation-rail-item>` component
20
- *
21
- * Individual navigation item for use within a navigation rail.
22
- * Represents a single destination or action with an icon and optional label.
16
+ * Single destination inside schmancy-navigation-rail vertically-stacked icon + optional label. @see https://m3.material.io/components/navigation-rail/overview
23
17
  *
24
18
  * @element schmancy-navigation-rail-item
19
+ * @summary Always nested inside schmancy-navigation-rail. Use `icon` attr for a Material Symbols glyph, or slot=icon for custom content. Supports a `badge` slot for notification dots / counts.
20
+ * @platform button click - Styled vertical navigation target. Degrades to a plain `<button>` if the tag never registers.
25
21
  * @slot icon - Slot for the navigation item icon (e.g., schmancy-icon)
26
22
  * @slot - Default slot for custom content
27
23
  * @slot badge - Custom badge content
@@ -15,16 +15,20 @@ export type NavigationRailFabClickEvent = CustomEvent<void>
15
15
  export type LabelVisibility = 'all' | 'selected' | 'none'
16
16
 
17
17
  /**
18
- * Material Design 3 Navigation Rail Component
19
- * @see https://m3.material.io/components/navigation-rail/overview
20
- *
21
- * `<schmancy-navigation-rail>` component
22
- *
23
- * A Material Design 3 vertical navigation component positioned on the left side of an application.
24
- * Navigation rails provide access to between 3-7 primary destinations with a compact footprint.
25
- * Automatically hides in fullscreen mode when triggered via schmancyTheme.next({ fullscreen: true }).
18
+ * Vertical navigation rail — Material Design 3 compact left-side nav for desktop / tablet layouts with 3–7 primary destinations. Auto-hides in fullscreen mode. @see https://m3.material.io/components/navigation-rail/overview
26
19
  *
27
20
  * @element schmancy-navigation-rail
21
+ * @summary Use as the desktop counterpart of schmancy-navigation-bar: same destinations, different form factor. Prefer schmancy-nav-drawer when you also want a drawer + app-bar combo.
22
+ * @example
23
+ * <schmancy-navigation-rail activeIndex="0">
24
+ * <schmancy-icon-button slot="fab" variant="filled">
25
+ * <schmancy-icon>add</schmancy-icon>
26
+ * </schmancy-icon-button>
27
+ * <schmancy-navigation-rail-item icon="home" label="Home"></schmancy-navigation-rail-item>
28
+ * <schmancy-navigation-rail-item icon="search" label="Search"></schmancy-navigation-rail-item>
29
+ * <schmancy-navigation-rail-item icon="settings" label="Settings"></schmancy-navigation-rail-item>
30
+ * </schmancy-navigation-rail>
31
+ * @platform nav - Vertical styled nav. Degrades to a plain vertical flex container if the tag never registers.
28
32
  * @slot fab - Slot for a floating action button at the top
29
33
  * @slot menu - Slot for a menu icon or button below the FAB
30
34
  * @slot header - Custom header content slot
@@ -7,6 +7,23 @@ import { on } from './hook'
7
7
  import { SchmancySheetPosition, sheet } from './sheet.service'
8
8
  import { BLACKBIRD_EASING, DURATION_ENTER, DURATION_EXIT, DURATION_BACKDROP, EASE_OUT, EASE_IN } from '../utils/animation'
9
9
 
10
+ /**
11
+ * Side-docked or bottom-docked panel — a dialog variant that slides in from an edge. Driven imperatively by the `sheet` service; rarely instantiated directly.
12
+ *
13
+ * @element schmancy-sheet
14
+ * @summary Prefer `sheet.open({ component, position })` over placing this element declaratively — the service handles stacking, focus, close on outside-click, ESC, and router integration.
15
+ * @example
16
+ * import { sheet, SchmancySheetPosition } from '@mhmo91/schmancy'
17
+ * sheet.open({
18
+ * component: new MyEditorElement(),
19
+ * position: SchmancySheetPosition.Side,
20
+ * title: 'Edit item',
21
+ * })
22
+ * @platform dialog close - Positioned-fixed panel with backdrop. Degrades to a `<dialog>` if the tag never registers — loses slide animation, keeps focus trap + dismiss.
23
+ * @attr position - `'side' | 'bottom'`. Which edge the sheet docks to.
24
+ * @attr open - Boolean; sheet is visible when true.
25
+ * @fires close - When the sheet is dismissed (backdrop click, close button, ESC).
26
+ */
10
27
  @customElement('schmancy-sheet')
11
28
  export default class SchmancySheet extends $LitElement(css`
12
29
  :host {
@@ -5,7 +5,20 @@ import hashContent from '@schmancy/utils/hashContent'
5
5
  import { intersection$ } from '@schmancy/utils/intersection'
6
6
  import { css, html, TemplateResult } from 'lit'
7
7
  import { customElement, property, query, queryAssignedElements, queryAssignedNodes } from 'lit/decorators.js'
8
- import TypeIt, { Options as TypeItOptions } from 'typeit'
8
+ // TypeIt is loaded lazily on first render — see ADR 0014 in the parent
9
+ // monorepo. The static import was replaced with a type-only import plus a
10
+ // memoised dynamic loader so the ~15 KB gzipped vendor chunk stays out of
11
+ // the agent bundle's first paint for pages that don't render a typewriter.
12
+ import type { Options as TypeItOptions } from 'typeit'
13
+ type TypeItCtor = typeof import('typeit').default
14
+ type TypeItInstance = InstanceType<TypeItCtor>
15
+
16
+ let typeItPromise: Promise<TypeItCtor> | null = null
17
+ function loadTypeIt(): Promise<TypeItCtor> {
18
+ if (typeItPromise) return typeItPromise
19
+ typeItPromise = import('typeit').then(m => m.default)
20
+ return typeItPromise
21
+ }
9
22
 
10
23
  @customElement('schmancy-typewriter')
11
24
  export class TypewriterElement extends $LitElement(css`
@@ -170,9 +183,11 @@ export class TypewriterElement extends $LitElement(css`
170
183
  */
171
184
  @property({ type: Number }) cyclePause = 1500
172
185
  /**
173
- * TypeIt instance.
186
+ * TypeIt instance. Populated after `loadTypeIt()` resolves inside
187
+ * `_startTyping()` — null until then, which is correct for a cold start
188
+ * where the vendor chunk hasn't loaded yet.
174
189
  */
175
- private typeItInstance: TypeIt | null = null
190
+ private typeItInstance: TypeItInstance | null = null
176
191
 
177
192
  /**
178
193
  * Reference to the typewriter container.
@@ -202,8 +217,9 @@ export class TypewriterElement extends $LitElement(css`
202
217
 
203
218
  /**
204
219
  * Initializes the TypeIt instance with the provided slotted content.
220
+ * Async because TypeIt itself is lazy-loaded on first render.
205
221
  */
206
- private _startTyping() {
222
+ private async _startTyping() {
207
223
  // Destroy any existing TypeIt instance
208
224
  this._destroyTypeIt()
209
225
 
@@ -246,6 +262,12 @@ export class TypewriterElement extends $LitElement(css`
246
262
  },
247
263
  }
248
264
 
265
+ // Load TypeIt lazily on first call (module-scope memoised promise).
266
+ const TypeIt = await loadTypeIt()
267
+ // Bail if we were disconnected during the load — avoids attaching to
268
+ // a detached host.
269
+ if (!this.isConnected) return
270
+
249
271
  // Initialize TypeIt
250
272
  this.typeItInstance = new TypeIt(this.typewriterContainer, typeItOptions)
251
273
 
@@ -1,9 +1,16 @@
1
1
  declare const SchmancyBreadcrumb_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
2
  /**
3
- * Breadcrumb navigation container. Wraps a list of `schmancy-breadcrumb-item`
4
- * elements with the correct ARIA landmark and semantics.
3
+ * Breadcrumb trail — navigation history from root to current page. Renders schmancy-breadcrumb-item children with separators between.
5
4
  *
6
5
  * @element schmancy-breadcrumb
6
+ * @summary Use for deep hierarchical navigation (file explorer paths, e-commerce category chains, admin settings trees). Last item is styled as the current page automatically.
7
+ * @example
8
+ * <schmancy-breadcrumb separator="›">
9
+ * <schmancy-breadcrumb-item href="/">Home</schmancy-breadcrumb-item>
10
+ * <schmancy-breadcrumb-item href="/docs">Docs</schmancy-breadcrumb-item>
11
+ * <schmancy-breadcrumb-item>Getting started</schmancy-breadcrumb-item>
12
+ * </schmancy-breadcrumb>
13
+ * @platform nav - Styled `<nav aria-label="Breadcrumb">`. Degrades to a plain nav if the tag never registers.
7
14
  * @slot - Default slot for `<schmancy-breadcrumb-item>` children.
8
15
  * @attr separator - Character or string rendered between items. Default `/`.
9
16
  * @csspart separator - The separator element.
@@ -16,10 +23,13 @@ export declare class SchmancyBreadcrumb extends SchmancyBreadcrumb_base {
16
23
  }
17
24
  declare const SchmancyBreadcrumbItem_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
18
25
  /**
19
- * Individual breadcrumb item. Renders as a link when `href` is provided,
20
- * otherwise as a plain span (represents the current page).
26
+ * Single segment in a schmancy-breadcrumb trail a link when `href` is set, or a plain span (the current page) when omitted.
21
27
  *
22
28
  * @element schmancy-breadcrumb-item
29
+ * @summary Always nested inside schmancy-breadcrumb. Omit `href` on the current page — it gets aria-current="page" automatically.
30
+ * @example
31
+ * <schmancy-breadcrumb-item href="/products">Products</schmancy-breadcrumb-item>
32
+ * @platform a - Renders an `<a>` or `<span>` depending on href. Degrades to a plain anchor/span if the tag never registers.
23
33
  * @slot - Label content.
24
34
  * @attr href - If set, renders as an anchor.
25
35
  * @attr current - Marks as `aria-current="page"`.
@@ -1,27 +1,27 @@
1
1
  declare const SchmancyDialog_base: import("@mixins/index").Constructor<import("./dialog-base.mixin").IDialogBaseMixin> & CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
2
  /**
3
- * Unified dialog component that handles both content-only and confirm modes.
3
+ * Modal dialog content-only (just a styled panel) or confirm mode (title + message + confirm/cancel buttons). Prefer the imperative `$dialog` service for most use cases; use the element directly only when you want a declaratively-positioned dialog.
4
4
  *
5
5
  * @element schmancy-dialog
6
+ * @summary Blocks interaction with the rest of the page until dismissed. For quick confirmations, prefer `$dialog.confirm({ ... })` over this element. For arbitrary dialog content driven imperatively, prefer `$dialog.component(MyComponent)`.
7
+ * @platform dialog close - Positioned overlay in light DOM. Degrades to a styled `<dialog>` if the tag never registers — loses custom animations but keeps focus trap + ESC close.
6
8
  * @slot default - Content slot for dialog body (used in content mode)
7
9
  * @slot content - Named slot for custom content in confirm mode
10
+ * @fires confirm - In confirm mode, when the confirm button is clicked.
11
+ * @fires cancel - In confirm mode, when the cancel button or ESC is activated.
8
12
  *
9
13
  * @example Content mode (no buttons):
10
- * ```html
11
14
  * <schmancy-dialog>
12
15
  * <my-custom-content></my-custom-content>
13
16
  * </schmancy-dialog>
14
- * ```
15
17
  *
16
18
  * @example Confirm mode (with buttons):
17
- * ```html
18
19
  * <schmancy-dialog
19
- * title="Confirm Action"
20
- * message="Are you sure?"
21
- * confirm-text="Yes"
22
- * cancel-text="No"
20
+ * title="Delete item?"
21
+ * message="This action cannot be undone."
22
+ * confirm-text="Delete"
23
+ * cancel-text="Keep"
23
24
  * ></schmancy-dialog>
24
- * ```
25
25
  */
26
26
  export declare class SchmancyDialog extends SchmancyDialog_base {
27
27
  /**
@@ -1,8 +1,20 @@
1
1
  declare const SchmancyDropdown_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
2
  /**
3
- * A dropdown component that displays content when triggered.
3
+ * Anchored floating dropdown a generic "show this content relative to that trigger" primitive. Unlike schmancy-menu (which uses the dialog service and is list-shaped), dropdown is a low-level popover anchored with Floating UI. Use when you want a custom-shaped overlay tied to a specific trigger element without the menu semantics.
4
4
  *
5
5
  * @element schmancy-dropdown
6
+ * @summary Prefer schmancy-menu for action lists, schmancy-autocomplete for type-ahead, schmancy-tooltip for hover hints. Reach for schmancy-dropdown when none of those fit — custom filters, color pickers, inline forms anchored to a trigger.
7
+ * @example
8
+ * <schmancy-dropdown>
9
+ * <schmancy-button slot="trigger">Filters</schmancy-button>
10
+ * <schmancy-dropdown-content>
11
+ * <schmancy-form>…</schmancy-form>
12
+ * </schmancy-dropdown-content>
13
+ * </schmancy-dropdown>
14
+ * @platform div - Anchored via Floating UI (autoUpdate, flip, shift). Degrades to inline content if the tag never registers — loses positioning but content stays accessible.
15
+ * @attr open - Boolean; whether the dropdown is visible.
16
+ * @fires open - When the dropdown opens.
17
+ * @fires close - When the dropdown closes.
6
18
  * @slot trigger - The element that triggers the dropdown
7
19
  * @slot - Default slot for the dropdown content
8
20
  */
@@ -1,11 +1,19 @@
1
1
  declare const SchmancyDropdownContent_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
2
  /**
3
- * Content container for the schmancy-dropdown component.
3
+ * Content panel for a schmancy-dropdown — a styled positioned surface. Always nested inside schmancy-dropdown and placed alongside the trigger slot.
4
4
  *
5
5
  * @element schmancy-dropdown-content
6
+ * @summary Nest this inside schmancy-dropdown (not in the trigger slot). Use the `content` CSS part to customize backgrounds / shadows / padding without shadow-root piercing.
7
+ * @example
8
+ * <schmancy-dropdown>
9
+ * <schmancy-button slot="trigger">Open</schmancy-button>
10
+ * <schmancy-dropdown-content>
11
+ * Panel contents…
12
+ * </schmancy-dropdown-content>
13
+ * </schmancy-dropdown>
14
+ * @platform div - Positioned panel with theme-aware styling. Degrades to an inline div if the tag never registers.
6
15
  * @slot - Default slot for dropdown content.
7
- * @csspart content - The inner wrapper element; style to override panel
8
- * backgrounds, shadows, padding, or borders without shadow-root piercing.
16
+ * @csspart content - The inner wrapper element; style to override panel backgrounds, shadows, padding, or borders without shadow-root piercing.
9
17
  */
10
18
  export declare class SchmancyDropdownContent extends SchmancyDropdownContent_base {
11
19
  /**
@@ -1,7 +1,17 @@
1
1
  import { TSurfaceColor } from '@schmancy/types/surface';
2
2
  declare const SchmancyListItem_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
3
3
  /**
4
+ * Single row in a schmancy-list — supports leading icon/avatar, main content, trailing actions. Clickable via click event, or used as a schmancy-menu-item's visual base.
5
+ *
4
6
  * @element schmancy-list-item
7
+ * @summary Prefer nesting inside schmancy-list for consistent spacing/surface. Use `href` to make the row a navigation target (renders as `<a>`), or a click handler for in-app actions.
8
+ * @example
9
+ * <schmancy-list-item href="/profile">
10
+ * <schmancy-icon slot="leading">person</schmancy-icon>
11
+ * Profile
12
+ * <schmancy-icon slot="trailing">chevron_right</schmancy-icon>
13
+ * </schmancy-list-item>
14
+ * @platform li click - Styled `<li>` or `<a>` depending on `href`. Degrades to a plain list item if the tag never registers.
5
15
  * @slot leading - leading content
6
16
  * @slot trailing - trailing content
7
17
  * @slot - default content
@@ -2,19 +2,18 @@ import { SchmancySurfaceFill } from '@schmancy/surface';
2
2
  import { TSurfaceColor } from '@schmancy/types/surface';
3
3
  declare const List_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
4
4
  /**
5
- * `<schmancy-list>` component.
6
- *
7
- * A list component that wraps its content within a customizable surface.
8
- * It allows you to set the surface type and fill style, and can optionally
9
- * enable scrolling behavior by delegating the scroller attribute to the surface.
5
+ * Wrapped list container — holds schmancy-list-item children on a themed surface. Optionally scrollable.
10
6
  *
11
7
  * @element schmancy-list
12
- * @slot - The default slot for list items.
13
- *
8
+ * @summary Use for vertical lists of similarly-shaped items: settings entries, menu items, contact lists, notification lists. Pair with schmancy-list-item children.
14
9
  * @example
15
10
  * <schmancy-list surface="container" scroller>
16
- * <schmancy-list-item>List Item 1</schmancy-list-item>
11
+ * <schmancy-list-item>First</schmancy-list-item>
12
+ * <schmancy-list-item>Second</schmancy-list-item>
13
+ * <schmancy-list-item>Third</schmancy-list-item>
17
14
  * </schmancy-list>
15
+ * @platform ul - Styled list container. Degrades to a plain ul/div if the tag never registers.
16
+ * @slot - The default slot for list items.
18
17
  */
19
18
  export declare class List extends List_base {
20
19
  /**
@@ -1,4 +1,17 @@
1
1
  declare const SchmancyMenuItem_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
+ /**
3
+ * Single item inside a schmancy-menu. Auto-dismisses the menu dialog on click — attach your action handler to `@click` and it just works.
4
+ *
5
+ * @element schmancy-menu-item
6
+ * @summary Always nested inside schmancy-menu. The click handler runs before the dialog closes, so `@click=${() => doThing()}` is the full pattern.
7
+ * @example
8
+ * <schmancy-menu-item @click=${() => archive()}>
9
+ * <schmancy-icon slot="leading">archive</schmancy-icon>
10
+ * Archive
11
+ * </schmancy-menu-item>
12
+ * @platform menuitem click - Wraps schmancy-list-item with auto-dismiss. Degrades to a styled `<button role="menuitem">` if the tag never registers.
13
+ * @slot - The item label and optional icons.
14
+ */
2
15
  export default class SchmancyMenuItem extends SchmancyMenuItem_base {
3
16
  protected render(): unknown;
4
17
  }
@@ -1,30 +1,18 @@
1
1
  declare const SchmancyMenu_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
2
  /**
3
- * Menu Component
3
+ * Floating menu — a trigger button + a list of schmancy-menu-item children that open as a positioned dialog on click.
4
4
  *
5
- * CRITICAL: The dialog ONLY renders the raw menu items passed via the default slot.
6
- * NO <ul> wrapper, NO classes, NO additional markup in the dialog call.
7
- * The dialog service handles positioning and display - we just pass the pure content.
8
- *
9
- * @example Basic menu with auto-dismiss
10
- * ```typescript
5
+ * @element schmancy-menu
6
+ * @summary Use for dropdown menus attached to a button or icon — "More actions", "Account", row overflow menus in tables. Clicking a schmancy-menu-item inside auto-dismisses; custom components slotted inside must call `$dialog.dismiss()` themselves.
7
+ * @example
11
8
  * <schmancy-menu>
12
- * <schmancy-button slot="trigger">Actions</schmancy-button>
13
- * <schmancy-menu-item @click=${() => editItem()}>Edit</schmancy-menu-item>
14
- * <schmancy-menu-item @click=${() => deleteItem()}>Delete</schmancy-menu-item>
9
+ * <schmancy-icon-button slot="trigger" aria-label="Actions">
10
+ * <schmancy-icon>more_vert</schmancy-icon>
11
+ * </schmancy-icon-button>
12
+ * <schmancy-menu-item @click=${() => edit()}>Edit</schmancy-menu-item>
13
+ * <schmancy-menu-item @click=${() => remove()}>Delete</schmancy-menu-item>
15
14
  * </schmancy-menu>
16
- * ```
17
- * Note: Dialog auto-dismisses when schmancy-menu-item is clicked
18
- *
19
- * @example Custom component (manual dismiss)
20
- * ```typescript
21
- * <schmancy-menu>
22
- * <schmancy-icon-button slot="trigger">settings</schmancy-icon-button>
23
- * <my-settings-form @submit=${() => $dialog.dismiss()}></my-settings-form>
24
- * </schmancy-menu>
25
- * ```
26
- * Note: Custom components must call $dialog.dismiss() manually
27
- *
15
+ * @platform menu close - Trigger + floating listbox dialog. Degrades to a native `<select>` or inline list if the tag never registers.
28
16
  * @slot trigger - Button to open menu (new naming)
29
17
  * @slot button - Button to open menu (backward compatible)
30
18
  * @slot default - Menu items or any custom component to display in dialog
@@ -1,6 +1,17 @@
1
1
  declare const SchmancyDrawerAppbar_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
2
  /**
3
+ * Top app bar region inside schmancy-nav-drawer — the horizontal strip above the content area that typically holds the page title, hamburger trigger, and contextual actions.
4
+ *
3
5
  * @element schmancy-nav-drawer-appbar
6
+ * @summary Always nested inside schmancy-nav-drawer. Holds the page-level title + top-right actions. On mobile, the drawer's hamburger button renders inside this region.
7
+ * @example
8
+ * <schmancy-nav-drawer-appbar>
9
+ * <schmancy-typography type="title" token="lg">Dashboard</schmancy-typography>
10
+ * <schmancy-icon-button slot="trailing" aria-label="Notifications">
11
+ * <schmancy-icon>notifications</schmancy-icon>
12
+ * </schmancy-icon-button>
13
+ * </schmancy-nav-drawer-appbar>
14
+ * @platform header - Styled horizontal bar. Degrades to a plain header element if the tag never registers.
4
15
  * @slot - The default slot
5
16
  */
6
17
  export declare class SchmancyDrawerAppbar extends SchmancyDrawerAppbar_base {