vane-waterfall 2.0.2 → 2.0.3

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 (102) hide show
  1. package/dist/chunks/doc-BAhVW3g8.js +150 -0
  2. package/dist/chunks/{doc-BXaJl1By.js → doc-BU0CKW63.js} +64 -35
  3. package/dist/chunks/{doc-D_ozEn0Q.js → doc-BrEd0oZB.js} +41 -32
  4. package/dist/chunks/{doc-bTHwfIVb.js → doc-Bud0hbaz.js} +39 -25
  5. package/dist/chunks/{doc-DukOmDCo.js → doc-C-B3zK2o.js} +52 -23
  6. package/dist/chunks/{doc-DElLNjIc.js → doc-C206ZwYC.js} +33 -24
  7. package/dist/chunks/{doc-BSnWbrkH.js → doc-C2L8kkeI.js} +49 -25
  8. package/dist/chunks/{doc-a0MK2S3n.js → doc-CE1DGMBV.js} +62 -38
  9. package/dist/chunks/{doc-BXSy2aPP.js → doc-CHbQXLwY.js} +33 -19
  10. package/dist/chunks/{doc-BfWnfTst.js → doc-CInpKZNU.js} +38 -24
  11. package/dist/chunks/{doc-gTAsLjVx.js → doc-CYxwSuG6.js} +30 -16
  12. package/dist/chunks/{doc-DzvTrZ13.js → doc-CaJ02INP.js} +25 -16
  13. package/dist/chunks/{doc-BXElhF2h.js → doc-CiCso5Ti.js} +44 -30
  14. package/dist/chunks/{doc-BCmEnh39.js → doc-CkuMr8Ca.js} +49 -25
  15. package/dist/chunks/{doc-3Fpag2G8.js → doc-D7m1OFCW.js} +38 -24
  16. package/dist/chunks/doc-DEN2WTDh.js +153 -0
  17. package/dist/chunks/{doc-C5xrHNoC.js → doc-DhICh9S2.js} +37 -23
  18. package/dist/chunks/{doc-DAieSXLy.js → doc-DlJICsyN.js} +41 -27
  19. package/dist/chunks/{doc-CN4edvn_.js → doc-DtxS1-P0.js} +32 -23
  20. package/dist/chunks/{doc-BIzjYAZW.js → doc-DudYCn_-.js} +25 -16
  21. package/dist/chunks/{doc-BmoijI6q.js → doc-HoyAFR_m.js} +43 -24
  22. package/dist/chunks/doc-RlBMCMNs.js +170 -0
  23. package/dist/chunks/doc-RwKQqySd.js +102 -0
  24. package/dist/chunks/{doc-CTUoMe7o.js → doc-eYhNJy97.js} +31 -22
  25. package/dist/chunks/{doc-CcPFavOs.js → doc-i6FY1We1.js} +27 -13
  26. package/dist/chunks/doc-skPl6ZMP.js +101 -0
  27. package/dist/chunks/index-8gEIzUxi.js +15 -0
  28. package/dist/chunks/index-B96I5CKE.js +21 -0
  29. package/dist/chunks/index-Bjmhy8jW.js +11 -0
  30. package/dist/chunks/index-Cuq0ofv-.js +13 -0
  31. package/dist/chunks/{index-BAWlVYr3.js → index-Cz4YEqRF.js} +1 -1
  32. package/dist/chunks/{index-CF0tYRop.js → index-FBJVUYmH.js} +1 -1
  33. package/dist/chunks/withPlugins-BOeDFhof.js +743 -0
  34. package/dist/custom-plugins/A11yPlugin/doc.json.d.ts +64 -40
  35. package/dist/custom-plugins/A11yPlugin/index.js +1 -1
  36. package/dist/custom-plugins/AlignmentPlugin/doc.json.d.ts +42 -28
  37. package/dist/custom-plugins/AlignmentPlugin/index.js +1 -1
  38. package/dist/custom-plugins/AutoColumnPlugin/doc.json.d.ts +53 -44
  39. package/dist/custom-plugins/AutoColumnPlugin/index.js +1 -1
  40. package/dist/custom-plugins/BookmarkPlugin/doc.json.d.ts +44 -35
  41. package/dist/custom-plugins/BookmarkPlugin/index.js +1 -1
  42. package/dist/custom-plugins/ClickAnalyticsPlugin/doc.json.d.ts +29 -0
  43. package/dist/custom-plugins/ClickAnalyticsPlugin/index.js +1 -1
  44. package/dist/custom-plugins/DebounceLayoutPlugin/doc.json.d.ts +37 -28
  45. package/dist/custom-plugins/DebounceLayoutPlugin/index.js +1 -1
  46. package/dist/custom-plugins/DragReorderPlugin/doc.json.d.ts +14 -0
  47. package/dist/custom-plugins/DragReorderPlugin/index.js +1 -1
  48. package/dist/custom-plugins/FilterPlugin/doc.json.d.ts +53 -39
  49. package/dist/custom-plugins/FilterPlugin/index.js +1 -1
  50. package/dist/custom-plugins/FixedHeightPlugin/doc.json.d.ts +42 -28
  51. package/dist/custom-plugins/FixedHeightPlugin/index.js +1 -1
  52. package/dist/custom-plugins/GapPlugin/doc.json.d.ts +61 -37
  53. package/dist/custom-plugins/GapPlugin/index.js +1 -1
  54. package/dist/custom-plugins/GroupingPlugin/doc.json.d.ts +61 -32
  55. package/dist/custom-plugins/GroupingPlugin/index.js +1 -1
  56. package/dist/custom-plugins/HeatmapAnalyticsPlugin/doc.json.d.ts +24 -0
  57. package/dist/custom-plugins/HeatmapAnalyticsPlugin/index.js +1 -1
  58. package/dist/custom-plugins/InfiniteScrollPlugin/doc.json.d.ts +55 -36
  59. package/dist/custom-plugins/InfiniteScrollPlugin/index.js +1 -1
  60. package/dist/custom-plugins/PaginationPlugin/doc.json.d.ts +56 -42
  61. package/dist/custom-plugins/PaginationPlugin/index.js +1 -1
  62. package/dist/custom-plugins/PinItemPlugin/doc.json.d.ts +49 -35
  63. package/dist/custom-plugins/PinItemPlugin/index.js +1 -1
  64. package/dist/custom-plugins/RecyclePlugin/doc.json.d.ts +57 -28
  65. package/dist/custom-plugins/RecyclePlugin/index.js +1 -1
  66. package/dist/custom-plugins/ReducedMotionPlugin/doc.json.d.ts +29 -0
  67. package/dist/custom-plugins/ReducedMotionPlugin/index.js +1 -1
  68. package/dist/custom-plugins/ResponsiveColumnsPlugin/doc.json.d.ts +40 -31
  69. package/dist/custom-plugins/ResponsiveColumnsPlugin/index.js +1 -1
  70. package/dist/custom-plugins/ScrollAnchorPlugin/doc.json.d.ts +42 -28
  71. package/dist/custom-plugins/ScrollAnchorPlugin/index.js +1 -1
  72. package/dist/custom-plugins/SearchPlugin/doc.json.d.ts +53 -39
  73. package/dist/custom-plugins/SearchPlugin/index.js +1 -1
  74. package/dist/custom-plugins/SortPlugin/doc.json.d.ts +52 -38
  75. package/dist/custom-plugins/SortPlugin/index.js +1 -1
  76. package/dist/custom-plugins/StatePersistencePlugin/doc.json.d.ts +71 -37
  77. package/dist/custom-plugins/StatePersistencePlugin/index.js +1 -1
  78. package/dist/custom-plugins/StickyHeaderPlugin/doc.json.d.ts +43 -34
  79. package/dist/custom-plugins/StickyHeaderPlugin/index.js +1 -1
  80. package/dist/custom-plugins/ThrottlePlugin/doc.json.d.ts +43 -34
  81. package/dist/custom-plugins/ThrottlePlugin/index.js +1 -1
  82. package/dist/custom-plugins/TransitionPlugin/doc.json.d.ts +49 -35
  83. package/dist/custom-plugins/TransitionPlugin/index.js +1 -1
  84. package/dist/custom-plugins/URLSyncPlugin/doc.json.d.ts +57 -33
  85. package/dist/custom-plugins/URLSyncPlugin/index.js +1 -1
  86. package/dist/custom-plugins/index.js +6 -6
  87. package/dist/entries/plugins.js +7 -7
  88. package/dist/index.js +1 -1
  89. package/dist/presets/dashboard/index.js +2 -2
  90. package/dist/presets/photo-feed/index.js +3 -3
  91. package/dist/presets/product-feed/index.js +2 -2
  92. package/package.json +26 -26
  93. package/dist/chunks/doc-BQQoKNto.js +0 -126
  94. package/dist/chunks/doc-BindRMfO.js +0 -72
  95. package/dist/chunks/doc-CBHjiDG7.js +0 -88
  96. package/dist/chunks/doc-CkU5GtLw.js +0 -136
  97. package/dist/chunks/doc-KN6Bvmty.js +0 -124
  98. package/dist/chunks/index-B8o6R4RZ.js +0 -15
  99. package/dist/chunks/index-BFyYpEY_.js +0 -11
  100. package/dist/chunks/index-CJR0Buju.js +0 -21
  101. package/dist/chunks/index-DHTB3QEP.js +0 -13
  102. package/dist/chunks/withPlugins-DG3YpSgL.js +0 -655
@@ -1,52 +1,76 @@
1
- declare const _default: {
2
- "name": "A11yPlugin",
3
- "description": "把瀑布流补成读屏可理解的列表:容器 `role=list` + `aria-label`,每项 `role=listitem` + `aria-posinset` / `aria-setsize`,并可选加 `tabIndex` 让键盘能逐项聚焦。",
4
- "since": "2.0.0",
5
- "tags": [
6
- "ui",
7
- "a11y"
8
- ],
9
- "config": [
1
+ declare const _default: {
2
+ "name": "A11yPlugin",
3
+ "description": "把瀑布流补成读屏可理解的列表:容器 `role=list` + `aria-label`,每项 `role=listitem` + `aria-posinset` / `aria-setsize`,并可选加 `tabIndex` 让键盘能逐项聚焦。",
4
+ "since": "2.0.0",
5
+ "tags": [
6
+ "ui",
7
+ "a11y"
8
+ ],
9
+ "events": [
10
10
  {
11
- "name": "containerRole",
12
- "type": "string",
13
- "default": "\"list\"",
14
- "description": "容器 role"
11
+ "name": "onMount",
12
+ "when": "瀑布流挂载完成",
13
+ "description": "初始化观察器与滚动监听,返回清理函数"
15
14
  },
16
15
  {
17
- "name": "itemRole",
18
- "type": "string",
19
- "default": "\"listitem\"",
20
- "description": "项 role"
16
+ "name": "onItemClick",
17
+ "when": "单个卡片被点击",
18
+ "description": "卡片级跳转与点击埋点"
21
19
  },
22
20
  {
23
- "name": "enableTabIndex",
24
- "type": "boolean",
25
- "default": "true",
26
- "description": "项是否可 Tab 聚焦"
21
+ "name": "onLayoutComplete",
22
+ "when": "DOM 落位完成(可安全测量)",
23
+ "description": "测量真实高度、懒加载判定、曝光上报"
27
24
  },
28
25
  {
29
- "name": "containerLabel",
30
- "type": "string",
31
- "default": "\"Waterfall list\"",
32
- "description": "容器 aria-label"
26
+ "name": "renderItemWrapper",
27
+ "when": "渲染每个卡片时包裹其内容",
28
+ "description": "给单卡加包裹层(拖拽、无障碍语义、占位骨架)"
33
29
  }
34
30
  ],
35
- "example": "// 给容器与项补 ARIA role / label / posinset,支持键盘 Tab 遍历。\nconst Waterfall = withPlugins(WaterfallCore, [\n createA11yPlugin({\n containerRole: \"list\",\n itemRole: \"listitem\",\n enableTabIndex: true,\n }),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
36
- "features": [
37
- "容器 / 项 role 成对补齐",
38
- "aria-posinset + aria-setsize 正确标注序号",
39
- "键盘可逐项聚焦"
40
- ],
41
- "useCases": [
42
- "政务 / 金融等合规站点",
43
- "读屏用户可用的信息流",
44
- "键盘操作优先的桌面端"
45
- ],
46
- "notes": [
47
- "项数很多时 `tabIndex=0` 会让 Tab 变长,建议配合「跳转主内容」链接使用。"
48
- ]
49
- }
31
+ "methods": [],
32
+ "methodsNote": "只读取 context 字段(props / state / data),不调用上下文方法",
33
+ "config": [
34
+ {
35
+ "name": "containerRole",
36
+ "type": "string",
37
+ "default": "\"list\"",
38
+ "description": "容器 role"
39
+ },
40
+ {
41
+ "name": "itemRole",
42
+ "type": "string",
43
+ "default": "\"listitem\"",
44
+ "description": "项 role"
45
+ },
46
+ {
47
+ "name": "enableTabIndex",
48
+ "type": "boolean",
49
+ "default": "true",
50
+ "description": "项是否可 Tab 聚焦"
51
+ },
52
+ {
53
+ "name": "containerLabel",
54
+ "type": "string",
55
+ "default": "\"Waterfall list\"",
56
+ "description": "容器 aria-label"
57
+ }
58
+ ],
59
+ "example": "// 给容器与项补 ARIA role / label / posinset,支持键盘 Tab 遍历。\nconst Waterfall = withPlugins(WaterfallCore, [\n createA11yPlugin({\n containerRole: \"list\",\n itemRole: \"listitem\",\n enableTabIndex: true,\n }),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
60
+ "features": [
61
+ "容器 / 项 role 成对补齐",
62
+ "aria-posinset + aria-setsize 正确标注序号",
63
+ "键盘可逐项聚焦"
64
+ ],
65
+ "useCases": [
66
+ "政务 / 金融等合规站点",
67
+ "读屏用户可用的信息流",
68
+ "键盘操作优先的桌面端"
69
+ ],
70
+ "notes": [
71
+ "项数很多时 `tabIndex=0` 会让 Tab 变长,建议配合「跳转主内容」链接使用。"
72
+ ]
73
+ }
50
74
  ;
51
75
 
52
76
  export default _default;
@@ -1,4 +1,4 @@
1
- import { c as e, d as t } from "../../chunks/doc-BCmEnh39.js";
1
+ import { c as e, d as t } from "../../chunks/doc-CkuMr8Ca.js";
2
2
  const c = Object.assign(e, { meta: t });
3
3
  export {
4
4
  c as createA11yPlugin
@@ -1,34 +1,48 @@
1
- declare const _default: {
2
- "name": "AlignmentPlugin",
3
- "description": "设置瀑布流的列分配策略。shortest 让每列尽量等高(视觉最自然),balanced 让每列项数接近,sequential 按 index 轮转(可预测位置,适合需要与外部索引对齐的场景)。",
4
- "since": "2.0.0",
5
- "tags": [
6
- "layout",
7
- "布局"
8
- ],
9
- "config": [
1
+ declare const _default: {
2
+ "name": "AlignmentPlugin",
3
+ "description": "设置瀑布流的列分配策略。shortest 让每列尽量等高(视觉最自然),balanced 让每列项数接近,sequential 按 index 轮转(可预测位置,适合需要与外部索引对齐的场景)。",
4
+ "since": "2.0.0",
5
+ "tags": [
6
+ "layout",
7
+ "布局"
8
+ ],
9
+ "events": [
10
+ {
11
+ "name": "onResize",
12
+ "when": "容器宽度变化触发重排前",
13
+ "description": "按新宽度调整列数或卡片密度"
14
+ },
10
15
  {
11
- "name": "mode",
12
- "type": "\"shortest\" | \"balanced\" | \"sequential\"",
13
- "default": "shortest",
14
- "description": "列分配策略"
16
+ "name": "transformProps",
17
+ "when": "渲染前链式改写瀑布流 props",
18
+ "description": "补 gap / columns 默认值、按断点覆盖配置"
15
19
  }
16
20
  ],
17
- "example": "// 指定列分配策略:最矮列优先(shortest)/ 项数均衡(balanced)/ 顺序轮转(sequential)。\nconst Waterfall = withPlugins(WaterfallCore, [\n createAlignmentPlugin({\n mode: \"shortest\",\n }),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
18
- "features": [
19
- "三种列分配策略",
20
- "只改 props.alignmentMode,不影响其他配置",
21
- "与 ResponsiveColumns / AutoColumn 正交"
22
- ],
23
- "useCases": [
24
- "内容流:默认 shortest",
25
- "等长卡片:balanced 更整齐",
26
- "需要与后端顺序对齐:sequential"
27
- ],
28
- "notes": [
29
- "balanced 与 shortest 在列高相同时都取最左列,视觉上左偏是预期行为。"
30
- ]
31
- }
21
+ "methods": [],
22
+ "methodsNote": "只读取 context 字段(props / state / data),不调用上下文方法",
23
+ "config": [
24
+ {
25
+ "name": "mode",
26
+ "type": "\"shortest\" | \"balanced\" | \"sequential\"",
27
+ "default": "shortest",
28
+ "description": "列分配策略"
29
+ }
30
+ ],
31
+ "example": "// 指定列分配策略:最矮列优先(shortest)/ 项数均衡(balanced)/ 顺序轮转(sequential)。\nconst Waterfall = withPlugins(WaterfallCore, [\n createAlignmentPlugin({\n mode: \"shortest\",\n }),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
32
+ "features": [
33
+ "三种列分配策略",
34
+ "只改 props.alignmentMode,不影响其他配置",
35
+ "与 ResponsiveColumns / AutoColumn 正交"
36
+ ],
37
+ "useCases": [
38
+ "内容流:默认 shortest",
39
+ "等长卡片:balanced 更整齐",
40
+ "需要与后端顺序对齐:sequential"
41
+ ],
42
+ "notes": [
43
+ "balanced 与 shortest 在列高相同时都取最左列,视觉上左偏是预期行为。"
44
+ ]
45
+ }
32
46
  ;
33
47
 
34
48
  export default _default;
@@ -1,4 +1,4 @@
1
- import { c as e, d as t } from "../../chunks/doc-gTAsLjVx.js";
1
+ import { c as e, d as t } from "../../chunks/doc-CYxwSuG6.js";
2
2
  const a = Object.assign(e, { meta: t });
3
3
  export {
4
4
  a as createAlignmentPlugin
@@ -1,50 +1,59 @@
1
- declare const _default: {
2
- "name": "AutoColumnPlugin",
3
- "description": "按「容器可用宽度 ÷ 最小列宽」自动决定列数,取代写死 3 列。走 D1-A 布局钩子(calculateColumns),拿到的是真实容器宽度,不是 window.innerWidth。",
4
- "since": "2.0.0",
5
- "tags": [
6
- "layout",
7
- "layout-hook",
8
- "响应式"
9
- ],
10
- "config": [
11
- {
12
- "name": "minColumnWidth",
13
- "type": "number",
14
- "default": "—",
15
- "description": "每列最小宽度 px(必填)"
16
- },
17
- {
18
- "name": "maxColumns",
19
- "type": "number",
20
- "default": "Infinity",
21
- "description": "列数上限"
22
- },
1
+ declare const _default: {
2
+ "name": "AutoColumnPlugin",
3
+ "description": "按「容器可用宽度 ÷ 最小列宽」自动决定列数,取代写死 3 列。走 D1-A 布局钩子(calculateColumns),拿到的是真实容器宽度,不是 window.innerWidth。",
4
+ "since": "2.0.0",
5
+ "tags": [
6
+ "layout",
7
+ "layout-hook",
8
+ "响应式"
9
+ ],
10
+ "events": [
23
11
  {
24
- "name": "minColumns",
25
- "type": "number",
26
- "default": "1",
27
- "description": "列数下限"
12
+ "name": "calculateColumns",
13
+ "when": "每次布局前,询问列数",
14
+ "description": "返回列数则覆盖 props.columns;返回 undefined 沿用配置"
28
15
  }
29
16
  ],
30
- "example": "// 按容器宽与最小列宽自动算列数,窄屏自动降列。\nconst Waterfall = withPlugins(WaterfallCore, [\n createAutoColumnPlugin({\n maxColumns: \"Infinity\",\n minColumns: 1,\n }),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
31
- "conflicts": [
32
- "ResponsiveColumnsPlugin"
33
- ],
34
- "features": [
35
- "按容器宽度(不是视口宽度)算列数",
36
- "列数上下限可夹",
37
- "与 Gap / Padding 一起算,留白不吞列宽"
38
- ],
39
- "useCases": [
40
- "响应式信息流",
41
- "侧边栏宽度可拖动的后台看板",
42
- "移动端 → 桌面端同一套代码"
43
- ],
44
- "notes": [
45
- "与 ResponsiveColumnsPlugin 同时装会互相覆盖列数,只选一个。"
46
- ]
47
- }
17
+ "methods": [],
18
+ "methodsNote": "只读取 context 字段(props / state / data),不调用上下文方法",
19
+ "config": [
20
+ {
21
+ "name": "minColumnWidth",
22
+ "type": "number",
23
+ "default": "—",
24
+ "description": "每列最小宽度 px(必填)"
25
+ },
26
+ {
27
+ "name": "maxColumns",
28
+ "type": "number",
29
+ "default": "Infinity",
30
+ "description": "列数上限"
31
+ },
32
+ {
33
+ "name": "minColumns",
34
+ "type": "number",
35
+ "default": "1",
36
+ "description": "列数下限"
37
+ }
38
+ ],
39
+ "example": "// 按容器宽与最小列宽自动算列数,窄屏自动降列。\nconst Waterfall = withPlugins(WaterfallCore, [\n createAutoColumnPlugin({\n maxColumns: \"Infinity\",\n minColumns: 1,\n }),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
40
+ "conflicts": [
41
+ "ResponsiveColumnsPlugin"
42
+ ],
43
+ "features": [
44
+ "按容器宽度(不是视口宽度)算列数",
45
+ "列数上下限可夹",
46
+ "与 Gap / Padding 一起算,留白不吞列宽"
47
+ ],
48
+ "useCases": [
49
+ "响应式信息流",
50
+ "侧边栏宽度可拖动的后台看板",
51
+ "移动端 → 桌面端同一套代码"
52
+ ],
53
+ "notes": [
54
+ "与 ResponsiveColumnsPlugin 同时装会互相覆盖列数,只选一个。"
55
+ ]
56
+ }
48
57
  ;
49
58
 
50
59
  export default _default;
@@ -1,4 +1,4 @@
1
- import { c as o, d as t } from "../../chunks/doc-CTUoMe7o.js";
1
+ import { c as o, d as t } from "../../chunks/doc-eYhNJy97.js";
2
2
  const a = Object.assign(o, { meta: t });
3
3
  export {
4
4
  a as createAutoColumnPlugin
@@ -1,41 +1,50 @@
1
- declare const _default: {
2
- "name": "BookmarkPlugin",
3
- "description": "长列表读到一半要跳走时按 **B** 存位置,回来按 **R** 复原。焦点在输入框/可编辑区域时不拦截按键。",
4
- "since": "2.0.0",
5
- "tags": [
6
- "ui",
7
- "滚动",
8
- "快捷键"
9
- ],
10
- "config": [
11
- {
12
- "name": "storageKey",
13
- "type": "string",
14
- "default": "\"waterfall-bookmark\"",
15
- "description": "localStorage 键名"
16
- },
1
+ declare const _default: {
2
+ "name": "BookmarkPlugin",
3
+ "description": "长列表读到一半要跳走时按 **B** 存位置,回来按 **R** 复原。焦点在输入框/可编辑区域时不拦截按键。",
4
+ "since": "2.0.0",
5
+ "tags": [
6
+ "ui",
7
+ "滚动",
8
+ "快捷键"
9
+ ],
10
+ "events": [
17
11
  {
18
- "name": "scrollBehavior",
19
- "type": "\"auto\" | \"smooth\"",
20
- "default": "\"smooth\"",
21
- "description": "恢复时的滚动行为"
12
+ "name": "onMount",
13
+ "when": "瀑布流挂载完成",
14
+ "description": "初始化观察器与滚动监听,返回清理函数"
22
15
  }
23
16
  ],
24
- "example": "// 按 B 记录滚动位置、按 R 跳回(localStorage),忽略输入框按键。\nconst Waterfall = withPlugins(WaterfallCore, [\n createBookmarkPlugin({\n storageKey: \"waterfall-bookmark\",\n scrollBehavior: \"smooth\",\n }),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
25
- "features": [
26
- "B 存 / R 取,零 UI 侵入",
27
- "自动区分容器滚动与页面滚动",
28
- "输入框内不误触"
29
- ],
30
- "useCases": [
31
- "长文列表阅读",
32
- "后台大表格浏览",
33
- "演示时快速复位"
34
- ],
35
- "notes": [
36
- "键名全局共用,一个页面里多处瀑布流请各自传不同的 storageKey。"
37
- ]
38
- }
17
+ "methods": [],
18
+ "methodsNote": "只读取 context 字段(props / state / data),不调用上下文方法",
19
+ "config": [
20
+ {
21
+ "name": "storageKey",
22
+ "type": "string",
23
+ "default": "\"waterfall-bookmark\"",
24
+ "description": "localStorage 键名"
25
+ },
26
+ {
27
+ "name": "scrollBehavior",
28
+ "type": "\"auto\" | \"smooth\"",
29
+ "default": "\"smooth\"",
30
+ "description": "恢复时的滚动行为"
31
+ }
32
+ ],
33
+ "example": "// 按 B 记录滚动位置、按 R 跳回(localStorage),忽略输入框按键。\nconst Waterfall = withPlugins(WaterfallCore, [\n createBookmarkPlugin({\n storageKey: \"waterfall-bookmark\",\n scrollBehavior: \"smooth\",\n }),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
34
+ "features": [
35
+ "B 存 / R 取,零 UI 侵入",
36
+ "自动区分容器滚动与页面滚动",
37
+ "输入框内不误触"
38
+ ],
39
+ "useCases": [
40
+ "长文列表阅读",
41
+ "后台大表格浏览",
42
+ "演示时快速复位"
43
+ ],
44
+ "notes": [
45
+ "键名全局共用,一个页面里多处瀑布流请各自传不同的 storageKey。"
46
+ ]
47
+ }
39
48
  ;
40
49
 
41
50
  export default _default;
@@ -1,4 +1,4 @@
1
- import { c as o, d as a } from "../../chunks/doc-D_ozEn0Q.js";
1
+ import { c as o, d as a } from "../../chunks/doc-BrEd0oZB.js";
2
2
  const r = Object.assign(o, { meta: a });
3
3
  export {
4
4
  r as createBookmarkPlugin
@@ -6,6 +6,35 @@ declare const _default: {
6
6
  "interaction",
7
7
  "埋点"
8
8
  ],
9
+ "events": [
10
+ {
11
+ "name": "onMount",
12
+ "when": "瀑布流挂载完成",
13
+ "description": "初始化观察器与滚动监听,返回清理函数"
14
+ },
15
+ {
16
+ "name": "onItemClick",
17
+ "when": "单个卡片被点击",
18
+ "description": "卡片级跳转与点击埋点"
19
+ },
20
+ {
21
+ "name": "onLayoutComplete",
22
+ "when": "DOM 落位完成(可安全测量)",
23
+ "description": "测量真实高度、懒加载判定、曝光上报"
24
+ },
25
+ {
26
+ "name": "renderOverlay",
27
+ "when": "每次渲染,滚动容器内的内容层之上",
28
+ "description": "回到顶部、加载提示、浮层工具"
29
+ },
30
+ {
31
+ "name": "analytics:click",
32
+ "when": "卡片点击后",
33
+ "description": "广播 { index, key, item, event, total } 点击埋点"
34
+ }
35
+ ],
36
+ "methods": [],
37
+ "methodsNote": "只读取 context 字段(props / state / data),不调用上下文方法",
9
38
  "config": [
10
39
  {
11
40
  "name": "log",
@@ -1,4 +1,4 @@
1
- import { c, d as t } from "../../chunks/doc-KN6Bvmty.js";
1
+ import { c, d as t } from "../../chunks/doc-DEN2WTDh.js";
2
2
  const i = Object.assign(c, { meta: t });
3
3
  export {
4
4
  i as createClickAnalyticsPlugin
@@ -1,34 +1,43 @@
1
- declare const _default: {
2
- "name": "DebounceLayoutPlugin",
3
- "description": "只调 debounceDelay:容器宽度连续变化(抽屉展开、分栏拖拽)时,等变化停下来再算一次布局,避免每帧重排。",
4
- "since": "2.0.0",
5
- "tags": [
6
- "perf",
7
- "性能"
8
- ],
9
- "config": [
1
+ declare const _default: {
2
+ "name": "DebounceLayoutPlugin",
3
+ "description": "只调 debounceDelay:容器宽度连续变化(抽屉展开、分栏拖拽)时,等变化停下来再算一次布局,避免每帧重排。",
4
+ "since": "2.0.0",
5
+ "tags": [
6
+ "perf",
7
+ "性能"
8
+ ],
9
+ "events": [
10
10
  {
11
- "name": "delay",
12
- "type": "number",
13
- "default": "—",
14
- "description": "布局防抖 ms(必填)"
11
+ "name": "transformProps",
12
+ "when": "渲染前链式改写瀑布流 props",
13
+ "description": "补 gap / columns 默认值、按断点覆盖配置"
15
14
  }
16
15
  ],
17
- "example": "// 单独放大布局防抖,容器频繁变宽时(抽屉/侧栏动画)不抖。\nconst Waterfall = withPlugins(WaterfallCore, [\n createDebounceLayoutPlugin(),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
18
- "features": [
19
- "只影响布局时机,不影响渲染",
20
- "可被 ThrottlePlugin 覆盖",
21
- "对移动端软键盘弹出也有效"
22
- ],
23
- "useCases": [
24
- "可折叠侧栏",
25
- "分栏宽度拖拽",
26
- "横竖屏切换"
27
- ],
28
- "notes": [
29
- "delay 过大会让「展开后布局」明显滞后,建议 120–250ms。"
30
- ]
31
- }
16
+ "methods": [],
17
+ "methodsNote": "只读取 context 字段(props / state / data),不调用上下文方法",
18
+ "config": [
19
+ {
20
+ "name": "delay",
21
+ "type": "number",
22
+ "default": "—",
23
+ "description": "布局防抖 ms(必填)"
24
+ }
25
+ ],
26
+ "example": "// 单独放大布局防抖,容器频繁变宽时(抽屉/侧栏动画)不抖。\nconst Waterfall = withPlugins(WaterfallCore, [\n createDebounceLayoutPlugin(),\n]);\n\n<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;",
27
+ "features": [
28
+ "只影响布局时机,不影响渲染",
29
+ "可被 ThrottlePlugin 覆盖",
30
+ "对移动端软键盘弹出也有效"
31
+ ],
32
+ "useCases": [
33
+ "可折叠侧栏",
34
+ "分栏宽度拖拽",
35
+ "横竖屏切换"
36
+ ],
37
+ "notes": [
38
+ "delay 过大会让「展开后布局」明显滞后,建议 120–250ms。"
39
+ ]
40
+ }
32
41
  ;
33
42
 
34
43
  export default _default;
@@ -1,4 +1,4 @@
1
- import { c as e, d as o } from "../../chunks/doc-BIzjYAZW.js";
1
+ import { c as e, d as o } from "../../chunks/doc-DudYCn_-.js";
2
2
  const a = Object.assign(e, { meta: o });
3
3
  export {
4
4
  a as createDebounceLayoutPlugin
@@ -6,6 +6,20 @@ declare const _default: {
6
6
  "interaction",
7
7
  "拖拽"
8
8
  ],
9
+ "events": [
10
+ {
11
+ "name": "renderItemWrapper",
12
+ "when": "渲染每个卡片时包裹其内容",
13
+ "description": "给单卡加包裹层(拖拽、无障碍语义、占位骨架)"
14
+ },
15
+ {
16
+ "name": "drag:reorder",
17
+ "when": "拖拽排序完成后",
18
+ "description": "广播 { from, to },供业务层同步顺序"
19
+ }
20
+ ],
21
+ "methods": [],
22
+ "methodsNote": "只读取 context 字段(props / state / data),不调用上下文方法",
9
23
  "config": [
10
24
  {
11
25
  "name": "enabled",
@@ -1,4 +1,4 @@
1
- import { c as e, d as r } from "../../chunks/doc-BXElhF2h.js";
1
+ import { c as e, d as r } from "../../chunks/doc-CiCso5Ti.js";
2
2
  const o = Object.assign(e, { meta: r });
3
3
  export {
4
4
  o as createDragReorderPlugin