@marianmeres/collection-types 1.16.0 → 1.17.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/linked.d.ts +32 -0
- package/package.json +1 -1
package/dist/linked.d.ts
CHANGED
|
@@ -137,6 +137,32 @@ export interface LinkedMatchConfig {
|
|
|
137
137
|
/** Type to match (e.g., "default", "variant") */
|
|
138
138
|
type?: string;
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Display options for rendering linked items.
|
|
142
|
+
* Used both as global defaults and per-rule overrides.
|
|
143
|
+
*/
|
|
144
|
+
export interface LinkedDisplayOptions {
|
|
145
|
+
/** Maximum number of items to show (default: 20) */
|
|
146
|
+
limit?: number;
|
|
147
|
+
/** Grid column count (default: 4) */
|
|
148
|
+
columns?: number;
|
|
149
|
+
/** Whether to show filenames below items (default: true) */
|
|
150
|
+
show_filename?: boolean;
|
|
151
|
+
/** Thumbnail variant size (default: "sm") */
|
|
152
|
+
thumbnail_variant?: "xs" | "sm" | "lg";
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Configuration for the "Referenced By" feature.
|
|
156
|
+
* Shows which other models reference the current model via reverse lookup.
|
|
157
|
+
*/
|
|
158
|
+
export interface ReverseLinkedConfig {
|
|
159
|
+
/** Collections that display reverse linked lookups UI */
|
|
160
|
+
enabled_collections: Array<{
|
|
161
|
+
domain: string;
|
|
162
|
+
entity: string;
|
|
163
|
+
type?: string;
|
|
164
|
+
}>;
|
|
165
|
+
}
|
|
140
166
|
/**
|
|
141
167
|
* A single linked rule configuration.
|
|
142
168
|
* Defines when and how to show/manage linked models for a specific model context.
|
|
@@ -166,6 +192,8 @@ export interface LinkedRule {
|
|
|
166
192
|
* @default 0
|
|
167
193
|
*/
|
|
168
194
|
order?: number;
|
|
195
|
+
/** Display options for rendering (optional, falls back to config defaults) */
|
|
196
|
+
display?: LinkedDisplayOptions;
|
|
169
197
|
}
|
|
170
198
|
/**
|
|
171
199
|
* The complete linked configuration structure.
|
|
@@ -180,4 +208,8 @@ export interface LinkedConfig {
|
|
|
180
208
|
* Array of linked rules.
|
|
181
209
|
*/
|
|
182
210
|
rules: LinkedRule[];
|
|
211
|
+
/** Global default display options (individual rules can override) */
|
|
212
|
+
defaults?: LinkedDisplayOptions;
|
|
213
|
+
/** Configuration for reverse lookups ("referenced by" feature) */
|
|
214
|
+
reverse?: ReverseLinkedConfig;
|
|
183
215
|
}
|