@declarion/react 0.43.0 → 0.45.0
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/dist-lib/{DraggableChildrenTable-G4Sw1XAD.js → DraggableChildrenTable-BDnJK0AU.js} +38 -38
- package/dist-lib/{Grid-CXn-IK3H.js → Grid-CcCveEE7.js} +2 -2
- package/dist-lib/{LayoutRenderer-DX8pFS5A.js → LayoutRenderer-BReuhVdX.js} +377 -377
- package/dist-lib/{MarkdownRenderer-CreI9x2m.js → MarkdownRenderer-DPKDFR60.js} +1 -1
- package/dist-lib/{RefreshControl-DFh0-gCb.js → RefreshControl-KddgOhUG.js} +166 -166
- package/dist-lib/{SmartDetailPage.impl-K6Jj1-9z.js → SmartDetailPage.impl-D_hMxiHy.js} +589 -562
- package/dist-lib/{SmartRecordListPage.impl-DQW_uVfL.js → SmartRecordListPage.impl-GIo_mPIJ.js} +182 -182
- package/dist-lib/api/agents.d.ts +3 -2
- package/dist-lib/components/pages/exportRequest.d.ts +3 -3
- package/dist-lib/components/pages/list/filter-meta.d.ts +22 -8
- package/dist-lib/hooks/useCursorEntityData.d.ts +3 -2
- package/dist-lib/index.js +1436 -1528
- package/dist-lib/lib/anchor.d.ts +37 -0
- package/dist-lib/{registry-r4hiflwC.js → registry-DJKp0yaV.js} +564 -564
- package/dist-lib/testing.js +10 -10
- package/dist-lib/types/api.d.ts +3 -10
- package/dist-lib/types/schema.d.ts +25 -13
- package/dist-lib/{useCurrentScreen-CpQjVmrT.js → useCurrentScreen-A3xZDs7U.js} +1255 -1207
- package/dist-lib/{useProperties-CULxrNT4.js → useProperties-TlltWwLv.js} +33 -33
- package/dist-lib/{value-fUHxMV4r.js → value-CHY7LgZ-.js} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The anchor expression, TypeScript side.
|
|
3
|
+
*
|
|
4
|
+
* One grammar for "a moment relative to now", shared with the server
|
|
5
|
+
* (golang/internal/engine/anchor.go + duration.go). The language boundary is
|
|
6
|
+
* the only reason there are two implementations; nothing else may declare a
|
|
7
|
+
* third.
|
|
8
|
+
*
|
|
9
|
+
* now the current instant
|
|
10
|
+
* now+3w three weeks ahead
|
|
11
|
+
* now-1d one day back
|
|
12
|
+
* now+3w-1d the offsets compose, left to right
|
|
13
|
+
*
|
|
14
|
+
* Units are Go's plus `d` (24h) and `w` (7d). Calendar units `y` and `mo` are
|
|
15
|
+
* refused: they have no fixed length, so `1mo` from the 31st has no answer this
|
|
16
|
+
* platform is willing to invent.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* One magnitude, and the running total of an anchor's offsets, may not exceed
|
|
20
|
+
* 100 years. Beyond that the server's arithmetic saturates and `now+N` and
|
|
21
|
+
* `now-N` collapse to the same instant - a predicate written to match nothing
|
|
22
|
+
* matching everything. The client refuses the same inputs so a template that
|
|
23
|
+
* would fail on the server does not silently produce a different moment here.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MAX_DURATION_MAGNITUDE_MS: number;
|
|
26
|
+
/** At most this many signed offsets in one anchor expression. */
|
|
27
|
+
export declare const MAX_ANCHOR_OFFSETS = 8;
|
|
28
|
+
/** Parse one unsigned magnitude (`3w`, `1h30m`). Returns null when invalid. */
|
|
29
|
+
export declare function parseDurationMagnitudeMs(text: string): number | null;
|
|
30
|
+
/**
|
|
31
|
+
* Parse an anchor expression WITHOUT any surface wrapper - `now`, `now+3w`,
|
|
32
|
+
* `now+3w-1d` - and return the summed offset in milliseconds. Returns null when
|
|
33
|
+
* the text is not a valid anchor expression, which the caller surfaces the way
|
|
34
|
+
* it surfaces any unresolved token: by leaving the template visible rather than
|
|
35
|
+
* writing a wrong moment.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseAnchorOffsetMs(expr: string): number | null;
|