@openelement/create 1.0.0-alpha.13 → 1.0.0-alpha.14

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.
@@ -6,13 +6,13 @@
6
6
  * shadow root keeps the island a DSD citizen. Design tokens from
7
7
  * app/styles/theme.css inherit through the shadow boundary.
8
8
  */
9
- import { defineIslandConfig } from '@openelement/router';
10
- import { element, OpenElement, property } from '@openelement/element';
11
- import counterStyles from './my-counter.css';
9
+ import { defineIslandConfig } from "@openelement/router";
10
+ import { element, OpenElement, property } from "@openelement/element";
11
+ import counterStyles from "./my-counter.css";
12
12
 
13
- export const openElement = defineIslandConfig({ hydrate: 'idle', ssr: true, dsd: true });
13
+ export const openElement = defineIslandConfig({ hydrate: "idle", ssr: true, dsd: true });
14
14
 
15
- @element('my-counter', { root: 'shadow-open' })
15
+ @element("my-counter", { root: "shadow-open" })
16
16
  export default class MyCounter extends OpenElement {
17
17
  static override styles = [counterStyles];
18
18
 
@@ -29,10 +29,14 @@ export default class MyCounter extends OpenElement {
29
29
 
30
30
  render() {
31
31
  return (
32
- <div class='counter-row'>
33
- <button type='button' onClick={this.decrement}>-</button>
34
- <span id='count'>{this.count}</span>
35
- <button type='button' onClick={this.increment}>+</button>
32
+ <div class="counter-row">
33
+ <button type="button" onClick={this.decrement}>
34
+ -
35
+ </button>
36
+ <span id="count">{this.count}</span>
37
+ <button type="button" onClick={this.increment}>
38
+ +
39
+ </button>
36
40
  </div>
37
41
  );
38
42
  }
@@ -6,10 +6,10 @@
6
6
  * renderIntent line and the route becomes prerenderable — a build with no
7
7
  * other request-time route then writes the page to dist/404.html.
8
8
  */
9
- import { definePage } from '@openelement/router';
10
- import NotFoundPage from '../components/page-404.tsx';
9
+ import { definePage } from "@openelement/router";
10
+ import NotFoundPage from "../components/page-404.tsx";
11
11
 
12
12
  export default definePage(NotFoundPage, {
13
- renderIntent: { mode: 'dynamic' },
14
- head: { title: '404 — openElement' },
13
+ renderIntent: { mode: "dynamic" },
14
+ head: { title: "404 — openElement" },
15
15
  });
@@ -1,10 +1,10 @@
1
1
  /** Static About page (default renderIntent mode 'static') — prerendered at build time. */
2
- import { definePage } from '@openelement/router';
3
- import AboutPage from '../components/page-about.tsx';
2
+ import { definePage } from "@openelement/router";
3
+ import AboutPage from "../components/page-about.tsx";
4
4
 
5
5
  export default definePage(AboutPage, {
6
6
  head: {
7
- title: 'About',
8
- description: 'Static-first openElement showcase — this page ships no islands',
7
+ title: "About",
8
+ description: "Static-first openElement showcase — this page ships no islands",
9
9
  },
10
10
  });
@@ -6,7 +6,7 @@
6
6
  export default function ping() {
7
7
  return Response.json({
8
8
  pong: true,
9
- framework: 'openElement',
10
- route: '/api/ping',
9
+ framework: "openElement",
10
+ route: "/api/ping",
11
11
  });
12
12
  }
@@ -1,10 +1,10 @@
1
1
  /** Static home page (default renderIntent mode 'static') — prerendered at build time. */
2
- import { definePage } from '@openelement/router';
3
- import HomePage from '../components/page-home.tsx';
2
+ import { definePage } from "@openelement/router";
3
+ import HomePage from "../components/page-home.tsx";
4
4
 
5
5
  export default definePage(HomePage, {
6
6
  head: {
7
- title: 'Rendered before JavaScript arrives',
8
- description: 'openElement showcase — static pages, alive where it counts',
7
+ title: "Rendered before JavaScript arrives",
8
+ description: "openElement showcase — static pages, alive where it counts",
9
9
  },
10
10
  });
@@ -53,8 +53,8 @@
53
53
 
54
54
  /* Dark pairs (shadcn v4 convention; the selector matches the runtime theme
55
55
  attribute the ui package documents). */
56
- :root[data-theme='dark'],
57
- :host([data-theme='dark']) {
56
+ :root[data-theme="dark"],
57
+ :host([data-theme="dark"]) {
58
58
  --color-background: var(--color-zinc-950);
59
59
  --color-foreground: var(--color-zinc-50);
60
60
 
@@ -20,7 +20,7 @@
20
20
  // Passing framework options inline to openElement() while this file carries
21
21
  // options is a hard error: framework options cannot have two homes. Unknown
22
22
  // keys are rejected with the accepted-key list.
23
- import { defineConfig } from '@openelement/router';
23
+ import { defineConfig } from "@openelement/router";
24
24
 
25
25
  export default defineConfig({
26
26
  // The Tailwind preset — the single-default scaffold form. The roles in
@@ -30,12 +30,12 @@ export default defineConfig({
30
30
  // layer-ordered /assets/open-tailwind.css after the SSG render. The path is
31
31
  // app-relative (resolved against the app root); package CSS specifiers such
32
32
  // as '@openelement/ui/theme.css' also work here.
33
- tailwind: { theme: ['app/styles/theme.css'] },
33
+ tailwind: { theme: ["app/styles/theme.css"] },
34
34
  head: {
35
35
  // Titles default to the package.json "name"; this overrides the document
36
36
  // title fallback while page routes keep their own `head: { title }`.
37
- title: 'openElement Showcase',
38
- description: 'A static-first openElement showcase — rendered before JavaScript arrives.',
39
- favicon: '/openelement-mark.svg',
37
+ title: "openElement Showcase",
38
+ description: "A static-first openElement showcase — rendered before JavaScript arrives.",
39
+ favicon: "/openelement-mark.svg",
40
40
  },
41
41
  });
@@ -1,18 +1,16 @@
1
1
  {
2
2
  "name": "${name}",
3
- "private": true,
4
3
  "version": "0.0.0",
4
+ "private": true,
5
5
  "type": "module",
6
- "packageManager": "pnpm@12.8.1",
7
- "engines": {
8
- "node": ">=24.2"
9
- },
10
6
  "scripts": {
11
- "dev": "vite",
12
- "check": "tsc --noEmit",
7
+ "dev": "vp dev",
8
+ "build": "oe build",
9
+ "start": "oe start",
13
10
  "test": "node --test",
14
- "build": "openelement build",
15
- "start": "openelement start"
11
+ "fmt": "vp fmt",
12
+ "lint": "vp lint",
13
+ "typecheck": "tsc --noEmit"
16
14
  },
17
15
  "dependencies": {
18
16
  "@openelement/element": "^${v.element}",
@@ -24,6 +22,10 @@
24
22
  "hono": "^4.12",
25
23
  "tailwindcss": "4.3.3",
26
24
  "typescript": "6.0.3",
27
- "vite": "${v.vite}"
28
- }
25
+ "vite-plus": "catalog:"
26
+ },
27
+ "engines": {
28
+ "node": ">=24.2"
29
+ },
30
+ "packageManager": "pnpm@12.8.1"
29
31
  }
@@ -0,0 +1,29 @@
1
+ # pnpm workspace bookkeeping for this project. pnpm rewrites this file (for
2
+ # example when it records a new minimumReleaseAgeExclude entry you approve);
3
+ # keep it and review the entries it lists.
4
+ #
5
+ # catalog: the Vite+ form. `vite` resolves to the Vite+ core build through
6
+ # the catalog and the `vite@*` override below, so every peer that asks for
7
+ # vite (the router's dev server, the Tailwind Vite plugin) gets the same
8
+ # Vite+ tree; `vp dev` serves through it directly.
9
+ #
10
+ # minimumReleaseAgeExclude: pnpm's supply-chain cooldown withholds versions
11
+ # published inside its maturity window. These entries are exempt: the
12
+ # @openelement packages at the version this project was generated from (a
13
+ # fresh scaffold installs on release day) and vite-plus itself.
14
+ catalog:
15
+ vite: npm:@voidzero-dev/vite-plus-core@1.1.0
16
+ vite-plus: 1.1.0
17
+ minimumReleaseAgeExclude:
18
+ - "@openelement/compiler@${v.element}"
19
+ - "@openelement/element@${v.element}"
20
+ - "@openelement/protocol@${v.element}"
21
+ - "@openelement/router@${v.router}"
22
+ - "vite-plus@1.1.0"
23
+ overrides:
24
+ vite@*: "catalog:"
25
+ peerDependencyRules:
26
+ allowAny:
27
+ - vite
28
+ allowedVersions:
29
+ vite: "*"
@@ -1,11 +1,20 @@
1
- import { openElement } from '@openelement/router/vite';
2
- import { defineConfig } from 'vite';
1
+ import { openElement } from "@openelement/router/vite";
2
+ import { defineConfig } from "vite-plus";
3
3
 
4
4
  // Vite configuration only. Framework options live in openelement.config.ts —
5
5
  // the plugin reads that file itself, so the plugin call stays bare. The JSX
6
6
  // transform is owned by the plugin's compiler pass (TSX → Part Program);
7
7
  // nothing JSX-related needs configuring here.
8
+ //
9
+ // `defineConfig` comes from vite-plus so the config carries the Vite+ native
10
+ // tool blocks: `fmt` is what `vp fmt` reads. Its ignore list stays empty —
11
+ // the formatter's defaults already skip markdown, JSON, YAML, and CSS, so
12
+ // the authored sources ship in formatted form and `pnpm fmt --check`
13
+ // (`vp fmt --check`) passes out of the box.
8
14
  export default defineConfig({
9
- base: '/',
15
+ fmt: {
16
+ ignorePatterns: [],
17
+ },
18
+ base: "/",
10
19
  plugins: [...openElement()],
11
20
  });