@cervio/create-plugin 1.1.2 → 1.2.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cervio/create-plugin",
3
- "version": "1.1.2",
3
+ "version": "1.2.1",
4
4
  "description": "Scaffold a Cervio plugin (route, task or write-gate) wired to the Cervio toolchain. Run with: npm create @cervio/plugin",
5
5
  "keywords": [
6
6
  "cervio",
@@ -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
 
@@ -12,13 +12,14 @@
12
12
  "push:dev": "cervio push --dev"
13
13
  },
14
14
  "dependencies": {
15
- "@cervio/plugin-sdk": "^2.0.0",
15
+ "@cervio/plugin-sdk": "^2.2.0",
16
+ "@fontsource-variable/geist": "^5.2.0",
16
17
  "react": "^19.0.0",
17
18
  "react-dom": "^19.0.0"
18
19
  },
19
20
  "devDependencies": {
20
- "@cervio/cli": "^1.0.0",
21
- "@cervio/plugin-core": "^1.0.0",
21
+ "@cervio/cli": "^1.5.0",
22
+ "@cervio/plugin-core": "^1.5.0",
22
23
  "@types/react": "^19.0.0",
23
24
  "@types/react-dom": "^19.0.0",
24
25
  "@vitejs/plugin-react": "^6.2.0",
@@ -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: var(--font-sans, system-ui, sans-serif);
17
+ font-family: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
12
18
  color: var(--foreground);
13
19
  background: var(--background);
14
20
  }
@@ -10,10 +10,10 @@
10
10
  "push:dev": "npm run build && cervio push --dev"
11
11
  },
12
12
  "dependencies": {
13
- "@cervio/plugin-sdk": "^2.0.0"
13
+ "@cervio/plugin-sdk": "^2.2.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@cervio/cli": "^1.0.0",
16
+ "@cervio/cli": "^1.5.0",
17
17
  "esbuild": "^0.28.0"
18
18
  }
19
19
  }
@@ -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
 
@@ -12,13 +12,14 @@
12
12
  "push:dev": "cervio push --dev"
13
13
  },
14
14
  "dependencies": {
15
- "@cervio/plugin-sdk": "^2.0.0",
15
+ "@cervio/plugin-sdk": "^2.2.0",
16
+ "@fontsource-variable/geist": "^5.2.0",
16
17
  "react": "^19.0.0",
17
18
  "react-dom": "^19.0.0"
18
19
  },
19
20
  "devDependencies": {
20
- "@cervio/cli": "^1.0.0",
21
- "@cervio/plugin-core": "^1.0.0",
21
+ "@cervio/cli": "^1.5.0",
22
+ "@cervio/plugin-core": "^1.5.0",
22
23
  "@types/react": "^19.0.0",
23
24
  "@types/react-dom": "^19.0.0",
24
25
  "@vitejs/plugin-react": "^6.2.0",
@@ -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: var(--font-sans, system-ui, sans-serif);
22
+ font-family: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
17
23
  color: var(--foreground);
18
24
  background: var(--background);
19
25
  }