@declarion/react 0.2.0 → 0.2.2
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-BFkRqNSe.js +261 -0
- package/dist-lib/DraggableChildrenTable-BFkRqNSe.js.map +1 -0
- package/dist-lib/{Grid-C69-4exi.js → Grid-pE2-dvug.js} +2 -2
- package/dist-lib/{Grid-C69-4exi.js.map → Grid-pE2-dvug.js.map} +1 -1
- package/dist-lib/api/client.d.ts +7 -0
- package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +2 -1
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +13 -0
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +15 -0
- package/dist-lib/components/detail-layout/ErrorSummary.d.ts +11 -0
- package/dist-lib/components/detail-layout/FieldRow.d.ts +22 -0
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +2 -0
- package/dist-lib/components/detail-layout/LayoutTabs.d.ts +1 -3
- package/dist-lib/components/detail-layout/blockMeta.d.ts +4 -0
- package/dist-lib/components/detail-layout/index.d.ts +4 -0
- package/dist-lib/components/fields/JsonField.d.ts +1 -0
- package/dist-lib/components/fields/cells/factories/emptyCell.d.ts +2 -0
- package/dist-lib/components/primitives/SectionCard.d.ts +6 -1
- package/dist-lib/components/primitives/dataTableStyles.d.ts +4 -0
- package/dist-lib/components/primitives/index.d.ts +1 -1
- package/dist-lib/components/shared/AuditMetaStrip.d.ts +11 -0
- package/dist-lib/components/shared/HighlightsStrip.d.ts +10 -0
- package/dist-lib/components/shared/RecordHeader.d.ts +15 -0
- package/dist-lib/components/shared/StatusStepper.d.ts +13 -0
- package/dist-lib/components/shared/toast/DeclarionToast.d.ts +31 -0
- package/dist-lib/{useUserLocale-GBIXbEE6.js → dataTableStyles-B40JEa-3.js} +1778 -1678
- package/dist-lib/dataTableStyles-B40JEa-3.js.map +1 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/index.js +6183 -5176
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/lib/toast.d.ts +49 -16
- package/dist-lib/stores/appearance.d.ts +3 -0
- package/dist-lib/types/schema.d.ts +13 -0
- package/dist-lib/{value-DFpIiSZ-.js → value-qao1rdkR.js} +149 -120
- package/dist-lib/value-qao1rdkR.js.map +1 -0
- package/package.json +1 -1
- package/dist-lib/DraggableChildrenTable-IfspXSFA.js +0 -281
- package/dist-lib/DraggableChildrenTable-IfspXSFA.js.map +0 -1
- package/dist-lib/useUserLocale-GBIXbEE6.js.map +0 -1
- package/dist-lib/value-DFpIiSZ-.js.map +0 -1
- /package/dist-lib/components/fields/cells/factories/{markdownToPlainText.d.ts → markdownPreview.d.ts} +0 -0
package/dist-lib/lib/toast.d.ts
CHANGED
|
@@ -1,16 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { type ToastType } from "../components/shared/toast/DeclarionToast";
|
|
2
|
+
export type { ToastType, ToastAction } from "../components/shared/toast/DeclarionToast";
|
|
3
|
+
/** Per-call toast options. Severity sets the defaults; these override them. */
|
|
4
|
+
export interface ToastOptions {
|
|
5
|
+
/** Auto-dismiss after this many ms. 0 = sticky. Defaults to the variant's. */
|
|
6
|
+
duration?: number;
|
|
7
|
+
/** Force sticky (never auto-dismiss) regardless of duration. */
|
|
8
|
+
sticky?: boolean;
|
|
9
|
+
/** Trailing action button - e.g. View / Retry / Undo / Reload. */
|
|
10
|
+
action?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
/** Correlation id, shown top-right in mono, included when the user copies. */
|
|
15
|
+
requestId?: string;
|
|
16
|
+
/** Expandable detail block (stack trace, server payload). */
|
|
17
|
+
details?: string;
|
|
18
|
+
/** Repeats sharing a `group` roll up into one toast with a ×N badge. */
|
|
19
|
+
group?: string;
|
|
20
|
+
/** Explicit id - reuse to replace an existing toast in place (idempotent). */
|
|
21
|
+
id?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Fields a loading toast can morph into when its async work resolves. */
|
|
24
|
+
export interface ToastUpdate {
|
|
25
|
+
type?: ToastType;
|
|
26
|
+
title?: string;
|
|
27
|
+
message?: string;
|
|
28
|
+
duration?: number;
|
|
29
|
+
sticky?: boolean;
|
|
30
|
+
action?: {
|
|
31
|
+
label: string;
|
|
32
|
+
onClick: () => void;
|
|
33
|
+
};
|
|
34
|
+
requestId?: string;
|
|
35
|
+
details?: string;
|
|
36
|
+
}
|
|
37
|
+
/** Morph an existing toast in place - the loading -> success/error path. */
|
|
38
|
+
declare function update(id: string, patch: ToastUpdate): void;
|
|
39
|
+
/** The app-wide toast API. Import this - not `sonner` - everywhere. */
|
|
40
|
+
export declare const toast: {
|
|
41
|
+
success: (title: string, message?: string, opts?: ToastOptions) => string;
|
|
42
|
+
info: (title: string, message?: string, opts?: ToastOptions) => string;
|
|
43
|
+
warning: (title: string, message?: string, opts?: ToastOptions) => string;
|
|
44
|
+
error: (title: string, message?: string, opts?: ToastOptions) => string;
|
|
45
|
+
loading: (title: string, message?: string, opts?: ToastOptions) => string;
|
|
46
|
+
update: typeof update;
|
|
47
|
+
dismiss: (id: string) => string | number;
|
|
48
|
+
dismissAll: () => string | number;
|
|
49
|
+
};
|
|
@@ -5,6 +5,7 @@ export type SidebarMode = "wide" | "collapsed";
|
|
|
5
5
|
export type TabsPosition = "top" | "bottom";
|
|
6
6
|
export type AiSurface = "command" | "panel" | "both" | "off";
|
|
7
7
|
export type FaviconSource = "google" | "direct" | "none";
|
|
8
|
+
export type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
8
9
|
export interface Appearance {
|
|
9
10
|
theme: ThemeId;
|
|
10
11
|
accent: AccentId;
|
|
@@ -19,6 +20,8 @@ export interface Appearance {
|
|
|
19
20
|
aiSurface: AiSurface;
|
|
20
21
|
/** Favicon source for unknown hosts in URL cells. See ui_favicon_source. */
|
|
21
22
|
faviconSource: FaviconSource;
|
|
23
|
+
/** Where toasts appear. Read by <Toaster> in app.tsx. See ui_toast_position. */
|
|
24
|
+
toastPosition: ToastPosition;
|
|
22
25
|
}
|
|
23
26
|
export declare function applyAppearance(a: Appearance): void;
|
|
24
27
|
interface AppearanceState extends Appearance {
|
|
@@ -172,6 +172,7 @@ export interface StatusGroupDef {
|
|
|
172
172
|
initial: string;
|
|
173
173
|
statuses: StatusDef[];
|
|
174
174
|
transitions?: Record<string, string[]>;
|
|
175
|
+
display_mode?: "pill" | "stepper";
|
|
175
176
|
}
|
|
176
177
|
export interface PropertyDef {
|
|
177
178
|
name: LocalizedString;
|
|
@@ -338,6 +339,7 @@ export interface SectionNode {
|
|
|
338
339
|
columns?: number;
|
|
339
340
|
icon?: string;
|
|
340
341
|
badge?: SectionBadgeConfig;
|
|
342
|
+
emphasis?: "primary" | "secondary";
|
|
341
343
|
}
|
|
342
344
|
export interface RowConfig {
|
|
343
345
|
items: LayoutNode[];
|
|
@@ -389,6 +391,15 @@ export interface LayoutNode {
|
|
|
389
391
|
position_field?: string;
|
|
390
392
|
interaction?: "navigate" | "inline_edit" | "row_edit" | "readonly";
|
|
391
393
|
}
|
|
394
|
+
export interface AuditLineDef {
|
|
395
|
+
label: LocalizedString;
|
|
396
|
+
at?: string;
|
|
397
|
+
by?: string;
|
|
398
|
+
}
|
|
399
|
+
export interface AuditConfig {
|
|
400
|
+
enabled?: boolean;
|
|
401
|
+
lines?: AuditLineDef[];
|
|
402
|
+
}
|
|
392
403
|
export interface Screen {
|
|
393
404
|
type: "list" | "detail" | "custom" | "record_list";
|
|
394
405
|
entity?: string;
|
|
@@ -409,6 +420,8 @@ export interface Screen {
|
|
|
409
420
|
items?: LayoutNode[];
|
|
410
421
|
sidebar?: LayoutNode[];
|
|
411
422
|
sidebar_width?: string;
|
|
423
|
+
highlights?: string[];
|
|
424
|
+
audit?: AuditConfig;
|
|
412
425
|
self?: boolean;
|
|
413
426
|
list_width?: string;
|
|
414
427
|
list_resizable?: boolean;
|