softr-vibe-coding 1.3.1 → 1.3.3

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
@@ -4,8 +4,16 @@ All notable changes to this skill are documented here. Versions follow [Semantic
4
4
 
5
5
  Entries from 1.3.1 onward are generated automatically from git commit subjects between version bumps (see `.github/workflows/publish.yml`). Entries before 1.3.1 were backfilled by hand from the existing commit history.
6
6
 
7
+ ## [1.3.3] - 2026-05-21
8
+ - Document field-type write shapes (Date, Date Range, Multi-Select, Checkbox, Attachment, Number); add async uploadAsync example; show useChartData bucket sample outputs; bump to 1.3.3
9
+
10
+ ## [1.3.2] - 2026-05-21
11
+ - Fix CHANGELOG anchor detection in publish workflow; bump to 1.3.2
12
+
7
13
  ## [1.3.1] - 2026-05-21
8
- - (no notable changes)
14
+ - Add CHANGELOG.md with auto-generation on publish (workflow now prepends a new entry from commit subjects between version bumps and commits the updated CHANGELOG.md back to main with `[skip ci]`)
15
+ - Backfill CHANGELOG.md entries for 1.0.0 → 1.3.0 from existing git history
16
+ - Add CHANGELOG.md to the npm tarball via package.json `files`
9
17
 
10
18
  ## [1.3.0] - 2026-05-21
11
19
  - Cross-link Airtable data source ↔ automation scripts (`datasources/airtable.md` and `datasources/writing.md` now point to `references/airtable-automations.md`)
@@ -212,7 +212,17 @@ var result = useChartData({
212
212
  });
213
213
  ```
214
214
 
215
- Grouping buckets: `metric.bucket.year`, `metric.bucket.month.iso`, `metric.bucket.month.long`, `metric.bucket.day.iso`, `metric.bucket.day.long`
215
+ **Grouping buckets** pick by what you want the x-axis to show:
216
+
217
+ | Bucket constant | Sample output | Use for |
218
+ |---|---|---|
219
+ | `metric.bucket.year` | `"2025"` | Yearly trends |
220
+ | `metric.bucket.month.iso` | `"2025-03"` | Monthly trends, sortable x-axis |
221
+ | `metric.bucket.month.long` | `"March 2025"` | Monthly trends, human-readable labels |
222
+ | `metric.bucket.day.iso` | `"2025-03-15"` | Daily trends, sortable x-axis |
223
+ | `metric.bucket.day.long` | `"Mar 15, 2025"` | Daily trends, human-readable labels |
224
+
225
+ Pair `.iso` variants with `orderBy: q.asc(...)` for correct chronological sorting; use `.long` variants when the bucket value is rendered directly as a label.
216
226
 
217
227
  Use **recharts** with shadcn's chart wrapper:
218
228
 
@@ -180,6 +180,22 @@ upload.uploadAsync(file).then(function(results) {
180
180
  });
181
181
  ```
182
182
 
183
+ ### Async/await style
184
+
185
+ The official Softr Vibe Coding docs use this form; it's more ergonomic when uploading inside a larger async flow:
186
+
187
+ ```jsx
188
+ var [result] = await upload.uploadAsync(file);
189
+ if (result.status === "completed") {
190
+ createRecord.mutate(
191
+ { fields: { attachment: { filename: result.file.name, url: result.url } } },
192
+ { onSuccess: function() { toast.success("Saved"); } }
193
+ );
194
+ }
195
+ ```
196
+
197
+ **Stick with `.mutate(...)` even inside async functions** — don't switch to `.mutateAsync(...)` just for the await ergonomics. Softr's Action parser only recognizes the `.mutate(` token, so any mutation written as `.mutateAsync(` produces no derived Action and `enabled` stays `false` (see "Two parser requirements for `useRecordUpdate`" below).
198
+
183
199
  ## Linked Record Format for Mutations
184
200
 
185
201
  ```jsx
@@ -231,6 +247,92 @@ Verified by direct experiment (April 2026) for `useRecordCreate`. The same patte
231
247
 
232
248
  Array of `{ id }` objects. See "Linked Record Format for Mutations" above.
233
249
 
250
+ ### Multi-Select
251
+
252
+ Array of option UUIDs as plain strings — mirrors Single Select but wrapped in an array:
253
+
254
+ ```jsx
255
+ // CORRECT
256
+ createRecord.mutate({ tags: ["uuid-1", "uuid-2"] });
257
+
258
+ // WRONG -- {id, label} objects (returned on read, rejected on write)
259
+ tags: [{ id: "uuid-1", label: "Urgent" }]
260
+
261
+ // WRONG -- display labels
262
+ tags: ["Urgent", "Internal"]
263
+ ```
264
+
265
+ _Inferred from the read shape (see [fields.md](fields.md)); verify by experiment before production use._
266
+
267
+ ### Number
268
+
269
+ Plain JS number, not string:
270
+
271
+ ```jsx
272
+ createRecord.mutate({ price: 49.99, quantity: 3 });
273
+ ```
274
+
275
+ To clear, `null` works on Softr Database (`""` is invalid for numeric fields). Other data sources not independently verified.
276
+
277
+ ### Checkbox
278
+
279
+ Boolean `true` / `false`:
280
+
281
+ ```jsx
282
+ createRecord.mutate({ isActive: true });
283
+ ```
284
+
285
+ **Softr Database** also accepts the string forms `"true"` / `"false"` (mirrors the `string or boolean` read shape — see [fields.md](fields.md)). **Google Sheets** requires the string form, not native booleans — see [google-sheets.md](google-sheets.md). Other data sources expected to accept the boolean form but not independently verified.
286
+
287
+ ### Date
288
+
289
+ ISO string. Date-only fields take `YYYY-MM-DD`; date-time fields take the full ISO form:
290
+
291
+ ```jsx
292
+ // Date-only field
293
+ createRecord.mutate({ dueDate: "2025-03-15" });
294
+
295
+ // Date-time field — use new Date().toISOString() for current timestamp
296
+ createRecord.mutate({ lastSeenAt: "2025-03-15T14:00:00Z" });
297
+ ```
298
+
299
+ _Inferred from the read shape (see [fields.md](fields.md)); verify by experiment before production use._
300
+
301
+ ### Date Range
302
+
303
+ Object with `from` and `to` ISO strings — mirrors the read shape (`{ from, to }` per [fields.md](fields.md)):
304
+
305
+ ```jsx
306
+ createRecord.mutate({
307
+ bookingWindow: { from: "2025-03-15", to: "2025-03-20" },
308
+ });
309
+ ```
310
+
311
+ _Inferred from the read shape (see [fields.md](fields.md)); verify by experiment before production use._
312
+
313
+ ### Attachment
314
+
315
+ `{ filename, url }` for a single attachment, or an array of those objects for multi-attachment fields:
316
+
317
+ ```jsx
318
+ // Single attachment
319
+ createRecord.mutate({
320
+ document: { filename: "report.pdf", url: "https://..." },
321
+ });
322
+
323
+ // Multiple attachments
324
+ createRecord.mutate({
325
+ gallery: [
326
+ { filename: "photo1.jpg", url: "https://..." },
327
+ { filename: "photo2.jpg", url: "https://..." },
328
+ ],
329
+ });
330
+ ```
331
+
332
+ To upload a file before writing it to a record, see [File Uploads](#file-uploads) above for the full `useUpload` flow.
333
+
334
+ _Shape matches the example shown in [File Uploads](#file-uploads). Not yet independently verified across all data sources._
335
+
234
336
  ### Text / Email / URL / Phone
235
337
 
236
338
  Plain string. To clear a value, both `null` and `""` work for Softr Database text fields (verified by direct experiment, May 2026, for `useRecordUpdate`). Behavior on other data sources has not been independently verified.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "softr-vibe-coding",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Claude Code skill for generating production-ready Softr Vibe Coding blocks (JSX). Installs into ~/.claude/skills/ and auto-updates on each Claude Code session.",
5
5
  "bin": {
6
6
  "softr-vibe-coding": "./bin/cli.js"