@fibrae/semi-ui-svelte 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/dist/_base/create-context.js +0 -1
  2. package/dist/_base/css-animation.js +0 -1
  3. package/dist/_base/group-role.d.ts +0 -1
  4. package/dist/_base/group-role.js +0 -1
  5. package/dist/_base/slot-kind.d.ts +0 -1
  6. package/dist/_base/slot-kind.js +0 -1
  7. package/dist/_base/teleport.d.ts +0 -2
  8. package/dist/_base/teleport.js +0 -2
  9. package/dist/_base/use-click-outside.svelte.d.ts +2 -2
  10. package/dist/_base/use-click-outside.svelte.js +2 -2
  11. package/dist/_base/use-foundation.svelte.js +2 -5
  12. package/dist/_base/virtual-list.svelte +2 -3
  13. package/dist/_base/virtual-list.svelte.d.ts +0 -1
  14. package/dist/_sortable/interface.d.ts +0 -1
  15. package/dist/anchor/interface.d.ts +0 -3
  16. package/dist/anchor/link-item.svelte +0 -1
  17. package/dist/anchor/links.d.ts +0 -1
  18. package/dist/anchor/links.js +0 -1
  19. package/dist/audio-player/audio-player.svelte +0 -2
  20. package/dist/audio-player/audio-slider.svelte +0 -3
  21. package/dist/auto-complete/auto-complete.svelte +0 -5
  22. package/dist/auto-complete/interface.d.ts +0 -9
  23. package/dist/avatar/avatar-group-more.svelte +0 -1
  24. package/dist/avatar/avatar.svelte +0 -4
  25. package/dist/avatar/context.d.ts +0 -1
  26. package/dist/avatar/interface.d.ts +0 -4
  27. package/dist/backtop/backtop.svelte +0 -2
  28. package/dist/backtop/interface.d.ts +0 -1
  29. package/dist/badge/interface.d.ts +0 -1
  30. package/dist/banner/banner.svelte +1 -1
  31. package/dist/banner/interface.d.ts +1 -3
  32. package/dist/breadcrumb/breadcrumb-item.svelte +0 -1
  33. package/dist/breadcrumb/breadcrumb.svelte +0 -1
  34. package/dist/breadcrumb/interface.d.ts +0 -7
  35. package/dist/calendar/calendar.svelte +0 -1
  36. package/dist/calendar/day-calendar.svelte +0 -3
  37. package/dist/calendar/interface.d.ts +0 -8
  38. package/dist/calendar/month-calendar.svelte +0 -4
  39. package/dist/calendar/time-grid.svelte +0 -2
  40. package/dist/calendar/time-grid.svelte.d.ts +0 -1
  41. package/dist/calendar/use-today.svelte.d.ts +0 -1
  42. package/dist/calendar/use-today.svelte.js +0 -1
  43. package/dist/card/index.js +0 -1
  44. package/dist/card/interface.d.ts +0 -3
  45. package/dist/carousel/carousel.svelte +0 -4
  46. package/dist/carousel/interface.d.ts +0 -3
  47. package/dist/cascader/cascader.svelte +0 -6
  48. package/dist/cascader/interface.d.ts +0 -19
  49. package/dist/cascader/item.svelte +0 -4
  50. package/dist/cascader/item.svelte.d.ts +0 -4
  51. package/dist/checkbox/checkbox-group.svelte +0 -3
  52. package/dist/checkbox/checkbox.svelte +0 -4
  53. package/dist/checkbox/index.js +0 -1
  54. package/dist/checkbox/interface.d.ts +0 -1
  55. package/dist/code-highlight/interface.d.ts +0 -1
  56. package/dist/collapse/collapse.svelte +0 -2
  57. package/dist/collapse/index.js +0 -1
  58. package/dist/collapse/interface.d.ts +0 -2
  59. package/dist/collapse/panel.svelte +0 -1
  60. package/dist/collapsible/collapsible.svelte +0 -2
  61. package/dist/color-picker/alpha-slider.svelte +0 -1
  62. package/dist/color-picker/color-choose-area.svelte +0 -1
  63. package/dist/color-picker/color-slider.svelte +0 -1
  64. package/dist/color-picker/data-part.svelte +0 -1
  65. package/dist/cropper/cropper.svelte +0 -1
  66. package/dist/cropper/interface.d.ts +0 -6
  67. package/dist/date-picker/date-input.svelte +0 -4
  68. package/dist/date-picker/date-picker.svelte +0 -7
  69. package/dist/date-picker/inset-input.svelte +0 -1
  70. package/dist/date-picker/interface.d.ts +0 -7
  71. package/dist/date-picker/internal.d.ts +0 -7
  72. package/dist/date-picker/month.svelte +0 -1
  73. package/dist/date-picker/months-grid.svelte +0 -6
  74. package/dist/date-picker/navigation.svelte +0 -1
  75. package/dist/descriptions/interface.d.ts +0 -1
  76. package/dist/divider/divider.svelte +0 -1
  77. package/dist/divider/interface.d.ts +0 -4
  78. package/dist/drag-move/drag-move.js +0 -1
  79. package/dist/drag-move/interface.d.ts +0 -3
  80. package/dist/dropdown/context.d.ts +0 -6
  81. package/dist/dropdown/context.js +0 -1
  82. package/dist/dropdown/dropdown-item.svelte +0 -1
  83. package/dist/dropdown/dropdown.svelte +0 -7
  84. package/dist/dropdown/interface.d.ts +0 -4
  85. package/dist/empty/empty.svelte +0 -1
  86. package/dist/empty/interface.d.ts +0 -3
  87. package/dist/feedback/feedback.svelte +0 -1
  88. package/dist/feedback/interface.d.ts +0 -8
  89. package/dist/float-button/float-button-action.svelte +0 -2
  90. package/dist/float-button/interface.d.ts +0 -2
  91. package/dist/form/array-field.svelte +0 -2
  92. package/dist/form/context.d.ts +0 -2
  93. package/dist/form/error-message.svelte +0 -1
  94. package/dist/form/field-grid.svelte +0 -2
  95. package/dist/form/field-grid.svelte.d.ts +0 -2
  96. package/dist/form/field-inner.svelte +0 -2
  97. package/dist/form/field.svelte +0 -1
  98. package/dist/form/form.svelte +0 -1
  99. package/dist/form/hooks.d.ts +1 -2
  100. package/dist/form/hooks.js +1 -2
  101. package/dist/form/interface.d.ts +0 -7
  102. package/dist/form/utils.d.ts +0 -1
  103. package/dist/form/utils.js +0 -2
  104. package/dist/highlight/interface.d.ts +0 -1
  105. package/dist/hot-keys/interface.d.ts +0 -1
  106. package/dist/image/context.d.ts +0 -1
  107. package/dist/image/footer.d.ts +0 -1
  108. package/dist/image/interface.d.ts +0 -8
  109. package/dist/image/preview-image.svelte +0 -3
  110. package/dist/image/preview-image.svelte.d.ts +0 -1
  111. package/dist/image/preview-inner.svelte +0 -3
  112. package/dist/image/preview-inner.svelte.d.ts +0 -1
  113. package/dist/input/context.d.ts +0 -1
  114. package/dist/input/interface.d.ts +0 -3
  115. package/dist/input/textarea.svelte +0 -3
  116. package/dist/input-number/input-number.svelte +0 -2
  117. package/dist/input-number/interface.d.ts +0 -1
  118. package/dist/json-viewer/interface.d.ts +0 -4
  119. package/dist/json-viewer/json-viewer.svelte +0 -3
  120. package/dist/layout/interface.d.ts +0 -2
  121. package/dist/list/interface.d.ts +0 -2
  122. package/dist/lottie/interface.d.ts +1 -1
  123. package/dist/markdown-render/code-text.js +0 -1
  124. package/dist/markdown-render/components/code.svelte +0 -1
  125. package/dist/markdown-render/components/heading.svelte +0 -1
  126. package/dist/markdown-render/components/p.svelte +0 -1
  127. package/dist/markdown-render/components/table.svelte +0 -1
  128. package/dist/markdown-render/components/tree.d.ts +0 -4
  129. package/dist/markdown-render/components/tree.js +0 -2
  130. package/dist/markdown-render/interface.d.ts +0 -1
  131. package/dist/markdown-render/markdown-children.svelte +0 -2
  132. package/dist/markdown-render/markdown-render.svelte +0 -1
  133. package/dist/markdown-render/runtime.js +0 -1
  134. package/dist/modal/confirm-modal.svelte +0 -1
  135. package/dist/modal/confirm.svelte.d.ts +0 -1
  136. package/dist/modal/confirm.svelte.js +0 -1
  137. package/dist/modal/index.js +0 -1
  138. package/dist/modal/interface.d.ts +0 -6
  139. package/dist/modal/modal-content.svelte +0 -4
  140. package/dist/modal/modal.svelte +0 -1
  141. package/dist/modal/use-show-hide.svelte.d.ts +0 -2
  142. package/dist/modal/use-show-hide.svelte.js +0 -4
  143. package/dist/navigation/context.d.ts +0 -2
  144. package/dist/navigation/index.js +0 -1
  145. package/dist/navigation/interface.d.ts +1 -17
  146. package/dist/navigation/item-shell.svelte +0 -4
  147. package/dist/navigation/item-shell.svelte.d.ts +0 -3
  148. package/dist/navigation/nav-footer.svelte +0 -2
  149. package/dist/navigation/nav-items.svelte +0 -1
  150. package/dist/navigation/nav.svelte +0 -1
  151. package/dist/navigation/sub-nav.svelte +0 -5
  152. package/dist/navigation/wrapper-outlet.svelte +0 -1
  153. package/dist/notification/context.d.ts +0 -3
  154. package/dist/notification/interface.d.ts +0 -5
  155. package/dist/notification/notice-list.svelte +0 -2
  156. package/dist/notification/notice-list.svelte.d.ts +0 -1
  157. package/dist/notification/notice.svelte +0 -2
  158. package/dist/notification/notification-list.svelte +0 -1
  159. package/dist/notification/static-api.js +0 -1
  160. package/dist/overflow-list/interface.d.ts +0 -2
  161. package/dist/overflow-list/overflow-list.svelte +0 -2
  162. package/dist/pagination/interface.d.ts +0 -1
  163. package/dist/pagination/pagination.svelte +0 -2
  164. package/dist/pagination/step-button.svelte +0 -3
  165. package/dist/pagination/step-button.svelte.d.ts +0 -1
  166. package/dist/pincode/interface.d.ts +0 -1
  167. package/dist/pincode/pincode.svelte +0 -3
  168. package/dist/popconfirm/interface.d.ts +0 -1
  169. package/dist/popconfirm/popconfirm.svelte +0 -2
  170. package/dist/popover/interface.d.ts +0 -1
  171. package/dist/popover/popover.svelte +0 -1
  172. package/dist/radio/index.js +0 -1
  173. package/dist/radio/radio-group.svelte +0 -1
  174. package/dist/radio/radio.svelte +0 -1
  175. package/dist/rating/interface.d.ts +0 -2
  176. package/dist/rating/item.svelte +0 -1
  177. package/dist/rating/rating.svelte +0 -7
  178. package/dist/resizable/interface.d.ts +0 -2
  179. package/dist/resizable/resizable.svelte +0 -1
  180. package/dist/resizable/resize-group.svelte +0 -1
  181. package/dist/resizable/resize-handler.svelte +0 -1
  182. package/dist/resize-observer/observe-resize.d.ts +1 -5
  183. package/dist/resize-observer/observe-resize.js +1 -5
  184. package/dist/scroll-list/index.js +0 -1
  185. package/dist/scroll-list/interface.d.ts +0 -2
  186. package/dist/scroll-list/scroll-item.svelte +0 -2
  187. package/dist/select/interface.d.ts +0 -14
  188. package/dist/select/option.svelte +0 -5
  189. package/dist/select/option.svelte.d.ts +0 -5
  190. package/dist/select/select.svelte +0 -14
  191. package/dist/side-sheet/interface.d.ts +0 -1
  192. package/dist/side-sheet/side-sheet.svelte +0 -9
  193. package/dist/skeleton/index.js +0 -1
  194. package/dist/skeleton/interface.d.ts +0 -2
  195. package/dist/skeleton/skeleton-item.svelte +0 -1
  196. package/dist/slider/interface.d.ts +0 -5
  197. package/dist/slider/slider.svelte +0 -7
  198. package/dist/space/interface.d.ts +0 -1
  199. package/dist/space/space.svelte +0 -1
  200. package/dist/steps/context.d.ts +0 -1
  201. package/dist/steps/interface.d.ts +0 -2
  202. package/dist/steps/step.svelte +0 -3
  203. package/dist/switch/switch.svelte +0 -2
  204. package/dist/table/body/base-row.svelte +0 -4
  205. package/dist/table/body/base-row.svelte.d.ts +0 -4
  206. package/dist/table/body/body.svelte +0 -7
  207. package/dist/table/body/body.svelte.d.ts +0 -5
  208. package/dist/table/body/expanded-row.svelte +0 -1
  209. package/dist/table/body/expanded-row.svelte.d.ts +0 -1
  210. package/dist/table/body/section-row.svelte +0 -2
  211. package/dist/table/body/section-row.svelte.d.ts +0 -2
  212. package/dist/table/column-filter-menu.svelte +0 -3
  213. package/dist/table/column-filter-menu.svelte.d.ts +0 -3
  214. package/dist/table/column-filter.svelte +0 -2
  215. package/dist/table/column-filter.svelte.d.ts +0 -2
  216. package/dist/table/column-selection.svelte +1 -2
  217. package/dist/table/column-selection.svelte.d.ts +0 -1
  218. package/dist/table/column-sorter.svelte +1 -6
  219. package/dist/table/column-sorter.svelte.d.ts +1 -6
  220. package/dist/table/context.d.ts +0 -10
  221. package/dist/table/context.js +0 -1
  222. package/dist/table/custom-expand-icon.svelte +0 -2
  223. package/dist/table/custom-expand-icon.svelte.d.ts +0 -2
  224. package/dist/table/head-table.svelte +0 -1
  225. package/dist/table/head-table.svelte.d.ts +0 -1
  226. package/dist/table/interface.d.ts +2 -21
  227. package/dist/table/table-cell.svelte +0 -7
  228. package/dist/table/table-cell.svelte.d.ts +0 -7
  229. package/dist/table/table-header-row.svelte +0 -2
  230. package/dist/table/table-header-row.svelte.d.ts +0 -2
  231. package/dist/table/table-pagination.svelte +0 -2
  232. package/dist/table/table-pagination.svelte.d.ts +0 -2
  233. package/dist/table/table.svelte +0 -5
  234. package/dist/table/utils.d.ts +1 -13
  235. package/dist/table/utils.js +1 -11
  236. package/dist/tabs/index.js +0 -1
  237. package/dist/tabs/interface.d.ts +0 -13
  238. package/dist/tabs/tab-bar.svelte +0 -3
  239. package/dist/tabs/tab-bar.svelte.d.ts +0 -1
  240. package/dist/tabs/tab-pane.svelte +0 -2
  241. package/dist/tabs/tabs.svelte +0 -1
  242. package/dist/tag-input/interface.d.ts +0 -5
  243. package/dist/tag-input/tag-input.svelte +0 -3
  244. package/dist/tag-input/tag-item.svelte +0 -1
  245. package/dist/tag-input/tag-item.svelte.d.ts +0 -1
  246. package/dist/time-picker/combobox.svelte +0 -1
  247. package/dist/time-picker/interface.d.ts +0 -9
  248. package/dist/time-picker/time-picker.svelte +0 -2
  249. package/dist/timeline/interface.d.ts +0 -4
  250. package/dist/timeline/timeline.svelte +0 -1
  251. package/dist/toast/context.d.ts +0 -2
  252. package/dist/toast/interface.d.ts +0 -2
  253. package/dist/toast/static-api.js +0 -1
  254. package/dist/toast/toast.svelte +0 -1
  255. package/dist/toast/use-toast.js +0 -1
  256. package/dist/tooltip/context.d.ts +0 -2
  257. package/dist/tooltip/interface.d.ts +0 -2
  258. package/dist/tooltip/tooltip.svelte +0 -5
  259. package/dist/transfer/interface.d.ts +1 -8
  260. package/dist/transfer/transfer-selected-item.svelte +0 -1
  261. package/dist/transfer/transfer-selected-item.svelte.d.ts +0 -1
  262. package/dist/transfer/transfer.svelte +0 -1
  263. package/dist/tree/auto-sizer.svelte +0 -1
  264. package/dist/tree/context.d.ts +0 -1
  265. package/dist/tree/interface.d.ts +0 -9
  266. package/dist/tree/node-collapsible.svelte +0 -1
  267. package/dist/tree/node-list.svelte +0 -4
  268. package/dist/tree/tree-node.svelte +0 -1
  269. package/dist/tree/tree.svelte +0 -3
  270. package/dist/tree/use-tree-keyboard.svelte.d.ts +1 -8
  271. package/dist/tree/use-tree-keyboard.svelte.js +1 -6
  272. package/dist/tree-select/interface.d.ts +0 -11
  273. package/dist/tree-select/tree-select.svelte +0 -2
  274. package/dist/typography/base.svelte +0 -2
  275. package/dist/typography/index.js +0 -1
  276. package/dist/typography/interface.d.ts +0 -1
  277. package/dist/typography/internal.d.ts +0 -2
  278. package/dist/upload/file-card.svelte +0 -1
  279. package/dist/upload/index.js +0 -1
  280. package/dist/upload/interface.d.ts +0 -4
  281. package/dist/upload/upload.svelte +0 -1
  282. package/dist/user-guide/interface.d.ts +0 -1
  283. package/dist/user-guide/user-guide.svelte +0 -1
  284. package/dist/video-player/video-progress.svelte +0 -2
  285. package/package.json +3 -3
@@ -11,14 +11,12 @@ type DataAttributes = {
11
11
  type AriaAttributes = {
12
12
  [key: `aria-${string}`]: unknown;
13
13
  };
14
- /** The attributes an `items` entry hands to its li */
15
14
  interface EntryAttributes extends DataAttributes, AriaAttributes {
16
15
  class?: ClassValue;
17
16
  style?: string;
18
17
  onmouseenter?: (event: MouseEvent) => void;
19
18
  onmouseleave?: (event: MouseEvent) => void;
20
19
  }
21
- /** The attributes of the item or header link; Nav spreads them onto the a element */
22
20
  export type NavLinkOptions = HTMLAnchorAttributes;
23
21
  export interface NavItemProps extends Omit<HTMLAttributes<HTMLLIElement>, 'children'> {
24
22
  disabled?: boolean;
@@ -54,7 +52,6 @@ export interface SelectedData {
54
52
  text?: string | number;
55
53
  domEvent?: MouseEvent | KeyboardEvent;
56
54
  }
57
- /** Dropdown props of a popup Sub */
58
55
  export type SubDropdownProps = DropdownProps;
59
56
  export interface SubNavProps extends Omit<HTMLAttributes<HTMLLIElement>, 'children'> {
60
57
  disabled?: boolean;
@@ -67,7 +64,6 @@ export interface SubNavProps extends Omit<HTMLAttributes<HTMLLIElement>, 'childr
67
64
  /** Applies when dropdownProps is not given */
68
65
  subDropdownProps?: SubDropdownProps;
69
66
  text?: string | number;
70
- /** The Sub's items: Nav.Item and Nav.Sub, rendered in the inline list or the popup */
71
67
  children?: Snippet;
72
68
  /** Replaces the shown text. Named `label`: `text` is the prop, and a prop and a snippet share one namespace */
73
69
  label?: Snippet;
@@ -98,7 +94,6 @@ export interface NavCollapseButtonProps {
98
94
  }]>;
99
95
  onToggle: () => void;
100
96
  }
101
- /** An entry of `items`: Item or Sub data, the attributes its li takes, and nested entries; Nav's snippets give its content */
102
97
  export interface NavItemConfig extends EntryAttributes {
103
98
  disabled?: boolean;
104
99
  dropdownProps?: SubDropdownProps;
@@ -113,9 +108,7 @@ export interface NavItemConfig extends EntryAttributes {
113
108
  tooltipHideDelay?: number;
114
109
  tooltipShowDelay?: number;
115
110
  }
116
- /** A string entry is both the text and the itemKey of a plain item */
117
111
  export type NavItems = (string | NavItemConfig)[];
118
- /** The `header` prop as data; `logo` is a snippet shown with the header */
119
112
  export interface NavHeaderConfig extends Omit<NavHeaderProps, 'children'> {
120
113
  }
121
114
  export interface NavFooterConfig extends Omit<NavFooterProps, 'children'> {
@@ -146,12 +139,10 @@ export interface NavWrapperArgs {
146
139
  itemElement: Snippet;
147
140
  isSubNav: boolean;
148
141
  isInSubNav: boolean;
149
- /** What the Nav.Item or Nav.Sub was given */
150
142
  props: Partial<NavItemProps> | Partial<SubNavProps>;
151
143
  }
152
144
  export interface NavItemRenderProps {
153
145
  item: NavItemConfig;
154
- /** Nesting depth of the entry, 0 at the top */
155
146
  level: number;
156
147
  }
157
148
  export interface NavProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
@@ -165,7 +156,6 @@ export interface NavProps extends Omit<HTMLAttributes<HTMLElement>, 'children'>
165
156
  openKeys?: ItemKey[] | null;
166
157
  /** Bindable; null is a controlled empty value */
167
158
  selectedKeys?: ItemKey[] | null;
168
- /** Dropdown props of the Subs generated from `items` */
169
159
  subDropdownProps?: SubDropdownProps;
170
160
  subNavCloseDelay?: number;
171
161
  subNavMotion?: boolean;
@@ -173,20 +163,14 @@ export interface NavProps extends Omit<HTMLAttributes<HTMLElement>, 'children'>
173
163
  toggleIconPosition?: 'left' | 'right';
174
164
  tooltipHideDelay?: number;
175
165
  tooltipShowDelay?: number;
176
- /** A config object, or content that holds a `NavHeader`; it shows before the list */
177
166
  header?: NavHeaderConfig | Snippet;
178
- /** A config object, or content that holds a `NavFooter`; it shows after the list */
179
167
  footer?: NavFooterConfig | Snippet;
180
- /** Nav.Item and Nav.Sub, after the ones made from `items` */
181
168
  children?: Snippet;
182
169
  wrapper?: Snippet<[NavWrapperArgs]>;
183
- /** For the entries of `items` */
184
170
  icon?: Snippet<[NavItemRenderProps & NavIconArgs]>;
185
- /** For the entries of `items`; without it the entry's text shows */
171
+ /** Without it the entry's text shows */
186
172
  text?: Snippet<[NavItemRenderProps]>;
187
- /** For the items made from `items` */
188
173
  toggleIcon?: Snippet<[NavItemRenderProps & NavIconArgs]>;
189
- /** For the Subs made from `items` */
190
174
  expandIcon?: Snippet<[NavItemRenderProps & NavExpandIconArgs]>;
191
175
  onClick?: (data: NavClickData) => void;
192
176
  onCollapseChange?: (isCollapsed: boolean) => void;
@@ -12,7 +12,6 @@
12
12
  import { getNavContext } from './context.js';
13
13
  import type { NavIconArgs, NavLinkOptions, OnSelectedData, SelectedData } from './interface.js';
14
14
 
15
- // The li of a Nav.Item or Nav.Sub, or the Dropdown.Item that stands in for it inside a popup
16
15
  interface ItemShellProps extends Omit<HTMLAttributes<HTMLLIElement>, 'children'> {
17
16
  isSubNav?: boolean;
18
17
  /** Resolved by the caller: a Sub provides its own context to the subtree, which includes this shell */
@@ -20,7 +19,6 @@
20
19
  level: number;
21
20
  disabled?: boolean;
22
21
  indent?: boolean | number;
23
- /** Or'ed with the collapsed state of the Nav */
24
22
  isCollapsed?: boolean;
25
23
  itemKey?: ItemKey;
26
24
  link?: string;
@@ -28,12 +26,10 @@
28
26
  text?: string | number;
29
27
  tooltipHideDelay?: number;
30
28
  tooltipShowDelay?: number;
31
- /** What the item was given, reported in `selectedItems` */
32
29
  given: Record<string, unknown>;
33
30
  icon?: Snippet<[NavIconArgs]>;
34
31
  toggleIcon?: Snippet<[NavIconArgs]>;
35
32
  label?: Snippet;
36
- /** A Sub's title and list, in place of the control */
37
33
  content?: Snippet;
38
34
  onItemClick?: (data: SelectedData) => void;
39
35
  }
@@ -9,7 +9,6 @@ interface ItemShellProps extends Omit<HTMLAttributes<HTMLLIElement>, 'children'>
9
9
  level: number;
10
10
  disabled?: boolean;
11
11
  indent?: boolean | number;
12
- /** Or'ed with the collapsed state of the Nav */
13
12
  isCollapsed?: boolean;
14
13
  itemKey?: ItemKey;
15
14
  link?: string;
@@ -17,12 +16,10 @@ interface ItemShellProps extends Omit<HTMLAttributes<HTMLLIElement>, 'children'>
17
16
  text?: string | number;
18
17
  tooltipHideDelay?: number;
19
18
  tooltipShowDelay?: number;
20
- /** What the item was given, reported in `selectedItems` */
21
19
  given: Record<string, unknown>;
22
20
  icon?: Snippet<[NavIconArgs]>;
23
21
  toggleIcon?: Snippet<[NavIconArgs]>;
24
22
  label?: Snippet;
25
- /** A Sub's title and list, in place of the control */
26
23
  content?: Snippet;
27
24
  onItemClick?: (data: SelectedData) => void;
28
25
  }
@@ -10,8 +10,6 @@
10
10
  const ctx = getNavContext('Nav.Footer');
11
11
 
12
12
  const prefix = cssClasses.PREFIX;
13
-
14
- // the button only takes an empty footer of a vertical nav
15
13
  const showButton = $derived(!children && Boolean(collapseButton) && ctx.mode !== strings.MODE_HORIZONTAL);
16
14
  </script>
17
15
 
@@ -3,7 +3,6 @@
3
3
  import type { NavItemType } from '@fibrae/semi-foundation/navigation/foundation';
4
4
  import type { NavExpandIconArgs, NavIconArgs, NavItemConfig, NavItemRenderProps, SubDropdownProps } from './interface.js';
5
5
  import NavItem from './nav-item.svelte';
6
- // the template recurses through its own file
7
6
  import NavItems from './nav-items.svelte';
8
7
  import SubNav from './sub-nav.svelte';
9
8
 
@@ -57,7 +57,6 @@
57
57
  const NO_TREE: NavItemType[] = [];
58
58
  const prefix = cssClasses.PREFIX;
59
59
 
60
- // null is a controlled empty value, which the foundation's readers handle
61
60
  const foundationProps: NavigationBaseProps = {
62
61
  get children() {
63
62
  return children ? NO_TREE : undefined;
@@ -18,8 +18,6 @@
18
18
 
19
19
  type Foundation = SubNavFoundation<SubNavBaseProps>;
20
20
  type Adapter = SubNavAdapter<SubNavBaseProps>;
21
-
22
- // the title takes the trigger props of a Dropdown, of a Tooltip, or none
23
21
  type TitleTriggerProps = Omit<Partial<DropdownTriggerProps>, 'aria-haspopup' | 'aria-expanded'> & { 'aria-haspopup'?: 'menu' | 'dialog'; 'aria-expanded'?: boolean | 'true' | 'false' };
24
22
 
25
23
  // Left undefined when not passed, so `wrapper` receives only what the Sub was given
@@ -65,8 +63,6 @@
65
63
  const isSelected = $derived(itemKey !== undefined && outer.selectedKeys.includes(itemKey));
66
64
  const horizontal = $derived(outer.mode === strings.MODE_HORIZONTAL);
67
65
  const isPopup = $derived(outer.isCollapsed || horizontal);
68
-
69
- // inside a popup menu the title is the menuitem that opens a submenu
70
66
  const menuTitle = $derived(isPopup && outer.isInSubNav);
71
67
 
72
68
  // A disabled Sub opens no Dropdown; collapsed, it shows its hidden text in a tooltip instead
@@ -119,7 +115,6 @@
119
115
  // the title is a button (or a menuitem div); a disabled one stays focusable so that it can be found
120
116
  const inlineAttrs = $derived(isPopup ? {} : { 'aria-controls': isOpen ? subListId : undefined, 'aria-expanded': isOpen });
121
117
 
122
- // the child context: the Sub's own title and list are below it
123
118
  setNavContext(
124
119
  Object.create(outer, {
125
120
  isInSubNav: { get: () => true },
@@ -3,7 +3,6 @@
3
3
  import { getNavContext } from './context.js';
4
4
  import type { NavWrapperArgs } from './interface.js';
5
5
 
6
- // Hands the item's li to the Nav's `wrapper` snippet when there is one; otherwise the li renders as it is
7
6
  let { itemElement, isSubNav, isInSubNav, itemProps }: { itemElement: Snippet; isSubNav: boolean; isInSubNav: boolean; itemProps: NavWrapperArgs['props'] } = $props();
8
7
 
9
8
  const ctx = getNavContext('Nav.Item');
@@ -1,13 +1,10 @@
1
1
  import type { NoticeInstance } from '@fibrae/semi-foundation/notification/notification-foundation';
2
2
  import type { ConfigProps } from '@fibrae/semi-foundation/notification/notification-list-foundation';
3
- /** A notice as the store holds it: `add` always has an id, and the offsets ride along from the options */
4
3
  export type ListedNotice = NoticeInstance & Required<Pick<NoticeInstance, 'id'>> & Pick<ConfigProps, 'top' | 'bottom' | 'left' | 'right'>;
5
4
  export interface NoticeListContext {
6
5
  /** The pointer or focus is inside the position's list: every notice's countdown waits */
7
6
  readonly paused: boolean;
8
- /** The notices the latest store change updated in place */
9
7
  readonly updatedItems: readonly NoticeInstance[];
10
- /** The notices the store removed that are still leaving */
11
8
  readonly removedItems: readonly NoticeInstance[];
12
9
  /** Queues text for the live region; `read` runs when it is written */
13
10
  announce: (key: string, read: () => string) => void;
@@ -18,22 +18,18 @@ export interface NoticeProps extends Omit<FoundationNoticeProps, 'title' | 'cont
18
18
  left?: ConfigProps['left'];
19
19
  right?: ConfigProps['right'];
20
20
  }
21
- /** Props of the single notice the list renders; list-level options are stripped before they reach it */
22
21
  export interface NoticeItemProps extends Omit<NoticeProps, 'top' | 'bottom' | 'left' | 'right' | 'zIndex' | 'getPopupContainer' | 'stack' | 'position'> {
23
22
  placement: NoticePosition;
24
23
  stack?: boolean;
25
24
  stackExpanded?: boolean;
26
25
  /** Shown notices in front of this one, which sets how far it sinks behind them in a collapsed stack */
27
26
  depth?: number;
28
- /** z-index inside a stack, newest on top */
29
27
  layer?: number;
30
28
  /** The store removed the notice: it plays its leave animation, then calls `onLeaveEnd` */
31
29
  leaving?: boolean;
32
30
  onLeaveEnd?: () => void;
33
- /** Asks the list to remove the notice, with its id */
34
31
  close?: (id: string) => void;
35
32
  }
36
- /** A hook mounts its own wrapper, so the wrapper-level options do not apply */
37
33
  export type NotificationHookOptions = Omit<NoticeProps, 'type' | 'id' | 'zIndex' | 'getPopupContainer'>;
38
34
  export interface NotificationHookApi {
39
35
  success: (config: NotificationHookOptions) => string;
@@ -44,7 +40,6 @@ export interface NotificationHookApi {
44
40
  close: (id: string) => void;
45
41
  }
46
42
  export interface NoticeHandle {
47
- /** Starts the duration over */
48
43
  restartCloseTimer: () => void;
49
44
  pauseCloseTimer: () => void;
50
45
  resumeCloseTimer: () => void;
@@ -12,7 +12,6 @@
12
12
 
13
13
  interface NoticeListProps {
14
14
  placement: NoticePosition;
15
- /** The position's notices, newest first, leaving ones included */
16
15
  items: ListedNotice[];
17
16
  removedItems: readonly NoticeInstance[];
18
17
  updatedItems: readonly NoticeInstance[];
@@ -35,7 +34,6 @@
35
34
  const threshold = $derived(getStackThreshold(items[0].stack ?? defaults('stack')));
36
35
  const expanded = $derived(paused || shownCount <= threshold);
37
36
 
38
- // The newest notice decides the list's offsets
39
37
  const listStyle = $derived.by(() => {
40
38
  const newest = items[0];
41
39
  return {
@@ -3,7 +3,6 @@ import type NotificationListStore from '@fibrae/semi-foundation/notification/not
3
3
  import { type ListedNotice } from './context.js';
4
4
  interface NoticeListProps {
5
5
  placement: NoticePosition;
6
- /** The position's notices, newest first, leaving ones included */
7
6
  items: ListedNotice[];
8
7
  removedItems: readonly NoticeInstance[];
9
8
  updatedItems: readonly NoticeInstance[];
@@ -14,7 +14,6 @@
14
14
  import { getNoticeListContext } from './context.js';
15
15
  import type { NoticeItemProps } from './interface.js';
16
16
 
17
- // The foundation reads only these two
18
17
  type FoundationProps = Pick<NoticeItemProps, 'id' | 'duration'>;
19
18
  type Foundation = NotificationFoundation<FoundationProps>;
20
19
  type Adapter = NoticeAdapter<FoundationProps>;
@@ -102,7 +101,6 @@
102
101
  };
103
102
 
104
103
  const handleAnimationEnd = (event: AnimationEvent) => {
105
- // the content's own animations bubble up to here
106
104
  if (event.target !== event.currentTarget) return;
107
105
  if (!leaving) {
108
106
  entered = true;
@@ -10,7 +10,6 @@
10
10
  import type { NotificationListProps } from './interface.js';
11
11
  import NoticeList from './notice-list.svelte';
12
12
 
13
- // A list renders one store for its whole life
14
13
  let { store }: NotificationListProps = $props();
15
14
  const defaults = useDefaultProps('Notification');
16
15
 
@@ -14,7 +14,6 @@ let wrapper = null;
14
14
  let list = null;
15
15
  function addNotice(notice) {
16
16
  assertClient('Notification', 'Notification.useNotification');
17
- // an explicit undefined must not replace the defaults
18
17
  const merged = { ...store.defaults, ...omitInstanceIds(semiGlobal.config.overrideDefaultProps?.Notification), ...omitBy(notice, (value) => value === undefined) };
19
18
  const id = merged.id ?? createId('notification');
20
19
  if (!wrapper) {
@@ -1,11 +1,9 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import type { HTMLAttributes } from 'svelte/elements';
3
- /** The default item shape: any record, read by `itemKey` */
4
3
  export type OverflowListItem = Record<string, any>;
5
4
  export type OverflowListKey = string | number;
6
5
  export interface OverflowListItemSnippetProps<T> {
7
6
  item: T;
8
- /** The item's position in `items` */
9
7
  index: number;
10
8
  }
11
9
  export interface OverflowListOverflowSnippetProps<T> {
@@ -56,7 +56,6 @@
56
56
  return rest.style ? { css: rest.style } : undefined;
57
57
  };
58
58
 
59
- // The foundation reads the props through one object
60
59
  const foundationProps: OverflowListBaseProps = {
61
60
  get items() {
62
61
  return readItems();
@@ -172,7 +171,6 @@
172
171
  });
173
172
  };
174
173
 
175
- // Reset the view when items, style, keys or collapseFrom change, before the DOM shows the new props
176
174
  $effect.pre(() => {
177
175
  const next = viewProps();
178
176
  // read keys here so in-place edits of a $state array are tracked
@@ -10,7 +10,6 @@ export interface PaginationProps extends Omit<HTMLAttributes<HTMLUListElement>,
10
10
  size?: 'small' | 'default';
11
11
  /** Bindable; leave it out for an uncontrolled page. `bind:currentPage={get, set}` makes it fully controlled */
12
12
  currentPage?: number;
13
- /** Not rendered when `size` is `small` */
14
13
  showSizeChanger?: boolean;
15
14
  showQuickJumper?: boolean;
16
15
  /** Position of the omitted pages popover and the size changer dropdown; not used by the `small` size */
@@ -17,7 +17,6 @@
17
17
  import RestPages from './rest-pages.svelte';
18
18
  import StepButton from './step-button.svelte';
19
19
 
20
- // The props the foundation reads, plus the ones its initial state reads
21
20
  interface FoundationProps extends PaginationBaseProps {
22
21
  defaultCurrentPage?: number;
23
22
  pageSize?: number;
@@ -59,7 +58,6 @@
59
58
  const globalCurrentPage = defaults('currentPage');
60
59
  const globalPageSize = defaults('pageSize');
61
60
 
62
- // $bindable needs destructuring, so the foundation reads the props through getters
63
61
  const foundationProps: FoundationProps = {
64
62
  get currentPage() {
65
63
  return currentPage ?? globalCurrentPage;
@@ -7,7 +7,6 @@
7
7
 
8
8
  interface StepButtonProps {
9
9
  kind: 'prev' | 'next';
10
- /** The locale name, kept unless the content is a lone text */
11
10
  label: string;
12
11
  disabled: boolean;
13
12
  text?: string | Snippet;
@@ -19,8 +18,6 @@
19
18
  let contentKind = $state<SlotKind>();
20
19
 
21
20
  const prefix = cssClasses.PREFIX;
22
-
23
- // A string names the button from the first frame; a snippet only after its rendered content is known
24
21
  const namedByContent = $derived(typeof text === 'string' ? text !== '' : text !== undefined && contentKind === 'text');
25
22
 
26
23
  // A snippet exposes nothing to read before it renders, so a lone text names the button from the second frame on;
@@ -1,7 +1,6 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  interface StepButtonProps {
3
3
  kind: 'prev' | 'next';
4
- /** The locale name, kept unless the content is a lone text */
5
4
  label: string;
6
5
  disabled: boolean;
7
6
  text?: string | Snippet;
@@ -7,7 +7,6 @@ export interface PinCodeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onfo
7
7
  value?: string;
8
8
  count?: number;
9
9
  format?: PinCodeFormat;
10
- /** Focuses the first cell on mount */
11
10
  autofocus?: boolean;
12
11
  disabled?: boolean;
13
12
  size?: InputSize;
@@ -20,7 +20,6 @@
20
20
 
21
21
  const locale = useLocale('PinCode');
22
22
 
23
- // each cell stores its own handle by index
24
23
  let inputs = $state<(ReturnType<typeof Input> | undefined)[]>([]);
25
24
 
26
25
  // The inputs are the focus targets, so their description and state go to each one; on the root a Tooltip's
@@ -30,7 +29,6 @@
30
29
  // injected by Form: not DOM attributes, and no single cell carries the code's name
31
30
  const dropped = new Set(['name', 'insetLabel', 'insetLabelId']);
32
31
 
33
- // $bindable needs destructuring, so the foundation reads the props through getters
34
32
  const foundationProps: PinCodeBaseProps = {
35
33
  get value() {
36
34
  return value;
@@ -107,7 +105,6 @@
107
105
  (next) => foundation.updateValueList(Array.from(next || ''))
108
106
  );
109
107
 
110
- /** Focuses the input at `index` (0-based) with the caret after its character */
111
108
  export function focus(index: number) {
112
109
  inputs[index]?.focus();
113
110
  inputs[index]?.setSelectionRange(1, 1);
@@ -16,7 +16,6 @@ export interface PopconfirmProps extends Omit<PopoverProps, 'content'> {
16
16
  okText?: string;
17
17
  okType?: ButtonType;
18
18
  showCloseIcon?: boolean;
19
- /** Names the dialog; a string or a snippet */
20
19
  title?: string | Snippet;
21
20
  content?: Snippet<[RenderContentProps]>;
22
21
  /** Replaces the warning icon; `null` shows no icon */
@@ -103,7 +103,6 @@
103
103
  // A disabled Popconfirm renders the trigger alone; a spread of no props leaves the user's element as written
104
104
  const noTriggerProps = {} as TooltipTriggerProps;
105
105
 
106
- // $bindable needs destructuring, so the foundation reads the props through getters
107
106
  const foundationProps: PopconfirmBaseProps = {
108
107
  get cancelButtonProps() {
109
108
  return cancelButtonProps;
@@ -230,7 +229,6 @@
230
229
  if (popoverVisible) foundation.handlePopupOpen();
231
230
  });
232
231
 
233
- /** Focuses the trigger (only with returnFocusOnClose and a non-custom trigger) */
234
232
  export function focusTrigger() {
235
233
  popover?.focusTrigger();
236
234
  }
@@ -21,7 +21,6 @@ export interface PopoverProps {
21
21
  * A combobox passes presentation because it points at the inner listbox itself
22
22
  */
23
23
  role?: string;
24
- /** On the popup */
25
24
  class?: string;
26
25
  /** On the popup; its `background-color` and `border-color` also color the arrow */
27
26
  style?: string;
@@ -56,7 +56,6 @@
56
56
  const popupSpacing = $derived(getPopoverSpacing(spacing, showArrow));
57
57
  const stop = $derived(stopPropagation === undefined ? undefined : Boolean(stopPropagation));
58
58
 
59
- /** Focuses the trigger (only with returnFocusOnClose and a non-custom trigger) */
60
59
  export function focusTrigger() {
61
60
  tooltip?.focusTrigger();
62
61
  }
@@ -1,5 +1,4 @@
1
1
  import RadioGroupPart from './radio-group.svelte';
2
2
  import RadioBase from './radio.svelte';
3
- // Svelte components are functions, so the part attaches to the component itself
4
3
  export const Radio = Object.assign(RadioBase, { Group: RadioGroupPart });
5
4
  export { default as RadioGroup } from './radio-group.svelte';
@@ -38,7 +38,6 @@
38
38
  const uid = $props.id();
39
39
  const syncs = new SvelteSet<() => void>();
40
40
 
41
- // $bindable needs destructuring, so the foundation reads the props through getters
42
41
  const foundationProps: RadioGroupBaseProps = {
43
42
  get mode() {
44
43
  return mode;
@@ -46,7 +46,6 @@
46
46
  // make an uncontrolled radio read as controlled; a `checked` equal to the echo counts as uncontrolled instead.
47
47
  let echoed: boolean | undefined;
48
48
 
49
- // $bindable needs destructuring, so the foundation reads the props through getters
50
49
  const foundationProps: RadioBaseProps = {
51
50
  get checked() {
52
51
  return checked === echoed ? undefined : checked;
@@ -34,7 +34,6 @@ export interface RatingItemProps {
34
34
  disabled: boolean;
35
35
  count: number;
36
36
  size: number | 'small' | 'default';
37
- /** A custom unit used as is; otherwise the locale names it */
38
37
  unit?: string;
39
38
  preventScroll?: boolean;
40
39
  /** No radio stands for the value: this star's first radio is the Tab stop */
@@ -42,7 +41,6 @@ export interface RatingItemProps {
42
41
  character?: string | Snippet;
43
42
  /** From a wrapping Tooltip: the description reaches the radios, the Tab stop is dropped */
44
43
  trigger?: TooltipTriggerProps;
45
- /** The pointer moved over the star: a preview of its value */
46
44
  onPreview: (event: MouseEvent) => void;
47
45
  onPick: (event: MouseEvent) => void;
48
46
  /** Enter or Space on a radio, or a click without a pointer (assistive technology): the value that radio stands for */
@@ -71,7 +71,6 @@
71
71
  }
72
72
  };
73
73
 
74
- /** Focuses the radio of this star that stands for `starValue`: the first half for a half value */
75
74
  export function starFocus(starValue: number) {
76
75
  const radio = RatingFoundation.isFirstRadio(starValue, index, allowHalf) ? first : second;
77
76
  radio?.focus({ preventScroll });
@@ -14,8 +14,6 @@
14
14
  import RatingItem from './item.svelte';
15
15
 
16
16
  type ClickEvent = MouseEvent | KeyboardEvent;
17
-
18
- // the DOM typings give relatedTarget as an EventTarget, but a focus event's is a Node or null
19
17
  type ListFocusEvent = FocusEvent & RatingFocusEvent;
20
18
  type Foundation = RatingFoundation<RatingBaseProps, RatingState, ClickEvent, ListFocusEvent, KeyboardEvent>;
21
19
  type Adapter = RatingAdapter<RatingBaseProps, RatingState, ClickEvent, ListFocusEvent, KeyboardEvent>;
@@ -54,12 +52,10 @@
54
52
  // roving Tab stop. A radiogroup has no control to carry a name.
55
53
  const DROPPED_ATTRS = new Set(['tabindex', 'name']);
56
54
 
57
- // $bindable needs destructuring, so the foundation reads the props through getters
58
55
  const foundationProps: RatingBaseProps = {
59
56
  get value() {
60
57
  return value;
61
58
  },
62
- // an unset value starts empty, and a value that goes back to undefined returns to it
63
59
  defaultValue: 0,
64
60
  get count() {
65
61
  return count;
@@ -87,7 +83,6 @@
87
83
  (view) => RatingFoundation.getInitialState(view),
88
84
  (base) => ({
89
85
  focusStar: (starValue) => {
90
- // a value between radios has no radio to focus: Tab's landing radio stands in, as for focus()
91
86
  if (!RatingFoundation.isRadioValue(starValue, count, allowHalf)) {
92
87
  focusTabStop();
93
88
  return;
@@ -100,7 +95,6 @@
100
95
  notifyHoverChange: (hoverValue) => onHoverChange?.(hoverValue),
101
96
  setValue: (next) => base.setState({ value: next }),
102
97
  notifyChange: (next) => {
103
- // the bindable prop is the source of truth: bound, the write reaches the parent; unbound, it overrides locally
104
98
  value = next;
105
99
  onChange?.(next);
106
100
  },
@@ -176,7 +170,6 @@
176
170
  }
177
171
  );
178
172
 
179
- /** Focuses the radio that Tab would reach */
180
173
  export function focus() {
181
174
  if (!disabled) {
182
175
  focusTabStop();
@@ -39,7 +39,6 @@ export interface ResizableProps extends Omit<HTMLAttributes<HTMLDivElement>, 'on
39
39
  onChange?: ResizeCallback;
40
40
  onResizeEnd?: ResizeCallback;
41
41
  children?: Snippet;
42
- /** Content of each enabled handle */
43
42
  handle?: Snippet<[ResizableHandleSnippetProps]>;
44
43
  }
45
44
  export interface ResizeGroupProps extends HTMLAttributes<HTMLDivElement> {
@@ -58,6 +57,5 @@ export interface ResizeItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'o
58
57
  children?: Snippet;
59
58
  }
60
59
  export interface ResizeHandlerProps extends HTMLAttributes<HTMLDivElement> {
61
- /** Replaces the default grip icon */
62
60
  children?: Snippet;
63
61
  }
@@ -53,7 +53,6 @@
53
53
 
54
54
  let root = $state<HTMLDivElement>();
55
55
 
56
- // the foundation reads the props through getters, so it always sees the current values
57
56
  const foundationProps: ResizableBaseProps = {
58
57
  get size() {
59
58
  return size;
@@ -114,7 +114,6 @@
114
114
  const observer = new ResizeObserver(() => {
115
115
  // a group first mounted inside display:none measures 0: lay out again once it becomes measurable
116
116
  foundation.handleGroupResize();
117
- // a container change without a window resize can leave px limits violated
118
117
  foundation.ensureConstraint();
119
118
  });
120
119
  observer.observe(node);
@@ -19,7 +19,6 @@
19
19
 
20
20
  const handlePointerdown = (e: PointerEvent & { currentTarget: HTMLDivElement }) => {
21
21
  if (isSecondaryPress(e)) return;
22
- // capturing keeps the moves and the release on the handler wherever the pointer goes
23
22
  e.currentTarget.setPointerCapture(e.pointerId);
24
23
  group.notifyResizeStart(e.currentTarget, e);
25
24
  };
@@ -1,7 +1,3 @@
1
1
  import type { Attachment } from 'svelte/attachments';
2
- /**
3
- * Reports the size changes of the element it is attached to (`<div {@attach observeResize(onResize)}>`). An attachment
4
- * rather than a component or a target-getter hook: Svelte hands it the element and runs the cleanup on removal, so no
5
- * `bind:this` state is needed. `onResize` is called with the first size too, as the browser reports it on `observe()`.
6
- */
2
+ /** `onResize` is called with the first size too, as the browser reports it on `observe()`. */
7
3
  export default function observeResize(onResize: (entries: ResizeObserverEntry[]) => void): Attachment<Element>;
@@ -1,8 +1,4 @@
1
- /**
2
- * Reports the size changes of the element it is attached to (`<div {@attach observeResize(onResize)}>`). An attachment
3
- * rather than a component or a target-getter hook: Svelte hands it the element and runs the cleanup on removal, so no
4
- * `bind:this` state is needed. `onResize` is called with the first size too, as the browser reports it on `observe()`.
5
- */
1
+ /** `onResize` is called with the first size too, as the browser reports it on `observe()`. */
6
2
  export default function observeResize(onResize) {
7
3
  return (element) => {
8
4
  const observer = new ResizeObserver(onResize);
@@ -1,5 +1,4 @@
1
1
  import ScrollItemPart from './scroll-item.svelte';
2
2
  import ScrollListBase from './scroll-list.svelte';
3
- // Svelte components are functions, so the parts attach to the component itself
4
3
  export const ScrollList = Object.assign(ScrollListBase, { Item: ScrollItemPart });
5
4
  export { default as ScrollItem } from './scroll-item.svelte';