@rizom/brain 0.2.0-alpha.163 → 0.2.0-alpha.165

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.
@@ -94,6 +94,13 @@ interface Template extends Omit<TemplateInput, "schema" | "layout" | "formatter"
94
94
  * templates on a route, dedupes by src, and injects into <head>.
95
95
  */
96
96
  runtimeScripts?: RuntimeScript[];
97
+ /**
98
+ * Static files this template needs served alongside the site — typically
99
+ * the file behind a runtimeScripts src. Keyed by output-relative path;
100
+ * site-builder writes each entry into the build output for routes that
101
+ * actually render this template.
102
+ */
103
+ staticAssets?: Record<string, string>;
97
104
  }
98
105
  /**
99
106
  * Helper to create a template with automatic component wrapping
@@ -109,6 +116,7 @@ declare function createTemplate<TSchema = unknown, TComponent = TSchema>(templat
109
116
  fullscreen?: boolean;
110
117
  };
111
118
  runtimeScripts?: RuntimeScript[];
119
+ staticAssets?: Record<string, string>;
112
120
  }): Template;
113
121
  /**
114
122
  * Template schema for validation
@@ -178,6 +186,8 @@ interface ViewTemplate<T = unknown> {
178
186
  formatter?: ContentFormatter<T>;
179
187
  /** Runtime script dependencies (see Template.runtimeScripts). */
180
188
  runtimeScripts?: RuntimeScript[];
189
+ /** Static files behind runtimeScripts srcs (see Template.staticAssets). */
190
+ staticAssets?: Record<string, string>;
181
191
  }
182
192
  /**
183
193
  * View template registry interface