@declarion/react 0.34.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.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/dist-lib/{ActionRunner-UGGvGypS.js → ActionRunner-Bkkb_YMa.js} +1176 -1287
  3. package/dist-lib/{DraggableChildrenTable-CljdYXd_.js → DraggableChildrenTable-TNni9y0Q.js} +39 -39
  4. package/dist-lib/{Grid-5Y_iPqNW.js → Grid-DOtBLx3n.js} +2 -2
  5. package/dist-lib/{JsonEditor-KelPV-OQ.js → JsonEditor-DoNmyrYd.js} +2 -2
  6. package/dist-lib/{LayoutRenderer-CoTMmvNW.js → LayoutRenderer-CMuVgKev.js} +407 -405
  7. package/dist-lib/{MarkdownRenderer-unbncYEV.js → MarkdownRenderer-DWOlvx8k.js} +1 -1
  8. package/dist-lib/{MonacoJson-DVjwsaBK.js → MonacoJson-BfpzZ1iT.js} +1 -1
  9. package/dist-lib/{RefreshControl-oeKhCjEC.js → RefreshControl-CgU8mNEp.js} +92 -94
  10. package/dist-lib/{SmartDetailPage.impl-Caxd97q6.js → SmartDetailPage.impl-Bjl7EFzU.js} +321 -318
  11. package/dist-lib/{SmartRecordListPage.impl-BF_ieDc2.js → SmartRecordListPage.impl-D2eE-g5J.js} +248 -248
  12. package/dist-lib/assets/OFL-Inter.txt +93 -0
  13. package/dist-lib/assets/OFL-JetBrainsMono.txt +93 -0
  14. package/dist-lib/assets/inter-latin-ext-wght-normal.woff2 +0 -0
  15. package/dist-lib/assets/inter-latin-wght-normal.woff2 +0 -0
  16. package/dist-lib/assets/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  17. package/dist-lib/assets/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  18. package/dist-lib/components/fields/cells/factories/host-icons.d.ts +9 -1
  19. package/dist-lib/components/layout/TopBar.d.ts +2 -1
  20. package/dist-lib/components/pages/list/DataCell.d.ts +1 -2
  21. package/dist-lib/components/primitives/Btn.d.ts +1 -1
  22. package/dist-lib/declarion-react.css +1 -1
  23. package/dist-lib/embed/theme.d.ts +8 -8
  24. package/dist-lib/hooks/useBrandingChrome.d.ts +28 -2
  25. package/dist-lib/hooks/useResponsiveMode.d.ts +17 -1
  26. package/dist-lib/index.js +1971 -1936
  27. package/dist-lib/lib/brand-tokens.d.ts +43 -0
  28. package/dist-lib/lib/html-state.d.ts +11 -0
  29. package/dist-lib/lib/versionTracker.d.ts +6 -0
  30. package/dist-lib/{registry-DnPK3Msj.js → registry-GTwsJEYp.js} +1425 -1299
  31. package/dist-lib/stores/page-state.d.ts +1 -1
  32. package/dist-lib/stores/preferences.d.ts +37 -0
  33. package/dist-lib/testing.js +25 -25
  34. package/dist-lib/types/api.d.ts +96 -16
  35. package/dist-lib/types/schema.d.ts +15 -0
  36. package/dist-lib/{useProperties-CgRhBh0k.js → useProperties-oNGJ7HwM.js} +41 -41
  37. package/dist-lib/{value-GmL5BVFm.js → value-DNs5L0Ad.js} +97 -97
  38. package/dist-lib/vite/fingerprint-plugin.d.ts +1 -1
  39. package/package.json +17 -16
  40. 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,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;
@@ -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).