@declarion/react 0.32.0 → 0.35.1
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/README.md +1 -1
- package/dist-lib/{ActionRunner-CaSrGpBi.js → ActionRunner-Bkkb_YMa.js} +1332 -1310
- package/dist-lib/{DraggableChildrenTable-CAHg7paQ.js → DraggableChildrenTable-TNni9y0Q.js} +55 -55
- package/dist-lib/DynamicIcon-BWO6QtNF.js +261 -0
- package/dist-lib/{Grid-DDbBhqcl.js → Grid-DOtBLx3n.js} +2 -2
- package/dist-lib/{JsonEditor-KelPV-OQ.js → JsonEditor-DoNmyrYd.js} +2 -2
- package/dist-lib/{LayoutRenderer-CelsqsZ6.js → LayoutRenderer-CMuVgKev.js} +748 -746
- package/dist-lib/{MarkdownRenderer-DThy2ixe.js → MarkdownRenderer-DWOlvx8k.js} +1 -1
- package/dist-lib/{MonacoJson-DVjwsaBK.js → MonacoJson-BfpzZ1iT.js} +1 -1
- package/dist-lib/RefreshControl-CgU8mNEp.js +835 -0
- package/dist-lib/SmartDetailPage.impl-Bjl7EFzU.js +1774 -0
- package/dist-lib/{SmartRecordListPage.impl-BKIpTNK7.js → SmartRecordListPage.impl-D2eE-g5J.js} +91 -91
- package/dist-lib/assets/OFL-Inter.txt +93 -0
- package/dist-lib/assets/OFL-JetBrainsMono.txt +93 -0
- package/dist-lib/assets/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist-lib/assets/inter-latin-wght-normal.woff2 +0 -0
- package/dist-lib/assets/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist-lib/assets/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist-lib/components/fields/cells/factories/host-icons.d.ts +9 -1
- package/dist-lib/components/layout/TopBar.d.ts +2 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +22 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +42 -0
- package/dist-lib/components/pages/list/DataCell.d.ts +1 -2
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -11
- package/dist-lib/components/primitives/Btn.d.ts +1 -1
- package/dist-lib/components/primitives/Icons.d.ts +1 -0
- package/dist-lib/components/primitives/Tooltip.d.ts +30 -0
- package/dist-lib/components/primitives/index.d.ts +2 -0
- package/dist-lib/components/shared/ActionResultDialog.d.ts +4 -0
- package/dist-lib/components/shared/RecordHeader.d.ts +2 -1
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +9 -1
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/theme.d.ts +8 -8
- package/dist-lib/hooks/useBrandingChrome.d.ts +28 -2
- package/dist-lib/hooks/useResponsiveMode.d.ts +17 -1
- package/dist-lib/icons.js +1 -1
- package/dist-lib/index.js +2430 -2441
- package/dist-lib/lib/brand-tokens.d.ts +43 -0
- package/dist-lib/lib/document-templates.d.ts +12 -0
- package/dist-lib/lib/download.d.ts +20 -0
- package/dist-lib/lib/html-state.d.ts +11 -0
- package/dist-lib/lib/record-documents-key.d.ts +1 -0
- package/dist-lib/lib/versionTracker.d.ts +6 -0
- package/dist-lib/{registry-KQyyL5Gt.js → registry-GTwsJEYp.js} +1469 -1343
- package/dist-lib/stores/page-state.d.ts +1 -1
- package/dist-lib/stores/preferences.d.ts +37 -0
- package/dist-lib/testing.js +5 -5
- package/dist-lib/types/api.d.ts +95 -23
- package/dist-lib/types/schema.d.ts +32 -1
- package/dist-lib/{useProperties-D74hyWIa.js → useProperties-oNGJ7HwM.js} +67 -67
- package/dist-lib/{value-BfXXl5EE.js → value-DNs5L0Ad.js} +82 -82
- package/dist-lib/vite/fingerprint-plugin.d.ts +1 -1
- package/package.json +17 -16
- package/dist-lib/DynamicIcon-DCRdxxZ7.js +0 -260
- package/dist-lib/RefreshControl-CorluL6r.js +0 -582
- package/dist-lib/SmartDetailPage.impl-USIxbl-8.js +0 -1532
- package/dist-lib/stores/appearance.d.ts +0 -37
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BrandingTheme } from "../types/api";
|
|
2
|
+
/** The two color schemes, and the order their rules are emitted in. */
|
|
3
|
+
export declare const COLOR_SCHEMES: readonly ["light", "dark"];
|
|
4
|
+
export type BrandColorScheme = (typeof COLOR_SCHEMES)[number];
|
|
5
|
+
/**
|
|
6
|
+
* The fourteen brandable color fields, in declaration order.
|
|
7
|
+
*
|
|
8
|
+
* Each writes the CSS custom property of the SAME name with underscores
|
|
9
|
+
* hyphenated. Keep in sync with `branding_theme_colors` in
|
|
10
|
+
* `modules/_platform/schema/core_branding.yaml`; a Go test exports that
|
|
11
|
+
* structure's fields and `brand-tokens.parity.test.ts` asserts the two agree in
|
|
12
|
+
* both directions, so a field added to one and forgotten in the other fails CI
|
|
13
|
+
* rather than loading, validating, and doing nothing.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* The typography fields, in declaration order. Scheme-independent: a title is
|
|
17
|
+
* the same size in light and dark, so these are emitted on `:root` alongside
|
|
18
|
+
* the fonts rather than inside a scheme block.
|
|
19
|
+
*
|
|
20
|
+
* Same naming contract as the colors: `page_title_size` writes
|
|
21
|
+
* `--page-title-size`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const BRAND_TYPOGRAPHY_FIELDS: readonly ["page_title_size", "page_title_line_height"];
|
|
24
|
+
export declare const BRAND_COLOR_FIELDS: readonly ["background", "surface", "surface_2", "surface_3", "text", "text_2", "text_3", "border", "divider", "accent", "accent_hover", "accent_foreground", "sidebar", "rail"];
|
|
25
|
+
/** `surface_2` -> `--surface-2`. The whole naming contract, in one line. */
|
|
26
|
+
export declare function cssPropertyFor(field: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Render `branding.theme` as a stylesheet. Returns "" when the brand declares
|
|
29
|
+
* nothing, so the platform's own palette stands untouched.
|
|
30
|
+
*/
|
|
31
|
+
export declare function brandTokenCss(theme: BrandingTheme | undefined): string;
|
|
32
|
+
export declare const BRAND_TOKENS_STYLE_ID = "declarion-brand-tokens";
|
|
33
|
+
export declare const CONSUMER_BRAND_CSS_ID = "consumer-brand-css";
|
|
34
|
+
/**
|
|
35
|
+
* Write the block into <head>, idempotently, ALWAYS before the consumer's
|
|
36
|
+
* stylesheet.
|
|
37
|
+
*
|
|
38
|
+
* The ordering is re-asserted on every call rather than assumed: branding is a
|
|
39
|
+
* runtime-resolved parameter, so this element and the consumer's <link> can be
|
|
40
|
+
* created in either order, and DOM order is what decides who wins between two
|
|
41
|
+
* rules of equal specificity.
|
|
42
|
+
*/
|
|
43
|
+
export declare function applyBrandTokens(css: string): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Schema } from "../types/schema";
|
|
2
|
+
/**
|
|
3
|
+
* Heuristic used by DocumentsMenu mount sites to decide whether the caller
|
|
4
|
+
* can manage TENANT document templates: the `document_template` entity is
|
|
5
|
+
* present in the projected schema (schema.entities is already RBAC-pruned -
|
|
6
|
+
* `document_template` appears only when the caller can read it). Gates the
|
|
7
|
+
* lazy `document.templates.available` tenant-template visibility probe
|
|
8
|
+
* (Business Case 6, plan 2026-07-08-document-generation-hardening) so a
|
|
9
|
+
* caller who cannot manage templates never fires it - the Haia default.
|
|
10
|
+
* One shared predicate so SmartDetailPage and SmartListPage agree.
|
|
11
|
+
*/
|
|
12
|
+
export declare function canManageDocumentTemplates(schema: Schema | undefined): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class DownloadError extends Error {
|
|
2
|
+
readonly code?: string | undefined;
|
|
3
|
+
constructor(message: string, code?: string | undefined);
|
|
4
|
+
}
|
|
5
|
+
/** True when `err` is the download failing because the underlying blob is
|
|
6
|
+
* gone (purged, superseded, never generated). Callers use this to disable a
|
|
7
|
+
* dead Download button instead of leaving it re-clickable against nothing. */
|
|
8
|
+
export declare function isMissingArtifactError(err: unknown): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Fetches `url` as an authenticated (same-origin cookie) request, then
|
|
11
|
+
* triggers a browser download of the resulting blob. Refuses any URL whose
|
|
12
|
+
* scheme is not in the safeExternalUrl allowlist (http/https/mailto/relative)
|
|
13
|
+
* BEFORE issuing the fetch - a `javascript:`/`data:` URL never reaches
|
|
14
|
+
* `fetch` or an anchor's `href`.
|
|
15
|
+
*
|
|
16
|
+
* Blob-fetch (not a bare `<a href>`) so a non-2xx response (404 FILE_NOT_FOUND,
|
|
17
|
+
* 403, etc.) surfaces as a thrown DownloadError instead of silently
|
|
18
|
+
* navigating the browser to an error page.
|
|
19
|
+
*/
|
|
20
|
+
export declare function downloadFile(url: string, filename?: string): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The device class the SDK renders for. Mirrors ViewportCategory. */
|
|
2
|
+
export type HtmlViewport = "phone" | "tablet" | "desktop";
|
|
3
|
+
export declare function applyViewportAttribute(viewport: HtmlViewport): void;
|
|
4
|
+
/**
|
|
5
|
+
* Mark the document as an embed. Written once at boot: `?embed=1` is a boot
|
|
6
|
+
* property of the document, not a value that changes while it lives.
|
|
7
|
+
*
|
|
8
|
+
* Always written, `"false"` included, so a consumer can select on either state
|
|
9
|
+
* without an `:not()` and without depending on the attribute's absence.
|
|
10
|
+
*/
|
|
11
|
+
export declare function applyEmbedAttribute(enabled: boolean): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RECORD_DOCUMENTS_KEY: "record-documents";
|
|
@@ -55,6 +55,12 @@ export declare function observe(headers: Headers | undefined | null): void;
|
|
|
55
55
|
* 304 with no body). On any change, emit a typed delta.
|
|
56
56
|
*/
|
|
57
57
|
export declare function fetchProbe(): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* The reload-requiring delta observed earlier, or null. useVersionWatcher
|
|
60
|
+
* re-shows the reload prompt from this on every tab focus: a dismissed
|
|
61
|
+
* prompt must not leave a long-lived tab silently stale.
|
|
62
|
+
*/
|
|
63
|
+
export declare function pendingReload(): VersionDelta | null;
|
|
58
64
|
/**
|
|
59
65
|
* Subscribe to drift events. Called once from useVersionWatcher; the
|
|
60
66
|
* subscriber renders the UpdatePrompt (toast or silent invalidation).
|