vue-peel-card 0.1.2 → 0.2.2

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
@@ -50,8 +50,9 @@ Exactly two cards. The first swipe peels the top card, the second (back) sticks
50
50
  <button @click="card.peel()">Toggle</button>
51
51
  ```
52
52
 
53
- While the card is peeled, it stands at an angle by the edge and the scene shifts so both cards fit.
54
- You can stick it back with a swipe anywhere on the canvas against the peel direction, or with a button via `peel()`.
53
+ The peel looks exactly like in normal mode, and the card then disappears completely; the second card stays underneath.
54
+ To bring it back, drag in any direction (the card returns from the opposite side and lays down), or tap / call `peel()`
55
+ for the same animation in reverse from the right side.
55
56
 
56
57
  ## Card format
57
58
 
@@ -85,6 +86,7 @@ a fallback is drawn: the `bg` color and plain text.
85
86
  | `padding` | `number` | `16` | gap between the card and the component edges |
86
87
  | `maxScale` | `number` | `1.35` | maximum zoom |
87
88
  | `hint` | `boolean` | `true` | edge wiggle on start |
89
+ | `clickPeel` | `boolean` | `false` | a click or tap (without dragging) peels the card from the pressed edge; use `click-peel` in templates |
88
90
  | `label` | `string` | — | `aria-label` of the canvas |
89
91
 
90
92
  ## Events
@@ -98,7 +100,8 @@ a fallback is drawn: the `bg` color and plain text.
98
100
 
99
101
  ## Methods
100
102
 
101
- `peel()` via `ref`: peels the card; in toggle mode switches the state.
103
+ `peel(angle?)` via `ref`: peels the card; in toggle mode switches the state. `angle` is the tilt of the peel direction in degrees
104
+ (positive tilts upward, default `12`, `0` is straight).
102
105
 
103
106
  ## Accessibility
104
107
 
@@ -109,6 +112,7 @@ The canvas is keyboard-focusable: Right Arrow, Space or Enter peels the card. Th
109
112
 
110
113
  ```bash
111
114
  npm install
115
+ npm run dev # playground at http://localhost:5173
112
116
  npm run build # dist/vue-peel-card.js (ESM) and dist/vue-peel-card.umd.cjs
113
117
  ```
114
118