@olwiba/ui 0.1.9 → 0.1.10

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/index.d.ts CHANGED
@@ -1066,7 +1066,7 @@ interface FlowBracketProps {
1066
1066
  * Defaults to 22.
1067
1067
  */
1068
1068
  extent?: number;
1069
- /** Show open-chevron arrowhead at the top (destination) end. Default: true. */
1069
+ /** Show open-chevron arrowhead at the destination end. Default: true. */
1070
1070
  arrow?: boolean;
1071
1071
  /** CSS color for both bracket lines and animated dots. Defaults to muted slate. */
1072
1072
  color?: string;
@@ -1098,8 +1098,9 @@ interface FlowBracketProps {
1098
1098
  * left and/or right outside edges — connecting the top of the first child down
1099
1099
  * to the bottom of the last child (e.g. docs → SYNC direction).
1100
1100
  *
1101
- * Bracket lines use `overflow: visible` on the SVG to draw into the parent's padding.
1102
- * Ensure the parent section/container has enough horizontal padding for `extent`.
1101
+ * Arrowheads are rendered as absolutely-positioned SVGs (not SVG markers) so
1102
+ * they render at a consistent pixel size regardless of the bracket SVG's aspect
1103
+ * ratio (which spans the full section height with preserveAspectRatio="none").
1103
1104
  */
1104
1105
  declare function FlowBracket({ anchorTop, anchorBottom, extent, arrow, color, colorLeft, colorRight, left, right, animate, animateDur, reverseRight, style, className, children, }: FlowBracketProps): react_jsx_runtime.JSX.Element;
1105
1106
 
package/dist/index.js CHANGED
@@ -3092,8 +3092,6 @@ function FlowConnector({
3092
3092
  }
3093
3093
  );
3094
3094
  }
3095
- var MARKER_L = "fb-ml";
3096
- var MARKER_R = "fb-mr";
3097
3095
  function FlowBracket({
3098
3096
  anchorTop = 8,
3099
3097
  anchorBottom = 92,
@@ -3152,6 +3150,20 @@ function FlowBracket({
3152
3150
  pointerEvents: "none",
3153
3151
  opacity: 0
3154
3152
  };
3153
+ const chevronProps = {
3154
+ fill: "none",
3155
+ strokeWidth: "1.5",
3156
+ strokeLinecap: "round",
3157
+ strokeLinejoin: "round"
3158
+ };
3159
+ const arrowBase = {
3160
+ position: "absolute",
3161
+ width: 10,
3162
+ height: 8,
3163
+ overflow: "visible",
3164
+ pointerEvents: "none",
3165
+ transform: "translate(-50%, -50%)"
3166
+ };
3155
3167
  return /* @__PURE__ */ jsxs("div", { className, style: { position: "relative", ...style }, children: [
3156
3168
  animate && /* @__PURE__ */ jsx("style", { children: dotKeyframes }),
3157
3169
  /* @__PURE__ */ jsxs(
@@ -3163,20 +3175,15 @@ function FlowBracket({
3163
3175
  className: "pointer-events-none absolute inset-0",
3164
3176
  style: { width: "100%", height: "100%", overflow: "visible" },
3165
3177
  children: [
3166
- /* @__PURE__ */ jsxs("defs", { children: [
3167
- /* @__PURE__ */ jsx("marker", { id: MARKER_L, markerWidth: "10", markerHeight: "8", refX: "8", refY: "4", orient: "auto", children: /* @__PURE__ */ jsx("polyline", { points: "1,1 8,4 1,7", fill: "none", stroke: cl, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
3168
- /* @__PURE__ */ jsx("marker", { id: MARKER_R, markerWidth: "10", markerHeight: "8", refX: "8", refY: "4", orient: "auto", children: /* @__PURE__ */ jsx("polyline", { points: "1,1 8,4 1,7", fill: "none", stroke: cr, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
3169
- ] }),
3170
3178
  left && /* @__PURE__ */ jsx(
3171
3179
  "path",
3172
3180
  {
3173
3181
  d: leftD,
3174
3182
  fill: "none",
3175
- stroke: cl,
3183
+ style: { stroke: cl },
3176
3184
  strokeWidth: 1.5,
3177
3185
  strokeDasharray: "5,4",
3178
- vectorEffect: "non-scaling-stroke",
3179
- ...arrow ? { markerEnd: `url(#${MARKER_L})` } : {}
3186
+ vectorEffect: "non-scaling-stroke"
3180
3187
  }
3181
3188
  ),
3182
3189
  right && /* @__PURE__ */ jsx(
@@ -3184,16 +3191,37 @@ function FlowBracket({
3184
3191
  {
3185
3192
  d: rightD,
3186
3193
  fill: "none",
3187
- stroke: cr,
3194
+ style: { stroke: cr },
3188
3195
  strokeWidth: 1.5,
3189
3196
  strokeDasharray: "5,4",
3190
- vectorEffect: "non-scaling-stroke",
3191
- ...arrow ? { markerEnd: `url(#${MARKER_R})` } : {}
3197
+ vectorEffect: "non-scaling-stroke"
3192
3198
  }
3193
3199
  )
3194
3200
  ]
3195
3201
  }
3196
3202
  ),
3203
+ arrow && left && /* @__PURE__ */ jsx(
3204
+ "svg",
3205
+ {
3206
+ "aria-hidden": true,
3207
+ viewBox: "0 0 10 8",
3208
+ style: { ...arrowBase, top: `${anchorTop}%`, left: 0 },
3209
+ children: /* @__PURE__ */ jsx("polyline", { points: "1,1 8,4 1,7", style: { stroke: cl }, ...chevronProps })
3210
+ }
3211
+ ),
3212
+ arrow && right && /* @__PURE__ */ jsx(
3213
+ "svg",
3214
+ {
3215
+ "aria-hidden": true,
3216
+ viewBox: "0 0 10 8",
3217
+ style: {
3218
+ ...arrowBase,
3219
+ top: reverseRight ? `${anchorBottom}%` : `${anchorTop}%`,
3220
+ left: "100%"
3221
+ },
3222
+ children: /* @__PURE__ */ jsx("polyline", { points: "9,1 2,4 9,7", style: { stroke: cr }, ...chevronProps })
3223
+ }
3224
+ ),
3197
3225
  children,
3198
3226
  animate && left && /* @__PURE__ */ jsx(
3199
3227
  "div",