oink-ui 1.0.3 → 1.0.5

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/README.md CHANGED
@@ -83,6 +83,18 @@ Components render the same markup on the server and the client, so they work wit
83
83
 
84
84
  Containers use continuous-curvature superellipse corners: `border-radius` plus `corner-shape: superellipse(1.75)` (the `--ok-corner` token), with radii multiplied by `--ok-rk` (1.45) so they look as large as their nominal size. Fully round shapes (pills, circles) stay `corner-shape: round`.
85
85
 
86
+ When overriding a component's shape in application CSS, override its fallback marker in the same rule, including explicit round or inherited shapes:
87
+
88
+ ```css
89
+ .search-button {
90
+ border-radius: calc(14px * var(--ok-rk));
91
+ corner-shape: var(--ok-corner); --ok-shape: var(--ok-corner);
92
+ }
93
+ ```
94
+
95
+ WebKit drops `corner-shape`, so omitting `--ok-shape` can retain a component's original marker (for example Button's `round`) even though its radius changed. A radius near half the control height then becomes a pill. The fallback does not infer the intended shape from radius alone.
96
+
97
+
86
98
  Only Chromium supports `corner-shape` (Chrome, Edge, WebView2). In Safari and in the `WKWebView` that Tauri uses on macOS, `OinkProvider` turns on a small script fallback that draws the same curve Chromium draws, so a Mac build looks like the Windows build. The fallback also starts in Firefox, which lacks `corner-shape` too, but it has not been checked there yet:
87
99
 
88
100
  - It does nothing at all where `corner-shape` is supported, and nothing on the server.
@@ -56,6 +56,7 @@ export interface ShadowLayer {
56
56
  dy: number;
57
57
  spread: number;
58
58
  color: string;
59
+ blur?: number;
59
60
  }
60
61
  export interface OutlineLayer {
61
62
  offset: number;
@@ -117,7 +118,7 @@ export interface CornerPaint {
117
118
  }
118
119
  /** 补丁缓存键里和尺寸有关的部分:能拉伸的方向不看尺寸 */
119
120
  export declare function paintSizeKey(d: CornerDecor): string;
120
- export declare function cornerPaint(d: CornerDecor): CornerPaint | null;
121
+ export declare function cornerPaint(d: CornerDecor, layout?: CornerDecor): CornerPaint | null;
121
122
  /** 把补丁写成 border-image 的值 */
122
123
  export declare function borderImageValue(p: CornerPaint): string;
123
124
  export {};