@dosgato/templating
Advanced tools
Comparing version 0.0.134 to 0.0.135
@@ -376,2 +376,8 @@ /// <reference types="node" /> | ||
} | ||
export interface AssetData<T = any> { | ||
shasum: string; | ||
uploadedFilename: string; | ||
meta: T; | ||
[keys: string]: any; | ||
} | ||
export interface ContextBase { | ||
@@ -378,0 +384,0 @@ /** |
@@ -165,2 +165,6 @@ import type { ComponentData, PageData } from './component.js'; | ||
} | ||
interface AssetMetaDisplay { | ||
component: UITemplate['dialog']; | ||
title: string; | ||
} | ||
/** | ||
@@ -228,3 +232,22 @@ * A type for the config object that should be exported from a CMS instance's admin/local/index.js | ||
*/ | ||
assetMetaDialog?: UITemplate['dialog']; | ||
assetMeta?: { | ||
dialog: UITemplate['dialog']; | ||
/** | ||
* If you provide an assetMeta.dialog to collect extra details about each asset, you'll probably want to | ||
* display those details on the asset detail screen. Provide this function to return a map of detail | ||
* keys and values to be displayed alongside the other vitals like asset name, size, type, etc. Insertion | ||
* order will be maintained. | ||
*/ | ||
details?: (data: any) => Record<string, string>; | ||
/** | ||
* If you provide an assetMeta.dialog to collect extra details about each asset, you may want to use | ||
* assetMeta.details to show some of it, and/or you may want your own box on the detail page to do something | ||
* cool and custom. Provide a svelte component here and it will be passed the asset object with all of | ||
* its metadata so that you can draw whatever you like. Your content will be placed inside a box titled | ||
* with the title property. | ||
* | ||
* Provide an array to be given multiple boxes. | ||
*/ | ||
display?: AssetMetaDisplay | AssetMetaDisplay[]; | ||
}; | ||
tracing?: TracingInterface; | ||
@@ -231,0 +254,0 @@ /** Non-Awaited async call for logging interface interactions if defined. |
{ | ||
"name": "@dosgato/templating", | ||
"version": "0.0.134", | ||
"version": "0.0.135", | ||
"description": "A library to support building templates for dosgato CMS.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109382
2382