@@ -4,6 +4,15 @@ import { renderTagFolderTemplateVariables } from "./new-note-template";
44
55export const NEW_NOTE_TEMPLATE_INTERACTION_ID = "new-note-template" ;
66
7+ /** UI capability required by the new-note template workflow. */
8+ export type NewNoteTemplateUi = Pick < UiInteractions , "pickOne" > ;
9+
10+ /** Vault text capability required while populating a new note. */
11+ export type NewNoteVaultTextAccess = Pick <
12+ VaultTextAccess ,
13+ "readText" | "modifyText" | "appendText"
14+ > ;
15+
716/** Template identity and labels exposed to the application workflow. */
817export interface NewNoteTemplateChoice {
918 /** Vault-relative template path. */
@@ -26,7 +35,7 @@ export function filterNewNoteTemplateChoices(
2635
2736/** Requests one captured template by identity, returns `null` when dismissed, or `undefined` when empty. */
2837export async function chooseNewNoteTemplate (
29- ui : UiInteractions ,
38+ ui : NewNoteTemplateUi ,
3039 templates : readonly NewNoteTemplateChoice [ ] ,
3140) : Promise < NewNoteTemplateChoice | null | undefined > {
3241 if ( templates . length == 0 ) return undefined ;
@@ -44,7 +53,7 @@ export async function chooseNewNoteTemplate(
4453/** Inputs owned by TagFolder while populating a newly created note. */
4554export interface PopulateNewNoteOptions {
4655 /** Injectable path-based Vault text capability. */
47- readonly vault : VaultTextAccess ;
56+ readonly vault : NewNoteVaultTextAccess ;
4857 /** Vault-relative path of the already created note. */
4958 readonly notePath : string ;
5059 /** Selected template, or `null` to apply tags without a template. */
0 commit comments