@openelement/create 0.42.0-alpha.10 → 0.42.0-alpha.12

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/README.md CHANGED
@@ -22,7 +22,6 @@ deno task dev
22
22
  - `deno.json` - starter authoring imports and build tasks
23
23
  - `vite.config.ts` - Vite build configuration with the openElement plugin
24
24
  - `app/` - application directory with starter pages and islands
25
- - `dist/` - static site output produced by `deno task build`
26
25
 
27
26
  The generated import map intentionally keeps protocol and build internals out of
28
27
  the starter surface. Advanced contracts remain available through the published
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openelement/create",
3
- "version": "0.42.0-alpha.10",
3
+ "version": "0.42.0-alpha.12",
4
4
  "type": "module",
5
5
  "main": "./src/cli.js",
6
6
  "types": "./src/cli.d.ts",
package/src/version.js CHANGED
@@ -1,2 +1,2 @@
1
- /** The published CLI version, embedded so packed npm installs are self-contained. */ export const CREATE_VERSION = '0.42.0-alpha.10';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpbGU6Ly8vaG9tZS9ydW5uZXIvd29yay9vcGVuZWxlbWVudC9vcGVuZWxlbWVudC9wYWNrYWdlcy9jcmVhdGUvc3JjL3ZlcnNpb24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqIFRoZSBwdWJsaXNoZWQgQ0xJIHZlcnNpb24sIGVtYmVkZGVkIHNvIHBhY2tlZCBucG0gaW5zdGFsbHMgYXJlIHNlbGYtY29udGFpbmVkLiAqL1xuZXhwb3J0IGNvbnN0IENSRUFURV9WRVJTSU9OID0gJzAuNDIuMC1hbHBoYS4xMCc7XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsbUZBQW1GLEdBQ25GLE9BQU8sTUFBTSxpQkFBaUIsa0JBQWtCIn0=
1
+ /** The published CLI version, embedded so packed npm installs are self-contained. */ export const CREATE_VERSION = '0.42.0-alpha.12';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpbGU6Ly8vaG9tZS9ydW5uZXIvd29yay9vcGVuZWxlbWVudC9vcGVuZWxlbWVudC9wYWNrYWdlcy9jcmVhdGUvc3JjL3ZlcnNpb24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqIFRoZSBwdWJsaXNoZWQgQ0xJIHZlcnNpb24sIGVtYmVkZGVkIHNvIHBhY2tlZCBucG0gaW5zdGFsbHMgYXJlIHNlbGYtY29udGFpbmVkLiAqL1xuZXhwb3J0IGNvbnN0IENSRUFURV9WRVJTSU9OID0gJzAuNDIuMC1hbHBoYS4xMic7XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsbUZBQW1GLEdBQ25GLE9BQU8sTUFBTSxpQkFBaUIsa0JBQWtCIn0=
@@ -4,6 +4,17 @@ import { StyleSheet } from '@openelement/element';
4
4
 
5
5
  export const tagName = 'app-shell';
6
6
 
7
+ interface HeaderNavLink {
8
+ href: string;
9
+ label: string;
10
+ }
11
+
12
+ // Fallback when vite.config.ts content.nav.headerNav is not configured.
13
+ const defaultNav: HeaderNavLink[] = [
14
+ { href: '/freshness', label: 'Freshness' },
15
+ { href: '/api/health', label: 'API health' },
16
+ ];
17
+
7
18
  const styles = new StyleSheet();
8
19
  styles.replaceSync(`
9
20
  :host { display: block; min-height: 100vh; background: var(--gray-1); }
@@ -15,14 +26,14 @@ styles.replaceSync(`
15
26
 
16
27
  export default defineElement(tagName, {
17
28
  styles,
18
- render(props: { siteName?: string }) {
29
+ render(props: { siteName?: string; headerNav?: HeaderNavLink[] }) {
30
+ const nav = props.headerNav?.length ? props.headerNav : defaultNav;
19
31
  return (
20
32
  <>
21
33
  <header data-open-layout='app-shell'>
22
34
  <a href='/'>{props.siteName ?? 'openElement'}</a>
23
35
  <nav>
24
- <a href='/freshness'>Freshness</a>
25
- <a href='/api/health'>API health</a>
36
+ {nav.map((link) => <a key={link.href} href={link.href}>{link.label}</a>)}
26
37
  </nav>
27
38
  </header>
28
39
  <main>
@@ -7,8 +7,6 @@ import {
7
7
  useActionData,
8
8
  } from '@openelement/app';
9
9
 
10
- export const tagName = 'contact-page';
11
-
12
10
  interface ContactActionData {
13
11
  error?: string;
14
12
  email?: string;
@@ -16,7 +16,12 @@ defineElement(tagName, {
16
16
  return (
17
17
  <>
18
18
  <h1>Freshness proof</h1>
19
- <p>This page records ISR/cache intent with a 300 second revalidate window.</p>
19
+ <p>
20
+ This page records ISR/cache intent with a 300 second revalidate window. In 0.42 the
21
+ revalidate value is a forward-compatible record only — no cache is wired to it yet
22
+ (targeted for 0.44), so this page renders statically at build time like any other static
23
+ route.
24
+ </p>
20
25
  </>
21
26
  );
22
27
  },
@@ -30,6 +35,8 @@ export default definePage({
30
35
  },
31
36
  renderIntent: {
32
37
  mode: 'static',
38
+ // Forward-compatible record only — not wired to any cache in 0.42
39
+ // (0.44 target); the page is prerendered once at build time.
33
40
  revalidate: 300,
34
41
  },
35
42
  render() {