bitboss-ui 2.1.130 → 2.1.131

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 (184) hide show
  1. package/dist/ai/BbTable.md +33 -82
  2. package/dist/index.css +1 -1
  3. package/dist/index109.js +9 -9
  4. package/dist/index110.js +18 -18
  5. package/dist/index118.js +1 -1
  6. package/dist/index124.js +3 -3
  7. package/dist/index126.js +310 -323
  8. package/dist/index134.js +1 -1
  9. package/dist/index136.js +4 -4
  10. package/dist/index138.js +1 -1
  11. package/dist/index14.js +1 -1
  12. package/dist/index142.js +2 -2
  13. package/dist/index146.js +1 -1
  14. package/dist/index148.js +2 -2
  15. package/dist/index150.js +1 -1
  16. package/dist/index16.js +3 -3
  17. package/dist/index18.js +3 -3
  18. package/dist/index20.js +9 -9
  19. package/dist/index22.js +14 -14
  20. package/dist/index224.js +2 -138
  21. package/dist/index225.js +138 -2
  22. package/dist/index226.js +2 -2
  23. package/dist/index227.js +1 -1
  24. package/dist/index228.js +1 -1
  25. package/dist/index229.js +3 -32
  26. package/dist/index230.js +12 -27
  27. package/dist/index231.js +375 -0
  28. package/dist/index233.js +160 -2
  29. package/dist/index235.js +25 -13
  30. package/dist/index236.js +2 -86
  31. package/dist/index237.js +4 -0
  32. package/dist/index238.js +2 -30
  33. package/dist/index239.js +6 -17
  34. package/dist/index24.js +10 -10
  35. package/dist/index240.js +2 -17
  36. package/dist/index241.js +7 -51
  37. package/dist/index242.js +3 -18
  38. package/dist/index243.js +34 -3
  39. package/dist/index244.js +5 -12
  40. package/dist/index245.js +4 -4
  41. package/dist/index246.js +4 -4
  42. package/dist/index247.js +4 -4
  43. package/dist/index248.js +4 -4
  44. package/dist/index249.js +5 -5
  45. package/dist/index250.js +3 -5
  46. package/dist/index251.js +8 -3
  47. package/dist/index252.js +3 -8
  48. package/dist/index253.js +16 -158
  49. package/dist/index254.js +14 -0
  50. package/dist/index255.js +51 -5
  51. package/dist/index256.js +18 -2
  52. package/dist/index257.js +12 -6
  53. package/dist/index258.js +17 -268
  54. package/dist/index259.js +30 -52
  55. package/dist/index26.js +3 -3
  56. package/dist/index260.js +18 -52
  57. package/dist/index261.js +4 -32
  58. package/dist/index262.js +100 -54
  59. package/dist/index264.js +94 -367
  60. package/dist/index266.js +107 -4
  61. package/dist/index267.js +12 -6
  62. package/dist/index268.js +11 -2
  63. package/dist/index269.js +9 -12
  64. package/dist/index270.js +2 -12
  65. package/dist/index271.js +3 -9
  66. package/dist/index272.js +86 -23
  67. package/dist/index274.js +9 -3
  68. package/dist/index275.js +23 -11
  69. package/dist/index276.js +22 -33
  70. package/dist/index277.js +13 -3
  71. package/dist/index278.js +7 -25
  72. package/dist/index279.js +8 -3
  73. package/dist/index28.js +1 -1
  74. package/dist/index280.js +5 -20
  75. package/dist/index281.js +2 -9
  76. package/dist/index282.js +186 -42
  77. package/dist/index283.js +3 -53
  78. package/dist/index284.js +32 -17
  79. package/dist/index285.js +28 -12
  80. package/dist/index287.js +11 -0
  81. package/dist/index288.js +44 -100
  82. package/dist/index289.js +55 -0
  83. package/dist/index290.js +2 -107
  84. package/dist/index291.js +5 -9
  85. package/dist/index292.js +6 -6
  86. package/dist/index293.js +266 -14
  87. package/dist/index294.js +52 -5
  88. package/dist/index295.js +52 -188
  89. package/dist/index296.js +32 -3
  90. package/dist/index297.js +59 -20
  91. package/dist/index298.js +3 -6
  92. package/dist/index299.js +20 -66
  93. package/dist/index30.js +3 -3
  94. package/dist/index300.js +67 -3
  95. package/dist/index301.js +6 -10
  96. package/dist/index302.js +4 -3
  97. package/dist/index303.js +20 -2
  98. package/dist/index304.js +6 -7
  99. package/dist/index305.js +16 -7
  100. package/dist/index306.js +4 -3
  101. package/dist/index307.js +7 -17
  102. package/dist/index308.js +3 -28
  103. package/dist/index309.js +4 -4
  104. package/dist/index310.js +2 -7
  105. package/dist/index312.js +6 -3
  106. package/dist/index313.js +5 -0
  107. package/dist/index314.js +280 -7
  108. package/dist/index315.js +2 -3
  109. package/dist/index316.js +125 -3
  110. package/dist/index317.js +2 -3
  111. package/dist/index318.js +13 -278
  112. package/dist/index319.js +2 -2
  113. package/dist/index32.js +2 -2
  114. package/dist/index324.js +17 -25
  115. package/dist/index326.js +3 -2
  116. package/dist/index327.js +3 -2
  117. package/dist/index328.js +17 -2
  118. package/dist/index329.js +28 -2
  119. package/dist/index330.js +3 -2
  120. package/dist/index331.js +3 -125
  121. package/dist/index332.js +2 -2
  122. package/dist/index333.js +4 -15
  123. package/dist/index334.js +5 -2
  124. package/dist/index335.js +25 -17
  125. package/dist/index337.js +2 -3
  126. package/dist/index338.js +2 -3
  127. package/dist/index339.js +1 -1
  128. package/dist/index34.js +8 -8
  129. package/dist/index340.js +2 -4
  130. package/dist/index341.js +2 -719
  131. package/dist/index342.js +2 -366
  132. package/dist/index343.js +719 -57
  133. package/dist/index344.js +366 -6
  134. package/dist/index345.js +57 -2
  135. package/dist/index348.js +221 -86
  136. package/dist/index349.js +6 -5
  137. package/dist/index350.js +34 -6
  138. package/dist/index351.js +128 -17
  139. package/dist/index352.js +397 -7
  140. package/dist/index353.js +90 -12
  141. package/dist/index354.js +200 -5
  142. package/dist/index355.js +259 -7
  143. package/dist/index356.js +6 -34
  144. package/dist/index357.js +17 -128
  145. package/dist/index358.js +7 -397
  146. package/dist/index359.js +14 -199
  147. package/dist/index36.js +4 -4
  148. package/dist/index360.js +5 -259
  149. package/dist/index361.js +7 -22
  150. package/dist/index362.js +136 -0
  151. package/dist/index363.js +21 -133
  152. package/dist/index365.js +1 -1
  153. package/dist/index366.js +2 -228
  154. package/dist/index370.js +1 -1
  155. package/dist/index38.js +21 -21
  156. package/dist/index40.js +7 -7
  157. package/dist/index42.js +2 -2
  158. package/dist/index44.js +8 -8
  159. package/dist/index46.js +6 -6
  160. package/dist/index50.js +2 -2
  161. package/dist/index54.js +1 -1
  162. package/dist/index56.js +1 -1
  163. package/dist/index58.js +2 -2
  164. package/dist/index60.js +2 -2
  165. package/dist/index62.js +5 -5
  166. package/dist/index68.js +1 -1
  167. package/dist/index74.js +4 -4
  168. package/dist/index82.js +6 -6
  169. package/dist/index84.js +1 -1
  170. package/dist/index86.js +2 -2
  171. package/dist/index88.js +3 -3
  172. package/dist/index90.js +1 -1
  173. package/dist/index93.js +3 -3
  174. package/dist/index95.js +2 -2
  175. package/dist/index97.js +5 -5
  176. package/dist/index99.js +1 -1
  177. package/package.json +1 -1
  178. package/dist/index232.js +0 -4
  179. package/dist/index234.js +0 -4
  180. package/dist/index263.js +0 -6
  181. package/dist/index273.js +0 -25
  182. package/dist/index286.js +0 -108
  183. package/dist/index311.js +0 -4
  184. package/dist/index364.js +0 -4
@@ -31,11 +31,7 @@
31
31
  <col
32
32
  v-for="track in columnTracks"
33
33
  :key="track.key"
34
- :style="{
35
- width: track.width,
36
- minWidth: track.locked ? track.width : undefined,
37
- maxWidth: track.locked ? track.width : undefined,
38
- }"
34
+ :style="{ width: track.width }"
39
35
  />
40
36
  </colgroup>
41
37
  <thead>
@@ -570,29 +566,6 @@ const toLength = (width: number | string) => {
570
566
  return /^-?\d*\.?\d+$/.test(trimmed) ? `${trimmed}px` : trimmed;
571
567
  };
572
568
 
573
- /**
574
- * Resolves a CSS length to px in the context of `host`.
575
- * Returns `null` when the value cannot be resolved reliably.
576
- */
577
- const resolveLengthToPx = (
578
- width: number | string,
579
- host: HTMLElement
580
- ): number | null => {
581
- const length = toLength(width);
582
- if (/^-?\d*\.?\d+px$/.test(length)) return parseFloat(length);
583
-
584
- const probe = document.createElement('div');
585
- probe.style.position = 'absolute';
586
- probe.style.visibility = 'hidden';
587
- probe.style.pointerEvents = 'none';
588
- probe.style.width = length;
589
- host.appendChild(probe);
590
- const px = probe.getBoundingClientRect().width;
591
- host.removeChild(probe);
592
-
593
- return Number.isFinite(px) && px > 0 ? px : null;
594
- };
595
-
596
569
  /** Number of data columns the parent renders (numeric track keys). */
597
570
  const parentDataColumns = computed(() => {
598
571
  const tracks = parentNode.value?.tracks;
@@ -803,10 +776,10 @@ const columnTracks = computed(() => {
803
776
  fixedLayout.value && structuralFit[key]
804
777
  ? (structuralFit[key] as string)
805
778
  : sync(key);
806
- const tracks: { key: string; width: string; locked?: boolean }[] = [];
779
+ const tracks: { key: string; width: string }[] = [];
807
780
 
808
781
  if (props.selectable) {
809
- tracks.push({ key: 'select', width: structural('select'), locked: false });
782
+ tracks.push({ key: 'select', width: structural('select') });
810
783
  }
811
784
 
812
785
  const lastIndex = props.columns.length - 1;
@@ -820,7 +793,7 @@ const columnTracks = computed(() => {
820
793
  // track plus the folded edge region plus any deficit. Skipped when the
821
794
  // table overflows: there is no leftover then, and it must content-size.
822
795
  if (index === fillColumnIndex.value && !overflowsParent.value) {
823
- tracks.push({ key, width: 'auto', locked: false });
796
+ tracks.push({ key, width: 'auto' });
824
797
  return;
825
798
  }
826
799
 
@@ -855,11 +828,11 @@ const columnTracks = computed(() => {
855
828
  ? `calc(${[...offsets, span ?? '0px'].join(' + ')})`
856
829
  : (span ?? 'auto');
857
830
 
858
- tracks.push({ key, width, locked: frozen != null });
831
+ tracks.push({ key, width });
859
832
  });
860
833
 
861
834
  if (props.actions) {
862
- tracks.push({ key: 'actions', width: structural('actions'), locked: false });
835
+ tracks.push({ key: 'actions', width: structural('actions') });
863
836
  }
864
837
 
865
838
  return tracks;
@@ -931,19 +904,27 @@ const measureStructuralFit = () => {
931
904
  const fit = (selector: string) => {
932
905
  let max = 0;
933
906
  table.querySelectorAll<HTMLElement>(selector).forEach((cell) => {
934
- // Combined horizontal extent of the children, not the widest one: an
935
- // actions cell holds several side-by-side controls whose total width is
936
- // what the column must fit. Measured from edges so it stays correct even
937
- // when the cell is narrower than its content (controls overflow on
938
- // `nowrap`), which keeps the pin-to-content convergence stable.
939
- let left = Infinity;
940
- let right = -Infinity;
907
+ // Sum each child's own intrinsic width (plus horizontal margins) an
908
+ // actions cell holds several side-by-side controls and the column must
909
+ // fit them all. Crucially this is *not* their shared extent: the extent
910
+ // depends on how the cell spreads them across its width, which feeds the
911
+ // column width back into its own measurement and runs away into the
912
+ // thousands. A child's own width does not depend on the cell, so this
913
+ // converges. Out-of-flow children (e.g. an `sr-only` label parked far
914
+ // off-screen) are skipped so they cannot inflate the result.
915
+ let content = 0;
941
916
  cell.querySelectorAll<HTMLElement>(':scope > *').forEach((child) => {
942
- const rect = child.getBoundingClientRect();
943
- left = Math.min(left, rect.left);
944
- right = Math.max(right, rect.right);
917
+ const childStyle = getComputedStyle(child);
918
+ if (
919
+ childStyle.position === 'absolute' ||
920
+ childStyle.position === 'fixed'
921
+ )
922
+ return;
923
+ const margin =
924
+ parseFloat(childStyle.marginLeft) +
925
+ parseFloat(childStyle.marginRight);
926
+ content += child.getBoundingClientRect().width + (margin || 0);
945
927
  });
946
- const content = right > left ? right - left : 0;
947
928
  const style = getComputedStyle(cell);
948
929
  const padding =
949
930
  parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
@@ -1016,19 +997,6 @@ const fillValue = ref(0);
1016
997
  */
1017
998
  const naturalTotalWidth = ref<string | null>(null);
1018
999
 
1019
- /**
1020
- * Width budget for probe distribution. Prefer the immediate parent's visible
1021
- * width (the scroll viewport) over this table's own offset width so a
1022
- * max-content growth loop in ancestors cannot recursively inflate probe output.
1023
- */
1024
- const probeViewportWidth = (container: HTMLElement): number => {
1025
- const parentWidth = container.parentElement?.clientWidth ?? 0;
1026
- const selfWidth = container.clientWidth || container.getBoundingClientRect().width;
1027
- const fallback = container.offsetWidth;
1028
- const width = parentWidth || selfWidth || fallback;
1029
- return Number.isFinite(width) && width > 0 ? width : 0;
1030
- };
1031
-
1032
1000
  const runNaturalWidthProbe = () => {
1033
1001
  const container = containerRef.value;
1034
1002
  if (!container || !fixedLayout.value) return;
@@ -1041,8 +1009,7 @@ const runNaturalWidthProbe = () => {
1041
1009
  )
1042
1010
  return;
1043
1011
 
1044
- const containerWidth = probeViewportWidth(container);
1045
- if (containerWidth <= 0) return;
1012
+ const containerWidth = container.offsetWidth;
1046
1013
  const dataOffset = props.selectable ? 1 : 0;
1047
1014
 
1048
1015
  // ── Real-table measurements ────────────────────────────────────────────
@@ -1054,21 +1021,17 @@ const runNaturalWidthProbe = () => {
1054
1021
  ? parseFloat(structuralFit.actions)
1055
1022
  : 0;
1056
1023
 
1057
- // Live rendered widths from the fixed-layout table. Frozen columns use their
1058
- // declared width (resolved to px) so an explicit width like `200` remains a
1059
- // true floor in the probe math even when the live render is under pressure.
1060
- // `frozenTotal` (declared widths) feeds the stable min-width floor;
1061
- // `nonFlexTotal` (frozen + inherited) is what the flex columns share.
1024
+ // Live rendered widths from the fixed-layout table. `frozenTotal` (declared
1025
+ // widths) feeds the stable min-width floor; `nonFlexTotal` (frozen + inherited)
1026
+ // is what the flex columns share the remainder of. The inherited part is only
1027
+ // used for that `available` figure never fed back into min-width, since those
1028
+ // widths stretch with the table and would otherwise lock min-width above
1029
+ // max-content and force a spurious uniform stretch on every column.
1062
1030
  const realThs = headerCells();
1063
1031
  let frozenTotal = 0;
1064
1032
  let nonFlexTotal = 0;
1065
1033
  props.columns.forEach((col, i) => {
1066
- const renderedWidth =
1067
- realThs[dataOffset + i]?.getBoundingClientRect().width ?? 0;
1068
- const declaredFrozenWidth =
1069
- col.width != null ? resolveLengthToPx(col.width, container) : null;
1070
- const width = declaredFrozenWidth ?? renderedWidth;
1071
-
1034
+ const width = realThs[dataOffset + i]?.getBoundingClientRect().width ?? 0;
1072
1035
  if (col.width != null) frozenTotal += width;
1073
1036
  if (!isFlexColumn(i)) nonFlexTotal += width;
1074
1037
  });
@@ -2171,22 +2134,10 @@ export type BbTableSlots<Item = any> = {
2171
2134
  width: 100%;
2172
2135
 
2173
2136
  thead {
2174
- th {
2175
- box-sizing: border-box;
2176
- min-width: 0;
2177
- }
2178
-
2179
2137
  .bb-table-header--actions {
2180
2138
  width: auto;
2181
2139
  }
2182
2140
  }
2183
-
2184
- tbody {
2185
- td {
2186
- box-sizing: border-box;
2187
- min-width: 0;
2188
- }
2189
- }
2190
2141
  }
2191
2142
  }
2192
2143