@cervio/create-plugin 1.1.2 → 1.2.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/package.json
CHANGED
package/template/AGENTS.md
CHANGED
|
@@ -60,6 +60,13 @@ Rules:
|
|
|
60
60
|
fixed `:root { ... }` palette - the host injects its tokens at the end of
|
|
61
61
|
`<head>`, so a bundled `:root` can win the cascade and break dark mode /
|
|
62
62
|
org themes. See `src/index.css` for the pattern already in this template.
|
|
63
|
+
- Font: the plugin carries its own. The template ships Geist, the font of
|
|
64
|
+
Cervio (`@fontsource-variable/geist`, imported at the top of
|
|
65
|
+
`src/index.css`); to use another font, replace that import and the body
|
|
66
|
+
`font-family`. Keep font files in the CSS (`@font-face`), not loaded from
|
|
67
|
+
a CDN: the host inlines them into the cached document (up to 512 KB in
|
|
68
|
+
all, woff2 preferred), while anything the sandbox fetches itself is
|
|
69
|
+
downloaded again on every open, and the CSP blocks external font hosts.
|
|
63
70
|
|
|
64
71
|
## 4. `parentOrigin`, not `location.origin`
|
|
65
72
|
|
package/template/package.json
CHANGED
package/template/src/index.css
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/* The plugin carries its own font: Cervio does not impose one. Geist is the
|
|
2
|
+
font of Cervio (SIL OFL 1.1); replace this import and the font-family below
|
|
3
|
+
to use another one. Font files referenced by this CSS are inlined into the
|
|
4
|
+
cached plugin document (up to 512 KB in all), so they load once. */
|
|
5
|
+
@import '@fontsource-variable/geist';
|
|
6
|
+
|
|
1
7
|
/* Design tokens come only from the host (`data-cervio-theme-bridge`); do not
|
|
2
8
|
define :root here - a bundled :root would load after the bridge and
|
|
3
9
|
override the host palette. Use var(--background), var(--foreground), etc. */
|
|
@@ -8,7 +14,7 @@
|
|
|
8
14
|
|
|
9
15
|
body {
|
|
10
16
|
margin: 0;
|
|
11
|
-
font-family:
|
|
17
|
+
font-family: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
|
|
12
18
|
color: var(--foreground);
|
|
13
19
|
background: var(--background);
|
|
14
20
|
}
|
package/template-task/AGENTS.md
CHANGED
|
@@ -20,6 +20,10 @@ This project is a Cervio **task plugin** (`plugin_type: task_form`), scaffolded
|
|
|
20
20
|
- All user-visible strings in `src/i18n` (`it` and `en`, same keys).
|
|
21
21
|
- Use host CSS variables (`var(--background)`, `var(--foreground)`...); never define
|
|
22
22
|
`:root`.
|
|
23
|
+
- Font: the plugin carries its own. The template ships Geist, the font of Cervio
|
|
24
|
+
(`@fontsource-variable/geist`, top of `src/index.css`); replace the import and the
|
|
25
|
+
body `font-family` to use another. Font files go in the CSS (`@font-face`, woff2),
|
|
26
|
+
never from a CDN: the host inlines them into the cached document (up to 512 KB).
|
|
23
27
|
|
|
24
28
|
## Must not
|
|
25
29
|
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/* The plugin carries its own font: Cervio does not impose one. Geist is the
|
|
2
|
+
font of Cervio (SIL OFL 1.1); replace this import and the font-family below
|
|
3
|
+
to use another one. Font files referenced by this CSS are inlined into the
|
|
4
|
+
cached plugin document (up to 512 KB in all), so they load once. */
|
|
5
|
+
@import '@fontsource-variable/geist';
|
|
6
|
+
|
|
1
7
|
/* Design tokens come only from the host theme bridge: do not define :root here.
|
|
2
8
|
Use var(--background), var(--foreground), var(--border), var(--primary)... */
|
|
3
9
|
|
|
@@ -13,7 +19,7 @@ body,
|
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
body {
|
|
16
|
-
font-family:
|
|
22
|
+
font-family: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
|
|
17
23
|
color: var(--foreground);
|
|
18
24
|
background: var(--background);
|
|
19
25
|
}
|