@openelement/create 0.44.0-beta.2.2 → 1.0.0-alpha.10

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.
Files changed (42) hide show
  1. package/README.md +105 -24
  2. package/package.json +16 -4
  3. package/src/cli.d.ts +1 -1
  4. package/src/cli.js +126 -66
  5. package/src/install-command.d.ts +50 -0
  6. package/src/install-command.js +52 -0
  7. package/src/template-builder.js +128 -166
  8. package/src/version.js +23 -2
  9. package/templates/README.tmpl +56 -23
  10. package/templates/app/components/{page-404.tsx → page-404.tsx.tmpl} +6 -2
  11. package/templates/app/components/{page-blog-index.tsx → page-blog-index.tsx.tmpl} +6 -2
  12. package/templates/app/components/{page-blog-welcome.tsx → page-blog-welcome.tsx.tmpl} +9 -6
  13. package/templates/app/components/{page-contact.tsx → page-contact.tsx.tmpl} +5 -2
  14. package/templates/app/components/{page-freshness.tsx → page-freshness.tsx.tmpl} +6 -2
  15. package/templates/app/components/{page-home.tsx → page-home.tsx.tmpl} +10 -7
  16. package/templates/app/components/page-styles.ts.tmpl +123 -0
  17. package/templates/app/head.tsx.tmpl +42 -0
  18. package/templates/app/islands/app-shell.tsx.tmpl +83 -0
  19. package/templates/app/islands/my-counter.tsx.tmpl +55 -0
  20. package/templates/app/islands/only-ticker.tsx.tmpl +51 -0
  21. package/templates/app/routes/{404.tsx → 404.tsx.tmpl} +1 -1
  22. package/templates/app/routes/blog/{index.tsx → index.tsx.tmpl} +1 -1
  23. package/templates/app/routes/blog/{welcome.tsx → welcome.tsx.tmpl} +1 -1
  24. package/templates/app/routes/{contact.tsx → contact.tsx.tmpl} +1 -1
  25. package/templates/app/routes/{freshness.tsx → freshness.tsx.tmpl} +1 -1
  26. package/templates/app/routes/{index.tsx → index.tsx.tmpl} +1 -1
  27. package/templates/app/styles/tokens.css +57 -0
  28. package/templates/gitignore.tmpl +1 -0
  29. package/templates/openelement.config.ts.tmpl +31 -0
  30. package/templates/package.json.tmpl +29 -0
  31. package/templates/tailwind/theme.css +108 -0
  32. package/templates/tailwind/vite.config.ts.tmpl +38 -0
  33. package/templates/tsconfig.json.tmpl +15 -0
  34. package/templates/vite.config.ts.tmpl +11 -0
  35. package/templates/app/components/page-styles.ts +0 -64
  36. package/templates/app/data/_generated-blog-data.d.ts +0 -21
  37. package/templates/app/islands/app-shell.tsx +0 -58
  38. package/templates/app/islands/my-counter.tsx +0 -38
  39. package/templates/app/islands/only-ticker.tsx +0 -34
  40. package/templates/deno.json.tmpl +0 -26
  41. package/templates/vite.config.ts +0 -100
  42. /package/templates/app/routes/api/{health.ts → health.ts.tmpl} +0 -0
@@ -0,0 +1,38 @@
1
+ import { applyTailwindPreset, openElement } from '@openelement/router/vite';
2
+ import { defineConfig, type Plugin, type ResolvedConfig } from 'vite';
3
+
4
+ // Vite configuration only. Framework options live in openelement.config.ts —
5
+ // the plugin reads that file itself, so the plugin call stays
6
+ // `openElement()`. The JSX transform is owned by the plugin's compiler pass
7
+ // (TSX → Part Program); nothing JSX-related needs configuring here.
8
+ //
9
+ // Tailwind role sheet (scaffolded ON): the roles in app/styles/theme.css are
10
+ // compiled into the preset's linked, layer-ordered bundle at build time and
11
+ // referenced from every rendered page with <link rel="stylesheet">. The role
12
+ // file is declared relative to the preset's build-time staging entry (it is
13
+ // @import-ed from .openElement/tailwind-preset/), which is why the path
14
+ // climbs out of that directory. `pnpm dev` serves the tokens convention
15
+ // (app/styles/tokens.css); the compiled bundle exists in the build output.
16
+ // No node: imports here on purpose — the starter's `check` surface has no
17
+ // @types/node, and vite resolves `root` to an absolute path already.
18
+
19
+ function tailwindPreset(): Plugin {
20
+ let config: ResolvedConfig | undefined;
21
+ return {
22
+ name: 'starter:tailwind-preset',
23
+ apply: 'build',
24
+ configResolved(resolved) {
25
+ config = resolved;
26
+ },
27
+ async closeBundle() {
28
+ if (!config || config.command !== 'build') return;
29
+ const outDir = `${config.root}/${config.build.outDir || 'dist'}`;
30
+ await applyTailwindPreset({ theme: ['../../app/styles/theme.css'] }, config, outDir);
31
+ },
32
+ };
33
+ }
34
+
35
+ export default defineConfig({
36
+ base: '/',
37
+ plugins: [...openElement(), tailwindPreset()],
38
+ });
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "jsx": "react-jsx",
8
+ "jsxImportSource": "@openelement/element",
9
+ "strict": true,
10
+ "skipLibCheck": true,
11
+ "noEmit": true,
12
+ "allowImportingTsExtensions": true
13
+ },
14
+ "include": ["app", "vite.config.ts", "openelement.config.ts"]
15
+ }
@@ -0,0 +1,11 @@
1
+ import { openElement } from '@openelement/router/vite';
2
+ import { defineConfig } from 'vite';
3
+
4
+ // Vite configuration only. Framework options live in openelement.config.ts —
5
+ // the plugin reads that file itself, so this stays `plugins: [openElement()]`.
6
+ // The JSX transform is owned by the plugin's compiler pass (TSX → Part
7
+ // Program); nothing JSX-related needs configuring here.
8
+ export default defineConfig({
9
+ base: '/',
10
+ plugins: [...openElement()],
11
+ });
@@ -1,64 +0,0 @@
1
- /**
2
- * Style sheets for the starter's compiled islands (v0.44).
3
- *
4
- * Compiled modules may not carry runtime top-level statements, so the sheets
5
- * live in this plain module and the compiled classes reference them through
6
- * `static styles` (adoptedStyleSheets on shadow roots — see the zag-combobox
7
- * fixture pattern in packages/adapter-vite). Page elements use light roots;
8
- * their rules live in the global baseline in vite.config.ts (scoped under
9
- * each page's host tag) because the compiled serializer never inlines styles
10
- * into SSR output and page classes are not registered client-side.
11
- */
12
- import { StyleSheet, type StyleSheetLike } from '@openelement/element';
13
-
14
- function sheet(css: string): StyleSheetLike {
15
- const instance = new StyleSheet();
16
- instance.replaceSync(css);
17
- return instance;
18
- }
19
-
20
- export const shellStyles = [
21
- sheet(`
22
- :host { display: block; min-height: 100vh; }
23
- header { border-bottom: 1px solid var(--line); }
24
- .bar { max-width: 740px; margin: 0 auto; padding: 1.15rem 1.25rem; display: flex; justify-content: space-between; align-items: baseline; }
25
- .brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--ink); }
26
- .brand:hover { text-decoration: none; color: var(--brand); }
27
- nav { display: flex; gap: 1.5rem; }
28
- nav a { color: var(--ink-2); font-size: 0.95rem; font-weight: 500; }
29
- nav a:hover { color: var(--brand); text-decoration: none; }
30
- main { max-width: 740px; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
31
- footer { border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.85rem; }
32
- .foot { max-width: 740px; margin: 0 auto; padding: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; }
33
- a { color: var(--brand); text-decoration: none; }
34
- a:hover { text-decoration: underline; }
35
- `),
36
- ];
37
-
38
- export const counterStyles = [
39
- sheet(`
40
- :host { display: inline-block; }
41
- .counter-row { display: inline-flex; gap: 0.75rem; align-items: center; }
42
- button {
43
- width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: 6px;
44
- background: #fff; color: var(--ink); font-size: 1rem; line-height: 1; cursor: pointer;
45
- transition: border-color 0.15s ease, color 0.15s ease;
46
- }
47
- button:hover { border-color: var(--brand); color: var(--brand); }
48
- span { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
49
- `),
50
- ];
51
-
52
- export const tickerStyles = [
53
- sheet(`
54
- :host { display: inline-block; }
55
- .ticker-row { display: inline-flex; gap: 0.75rem; align-items: center; }
56
- button {
57
- height: 2rem; padding: 0 0.9rem; border: 1px solid var(--line); border-radius: 6px;
58
- background: #fff; color: var(--ink); font-size: 0.9rem; cursor: pointer;
59
- transition: border-color 0.15s ease, color 0.15s ease;
60
- }
61
- button:hover { border-color: var(--brand); color: var(--brand); }
62
- span { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
63
- `),
64
- ];
@@ -1,21 +0,0 @@
1
- // Type declarations for @openelement/generated/blog-data.
2
- // The runtime module is generated during build/dev by the adapter-vite
3
- // internal content/blog plugin. This stub provides types when the generated
4
- // .ts file is not yet present.
5
-
6
- export interface GeneratedBlogPost {
7
- slug: string;
8
- frontmatter: {
9
- title: string;
10
- date: string;
11
- draft?: boolean;
12
- tags?: string[];
13
- excerpt?: string;
14
- type?: string;
15
- };
16
- content: string;
17
- html: string;
18
- }
19
-
20
- export declare const posts: GeneratedBlogPost[];
21
- export declare function getPostBySlug(slug: string): GeneratedBlogPost | undefined;
@@ -1,58 +0,0 @@
1
- /**
2
- * app-shell — compiled layout island (v0.44, ADR-0143).
3
- *
4
- * The server entry renders this class around every page
5
- * (appShell: { tagName, import, props } in vite.config.ts) and injects the
6
- * page host before the closing tag; the static <slot> projects it. The shell
7
- * is also a 'load' island: the compiled style scope applies `static styles`
8
- * when the element activates client-side (the serializer never inlines
9
- * styles into DSD), so the shell chrome is styled as soon as it hydrates.
10
- *
11
- * The compiler grammar v1 has no data-driven per-item attribute slots, so the
12
- * header nav is static authoring here — edit the links below directly
13
- * (the vite.config content.nav headerNav indirection of 0.43 is gone).
14
- */
15
- import { defineIslandConfig } from '@openelement/app';
16
- import { element, OpenElement, property } from '@openelement/element';
17
- import { shellStyles } from '../components/page-styles.ts';
18
-
19
- export const openElement = defineIslandConfig({ hydrate: 'load', ssr: true, dsd: true });
20
-
21
- @element('app-shell', { root: 'shadow-open' })
22
- export default class AppShell extends OpenElement {
23
- static override styles = shellStyles;
24
-
25
- /**
26
- * Filled from appShell.props in vite.config.ts at render time.
27
- * Attribute-backed (site-name) so the SSR'd value survives the client claim:
28
- * attribute: false properties reset to their compiled default on claim and
29
- * the drift check would fail closed.
30
- */
31
- @property({ reflect: false })
32
- siteName = 'openElement';
33
-
34
- render() {
35
- return (
36
- <div class='shell-body'>
37
- <header data-open-layout='app-shell'>
38
- <div class='bar'>
39
- <a class='brand' href='/'>{this.siteName}</a>
40
- <nav>
41
- <a href='/'>Home</a>
42
- <a href='/blog'>Blog</a>
43
- </nav>
44
- </div>
45
- </header>
46
- <main>
47
- <slot></slot>
48
- </main>
49
- <footer>
50
- <div class='foot'>
51
- <span>Generated by @openelement/create.</span>
52
- <a href='https://github.com/open-element/openelement'>GitHub</a>
53
- </div>
54
- </footer>
55
- </div>
56
- );
57
- }
58
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * my-counter — minimal counter island (v0.44 compiled, ADR-0143).
3
- *
4
- * Hydrates on idle; the buttons increment/decrement through the compiled
5
- * event Parts and the count renders through the compiled text Part. The
6
- * shadow root keeps the island a DSD citizen.
7
- */
8
- import { defineIslandConfig } from '@openelement/app';
9
- import { element, OpenElement, property } from '@openelement/element';
10
- import { counterStyles } from '../components/page-styles.ts';
11
-
12
- export const openElement = defineIslandConfig({ hydrate: 'idle', ssr: true, dsd: true });
13
-
14
- @element('my-counter', { root: 'shadow-open' })
15
- export default class MyCounter extends OpenElement {
16
- static override styles = counterStyles;
17
-
18
- @property({ reflect: false, attribute: false })
19
- count = 0;
20
-
21
- decrement(): void {
22
- this.count--;
23
- }
24
-
25
- increment(): void {
26
- this.count++;
27
- }
28
-
29
- render() {
30
- return (
31
- <div class='counter-row'>
32
- <button type='button' onClick={this.decrement}>-</button>
33
- <span id='count'>{this.count}</span>
34
- <button type='button' onClick={this.increment}>+</button>
35
- </div>
36
- );
37
- }
38
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * only-ticker — client-only island (v0.44 compiled, ADR-0143).
3
- *
4
- * hydrate: 'only' with ssr: false renders nothing on the server; the client
5
- * entry creates the DOM fresh from the compiled Part Program and binds the
6
- * tick event Part. Each hydrated island gets its own compiled property state,
7
- * so multiple tickers on one page never share state.
8
- */
9
- import { defineIslandConfig } from '@openelement/app';
10
- import { element, OpenElement, property } from '@openelement/element';
11
- import { tickerStyles } from '../components/page-styles.ts';
12
-
13
- export const openElement = defineIslandConfig({ hydrate: 'only', ssr: false, dsd: false });
14
-
15
- @element('only-ticker', { root: 'shadow-open' })
16
- export default class OnlyTicker extends OpenElement {
17
- static override styles = tickerStyles;
18
-
19
- @property({ reflect: false, attribute: false })
20
- tick = 0;
21
-
22
- bump(): void {
23
- this.tick++;
24
- }
25
-
26
- render() {
27
- return (
28
- <div class='ticker-row'>
29
- <span id='tick'>{this.tick}</span>
30
- <button type='button' onClick={this.bump}>tick</button>
31
- </div>
32
- );
33
- }
34
- }
@@ -1,26 +0,0 @@
1
- {
2
- "imports": {
3
- "@deno/vite-plugin": "npm:@deno/vite-plugin@2.0.3",
4
- "@openelement/app": "npm:@openelement/app@${v.app}",
5
- "@openelement/adapter-vite": "npm:@openelement/adapter-vite@${v.adapterVite}",
6
- "@openelement/adapter-vite/nitro-mount": "npm:@openelement/adapter-vite@${v.adapterVite}/nitro-mount",
7
- "@openelement/element": "npm:@openelement/element@${v.element}",
8
- "@openelement/element/build-utils": "npm:@openelement/element@${v.element}/build-utils",
9
- "@openelement/element/jsx-dev-runtime": "npm:@openelement/element@${v.element}/jsx-dev-runtime",
10
- "@openelement/element/jsx-runtime": "npm:@openelement/element@${v.element}/jsx-runtime",
11
- "@openelement/generated/blog-data": "./app/data/_generated-blog-data.d.ts",
12
- "hono": "npm:hono@^4.12",
13
- "vite": "npm:vite@8.0.16"
14
- },
15
- "nodeModulesDir": "auto",
16
- "minimumDependencyAge": 0,
17
- "tasks": {
18
- "dev": "deno run --config deno.json -A npm:vite@8.0.16",
19
- "check": "deno check --config deno.json app/routes/404.tsx app/routes/index.tsx app/routes/freshness.tsx app/routes/contact.tsx app/routes/blog/index.tsx app/routes/blog/welcome.tsx app/routes/api/health.ts app/islands/my-counter.tsx app/islands/only-ticker.tsx app/islands/app-shell.tsx app/components/page-home.tsx app/components/page-freshness.tsx app/components/page-404.tsx app/components/page-contact.tsx app/components/page-blog-index.tsx app/components/page-blog-welcome.tsx app/components/page-styles.ts vite.config.ts",
20
- "test": "deno test --config deno.json --permit-no-files",
21
- "build": "deno run --config deno.json -A npm:@openelement/adapter-vite@${v.adapterVite}/cli/build",
22
- "start": "deno run --config deno.json -A npm:@openelement/adapter-vite@${v.adapterVite}/cli/start",
23
- "preview": "deno run --config deno.json -A npm:@openelement/adapter-vite@${v.adapterVite}/cli/start --mode=preview"
24
- },
25
- "compilerOptions": { "lib": ["ES2022", "DOM", "DOM.Iterable"], "jsx": "react-jsx", "jsxImportSource": "@openelement/element" }
26
- }
@@ -1,100 +0,0 @@
1
- import { openElement } from '@openelement/adapter-vite';
2
- import { defineConfig } from 'vite';
3
- import deno from '@deno/vite-plugin';
4
-
5
- // Design tokens (from Open Props) plus the global baseline. `--brand` must
6
- // stay aligned with the ui package tokens (`--violet-6` in
7
- // packages/ui/src/open-props-tokens.css).
8
- //
9
- // v0.44 styling model: the compiled serializer never inlines styles into SSR
10
- // output; `static styles` sheets apply when an element activates client-side.
11
- // Page classes are not registered client-side, so page rules live here in the
12
- // document baseline, scoped under each page's host tag (pages use light
13
- // roots). The app shell and islands carry their own `static styles` and are
14
- // styled as soon as they hydrate.
15
- const globalStyle =
16
- '<style>:root{--paper:#faf9f6;--ink:#1c1b17;--ink-2:#5b594f;--line:#e5e2d8;--gray-0:#f8f9fa;--gray-1:#f1f3f5;--gray-3:#dee2e6;--gray-5:#adb5bd;--gray-7:#495057;--gray-9:#212529;--brand:#8262db;--brand-2:#4f8ef7;--size-1:4px;--size-2:8px;--size-3:12px;--size-4:16px;--border-size-1:1px;--radius-2:8px;--radius-3:14px;--font-sans:system-ui,-apple-system,sans-serif;--font-serif:ui-serif,Georgia,"Times New Roman",serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,monospace;--font-size-0:0.875rem;--font-weight-5:500;--shadow-1:0 1px 3px 0 rgb(0 0 0 / 0.08);--shadow-2:0 10px 28px rgb(80 70 160 / 0.12)}' +
17
- 'body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}' +
18
- '::selection{background:#8262db2e}' +
19
- // Home page (index-page)
20
- 'index-page{display:block}' +
21
- 'index-page .hero{padding:2.5rem 0 1rem}' +
22
- 'index-page .eyebrow{color:var(--brand);font-weight:600;font-size:0.78rem;letter-spacing:0.14em;text-transform:uppercase}' +
23
- 'index-page h1{font-family:var(--font-serif);font-size:3rem;line-height:1.12;letter-spacing:-0.015em;margin:0.75rem 0 1.25rem;font-weight:700}' +
24
- 'index-page .lede{font-size:1.15rem;line-height:1.75;color:var(--ink-2);max-width:58ch;margin:0}' +
25
- 'index-page .lede code{font-size:0.85em}' +
26
- 'index-page .more{display:inline-block;margin-top:1.5rem;font-weight:600}' +
27
- 'index-page .demo{margin-top:2.75rem;border:1px solid var(--line);border-radius:8px;padding:1.25rem 1.5rem}' +
28
- 'index-page .demo .label{color:var(--ink-2);font-size:0.8rem;letter-spacing:0.1em;text-transform:uppercase;margin:0 0 0.9rem}' +
29
- 'index-page .recent{margin-top:3rem}' +
30
- 'index-page .recent h2{font-family:var(--font-serif);letter-spacing:-0.01em;margin:0 0 0.25rem}' +
31
- 'index-page .recent .sub{color:var(--ink-2);font-size:0.925rem;margin:0 0 1.5rem}' +
32
- 'index-page .recent .sub code{font-size:0.85em}' +
33
- // Shared post-list rules (home teaser + blog index)
34
- 'index-page .posts,blog-index .posts{list-style:none;padding:0;margin:0;border-top:1px solid var(--line)}' +
35
- 'index-page .post,blog-index .post{display:block;padding:1.15rem 0;border-bottom:1px solid var(--line);color:inherit;text-decoration:none}' +
36
- 'index-page a.post:hover .title,blog-index a.post:hover .title{color:var(--brand)}' +
37
- 'index-page .post .title,blog-index .post .title{display:block;font-family:var(--font-serif);font-size:1.3rem;font-weight:700;letter-spacing:-0.01em;color:var(--ink);transition:color 0.15s ease}' +
38
- 'index-page .post .meta,blog-index .post .meta{display:block;margin-top:0.3rem;font-size:0.85rem;color:var(--ink-2)}' +
39
- 'index-page .post .excerpt,blog-index .post .excerpt{display:block;margin-top:0.45rem;color:var(--ink-2);line-height:1.6}' +
40
- 'index-page a{color:var(--brand);text-decoration:none}' +
41
- 'index-page a:hover{text-decoration:underline}' +
42
- // Blog index (blog-index)
43
- 'blog-index{display:block}' +
44
- 'blog-index .eyebrow{color:var(--brand);font-weight:600;font-size:0.78rem;letter-spacing:0.14em;text-transform:uppercase}' +
45
- 'blog-index h1{font-family:var(--font-serif);letter-spacing:-0.015em;margin:0.5rem 0}' +
46
- 'blog-index .sub{color:var(--ink-2);font-size:0.925rem;margin:0 0 1.5rem}' +
47
- 'blog-index .sub code{font-size:0.85em}' +
48
- 'blog-index a{color:var(--brand);text-decoration:none}' +
49
- // Blog post page (blog-welcome)
50
- 'blog-welcome{display:block}' +
51
- 'blog-welcome h1{font-family:var(--font-serif);font-size:2.4rem;line-height:1.15;letter-spacing:-0.015em;margin:0.5rem 0}' +
52
- 'blog-welcome .meta{color:var(--ink-2);font-size:0.9rem;margin-top:0;padding-bottom:1.5rem;border-bottom:1px solid var(--line)}' +
53
- 'blog-welcome a{color:var(--brand);text-decoration:none}' +
54
- 'blog-welcome .post-body{line-height:1.8;font-size:1.05rem}' +
55
- 'blog-welcome .post-body h2{font-family:var(--font-serif);margin:2.5rem 0 0.75rem;letter-spacing:-0.01em}' +
56
- 'blog-welcome .post-body p{margin:1rem 0}' +
57
- 'blog-welcome .post-body code{font-family:var(--font-mono,ui-monospace,Menlo,monospace);font-size:0.85em;background:#f1efe8;border:1px solid var(--line);padding:0.1em 0.4em;border-radius:5px}' +
58
- // Freshness proof (freshness-page)
59
- 'freshness-page{display:block;max-width:800px;margin:2rem auto;padding:0 1rem}' +
60
- 'freshness-page p{color:var(--ink-2)}' +
61
- // Styled 404 (el-404)
62
- 'el-404{display:block}' +
63
- 'el-404 h1{font-family:var(--font-serif);font-size:2.4rem;letter-spacing:-0.015em;margin:0.75rem 0 0.5rem;font-weight:700}' +
64
- 'el-404 p{color:var(--ink-2);line-height:1.6}' +
65
- 'el-404 a{color:var(--brand);font-weight:600;text-decoration:none}' +
66
- 'el-404 a:hover{text-decoration:underline}' +
67
- // Contact form (contact-page)
68
- 'contact-page{display:block}' +
69
- 'contact-page h1{font-family:var(--font-serif);font-size:2.4rem;letter-spacing:-0.015em;margin:0.75rem 0 0.5rem;font-weight:700}' +
70
- 'contact-page .sub{color:var(--ink-2);line-height:1.6;max-width:52ch;margin:0 0 1.75rem}' +
71
- 'contact-page form{display:flex;gap:0.6rem;flex-wrap:wrap}' +
72
- 'contact-page input{font:inherit;min-width:16rem;padding:0.55rem 0.8rem;color:var(--ink);border:1px solid var(--line);border-radius:6px;background:#fff;transition:border-color 0.15s ease,box-shadow 0.15s ease}' +
73
- 'contact-page input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px #8262db2e}' +
74
- 'contact-page button{font:inherit;font-weight:600;padding:0.55rem 1.1rem;cursor:pointer;border:1px solid var(--brand);border-radius:6px;background:var(--brand);color:#fff;transition:opacity 0.15s ease}' +
75
- 'contact-page button:hover{opacity:0.88}' +
76
- 'contact-page #error{color:#c92a2a;margin:1rem 0 0}' +
77
- 'contact-page #error:empty,contact-page #thanks:empty{display:none}' +
78
- 'contact-page #thanks{color:var(--brand);font-weight:600;margin:1rem 0 0}' +
79
- '</style>';
80
-
81
- export default defineConfig({
82
- plugins: [
83
- openElement({
84
- html: { title: 'My openElement App' },
85
- appShell: {
86
- tagName: 'app-shell',
87
- import: './app/islands/app-shell.tsx',
88
- props: {
89
- siteName: 'My openElement App',
90
- },
91
- },
92
- inject: {
93
- headFragments: [
94
- globalStyle,
95
- ],
96
- },
97
- }),
98
- deno(),
99
- ],
100
- });