@xihan-ui/web-components 1.0.0-alpha.3 → 1.0.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.
package/dist/define.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { r as PropertyValues } from "./types-BvWWqMd_.js";
2
2
  import { t as XhReactiveElement } from "./element-DRoFjrYO.js";
3
3
  import { l as Spreader, n as XhConfigScope, t as XhConfig } from "./config-Cz16-P4i.js";
4
- import { AccordionNode, AlertSchema, AnchorTranslations, BadgeVariant, BreadcrumbTranslations, CalendarDay, CalendarSelectionMode, CalendarView, CalendarWeekDay, CalendarWeekdayFormat, CarouselTranslations, CascaderExpandTrigger, CascaderNode, CascaderSchema, CascaderValue, CheckboxCheckedState, CheckboxGroupNode, ColorPickerFormat, ColorPickerTranslations, ComboboxInputBehavior, ComboboxNode, ComboboxSchema, ComponentMeta, ComposerRunStatus, ComposerTranslations, ContextMenuNode, ContextMenuSchema, DateFieldTranslations, DateGranularity, DatePickerPreset, DatePickerSchema, DateSegmentSet, DateSegmentType, DownloadTriggerData, DrawerSchema, EditableActivationMode, EditableSubmitMode, EmptyStateLive, FieldsetTranslations, FileUploadRemoteFile, FileUploadSchema, FileUploadTranslations, FloatingPanelPosition, FloatingPanelSchema, FloatingPanelSize, FloatingPanelStage, FormErrorPatch, FormSchema, FormValidateOn, FormValues, HeatmapAxisInput, HeatmapGrid, HeatmapMatrixGrid, HeatmapMonthGrid, HeatmapPalette, HeatmapTranslations, HeatmapValue, HeatmapVariant, HotkeysPlatform, HotkeysTarget, HotkeysTranslations, IconWeight, ImageCropperRect, ImageCropperSchema, ImageCropperShape, ImageViewerItem, ImageViewerTranslations, JsonViewerTranslations, ListboxNode, ListboxSelectionMode, LoadingBarTranslations, MasonryColumns, MasonryProps, MenuNode, MenubarNode, NavigationMenuNode, NavigationMenuTranslations, NumberFieldSchema, PaginationTranslations, PasswordInputTranslations, PinInputTranslations, PinInputType, PopoverTranslations, ProgressGapPosition, ProgressVariant, RadioGroupNode, ResolvedToast, ScrollAreaOrientation, ScrollbarSchema, ScrollbarType, SegmentedNode, SelectNode, SelectSchema, SideNavNode, SideNavSchema, SideNavTranslations, SignaturePadDrawingOptions, SignaturePadTranslations, SkeletonVariant, SliderSchema, SliderValueTextDetails, SpaceProps, SpinnerTranslations, SplitterPanelProps, TableColumnDef, TableRowDef, TableSelection, TableSelectionMode, TableSortDescriptor, TabsActivationMode, TabsNode, TabsVariant, TagSchema, TagVariant, TagsInputBlurBehavior, TextFieldSchema, TextFieldType, ThreadStatus, ThreadTranslations, TimeFieldSchema, TimeGranularity, TimeHourCycle, TimePickerPreset, TimePickerSchema, TimerSchema, ToastOptions, ToastPlacement, ToastRecord, ToastTranslations, ToastType, ToasterTranslations, ToggleGroupNode, TourStep, TourTranslations, TransferFilter, TransferItem, TreeNode, TreeSchema, TreeSelectSchema, TreeSelectionMode, VirtualizerAlign, VirtualizerItemState, XhTranslationOverrides } from "@xihan-ui/headless";
4
+ import { AccordionNode, AlertSchema, AnchorTranslations, BadgePlacement, BreadcrumbTranslations, CalendarDay, CalendarSelectionMode, CalendarView, CalendarWeekDay, CalendarWeekdayFormat, CarouselTranslations, CascaderExpandTrigger, CascaderNode, CascaderSchema, CascaderValue, CheckboxCheckedState, CheckboxGroupNode, ColorPickerFormat, ColorPickerTranslations, ComboboxInputBehavior, ComboboxNode, ComboboxSchema, ComponentMeta, ComposerRunStatus, ComposerTranslations, ContextMenuNode, ContextMenuSchema, DateFieldTranslations, DateGranularity, DatePickerPreset, DatePickerSchema, DateSegmentSet, DateSegmentType, DownloadTriggerData, DrawerSchema, EditableActivationMode, EditableSubmitMode, EmptyStateLive, FieldsetTranslations, FileUploadRemoteFile, FileUploadSchema, FileUploadTranslations, FloatingPanelPosition, FloatingPanelSchema, FloatingPanelSize, FloatingPanelStage, FormErrorPatch, FormSchema, FormValidateOn, FormValues, HeatmapAxisInput, HeatmapGrid, HeatmapMatrixGrid, HeatmapMonthGrid, HeatmapPalette, HeatmapTranslations, HeatmapValue, HeatmapVariant, HotkeysPlatform, HotkeysTarget, HotkeysTranslations, IconWeight, ImageCropperRect, ImageCropperSchema, ImageCropperShape, ImageViewerItem, ImageViewerTranslations, JsonViewerTranslations, ListboxNode, ListboxSelectionMode, LoadingBarTranslations, MasonryColumns, MasonryProps, MenuNode, MenubarNode, NavigationMenuNode, NavigationMenuTranslations, NotificationOptions, NotificationPlacement, NotificationRecord, NotificationTranslations, NotificationType, NumberFieldSchema, PaginationTranslations, PasswordInputTranslations, PinInputTranslations, PinInputType, PopoverTranslations, ProgressGapPosition, ProgressVariant, RadioGroupNode, ResolvedNotification, ScrollAreaOrientation, ScrollbarSchema, ScrollbarType, SegmentedNode, SelectNode, SelectSchema, SideNavNode, SideNavSchema, SideNavTranslations, SignaturePadDrawingOptions, SignaturePadTranslations, SkeletonVariant, SliderSchema, SliderValueTextDetails, SpaceProps, SpinnerTranslations, SplitterPanelProps, TableColumnDef, TableColumnKind, TableColumnPreference, TableRowDef, TableSelection, TableSelectionMode, TableSortDescriptor, TabsActivationMode, TabsNode, TabsVariant, TagSchema, TagVariant, TagsInputBlurBehavior, TextFieldSchema, TextFieldType, ThreadStatus, ThreadTranslations, TimeFieldSchema, TimeGranularity, TimeHourCycle, TimePickerPreset, TimePickerSchema, TimerSchema, ToastTranslations, ToastType, ToggleGroupNode, TourStep, TourTranslations, TransferFilter, TransferItem, TreeNode, TreeSchema, TreeSelectSchema, TreeSelectionMode, VirtualizerAlign, VirtualizerItemState, XhTranslationOverrides } from "@xihan-ui/headless";
5
5
  import { MotionPreference } from "@xihan-ui/motion";
6
6
  import { ActionVariant, ControlVariant, Direction, HighlighterPort, IconRecord, Orientation, Placement, Size, Tone } from "@xihan-ui/kernel";
7
7
  //#region src/dom/part-contract.d.ts
@@ -123,7 +123,7 @@ declare class XhAccordionElement extends XhElement {
123
123
  private exitConfig;
124
124
  private ensureExitConfig;
125
125
  static partContract: {
126
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "header" | "trigger">;
126
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "header" | "item" | "trigger" | "content">;
127
127
  meta: import("@xihan-ui/headless").ComponentMeta;
128
128
  };
129
129
  static properties: {
@@ -252,7 +252,7 @@ declare class XhAlertElement extends XhElement {
252
252
  */
253
253
  declare class XhAnchorElement extends XhElement {
254
254
  static partContract: {
255
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "list" | "link">;
255
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "list" | "link">;
256
256
  meta: import("@xihan-ui/headless").ComponentMeta;
257
257
  };
258
258
  static properties: {
@@ -374,26 +374,30 @@ declare class XhAvatarElement extends XhElement {
374
374
  //#endregion
375
375
  //#region src/elements/badge.d.ts
376
376
  /**
377
- * `<xh-badge>` —— 徽标展示宿主,无状态机,外观来自 variant 属性。
377
+ * `<xh-badge>` —— 角标宿主,无状态机。
378
+ *
379
+ * 被标记的东西写进 root,角标本身写进 indicator;角标是挂在别的元素角上的一枚标记,
380
+ * 行内的状态药丸请用 `<xh-tag>`。
378
381
  *
379
382
  * @customElement xh-badge
380
- * @attr {'solid'|'subtle'|'outline'} variant - 视觉变体
383
+ * @attr {'top-end'|'top-start'|'bottom-end'|'bottom-start'} placement - 挂在哪个角上,默认 top-end
381
384
  * @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
382
385
  * @attr {'sm'|'md'|'lg'} size - 尺寸
383
386
  * @attr {number} count - 计数:给了它徽标就自己出数字,超过 max 写成「max+」;节点已有内容时以内容为准
384
387
  * @attr {number} max - 计数上限,默认 99
385
388
  * @attr {boolean} show-zero - 计数为 0 时也显示,默认不显示
386
389
  * @attr {boolean} dot - 只出一个点,不出数字
387
- * @attr {string} label - 读屏怎么念这枚徽标,例如「3 条未读」
388
- * @csspart root - 承载 data-scope/data-part/data-* 的展示节点
390
+ * @attr {string} label - 读屏怎么念这枚角标,例如「3 条未读」
391
+ * @csspart root - 锚点:被标记的那个东西放进它里面
392
+ * @csspart indicator - 角标本身,绝对定位在 root 的某个角上
389
393
  */
390
394
  declare class XhBadgeElement extends XhElement {
391
395
  static partContract: {
392
- anatomy: import("@xihan-ui/kernel").Anatomy<"root">;
396
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator">;
393
397
  meta: import("@xihan-ui/headless").ComponentMeta;
394
398
  };
395
399
  static properties: {
396
- variant: {
400
+ placement: {
397
401
  converter: {
398
402
  fromAttribute: (v: string | null) => string | undefined;
399
403
  };
@@ -431,7 +435,7 @@ declare class XhBadgeElement extends XhElement {
431
435
  };
432
436
  };
433
437
  };
434
- variant?: BadgeVariant;
438
+ placement?: BadgePlacement;
435
439
  tone?: Tone;
436
440
  size?: Size;
437
441
  count?: number;
@@ -766,7 +770,7 @@ declare class XhCalendarElement extends XhElement {
766
770
  */
767
771
  declare class XhCarouselElement extends XhElement {
768
772
  static partContract: {
769
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "viewport" | "indicator" | "prev-trigger" | "next-trigger" | "item-group" | "indicator-group">;
773
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "prev-trigger" | "next-trigger" | "viewport" | "item-group" | "indicator-group">;
770
774
  meta: import("@xihan-ui/headless").ComponentMeta;
771
775
  };
772
776
  static properties: {
@@ -914,7 +918,7 @@ declare class XhCarouselElement extends XhElement {
914
918
  */
915
919
  declare class XhCascaderElement extends XhElement {
916
920
  static partContract: {
917
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "input" | "empty" | "column" | "value-text" | "search-list" | "search-item">;
921
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "trigger" | "content" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "input" | "empty" | "column" | "value-text" | "search-list" | "search-item">;
918
922
  meta: import("@xihan-ui/headless").ComponentMeta;
919
923
  };
920
924
  static properties: {
@@ -1064,6 +1068,12 @@ declare class XhCascaderElement extends XhElement {
1064
1068
  private readonly notifyValue;
1065
1069
  private readonly notifyOpen;
1066
1070
  private readonly ctrl;
1071
+ /**
1072
+ * 列区的自绘条:与 content 同级挂在已经 fixed 的 positioner 上。
1073
+ * 只摆横的——列多到放不下时整体横向滚动,纵向溢出归每一列自己;
1074
+ * 横条的正负按排版方向算,而组件不读计算样式,把作者写的那份显式交过去。
1075
+ */
1076
+ private readonly bars;
1067
1077
  private machineProps;
1068
1078
  private ensureConfig;
1069
1079
  private readonly registerLayer;
@@ -1203,7 +1213,7 @@ declare class XhCheckboxElement extends XhElement {
1203
1213
  */
1204
1214
  declare class XhCheckboxGroupElement extends XhElement {
1205
1215
  static partContract: {
1206
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "trigger" | "label" | "item-text" | "hidden-input">;
1216
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "trigger" | "label" | "item-text" | "hidden-input">;
1207
1217
  meta: import("@xihan-ui/headless").ComponentMeta;
1208
1218
  };
1209
1219
  static properties: {
@@ -1408,7 +1418,7 @@ declare class XhCollapsibleElement extends XhElement {
1408
1418
  private config;
1409
1419
  private ensureConfig;
1410
1420
  static partContract: {
1411
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger">;
1421
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "trigger" | "content">;
1412
1422
  meta: import("@xihan-ui/headless").ComponentMeta;
1413
1423
  };
1414
1424
  static properties: {
@@ -1459,6 +1469,7 @@ declare class XhCollapsibleElement extends XhElement {
1459
1469
  * @attr {boolean} read-only - 只读:浮层照开,进去只是改不动
1460
1470
  * @attr {boolean} alpha - 带透明度,默认关;关掉时透明度那条滑杆与输入框整条禁用
1461
1471
  * @attr {string} swatches - 预设色板,逗号分隔(如 "#ff0000,#00ff00")
1472
+ * @attr {'sm'|'md'|'lg'} size - 尺寸
1462
1473
  * @attr {'ltr'|'rtl'} dir - 文字方向,只改写横轴上左右两键与指针的语义,默认 ltr
1463
1474
  * @attr {string} placement - 首选放置位,默认 bottom-start;避让后的实际位写在 data-placement 上
1464
1475
  * @attr {number} offset - 浮层与锚点的间距(px)
@@ -1486,7 +1497,7 @@ declare class XhCollapsibleElement extends XhElement {
1486
1497
  */
1487
1498
  declare class XhColorPickerElement extends XhElement {
1488
1499
  static partContract: {
1489
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "label" | "control" | "positioner" | "value-text" | "hidden-input" | "area" | "swatch" | "area-thumb" | "channel-slider" | "channel-slider-track" | "channel-slider-thumb" | "channel-input" | "eye-dropper-trigger" | "swatch-group" | "swatch-item">;
1500
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "trigger" | "content" | "label" | "control" | "positioner" | "value-text" | "hidden-input" | "area" | "swatch" | "area-thumb" | "channel-slider" | "channel-slider-track" | "channel-slider-thumb" | "channel-input" | "eye-dropper-trigger" | "swatch-group" | "swatch-item">;
1490
1501
  meta: import("@xihan-ui/headless").ComponentMeta;
1491
1502
  };
1492
1503
  static properties: {
@@ -1541,6 +1552,11 @@ declare class XhColorPickerElement extends XhElement {
1541
1552
  fromAttribute: (v: string | null) => string | undefined;
1542
1553
  };
1543
1554
  };
1555
+ size: {
1556
+ converter: {
1557
+ fromAttribute: (v: string | null) => string | undefined;
1558
+ };
1559
+ };
1544
1560
  direction: {
1545
1561
  converter: {
1546
1562
  fromAttribute: (v: string | null) => string | undefined;
@@ -1571,6 +1587,7 @@ declare class XhColorPickerElement extends XhElement {
1571
1587
  alpha?: boolean;
1572
1588
  swatches?: string[];
1573
1589
  name?: string;
1590
+ size?: Size;
1574
1591
  direction?: Direction;
1575
1592
  placement?: Placement;
1576
1593
  offset?: number;
@@ -1584,6 +1601,8 @@ declare class XhColorPickerElement extends XhElement {
1584
1601
  private readonly notifyValue;
1585
1602
  private readonly notifyOpen;
1586
1603
  private readonly ctrl;
1604
+ /** 面板的自绘条:与 content 同级挂在已经 fixed 的 positioner 上 */
1605
+ private readonly bars;
1587
1606
  private machineProps;
1588
1607
  private ensureConfig;
1589
1608
  private readonly registerLayer;
@@ -1654,7 +1673,7 @@ declare class XhColorPickerElement extends XhElement {
1654
1673
  */
1655
1674
  declare class XhComboboxElement extends XhElement {
1656
1675
  static partContract: {
1657
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "label" | "item-group" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "input" | "empty" | "hidden-input" | "item-group-label">;
1676
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "trigger" | "content" | "label" | "item-group" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "input" | "empty" | "hidden-input" | "item-group-label">;
1658
1677
  meta: import("@xihan-ui/headless").ComponentMeta;
1659
1678
  };
1660
1679
  static properties: {
@@ -1801,6 +1820,8 @@ declare class XhComboboxElement extends XhElement {
1801
1820
  private readonly notifyInputValue;
1802
1821
  private readonly notifyOpen;
1803
1822
  private readonly ctrl;
1823
+ /** 候选列表的自绘条:与 content 同级挂在已经 fixed 的 positioner 上 */
1824
+ private readonly bars;
1804
1825
  /** 作者声明的条目禁用,只认首见那一份;给了 collection 时用它,否则现读 */
1805
1826
  private readonly declaredDisabled;
1806
1827
  private machineProps;
@@ -1988,7 +2009,7 @@ declare class XhConfigElement extends XhReactiveElement implements XhConfigScope
1988
2009
  */
1989
2010
  declare class XhContextMenuElement extends XhElement {
1990
2011
  static partContract: {
1991
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "separator" | "positioner" | "item-text" | "item-indicator" | "group" | "group-label" | "arrow">;
2012
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "trigger" | "content" | "separator" | "positioner" | "item-text" | "item-indicator" | "group" | "group-label" | "arrow">;
1992
2013
  meta: import("@xihan-ui/headless").ComponentMeta;
1993
2014
  };
1994
2015
  static properties: {
@@ -2072,6 +2093,8 @@ declare class XhContextMenuElement extends XhElement {
2072
2093
  private readonly notifyOpen;
2073
2094
  private readonly notifySelect;
2074
2095
  private readonly ctrl;
2096
+ /** 条目列表的自绘条:与 content 同级挂在已经 fixed 的 positioner 上 */
2097
+ private readonly bars;
2075
2098
  /** 作者声明的条目禁用,只认首见那一份;给了 collection 时用它,否则现读 */
2076
2099
  private readonly declaredDisabled;
2077
2100
  private machineProps;
@@ -2146,7 +2169,7 @@ type SegmentTexts = { readonly [K in DateSegmentType]?: string; };
2146
2169
  */
2147
2170
  declare class XhDateFieldElement extends XhElement {
2148
2171
  static partContract: {
2149
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment-group" | "segment">;
2172
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment" | "segment-group">;
2150
2173
  meta: import("@xihan-ui/headless").ComponentMeta;
2151
2174
  };
2152
2175
  static properties: {
@@ -2298,7 +2321,9 @@ declare class XhDateFieldElement extends XhElement {
2298
2321
  * @attr {'day'|'month'|'quarter'|'year'} active-view - 受控:面板此刻钻到了哪一层;缺省跟着 view,每次展开都拨回去
2299
2322
  * @attr {boolean} week-selection - 周选:点任意一天选中它所在的整周(view=day 且区间模式下生效)
2300
2323
  * @prop {DatePickerPreset[]} presets - 快捷选项(数组只走 property):给了就在浮层里多出一列
2301
- * @attr {number} visible-count - 并排展示几页
2324
+ * @attr {number} visible-count - 并排展示几页;缺省单选 1,区间按两端定,同一页放得下就 1
2325
+ * @attr {boolean} fixed-weeks - 日历恒渲染六行,默认开;写 fixed-weeks="false" 关掉
2326
+ * @attr {string} default-focused-value - 初始聚焦日,同时决定展开时先落在哪一页
2302
2327
  * @attr {boolean} disabled - 整个控件禁用:trigger 转原生 disabled,段位退出 Tab 序
2303
2328
  * @attr {boolean} read-only - 只读:浮层照常展开、日历照常浏览,但选中值改不动
2304
2329
  * @attr {boolean} invalid - 校验失败标注
@@ -2351,9 +2376,9 @@ declare class XhDateFieldElement extends XhElement {
2351
2376
  */
2352
2377
  declare class XhDatePickerElement extends XhElement {
2353
2378
  static partContract: {
2354
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "segment-group" | "confirm-trigger" | "preset" | "presets" | "calendar" | "time-column" | "time-item">;
2379
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "trigger" | "content" | "label" | "control" | "positioner" | "clear-trigger" | "segment-group" | "confirm-trigger" | "presets" | "preset" | "calendar" | "time-column" | "time-item">;
2355
2380
  meta: import("@xihan-ui/headless").ComponentMeta;
2356
- delegates: (import("@xihan-ui/kernel").Anatomy<"root" | "header" | "grid" | "heading" | "prev-trigger" | "next-trigger" | "prev-year-trigger" | "next-year-trigger" | "heading-year-trigger" | "heading-month-trigger" | "grid-head" | "week-day" | "grid-body" | "week-row" | "week-number" | "cell" | "cell-trigger"> | import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment-group" | "segment">)[];
2381
+ delegates: (import("@xihan-ui/kernel").Anatomy<"root" | "header" | "grid" | "heading" | "prev-trigger" | "next-trigger" | "prev-year-trigger" | "next-year-trigger" | "heading-year-trigger" | "heading-month-trigger" | "grid-head" | "week-day" | "grid-body" | "week-row" | "week-number" | "cell" | "cell-trigger"> | import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment" | "segment-group">)[];
2357
2382
  };
2358
2383
  static properties: {
2359
2384
  value: {
@@ -2432,6 +2457,18 @@ declare class XhDatePickerElement extends XhElement {
2432
2457
  };
2433
2458
  attribute: string;
2434
2459
  };
2460
+ fixedWeeks: {
2461
+ converter: {
2462
+ fromAttribute: (v: string | null) => boolean | undefined;
2463
+ };
2464
+ attribute: string;
2465
+ };
2466
+ defaultFocusedValue: {
2467
+ converter: {
2468
+ fromAttribute: (v: string | null) => string | undefined;
2469
+ };
2470
+ attribute: string;
2471
+ };
2435
2472
  disabled: {
2436
2473
  converter: {
2437
2474
  fromAttribute: (v: string | null) => boolean | undefined;
@@ -2529,6 +2566,8 @@ declare class XhDatePickerElement extends XhElement {
2529
2566
  weekSelection?: boolean;
2530
2567
  presets?: DatePickerPreset[];
2531
2568
  visibleCount?: number;
2569
+ fixedWeeks?: boolean;
2570
+ defaultFocusedValue?: string;
2532
2571
  disabled?: boolean;
2533
2572
  readOnly?: boolean;
2534
2573
  invalid?: boolean;
@@ -2559,6 +2598,8 @@ declare class XhDatePickerElement extends XhElement {
2559
2598
  private readonly calendarCtrl;
2560
2599
  private readonly fieldCtrl;
2561
2600
  private readonly fieldEndCtrl;
2601
+ /** 浮层面板的自绘条:与 content 同级挂在已经 fixed 的 positioner 上 */
2602
+ private readonly bars;
2562
2603
  private services;
2563
2604
  private machineProps;
2564
2605
  private ensureConfig;
@@ -2610,7 +2651,7 @@ declare class XhDatePickerElement extends XhElement {
2610
2651
  */
2611
2652
  declare class XhDialogElement extends XhElement {
2612
2653
  static partContract: {
2613
- anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "backdrop">;
2654
+ anatomy: import("@xihan-ui/kernel").Anatomy<"trigger" | "content" | "title" | "description" | "close-trigger" | "positioner" | "backdrop">;
2614
2655
  meta: import("@xihan-ui/headless").ComponentMeta;
2615
2656
  };
2616
2657
  static properties: {
@@ -2766,7 +2807,7 @@ declare class XhDownloadTriggerElement extends XhElement {
2766
2807
  */
2767
2808
  declare class XhDrawerElement extends XhElement {
2768
2809
  static partContract: {
2769
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "backdrop">;
2810
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "trigger" | "content" | "title" | "description" | "close-trigger" | "positioner" | "backdrop">;
2770
2811
  meta: import("@xihan-ui/headless").ComponentMeta;
2771
2812
  };
2772
2813
  static properties: {
@@ -3383,7 +3424,7 @@ declare class XhFileUploadElement extends XhElement {
3383
3424
  */
3384
3425
  declare class XhFloatingPanelElement extends XhElement {
3385
3426
  static partContract: {
3386
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "header" | "trigger" | "title" | "close-trigger" | "positioner" | "body" | "drag-trigger" | "resize-trigger" | "stage-trigger">;
3427
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "header" | "trigger" | "content" | "title" | "close-trigger" | "positioner" | "body" | "drag-trigger" | "resize-trigger" | "stage-trigger">;
3387
3428
  meta: import("@xihan-ui/headless").ComponentMeta;
3388
3429
  };
3389
3430
  static properties: {
@@ -3907,7 +3948,7 @@ declare class XhHotkeysElement extends XhElement {
3907
3948
  */
3908
3949
  declare class XhHoverCardElement extends XhElement {
3909
3950
  static partContract: {
3910
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "positioner" | "arrow">;
3951
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "trigger" | "content" | "positioner" | "arrow">;
3911
3952
  meta: import("@xihan-ui/headless").ComponentMeta;
3912
3953
  };
3913
3954
  static properties: {
@@ -3974,6 +4015,8 @@ declare class XhHoverCardElement extends XhElement {
3974
4015
  private exit;
3975
4016
  private readonly notify;
3976
4017
  private readonly ctrl;
4018
+ /** 卡片内容的自绘条:与 content 同级挂在已经 fixed 的 positioner 上 */
4019
+ private readonly bars;
3977
4020
  private machineProps;
3978
4021
  private ensureConfig;
3979
4022
  private readonly registerLayer;
@@ -4154,7 +4197,7 @@ declare class XhImageElement extends XhElement {
4154
4197
  */
4155
4198
  declare class XhImageCropperElement extends XhElement {
4156
4199
  static partContract: {
4157
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "viewport" | "image" | "grid" | "hidden-input" | "crop-area" | "crop-handle">;
4200
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "image" | "grid" | "viewport" | "hidden-input" | "crop-area" | "crop-handle">;
4158
4201
  meta: import("@xihan-ui/headless").ComponentMeta;
4159
4202
  };
4160
4203
  static properties: {
@@ -4307,7 +4350,7 @@ declare class XhImageCropperElement extends XhElement {
4307
4350
  */
4308
4351
  declare class XhImageViewerElement extends XhElement {
4309
4352
  static partContract: {
4310
- anatomy: import("@xihan-ui/kernel").Anatomy<"viewport" | "content" | "trigger" | "close-trigger" | "image" | "prev-trigger" | "next-trigger" | "positioner" | "backdrop" | "reset-trigger" | "toolbar" | "zoom-in-trigger" | "zoom-out-trigger" | "rotate-left-trigger" | "rotate-right-trigger" | "flip-horizontal-trigger" | "flip-vertical-trigger" | "counter">;
4353
+ anatomy: import("@xihan-ui/kernel").Anatomy<"trigger" | "content" | "close-trigger" | "image" | "prev-trigger" | "next-trigger" | "viewport" | "positioner" | "backdrop" | "reset-trigger" | "toolbar" | "zoom-in-trigger" | "zoom-out-trigger" | "rotate-left-trigger" | "rotate-right-trigger" | "flip-horizontal-trigger" | "flip-vertical-trigger" | "counter">;
4311
4354
  meta: import("@xihan-ui/headless").ComponentMeta;
4312
4355
  };
4313
4356
  static properties: {
@@ -4454,7 +4497,7 @@ declare class XhImageViewerElement extends XhElement {
4454
4497
  */
4455
4498
  declare class XhJsonViewerElement extends XhElement {
4456
4499
  static partContract: {
4457
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "preview" | "tree" | "item-key" | "item-value" | "branch" | "branch-control" | "branch-trigger" | "branch-indicator" | "branch-text" | "branch-content">;
4500
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "text" | "preview" | "tree" | "item-key" | "item-value" | "branch" | "branch-control" | "branch-trigger" | "branch-indicator" | "branch-text" | "branch-content">;
4458
4501
  meta: import("@xihan-ui/headless").ComponentMeta;
4459
4502
  };
4460
4503
  static properties: {
@@ -4493,6 +4536,9 @@ declare class XhJsonViewerElement extends XhElement {
4493
4536
  };
4494
4537
  attribute: string;
4495
4538
  };
4539
+ view: {
4540
+ attribute: string;
4541
+ };
4496
4542
  loop: {
4497
4543
  converter: {
4498
4544
  fromAttribute: (v: string | null) => boolean | undefined;
@@ -4520,15 +4566,25 @@ declare class XhJsonViewerElement extends XhElement {
4520
4566
  maxStringLength?: number;
4521
4567
  maxItems?: number;
4522
4568
  sortKeys?: boolean;
4569
+ view?: 'tree' | 'text';
4523
4570
  loop?: boolean;
4524
4571
  direction?: Direction;
4525
4572
  size?: Size;
4526
4573
  translations?: Partial<JsonViewerTranslations>;
4527
4574
  private readonly notify;
4528
4575
  private readonly ctrl;
4576
+ /**
4577
+ * 两档的自绘条:与滚动层同级挂在根上。两档互斥,交此刻在场的那个——
4578
+ * 两个容器都归本元素建,身上没有 data-xh-part,从 root 里现查。
4579
+ * 两条轴都摆:深层缩进往行首方向推、长字符串往行尾伸。
4580
+ */
4581
+ private readonly bars;
4582
+ /** 条子上一轮接的是哪一档的容器。 */
4583
+ private wiredLayer;
4529
4584
  private machineProps;
4530
4585
  /** 树容器与每一行都归本元素建,按路径留着复用。 */
4531
4586
  private treeEl;
4587
+ private textEl;
4532
4588
  private readonly rows;
4533
4589
  /**
4534
4590
  * root 被移出本宿主时,铺在它里面的行也一并离场。浏览器此时不派 focusout,
@@ -4539,6 +4595,18 @@ declare class XhJsonViewerElement extends XhElement {
4539
4595
  private makeRow;
4540
4596
  private paint;
4541
4597
  protected wire(): void;
4598
+ /**
4599
+ * 把条子接到此刻在场的那一档容器上。
4600
+ * 机器的追踪器在本轮渲染之前就跑完了,这一轮换掉的容器它看不见;
4601
+ * 换了档就再催一轮,下一轮的追踪器才把滚动监听与容器标记挪过去。
4602
+ */
4603
+ private syncBars;
4604
+ /**
4605
+ * root 里只留这一档的容器:摘走另一档,作者写在里面的东西也一并清掉。
4606
+ * 自绘条同样挂在 root 上,按 scope 认出来留着——整份 replaceChildren 会把条子一起抹掉。
4607
+ * 已经就位的节点一个都不碰:移动一个节点等于把它摘下来再插回去,焦点在树里会掉回 body。
4608
+ */
4609
+ private adopt;
4542
4610
  }
4543
4611
  //#endregion
4544
4612
  //#region src/elements/listbox.d.ts
@@ -4860,7 +4928,7 @@ declare class XhMasonryElement extends XhElement {
4860
4928
  */
4861
4929
  declare class XhMenuElement extends XhElement {
4862
4930
  static partContract: {
4863
- anatomy: import("@xihan-ui/kernel").Anatomy<"item" | "content" | "trigger" | "separator" | "positioner" | "group" | "group-label" | "arrow">;
4931
+ anatomy: import("@xihan-ui/kernel").Anatomy<"item" | "trigger" | "content" | "separator" | "positioner" | "group" | "group-label" | "arrow">;
4864
4932
  meta: import("@xihan-ui/headless").ComponentMeta;
4865
4933
  };
4866
4934
  static properties: {
@@ -4953,6 +5021,8 @@ declare class XhMenuElement extends XhElement {
4953
5021
  private readonly notifyOpen;
4954
5022
  private readonly notifySelect;
4955
5023
  private readonly ctrl;
5024
+ /** 条目列表的自绘条:与 content 同级挂在已经 fixed 的 positioner 上 */
5025
+ private readonly bars;
4956
5026
  /** 作者声明的条目禁用,只认首见那一份;给了 collection 时用它,否则现读 */
4957
5027
  private readonly declaredDisabled;
4958
5028
  private machineProps;
@@ -5021,7 +5091,7 @@ declare class XhMenubarElement extends XhElement {
5021
5091
  /** 闸门只用到 reducedMotion,本元素别处不需要 config,建一份共用即可。 */
5022
5092
  private exitConfig;
5023
5093
  static partContract: {
5024
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "separator" | "positioner" | "item-text" | "item-indicator" | "group" | "group-label">;
5094
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "trigger" | "content" | "separator" | "positioner" | "item-text" | "item-indicator" | "group" | "group-label">;
5025
5095
  meta: import("@xihan-ui/headless").ComponentMeta;
5026
5096
  };
5027
5097
  static properties: {
@@ -5160,7 +5230,7 @@ declare class XhNavigationMenuElement extends XhElement {
5160
5230
  /** 退场闸门与消解层共用一份环境包。 */
5161
5231
  private config;
5162
5232
  static partContract: {
5163
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "viewport" | "content" | "indicator" | "trigger" | "list" | "link">;
5233
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "trigger" | "content" | "list" | "link" | "viewport">;
5164
5234
  meta: import("@xihan-ui/headless").ComponentMeta;
5165
5235
  };
5166
5236
  static properties: {
@@ -5243,6 +5313,229 @@ declare class XhNavigationMenuElement extends XhElement {
5243
5313
  disconnectedCallback(): void;
5244
5314
  }
5245
5315
  //#endregion
5316
+ //#region src/elements/notification.d.ts
5317
+ /**
5318
+ * `<xh-notification>` —— Light-DOM 行为宿主:作者写 root 与若干 group 角色节点,
5319
+ * 元素跑 notification 机器并把 connect 产出打上去。每个 group 用 `placement` 属性声明自己是哪个位置,
5320
+ * 不写就落在队列的 placement 上。
5321
+ *
5322
+ * 单条通知的节点由作者按队列渲染(读 `items` 或听 `items-change`),元素不替作者生成:
5323
+ * 生成节点就等于收走模板控制权,图标、进度条、i18n 文案都再塞不进来。
5324
+ * 每条渲染成一个 `<xh-notification-item>`,它走完退场会冒泡一条 status-change,本元素据此把记录删掉。
5325
+ *
5326
+ * @customElement xh-notification
5327
+ * @attr {'top-start'|'top'|'top-end'|'middle-start'|'middle'|'middle-end'|'bottom-start'|'bottom'|'bottom-end'} placement - 默认落位,默认 bottom-end
5328
+ * @attr {number} max - 每个位置最多同时留几条,超出挤掉最旧的;不给即不限
5329
+ * @attr {number} gap - 同一摞内的间距(px),默认 16
5330
+ * @attr {number} duration - 单条没写 duration 时的默认停留毫秒
5331
+ * @attr {number} remove-delay - 单条没写 remove-delay 时的默认退场窗口毫秒
5332
+ * @attr {boolean} pause-on-page-idle - 页面切到后台时按住计时,逐条下发
5333
+ * @fires items-change - 队列变化;detail 为 `{ items: NotificationRecord[] }`
5334
+ * @csspart root - 队列的作用域包装(display: contents,不占布局),承载 data-count / data-empty
5335
+ * @csspart group - role=region 的地标,某一个位置上的那一摞;可自带 placement 属性,承载 data-placement / data-count / data-empty 与间距
5336
+ */
5337
+ declare class XhNotificationElement extends XhElement {
5338
+ static partContract: {
5339
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "item-indicator" | "group" | "item-title" | "item-description" | "item-action-trigger" | "item-close-trigger">;
5340
+ meta: import("@xihan-ui/headless").ComponentMeta;
5341
+ };
5342
+ static properties: {
5343
+ items: {
5344
+ attribute: boolean;
5345
+ };
5346
+ defaultItems: {
5347
+ attribute: boolean;
5348
+ };
5349
+ placement: {
5350
+ converter: {
5351
+ fromAttribute: (v: string | null) => string | undefined;
5352
+ };
5353
+ };
5354
+ max: {
5355
+ converter: {
5356
+ fromAttribute: (v: string | null) => number | undefined;
5357
+ };
5358
+ };
5359
+ gap: {
5360
+ converter: {
5361
+ fromAttribute: (v: string | null) => number | undefined;
5362
+ };
5363
+ };
5364
+ duration: {
5365
+ converter: {
5366
+ fromAttribute: (v: string | null) => number | undefined;
5367
+ };
5368
+ };
5369
+ removeDelay: {
5370
+ converter: {
5371
+ fromAttribute: (v: string | null) => number | undefined;
5372
+ };
5373
+ attribute: string;
5374
+ };
5375
+ pauseOnPageIdle: {
5376
+ converter: {
5377
+ fromAttribute: (v: string | null) => boolean | undefined;
5378
+ };
5379
+ attribute: string;
5380
+ };
5381
+ translations: {
5382
+ attribute: boolean;
5383
+ };
5384
+ };
5385
+ items?: NotificationRecord[];
5386
+ defaultItems?: NotificationRecord[];
5387
+ placement?: NotificationPlacement;
5388
+ max?: number;
5389
+ gap?: number;
5390
+ duration?: number;
5391
+ removeDelay?: number;
5392
+ pauseOnPageIdle?: boolean;
5393
+ translations?: Partial<NotificationTranslations>;
5394
+ private readonly notify;
5395
+ private readonly ctrl;
5396
+ private machineProps;
5397
+ /**
5398
+ * 命令式入口共用的取法。机器要到进文档(hostConnected)才建:
5399
+ * 还没进文档就发通知是调用方的时序问题,明说好过把这条通知静默丢掉。
5400
+ */
5401
+ private commands;
5402
+ /** 入队并返回 id;同 id 已存在则就地改写,位置不动(处理中转已完成走的就是这条)。 */
5403
+ create(options?: NotificationOptions): string;
5404
+ /**
5405
+ * 刻意不叫 `update`:那是 Lit 自己的渲染生命周期钩子,占用它会让宿主每次重渲
5406
+ * 都拐进这里来(还带着一个 changedProperties 当 id),组件当场不工作。
5407
+ * Vue 侧没有这层基类,composable 上仍叫 `update`。
5408
+ */
5409
+ updateItem(id: string, options: Partial<NotificationOptions>): void;
5410
+ dismiss(id: string): void;
5411
+ dismissAll(): void;
5412
+ /** max 之内、按加入先后排列的可见条目,已补齐默认值,可直接摊给 `<xh-notification-item>`。 */
5413
+ get visibleNotifications(): ResolvedNotification[];
5414
+ /** 当前有条目的位置,按九宫格固定顺序。 */
5415
+ get placements(): NotificationPlacement[];
5416
+ get count(): number;
5417
+ getItemsByPlacement(placement: NotificationPlacement): ResolvedNotification[];
5418
+ /**
5419
+ * 单条通知走完退场会冒泡上来:记录该从队列里删掉了。
5420
+ * 认元素名而不是只认事件名——avatar 之类的部件也派 status-change,且完全可能就摆在通知内部。
5421
+ */
5422
+ private readonly onItemStatus;
5423
+ connectedCallback(): void;
5424
+ disconnectedCallback(): void;
5425
+ protected wire(): void;
5426
+ }
5427
+ /**
5428
+ * `<xh-notification-item>` —— 单条通知卡片:作者写 item/item-indicator/item-title/
5429
+ * item-description/item-action-trigger/item-close-trigger 角色节点,
5430
+ * 元素跑生命周期机器并把 connect 产出打上去。
5431
+ *
5432
+ * item 承载 role 与 aria-live:默认 status + polite(排队等读屏的空隙),
5433
+ * type="error" 换成 alert + assertive(打断当前朗读)。指针停在卡片上、
5434
+ * 或焦点落进卡片内部都会把倒计时按住,离开才接着走剩下的那一段。
5435
+ *
5436
+ * 退场窗口走完只把卡片收起、不删节点:作者写在里面的内容归作者,
5437
+ * 什么时候把这条从队列里删掉是 `<xh-notification>` 的事(它收本元素冒泡上去的 status-change)。
5438
+ *
5439
+ * @customElement xh-notification-item
5440
+ * @attr {string} id - 队列身份,`<xh-notification>` 按它寻址;不给就用实例自己的 scope id
5441
+ * @attr {string} title - 标题文案;作者没在 item-title 部件里写内容时由元素填入
5442
+ * @attr {string} description - 补充说明;作者没在 item-description 部件里写内容时由元素填入
5443
+ * @attr {'info'|'success'|'warning'|'error'|'loading'} type - 语气,默认 info;loading 不自动消失
5444
+ * @attr {number} duration - 停留毫秒,默认 5000;<=0 即关掉自动消失
5445
+ * @attr {number} remove-delay - 退场窗口毫秒,默认 200,留给退场动画
5446
+ * @attr {boolean} closable - 是否给可用的关闭按钮,默认 true;写 closable="false" 关掉
5447
+ * @attr {boolean} pause-on-page-idle - 页面切到后台时按住计时,默认关
5448
+ * @fires status-change - 生命周期落位;detail 为 `{ id: string, status: 'dismissing'|'unmounted' }`
5449
+ * @fires action - 操作按钮被按下;detail 为 `{ id: string }`
5450
+ * @csspart item - role=status(error 时 alert)的卡片,承载 data-type / data-tone / data-state / data-paused
5451
+ * @csspart item-indicator - 类型指示符;留空即由皮肤按 data-type 画一枚兜底字形
5452
+ * @csspart item-title - 标题,aria-labelledby 的目标
5453
+ * @csspart item-description - 补充说明,aria-describedby 的目标
5454
+ * @csspart item-action-trigger - 操作按钮:先发 action 再进入退场
5455
+ * @csspart item-close-trigger - 关闭按钮;closable=false 时转原生 disabled 并收起
5456
+ */
5457
+ declare class XhNotificationItemElement extends XhElement {
5458
+ static partContract: {
5459
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "item-indicator" | "group" | "item-title" | "item-description" | "item-action-trigger" | "item-close-trigger">;
5460
+ meta: {
5461
+ component: string;
5462
+ requiredParts: string[];
5463
+ };
5464
+ };
5465
+ static properties: {
5466
+ itemId: {
5467
+ converter: {
5468
+ fromAttribute: (v: string | null) => string | undefined;
5469
+ };
5470
+ attribute: string;
5471
+ };
5472
+ titleText: {
5473
+ converter: {
5474
+ fromAttribute: (v: string | null) => string | undefined;
5475
+ };
5476
+ attribute: string;
5477
+ };
5478
+ description: {
5479
+ converter: {
5480
+ fromAttribute: (v: string | null) => string | undefined;
5481
+ };
5482
+ };
5483
+ type: {
5484
+ converter: {
5485
+ fromAttribute: (v: string | null) => string | undefined;
5486
+ };
5487
+ };
5488
+ duration: {
5489
+ converter: {
5490
+ fromAttribute: (v: string | null) => number | undefined;
5491
+ };
5492
+ };
5493
+ removeDelay: {
5494
+ converter: {
5495
+ fromAttribute: (v: string | null) => number | undefined;
5496
+ };
5497
+ attribute: string;
5498
+ };
5499
+ closable: {
5500
+ converter: {
5501
+ fromAttribute: (v: string | null) => boolean | undefined;
5502
+ };
5503
+ };
5504
+ pauseOnPageIdle: {
5505
+ converter: {
5506
+ fromAttribute: (v: string | null) => boolean | undefined;
5507
+ };
5508
+ attribute: string;
5509
+ };
5510
+ translations: {
5511
+ attribute: boolean;
5512
+ };
5513
+ };
5514
+ itemId?: string;
5515
+ titleText?: string;
5516
+ description?: string;
5517
+ type?: NotificationType;
5518
+ duration?: number;
5519
+ removeDelay?: number;
5520
+ closable?: boolean;
5521
+ pauseOnPageIdle?: boolean;
5522
+ translations?: Partial<NotificationTranslations>;
5523
+ private readonly notifyStatus;
5524
+ private readonly notifyAction;
5525
+ private readonly ctrl;
5526
+ private machineProps;
5527
+ /** 这个部件的文字归不归作者:头一回见到它时定案,之后不再改口。 */
5528
+ private readonly authorOwnsText;
5529
+ /**
5530
+ * 作者没往部件里写内容时,用 props 上的文案填进去。
5531
+ *
5532
+ * 归属只判一次:判完本轮就会把文字写进去,再回读分不清是作者写的还是自己写的,
5533
+ * 从那以后 title 属性改了也再刷不动(Vue 侧是响应式渲染,会跟着改,两侧就此分叉)。
5534
+ */
5535
+ private fillText;
5536
+ protected wire(): void;
5537
+ }
5538
+ //#endregion
5246
5539
  //#region src/elements/number-field.d.ts
5247
5540
  /**
5248
5541
  * `<xh-number-field>` —— Light-DOM 行为宿主:作者写 root/label/input/加减按钮四类角色节点,
@@ -5413,15 +5706,22 @@ declare class XhNumberFieldElement extends XhElement {
5413
5706
  * @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
5414
5707
  * @attr {'sm'|'md'|'lg'} size - 尺寸
5415
5708
  * @fires page-change - 页码变化;detail 为 `{ page: number, pageSize: number }`
5709
+ * @fires page-size-change - 每页条数变化;detail 为 `{ pageSize: number, page: number }`,页码是换算后的
5710
+ * @attr {string} placement - 省略位摊开后的落点,默认 bottom-start
5711
+ * @attr {number} offset - 浮层与省略位之间的间距(px),默认 8
5712
+ * @attr {number} open-delay - 指针停在省略位多久才摊开(ms),默认 200
5713
+ * @attr {number} close-delay - 指针离开后多久收起(ms),默认 300
5714
+ * @attr {number} default-page-size - 非受控初始每页条数,默认 10
5715
+ * @prop {number[]} pageSizeOptions - 可选的每页条数档位,默认 [10, 20, 50, 100]
5416
5716
  * @csspart root - nav 地标,承载 aria-label 与 data-empty
5417
5717
  * @csspart prev-trigger - 上一页;首页时转原生 disabled
5418
5718
  * @csspart next-trigger - 下一页;末页时转原生 disabled
5419
5719
  * @csspart item - 页码按钮,须自带 value 属性;当前页带 aria-current="page" 与 data-current
5420
- * @csspart ellipsis - 折叠掉的那几页的占位,对读屏隐藏
5720
+ * @csspart ellipsis - 折进去那几页的入口,须自带 side 属性(start / end);承载 data-side 与 aria-expanded
5421
5721
  */
5422
5722
  declare class XhPaginationElement extends XhElement {
5423
5723
  static partContract: {
5424
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "ellipsis" | "prev-trigger" | "next-trigger">;
5724
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "ellipsis" | "prev-trigger" | "next-trigger" | "positioner" | "page-size-select">;
5425
5725
  meta: import("@xihan-ui/headless").ComponentMeta;
5426
5726
  };
5427
5727
  static properties: {
@@ -5436,6 +5736,15 @@ declare class XhPaginationElement extends XhElement {
5436
5736
  };
5437
5737
  attribute: string;
5438
5738
  };
5739
+ defaultPageSize: {
5740
+ converter: {
5741
+ fromAttribute: (v: string | null) => number | undefined;
5742
+ };
5743
+ attribute: string;
5744
+ };
5745
+ pageSizeOptions: {
5746
+ attribute: boolean;
5747
+ };
5439
5748
  page: {
5440
5749
  converter: {
5441
5750
  fromAttribute: (v: string | null) => number | undefined;
@@ -5472,9 +5781,33 @@ declare class XhPaginationElement extends XhElement {
5472
5781
  translations: {
5473
5782
  attribute: boolean;
5474
5783
  };
5784
+ placement: {
5785
+ converter: {
5786
+ fromAttribute: (v: string | null) => string | undefined;
5787
+ };
5788
+ };
5789
+ offset: {
5790
+ converter: {
5791
+ fromAttribute: (v: string | null) => number | undefined;
5792
+ };
5793
+ };
5794
+ openDelay: {
5795
+ converter: {
5796
+ fromAttribute: (v: string | null) => number | undefined;
5797
+ };
5798
+ attribute: string;
5799
+ };
5800
+ closeDelay: {
5801
+ converter: {
5802
+ fromAttribute: (v: string | null) => number | undefined;
5803
+ };
5804
+ attribute: string;
5805
+ };
5475
5806
  };
5476
5807
  count?: number;
5477
5808
  pageSize?: number;
5809
+ defaultPageSize?: number;
5810
+ pageSizeOptions?: number[];
5478
5811
  page?: number;
5479
5812
  defaultPage?: number;
5480
5813
  siblingCount?: number;
@@ -5482,10 +5815,34 @@ declare class XhPaginationElement extends XhElement {
5482
5815
  tone?: Tone;
5483
5816
  size?: Size;
5484
5817
  translations?: Partial<PaginationTranslations>;
5818
+ placement?: Placement;
5819
+ offset?: number;
5820
+ openDelay?: number;
5821
+ closeDelay?: number;
5822
+ private readonly idGen;
5823
+ private readonly paginationScope;
5824
+ private readonly positionEngine;
5825
+ private config;
5826
+ /** 退场闸门:收起从跟着展开态走改成跟着 presence 走,退场动画播完才真收。 */
5827
+ private exit;
5485
5828
  private readonly notify;
5829
+ private readonly notifyPageSize;
5486
5830
  private readonly ctrl;
5831
+ /** 折叠页码列表的自绘条:与 content 同级挂在已经 fixed 的 positioner 上 */
5832
+ private readonly bars;
5833
+ private ensureConfig;
5834
+ /** 此刻摊开的是哪个省略位的节点——它是定位锚点。 */
5835
+ private openEllipsisEl;
5836
+ private readonly registerLayer;
5837
+ private injectRefs;
5838
+ /**
5839
+ * 角色节点提前发现一次:常规发现要等首次 updated,那一刻 partMap 还空着,
5840
+ * 引擎挂不上,浮层会停在容器左上角。
5841
+ */
5842
+ connectedCallback(): void;
5487
5843
  private machineProps;
5488
5844
  protected wire(): void;
5845
+ disconnectedCallback(): void;
5489
5846
  }
5490
5847
  //#endregion
5491
5848
  //#region src/elements/password-input.d.ts
@@ -5791,7 +6148,7 @@ declare class XhPinInputElement extends XhElement {
5791
6148
  */
5792
6149
  declare class XhPopoverElement extends XhElement {
5793
6150
  static partContract: {
5794
- anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "arrow">;
6151
+ anatomy: import("@xihan-ui/kernel").Anatomy<"trigger" | "content" | "title" | "description" | "close-trigger" | "positioner" | "arrow">;
5795
6152
  meta: import("@xihan-ui/headless").ComponentMeta;
5796
6153
  };
5797
6154
  static properties: {
@@ -5858,6 +6215,8 @@ declare class XhPopoverElement extends XhElement {
5858
6215
  private exit;
5859
6216
  private readonly notify;
5860
6217
  private readonly ctrl;
6218
+ /** 面板内容的自绘条:与 content 同级挂在已经 fixed 的 positioner 上 */
6219
+ private readonly bars;
5861
6220
  private machineProps;
5862
6221
  private ensureConfig;
5863
6222
  private readonly registerLayer;
@@ -5981,7 +6340,7 @@ declare class XhProgressElement extends XhElement {
5981
6340
  */
5982
6341
  declare class XhRadioGroupElement extends XhElement {
5983
6342
  static partContract: {
5984
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "label" | "item-text" | "hidden-input">;
6343
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "label" | "item-text" | "hidden-input">;
5985
6344
  meta: import("@xihan-ui/headless").ComponentMeta;
5986
6345
  };
5987
6346
  static properties: {
@@ -6191,8 +6550,8 @@ declare class XhRatingElement extends XhElement {
6191
6550
  * 轨道与滑块按所在滚动条的轴向取几何,不必另写。这是挂载时的静态声明:运行期要换轴,换节点。
6192
6551
  *
6193
6552
  * @customElement xh-scroll-area
6194
- * @attr {'auto'|'always'|'scroll'|'hover'} type - 滚动条露面的时机,默认 hover
6195
- * @attr {number} hide-delay - 收起前的等待毫秒(type 为 scroll / hover 时生效),默认 600
6553
+ * @attr {'auto'|'always'|'scroll'|'hover'|'scroll-hover'} type - 滚动条露面的时机,默认 scroll-hover
6554
+ * @attr {number} hide-delay - 收起前的等待毫秒(type 为 scroll / hover / scroll-hover 时生效),默认 600
6196
6555
  * @attr {'horizontal'|'vertical'|'both'} orientation - 哪几条轴归本组件管,默认 both
6197
6556
  * @attr {'sm'|'md'|'lg'} size - 尺寸档,换的是滚动条厚度
6198
6557
  * @attr {'ltr'|'rtl'} dir - 排版方向,只改写横轴的滚动量正负与指针位移方向
@@ -6207,7 +6566,7 @@ declare class XhRatingElement extends XhElement {
6207
6566
  */
6208
6567
  declare class XhScrollAreaElement extends XhElement {
6209
6568
  static partContract: {
6210
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "viewport" | "content" | "scrollbar">;
6569
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "viewport" | "scrollbar">;
6211
6570
  meta: import("@xihan-ui/headless").ComponentMeta;
6212
6571
  delegates: import("@xihan-ui/kernel").Anatomy<"root" | "track" | "thumb" | "corner">[];
6213
6572
  };
@@ -6288,8 +6647,8 @@ declare class XhScrollAreaElement extends XhElement {
6288
6647
  * @customElement xh-scrollbar
6289
6648
  * @attr {string} controls - 滚动容器的 id;没设 scrollable 属性时按它查节点,focusable 时同时落到 aria-controls
6290
6649
  * @attr {'horizontal'|'vertical'} orientation - 这条滚动条管哪条轴,默认 vertical
6291
- * @attr {'auto'|'always'|'scroll'|'hover'} type - 露面的时机,默认 hover
6292
- * @attr {number} hide-delay - 收起前的等待毫秒(type 为 scroll / hover 时生效),默认 600
6650
+ * @attr {'auto'|'always'|'scroll'|'hover'|'scroll-hover'} type - 露面的时机,默认 scroll-hover
6651
+ * @attr {number} hide-delay - 收起前的等待毫秒(type 为 scroll / hover / scroll-hover 时生效),默认 600
6293
6652
  * @attr {number} min-thumb-size - 滑块最短多少像素,默认 20
6294
6653
  * @attr {number} step - 方向键一步滚多少像素,默认 40
6295
6654
  * @attr {'sm'|'md'|'lg'} size - 尺寸档,换的是滚动条厚度
@@ -6445,7 +6804,7 @@ declare class XhScrollbarElement extends XhElement {
6445
6804
  */
6446
6805
  declare class XhSegmentedElement extends XhElement {
6447
6806
  static partContract: {
6448
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "item-text" | "hidden-input">;
6807
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "item-text" | "hidden-input">;
6449
6808
  meta: import("@xihan-ui/headless").ComponentMeta;
6450
6809
  };
6451
6810
  static properties: {
@@ -6607,7 +6966,7 @@ declare class XhSegmentedElement extends XhElement {
6607
6966
  */
6608
6967
  declare class XhSelectElement extends XhElement {
6609
6968
  static partContract: {
6610
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "list" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "value-text" | "item-delete-trigger" | "footer" | "tag" | "hidden-select">;
6969
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "trigger" | "content" | "list" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "value-text" | "item-delete-trigger" | "footer" | "tag" | "hidden-select">;
6611
6970
  meta: import("@xihan-ui/headless").ComponentMeta;
6612
6971
  };
6613
6972
  static properties: {
@@ -7251,7 +7610,8 @@ declare class XhSliderElement extends XhElement {
7251
7610
  * 根上不写 role:容器只做排布,里面装的是列表还是一组按钮由作者自己声明。
7252
7611
  *
7253
7612
  * @customElement xh-space
7254
- * @attr {'horizontal'|'vertical'} direction - 排布方向,缺省 horizontal
7613
+ * @attr {'horizontal'|'vertical'} orientation - 排布方向,缺省 horizontal
7614
+ * @attr {'horizontal'|'vertical'} direction - 排布方向的旧写法,两个都写时以 orientation 为准
7255
7615
  * @attr {'xs'|'sm'|'md'|'lg'|'xl'} gap - 子项间距档位,缺省 md,逐档对应一个间距令牌
7256
7616
  * @attr {'start'|'center'|'end'|'stretch'|'baseline'} align - 交叉轴对齐
7257
7617
  * @attr {'start'|'center'|'end'|'between'|'around'|'evenly'} justify - 主轴分布
@@ -7266,6 +7626,11 @@ declare class XhSpaceElement extends XhElement {
7266
7626
  meta: import("@xihan-ui/headless").ComponentMeta;
7267
7627
  };
7268
7628
  static properties: {
7629
+ orientation: {
7630
+ converter: {
7631
+ fromAttribute: (v: string | null) => string | undefined;
7632
+ };
7633
+ };
7269
7634
  direction: {
7270
7635
  converter: {
7271
7636
  fromAttribute: (v: string | null) => string | undefined;
@@ -7297,6 +7662,7 @@ declare class XhSpaceElement extends XhElement {
7297
7662
  };
7298
7663
  };
7299
7664
  };
7665
+ orientation?: SpaceProps['orientation'];
7300
7666
  direction?: SpaceProps['direction'];
7301
7667
  gap?: SpaceProps['gap'];
7302
7668
  align?: SpaceProps['align'];
@@ -7490,7 +7856,7 @@ declare class XhSplitterElement extends XhElement {
7490
7856
  */
7491
7857
  declare class XhStepsElement extends XhElement {
7492
7858
  static partContract: {
7493
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "title" | "description" | "list" | "separator">;
7859
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "trigger" | "content" | "title" | "description" | "list" | "separator">;
7494
7860
  meta: import("@xihan-ui/headless").ComponentMeta;
7495
7861
  };
7496
7862
  static properties: {
@@ -7680,6 +8046,9 @@ declare class XhSwitchElement extends XhElement {
7680
8046
  * @attr {'ltr'|'rtl'} dir - 文字方向,只对调左右方向键的展开/收起语义,默认 ltr
7681
8047
  * @attr {'sm'|'md'|'lg'} size - 密度:只换单元格的纵向内边距与字号,列宽不受影响
7682
8048
  * @fires sort-change - 排序链变化;detail 为 `{ value: { id, direction }[] }`
8049
+ * @fires column-preference-change - 列偏好变化;detail 为 `{ value: TableColumnPreference }`
8050
+ * @prop {TableColumnPreference} columnPreference - 列偏好(显隐/顺序/宽/冻结),给定即受控
8051
+ * @prop {TableColumnKind[]} prefixColumns - 要哪几列前缀列,按给定顺序插在最前面
7683
8052
  * @fires selection-change - 选中集合变化;detail 为 `{ value: string[] | 'all' }`
7684
8053
  * @fires expanded-change - 展开集合变化;detail 为 `{ value: string[] }`
7685
8054
  * @csspart root - role=grid 容器(rows 里有可展开的行时为 treegrid),报行列总数与多选声明
@@ -7734,6 +8103,26 @@ declare class XhTableElement extends XhElement {
7734
8103
  };
7735
8104
  attribute: string;
7736
8105
  };
8106
+ prefixColumns: {
8107
+ attribute: boolean;
8108
+ };
8109
+ columnPreference: {
8110
+ attribute: boolean;
8111
+ };
8112
+ defaultColumnPreference: {
8113
+ attribute: boolean;
8114
+ };
8115
+ page: {
8116
+ converter: {
8117
+ fromAttribute: (v: string | null) => number | undefined;
8118
+ };
8119
+ };
8120
+ pageSize: {
8121
+ converter: {
8122
+ fromAttribute: (v: string | null) => number | undefined;
8123
+ };
8124
+ attribute: string;
8125
+ };
7737
8126
  loading: {
7738
8127
  type: BooleanConstructor;
7739
8128
  };
@@ -7784,6 +8173,11 @@ declare class XhTableElement extends XhElement {
7784
8173
  expanded?: string[];
7785
8174
  defaultExpanded?: string[];
7786
8175
  selectionMode?: TableSelectionMode;
8176
+ prefixColumns?: TableColumnKind[];
8177
+ columnPreference?: TableColumnPreference;
8178
+ defaultColumnPreference?: TableColumnPreference;
8179
+ page?: number;
8180
+ pageSize?: number;
7787
8181
  loading?: boolean;
7788
8182
  empty?: boolean;
7789
8183
  stickyHeader?: boolean;
@@ -7794,6 +8188,7 @@ declare class XhTableElement extends XhElement {
7794
8188
  loop?: boolean;
7795
8189
  direction?: Direction;
7796
8190
  size?: Size;
8191
+ private readonly notifyColumnPreference;
7797
8192
  private readonly notifySort;
7798
8193
  private readonly notifySelection;
7799
8194
  private readonly notifyExpanded;
@@ -7836,7 +8231,7 @@ declare class XhTableElement extends XhElement {
7836
8231
  */
7837
8232
  declare class XhTabsElement extends XhElement {
7838
8233
  static partContract: {
7839
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "list">;
8234
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "trigger" | "content" | "list">;
7840
8235
  meta: import("@xihan-ui/headless").ComponentMeta;
7841
8236
  };
7842
8237
  static properties: {
@@ -8338,7 +8733,7 @@ declare class XhTextFieldElement extends XhElement {
8338
8733
  */
8339
8734
  declare class XhThreadElement extends XhElement {
8340
8735
  static partContract: {
8341
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "viewport" | "content" | "scroll-button" | "live-region">;
8736
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "viewport" | "scroll-button" | "live-region">;
8342
8737
  meta: import("@xihan-ui/headless").ComponentMeta;
8343
8738
  };
8344
8739
  static properties: {
@@ -8411,7 +8806,7 @@ declare class XhThreadElement extends XhElement {
8411
8806
  */
8412
8807
  declare class XhTimeFieldElement extends XhElement {
8413
8808
  static partContract: {
8414
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment-group" | "segment">;
8809
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment" | "segment-group">;
8415
8810
  meta: import("@xihan-ui/headless").ComponentMeta;
8416
8811
  };
8417
8812
  static properties: {
@@ -8585,7 +8980,7 @@ declare class XhTimeFieldElement extends XhElement {
8585
8980
  */
8586
8981
  declare class XhTimePickerElement extends XhElement {
8587
8982
  static partContract: {
8588
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "input" | "column" | "hidden-input" | "segment-group" | "preset" | "presets">;
8983
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "trigger" | "content" | "label" | "control" | "positioner" | "clear-trigger" | "input" | "column" | "hidden-input" | "segment-group" | "presets" | "preset">;
8589
8984
  meta: import("@xihan-ui/headless").ComponentMeta;
8590
8985
  };
8591
8986
  static properties: {
@@ -8843,20 +9238,19 @@ declare class XhTimerElement extends XhElement {
8843
9238
  //#endregion
8844
9239
  //#region src/elements/toast.d.ts
8845
9240
  /**
8846
- * `<xh-toast>` —— Light-DOM 行为宿主:作者写 root/title/description/action-trigger/close-trigger
9241
+ * `<xh-toast>` —— Light-DOM 行为宿主:作者写 root/title/action-trigger/close-trigger
8847
9242
  * 角色节点,元素跑 toast 机器并把 connect 产出打上去。
8848
9243
  *
8849
9244
  * root 承载 role 与 aria-live:默认 status + polite(排队等读屏的空隙),
8850
- * type="error" 换成 alert + assertive(打断当前朗读)。指针停在通知上、
8851
- * 或焦点落进通知内部都会把倒计时按住,离开才接着走剩下的那一段。
9245
+ * type="error" 换成 alert + assertive(打断当前朗读)。指针停在条子上、
9246
+ * 或焦点落进条子内部都会把倒计时按住,离开才接着走剩下的那一段。
8852
9247
  *
8853
9248
  * 退场窗口走完只把 root 收起、不删节点:作者写在里面的内容归作者,
8854
- * 什么时候把这条从队列里删掉是 `<xh-toaster>` 的事(它收本元素冒泡上去的 status-change)。
9249
+ * 什么时候把这条从队列里删掉是全局服务的事(它收本元素冒泡上去的 status-change)。
8855
9250
  *
8856
9251
  * @customElement xh-toast
8857
- * @attr {string} id - 队列身份,`<xh-toaster>` 按它寻址;不给就用实例自己的 scope id
9252
+ * @attr {string} id - 队列身份,全局服务按它寻址;不给就用实例自己的 scope id
8858
9253
  * @attr {string} title - 标题文案;作者没在 title 部件里写内容时由元素填入
8859
- * @attr {string} description - 补充说明;作者没在 description 部件里写内容时由元素填入
8860
9254
  * @attr {'info'|'success'|'warning'|'error'|'loading'} type - 语气,默认 info;loading 不自动消失
8861
9255
  * @attr {number} duration - 停留毫秒,默认 5000;<=0 即关掉自动消失
8862
9256
  * @attr {number} remove-delay - 退场窗口毫秒,默认 200,留给退场动画
@@ -8866,13 +9260,12 @@ declare class XhTimerElement extends XhElement {
8866
9260
  * @fires action - 操作按钮被按下;detail 为 `{ id: string }`
8867
9261
  * @csspart root - role=status(error 时 alert)的容器,承载 data-type / data-tone / data-state / data-paused
8868
9262
  * @csspart title - 标题,aria-labelledby 的目标
8869
- * @csspart description - 补充说明,aria-describedby 的目标
8870
9263
  * @csspart action-trigger - 操作按钮:先发 action 再进入退场
8871
9264
  * @csspart close-trigger - 关闭按钮;closable=false 时转原生 disabled 并收起
8872
9265
  */
8873
9266
  declare class XhToastElement extends XhElement {
8874
9267
  static partContract: {
8875
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "title" | "description" | "close-trigger" | "action-trigger">;
9268
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "title" | "close-trigger" | "group" | "action-trigger">;
8876
9269
  meta: import("@xihan-ui/headless").ComponentMeta;
8877
9270
  };
8878
9271
  static properties: {
@@ -8888,11 +9281,6 @@ declare class XhToastElement extends XhElement {
8888
9281
  };
8889
9282
  attribute: string;
8890
9283
  };
8891
- description: {
8892
- converter: {
8893
- fromAttribute: (v: string | null) => string | undefined;
8894
- };
8895
- };
8896
9284
  type: {
8897
9285
  converter: {
8898
9286
  fromAttribute: (v: string | null) => string | undefined;
@@ -8926,7 +9314,6 @@ declare class XhToastElement extends XhElement {
8926
9314
  };
8927
9315
  toastId?: string;
8928
9316
  titleText?: string;
8929
- description?: string;
8930
9317
  type?: ToastType;
8931
9318
  duration?: number;
8932
9319
  removeDelay?: number;
@@ -8949,118 +9336,6 @@ declare class XhToastElement extends XhElement {
8949
9336
  protected wire(): void;
8950
9337
  }
8951
9338
  //#endregion
8952
- //#region src/elements/toaster.d.ts
8953
- /**
8954
- * `<xh-toaster>` —— Light-DOM 行为宿主:作者写 root 与若干 group 角色节点,
8955
- * 元素跑 toaster 机器并把 connect 产出打上去。每个 group 用 `placement` 属性声明自己是哪个位置,
8956
- * 不写就落在 toaster 的 placement 上。
8957
- *
8958
- * 单条通知的节点由作者按队列渲染(读 `visibleToasts` 或听 `toasts-change`),元素不替作者生成:
8959
- * 生成节点就等于收走模板控制权,图标、进度条、i18n 文案都再塞不进来。
8960
- * 每条渲染成一个 `<xh-toast>`,它走完退场会冒泡一条 status-change,本元素据此把记录删掉。
8961
- *
8962
- * @customElement xh-toaster
8963
- * @attr {'top-start'|'top'|'top-end'|'middle-start'|'middle'|'middle-end'|'bottom-start'|'bottom'|'bottom-end'} placement - 默认落位,默认 bottom-end
8964
- * @attr {number} max - 每个位置最多同时留几条,超出挤掉最旧的;不给即不限
8965
- * @attr {number} gap - 同一摞内的间距(px),默认 16
8966
- * @attr {number} duration - 单条没写 duration 时的默认停留毫秒
8967
- * @attr {number} remove-delay - 单条没写 remove-delay 时的默认退场窗口毫秒
8968
- * @attr {boolean} pause-on-page-idle - 页面切到后台时按住计时,逐条下发
8969
- * @fires toasts-change - 队列变化;detail 为 `{ toasts: ToastRecord[] }`
8970
- * @csspart root - role=region 的地标容器,承载 data-count / data-empty
8971
- * @csspart group - 某一个位置上的那一摞,可自带 placement 属性;承载 data-placement / data-count / data-empty 与间距
8972
- */
8973
- declare class XhToasterElement extends XhElement {
8974
- static partContract: {
8975
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "group">;
8976
- meta: import("@xihan-ui/headless").ComponentMeta;
8977
- };
8978
- static properties: {
8979
- toasts: {
8980
- attribute: boolean;
8981
- };
8982
- defaultToasts: {
8983
- attribute: boolean;
8984
- };
8985
- placement: {
8986
- converter: {
8987
- fromAttribute: (v: string | null) => string | undefined;
8988
- };
8989
- };
8990
- max: {
8991
- converter: {
8992
- fromAttribute: (v: string | null) => number | undefined;
8993
- };
8994
- };
8995
- gap: {
8996
- converter: {
8997
- fromAttribute: (v: string | null) => number | undefined;
8998
- };
8999
- };
9000
- duration: {
9001
- converter: {
9002
- fromAttribute: (v: string | null) => number | undefined;
9003
- };
9004
- };
9005
- removeDelay: {
9006
- converter: {
9007
- fromAttribute: (v: string | null) => number | undefined;
9008
- };
9009
- attribute: string;
9010
- };
9011
- pauseOnPageIdle: {
9012
- converter: {
9013
- fromAttribute: (v: string | null) => boolean | undefined;
9014
- };
9015
- attribute: string;
9016
- };
9017
- translations: {
9018
- attribute: boolean;
9019
- };
9020
- };
9021
- toasts?: ToastRecord[];
9022
- defaultToasts?: ToastRecord[];
9023
- placement?: ToastPlacement;
9024
- max?: number;
9025
- gap?: number;
9026
- duration?: number;
9027
- removeDelay?: number;
9028
- pauseOnPageIdle?: boolean;
9029
- translations?: Partial<ToasterTranslations>;
9030
- private readonly notify;
9031
- private readonly ctrl;
9032
- private machineProps;
9033
- /**
9034
- * 命令式入口共用的取法。机器要到进文档(hostConnected)才建:
9035
- * 还没进文档就发通知是调用方的时序问题,明说好过把这条通知静默丢掉。
9036
- */
9037
- private commands;
9038
- /** 入队并返回 id;同 id 已存在则就地改写,位置不动(loading 转 success 走的就是这条)。 */
9039
- create(options?: ToastOptions): string;
9040
- /**
9041
- * 刻意不叫 `update`:那是 Lit 自己的渲染生命周期钩子,占用它会让宿主每次重渲
9042
- * 都拐进这里来(还带着一个 changedProperties 当 id),组件当场不工作。
9043
- * Vue 侧没有这层基类,composable 上仍叫 `update`。
9044
- */
9045
- updateToast(id: string, options: Partial<ToastOptions>): void;
9046
- dismiss(id: string): void;
9047
- dismissAll(): void;
9048
- /** max 之内、按加入先后排列的可见条目,已补齐默认值,可直接摊给 `<xh-toast>`。 */
9049
- get visibleToasts(): ResolvedToast[];
9050
- /** 当前有条目的位置,按九宫格固定顺序。 */
9051
- get placements(): ToastPlacement[];
9052
- get count(): number;
9053
- getToastsByPlacement(placement: ToastPlacement): ResolvedToast[];
9054
- /**
9055
- * 单条通知走完退场会冒泡上来:记录该从队列里删掉了。
9056
- * 认元素名而不是只认事件名——avatar 之类的部件也派 status-change,且完全可能就摆在通知内部。
9057
- */
9058
- private readonly onToastStatus;
9059
- connectedCallback(): void;
9060
- disconnectedCallback(): void;
9061
- protected wire(): void;
9062
- }
9063
- //#endregion
9064
9339
  //#region src/elements/toggle.d.ts
9065
9340
  /**
9066
9341
  * `<xh-toggle>` —— Light-DOM 行为宿主,跑 toggle 机器并把 connect 产出打到 root 角色节点。
@@ -9126,6 +9401,7 @@ declare class XhToggleElement extends XhElement {
9126
9401
  * @attr {boolean} multiple - 允许多项同时选中,默认关闭
9127
9402
  * @attr {boolean} disabled - 整组禁用
9128
9403
  * @attr {boolean} disallow-empty - 不许把值点空(最后一个选中项摘不掉)
9404
+ * @attr {'sm'|'md'|'lg'} size - 尺寸
9129
9405
  * @attr {'horizontal'|'vertical'} orientation - 视觉排布,默认 horizontal;方向键四个恒响应,与它无关
9130
9406
  * @attr {'ltr'|'rtl'} dir - 文字方向,只改写左右方向键语义,默认 ltr
9131
9407
  * @attr {boolean} loop - 方向键走到尽头回绕,默认开启
@@ -9170,6 +9446,11 @@ declare class XhToggleGroupElement extends XhElement {
9170
9446
  };
9171
9447
  attribute: string;
9172
9448
  };
9449
+ size: {
9450
+ converter: {
9451
+ fromAttribute: (v: string | null) => string | undefined;
9452
+ };
9453
+ };
9173
9454
  orientation: {
9174
9455
  converter: {
9175
9456
  fromAttribute: (v: string | null) => string | undefined;
@@ -9199,6 +9480,7 @@ declare class XhToggleGroupElement extends XhElement {
9199
9480
  multiple?: boolean;
9200
9481
  disabled?: boolean;
9201
9482
  disallowEmpty?: boolean;
9483
+ size?: Size;
9202
9484
  orientation?: Orientation;
9203
9485
  direction?: Direction;
9204
9486
  loop?: boolean;
@@ -9324,7 +9606,7 @@ declare class XhToolbarElement extends XhElement {
9324
9606
  */
9325
9607
  declare class XhTooltipElement extends XhElement {
9326
9608
  static partContract: {
9327
- anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "positioner" | "arrow">;
9609
+ anatomy: import("@xihan-ui/kernel").Anatomy<"trigger" | "content" | "positioner" | "arrow">;
9328
9610
  meta: import("@xihan-ui/headless").ComponentMeta;
9329
9611
  };
9330
9612
  /** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
@@ -9691,7 +9973,9 @@ declare class XhTransferElement extends XhElement {
9691
9973
  * 树数据与展开/选中集合都是数组,属性表达不了,只能走 property(`el.collection = [...]`)。
9692
9974
  *
9693
9975
  * @customElement xh-tree
9694
- * @attr {'single'|'multiple'} selection-mode - 选择模式,默认 single
9976
+ * @attr {boolean} multiple - 复选,默认关闭
9977
+ * @attr {'horizontal'|'vertical'} leaf-orientation - 末端那一层怎么排,默认 vertical;horizontal 让子节点全是叶子的那层并排铺开
9978
+ * @attr {'single'|'multiple'} selection-mode - 选择模式的旧写法,默认 single;与 multiple 同时给时以它为准
9695
9979
  * @attr {boolean} cascade - multiple 下父子级联勾选(整枝传导/半选/禁用冻结),默认 false
9696
9980
  * @attr {string} checked-strategy - 级联下对外值的收敛策略:child(默认)/ parent / all
9697
9981
  * @attr {boolean} expand-on-click - 点分支行顺带展开/收起,默认开;写 expand-on-click="false" 关掉
@@ -9737,6 +10021,17 @@ declare class XhTreeElement extends XhElement {
9737
10021
  defaultSelection: {
9738
10022
  attribute: boolean;
9739
10023
  };
10024
+ multiple: {
10025
+ converter: {
10026
+ fromAttribute: (v: string | null) => boolean | undefined;
10027
+ };
10028
+ };
10029
+ leafOrientation: {
10030
+ converter: {
10031
+ fromAttribute: (v: string | null) => string | undefined;
10032
+ };
10033
+ attribute: string;
10034
+ };
9740
10035
  selectionMode: {
9741
10036
  converter: {
9742
10037
  fromAttribute: (v: string | null) => string | undefined;
@@ -9783,6 +10078,8 @@ declare class XhTreeElement extends XhElement {
9783
10078
  defaultExpandedValue?: string[];
9784
10079
  selection?: string[];
9785
10080
  defaultSelection?: string[];
10081
+ multiple?: boolean;
10082
+ leafOrientation?: Orientation;
9786
10083
  selectionMode?: TreeSelectionMode;
9787
10084
  cascade?: boolean;
9788
10085
  checkedStrategy?: TreeSchema['props']['checkedStrategy'];
@@ -9872,7 +10169,7 @@ declare class XhTreeElement extends XhElement {
9872
10169
  */
9873
10170
  declare class XhTreeSelectElement extends XhElement {
9874
10171
  static partContract: {
9875
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "value-text" | "hidden-input" | "tree" | "branch" | "branch-control" | "branch-trigger" | "branch-indicator" | "branch-text" | "branch-content">;
10172
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "item" | "trigger" | "content" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "value-text" | "hidden-input" | "tree" | "branch" | "branch-control" | "branch-trigger" | "branch-indicator" | "branch-text" | "branch-content">;
9876
10173
  meta: import("@xihan-ui/headless").ComponentMeta;
9877
10174
  };
9878
10175
  static properties: {
@@ -10017,6 +10314,12 @@ declare class XhTreeSelectElement extends XhElement {
10017
10314
  private readonly notifyExpanded;
10018
10315
  private readonly notifyOpen;
10019
10316
  private readonly ctrl;
10317
+ /**
10318
+ * 树的自绘条:与 content 同级挂在已经 fixed 的 positioner 上。
10319
+ * 两条轴都摆——深层节点靠缩进往行末推,横向溢出与纵向一样是常态;
10320
+ * 横条的正负按排版方向算,而组件不读计算样式,把作者写的那份显式交过去。
10321
+ */
10322
+ private readonly bars;
10020
10323
  private machineProps;
10021
10324
  private ensureConfig;
10022
10325
  private readonly registerLayer;
@@ -10071,7 +10374,7 @@ declare class XhTreeSelectElement extends XhElement {
10071
10374
  */
10072
10375
  declare class XhVirtualizerElement extends XhElement {
10073
10376
  static partContract: {
10074
- anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "viewport" | "content">;
10377
+ anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "viewport">;
10075
10378
  meta: import("@xihan-ui/headless").ComponentMeta;
10076
10379
  };
10077
10380
  static properties: {
@@ -10167,5 +10470,5 @@ declare class XhVirtualizerElement extends XhElement {
10167
10470
  //#region src/define.d.ts
10168
10471
  declare function defineXhElements(): void;
10169
10472
  //#endregion
10170
- export { XhAccordionElement, XhAlertElement, XhAnchorElement, XhAvatarElement, XhBadgeElement, XhBreadcrumbElement, XhButtonElement, XhCalendarElement, XhCarouselElement, XhCascaderElement, XhCheckboxElement, XhCheckboxGroupElement, XhClipboardElement, XhCodeBlockElement, XhCollapsibleElement, XhColorPickerElement, XhComboboxElement, XhComposerElement, XhConfigElement, XhContextMenuElement, XhDateFieldElement, XhDatePickerElement, XhDialogElement, XhDownloadTriggerElement, XhDrawerElement, XhEditableElement, XhEmptyStateElement, XhFieldElement, XhFieldsetElement, XhFileUploadElement, XhFloatingPanelElement, XhFormElement, XhHeatmapElement, XhHotkeysElement, XhHoverCardElement, XhIconElement, XhImageCropperElement, XhImageElement, XhImageViewerElement, XhJsonViewerElement, XhListboxElement, XhLoadingBarElement, XhMasonryElement, XhMenuElement, XhMenubarElement, XhNavigationMenuElement, XhNumberFieldElement, XhPaginationElement, XhPasswordInputElement, XhPinInputElement, XhPopoverElement, XhProgressElement, XhRadioGroupElement, XhRatingElement, XhScrollAreaElement, XhScrollbarElement, XhSegmentedElement, XhSelectElement, XhSeparatorElement, XhSideNavElement, XhSignaturePadElement, XhSkeletonElement, XhSliderElement, XhSpaceElement, XhSpinnerElement, XhSplitterElement, XhStepsElement, XhSwitchElement, XhTableElement, XhTabsElement, XhTagElement, XhTagsInputElement, XhTextFieldElement, XhThreadElement, XhTimeFieldElement, XhTimePickerElement, XhTimerElement, XhToastElement, XhToasterElement, XhToggleElement, XhToggleGroupElement, XhToolbarElement, XhTooltipElement, XhTourElement, XhTransferElement, XhTreeElement, XhTreeSelectElement, XhVirtualizerElement, defineXhElements };
10473
+ export { XhAccordionElement, XhAlertElement, XhAnchorElement, XhAvatarElement, XhBadgeElement, XhBreadcrumbElement, XhButtonElement, XhCalendarElement, XhCarouselElement, XhCascaderElement, XhCheckboxElement, XhCheckboxGroupElement, XhClipboardElement, XhCodeBlockElement, XhCollapsibleElement, XhColorPickerElement, XhComboboxElement, XhComposerElement, XhConfigElement, XhContextMenuElement, XhDateFieldElement, XhDatePickerElement, XhDialogElement, XhDownloadTriggerElement, XhDrawerElement, XhEditableElement, XhEmptyStateElement, XhFieldElement, XhFieldsetElement, XhFileUploadElement, XhFloatingPanelElement, XhFormElement, XhHeatmapElement, XhHotkeysElement, XhHoverCardElement, XhIconElement, XhImageCropperElement, XhImageElement, XhImageViewerElement, XhJsonViewerElement, XhListboxElement, XhLoadingBarElement, XhMasonryElement, XhMenuElement, XhMenubarElement, XhNavigationMenuElement, XhNotificationElement, XhNotificationItemElement, XhNumberFieldElement, XhPaginationElement, XhPasswordInputElement, XhPinInputElement, XhPopoverElement, XhProgressElement, XhRadioGroupElement, XhRatingElement, XhScrollAreaElement, XhScrollbarElement, XhSegmentedElement, XhSelectElement, XhSeparatorElement, XhSideNavElement, XhSignaturePadElement, XhSkeletonElement, XhSliderElement, XhSpaceElement, XhSpinnerElement, XhSplitterElement, XhStepsElement, XhSwitchElement, XhTableElement, XhTabsElement, XhTagElement, XhTagsInputElement, XhTextFieldElement, XhThreadElement, XhTimeFieldElement, XhTimePickerElement, XhTimerElement, XhToastElement, XhToggleElement, XhToggleGroupElement, XhToolbarElement, XhTooltipElement, XhTourElement, XhTransferElement, XhTreeElement, XhTreeSelectElement, XhVirtualizerElement, defineXhElements };
10171
10474
  //# sourceMappingURL=define.d.ts.map