@declarion/react 0.1.33 → 0.1.34
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/api/params.d.ts +16 -2
- package/dist-lib/components/columns/ColumnPicker.d.ts +0 -5
- package/dist-lib/components/detail/DetailPage.d.ts +30 -0
- package/dist-lib/components/fields/MultilangField.d.ts +1 -1
- package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
- package/dist-lib/components/fields/RefField.d.ts +1 -1
- package/dist-lib/components/filters/FilterChips.d.ts +0 -6
- package/dist-lib/components/filters/FilterDrawer.d.ts +0 -6
- package/dist-lib/components/layout/Rail.d.ts +16 -0
- package/dist-lib/components/layout/Sidebar.d.ts +11 -1
- package/dist-lib/components/layout/TabStrip.d.ts +4 -0
- package/dist-lib/components/layout/TenantChip.d.ts +17 -0
- package/dist-lib/components/layout/TopBar.d.ts +11 -1
- package/dist-lib/components/list/BulkBar.d.ts +18 -0
- package/dist-lib/components/list/InlineEditCell.d.ts +15 -0
- package/dist-lib/components/list/ListPage.d.ts +34 -0
- package/dist-lib/components/list/QuickPeek.d.ts +36 -0
- package/dist-lib/components/list/RowMenu.d.ts +23 -0
- package/dist-lib/components/list/resolveActions.d.ts +67 -0
- package/dist-lib/components/pages/auth/AuthShell.d.ts +13 -0
- package/dist-lib/components/pages/auth/Forgot.d.ts +1 -0
- package/dist-lib/components/pages/auth/SignIn.d.ts +1 -0
- package/dist-lib/components/pages/auth/SignUp.d.ts +1 -0
- package/dist-lib/components/pages/auth/TwoFA.d.ts +1 -0
- package/dist-lib/components/pages/auth/icons.d.ts +6 -0
- package/dist-lib/components/pages/home/HomeStub.d.ts +6 -0
- package/dist-lib/components/pages/jobs/Jobs.d.ts +1 -0
- package/dist-lib/components/pages/pipeline/Pipeline.d.ts +1 -0
- package/dist-lib/components/pages/profile/Preferences.d.ts +1 -0
- package/dist-lib/components/pages/profile/Profile.d.ts +1 -0
- package/dist-lib/components/primitives/Avatar.d.ts +6 -0
- package/dist-lib/components/primitives/BoolToggle.d.ts +5 -0
- package/dist-lib/components/primitives/Btn.d.ts +19 -0
- package/dist-lib/components/primitives/Check.d.ts +7 -0
- package/dist-lib/components/primitives/Chip.d.ts +9 -0
- package/dist-lib/components/primitives/Dropdown.d.ts +11 -0
- package/dist-lib/components/primitives/Fields.d.ts +82 -0
- package/dist-lib/components/primitives/IconBtn.d.ts +11 -0
- package/dist-lib/components/primitives/Icons.d.ts +87 -0
- package/dist-lib/components/primitives/Kbd.d.ts +4 -0
- package/dist-lib/components/primitives/MenuItem.d.ts +11 -0
- package/dist-lib/components/primitives/Pill.d.ts +11 -0
- package/dist-lib/components/primitives/RowField.d.ts +10 -0
- package/dist-lib/components/primitives/SectionCard.d.ts +12 -0
- package/dist-lib/components/primitives/Spinner.d.ts +3 -0
- package/dist-lib/components/primitives/cx.d.ts +1 -0
- package/dist-lib/components/primitives/index.d.ts +29 -0
- package/dist-lib/components/shared/ActionConfirmDialog.d.ts +1 -1
- package/dist-lib/components/shared/ActionDialog.d.ts +1 -11
- package/dist-lib/components/shared/ActionResultDialog.d.ts +1 -1
- package/dist-lib/components/shared/ActionRunner.d.ts +21 -0
- package/dist-lib/components/shared/Breadcrumbs.d.ts +14 -0
- package/dist-lib/components/shared/ChangePasswordDialog.d.ts +9 -0
- package/dist-lib/components/shared/ConfirmDialog.d.ts +1 -1
- package/dist-lib/components/shared/CopyButton.d.ts +1 -1
- package/dist-lib/components/shared/DynamicIcon.d.ts +6 -3
- package/dist-lib/components/shared/ErrorBoundary.d.ts +0 -5
- package/dist-lib/components/shell/AIPanel.d.ts +6 -0
- package/dist-lib/components/shell/CommandPalette.d.ts +18 -0
- package/dist-lib/components/views/ViewSwitcher.d.ts +1 -7
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/hooks/useParams.d.ts +1 -1
- package/dist-lib/index.d.ts +47 -0
- package/dist-lib/index.js +14494 -8195
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/lib/child-config.d.ts +1 -0
- package/dist-lib/stores/appearance.d.ts +27 -0
- package/dist-lib/stores/tabs.d.ts +13 -0
- package/dist-lib/types/api.d.ts +22 -1
- package/dist-lib/types/ordmap.d.ts +32 -0
- package/dist-lib/types/schema.d.ts +133 -8
- package/package.json +1 -2
- package/dist-lib/components/layout/TabBar.d.ts +0 -1
- package/dist-lib/components/layout/ThemeToggle.d.ts +0 -1
- package/dist-lib/components/pages/LoginPage.d.ts +0 -1
- package/dist-lib/components/pages/SignupPage.d.ts +0 -1
- package/dist-lib/components/shared/BatchActionProgress.d.ts +0 -18
- package/dist-lib/components/ui/alert-dialog.d.ts +0 -14
- package/dist-lib/components/ui/badge.d.ts +0 -9
- package/dist-lib/components/ui/button.d.ts +0 -11
- package/dist-lib/components/ui/card.d.ts +0 -8
- package/dist-lib/components/ui/dialog.d.ts +0 -13
- package/dist-lib/components/ui/dropdown-menu.d.ts +0 -24
- package/dist-lib/components/ui/input.d.ts +0 -3
- package/dist-lib/components/ui/label.d.ts +0 -5
- package/dist-lib/components/ui/select.d.ts +0 -13
- package/dist-lib/components/ui/separator.d.ts +0 -4
- package/dist-lib/components/ui/skeleton.d.ts +0 -2
- package/dist-lib/components/ui/table.d.ts +0 -10
- package/dist-lib/components/ui/textarea.d.ts +0 -3
|
@@ -13,6 +13,7 @@ export interface ResolvedChildConfig {
|
|
|
13
13
|
quick_add?: ChildQuickAdd;
|
|
14
14
|
editable: boolean;
|
|
15
15
|
position_field?: string;
|
|
16
|
+
interaction: "navigate" | "inline_edit" | "readonly";
|
|
16
17
|
}
|
|
17
18
|
export declare function resolveChildConfig(relation: ChildRelation, childEntity: Entity, screenNode?: LayoutNode): ResolvedChildConfig;
|
|
18
19
|
export declare function inferSort(entity: Entity): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ThemeId = "light" | "dark" | string;
|
|
2
|
+
export type AccentId = "violet" | "blue" | "teal" | "amber" | "rose" | string;
|
|
3
|
+
export type Density = "compact" | "comfortable" | "cozy";
|
|
4
|
+
export type SidebarMode = "wide" | "collapsed";
|
|
5
|
+
export type TabsPosition = "top" | "bottom";
|
|
6
|
+
export type AiSurface = "command" | "panel" | "both" | "off";
|
|
7
|
+
export interface Appearance {
|
|
8
|
+
theme: ThemeId;
|
|
9
|
+
accent: AccentId;
|
|
10
|
+
density: Density;
|
|
11
|
+
sidebar: SidebarMode;
|
|
12
|
+
tabsPosition: TabsPosition;
|
|
13
|
+
tabsMaxOpen: number;
|
|
14
|
+
/** When false, tabs are not persisted across reloads (mirrors ui_tabs_persist). */
|
|
15
|
+
tabsPersist: boolean;
|
|
16
|
+
radius: number;
|
|
17
|
+
zebra: boolean;
|
|
18
|
+
aiSurface: AiSurface;
|
|
19
|
+
}
|
|
20
|
+
export declare function applyAppearance(a: Appearance): void;
|
|
21
|
+
interface AppearanceState extends Appearance {
|
|
22
|
+
set: <K extends keyof Appearance>(key: K, value: Appearance[K]) => void;
|
|
23
|
+
setMany: (patch: Partial<Appearance>) => void;
|
|
24
|
+
hydrateFromParams: (params: Record<string, unknown>) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const useAppearanceStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AppearanceState>>;
|
|
27
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type TabMode = "view" | "edit" | "create";
|
|
1
2
|
export interface TabItem {
|
|
2
3
|
id: string;
|
|
3
4
|
pathname: string;
|
|
@@ -5,6 +6,13 @@ export interface TabItem {
|
|
|
5
6
|
title: string;
|
|
6
7
|
icon?: string;
|
|
7
8
|
closable: boolean;
|
|
9
|
+
area?: string;
|
|
10
|
+
screen?: string;
|
|
11
|
+
navId?: string;
|
|
12
|
+
entity?: string;
|
|
13
|
+
record?: Record<string, unknown>;
|
|
14
|
+
mode?: TabMode;
|
|
15
|
+
dirty?: boolean;
|
|
8
16
|
}
|
|
9
17
|
interface TabState {
|
|
10
18
|
tabs: TabItem[];
|
|
@@ -16,6 +24,11 @@ interface TabState {
|
|
|
16
24
|
findTabByPathname: (pathname: string) => TabItem | undefined;
|
|
17
25
|
updateTabTitle: (id: string, title: string) => void;
|
|
18
26
|
updateTabSearch: (id: string, search: string) => void;
|
|
27
|
+
setDirty: (id: string, dirty: boolean) => void;
|
|
28
|
+
setMode: (id: string, mode: TabMode) => void;
|
|
29
|
+
updateTab: (id: string, patch: Partial<TabItem>) => void;
|
|
30
|
+
setScope: (tenantId: string | null, userId: string | null) => void;
|
|
31
|
+
hydrate: () => void;
|
|
19
32
|
}
|
|
20
33
|
export declare const useTabStore: import("zustand").UseBoundStore<import("zustand").StoreApi<TabState>>;
|
|
21
34
|
export {};
|
package/dist-lib/types/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LocalizedString } from "./schema";
|
|
1
|
+
import type { AccentDef, LocalizedString, ThemeDef } from "./schema";
|
|
2
2
|
export interface ListMeta {
|
|
3
3
|
total: number;
|
|
4
4
|
page: number;
|
|
@@ -29,11 +29,13 @@ export declare class ApiError extends Error {
|
|
|
29
29
|
index?: number;
|
|
30
30
|
constructor(status: number, message: string, code: string, index?: number);
|
|
31
31
|
}
|
|
32
|
+
export type TenantEnv = "production" | "staging" | "dev" | string;
|
|
32
33
|
export interface Tenant {
|
|
33
34
|
id: string;
|
|
34
35
|
code: string;
|
|
35
36
|
name: string;
|
|
36
37
|
role: string;
|
|
38
|
+
env?: TenantEnv;
|
|
37
39
|
}
|
|
38
40
|
export interface AuthUser {
|
|
39
41
|
id: string;
|
|
@@ -77,6 +79,25 @@ export interface PublicParam {
|
|
|
77
79
|
description?: LocalizedString;
|
|
78
80
|
value: unknown;
|
|
79
81
|
}
|
|
82
|
+
/** Subset of branding exposed pre-login by /api/params/public. */
|
|
83
|
+
export interface PublicBranding {
|
|
84
|
+
app_name?: string;
|
|
85
|
+
app_logo?: string;
|
|
86
|
+
app_initial?: string;
|
|
87
|
+
accent_color?: string;
|
|
88
|
+
wordmark?: string;
|
|
89
|
+
version_label?: string;
|
|
90
|
+
auth_tagline?: LocalizedString;
|
|
91
|
+
auth_subtagline?: LocalizedString;
|
|
92
|
+
auth_badges?: LocalizedString[];
|
|
93
|
+
}
|
|
94
|
+
/** Envelope returned by GET /api/params/public. */
|
|
95
|
+
export interface PublicParamsResponse {
|
|
96
|
+
parameters: PublicParam[];
|
|
97
|
+
themes?: Record<string, ThemeDef>;
|
|
98
|
+
accents?: Record<string, AccentDef>;
|
|
99
|
+
branding?: PublicBranding;
|
|
100
|
+
}
|
|
80
101
|
export interface ResolvedParam {
|
|
81
102
|
code: string;
|
|
82
103
|
name: LocalizedString;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrderedMap preserves the insertion order of a string-keyed map while
|
|
3
|
+
* keeping O(1) lookup. It mirrors the Go `ordmap.OrderedMap[T]` container
|
|
4
|
+
* on the server side. Use it for schema sub-maps (entity fields, handler
|
|
5
|
+
* params, resolved_params) where YAML/JSON declaration order is part of
|
|
6
|
+
* the UI contract.
|
|
7
|
+
*
|
|
8
|
+
* JS objects already preserve insertion order for string keys (ES2015+),
|
|
9
|
+
* but the Go side emits JSON that is parsed into a plain object by
|
|
10
|
+
* default — this class wraps the hydrated object so call sites get a
|
|
11
|
+
* consistent API (`get`, `has`, iteration as `[name, value]` tuples) and
|
|
12
|
+
* the type system enforces read-only access.
|
|
13
|
+
*/
|
|
14
|
+
export declare class OrderedMap<T extends {
|
|
15
|
+
name?: string;
|
|
16
|
+
}> implements Iterable<[string, T]> {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(items: readonly T[]);
|
|
19
|
+
/** Build from a `{ name: value }` object, populating each value's `name`
|
|
20
|
+
* field from the object key. Insertion order is the JS property order. */
|
|
21
|
+
static fromObject<T extends {
|
|
22
|
+
name?: string;
|
|
23
|
+
}>(raw: Readonly<Record<string, unknown>> | null | undefined): OrderedMap<T>;
|
|
24
|
+
get length(): number;
|
|
25
|
+
has(name: string): boolean;
|
|
26
|
+
get(name: string): T | undefined;
|
|
27
|
+
/** Read-only items in declaration order. */
|
|
28
|
+
items(): readonly T[];
|
|
29
|
+
/** Names in declaration order. */
|
|
30
|
+
names(): readonly string[];
|
|
31
|
+
[Symbol.iterator](): IterableIterator<[string, T]>;
|
|
32
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { OrderedMap } from "./ordmap";
|
|
2
|
+
export { OrderedMap };
|
|
1
3
|
export type LocalizedString = Record<string, string>;
|
|
2
4
|
/**
|
|
3
5
|
* Reserved sentinel value for Screen.detail_screen (list screens). Disables
|
|
@@ -21,6 +23,11 @@ export interface UnitConfig {
|
|
|
21
23
|
display?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface EntityField {
|
|
26
|
+
/**
|
|
27
|
+
* Populated by the schema hydrator from the enclosing map key. Tests and
|
|
28
|
+
* fixtures may omit it; production code always receives it set.
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
24
31
|
type: string;
|
|
25
32
|
required?: boolean;
|
|
26
33
|
primary?: boolean;
|
|
@@ -54,8 +61,7 @@ export interface EntityField {
|
|
|
54
61
|
export interface StructureDef {
|
|
55
62
|
name: LocalizedString;
|
|
56
63
|
description?: LocalizedString;
|
|
57
|
-
fields:
|
|
58
|
-
field_order: string[];
|
|
64
|
+
fields: OrderedMap<EntityField>;
|
|
59
65
|
}
|
|
60
66
|
export type ChildDisplayMode = "table" | "timeline" | "list" | "cards";
|
|
61
67
|
export interface TimelineConfig {
|
|
@@ -92,6 +98,15 @@ export interface ChildDisplay {
|
|
|
92
98
|
searchable?: boolean;
|
|
93
99
|
filters?: string[];
|
|
94
100
|
position_field?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Row interaction for `mode: table`.
|
|
103
|
+
* - `navigate`: identity cell (first column) is a link to the child's
|
|
104
|
+
* detail; other cells read-only. Default for associated entities
|
|
105
|
+
* (child has its own detail screen).
|
|
106
|
+
* - `inline_edit`: cells are inline-editable (aggregate children).
|
|
107
|
+
* - `readonly`: pure display.
|
|
108
|
+
*/
|
|
109
|
+
interaction?: "navigate" | "inline_edit" | "readonly";
|
|
95
110
|
}
|
|
96
111
|
export interface ChildRelation {
|
|
97
112
|
entity: string;
|
|
@@ -143,6 +158,8 @@ export interface ParameterDef {
|
|
|
143
158
|
default?: unknown;
|
|
144
159
|
is_public?: boolean;
|
|
145
160
|
category?: string;
|
|
161
|
+
/** Override scopes accepted on writes. Subset of: env, tenant, role, user, object. Empty = all. */
|
|
162
|
+
scopes?: string[];
|
|
146
163
|
}
|
|
147
164
|
export interface AssociationDisplay {
|
|
148
165
|
name?: LocalizedString;
|
|
@@ -167,8 +184,7 @@ export interface Entity {
|
|
|
167
184
|
icon: string;
|
|
168
185
|
display_field?: string;
|
|
169
186
|
};
|
|
170
|
-
fields:
|
|
171
|
-
field_order: string[];
|
|
187
|
+
fields: OrderedMap<EntityField>;
|
|
172
188
|
soft_delete?: string;
|
|
173
189
|
tenant_key?: string;
|
|
174
190
|
children?: ChildRelation[];
|
|
@@ -240,6 +256,7 @@ export interface LayoutNode {
|
|
|
240
256
|
searchable?: boolean;
|
|
241
257
|
filters?: string[];
|
|
242
258
|
position_field?: string;
|
|
259
|
+
interaction?: "navigate" | "inline_edit" | "readonly";
|
|
243
260
|
}
|
|
244
261
|
export interface Screen {
|
|
245
262
|
type: "list" | "detail" | "custom" | "record_list";
|
|
@@ -267,6 +284,45 @@ export interface Screen {
|
|
|
267
284
|
detail_screen?: string;
|
|
268
285
|
fixed_filters?: Record<string, unknown>;
|
|
269
286
|
views?: ViewDefinition[];
|
|
287
|
+
/** Action slot promotion (rule-of-2). UI honors first 2. */
|
|
288
|
+
primary_actions?: string[];
|
|
289
|
+
primary_bulk_actions?: string[];
|
|
290
|
+
primary_record_actions?: string[];
|
|
291
|
+
/** "open" (default) navigates to detail; "peek" opens QuickPeek drawer. */
|
|
292
|
+
on_row_click?: "open" | "peek";
|
|
293
|
+
quick_peek?: QuickPeekConfig;
|
|
294
|
+
inline_edit?: InlineEditConfig;
|
|
295
|
+
column_overrides?: Record<string, ColumnSpec>;
|
|
296
|
+
activity_rail?: ActivityRailConfig;
|
|
297
|
+
}
|
|
298
|
+
export interface QuickPeekConfig {
|
|
299
|
+
enabled?: boolean;
|
|
300
|
+
width?: number;
|
|
301
|
+
/**
|
|
302
|
+
* Explicit list of field codes to show. Highest precedence. When absent,
|
|
303
|
+
* `sections` is consulted; when that's also absent the platform falls back
|
|
304
|
+
* to all simple scalar fields on the entity (capped at 8).
|
|
305
|
+
*/
|
|
306
|
+
fields?: string[];
|
|
307
|
+
/** Section names from the detail-layout. Their `fields:` get flattened. */
|
|
308
|
+
sections?: string[];
|
|
309
|
+
inline_editable?: boolean;
|
|
310
|
+
primary_action?: string;
|
|
311
|
+
}
|
|
312
|
+
export interface InlineEditConfig {
|
|
313
|
+
enabled?: boolean;
|
|
314
|
+
/** dblclick | enter | always */
|
|
315
|
+
trigger?: string;
|
|
316
|
+
}
|
|
317
|
+
export interface ColumnSpec {
|
|
318
|
+
inline_edit?: boolean;
|
|
319
|
+
width?: string;
|
|
320
|
+
}
|
|
321
|
+
export interface ActivityRailConfig {
|
|
322
|
+
children: string;
|
|
323
|
+
/** left | right (default right) */
|
|
324
|
+
position?: string;
|
|
325
|
+
width?: number;
|
|
270
326
|
}
|
|
271
327
|
/** System view (preset) defined in screen YAML. Read-only. */
|
|
272
328
|
export interface ViewDefinition {
|
|
@@ -286,6 +342,24 @@ export interface NavNode {
|
|
|
286
342
|
name?: LocalizedString;
|
|
287
343
|
icon?: string;
|
|
288
344
|
items?: NavNode[];
|
|
345
|
+
area?: string;
|
|
346
|
+
badge?: string;
|
|
347
|
+
children?: NavNode[];
|
|
348
|
+
}
|
|
349
|
+
export interface AreaDef {
|
|
350
|
+
code: string;
|
|
351
|
+
name?: LocalizedString;
|
|
352
|
+
icon?: string;
|
|
353
|
+
home_screen?: string;
|
|
354
|
+
required_permission?: string;
|
|
355
|
+
}
|
|
356
|
+
export interface AccentDef {
|
|
357
|
+
color?: string;
|
|
358
|
+
color_2?: string;
|
|
359
|
+
soft?: string;
|
|
360
|
+
ring?: string;
|
|
361
|
+
on_dark?: string;
|
|
362
|
+
on_light?: string;
|
|
289
363
|
}
|
|
290
364
|
export interface HandlerParamDisplay {
|
|
291
365
|
name?: LocalizedString;
|
|
@@ -293,6 +367,8 @@ export interface HandlerParamDisplay {
|
|
|
293
367
|
widget?: string;
|
|
294
368
|
}
|
|
295
369
|
export interface HandlerParam {
|
|
370
|
+
/** Populated by the schema hydrator from the enclosing map key. */
|
|
371
|
+
name?: string;
|
|
296
372
|
type?: string;
|
|
297
373
|
required?: boolean;
|
|
298
374
|
default?: unknown;
|
|
@@ -346,8 +422,15 @@ export interface Action {
|
|
|
346
422
|
visibility?: string[];
|
|
347
423
|
confirmation?: LocalizedString;
|
|
348
424
|
conditions?: ActionCondition[];
|
|
349
|
-
|
|
350
|
-
|
|
425
|
+
/** Promote to header/bulk-bar button (max 2 per slot honored by UI). */
|
|
426
|
+
primary?: boolean;
|
|
427
|
+
/** Forces confirm + danger styling. */
|
|
428
|
+
destructive?: boolean;
|
|
429
|
+
/** UI shows toast + Jobs link instead of result modal. */
|
|
430
|
+
long_running?: boolean;
|
|
431
|
+
/** When true, action shown grayed until >=1 row selected. */
|
|
432
|
+
bulk_selection_required?: boolean;
|
|
433
|
+
resolved_params?: OrderedMap<HandlerParam>;
|
|
351
434
|
/**
|
|
352
435
|
* Default values of params marked hidden+default by the action. The UI
|
|
353
436
|
* seeds formData with these so filter templates resolve references to
|
|
@@ -369,8 +452,7 @@ export interface HandlerDef {
|
|
|
369
452
|
name?: LocalizedString;
|
|
370
453
|
icon?: string;
|
|
371
454
|
};
|
|
372
|
-
params?:
|
|
373
|
-
param_order?: string[];
|
|
455
|
+
params?: OrderedMap<HandlerParam>;
|
|
374
456
|
success_event?: string;
|
|
375
457
|
}
|
|
376
458
|
export interface Branding {
|
|
@@ -378,6 +460,12 @@ export interface Branding {
|
|
|
378
460
|
app_logo?: string;
|
|
379
461
|
app_initial?: string;
|
|
380
462
|
accent_color?: string;
|
|
463
|
+
wordmark?: string;
|
|
464
|
+
version_label?: string;
|
|
465
|
+
status_url?: string;
|
|
466
|
+
auth_tagline?: LocalizedString;
|
|
467
|
+
auth_subtagline?: LocalizedString;
|
|
468
|
+
auth_badges?: LocalizedString[];
|
|
381
469
|
}
|
|
382
470
|
export interface ThemeDef {
|
|
383
471
|
extends?: string;
|
|
@@ -406,6 +494,41 @@ export interface ThemeDef {
|
|
|
406
494
|
sidebar_accent?: string;
|
|
407
495
|
sidebar_muted?: string;
|
|
408
496
|
radius?: string;
|
|
497
|
+
surface?: string;
|
|
498
|
+
surface_2?: string;
|
|
499
|
+
surface_3?: string;
|
|
500
|
+
border_strong?: string;
|
|
501
|
+
divider?: string;
|
|
502
|
+
text_2?: string;
|
|
503
|
+
text_3?: string;
|
|
504
|
+
text_4?: string;
|
|
505
|
+
text_placeholder?: string;
|
|
506
|
+
rail?: string;
|
|
507
|
+
rail_fg?: string;
|
|
508
|
+
rail_muted?: string;
|
|
509
|
+
rail_active?: string;
|
|
510
|
+
rail_hover?: string;
|
|
511
|
+
sidebar_hover?: string;
|
|
512
|
+
sidebar_active?: string;
|
|
513
|
+
pills?: Record<string, {
|
|
514
|
+
fg: string;
|
|
515
|
+
bg: string;
|
|
516
|
+
}>;
|
|
517
|
+
success_soft?: string;
|
|
518
|
+
warn_soft?: string;
|
|
519
|
+
danger_soft?: string;
|
|
520
|
+
info_soft?: string;
|
|
521
|
+
shadow_xs?: string;
|
|
522
|
+
shadow_sm?: string;
|
|
523
|
+
shadow_md?: string;
|
|
524
|
+
shadow_lg?: string;
|
|
525
|
+
font_sans?: string;
|
|
526
|
+
font_mono?: string;
|
|
527
|
+
env_tones?: Record<string, {
|
|
528
|
+
fg: string;
|
|
529
|
+
bg: string;
|
|
530
|
+
border?: string;
|
|
531
|
+
}>;
|
|
409
532
|
}
|
|
410
533
|
export interface Schema {
|
|
411
534
|
languages: LanguageDef[];
|
|
@@ -419,4 +542,6 @@ export interface Schema {
|
|
|
419
542
|
parameters: Record<string, ParameterDef>;
|
|
420
543
|
branding?: Branding;
|
|
421
544
|
themes?: Record<string, ThemeDef>;
|
|
545
|
+
areas?: AreaDef[];
|
|
546
|
+
accents?: Record<string, AccentDef>;
|
|
422
547
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@declarion/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React SDK for Declarion, the schema-driven business apps platform.",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"@tanstack/react-virtual": "^3.11.0",
|
|
46
46
|
"class-variance-authority": "^0.7.0",
|
|
47
47
|
"clsx": "^2.1.0",
|
|
48
|
-
"lucide-react": "^0.468.0",
|
|
49
48
|
"react-markdown": "^10.1.0",
|
|
50
49
|
"react-router-dom": "^6.28.0",
|
|
51
50
|
"recharts": "^2.15.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function TabBar(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ThemeToggle(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function LoginPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function SignupPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface BatchActionProgressProps {
|
|
2
|
-
/** Number of items being processed. */
|
|
3
|
-
count: number;
|
|
4
|
-
/** Whether the action is currently executing. */
|
|
5
|
-
isPending: boolean;
|
|
6
|
-
/** Whether the last execution succeeded. */
|
|
7
|
-
isSuccess?: boolean;
|
|
8
|
-
/** Whether the last execution errored. */
|
|
9
|
-
isError?: boolean;
|
|
10
|
-
/** Whether the last execution partially succeeded (some items failed/skipped). */
|
|
11
|
-
isPartial?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Inline progress indicator for batch actions.
|
|
15
|
-
* Shows selected count, a spinner during execution, and success/error/partial state.
|
|
16
|
-
*/
|
|
17
|
-
export declare function BatchActionProgress({ count, isPending, isSuccess, isError, isPartial, }: BatchActionProgressProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
-
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
-
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
-
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare function AlertDialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare function AlertDialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
11
|
-
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
|
-
declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
-
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from "class-variance-authority";
|
|
2
|
-
declare const badgeVariants: (props?: ({
|
|
3
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
4
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
-
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
6
|
-
color?: string;
|
|
7
|
-
}
|
|
8
|
-
declare function Badge({ className, variant, color, style, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Badge, badgeVariants };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "ghost" | "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
-
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
export { Button, buttonVariants };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
-
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
12
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
13
|
-
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
-
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
-
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
-
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
-
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
-
inset?: boolean;
|
|
11
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
-
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
-
inset?: boolean;
|
|
16
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
-
inset?: boolean;
|
|
21
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import { type VariantProps } from "class-variance-authority";
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
-
export { Label };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
-
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
-
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
-
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectItem, SelectLabel, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
-
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export { Separator };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
3
|
-
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
-
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
-
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
-
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
7
|
-
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
|
-
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
-
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|