@declarion/react 0.47.0 → 0.48.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-B6KjWkwD.js → DraggableChildrenTable-p2ZSdwzj.js} +1 -1
- package/dist-lib/{Grid-OdquWJNX.js → Grid-CjLFAKMZ.js} +2 -2
- package/dist-lib/{LayoutRenderer-CzAdhjNT.js → LayoutRenderer-X3p4yfo_.js} +124 -118
- package/dist-lib/{MarkdownRenderer-C6bhrAIe.js → MarkdownRenderer-Sb7zcvj0.js} +1 -1
- package/dist-lib/{RefreshControl-F9Ib9asP.js → RefreshControl-Cnl9nE0x.js} +255 -225
- package/dist-lib/{SmartDetailPage.impl-DdSu3kmW.js → SmartDetailPage.impl-bb0UNOII.js} +465 -463
- package/dist-lib/{SmartRecordListPage.impl-SkIp0_Rd.js → SmartRecordListPage.impl-BFh8auUZ.js} +141 -139
- package/dist-lib/api/agents.d.ts +8 -11
- package/dist-lib/components/agents/AgentChatPanel.d.ts +1 -0
- package/dist-lib/components/agents/AgentPicker.d.ts +9 -0
- package/dist-lib/components/primitives/Tooltip.d.ts +4 -0
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +10 -5
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/hooks/useAgentConversation.d.ts +5 -7
- package/dist-lib/hooks/useBrandingChrome.d.ts +11 -0
- package/dist-lib/hooks/useLongPress.d.ts +29 -0
- package/dist-lib/hooks/useResponsiveMode.d.ts +2 -21
- package/dist-lib/index.d.ts +2 -2
- package/dist-lib/index.js +2351 -2144
- package/dist-lib/lib/actions.d.ts +12 -4
- package/dist-lib/lib/longPressGesture.d.ts +55 -0
- package/dist-lib/lib/page-inset.d.ts +3 -0
- package/dist-lib/lib/viewport-category.d.ts +44 -0
- package/dist-lib/{registry-C2VD-5MD.js → registry-CWDnxiLJ.js} +1013 -954
- package/dist-lib/testing.js +10 -10
- package/dist-lib/types/api.d.ts +15 -2
- package/dist-lib/{useCurrentScreen-ow4r-nWa.js → useCurrentScreen-BshVTPVq.js} +979 -971
- package/dist-lib/{useProperties-lEKfzm2X.js → useProperties-B5p9mIH8.js} +2 -2
- package/dist-lib/{value-CXohNH6a.js → value-B1O6QikE.js} +1 -1
- package/package.json +1 -1
- package/dist-lib/components/agents/AgentVisualHints.d.ts +0 -6
|
@@ -96,11 +96,19 @@ export declare function actionNeedsConfirm(action: Action | undefined): boolean;
|
|
|
96
96
|
* Precedence: disabled-reason > description > name.
|
|
97
97
|
*
|
|
98
98
|
* A labeled control already shows the name, so its tooltip is the description
|
|
99
|
-
* alone
|
|
100
|
-
*
|
|
101
|
-
*
|
|
99
|
+
* alone. A control with no visible label - declared `display.icon_only`, or a
|
|
100
|
+
* label the bar dropped to keep the button in a tight row - leads with the NAME
|
|
101
|
+
* on its own line, then the description. Absent description falls back to the
|
|
102
|
+
* name.
|
|
102
103
|
*/
|
|
103
|
-
export declare function actionTooltip(action: Action | undefined, name: string, isDisabled: boolean, reason: string | null | undefined
|
|
104
|
+
export declare function actionTooltip(action: Action | undefined, name: string, isDisabled: boolean, reason: string | null | undefined,
|
|
105
|
+
/**
|
|
106
|
+
* True when the button is rendering WITHOUT its label right now - either
|
|
107
|
+
* because the author declared `display.icon_only`, or because the row ran out
|
|
108
|
+
* of width and the bar dropped the label to keep the button. Both cases leave
|
|
109
|
+
* the user looking at an icon, so the tooltip has to say the name first.
|
|
110
|
+
*/
|
|
111
|
+
labelHidden?: boolean): string;
|
|
104
112
|
/**
|
|
105
113
|
* Builds the full dot-qualified action code for API calls.
|
|
106
114
|
*/
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How long a press is held before it becomes a Row Menu request. 500ms is what
|
|
3
|
+
* Android and iOS both use for their own long-press, so a user's thumb already
|
|
4
|
+
* knows this number.
|
|
5
|
+
*/
|
|
6
|
+
export declare const LONG_PRESS_HOLD_MS = 500;
|
|
7
|
+
/**
|
|
8
|
+
* How far the pointer may drift and still be a press. Past this the gesture is a
|
|
9
|
+
* scroll, and a list that opens menus while the user is scrolling it is worse
|
|
10
|
+
* than one with no long-press at all.
|
|
11
|
+
*/
|
|
12
|
+
export declare const LONG_PRESS_MOVE_TOLERANCE_PX = 10;
|
|
13
|
+
/** Where a press started. `null` means no press is in progress. */
|
|
14
|
+
export type PressOrigin = {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
} | null;
|
|
18
|
+
export type LongPressInput = {
|
|
19
|
+
type: "down";
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
}
|
|
23
|
+
/** Pointer moved, or the surface under it scrolled. */
|
|
24
|
+
| {
|
|
25
|
+
type: "move";
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}
|
|
29
|
+
/** Released, cancelled by the OS, or the element lost the pointer. */
|
|
30
|
+
| {
|
|
31
|
+
type: "release";
|
|
32
|
+
}
|
|
33
|
+
/** The hold timer elapsed. */
|
|
34
|
+
| {
|
|
35
|
+
type: "held";
|
|
36
|
+
};
|
|
37
|
+
export type LongPressOutcome =
|
|
38
|
+
/** A press is in progress; keep the timer running. */
|
|
39
|
+
"pending"
|
|
40
|
+
/** No press is in progress; cancel any timer. */
|
|
41
|
+
| "idle"
|
|
42
|
+
/** Open the Row Menu at the press origin. */
|
|
43
|
+
| "fire";
|
|
44
|
+
export interface LongPressStep {
|
|
45
|
+
origin: PressOrigin;
|
|
46
|
+
outcome: LongPressOutcome;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Advances the gesture. Returns the new origin and what the caller should do.
|
|
50
|
+
*
|
|
51
|
+
* A `held` without an origin cannot fire: the timer is cleared on every exit,
|
|
52
|
+
* but a timer that has already been queued when the press ends would otherwise
|
|
53
|
+
* open a menu after the user let go.
|
|
54
|
+
*/
|
|
55
|
+
export declare function stepLongPress(origin: PressOrigin, input: LongPressInput, tolerance?: number): LongPressStep;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type ViewportCategory = "phone" | "tablet" | "desktop";
|
|
2
|
+
export interface ResponsiveBreakpoints {
|
|
3
|
+
phoneMax: number;
|
|
4
|
+
tabletMax: number;
|
|
5
|
+
/**
|
|
6
|
+
* The height at or below which a viewport no wider than `tabletMax` is a
|
|
7
|
+
* phone held sideways. Required, never optional: a missing bound would
|
|
8
|
+
* silently restore the width-only rule, which is the defect it exists to
|
|
9
|
+
* remove.
|
|
10
|
+
*/
|
|
11
|
+
landscapePhoneMaxHeight: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ResponsiveViewport {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
touch?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ResponsiveMode {
|
|
19
|
+
category: ViewportCategory;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
isPhone: boolean;
|
|
23
|
+
isTablet: boolean;
|
|
24
|
+
isDesktop: boolean;
|
|
25
|
+
touch: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const DEFAULT_RESPONSIVE_BREAKPOINTS: ResponsiveBreakpoints;
|
|
28
|
+
/**
|
|
29
|
+
* The device class, from BOTH viewport axes.
|
|
30
|
+
*
|
|
31
|
+
* A phone is a device, not a width. Read from width alone, the same phone is a
|
|
32
|
+
* phone upright and a tablet on its side - so rotating it swapped cards for a
|
|
33
|
+
* table, sections for tabs, and the compact header for the desktop one, all at
|
|
34
|
+
* once. The second clause is that device: no wider than a tablet AND short.
|
|
35
|
+
*
|
|
36
|
+
* Height is admitted only UNDER the tablet width ceiling, because a wide short
|
|
37
|
+
* window (a 1600x480 browser, a wide embed strip) is a desktop, and a height
|
|
38
|
+
* clause without the ceiling would reclassify it.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveViewportCategory(viewport: {
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
touch?: boolean;
|
|
44
|
+
}, breakpoints?: ResponsiveBreakpoints): ViewportCategory;
|