snice 1.13.7 → 1.13.9

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 (89) hide show
  1. package/components/accordion/snice-accordion-item.ts +1 -1
  2. package/components/accordion/snice-accordion.ts +1 -1
  3. package/components/alert/snice-alert.ts +1 -1
  4. package/components/avatar/snice-avatar.ts +1 -1
  5. package/components/badge/snice-badge.ts +1 -1
  6. package/components/breadcrumbs/snice-breadcrumbs.ts +1 -1
  7. package/components/breadcrumbs/snice-crumb.ts +1 -1
  8. package/components/button/snice-button.ts +1 -1
  9. package/components/card/snice-card.ts +1 -1
  10. package/components/checkbox/snice-checkbox.ts +1 -1
  11. package/components/chip/snice-chip.ts +1 -1
  12. package/components/date-picker/snice-date-picker.ts +1 -1
  13. package/components/divider/snice-divider.ts +1 -1
  14. package/components/drawer/snice-drawer.ts +1 -1
  15. package/components/input/snice-input.ts +1 -1
  16. package/components/layout/snice-layout-blog.ts +1 -1
  17. package/components/layout/snice-layout-card.ts +1 -1
  18. package/components/layout/snice-layout-centered.ts +1 -1
  19. package/components/layout/snice-layout-dashboard.ts +1 -1
  20. package/components/layout/snice-layout-fullscreen.ts +1 -1
  21. package/components/layout/snice-layout-landing.ts +1 -1
  22. package/components/layout/snice-layout-minimal.ts +1 -1
  23. package/components/layout/snice-layout-sidebar.ts +1 -1
  24. package/components/layout/snice-layout-split.ts +1 -1
  25. package/components/layout/snice-layout.ts +1 -1
  26. package/components/layout/snice-layout.types.ts +1 -1
  27. package/components/login/snice-login.ts +1 -1
  28. package/components/modal/snice-modal.ts +1 -1
  29. package/components/pagination/snice-pagination.ts +1 -1
  30. package/components/progress/snice-progress.ts +1 -1
  31. package/components/radio/snice-radio.ts +1 -1
  32. package/components/select/snice-option.ts +1 -1
  33. package/components/select/snice-select.ts +1 -1
  34. package/components/skeleton/snice-skeleton.ts +1 -1
  35. package/components/switch/snice-switch.ts +1 -1
  36. package/components/table/snice-cell-boolean.ts +1 -1
  37. package/components/table/snice-cell-date.ts +1 -1
  38. package/components/table/snice-cell-duration.ts +1 -1
  39. package/components/table/snice-cell-filesize.ts +1 -1
  40. package/components/table/snice-cell-number.ts +1 -1
  41. package/components/table/snice-cell-progress.ts +1 -1
  42. package/components/table/snice-cell-rating.ts +1 -1
  43. package/components/table/snice-cell-sparkline.ts +1 -1
  44. package/components/table/snice-cell-text.ts +1 -1
  45. package/components/table/snice-cell.ts +1 -1
  46. package/components/table/snice-column.ts +1 -1
  47. package/components/table/snice-header.ts +1 -1
  48. package/components/table/snice-progress.ts +1 -1
  49. package/components/table/snice-rating.ts +1 -1
  50. package/components/table/snice-row.ts +1 -1
  51. package/components/table/snice-table.ts +1 -1
  52. package/components/tabs/snice-tab-panel.ts +1 -1
  53. package/components/tabs/snice-tab.ts +1 -1
  54. package/components/tabs/snice-tabs.ts +1 -1
  55. package/components/toast/snice-toast-container.ts +1 -1
  56. package/components/toast/snice-toast.ts +1 -1
  57. package/components/tooltip/snice-tooltip.ts +1 -1
  58. package/components/tsconfig.json +18 -0
  59. package/dist/controller.d.ts +61 -0
  60. package/dist/controller.js +297 -0
  61. package/dist/controller.js.map +1 -0
  62. package/dist/element.d.ts +77 -0
  63. package/dist/element.js +805 -0
  64. package/dist/element.js.map +1 -0
  65. package/dist/events.d.ts +37 -0
  66. package/dist/events.js +289 -0
  67. package/dist/events.js.map +1 -0
  68. package/dist/global.d.ts +7 -0
  69. package/dist/global.js +23 -0
  70. package/dist/global.js.map +1 -0
  71. package/dist/index.d.ts +14 -0
  72. package/dist/index.js +8 -0
  73. package/dist/index.js.map +1 -0
  74. package/dist/observe.d.ts +26 -0
  75. package/dist/observe.js +329 -0
  76. package/dist/observe.js.map +1 -0
  77. package/dist/request-response.d.ts +46 -0
  78. package/dist/request-response.js +267 -0
  79. package/dist/request-response.js.map +1 -0
  80. package/dist/router.d.ts +87 -0
  81. package/dist/router.js +375 -0
  82. package/dist/router.js.map +1 -0
  83. package/dist/symbols.d.ts +29 -0
  84. package/dist/symbols.js +42 -0
  85. package/dist/symbols.js.map +1 -0
  86. package/dist/transitions.d.ts +50 -0
  87. package/dist/transitions.js +199 -0
  88. package/dist/transitions.js.map +1 -0
  89. package/package.json +8 -9
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, ready, dispatch, observe } from '../../src/index';
1
+ import { element, property, query, on, watch, ready, dispatch, observe } from 'snice';
2
2
  import css from './snice-accordion-item.css?inline';
3
3
  import type { SniceAccordionItemElement } from './snice-accordion.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, on, dispatch, ready, queryAll } from '../../src/index';
1
+ import { element, property, on, dispatch, ready, queryAll } from 'snice';
2
2
  import css from './snice-accordion.css?inline';
3
3
  import type { SniceAccordionElement, SniceAccordionItemElement, AccordionOpenEvent, AccordionCloseEvent } from './snice-accordion.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, query, on, dispatch, part } from '../../src/index';
1
+ import { element, property, watch, query, on, dispatch, part } from 'snice';
2
2
  import css from './snice-alert.css?inline';
3
3
  import type { AlertVariant, AlertSize, SniceAlertElement } from './snice-alert.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, query, ready, on, part } from '../../src/index';
1
+ import { element, property, watch, query, ready, on, part } from 'snice';
2
2
  import css from './snice-avatar.css?inline';
3
3
  import type { AvatarSize, AvatarShape, SniceAvatarElement } from './snice-avatar.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, query, ready, part } from '../../src/index';
1
+ import { element, property, watch, query, ready, part } from 'snice';
2
2
  import css from './snice-badge.css?inline';
3
3
  import type { BadgeVariant, BadgePosition, BadgeSize, SniceBadgeElement } from './snice-badge.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, query, dispatch, on, ready } from '../../src/index';
1
+ import { element, property, watch, query, dispatch, on, ready } from 'snice';
2
2
  import css from './snice-breadcrumbs.css?inline';
3
3
  import type { BreadcrumbItem, BreadcrumbSeparator, BreadcrumbSize, SniceBreadcrumbsElement } from './snice-breadcrumbs.types';
4
4
  import type { SniceCrumbElement } from './snice-breadcrumbs.types';
@@ -1,4 +1,4 @@
1
- import { element, property } from '../../src/index';
1
+ import { element, property } from 'snice';
2
2
  import type { SniceCrumbElement } from './snice-breadcrumbs.types';
3
3
 
4
4
  @element('snice-crumb')
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, dispatch, watch } from '../../src/index';
1
+ import { element, property, query, on, dispatch, watch } from 'snice';
2
2
  import css from './snice-button.css?inline';
3
3
  import type { ButtonVariant, ButtonSize, IconPlacement, SniceButtonElement } from './snice-button.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, on, dispatch, ready } from '../../src/index';
1
+ import { element, property, on, dispatch, ready } from 'snice';
2
2
  import css from './snice-card.css?inline';
3
3
  import type { CardVariant, CardSize, SniceCardElement } from './snice-card.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, dispatch, ready } from '../../src/index';
1
+ import { element, property, query, on, watch, dispatch, ready } from 'snice';
2
2
  import css from './snice-checkbox.css?inline';
3
3
  import type { CheckboxSize, SniceCheckboxElement } from './snice-checkbox.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, query, on, dispatch } from '../../src/index';
1
+ import { element, property, watch, query, on, dispatch } from 'snice';
2
2
  import css from './snice-chip.css?inline';
3
3
  import type { ChipVariant, ChipSize, SniceChipElement } from './snice-chip.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, dispatch, ready } from '../../src/index';
1
+ import { element, property, query, on, watch, dispatch, ready } from 'snice';
2
2
  import css from './snice-date-picker.css?inline';
3
3
  import type { DatePickerSize, DatePickerVariant, DateFormat, SniceDatePickerElement, DatePickerValue } from './snice-date-picker.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, query } from '../../src/index';
1
+ import { element, property, watch, query } from 'snice';
2
2
  import css from './snice-divider.css?inline';
3
3
  import type { DividerOrientation, DividerVariant, DividerAlign, DividerSpacing, SniceDividerElement } from './snice-divider.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, dispatch, ready, dispose } from '../../src/index';
1
+ import { element, property, query, on, watch, dispatch, ready, dispose } from 'snice';
2
2
  import css from './snice-drawer.css?inline';
3
3
  import type { DrawerPosition, DrawerSize, SniceDrawerElement } from './snice-drawer.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, dispatch, ready } from '../../src/index';
1
+ import { element, property, query, on, watch, dispatch, ready } from 'snice';
2
2
  import css from './snice-input.css?inline';
3
3
  import type { InputType, InputSize, InputVariant, SniceInputElement } from './snice-input.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element } from '../../src/index';
1
+ import { element } from 'snice';
2
2
  import css from './snice-layout-blog.css?inline';
3
3
 
4
4
  @element('snice-layout-blog')
@@ -1,4 +1,4 @@
1
- import { element, property } from '../../src/index';
1
+ import { element, property } from 'snice';
2
2
  import css from './snice-layout-card.css?inline';
3
3
 
4
4
  @element('snice-layout-card')
@@ -1,4 +1,4 @@
1
- import { element, property } from '../../src/index';
1
+ import { element, property } from 'snice';
2
2
  import css from './snice-layout-centered.css?inline';
3
3
 
4
4
  @element('snice-layout-centered')
@@ -1,4 +1,4 @@
1
- import { element } from '../../src/index';
1
+ import { element } from 'snice';
2
2
  import css from './snice-layout-dashboard.css?inline';
3
3
 
4
4
  @element('snice-layout-dashboard')
@@ -1,4 +1,4 @@
1
- import { element, property } from '../../src/index';
1
+ import { element, property } from 'snice';
2
2
  import css from './snice-layout-fullscreen.css?inline';
3
3
 
4
4
  @element('snice-layout-fullscreen')
@@ -1,4 +1,4 @@
1
- import { element } from '../../src/index';
1
+ import { element } from 'snice';
2
2
  import css from './snice-layout-landing.css?inline';
3
3
 
4
4
  @element('snice-layout-landing')
@@ -1,4 +1,4 @@
1
- import { element } from '../../src/index';
1
+ import { element } from 'snice';
2
2
  import css from './snice-layout-minimal.css?inline';
3
3
 
4
4
  @element('snice-layout-minimal')
@@ -1,4 +1,4 @@
1
- import { element, property } from '../../src/index';
1
+ import { element, property } from 'snice';
2
2
  import css from './snice-layout-sidebar.css?inline';
3
3
 
4
4
  @element('snice-layout-sidebar')
@@ -1,4 +1,4 @@
1
- import { element, property } from '../../src/index';
1
+ import { element, property } from 'snice';
2
2
  import css from './snice-layout-split.css?inline';
3
3
 
4
4
  @element('snice-layout-split')
@@ -1,4 +1,4 @@
1
- import { element } from '../../src/index';
1
+ import { element } from 'snice';
2
2
  import css from './snice-layout.css?inline';
3
3
 
4
4
  @element('snice-layout')
@@ -1,4 +1,4 @@
1
- import type { SniceElement } from '../../src/index';
1
+ import type { SniceElement } from 'snice';
2
2
 
3
3
  export interface SniceLayoutElement extends SniceElement {
4
4
  // Add layout-specific properties and methods here as needed
@@ -1,4 +1,4 @@
1
- import { element, property, query, queryAll, on, dispatch, request, type Response } from '../../src/index';
1
+ import { element, property, query, queryAll, on, dispatch, request, type Response } from 'snice';
2
2
  import css from './snice-login.css?inline';
3
3
  import type { LoginVariant, LoginSize, LoginCredentials, LoginResult, SniceLoginElement } from './snice-login.types';
4
4
  import '../alert/snice-alert';
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, ready, dispatch } from '../../src/index';
1
+ import { element, property, query, on, watch, ready, dispatch } from 'snice';
2
2
  import css from './snice-modal.css?inline';
3
3
  import type { ModalSize, SniceModalElement } from './snice-modal.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, on, dispatch, watch, ready } from '../../src/index';
1
+ import { element, property, on, dispatch, watch, ready } from 'snice';
2
2
 
3
3
  @element('snice-pagination')
4
4
  export class SnicePagination extends HTMLElement {
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query, dispatch } from '../../src/index';
1
+ import { element, property, watch, ready, query, dispatch } from 'snice';
2
2
  import css from './snice-progress.css?inline';
3
3
  import type { ProgressVariant, ProgressSize, ProgressColor, SniceProgressElement } from './snice-progress.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, dispatch, ready } from '../../src/index';
1
+ import { element, property, query, on, watch, dispatch, ready } from 'snice';
2
2
  import css from './snice-radio.css?inline';
3
3
  import type { RadioSize, SniceRadioElement } from './snice-radio.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, ready } from '../../src/index';
1
+ import { element, property, ready } from 'snice';
2
2
  import type { SniceOptionElement } from './snice-option.types';
3
3
 
4
4
  @element('snice-option')
@@ -1,4 +1,4 @@
1
- import { element, property, query, queryAll, on, watch, dispatch, ready, dispose } from '../../src/index';
1
+ import { element, property, query, queryAll, on, watch, dispatch, ready, dispose } from 'snice';
2
2
  import css from './snice-select.css?inline';
3
3
  import type { SelectSize, SelectOption, SniceSelectElement } from './snice-select.types';
4
4
  import './snice-option';
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready } from '../../src/index';
1
+ import { element, property, watch, ready } from 'snice';
2
2
  import css from './snice-skeleton.css?inline';
3
3
  import type { SkeletonVariant, SkeletonAnimation, SniceSkeletonElement } from './snice-skeleton.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, dispatch, ready } from '../../src/index';
1
+ import { element, property, query, on, watch, dispatch, ready } from 'snice';
2
2
  import css from './snice-switch.css?inline';
3
3
  import type { SwitchSize, SniceSwitchElement } from './snice-switch.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { BooleanFormat, SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { DateFormat, SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { NumberFormat, SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { ProgressFormat, SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
  import './snice-progress';
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { RatingFormat, SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
  import './snice-rating';
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query, SimpleArray } from '../../src/index';
1
+ import { element, property, watch, ready, query, SimpleArray } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { SparklineFormat, SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type { SniceCellElement, ColumnType, ColumnAlign, ColumnDefinition } from './snice-table.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, watch, ready, query } from '../../src/index';
1
+ import { element, property, watch, ready, query } from 'snice';
2
2
  import css from './snice-cell.css?inline';
3
3
  import type {
4
4
  SniceCellElement,
@@ -1,4 +1,4 @@
1
- import { element, property, watch } from '../../src/index';
1
+ import { element, property, watch } from 'snice';
2
2
  import type {
3
3
  SniceColumnElement,
4
4
  ColumnType,
@@ -1,4 +1,4 @@
1
- import { element, property, on, watch, ready, dispatch } from '../../src/index';
1
+ import { element, property, on, watch, ready, dispatch } from 'snice';
2
2
  import type {
3
3
  SniceHeaderElement,
4
4
  ColumnDefinition,
@@ -1,4 +1,4 @@
1
- import { element, property } from '../../src/index';
1
+ import { element, property } from 'snice';
2
2
 
3
3
  @element('snice-progress')
4
4
  export class SniceProgress extends HTMLElement {
@@ -1,4 +1,4 @@
1
- import { element, property } from '../../src/index';
1
+ import { element, property } from 'snice';
2
2
 
3
3
  @element('snice-rating')
4
4
  export class SniceRating extends HTMLElement {
@@ -1,4 +1,4 @@
1
- import { element, property, on, watch, ready, dispatch } from '../../src/index';
1
+ import { element, property, on, watch, ready, dispatch } from 'snice';
2
2
  import css from './snice-row.css?inline';
3
3
  import type {
4
4
  SniceRowElement,
@@ -1,4 +1,4 @@
1
- import { element, on, property, query, request, dispatch, watch } from '../../src/index';
1
+ import { element, on, property, query, request, dispatch, watch } from 'snice';
2
2
  import '../input/snice-input';
3
3
  import '../select/snice-select';
4
4
  import './snice-cell.ts';
@@ -1,4 +1,4 @@
1
- import { element, property, watch } from '../../src/index';
1
+ import { element, property, watch } from 'snice';
2
2
  import css from './snice-tab-panel.css?inline';
3
3
  import type { SniceTabPanelElement } from './snice-tabs.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, dispatch } from '../../src/index';
1
+ import { element, property, query, on, dispatch } from 'snice';
2
2
  import css from './snice-tab.css?inline';
3
3
  import type { TabSelectDetail, TabCloseDetail, SniceTabElement } from './snice-tabs.types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { element, property, query, queryAll, on, watch, ready, dispatch } from '../../src/index';
1
+ import { element, property, query, queryAll, on, watch, ready, dispatch } from 'snice';
2
2
  import css from './snice-tabs.css?inline';
3
3
  import type { TabsPlacement, SniceTabElement, SniceTabPanelElement, TabChangeDetail, TabSelectDetail } from './snice-tabs.types';
4
4
  import { transitions } from '../transitions';
@@ -1,4 +1,4 @@
1
- import { element, property, ready, dispose } from '../../src/index';
1
+ import { element, property, ready, dispose } from 'snice';
2
2
  import { getSymbol } from '../symbols';
3
3
  import type { ToastPosition, ToastOptions, ToastEventDetail, ToastResponseEventDetail, SniceToastContainerElement } from './snice-toast.types';
4
4
  import './snice-toast';
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, dispatch } from '../../src/index';
1
+ import { element, property, query, on, watch, dispatch } from 'snice';
2
2
  import type { ToastType, SniceToastElement } from './snice-toast.types';
3
3
 
4
4
  @element('snice-toast')
@@ -1,4 +1,4 @@
1
- import { element, property, query, on, watch, ready, dispose } from '../../src/index';
1
+ import { element, property, query, on, watch, ready, dispose } from 'snice';
2
2
  import css from './snice-tooltip.css?inline';
3
3
  import portalCss from './snice-tooltip-portal.css?inline';
4
4
  import type { TooltipPosition, TooltipTrigger, SniceTooltipElement } from './snice-tooltip.types';
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "outDir": "../dist/components",
6
+ "rootDir": ".",
7
+ "declaration": true,
8
+ "emitDeclarationOnly": false,
9
+ "sourceMap": true,
10
+ "noUnusedLocals": false,
11
+ "noUnusedParameters": false,
12
+ "paths": {
13
+ "snice": ["../dist/index.ts", "../src/index.ts"]
14
+ }
15
+ },
16
+ "include": ["."],
17
+ "exclude": ["**/*.test.ts", "**/*.spec.ts", "**/*.html", "**/demo*", "**/*.md"]
18
+ }
@@ -0,0 +1,61 @@
1
+ type Maybe<T> = T | null | undefined;
2
+ export interface IController<T extends HTMLElement = HTMLElement> {
3
+ element: Maybe<T>;
4
+ attach(element: T): void | Promise<void>;
5
+ detach(element: T): void | Promise<void>;
6
+ }
7
+ export type ControllerClass<T extends HTMLElement = HTMLElement> = new () => IController<T>;
8
+ declare class ControllerScope {
9
+ private cleanupFns;
10
+ private pendingOperations;
11
+ register(key: string, cleanup: Function): void;
12
+ unregister(key: string): void;
13
+ cleanup(): Promise<void>;
14
+ runOperation<T>(operation: () => Promise<T>): Promise<T>;
15
+ }
16
+ /**
17
+ * Decorator to register a controller class with a name
18
+ * @param name The name to register the controller under
19
+ */
20
+ export declare function controller(name: string): <T extends ControllerClass>(constructor: T) => T;
21
+ /**
22
+ * Attaches a controller to an element
23
+ * @param element The element to attach the controller to
24
+ * @param controllerName The name of the controller to attach
25
+ */
26
+ export declare function attachController(element: HTMLElement, controllerName: string): Promise<void>;
27
+ /**
28
+ * Detaches a controller from an element
29
+ * @param element The element to detach the controller from
30
+ */
31
+ export declare function detachController(element: HTMLElement): Promise<void>;
32
+ /**
33
+ * Gets the controller instance attached to an element
34
+ * @param element The element to get the controller from
35
+ * @returns The controller instance or undefined
36
+ */
37
+ export declare function getController<T extends IController = IController>(element: HTMLElement): T | undefined;
38
+ /**
39
+ * Gets the controller scope for an element
40
+ * @param element The element to get the scope from
41
+ * @returns The controller scope or undefined
42
+ */
43
+ export declare function getControllerScope(element: HTMLElement): ControllerScope | undefined;
44
+ /**
45
+ * Enable controller support for native HTML elements
46
+ * This sets up a MutationObserver to watch for controller attributes
47
+ * on non-custom elements (elements without hyphens in their tag names)
48
+ */
49
+ export declare function useNativeElementControllers(): void;
50
+ /**
51
+ * Stop watching for native element controllers
52
+ */
53
+ export declare function cleanupNativeElementControllers(): void;
54
+ /**
55
+ * Registers a cleanup function for the current controller
56
+ * @param controller The controller instance
57
+ * @param key A unique key for this cleanup function
58
+ * @param cleanup The cleanup function to register
59
+ */
60
+ export declare function registerControllerCleanup(controller: IController, key: string, cleanup: Function): void;
61
+ export {};