create-cloudinary-react 1.0.0-beta.16 → 1.0.0-beta.17

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [1.0.0-beta.17](https://github.com/cloudinary-devs/create-cloudinary-react/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2026-02-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * simplified questions into arrays ([bade600](https://github.com/cloudinary-devs/create-cloudinary-react/commit/bade600ee63de7a7c3d8eec40569f8896f96a7bd))
7
+
8
+
9
+ ### Features
10
+
11
+ * prompt copied animation ([9ad35b2](https://github.com/cloudinary-devs/create-cloudinary-react/commit/9ad35b2351a69bca6d4dcd716b10a1508d5228a8))
12
+
1
13
  # [1.0.0-beta.16](https://github.com/cloudinary-devs/create-cloudinary-react/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2026-02-11)
2
14
 
3
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudinary-react",
3
- "version": "1.0.0-beta.16",
3
+ "version": "1.0.0-beta.17",
4
4
  "description": "Scaffold a Cloudinary React + Vite + TypeScript project with interactive setup",
5
5
  "type": "module",
6
6
  "bin": {
@@ -91,6 +91,7 @@ h2 {
91
91
  transition: all 0.2s;
92
92
  user-select: text;
93
93
  cursor: pointer;
94
+ position: relative;
94
95
  }
95
96
 
96
97
  .prompts-list li:hover {
@@ -98,3 +99,67 @@ h2 {
98
99
  border-left-color: rgba(99, 102, 241, 0.8);
99
100
  transform: translateX(4px);
100
101
  }
102
+
103
+ @keyframes wipe-in-out {
104
+ 0% {
105
+ clip-path: polygon(
106
+ 0% 0%,
107
+ 0% 100%,
108
+ 0% 100%,
109
+ 0% 0%
110
+ );
111
+ }
112
+ 15% {
113
+ clip-path: polygon(
114
+ 0% 0%,
115
+ 0% 100%,
116
+ 100% 100%,
117
+ 100% 0%
118
+ );
119
+ }
120
+ 85% {
121
+ clip-path: polygon(
122
+ 0% 0%,
123
+ 0% 100%,
124
+ 100% 100%,
125
+ 100% 0%
126
+ );
127
+ }
128
+ 100% {
129
+ clip-path: polygon(
130
+ 100% 0%,
131
+ 100% 100%,
132
+ 100% 100%,
133
+ 100% 0%
134
+ );
135
+ }
136
+ }
137
+
138
+ .prompts-list li::after {
139
+ content: '✓ copied';
140
+ position: absolute;
141
+ left: 0;
142
+ right: 0;
143
+ top: 0;
144
+ bottom: 0;
145
+ background-color: green;
146
+ border-radius: 0.5rem;
147
+ visibility: hidden;
148
+ padding-top: 0.75em;
149
+ padding-left: 1em;
150
+
151
+ /* without this it sometimes glitched at the end? */
152
+ clip-path: polygon(
153
+ 0% 0%,
154
+ 0% 100%,
155
+ 0% 100%,
156
+ 0% 0%
157
+ );
158
+
159
+ }
160
+
161
+ .prompts-list li.clicked::after {
162
+ visibility: visible;
163
+ animation-duration: 1.5s;
164
+ animation-name: wipe-in-out;
165
+ }
@@ -12,8 +12,20 @@ import './App.css';
12
12
 
13
13
  const hasUploadPreset = Boolean(uploadPreset);
14
14
 
15
+ const PROMPTS_WITH_UPLOAD = [
16
+ 'Create an image gallery with lazy loading and responsive images',
17
+ 'Create a video player that plays a Cloudinary video',
18
+ 'Add image overlays with text or logos',
19
+ ];
20
+
21
+ const PROMPTS_WITHOUT_UPLOAD = [
22
+ "Let's try uploading — help me add an upload preset and upload widget",
23
+ ...PROMPTS_WITH_UPLOAD,
24
+ ];
25
+
15
26
  function App() {
16
27
  const [uploadedImageId, setUploadedImageId] = useState<string | null>(null);
28
+ const [clickedIds, setClickedIds] = useState(new Set<number>());
17
29
 
18
30
  const handleUploadSuccess = (result: CloudinaryUploadResult) => {
19
31
  console.log('Upload successful:', result);
@@ -25,9 +37,15 @@ function App() {
25
37
  alert(`Upload failed: ${error.message}`);
26
38
  };
27
39
 
28
- const copyPrompt = (e: React.MouseEvent<HTMLLIElement>) => {
29
- const text = e.currentTarget.textContent ?? '';
30
- void navigator.clipboard.writeText(text);
40
+ const copyPrompt = (text: string, id: number) => {
41
+ void navigator.clipboard.writeText(text).then(() => {
42
+ setClickedIds((prev) => new Set(prev).add(id));
43
+ setTimeout(() => setClickedIds( (prev) => {
44
+ const next = new Set(prev);
45
+ next.delete(id);
46
+ return next;
47
+ }), 2000);
48
+ });
31
49
  };
32
50
 
33
51
  // Display uploaded image if available, otherwise show a sample
@@ -75,20 +93,16 @@ function App() {
75
93
  <strong>Copy and paste</strong> one of these prompts into your AI assistant:
76
94
  </p>
77
95
  <ul className="prompts-list">
78
- {hasUploadPreset ? (
79
- <>
80
- <li onClick={copyPrompt} title="Click to copy">Create an image gallery with lazy loading and responsive images</li>
81
- <li onClick={copyPrompt} title="Click to copy">Create a video player that plays a Cloudinary video</li>
82
- <li onClick={copyPrompt} title="Click to copy">Add image overlays with text or logos</li>
83
- </>
84
- ) : (
85
- <>
86
- <li onClick={copyPrompt} title="Click to copy">Let&apos;s try uploading — help me add an upload preset and upload widget</li>
87
- <li onClick={copyPrompt} title="Click to copy">Create an image gallery with lazy loading and responsive images</li>
88
- <li onClick={copyPrompt} title="Click to copy">Create a video player that plays a Cloudinary video</li>
89
- <li onClick={copyPrompt} title="Click to copy">Add image overlays with text or logos</li>
90
- </>
91
- )}
96
+ {(hasUploadPreset ? PROMPTS_WITH_UPLOAD : PROMPTS_WITHOUT_UPLOAD).map((text, i) => (
97
+ <li
98
+ key={i}
99
+ onClick={() => copyPrompt(text, i)}
100
+ title="Click to copy"
101
+ className={clickedIds.has(i) ? 'clicked' : ''}
102
+ >
103
+ {text}
104
+ </li>
105
+ ))}
92
106
  </ul>
93
107
  </div>
94
108
  </main>