@stacksjs/defaults 0.75.115 → 0.75.117
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/ai/skills/stacks-database/SKILL.md +9 -0
- package/ai/skills/stacks-datetime/SKILL.md +20 -0
- package/ai/skills/stacks-native/CATALOG.md +3 -3
- package/ai/skills/stacks-stx/SKILL.md +13 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +2 -2
- package/resources/components/NativeComponents.test.ts +2 -1
|
@@ -373,3 +373,12 @@ application timestamp representation. Mixing SQLite datetime text with
|
|
|
373
373
|
application ISO text in raw comparisons can give wrong expiry boundaries.
|
|
374
374
|
Source: core/database/src/types.ts and sql-helpers.ts; see stacks-query-builder
|
|
375
375
|
for typed tables, raw binding, transaction handles and replica routing.
|
|
376
|
+
|
|
377
|
+
## Group row locks
|
|
378
|
+
|
|
379
|
+
lockRows(tx, table, ids, { key?, scope? }) from database/runtime acquires
|
|
380
|
+
unique numeric primary keys in deterministic order and returns a map keyed by their
|
|
381
|
+
canonical numeric string value, so padded numeric inputs cannot reverse lock order. Missing scoped rows map to undefined. The caller must supply a
|
|
382
|
+
transaction handle and choose ownership filters; reads, writes and validation
|
|
383
|
+
remain on that handle. This prevents opposite input order from creating a
|
|
384
|
+
lock-order cycle during a transfer, merge or multi-item stock reservation.
|
|
@@ -291,3 +291,23 @@ UTC, and returns `{ date, time, timeZone }` from one instant. Supply site and
|
|
|
291
291
|
organization zones in that order. Missing/invalid zones fall through; an
|
|
292
292
|
invalid instant throws. The output uses YYYY-MM-DD and HH:mm and is suitable
|
|
293
293
|
for comparing local schedule dates and end times, not for elapsed durations.
|
|
294
|
+
|
|
295
|
+
## Recurrences, coverage and local reporting periods
|
|
296
|
+
|
|
297
|
+
The pure schedule entry exports parseWeeklySchedule, expandWeeklySchedule,
|
|
298
|
+
clockMinutes, addClockMinutes and timeWindowsCover. Recurrence validation
|
|
299
|
+
rejects invalid weekday entries; expansion refuses excessive ranges and
|
|
300
|
+
midnight-crossing durations instead of silently truncating them. Adjacent
|
|
301
|
+
windows can cover one continuous slot. ScheduleInputError carries status 422.
|
|
302
|
+
|
|
303
|
+
localDateRange(from, to, ...zones) converts inclusive calendar days to an
|
|
304
|
+
exclusive-end UTC instant range in a selected valid zone, including DST days.
|
|
305
|
+
Its supported reporting dates are 0101-01-01 through 9999-12-30; unsupported
|
|
306
|
+
boundaries raise ScheduleInputError rather than normalizing to another year.
|
|
307
|
+
netHoursBetween(start, end, breaks) retains full precision; apply display or
|
|
308
|
+
monetary rounding at the final boundary. It performs duration arithmetic,
|
|
309
|
+
not jurisdiction-specific compensation or overtime decisions.
|
|
310
|
+
|
|
311
|
+
localTimeSpan(date, start, end, ...zones) converts a clock interval, including
|
|
312
|
+
next-day ends, to actual instants for cross-site/overnight overlap checks.
|
|
313
|
+
Equal endpoints and non-positive DST-normalized intervals are rejected.
|
|
@@ -36,7 +36,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
36
36
|
| `@stacksjs/config` | [`stacks-config`](../stacks-config/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/config/src/index.ts) | 15 |
|
|
37
37
|
| `@stacksjs/cron` | [`stacks-cron`](../stacks-cron/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cron/src/index.ts) | 4 |
|
|
38
38
|
| `@stacksjs/database` | [`stacks-database`](../stacks-database/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/database/src/index.ts) | 106 |
|
|
39
|
-
| `@stacksjs/datetime` | [`stacks-datetime`](../stacks-datetime/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/index.ts) |
|
|
39
|
+
| `@stacksjs/datetime` | [`stacks-datetime`](../stacks-datetime/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/index.ts) | 12 |
|
|
40
40
|
| `@stacksjs/defaults` | [`stacks-build`](../stacks-build/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/defaults/package.json) | 1 |
|
|
41
41
|
| `@stacksjs/deploy` | [`stacks-deploy`](../stacks-deploy/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/deploy/package.json) | 1 |
|
|
42
42
|
| `@stacksjs/desktop-build` | [`stacks-desktop`](../stacks-desktop/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/desktop/src/index.ts) | 11 |
|
|
@@ -359,9 +359,9 @@ Guidance: [`stacks-datetime`](../stacks-datetime/SKILL.md). Source: [storage/fra
|
|
|
359
359
|
|
|
360
360
|
Declared runtime exports: `DateTime`, `addCalendarMonths`, `dateFormat`, `format`, `isoInZone`, `localDateTime`, `now`, `parse`, `zoneOffsetMinutes`, `zonedTimeToUtc`.
|
|
361
361
|
|
|
362
|
-
Local source modules: [src/calendar.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/calendar.ts), [src/format.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/format.ts), [src/local.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/local.ts), [src/now.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/now.ts), [src/parse.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/parse.ts), [src/zone.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/zone.ts).
|
|
362
|
+
Local source modules: [src/calendar.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/calendar.ts), [src/format.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/format.ts), [src/local.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/local.ts), [src/now.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/now.ts), [src/parse.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/parse.ts), [src/schedule.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/schedule.ts), [src/zone.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/src/zone.ts).
|
|
363
363
|
|
|
364
|
-
Evidence directory: [
|
|
364
|
+
Evidence directory: [12 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/datetime/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
365
365
|
|
|
366
366
|
### @stacksjs/defaults
|
|
367
367
|
|
|
@@ -195,6 +195,19 @@ For account-persisted initial UI use `keptState` or `cachedQuery`, establish
|
|
|
195
195
|
sign-out. Use `clearServerData(key?)` after mutations invalidate hydration
|
|
196
196
|
data. Ordinary localStorage is a different persistence boundary.
|
|
197
197
|
|
|
198
|
+
### Live API state and offline caching
|
|
199
|
+
|
|
200
|
+
An enabled offline worker may answer API reads from its saved copy while it
|
|
201
|
+
refreshes in the background. For live job progress, connection status and
|
|
202
|
+
other reads whose stale answer could end a running operation, use
|
|
203
|
+
`fetch(url, { cache: 'no-store' })` and return
|
|
204
|
+
`Cache-Control: private, no-store` from the endpoint. STX >= 0.2.428 forwards
|
|
205
|
+
no-store requests directly to the network without reading, writing or falling
|
|
206
|
+
back to its offline cache; no-store responses also remove earlier saved copies.
|
|
207
|
+
A failed network read must remain a failed read, rather than appearing to
|
|
208
|
+
confirm that a background operation finished. Keep ordinary offline-capable
|
|
209
|
+
calendar and workout reads on their configured cache strategy.
|
|
210
|
+
|
|
198
211
|
## STX capability discovery
|
|
199
212
|
|
|
200
213
|
### Core
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.117",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.117",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@iconify-json/f7": "^1.2.2",
|
|
57
57
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
58
|
-
"@stacksjs/mobile": "^0.75.
|
|
58
|
+
"@stacksjs/mobile": "^0.75.117",
|
|
59
59
|
"@stacksjs/sanitizer": "^0.2.422",
|
|
60
60
|
"@xterm/addon-fit": "^0.11.0",
|
|
61
61
|
"@xterm/xterm": "^6.0.0",
|
|
@@ -263,7 +263,8 @@ describe('Native components feel native', () => {
|
|
|
263
263
|
// is-open follows `shown`, which present() sets only after the lifted
|
|
264
264
|
// sheet's closed style is worked out in the body.
|
|
265
265
|
expect(sheet).toContain("const sheetClass = derived(() => `${shown() ? 'is-open' : ''}")
|
|
266
|
-
expect(sheet).toContain('
|
|
266
|
+
expect(sheet).toContain('sheetPanel.getBoundingClientRect()')
|
|
267
|
+
expect(sheet.indexOf('sheetPanel.getBoundingClientRect()')).toBeLessThan(sheet.indexOf('shown.set(true)'))
|
|
267
268
|
expect(sheet.indexOf('putBack ??= liftToBody(element)')).toBeLessThan(sheet.indexOf('shown.set(true)'))
|
|
268
269
|
})
|
|
269
270
|
|