@almadar/ui 5.162.0 → 5.164.0

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.
@@ -3755,6 +3755,14 @@ interface FileTreeProps {
3755
3755
  items?: FileTreeItem[];
3756
3756
  /** Currently selected file path */
3757
3757
  selectedPath?: string;
3758
+ /** Currently selected node id, in flat `items` mode: the row highlights
3759
+ * and every ancestor auto-expands so the selection is always visible —
3760
+ * the "you are here" a navigation tree needs. */
3761
+ selectedId?: string;
3762
+ /** Visual treatment for flat `items` mode: `files` (default) keeps the
3763
+ * monospace file-browser look; `nav` renders a sidebar navigation tree —
3764
+ * regular font, document icons, roomier hit areas. */
3765
+ look?: 'files' | 'nav';
3758
3766
  /** Called when a file is clicked */
3759
3767
  onFileSelect?: (path: string) => void;
3760
3768
  /** Called when a node is clicked, in flat `items` mode; carries the
@@ -3762,6 +3770,14 @@ interface FileTreeProps {
3762
3770
  * the click-to-select affordance, mirroring Badge's `onRemove`.
3763
3771
  * @offByDefault */
3764
3772
  onNodeSelect?: (id: string) => void;
3773
+ /** Called from the row's hover action button, in flat `items` mode;
3774
+ * carries that node's id. Presence-gated: binding it renders the action.
3775
+ * @offByDefault */
3776
+ onNodeAction?: (id: string) => void;
3777
+ /** Icon for the row hover action (default: plus). */
3778
+ nodeActionIcon?: string;
3779
+ /** Accessible label/tooltip for the row hover action. */
3780
+ nodeActionLabel?: string;
3765
3781
  /** CSS class */
3766
3782
  className?: string;
3767
3783
  /** Indent size per level in px (default: 16) */
@@ -8881,6 +8897,12 @@ interface DocumentPanelProps {
8881
8897
  title?: string;
8882
8898
  /** Muted byline under the title; hidden when empty */
8883
8899
  subtitle?: string;
8900
+ /** Cover/hero image URL painted as a full-bleed banner above the header
8901
+ * row (Notion/article-hero shape); hidden when empty */
8902
+ coverImage?: string;
8903
+ /** Document icon rendered beside the title (a file glyph, a domain icon);
8904
+ * hidden when empty */
8905
+ icon?: IconInput;
8884
8906
  /** The document body as rich-text HTML */
8885
8907
  value?: string;
8886
8908
  /** Header actions (settings, history, …). At most one explicit primary
@@ -8916,7 +8938,7 @@ interface DocumentPanelProps {
8916
8938
  placeholder?: string;
8917
8939
  className?: string;
8918
8940
  }
8919
- declare function DocumentPanel({ id, title, subtitle, value, actions, maxInlineActions, editing, titleCommitEvent, contentChangeEvent, editEvent, doneEvent, editLabel, doneLabel, autosaveHint, placeholder, className, }: DocumentPanelProps): React__default.ReactElement;
8941
+ declare function DocumentPanel({ id, title, subtitle, coverImage, icon, value, actions, maxInlineActions, editing, titleCommitEvent, contentChangeEvent, editEvent, doneEvent, editLabel, doneLabel, autosaveHint, placeholder, className, }: DocumentPanelProps): React__default.ReactElement;
8920
8942
 
8921
8943
  /**
8922
8944
  * DocumentDetails Molecule
@@ -8945,19 +8967,24 @@ interface DocumentDetailsField {
8945
8967
  header?: string;
8946
8968
  /** Lucide icon name or component shown beside the label */
8947
8969
  icon?: IconInput;
8948
- /** How the property edits: text input, boolean switch, select, or display-only.
8949
- * Inferred from the value when omitted (boolean → boolean, array → readonly, else text). */
8950
- kind?: 'text' | 'boolean' | 'select' | 'readonly';
8970
+ /** How the property edits: text input, boolean switch, select, image
8971
+ * thumbnail, or display-only. Inferred from the value when omitted
8972
+ * (boolean boolean, array readonly, image-typed → image, else text). */
8973
+ kind?: 'text' | 'boolean' | 'select' | 'readonly' | 'image';
8951
8974
  /** Options for kind: 'select' */
8952
8975
  options?: readonly string[];
8953
8976
  /** Display format for the read value */
8954
8977
  format?: 'date' | 'currency' | 'number' | 'boolean' | 'percent';
8978
+ /** Entity-declared field type, injected by the display fields contract —
8979
+ * drives kind inference (e.g. `image` → thumbnail row). */
8980
+ type?: string;
8955
8981
  }
8956
8982
  /**
8957
8983
  * DocumentDetails — the document's metadata as a compact settings card for
8958
8984
  * the rail beside a DocumentPanel, each property committing in place.
8959
8985
  *
8960
8986
  * @capabilities document settings, page details, post settings sidebar, metadata panel, document properties, publish settings
8987
+ * @fieldsContract display
8961
8988
  */
8962
8989
  interface DocumentDetailsProps {
8963
8990
  /** The loaded record — supplies the id every commit carries and the
@@ -8971,11 +8998,19 @@ interface DocumentDetailsProps {
8971
8998
  id: string;
8972
8999
  patch: Record<string, FieldValue>;
8973
9000
  }>;
9001
+ /** Makes relation chips clickable: emitted with { field, id, name } when a
9002
+ * hydrated relation value (or one row of a many-relation) is clicked —
9003
+ * the host routes it to the linked record's own surface. */
9004
+ relationEvent?: EventEmit<{
9005
+ field: string;
9006
+ id: string;
9007
+ name: string;
9008
+ }>;
8974
9009
  /** Card heading (defaults to the localized "Details") */
8975
9010
  title?: string;
8976
9011
  className?: string;
8977
9012
  }
8978
- declare function DocumentDetails({ entity, fields, metaCommitEvent, title, className, }: DocumentDetailsProps): React__default.ReactElement | null;
9013
+ declare function DocumentDetails({ entity, fields, metaCommitEvent, relationEvent, title, className, }: DocumentDetailsProps): React__default.ReactElement | null;
8979
9014
 
8980
9015
  /**
8981
9016
  * ReplyTree Organism Component
@@ -12631,6 +12666,10 @@ interface DashboardLayoutProps {
12631
12666
  /** Custom sidebar footer (optional). When omitted, the sidebar has
12632
12667
  * no footer — apps that need Settings/etc. add them via navItems. */
12633
12668
  sidebarFooter?: React__default.ReactNode;
12669
+ /** Optional content region rendered between the nav links and the footer —
12670
+ * a page tree or any consumer navigation surface; scrolls independently
12671
+ * and takes the sidebar's remaining height. Hidden in the collapsed rail. */
12672
+ sidebarContent?: React__default.ReactNode;
12634
12673
  /** Active path used to highlight the matching nav item. Falls back
12635
12674
  * to `useCurrentPagePath()` (set by `CurrentPagePathProvider`), then
12636
12675
  * to `useLocation().pathname`. Production deploys can omit it; the
@@ -3755,6 +3755,14 @@ interface FileTreeProps {
3755
3755
  items?: FileTreeItem[];
3756
3756
  /** Currently selected file path */
3757
3757
  selectedPath?: string;
3758
+ /** Currently selected node id, in flat `items` mode: the row highlights
3759
+ * and every ancestor auto-expands so the selection is always visible —
3760
+ * the "you are here" a navigation tree needs. */
3761
+ selectedId?: string;
3762
+ /** Visual treatment for flat `items` mode: `files` (default) keeps the
3763
+ * monospace file-browser look; `nav` renders a sidebar navigation tree —
3764
+ * regular font, document icons, roomier hit areas. */
3765
+ look?: 'files' | 'nav';
3758
3766
  /** Called when a file is clicked */
3759
3767
  onFileSelect?: (path: string) => void;
3760
3768
  /** Called when a node is clicked, in flat `items` mode; carries the
@@ -3762,6 +3770,14 @@ interface FileTreeProps {
3762
3770
  * the click-to-select affordance, mirroring Badge's `onRemove`.
3763
3771
  * @offByDefault */
3764
3772
  onNodeSelect?: (id: string) => void;
3773
+ /** Called from the row's hover action button, in flat `items` mode;
3774
+ * carries that node's id. Presence-gated: binding it renders the action.
3775
+ * @offByDefault */
3776
+ onNodeAction?: (id: string) => void;
3777
+ /** Icon for the row hover action (default: plus). */
3778
+ nodeActionIcon?: string;
3779
+ /** Accessible label/tooltip for the row hover action. */
3780
+ nodeActionLabel?: string;
3765
3781
  /** CSS class */
3766
3782
  className?: string;
3767
3783
  /** Indent size per level in px (default: 16) */
@@ -8881,6 +8897,12 @@ interface DocumentPanelProps {
8881
8897
  title?: string;
8882
8898
  /** Muted byline under the title; hidden when empty */
8883
8899
  subtitle?: string;
8900
+ /** Cover/hero image URL painted as a full-bleed banner above the header
8901
+ * row (Notion/article-hero shape); hidden when empty */
8902
+ coverImage?: string;
8903
+ /** Document icon rendered beside the title (a file glyph, a domain icon);
8904
+ * hidden when empty */
8905
+ icon?: IconInput;
8884
8906
  /** The document body as rich-text HTML */
8885
8907
  value?: string;
8886
8908
  /** Header actions (settings, history, …). At most one explicit primary
@@ -8916,7 +8938,7 @@ interface DocumentPanelProps {
8916
8938
  placeholder?: string;
8917
8939
  className?: string;
8918
8940
  }
8919
- declare function DocumentPanel({ id, title, subtitle, value, actions, maxInlineActions, editing, titleCommitEvent, contentChangeEvent, editEvent, doneEvent, editLabel, doneLabel, autosaveHint, placeholder, className, }: DocumentPanelProps): React__default.ReactElement;
8941
+ declare function DocumentPanel({ id, title, subtitle, coverImage, icon, value, actions, maxInlineActions, editing, titleCommitEvent, contentChangeEvent, editEvent, doneEvent, editLabel, doneLabel, autosaveHint, placeholder, className, }: DocumentPanelProps): React__default.ReactElement;
8920
8942
 
8921
8943
  /**
8922
8944
  * DocumentDetails Molecule
@@ -8945,19 +8967,24 @@ interface DocumentDetailsField {
8945
8967
  header?: string;
8946
8968
  /** Lucide icon name or component shown beside the label */
8947
8969
  icon?: IconInput;
8948
- /** How the property edits: text input, boolean switch, select, or display-only.
8949
- * Inferred from the value when omitted (boolean → boolean, array → readonly, else text). */
8950
- kind?: 'text' | 'boolean' | 'select' | 'readonly';
8970
+ /** How the property edits: text input, boolean switch, select, image
8971
+ * thumbnail, or display-only. Inferred from the value when omitted
8972
+ * (boolean boolean, array readonly, image-typed → image, else text). */
8973
+ kind?: 'text' | 'boolean' | 'select' | 'readonly' | 'image';
8951
8974
  /** Options for kind: 'select' */
8952
8975
  options?: readonly string[];
8953
8976
  /** Display format for the read value */
8954
8977
  format?: 'date' | 'currency' | 'number' | 'boolean' | 'percent';
8978
+ /** Entity-declared field type, injected by the display fields contract —
8979
+ * drives kind inference (e.g. `image` → thumbnail row). */
8980
+ type?: string;
8955
8981
  }
8956
8982
  /**
8957
8983
  * DocumentDetails — the document's metadata as a compact settings card for
8958
8984
  * the rail beside a DocumentPanel, each property committing in place.
8959
8985
  *
8960
8986
  * @capabilities document settings, page details, post settings sidebar, metadata panel, document properties, publish settings
8987
+ * @fieldsContract display
8961
8988
  */
8962
8989
  interface DocumentDetailsProps {
8963
8990
  /** The loaded record — supplies the id every commit carries and the
@@ -8971,11 +8998,19 @@ interface DocumentDetailsProps {
8971
8998
  id: string;
8972
8999
  patch: Record<string, FieldValue>;
8973
9000
  }>;
9001
+ /** Makes relation chips clickable: emitted with { field, id, name } when a
9002
+ * hydrated relation value (or one row of a many-relation) is clicked —
9003
+ * the host routes it to the linked record's own surface. */
9004
+ relationEvent?: EventEmit<{
9005
+ field: string;
9006
+ id: string;
9007
+ name: string;
9008
+ }>;
8974
9009
  /** Card heading (defaults to the localized "Details") */
8975
9010
  title?: string;
8976
9011
  className?: string;
8977
9012
  }
8978
- declare function DocumentDetails({ entity, fields, metaCommitEvent, title, className, }: DocumentDetailsProps): React__default.ReactElement | null;
9013
+ declare function DocumentDetails({ entity, fields, metaCommitEvent, relationEvent, title, className, }: DocumentDetailsProps): React__default.ReactElement | null;
8979
9014
 
8980
9015
  /**
8981
9016
  * ReplyTree Organism Component
@@ -12631,6 +12666,10 @@ interface DashboardLayoutProps {
12631
12666
  /** Custom sidebar footer (optional). When omitted, the sidebar has
12632
12667
  * no footer — apps that need Settings/etc. add them via navItems. */
12633
12668
  sidebarFooter?: React__default.ReactNode;
12669
+ /** Optional content region rendered between the nav links and the footer —
12670
+ * a page tree or any consumer navigation surface; scrolls independently
12671
+ * and takes the sidebar's remaining height. Hidden in the collapsed rail. */
12672
+ sidebarContent?: React__default.ReactNode;
12634
12673
  /** Active path used to highlight the matching nav item. Falls back
12635
12674
  * to `useCurrentPagePath()` (set by `CurrentPagePathProvider`), then
12636
12675
  * to `useLocation().pathname`. Production deploys can omit it; the