@declarion/react 0.1.33 → 0.1.44

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 (97) hide show
  1. package/dist-lib/JsonEditor-ByVfvrpB.js +71 -0
  2. package/dist-lib/JsonEditor-ByVfvrpB.js.map +1 -0
  3. package/dist-lib/api/params.d.ts +16 -2
  4. package/dist-lib/components/columns/ColumnPicker.d.ts +0 -5
  5. package/dist-lib/components/detail/DetailPage.d.ts +30 -0
  6. package/dist-lib/components/fields/MultilangField.d.ts +1 -1
  7. package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
  8. package/dist-lib/components/fields/RefField.d.ts +1 -1
  9. package/dist-lib/components/filters/FilterChips.d.ts +0 -6
  10. package/dist-lib/components/filters/FilterDrawer.d.ts +0 -6
  11. package/dist-lib/components/layout/Rail.d.ts +16 -0
  12. package/dist-lib/components/layout/Sidebar.d.ts +11 -1
  13. package/dist-lib/components/layout/TabStrip.d.ts +4 -0
  14. package/dist-lib/components/layout/TenantChip.d.ts +17 -0
  15. package/dist-lib/components/layout/TopBar.d.ts +11 -1
  16. package/dist-lib/components/list/BulkBar.d.ts +18 -0
  17. package/dist-lib/components/list/InlineEditCell.d.ts +15 -0
  18. package/dist-lib/components/list/ListPage.d.ts +34 -0
  19. package/dist-lib/components/list/QuickPeek.d.ts +36 -0
  20. package/dist-lib/components/list/RowMenu.d.ts +23 -0
  21. package/dist-lib/components/list/resolveActions.d.ts +67 -0
  22. package/dist-lib/components/pages/auth/AuthShell.d.ts +13 -0
  23. package/dist-lib/components/pages/auth/Forgot.d.ts +1 -0
  24. package/dist-lib/components/pages/auth/SignIn.d.ts +1 -0
  25. package/dist-lib/components/pages/auth/SignUp.d.ts +1 -0
  26. package/dist-lib/components/pages/auth/TwoFA.d.ts +1 -0
  27. package/dist-lib/components/pages/auth/icons.d.ts +6 -0
  28. package/dist-lib/components/pages/home/HomeStub.d.ts +6 -0
  29. package/dist-lib/components/pages/jobs/Jobs.d.ts +1 -0
  30. package/dist-lib/components/pages/pipeline/Pipeline.d.ts +1 -0
  31. package/dist-lib/components/pages/profile/Preferences.d.ts +1 -0
  32. package/dist-lib/components/pages/profile/Profile.d.ts +1 -0
  33. package/dist-lib/components/primitives/Avatar.d.ts +6 -0
  34. package/dist-lib/components/primitives/BoolToggle.d.ts +5 -0
  35. package/dist-lib/components/primitives/Btn.d.ts +19 -0
  36. package/dist-lib/components/primitives/Check.d.ts +7 -0
  37. package/dist-lib/components/primitives/Chip.d.ts +9 -0
  38. package/dist-lib/components/primitives/Dropdown.d.ts +11 -0
  39. package/dist-lib/components/primitives/Fields.d.ts +82 -0
  40. package/dist-lib/components/primitives/IconBtn.d.ts +11 -0
  41. package/dist-lib/components/primitives/Icons.d.ts +87 -0
  42. package/dist-lib/components/primitives/Kbd.d.ts +4 -0
  43. package/dist-lib/components/primitives/MenuItem.d.ts +11 -0
  44. package/dist-lib/components/primitives/Pill.d.ts +11 -0
  45. package/dist-lib/components/primitives/RecordIdBadge.d.ts +8 -0
  46. package/dist-lib/components/primitives/RowField.d.ts +10 -0
  47. package/dist-lib/components/primitives/SectionCard.d.ts +19 -0
  48. package/dist-lib/components/primitives/Spinner.d.ts +3 -0
  49. package/dist-lib/components/primitives/cx.d.ts +1 -0
  50. package/dist-lib/components/primitives/index.d.ts +31 -0
  51. package/dist-lib/components/shared/ActionConfirmDialog.d.ts +1 -1
  52. package/dist-lib/components/shared/ActionDialog.d.ts +1 -11
  53. package/dist-lib/components/shared/ActionResultDialog.d.ts +1 -1
  54. package/dist-lib/components/shared/ActionRunner.d.ts +21 -0
  55. package/dist-lib/components/shared/Breadcrumbs.d.ts +14 -0
  56. package/dist-lib/components/shared/ChangePasswordDialog.d.ts +9 -0
  57. package/dist-lib/components/shared/ConfirmDialog.d.ts +1 -1
  58. package/dist-lib/components/shared/CopyButton.d.ts +1 -1
  59. package/dist-lib/components/shared/DynamicIcon.d.ts +6 -3
  60. package/dist-lib/components/shared/ErrorBoundary.d.ts +0 -5
  61. package/dist-lib/components/shell/AIPanel.d.ts +6 -0
  62. package/dist-lib/components/shell/CommandPalette.d.ts +18 -0
  63. package/dist-lib/components/views/ViewSwitcher.d.ts +1 -7
  64. package/dist-lib/declarion-react.css +1 -1
  65. package/dist-lib/hooks/useParams.d.ts +1 -1
  66. package/dist-lib/index.d.ts +47 -0
  67. package/dist-lib/index.js +14587 -8270
  68. package/dist-lib/index.js.map +1 -1
  69. package/dist-lib/lib/child-config.d.ts +1 -0
  70. package/dist-lib/stores/appearance.d.ts +31 -0
  71. package/dist-lib/stores/tabs.d.ts +13 -0
  72. package/dist-lib/types/api.d.ts +21 -1
  73. package/dist-lib/types/ordmap.d.ts +32 -0
  74. package/dist-lib/types/schema.d.ts +108 -37
  75. package/package.json +1 -2
  76. package/dist-lib/JsonEditor-C5NOzsey.js +0 -71
  77. package/dist-lib/JsonEditor-C5NOzsey.js.map +0 -1
  78. package/dist-lib/components/layout/TabBar.d.ts +0 -1
  79. package/dist-lib/components/layout/ThemeToggle.d.ts +0 -1
  80. package/dist-lib/components/pages/LoginPage.d.ts +0 -1
  81. package/dist-lib/components/pages/SignupPage.d.ts +0 -1
  82. package/dist-lib/components/shared/BatchActionProgress.d.ts +0 -18
  83. package/dist-lib/components/ui/alert-dialog.d.ts +0 -14
  84. package/dist-lib/components/ui/badge.d.ts +0 -9
  85. package/dist-lib/components/ui/button.d.ts +0 -11
  86. package/dist-lib/components/ui/card.d.ts +0 -8
  87. package/dist-lib/components/ui/dialog.d.ts +0 -13
  88. package/dist-lib/components/ui/dropdown-menu.d.ts +0 -24
  89. package/dist-lib/components/ui/input.d.ts +0 -3
  90. package/dist-lib/components/ui/label.d.ts +0 -5
  91. package/dist-lib/components/ui/select.d.ts +0 -13
  92. package/dist-lib/components/ui/separator.d.ts +0 -4
  93. package/dist-lib/components/ui/skeleton.d.ts +0 -2
  94. package/dist-lib/components/ui/table.d.ts +0 -10
  95. package/dist-lib/components/ui/textarea.d.ts +0 -3
  96. package/dist-lib/lib/theme-utils.d.ts +0 -3
  97. package/dist-lib/stores/theme.d.ts +0 -10
@@ -0,0 +1,71 @@
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { useRef as i, useEffect as a } from "react";
3
+ import { Mode as l, createJSONEditor as E } from "vanilla-jsoneditor";
4
+ import "vanilla-jsoneditor/themes/jse-theme-dark.css";
5
+ function p(t) {
6
+ if (t == null) return { text: "" };
7
+ if (typeof t == "string")
8
+ try {
9
+ return { json: JSON.parse(t) };
10
+ } catch {
11
+ return { text: t };
12
+ }
13
+ return { json: t };
14
+ }
15
+ function N({ value: t, onChange: u, readOnly: e }) {
16
+ const o = i(null), s = i(null), n = i(u);
17
+ return a(() => {
18
+ n.current = u;
19
+ }, [u]), a(() => {
20
+ if (!o.current) return;
21
+ const j = {
22
+ content: p(t),
23
+ readOnly: e ?? !1,
24
+ mode: e ? l.tree : l.text,
25
+ mainMenuBar: !e,
26
+ navigationBar: !1,
27
+ statusBar: !1,
28
+ onChange: (r, c, x) => {
29
+ if (!(e || !n.current) && !x.contentErrors) {
30
+ if ("json" in r)
31
+ n.current(r.json);
32
+ else if ("text" in r)
33
+ try {
34
+ n.current(JSON.parse(r.text));
35
+ } catch {
36
+ n.current(r.text);
37
+ }
38
+ }
39
+ }
40
+ }, f = () => {
41
+ var c;
42
+ const r = document.documentElement.dataset.theme === "dark";
43
+ (c = o.current) == null || c.classList.toggle("jse-theme-dark", r);
44
+ };
45
+ f();
46
+ const m = new MutationObserver(f);
47
+ m.observe(document.documentElement, {
48
+ attributes: !0,
49
+ attributeFilter: ["data-theme"]
50
+ });
51
+ const d = E({
52
+ target: o.current,
53
+ props: j
54
+ });
55
+ return s.current = d, () => {
56
+ m.disconnect(), d.destroy(), s.current = null;
57
+ };
58
+ }, [e]), a(() => {
59
+ !s.current || !e || s.current.updateProps({ content: p(t) });
60
+ }, [t, e]), /* @__PURE__ */ b(
61
+ "div",
62
+ {
63
+ ref: o,
64
+ className: e ? "json-editor-readonly" : "json-editor-editable"
65
+ }
66
+ );
67
+ }
68
+ export {
69
+ N as JsonEditor
70
+ };
71
+ //# sourceMappingURL=JsonEditor-ByVfvrpB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonEditor-ByVfvrpB.js","sources":["../src/components/fields/JsonEditor.tsx"],"sourcesContent":["import { useRef, useEffect } from \"react\";\nimport {\n createJSONEditor,\n Mode,\n type Content,\n type OnChangeStatus,\n type JSONEditorPropsOptional,\n} from \"vanilla-jsoneditor\";\n// Dark theme CSS vars for vanilla-jsoneditor (sets --jse-* custom properties)\nimport \"vanilla-jsoneditor/themes/jse-theme-dark.css\";\n\ninterface JsonEditorProps {\n value: unknown;\n onChange?: (value: unknown) => void;\n readOnly?: boolean;\n // Future: JSON Schema for in-editor validation (Ajv). Accept now, wire later.\n schema?: Record<string, unknown>;\n}\n\nfunction toContent(v: unknown): Content {\n if (v == null) return { text: \"\" };\n if (typeof v === \"string\") {\n try {\n return { json: JSON.parse(v) };\n } catch {\n return { text: v };\n }\n }\n return { json: v };\n}\n\nexport function JsonEditor({ value, onChange, readOnly }: JsonEditorProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const editorRef = useRef<ReturnType<typeof createJSONEditor> | null>(null);\n const onChangeRef = useRef(onChange);\n useEffect(() => { onChangeRef.current = onChange; }, [onChange]);\n\n // Create / recreate editor when readOnly changes\n useEffect(() => {\n if (!containerRef.current) return;\n\n const props: JSONEditorPropsOptional = {\n content: toContent(value),\n readOnly: readOnly ?? false,\n mode: readOnly ? Mode.tree : Mode.text,\n mainMenuBar: !readOnly,\n navigationBar: false,\n statusBar: false,\n onChange: (content: Content, _prev: Content, status: OnChangeStatus) => {\n if (readOnly || !onChangeRef.current) return;\n if (status.contentErrors) return;\n if (\"json\" in content) {\n onChangeRef.current(content.json);\n } else if (\"text\" in content) {\n try {\n onChangeRef.current(JSON.parse(content.text));\n } catch {\n onChangeRef.current(content.text);\n }\n }\n },\n };\n\n const syncDarkClass = () => {\n const isDark = document.documentElement.dataset.theme === \"dark\";\n containerRef.current?.classList.toggle(\"jse-theme-dark\", isDark);\n };\n syncDarkClass();\n\n // Watch for theme attribute changes on <html>.\n const observer = new MutationObserver(syncDarkClass);\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"data-theme\"],\n });\n\n const editor = createJSONEditor({\n target: containerRef.current,\n props,\n });\n editorRef.current = editor;\n\n return () => {\n observer.disconnect();\n editor.destroy();\n editorRef.current = null;\n };\n }, [readOnly]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // Update content when value changes externally (read-only mode only)\n useEffect(() => {\n if (!editorRef.current || !readOnly) return;\n editorRef.current.updateProps({ content: toContent(value) });\n }, [value, readOnly]);\n\n return (\n <div\n ref={containerRef}\n className={readOnly ? \"json-editor-readonly\" : \"json-editor-editable\"}\n />\n );\n}\n"],"names":["toContent","v","JsonEditor","value","onChange","readOnly","containerRef","useRef","editorRef","onChangeRef","useEffect","props","Mode","content","_prev","status","syncDarkClass","isDark","_a","observer","editor","createJSONEditor","jsx"],"mappings":";;;;AAmBA,SAASA,EAAUC,GAAqB;AACtC,MAAIA,KAAK,KAAM,QAAO,EAAE,MAAM,GAAA;AAC9B,MAAI,OAAOA,KAAM;AACf,QAAI;AACF,aAAO,EAAE,MAAM,KAAK,MAAMA,CAAC,EAAA;AAAA,IAC7B,QAAQ;AACN,aAAO,EAAE,MAAMA,EAAA;AAAA,IACjB;AAEF,SAAO,EAAE,MAAMA,EAAA;AACjB;AAEO,SAASC,EAAW,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,KAA6B;AACzE,QAAMC,IAAeC,EAAuB,IAAI,GAC1CC,IAAYD,EAAmD,IAAI,GACnEE,IAAcF,EAAOH,CAAQ;AACnC,SAAAM,EAAU,MAAM;AAAE,IAAAD,EAAY,UAAUL;AAAA,EAAU,GAAG,CAACA,CAAQ,CAAC,GAG/DM,EAAU,MAAM;AACd,QAAI,CAACJ,EAAa,QAAS;AAE3B,UAAMK,IAAiC;AAAA,MACrC,SAASX,EAAUG,CAAK;AAAA,MACxB,UAAUE,KAAY;AAAA,MACtB,MAAMA,IAAWO,EAAK,OAAOA,EAAK;AAAA,MAClC,aAAa,CAACP;AAAA,MACd,eAAe;AAAA,MACf,WAAW;AAAA,MACX,UAAU,CAACQ,GAAkBC,GAAgBC,MAA2B;AACtE,YAAI,EAAAV,KAAY,CAACI,EAAY,YACzB,CAAAM,EAAO;AACX,cAAI,UAAUF;AACZ,YAAAJ,EAAY,QAAQI,EAAQ,IAAI;AAAA,mBACvB,UAAUA;AACnB,gBAAI;AACF,cAAAJ,EAAY,QAAQ,KAAK,MAAMI,EAAQ,IAAI,CAAC;AAAA,YAC9C,QAAQ;AACN,cAAAJ,EAAY,QAAQI,EAAQ,IAAI;AAAA,YAClC;AAAA;AAAA,MAEJ;AAAA,IAAA,GAGIG,IAAgB,MAAM;;AAC1B,YAAMC,IAAS,SAAS,gBAAgB,QAAQ,UAAU;AAC1D,OAAAC,IAAAZ,EAAa,YAAb,QAAAY,EAAsB,UAAU,OAAO,kBAAkBD;AAAA,IAC3D;AACA,IAAAD,EAAA;AAGA,UAAMG,IAAW,IAAI,iBAAiBH,CAAa;AACnD,IAAAG,EAAS,QAAQ,SAAS,iBAAiB;AAAA,MACzC,YAAY;AAAA,MACZ,iBAAiB,CAAC,YAAY;AAAA,IAAA,CAC/B;AAED,UAAMC,IAASC,EAAiB;AAAA,MAC9B,QAAQf,EAAa;AAAA,MACrB,OAAAK;AAAA,IAAA,CACD;AACD,WAAAH,EAAU,UAAUY,GAEb,MAAM;AACX,MAAAD,EAAS,WAAA,GACTC,EAAO,QAAA,GACPZ,EAAU,UAAU;AAAA,IACtB;AAAA,EACF,GAAG,CAACH,CAAQ,CAAC,GAGbK,EAAU,MAAM;AACd,IAAI,CAACF,EAAU,WAAW,CAACH,KAC3BG,EAAU,QAAQ,YAAY,EAAE,SAASR,EAAUG,CAAK,GAAG;AAAA,EAC7D,GAAG,CAACA,GAAOE,CAAQ,CAAC,GAGlB,gBAAAiB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKhB;AAAA,MACL,WAAWD,IAAW,yBAAyB;AAAA,IAAA;AAAA,EAAA;AAGrD;"}
@@ -1,3 +1,17 @@
1
- import type { PublicParam, ResolvedParam } from "../types/api";
2
- export declare function fetchPublicParams(): Promise<PublicParam[]>;
1
+ import type { PublicParamsResponse, ResolvedParam } from "../types/api";
2
+ /**
3
+ * Fetches the full pre-login envelope from /api/params/public:
4
+ * {parameters, accents, branding}. Used by AuthShell to theme
5
+ * unauthenticated screens before any user context exists.
6
+ */
7
+ export declare function fetchPublicParams(): Promise<PublicParamsResponse>;
3
8
  export declare function fetchParam(code: string): Promise<ResolvedParam>;
9
+ /**
10
+ * Persist a parameter override at user scope. Writes via the existing
11
+ * subresource $params channel on the user entity (PATCH /api/data/user).
12
+ * Returns the updated row envelope.
13
+ *
14
+ * Plan G5/T23 contract: ParameterDef.scopes gates the write server-side;
15
+ * a 400 will surface back to the caller if the scope is not allowed.
16
+ */
17
+ export declare function setUserParam(userId: string, code: string, value: unknown): Promise<void>;
@@ -4,12 +4,7 @@ interface ColumnPickerProps {
4
4
  onToggle: (col: string) => void;
5
5
  onReset: () => void;
6
6
  onShowAll: () => void;
7
- /** Resolve column code to display label */
8
7
  columnLabel?: (code: string) => string;
9
8
  }
10
- /**
11
- * ColumnPicker - popover-style checklist for toggling column visibility.
12
- * Drag-reorder deferred to later phase (using @dnd-kit).
13
- */
14
9
  export declare function ColumnPicker({ availableColumns, visibleColumns, onToggle, onReset, onShowAll, columnLabel, }: ColumnPickerProps): import("react/jsx-runtime").JSX.Element;
15
10
  export {};
@@ -0,0 +1,30 @@
1
+ import { type ReactNode } from "react";
2
+ import { type Action, type Screen } from "../../types/schema";
3
+ export type DetailMode = "view" | "edit" | "create";
4
+ export interface DetailPageProps {
5
+ mode: DetailMode;
6
+ onModeChange: (m: DetailMode) => void;
7
+ onClose: () => void;
8
+ onSave: () => void | Promise<void>;
9
+ onDelete?: () => void;
10
+ title: string;
11
+ recordId?: string;
12
+ /** When true, opens in edit mode with the dirty badge — used by peek-promote. */
13
+ initialDirty?: boolean;
14
+ dirty: boolean;
15
+ /** Optional sub-header row (pipeline / priority / source / score chips). */
16
+ subHeader?: ReactNode;
17
+ /** Avatar or leading badge rendered before the title. */
18
+ leading?: ReactNode;
19
+ /** Full YAML screen so primary_record_actions is honored. */
20
+ screen?: Screen;
21
+ /** Actions available on this record (resolved from entity + screen). */
22
+ actions: Record<string, Action>;
23
+ executeAction: (code: string, action: Action, params: Record<string, unknown>) => Promise<unknown>;
24
+ /** Optional right-rail slot — maps to the design's ActivityPanel / sidebar. */
25
+ sidebar?: ReactNode;
26
+ /** Optional footer metadata strip ("Created … · Updated … · Version 7"). */
27
+ footerMeta?: ReactNode;
28
+ children?: ReactNode;
29
+ }
30
+ export declare function DetailPage({ mode, onModeChange, onClose, onSave, onDelete, title, recordId, initialDirty, dirty, subHeader, leading, screen, actions, executeAction, sidebar, footerMeta, children, }: DetailPageProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import type { FieldRendererProps } from "./index";
2
- export declare function MultilangField({ value, mode, onChange, }: FieldRendererProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function MultilangField({ value, mode, onChange }: FieldRendererProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import type { FieldRendererProps } from "./index";
2
- export declare function MultilangTextField({ value, mode, onChange, }: FieldRendererProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function MultilangTextField({ value, mode, onChange }: FieldRendererProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import type { FieldRendererProps } from "./index";
2
- export declare function RefField({ field, value, mode, onChange, refs, }: FieldRendererProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function RefField({ field, value, mode, onChange, refs }: FieldRendererProps): import("react/jsx-runtime").JSX.Element;
@@ -4,13 +4,7 @@ interface FilterChipsProps {
4
4
  onRemove: (field: string) => void;
5
5
  onClearAll: () => void;
6
6
  onChipClick?: () => void;
7
- /** Resolve field name to display label */
8
7
  fieldLabel?: (field: string) => string;
9
8
  }
10
- /**
11
- * FilterChips shows active filters as compact chips between toolbar and table.
12
- * Simple mode: flat chips. OR mode: grouped chips.
13
- * Zero active filters = hidden (zero height).
14
- */
15
9
  export declare function FilterChips({ filters, onRemove, onClearAll, onChipClick, fieldLabel, }: FilterChipsProps): import("react/jsx-runtime").JSX.Element | null;
16
10
  export {};
@@ -4,7 +4,6 @@ export interface FilterFieldMeta {
4
4
  label: string;
5
5
  type: "string" | "enum" | "int" | "float" | "date" | "timestamp" | "bool" | "ref" | "status" | "property" | string;
6
6
  operators: FilterOp[];
7
- /** Enum values for enum/status fields. */
8
7
  options?: {
9
8
  value: string;
10
9
  label: string;
@@ -18,10 +17,5 @@ interface FilterDrawerProps {
18
17
  onApply: (filters: FilterNode[]) => void;
19
18
  availableFields: FilterFieldMeta[];
20
19
  }
21
- /**
22
- * FilterDrawer - right-side panel with progressive disclosure.
23
- * Level 1: flat AND conditions (default).
24
- * Level 2: OR groups when "Add OR group" is clicked.
25
- */
26
20
  export declare function FilterDrawer({ open, onClose, filters, onApply, availableFields, }: FilterDrawerProps): import("react/jsx-runtime").JSX.Element | null;
27
21
  export {};
@@ -0,0 +1,16 @@
1
+ import { type IconName } from "../../components/primitives";
2
+ import type { AreaDef } from "../../types/schema";
3
+ export interface RailAreaItem {
4
+ id: string;
5
+ icon: IconName;
6
+ label: string;
7
+ }
8
+ export interface RailProps {
9
+ activeArea: string;
10
+ onPick: (id: string) => void;
11
+ onToggleAI: () => void;
12
+ aiOpen: boolean;
13
+ onCmdK: () => void;
14
+ areas?: AreaDef[];
15
+ }
16
+ export declare function Rail({ activeArea, onPick, onToggleAI, aiOpen, onCmdK, areas }: RailProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,11 @@
1
- export declare function Sidebar(): import("react/jsx-runtime").JSX.Element;
1
+ import { type NavNode } from "../../types/schema";
2
+ export interface SidebarProps {
3
+ activeArea: string;
4
+ }
5
+ export declare function Sidebar({ activeArea }: SidebarProps): import("react/jsx-runtime").JSX.Element;
6
+ interface SidebarSection {
7
+ title: string;
8
+ items: NavNode[];
9
+ }
10
+ export declare function buildSections(nodes: NavNode[], activeArea: string): SidebarSection[];
11
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface TabStripProps {
2
+ onNew?: () => void;
3
+ }
4
+ export declare function TabStrip({ onNew: onNewProp }?: TabStripProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ import type { Tenant, TenantEnv } from "../../types/api";
2
+ export interface TenantChipProps {
3
+ tenant: Tenant | null;
4
+ tenants: Tenant[];
5
+ onSwitch: (tenant: Tenant) => void;
6
+ busy?: boolean;
7
+ }
8
+ interface EnvTone {
9
+ fg: string;
10
+ bg: string;
11
+ border?: string;
12
+ darkFg?: string;
13
+ darkBg?: string;
14
+ }
15
+ export declare function envTone(env?: TenantEnv): EnvTone;
16
+ export declare function TenantChip({ tenant, tenants, onSwitch, busy }: TenantChipProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -1 +1,11 @@
1
- export declare function TopBar(): import("react/jsx-runtime").JSX.Element;
1
+ import { type Crumb } from "../../components/shared/Breadcrumbs";
2
+ export interface TopBarProps {
3
+ breadcrumbs?: Crumb[];
4
+ onCrumbClick?: (c: Crumb) => void;
5
+ onCmdK?: () => void;
6
+ onToggleAI?: () => void;
7
+ aiOpen?: boolean;
8
+ onOpenProfile?: () => void;
9
+ onOpenPrefs?: () => void;
10
+ }
11
+ export declare function TopBar({ breadcrumbs, onCrumbClick, onCmdK, onToggleAI, aiOpen, onOpenProfile, onOpenPrefs, }?: TopBarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from "react";
2
+ export interface BulkActionItem {
3
+ id: string;
4
+ label: string;
5
+ icon?: ReactNode;
6
+ primary?: boolean;
7
+ destructive?: boolean;
8
+ onRun: () => void;
9
+ }
10
+ export interface BulkBarProps {
11
+ count: number;
12
+ actions: BulkActionItem[];
13
+ onClear: () => void;
14
+ /** Optional extra destructive action tail (e.g. delete). */
15
+ onDelete?: () => void;
16
+ onExport?: () => void;
17
+ }
18
+ export declare function BulkBar({ count, actions, onClear, onDelete, onExport }: BulkBarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type SelectOption } from "../../components/primitives";
2
+ export type InlineEditTrigger = "dblclick" | "enter" | "always";
3
+ export type InlineEditKind = "text" | "select" | "bool";
4
+ export interface InlineEditCellProps {
5
+ value?: string;
6
+ onSave: (v: string) => Promise<void> | void;
7
+ type?: InlineEditKind;
8
+ options?: SelectOption[];
9
+ /** Drives when a display cell flips to edit. Default `always` (matches QuickEditCell). */
10
+ trigger?: InlineEditTrigger;
11
+ /** Field label — surfaces in the error toast so the user knows which cell rolled back. */
12
+ label?: string;
13
+ placeholder?: string;
14
+ }
15
+ export declare function InlineEditCell({ value, onSave, type, options, trigger, label, placeholder, }: InlineEditCellProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from "react";
2
+ import { type Action, type Screen } from "../../types/schema";
3
+ export interface ListPageProps {
4
+ title: string;
5
+ singular: string;
6
+ total: number;
7
+ shown: number;
8
+ /** Selected row count — when >0 BulkBar is rendered. */
9
+ selectionCount: number;
10
+ clearSelection: () => void;
11
+ onNewRecord: () => void;
12
+ /** Screen YAML, used to honor `screen.primary_actions[*]`. */
13
+ screen?: Screen;
14
+ /** All actions available in this list scope (toolbar + bulk). */
15
+ actions: Record<string, Action>;
16
+ /**
17
+ * Permission gate. Receives the action's registry code (without entity
18
+ * prefix). When omitted, all visible actions are shown — callers in
19
+ * production wire this to the existing RBAC helper.
20
+ */
21
+ hasPermission?: (code: string) => boolean;
22
+ /** Executes an action against current selection (or globally). */
23
+ executeAction: (code: string, action: Action, params: Record<string, unknown>) => Promise<unknown>;
24
+ /** Rendered between header and BulkBar (table, footer, drawers). */
25
+ children?: ReactNode;
26
+ /** Optional extra destructive delete shortcut for the bulk bar. */
27
+ onBulkDelete?: () => void;
28
+ onBulkExport?: () => void;
29
+ /** Invoked when the dropdown's built-in "Export selection (CSV)" is clicked. */
30
+ onToolbarExport?: () => void;
31
+ /** Invoked when the dropdown's built-in "Manage actions…" is clicked. */
32
+ onManageActions?: () => void;
33
+ }
34
+ export declare function ListPage({ title, singular, total, shown, selectionCount, clearSelection, onNewRecord, screen, actions, hasPermission, executeAction, children, onBulkDelete, onBulkExport, onToolbarExport, onManageActions, }: ListPageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { type ReactNode } from "react";
2
+ import { type Action, type Screen } from "../../types/schema";
3
+ export interface QuickPeekFieldSpec {
4
+ key: string;
5
+ label: string;
6
+ render: (value: unknown, onChange: (v: unknown) => void) => ReactNode;
7
+ }
8
+ export interface QuickPeekProps<R extends Record<string, unknown> = Record<string, unknown>> {
9
+ record: R;
10
+ title: string;
11
+ recordId?: string;
12
+ avatarName?: string;
13
+ fields: QuickPeekFieldSpec[];
14
+ /** Full screen YAML — honors `screen.quick_peek.width` and `quick_peek.primary_action`. */
15
+ screen?: Screen;
16
+ /** All actions available on this record. */
17
+ actions: Record<string, Action>;
18
+ executeAction: (code: string, action: Action, params: Record<string, unknown>) => Promise<unknown>;
19
+ /**
20
+ * Close the peek.
21
+ */
22
+ onClose: () => void;
23
+ /**
24
+ * Open full detail. Receives the draft when dirty, else null — caller seeds
25
+ * ShellDetailPage.initialDirty + initial values from this draft.
26
+ */
27
+ onOpen: (draft: R | null) => void;
28
+ /** Called on every field change (optimistic). Caller may persist or just cache. */
29
+ onSave?: (next: R) => void;
30
+ }
31
+ export declare function QuickPeek<R extends Record<string, unknown>>({ record, title, recordId, avatarName, fields, screen, actions, executeAction, onClose, onOpen, onSave, }: QuickPeekProps<R>): import("react/jsx-runtime").JSX.Element;
32
+ export interface QEFieldProps {
33
+ label: string;
34
+ children: ReactNode;
35
+ }
36
+ export declare function QEField({ label, children }: QEFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from "react";
2
+ export interface RowMenuEntry {
3
+ id: string;
4
+ label: string;
5
+ icon?: ReactNode;
6
+ destructive?: boolean;
7
+ kbd?: ReactNode;
8
+ onRun: () => void;
9
+ }
10
+ export interface RowMenuProps {
11
+ x: number;
12
+ y: number;
13
+ onClose: () => void;
14
+ onPeek?: () => void;
15
+ onOpen?: () => void;
16
+ onEditInline?: () => void;
17
+ onDuplicate?: () => void;
18
+ onCopyLink?: () => void;
19
+ onDelete?: () => void;
20
+ /** Extra schema-driven entries placed between copy-link and Delete. */
21
+ actions?: RowMenuEntry[];
22
+ }
23
+ export declare function RowMenu({ x, y, onClose, onPeek, onOpen, onEditInline, onDuplicate, onCopyLink, onDelete, actions, }: RowMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,67 @@
1
+ import type { Action, Screen } from "../../types/schema";
2
+ export declare const VISIBILITY_LIST_TOOLBAR = "list_toolbar";
3
+ export declare const VISIBILITY_LIST_BULK_BAR = "list_bulk_bar";
4
+ /** Headed entry: action plus its registry code (entity- or globally-scoped). */
5
+ export interface ActionEntry {
6
+ code: string;
7
+ action: Action;
8
+ }
9
+ export interface ResolveInput {
10
+ actions: Record<string, Action>;
11
+ screen?: Screen;
12
+ /**
13
+ * Permission gate. Receives the action code (without entity prefix as stored
14
+ * in the actions map). Caller wires this to the existing RBAC helper.
15
+ * Default: allow all (useful in tests; real callers MUST pass this).
16
+ */
17
+ hasPermission?: (code: string) => boolean;
18
+ selectionCount: number;
19
+ /** Maximum primary buttons promoted per slot. Spec locks to 2. */
20
+ maxPrimary?: number;
21
+ }
22
+ export interface ToolbarResolution {
23
+ /** Promoted to header buttons (max `maxPrimary`, default 2). */
24
+ primary: ActionEntry[];
25
+ /** Global (non-bulk) actions to render in Actions ▾ "Global" group. */
26
+ global: ActionEntry[];
27
+ /**
28
+ * Bulk-required actions to render in Actions ▾ "Needs selection" group.
29
+ * Always present in the menu; UI greys them out when selectionCount === 0.
30
+ */
31
+ needsSelection: ActionEntry[];
32
+ /** Live count badge value next to "Needs selection" label. */
33
+ selectionCount: number;
34
+ }
35
+ export interface BulkBarResolution {
36
+ /** All actions for the floating bulk bar (primary inline + overflow). */
37
+ entries: ActionEntry[];
38
+ /** Subset promoted as inline buttons (max `maxPrimary`, default 2). */
39
+ primaryCodes: Set<string>;
40
+ }
41
+ /**
42
+ * Resolve actions for the list_toolbar slot.
43
+ *
44
+ * Slot rules (plan section C):
45
+ * - Take actions where Visibility includes "list_toolbar" AND user has perm.
46
+ * - If `screen.primary_actions` is set, it OVERRIDES the per-action `primary`
47
+ * flag for promotion (explicit beats implicit). Order preserved, capped at
48
+ * maxPrimary, and bulk-required actions are NEVER promoted to header
49
+ * (they belong in BulkBar / "Needs selection" group only).
50
+ * - Else: first maxPrimary actions with `primary: true` AND not
51
+ * bulk_selection_required become header buttons.
52
+ * - Remaining toolbar actions split into Global / Needs selection by
53
+ * `bulk_selection_required`.
54
+ */
55
+ export declare function resolveToolbarActions(input: ResolveInput): ToolbarResolution;
56
+ /**
57
+ * Resolve actions for the list_bulk_bar slot (floating pill on selection).
58
+ *
59
+ * Slot rules (plan section C):
60
+ * - Take actions where Visibility includes "list_bulk_bar" AND user has perm.
61
+ * - If `screen.primary_bulk_actions` is set, it overrides `primary:` for
62
+ * promotion. Order preserved, capped at maxPrimary.
63
+ * - Else: actions with `primary: true` are promoted (capped).
64
+ * - All resolved actions returned in `entries`; UI splits inline vs ⋯ More
65
+ * using `primaryCodes`.
66
+ */
67
+ export declare function resolveBulkBarActions(input: ResolveInput): BulkBarResolution;
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from "react";
2
+ import { Icon } from "../../../components/primitives/Icons";
3
+ export type AuthShellProps = {
4
+ children: ReactNode;
5
+ workspaceHost?: string;
6
+ tagline?: string;
7
+ subTagline?: string;
8
+ version?: string;
9
+ badges?: Array<[string, keyof typeof Icon]>;
10
+ /** Optional override for the wordmark / app name shown in topbar + brand panel. */
11
+ brandName?: string;
12
+ };
13
+ export declare function AuthShell({ children, workspaceHost, tagline, subTagline, version, badges, brandName, }: AuthShellProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function Forgot(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SignIn(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SignUp(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function TwoFA(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare function GoogleIcon({ size }: {
2
+ size?: number;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ export declare function MicrosoftIcon({ size }: {
5
+ size?: number;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export type HomeStubProps = {
2
+ onOpenNav?: (id: string) => void;
3
+ greeting?: string;
4
+ tenantLabel?: string;
5
+ };
6
+ export declare function HomeStub({ onOpenNav, greeting, tenantLabel, }: HomeStubProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function JobsStub(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function PipelineStub(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function Preferences(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function Profile(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export type AvatarProps = {
2
+ name: string;
3
+ size?: number;
4
+ color?: string;
5
+ };
6
+ export declare function Avatar({ name, size, color }: AvatarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export type BoolToggleProps = {
2
+ value?: boolean;
3
+ onChange?: (v: boolean) => void;
4
+ };
5
+ export declare function BoolToggle({ value, onChange }: BoolToggleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from "react";
2
+ export type BtnKind = "primary" | "navy" | "ghost" | "subtle" | "default";
3
+ export type BtnSize = "xs" | "sm" | "md" | "lg";
4
+ export type BtnProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & {
5
+ kind?: BtnKind;
6
+ size?: BtnSize;
7
+ icon?: ReactNode;
8
+ iconRight?: ReactNode;
9
+ active?: boolean;
10
+ danger?: boolean;
11
+ };
12
+ export declare const Btn: import("react").ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & {
13
+ kind?: BtnKind;
14
+ size?: BtnSize;
15
+ icon?: ReactNode;
16
+ iconRight?: ReactNode;
17
+ active?: boolean;
18
+ danger?: boolean;
19
+ } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,7 @@
1
+ export type CheckProps = {
2
+ checked?: boolean;
3
+ onChange?: (v: boolean) => void;
4
+ indeterminate?: boolean;
5
+ size?: number;
6
+ };
7
+ export declare function Check({ checked, onChange, indeterminate, size }: CheckProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ export type ChipProps = {
3
+ tone?: string;
4
+ icon?: ReactNode;
5
+ children?: ReactNode;
6
+ onRemove?: () => void;
7
+ onClick?: () => void;
8
+ };
9
+ export declare function Chip({ icon, children, onRemove, onClick }: ChipProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { CSSProperties, ReactNode } from "react";
2
+ export type DropdownProps = {
3
+ open: boolean;
4
+ onClose?: () => void;
5
+ anchor: HTMLElement | null;
6
+ align?: "start" | "end";
7
+ width?: number;
8
+ style?: CSSProperties;
9
+ children?: ReactNode;
10
+ };
11
+ export declare function Dropdown({ open, onClose, anchor, children, align, width, style }: DropdownProps): import("react").ReactPortal | null;