@bace51/cocktailjs-react 1.0.13 → 1.0.15

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 (2) hide show
  1. package/README.md +77 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -29,22 +29,83 @@ export default function Example() {
29
29
  }
30
30
  ```
31
31
 
32
- ## Props
33
-
34
- - `size` (number): width/height in pixels for glass components.
35
- - `liquidFill` (string | string[]): color or gradient colors used for the liquid.
36
- - `level` (number): for `Liquid`, fill level from `0` (empty) to `1` (full).
37
- - `highlight` (boolean): for `Liquid`, enable a highlight overlay.
38
- - `highlightColor` (string): color used for the highlight.
39
- - `stopPositions` (array): optional gradient stop offsets for `Liquid`.
40
-
41
- - `mixed` (boolean): render a visually-mixed liquid. Subdues strong gradients and biases toward a dominant color while still hinting original colors.
42
- - `mixedBlend` (number 0..1): how much original colors remain when `mixed` is true (0 = pure dominant color, 1 = original colors). Default ~0.25.
43
- - `mixedOpacity` (number 0..1): opacity applied to synthesized mixed gradient stops (default ~0.85).
44
-
45
- Notes about `mixed` vs gradients
46
-
47
- - When `mixed` is `true`, `Liquid` will choose a dominant color (highest saturation) and blend other stops toward it, reducing stop opacity so hints of the original palette remain. This produces a more natural "already mixed" appearance.
32
+ ## Available Glasses
33
+
34
+ - AbsintheGlass
35
+ - BrandySnifterGlass
36
+ - CollinsGlass
37
+ - CopperMug
38
+ - CordialGlass
39
+ - CoupeGlass
40
+ - DemitasseGlass
41
+ - DoubleShotGlass
42
+ - FizzGlass
43
+ - FluteGlass
44
+ - GobletGlass
45
+ - HighballGlass
46
+ - HurricaneGlass
47
+ - IrishCoffeeGlass
48
+ - JulepCup
49
+ - MargaritaGlass
50
+ - MartiniGlass
51
+ - NickAndNoraGlass
52
+ - ParfaitGlass
53
+ - PilsnerGlass
54
+ - PintGlass
55
+ - PousseCafeGlass
56
+ - PunchGlass
57
+ - RocksGlass
58
+ - SingleShotGlass
59
+ - SlingGlass
60
+ - SnifterGlass
61
+ - SourGlass
62
+ - TankardGlass
63
+ - TikiGlass
64
+ - ToddyGlass
65
+ - WhiskeyShotGlass
66
+ - WineGlass
67
+
68
+ ## Props Accepted
69
+
70
+ Glass component props (all glasses):
71
+
72
+ - `size` (number): rendered width/height. Default is usually `80` (some shot variants default to `64`).
73
+ - `liquidFill` (string | string[]): liquid color or gradient stops.
74
+ - `strokeWidth` (number): outline stroke width.
75
+
76
+ Glass component props (supported by specific glasses):
77
+
78
+ - `idBase` (string): base id used for internal liquid gradient ids.
79
+ - `garnish` (any): accepted by some glass components (for example `MartiniGlass`, `HurricaneGlass`, `NickAndNoraGlass`, `PintGlass`).
80
+ - `fill` (string): accepted by non-liquid metal/body components (for example `CopperMug`, `JulepCup`).
81
+
82
+ Glass component passthrough:
83
+
84
+ - `WhiskeyShotGlass` forwards additional props to `Liquid` via rest props (`...liquidProps`).
85
+
86
+ Liquid component props (`Liquid` export):
87
+
88
+ - `d` (string): SVG path data for liquid shape.
89
+ - `transform` (string): optional SVG transform applied to the liquid path.
90
+ - `liquidFill` (string | string[] | null): fallback liquid color input.
91
+ - `liquidStyle` (object | null): explicit style object for the liquid path.
92
+ - `gradientAttr` (string | string[] | null): external gradient id (`#id`) or gradient stop colors.
93
+ - `opacity` (number): liquid opacity. Default `0.7`.
94
+ - `idBase` (string): gradient id base. Default `"liquidGrad"`.
95
+ - `highlight` (`"liquid" | "ice" | "all" | null`): highlight mode.
96
+ - `highlightColor` (string): highlight stop color. Default `"#fff7c0"`.
97
+ - `level` (number `0..1`): vertical fill level. Default `1`.
98
+ - `stopPositions` (number[] | null): explicit normalized stop offsets (`0..1`).
99
+ - `mixed` (boolean): blend gradient toward dominant color.
100
+ - `mixedBlend` (number `0..1`): original-color retention when mixed. Default `0.25`.
101
+ - `mixedOpacity` (number `0..1`): opacity for synthesized mixed gradient stops. Default `0.85`.
102
+
103
+ ## Methods / Exports
104
+
105
+ - No class-style methods are exposed; this package exports React components and data.
106
+ - Named exports: `Liquid`, all glass components listed above, and `glasses`.
107
+ - `glasses` export: array of `{ name, about }` metadata entries.
108
+ - Default export: object containing `Liquid`, all glass components, and `glasses`.
48
109
 
49
110
  ## Notes
50
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bace51/cocktailjs-react",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "private": false,
5
5
  "description": "Lightweight React components for rendering cocktail glasses and liquids as SVG.",
6
6
  "keywords": [