@samva/vite 0.8.0 → 0.9.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/index.d.ts CHANGED
@@ -2,15 +2,22 @@ import { Plugin } from "vite";
2
2
  //#region src/editor.d.ts
3
3
  interface SamvaEditorPluginOptions {
4
4
  /**
5
- * Directory containing `.tsx` templates: an absolute path, or a path relative to the Vite root.
6
- * Default `emails`.
5
+ * The directory containing `.tsx` templates: an absolute path, or a path relative to the
6
+ * project root. When set, only it is scanned. Otherwise `templates/` and `emails/` are, whichever
7
+ * exist.
7
8
  */
8
9
  readonly templatesDir?: string | undefined;
10
+ /**
11
+ * The project root: the folder holding `theme.css`, shared imports and the generated `.samva/`
12
+ * folder. A path relative to the Vite root; default the Vite root. Set it for templates that
13
+ * live in another folder of a monorepo; the templates directory must be inside it.
14
+ */
15
+ readonly projectRoot?: string | undefined;
9
16
  /** Editor UI route. Default `/`; its API and assets are mounted as siblings below it. */
10
17
  readonly route?: string | undefined;
11
18
  /**
12
- * Project theme file: an absolute path, or a path relative to the Vite root. Default
13
- * `theme.css`; false disables discovery.
19
+ * Project theme file: a path relative to the project root. Default `theme.css`; false compiles
20
+ * without a project theme.
14
21
  */
15
22
  readonly theme?: string | false | undefined;
16
23
  }