@almadar/ui 5.157.0 → 5.159.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.
- package/dist/{EntityBindingContext-BfZGeDfX.d.cts → EntityBindingContext-0Evn_LcT.d.cts} +7 -3
- package/dist/{EntityBindingContext-BfZGeDfX.d.ts → EntityBindingContext-0Evn_LcT.d.ts} +7 -3
- package/dist/avl/index.cjs +379 -50
- package/dist/avl/index.js +380 -51
- package/dist/components/index.cjs +394 -17
- package/dist/components/index.d.cts +48 -6
- package/dist/components/index.d.ts +48 -6
- package/dist/components/index.js +395 -18
- package/dist/context/index.cjs +134 -39
- package/dist/context/index.js +92 -1
- package/dist/hooks/index.cjs +328 -233
- package/dist/hooks/index.js +93 -2
- package/dist/lib/index.cjs +92 -0
- package/dist/lib/index.d.cts +58 -1
- package/dist/lib/index.d.ts +58 -1
- package/dist/lib/index.js +62 -1
- package/dist/locales/index.cjs +3 -0
- package/dist/locales/index.js +3 -0
- package/dist/perf-DaVdsbU0.d.cts +21 -0
- package/dist/perf-DaVdsbU0.d.ts +21 -0
- package/dist/providers/index.cjs +461 -106
- package/dist/providers/index.d.cts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +462 -107
- package/dist/runtime/index.cjs +387 -55
- package/dist/runtime/index.d.cts +15 -23
- package/dist/runtime/index.d.ts +15 -23
- package/dist/runtime/index.js +389 -56
- package/locales/ar.json +1 -0
- package/locales/en.json +1 -0
- package/locales/sl.json +1 -0
- package/package.json +5 -5
|
@@ -3735,13 +3735,33 @@ interface FileTreeNode {
|
|
|
3735
3735
|
/** Detected language for syntax highlighting */
|
|
3736
3736
|
language?: string;
|
|
3737
3737
|
}
|
|
3738
|
+
/** Flat tree row for `items` mode — nested at render time by `parentId`. */
|
|
3739
|
+
interface FileTreeItem {
|
|
3740
|
+
/** Unique node id */
|
|
3741
|
+
id: string;
|
|
3742
|
+
/** Display label */
|
|
3743
|
+
label: string;
|
|
3744
|
+
/** Id of this node's parent; empty/absent marks a root */
|
|
3745
|
+
parentId?: string;
|
|
3746
|
+
/** Icon name override (falls back to folder/file by presence of children) */
|
|
3747
|
+
icon?: string;
|
|
3748
|
+
}
|
|
3738
3749
|
interface FileTreeProps {
|
|
3739
|
-
/** The tree data */
|
|
3740
|
-
tree
|
|
3750
|
+
/** The tree data (pre-nested). Ignored when `items` is provided. */
|
|
3751
|
+
tree?: FileTreeNode[];
|
|
3752
|
+
/** Flat node list, nested by `parentId` at render time — takes precedence
|
|
3753
|
+
* over `tree` when provided. A `parentId` with no matching row renders
|
|
3754
|
+
* that node as a root rather than dropping it. */
|
|
3755
|
+
items?: FileTreeItem[];
|
|
3741
3756
|
/** Currently selected file path */
|
|
3742
3757
|
selectedPath?: string;
|
|
3743
3758
|
/** Called when a file is clicked */
|
|
3744
3759
|
onFileSelect?: (path: string) => void;
|
|
3760
|
+
/** Called when a node is clicked, in flat `items` mode; carries the
|
|
3761
|
+
* selected node's id. Presence-gated: binding this prop is what turns on
|
|
3762
|
+
* the click-to-select affordance, mirroring Badge's `onRemove`.
|
|
3763
|
+
* @offByDefault */
|
|
3764
|
+
onNodeSelect?: (id: string) => void;
|
|
3745
3765
|
/** CSS class */
|
|
3746
3766
|
className?: string;
|
|
3747
3767
|
/** Indent size per level in px (default: 16) */
|
|
@@ -4789,6 +4809,11 @@ declare const OnboardingSpotlight: React__default.FC<OnboardingSpotlightProps>;
|
|
|
4789
4809
|
* Composed from: Box, HStack, VStack, Input, Button, Spinner, Typography atoms
|
|
4790
4810
|
*/
|
|
4791
4811
|
|
|
4812
|
+
/** Relation cardinality vocabulary — mirrors `@almadar/core`'s
|
|
4813
|
+
* `RelationCardinality` (spelled inline: the pattern extractor resolves
|
|
4814
|
+
* components-tree aliases to `enumValues`, but treats core imports as
|
|
4815
|
+
* opaque). `many`/`one-to-many`/`many-to-many` drive multi-value pickers. */
|
|
4816
|
+
type RelationFieldCardinality = "one" | "many" | "one-to-many" | "many-to-one" | "many-to-many";
|
|
4792
4817
|
interface RelationOption {
|
|
4793
4818
|
/** The value to store (typically the ID) */
|
|
4794
4819
|
value: string;
|
|
@@ -10727,6 +10752,13 @@ declare const StatCard: React__default.FC<StatCardProps>;
|
|
|
10727
10752
|
* Extends DisplayStateProps (see ./types.ts) and declares `entity?: EntityRow`.
|
|
10728
10753
|
*/
|
|
10729
10754
|
|
|
10755
|
+
/** Relation descriptor injected onto a display field — target entity +
|
|
10756
|
+
* cardinality, mirroring the `.lolo` `{type:"relation", relation:{...}}`
|
|
10757
|
+
* descriptor. */
|
|
10758
|
+
interface DetailRelationMeta {
|
|
10759
|
+
entity: string;
|
|
10760
|
+
cardinality?: RelationFieldCardinality;
|
|
10761
|
+
}
|
|
10730
10762
|
interface DetailField {
|
|
10731
10763
|
label: string;
|
|
10732
10764
|
value: React__default.ReactNode;
|
|
@@ -10762,12 +10794,12 @@ type FieldDef$2 = string | {
|
|
|
10762
10794
|
header?: string;
|
|
10763
10795
|
type?: string;
|
|
10764
10796
|
values?: readonly string[];
|
|
10765
|
-
relation?:
|
|
10797
|
+
relation?: DetailRelationMeta;
|
|
10766
10798
|
} | {
|
|
10767
10799
|
name: string;
|
|
10768
10800
|
type: string;
|
|
10769
10801
|
values?: readonly string[];
|
|
10770
|
-
relation?:
|
|
10802
|
+
relation?: DetailRelationMeta;
|
|
10771
10803
|
};
|
|
10772
10804
|
interface DetailPanelStatus {
|
|
10773
10805
|
label: string;
|
|
@@ -10782,6 +10814,14 @@ interface DetailPanelProps extends DisplayStateProps {
|
|
|
10782
10814
|
/** RECORD-cardinality: renders ONE record (see body collapse below). */
|
|
10783
10815
|
entity?: EntityRow;
|
|
10784
10816
|
title?: string;
|
|
10817
|
+
/**
|
|
10818
|
+
* When bound, the title becomes editable in place: clicking it swaps the
|
|
10819
|
+
* heading for an input, Enter or blur commits, Escape reverts. Receives the
|
|
10820
|
+
* committed title and the record's id so the host can persist a partial
|
|
10821
|
+
* update. Unbound, the title stays a plain heading.
|
|
10822
|
+
* @offByDefault
|
|
10823
|
+
*/
|
|
10824
|
+
onTitleCommit?: (title: string, id: string) => void;
|
|
10785
10825
|
subtitle?: string;
|
|
10786
10826
|
status?: DetailPanelStatus;
|
|
10787
10827
|
avatar?: React__default.ReactNode;
|
|
@@ -10895,8 +10935,10 @@ interface RelationConfig {
|
|
|
10895
10935
|
entity: string;
|
|
10896
10936
|
/** Field on target entity to display (defaults to 'name') */
|
|
10897
10937
|
displayField?: string;
|
|
10898
|
-
/** Cardinality
|
|
10899
|
-
|
|
10938
|
+
/** Cardinality of the relation — many-valued spellings drive the
|
|
10939
|
+
* multi-select picker below; anything else (including absent) stays
|
|
10940
|
+
* single-select. */
|
|
10941
|
+
cardinality?: RelationFieldCardinality;
|
|
10900
10942
|
}
|
|
10901
10943
|
/**
|
|
10902
10944
|
* Validation-rule bundle for a schema field. Only `enum` is actually read
|
|
@@ -3735,13 +3735,33 @@ interface FileTreeNode {
|
|
|
3735
3735
|
/** Detected language for syntax highlighting */
|
|
3736
3736
|
language?: string;
|
|
3737
3737
|
}
|
|
3738
|
+
/** Flat tree row for `items` mode — nested at render time by `parentId`. */
|
|
3739
|
+
interface FileTreeItem {
|
|
3740
|
+
/** Unique node id */
|
|
3741
|
+
id: string;
|
|
3742
|
+
/** Display label */
|
|
3743
|
+
label: string;
|
|
3744
|
+
/** Id of this node's parent; empty/absent marks a root */
|
|
3745
|
+
parentId?: string;
|
|
3746
|
+
/** Icon name override (falls back to folder/file by presence of children) */
|
|
3747
|
+
icon?: string;
|
|
3748
|
+
}
|
|
3738
3749
|
interface FileTreeProps {
|
|
3739
|
-
/** The tree data */
|
|
3740
|
-
tree
|
|
3750
|
+
/** The tree data (pre-nested). Ignored when `items` is provided. */
|
|
3751
|
+
tree?: FileTreeNode[];
|
|
3752
|
+
/** Flat node list, nested by `parentId` at render time — takes precedence
|
|
3753
|
+
* over `tree` when provided. A `parentId` with no matching row renders
|
|
3754
|
+
* that node as a root rather than dropping it. */
|
|
3755
|
+
items?: FileTreeItem[];
|
|
3741
3756
|
/** Currently selected file path */
|
|
3742
3757
|
selectedPath?: string;
|
|
3743
3758
|
/** Called when a file is clicked */
|
|
3744
3759
|
onFileSelect?: (path: string) => void;
|
|
3760
|
+
/** Called when a node is clicked, in flat `items` mode; carries the
|
|
3761
|
+
* selected node's id. Presence-gated: binding this prop is what turns on
|
|
3762
|
+
* the click-to-select affordance, mirroring Badge's `onRemove`.
|
|
3763
|
+
* @offByDefault */
|
|
3764
|
+
onNodeSelect?: (id: string) => void;
|
|
3745
3765
|
/** CSS class */
|
|
3746
3766
|
className?: string;
|
|
3747
3767
|
/** Indent size per level in px (default: 16) */
|
|
@@ -4789,6 +4809,11 @@ declare const OnboardingSpotlight: React__default.FC<OnboardingSpotlightProps>;
|
|
|
4789
4809
|
* Composed from: Box, HStack, VStack, Input, Button, Spinner, Typography atoms
|
|
4790
4810
|
*/
|
|
4791
4811
|
|
|
4812
|
+
/** Relation cardinality vocabulary — mirrors `@almadar/core`'s
|
|
4813
|
+
* `RelationCardinality` (spelled inline: the pattern extractor resolves
|
|
4814
|
+
* components-tree aliases to `enumValues`, but treats core imports as
|
|
4815
|
+
* opaque). `many`/`one-to-many`/`many-to-many` drive multi-value pickers. */
|
|
4816
|
+
type RelationFieldCardinality = "one" | "many" | "one-to-many" | "many-to-one" | "many-to-many";
|
|
4792
4817
|
interface RelationOption {
|
|
4793
4818
|
/** The value to store (typically the ID) */
|
|
4794
4819
|
value: string;
|
|
@@ -10727,6 +10752,13 @@ declare const StatCard: React__default.FC<StatCardProps>;
|
|
|
10727
10752
|
* Extends DisplayStateProps (see ./types.ts) and declares `entity?: EntityRow`.
|
|
10728
10753
|
*/
|
|
10729
10754
|
|
|
10755
|
+
/** Relation descriptor injected onto a display field — target entity +
|
|
10756
|
+
* cardinality, mirroring the `.lolo` `{type:"relation", relation:{...}}`
|
|
10757
|
+
* descriptor. */
|
|
10758
|
+
interface DetailRelationMeta {
|
|
10759
|
+
entity: string;
|
|
10760
|
+
cardinality?: RelationFieldCardinality;
|
|
10761
|
+
}
|
|
10730
10762
|
interface DetailField {
|
|
10731
10763
|
label: string;
|
|
10732
10764
|
value: React__default.ReactNode;
|
|
@@ -10762,12 +10794,12 @@ type FieldDef$2 = string | {
|
|
|
10762
10794
|
header?: string;
|
|
10763
10795
|
type?: string;
|
|
10764
10796
|
values?: readonly string[];
|
|
10765
|
-
relation?:
|
|
10797
|
+
relation?: DetailRelationMeta;
|
|
10766
10798
|
} | {
|
|
10767
10799
|
name: string;
|
|
10768
10800
|
type: string;
|
|
10769
10801
|
values?: readonly string[];
|
|
10770
|
-
relation?:
|
|
10802
|
+
relation?: DetailRelationMeta;
|
|
10771
10803
|
};
|
|
10772
10804
|
interface DetailPanelStatus {
|
|
10773
10805
|
label: string;
|
|
@@ -10782,6 +10814,14 @@ interface DetailPanelProps extends DisplayStateProps {
|
|
|
10782
10814
|
/** RECORD-cardinality: renders ONE record (see body collapse below). */
|
|
10783
10815
|
entity?: EntityRow;
|
|
10784
10816
|
title?: string;
|
|
10817
|
+
/**
|
|
10818
|
+
* When bound, the title becomes editable in place: clicking it swaps the
|
|
10819
|
+
* heading for an input, Enter or blur commits, Escape reverts. Receives the
|
|
10820
|
+
* committed title and the record's id so the host can persist a partial
|
|
10821
|
+
* update. Unbound, the title stays a plain heading.
|
|
10822
|
+
* @offByDefault
|
|
10823
|
+
*/
|
|
10824
|
+
onTitleCommit?: (title: string, id: string) => void;
|
|
10785
10825
|
subtitle?: string;
|
|
10786
10826
|
status?: DetailPanelStatus;
|
|
10787
10827
|
avatar?: React__default.ReactNode;
|
|
@@ -10895,8 +10935,10 @@ interface RelationConfig {
|
|
|
10895
10935
|
entity: string;
|
|
10896
10936
|
/** Field on target entity to display (defaults to 'name') */
|
|
10897
10937
|
displayField?: string;
|
|
10898
|
-
/** Cardinality
|
|
10899
|
-
|
|
10938
|
+
/** Cardinality of the relation — many-valued spellings drive the
|
|
10939
|
+
* multi-select picker below; anything else (including absent) stays
|
|
10940
|
+
* single-select. */
|
|
10941
|
+
cardinality?: RelationFieldCardinality;
|
|
10900
10942
|
}
|
|
10901
10943
|
/**
|
|
10902
10944
|
* Validation-rule bundle for a schema field. Only `enum` is actually read
|