@riebeckite/honox 0.0.12 → 0.0.13

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
@@ -1,106 +1,106 @@
1
- # @riebeckite/honox
2
-
3
- The HonoX and Vite integration for Riebeckite. It connects portable Core
4
- behavior to a HonoX application: application/config root resolution, the Vite
5
- development and build workflow, static generation (SSG), generated plugin and
6
- theme style entries, server mounting, and the public UI primitives.
7
-
8
- [日本語](./README_ja.md)
9
-
10
- ## Overview
11
-
12
- `@riebeckite/honox` is the framework bridge. Core stays portable; everything
13
- HonoX, Vite, or Cloudflare specific lives here. A site registers the integration
14
- in `vite.config.ts`, mounts Riebeckite endpoints in its HonoX server, and
15
- imports the public UI primitives from `@riebeckite/honox/ui`.
16
-
17
- ## Installation
18
-
19
- ```sh
20
- pnpm add @riebeckite/core @riebeckite/honox honox hono vite
21
- ```
22
-
23
- `@riebeckite/honox` declares Core, HonoX, and Vite as dependencies, but a site
24
- still installs `honox`, `hono`, and `vite` directly for its own build config.
25
-
26
- ## Usage
27
-
28
- Register the integration in `vite.config.ts`:
29
-
30
- ```ts
31
- import path from "node:path";
32
- import { fileURLToPath } from "node:url";
33
- import build from "@hono/vite-build/cloudflare-workers";
34
- import {
35
- riebeckite,
36
- riebeckiteSsg,
37
- riebeckiteSsgExtensionMap,
38
- } from "@riebeckite/honox";
39
- import honox from "honox/vite";
40
- import { defineConfig } from "vite";
41
-
42
- const appRoot = fileURLToPath(new URL(".", import.meta.url));
43
-
44
- export default defineConfig({
45
- plugins: [
46
- honox({ client: { input: ["/app/client.ts", "/app/style.css"] } }),
47
- riebeckite({ appRoot }),
48
- build(),
49
- riebeckiteSsg({
50
- entry: path.join(appRoot, "app/server.ts"),
51
- extensionMap: riebeckiteSsgExtensionMap(),
52
- }),
53
- ],
54
- });
55
- ```
56
-
57
- Mount plugin endpoints on the HonoX server:
58
-
59
- ```ts
60
- import { mountRiebeckiteEndpoints } from "@riebeckite/honox/server";
61
- import { createApp } from "honox/server";
62
-
63
- const app = createApp({
64
- init: (app) => {
65
- mountRiebeckiteEndpoints(app, { config, content });
66
- },
67
- });
68
- ```
69
-
70
- `appRoot` defaults to the Vite root and is the base for `content.directory`;
71
- `configRoot` defaults to `appRoot` and determines where `riebeckite.config.*` is
72
- imported from. Installed npm consumers do not need `workspaceRoot`.
73
-
74
- ## Public API
75
-
76
- ### `@riebeckite/honox`
77
-
78
- - `riebeckite(options?)` — Vite plugin (accepts `configRoot`, `appRoot`,
79
- `configFile`, and the monorepo-only `workspaceRoot`)
80
- - `riebeckiteSsg(options?)` / `riebeckiteSsgExtensionMap()` — SSG integration
81
- - `loadRiebeckiteConfig`, `resolveHonoxConfig`
82
- - `resolveHonoxApplication`, `resolveHonoxApplicationRoot`,
83
- `buildHonoxApplication`, `startHonoxDevServer`
84
- - Types: `RiebeckiteSsgOptions`, `ResolveHonoxApplicationOptions`,
85
- `ResolvedHonoxApplication`
86
-
87
- ### `@riebeckite/honox/server`
88
-
89
- - `mountRiebeckiteEndpoints(app, { config, content })`
90
- - `resolveContentRoute(manifest, path)`
91
- - Type: `ResolvedContentRoute`
92
-
93
- ### `@riebeckite/honox/ui`
94
-
95
- Structural composition primitives only: `Article`, `ArticleLayout`,
96
- `ArticleHeader`, `ArticleContent`, `ArticleMeta`, `ArticleFooter`, `Sidebar`,
97
- and their public `*Props` types. They provide semantic HTML, stable `rb-*`
98
- styling hooks, and `class`/`className` composition; the site owns content,
99
- layout, islands, and CSS.
100
-
101
- ## See also
102
-
103
- - [HonoX Integration](../../../docs/en/honox-integration.md)
104
- - [CLI Reference](../../../docs/en/cli.md)
105
- - [Configuration](../../../docs/en/configuration.md)
106
- - [Plugin System](../../../docs/en/plugin-system.md) / [Theme System](../../../docs/en/theme-system.md)
1
+ # @riebeckite/honox
2
+
3
+ The HonoX and Vite integration for Riebeckite. It connects portable Core
4
+ behavior to a HonoX application: application/config root resolution, the Vite
5
+ development and build workflow, static generation (SSG), generated plugin and
6
+ theme style entries, server mounting, and the public UI primitives.
7
+
8
+ [日本語](./README_ja.md)
9
+
10
+ ## Overview
11
+
12
+ `@riebeckite/honox` is the framework bridge. Core stays portable; everything
13
+ HonoX, Vite, or Cloudflare specific lives here. A site registers the integration
14
+ in `vite.config.ts`, mounts Riebeckite endpoints in its HonoX server, and
15
+ imports the public UI primitives from `@riebeckite/honox/ui`.
16
+
17
+ ## Installation
18
+
19
+ ```sh
20
+ pnpm add @riebeckite/core @riebeckite/honox honox hono vite
21
+ ```
22
+
23
+ `@riebeckite/honox` declares Core, HonoX, and Vite as dependencies, but a site
24
+ still installs `honox`, `hono`, and `vite` directly for its own build config.
25
+
26
+ ## Usage
27
+
28
+ Register the integration in `vite.config.ts`:
29
+
30
+ ```ts
31
+ import path from "node:path";
32
+ import { fileURLToPath } from "node:url";
33
+ import build from "@hono/vite-build/cloudflare-workers";
34
+ import {
35
+ riebeckite,
36
+ riebeckiteSsg,
37
+ riebeckiteSsgExtensionMap,
38
+ } from "@riebeckite/honox";
39
+ import honox from "honox/vite";
40
+ import { defineConfig } from "vite";
41
+
42
+ const appRoot = fileURLToPath(new URL(".", import.meta.url));
43
+
44
+ export default defineConfig({
45
+ plugins: [
46
+ honox({ client: { input: ["/app/client.ts", "/app/style.css"] } }),
47
+ riebeckite({ appRoot }),
48
+ build(),
49
+ riebeckiteSsg({
50
+ entry: path.join(appRoot, "app/server.ts"),
51
+ extensionMap: riebeckiteSsgExtensionMap(),
52
+ }),
53
+ ],
54
+ });
55
+ ```
56
+
57
+ Mount plugin endpoints on the HonoX server:
58
+
59
+ ```ts
60
+ import { mountRiebeckiteEndpoints } from "@riebeckite/honox/server";
61
+ import { createApp } from "honox/server";
62
+
63
+ const app = createApp({
64
+ init: (app) => {
65
+ mountRiebeckiteEndpoints(app, { config, content });
66
+ },
67
+ });
68
+ ```
69
+
70
+ `appRoot` defaults to the Vite root and is the base for `content.directory`;
71
+ `configRoot` defaults to `appRoot` and determines where `riebeckite.config.*` is
72
+ imported from. Installed npm consumers do not need `workspaceRoot`.
73
+
74
+ ## Public API
75
+
76
+ ### `@riebeckite/honox`
77
+
78
+ - `riebeckite(options?)` — Vite plugin (accepts `configRoot`, `appRoot`,
79
+ `configFile`, and the monorepo-only `workspaceRoot`)
80
+ - `riebeckiteSsg(options?)` / `riebeckiteSsgExtensionMap()` — SSG integration
81
+ - `loadRiebeckiteConfig`, `resolveHonoxConfig`
82
+ - `resolveHonoxApplication`, `resolveHonoxApplicationRoot`,
83
+ `buildHonoxApplication`, `startHonoxDevServer`
84
+ - Types: `RiebeckiteSsgOptions`, `ResolveHonoxApplicationOptions`,
85
+ `ResolvedHonoxApplication`
86
+
87
+ ### `@riebeckite/honox/server`
88
+
89
+ - `mountRiebeckiteEndpoints(app, { config, content })`
90
+ - `resolveContentRoute(manifest, path)`
91
+ - Type: `ResolvedContentRoute`
92
+
93
+ ### `@riebeckite/honox/ui`
94
+
95
+ Structural composition primitives only: `Article`, `ArticleLayout`,
96
+ `ArticleHeader`, `ArticleContent`, `ArticleMeta`, `ArticleFooter`, `Sidebar`,
97
+ and their public `*Props` types. They provide semantic HTML, stable `rb-*`
98
+ styling hooks, and `class`/`className` composition; the site owns content,
99
+ layout, islands, and CSS.
100
+
101
+ ## See also
102
+
103
+ - [HonoX Integration](../../../docs/en/framework/honox-integration.md)
104
+ - [CLI Reference](../../../docs/en/reference/cli.md)
105
+ - [Configuration](../../../docs/en/reference/configuration.md)
106
+ - [Plugin System](../../../docs/en/reference/plugin-api.md) / [Theme System](../../../docs/en/reference/theme-api.md)
package/README_ja.md CHANGED
@@ -1,90 +1,90 @@
1
- # @riebeckite/honox
2
-
3
- Riebeckite の HonoX / Vite 統合です。移植可能な Core の振る舞いを HonoX アプリケーションへ接続します。アプリケーション・設定ルートの解決、Vite の開発・ビルドワークフロー、静的生成(SSG)、Plugin と Theme の生成スタイル、サーバーへのマウント、公開 UI primitive を担います。
4
-
5
- [English](./README.md)
6
-
7
- ## 概要
8
-
9
- `@riebeckite/honox` はフレームワークの橋渡しです。Core は移植可能なままに保ち、HonoX・Vite・Cloudflare に固有の処理はすべてここに置きます。サイトは `vite.config.ts` で integration を登録し、HonoX サーバーで Riebeckite のエンドポイントをマウントし、公開 UI primitive を `@riebeckite/honox/ui` から読み込みます。
10
-
11
- ## インストール
12
-
13
- ```sh
14
- pnpm add @riebeckite/core @riebeckite/honox honox hono vite
15
- ```
16
-
17
- `@riebeckite/honox` は Core、HonoX、Vite を依存に持ちますが、サイト自身のビルド設定のために `honox`、`hono`、`vite` も直接インストールします。
18
-
19
- ## 使い方
20
-
21
- `vite.config.ts` で integration を登録します。
22
-
23
- ```ts
24
- import path from "node:path";
25
- import { fileURLToPath } from "node:url";
26
- import build from "@hono/vite-build/cloudflare-workers";
27
- import {
28
- riebeckite,
29
- riebeckiteSsg,
30
- riebeckiteSsgExtensionMap,
31
- } from "@riebeckite/honox";
32
- import honox from "honox/vite";
33
- import { defineConfig } from "vite";
34
-
35
- const appRoot = fileURLToPath(new URL(".", import.meta.url));
36
-
37
- export default defineConfig({
38
- plugins: [
39
- honox({ client: { input: ["/app/client.ts", "/app/style.css"] } }),
40
- riebeckite({ appRoot }),
41
- build(),
42
- riebeckiteSsg({
43
- entry: path.join(appRoot, "app/server.ts"),
44
- extensionMap: riebeckiteSsgExtensionMap(),
45
- }),
46
- ],
47
- });
48
- ```
49
-
50
- HonoX サーバーに Plugin のエンドポイントをマウントします。
51
-
52
- ```ts
53
- import { mountRiebeckiteEndpoints } from "@riebeckite/honox/server";
54
- import { createApp } from "honox/server";
55
-
56
- const app = createApp({
57
- init: (app) => {
58
- mountRiebeckiteEndpoints(app, { config, content });
59
- },
60
- });
61
- ```
62
-
63
- `appRoot` は既定で Vite の root になり、`content.directory` の基準になります。`configRoot` は既定で `appRoot` になり、`riebeckite.config.*` を読み込む場所を決めます。インストールした npm consumer に `workspaceRoot` は不要です。
64
-
65
- ## 公開 API
66
-
67
- ### `@riebeckite/honox`
68
-
69
- - `riebeckite(options?)` — Vite Plugin(`configRoot`、`appRoot`、`configFile`、monorepo 開発専用の `workspaceRoot` を受け取る)
70
- - `riebeckiteSsg(options?)` / `riebeckiteSsgExtensionMap()` — SSG 統合
71
- - `loadRiebeckiteConfig`、`resolveHonoxConfig`
72
- - `resolveHonoxApplication`、`resolveHonoxApplicationRoot`、`buildHonoxApplication`、`startHonoxDevServer`
73
- - 型: `RiebeckiteSsgOptions`、`ResolveHonoxApplicationOptions`、`ResolvedHonoxApplication`
74
-
75
- ### `@riebeckite/honox/server`
76
-
77
- - `mountRiebeckiteEndpoints(app, { config, content })`
78
- - `resolveContentRoute(manifest, path)`
79
- - 型: `ResolvedContentRoute`
80
-
81
- ### `@riebeckite/honox/ui`
82
-
83
- 構造を組み立てるための primitive のみを公開します。`Article`、`ArticleLayout`、`ArticleHeader`、`ArticleContent`、`ArticleMeta`、`ArticleFooter`、`Sidebar` と、対応する公開 `*Props` 型です。semantic な HTML、安定した `rb-*` のスタイルフック、`class` / `className` の合成だけを提供し、コンテンツ、レイアウト、island、CSS はサイトが所有します。
84
-
85
- ## 関連資料
86
-
87
- - [HonoX Integration](../../../docs/ja/honox-integration.md)
88
- - [CLI Reference](../../../docs/ja/cli.md)
89
- - [Configuration](../../../docs/ja/configuration.md)
90
- - [Plugin System](../../../docs/ja/plugin-system.md) / [Theme System](../../../docs/ja/theme-system.md)
1
+ # @riebeckite/honox
2
+
3
+ Riebeckite の HonoX / Vite 統合です。移植可能な Core の振る舞いを HonoX アプリケーションへ接続します。アプリケーション・設定ルートの解決、Vite の開発・ビルドワークフロー、静的生成(SSG)、Plugin と Theme の生成スタイル、サーバーへのマウント、公開 UI primitive を担います。
4
+
5
+ [English](./README.md)
6
+
7
+ ## 概要
8
+
9
+ `@riebeckite/honox` はフレームワークの橋渡しです。Core は移植可能なままに保ち、HonoX・Vite・Cloudflare に固有の処理はすべてここに置きます。サイトは `vite.config.ts` で integration を登録し、HonoX サーバーで Riebeckite のエンドポイントをマウントし、公開 UI primitive を `@riebeckite/honox/ui` から読み込みます。
10
+
11
+ ## インストール
12
+
13
+ ```sh
14
+ pnpm add @riebeckite/core @riebeckite/honox honox hono vite
15
+ ```
16
+
17
+ `@riebeckite/honox` は Core、HonoX、Vite を依存に持ちますが、サイト自身のビルド設定のために `honox`、`hono`、`vite` も直接インストールします。
18
+
19
+ ## 使い方
20
+
21
+ `vite.config.ts` で integration を登録します。
22
+
23
+ ```ts
24
+ import path from "node:path";
25
+ import { fileURLToPath } from "node:url";
26
+ import build from "@hono/vite-build/cloudflare-workers";
27
+ import {
28
+ riebeckite,
29
+ riebeckiteSsg,
30
+ riebeckiteSsgExtensionMap,
31
+ } from "@riebeckite/honox";
32
+ import honox from "honox/vite";
33
+ import { defineConfig } from "vite";
34
+
35
+ const appRoot = fileURLToPath(new URL(".", import.meta.url));
36
+
37
+ export default defineConfig({
38
+ plugins: [
39
+ honox({ client: { input: ["/app/client.ts", "/app/style.css"] } }),
40
+ riebeckite({ appRoot }),
41
+ build(),
42
+ riebeckiteSsg({
43
+ entry: path.join(appRoot, "app/server.ts"),
44
+ extensionMap: riebeckiteSsgExtensionMap(),
45
+ }),
46
+ ],
47
+ });
48
+ ```
49
+
50
+ HonoX サーバーに Plugin のエンドポイントをマウントします。
51
+
52
+ ```ts
53
+ import { mountRiebeckiteEndpoints } from "@riebeckite/honox/server";
54
+ import { createApp } from "honox/server";
55
+
56
+ const app = createApp({
57
+ init: (app) => {
58
+ mountRiebeckiteEndpoints(app, { config, content });
59
+ },
60
+ });
61
+ ```
62
+
63
+ `appRoot` は既定で Vite の root になり、`content.directory` の基準になります。`configRoot` は既定で `appRoot` になり、`riebeckite.config.*` を読み込む場所を決めます。インストールした npm consumer に `workspaceRoot` は不要です。
64
+
65
+ ## 公開 API
66
+
67
+ ### `@riebeckite/honox`
68
+
69
+ - `riebeckite(options?)` — Vite Plugin(`configRoot`、`appRoot`、`configFile`、monorepo 開発専用の `workspaceRoot` を受け取る)
70
+ - `riebeckiteSsg(options?)` / `riebeckiteSsgExtensionMap()` — SSG 統合
71
+ - `loadRiebeckiteConfig`、`resolveHonoxConfig`
72
+ - `resolveHonoxApplication`、`resolveHonoxApplicationRoot`、`buildHonoxApplication`、`startHonoxDevServer`
73
+ - 型: `RiebeckiteSsgOptions`、`ResolveHonoxApplicationOptions`、`ResolvedHonoxApplication`
74
+
75
+ ### `@riebeckite/honox/server`
76
+
77
+ - `mountRiebeckiteEndpoints(app, { config, content })`
78
+ - `resolveContentRoute(manifest, path)`
79
+ - 型: `ResolvedContentRoute`
80
+
81
+ ### `@riebeckite/honox/ui`
82
+
83
+ 構造を組み立てるための primitive のみを公開します。`Article`、`ArticleLayout`、`ArticleHeader`、`ArticleContent`、`ArticleMeta`、`ArticleFooter`、`Sidebar` と、対応する公開 `*Props` 型です。semantic な HTML、安定した `rb-*` のスタイルフック、`class` / `className` の合成だけを提供し、コンテンツ、レイアウト、island、CSS はサイトが所有します。
84
+
85
+ ## 関連資料
86
+
87
+ - [HonoX Integration](../../../docs/ja/framework/honox-integration.md)
88
+ - [CLI Reference](../../../docs/ja/reference/cli.md)
89
+ - [Configuration](../../../docs/ja/reference/configuration.md)
90
+ - [Plugin System](../../../docs/ja/reference/plugin-api.md) / [Theme System](../../../docs/ja/reference/theme-api.md)
Binary file
Binary file
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export type { ScaffoldSiteOptions, ScaffoldSiteResult, } from "./src/scaffold/in
4
4
  export { ScaffoldSiteError, scaffoldRiebeckiteSite, } from "./src/scaffold/index.js";
5
5
  export { formatScaffoldNextSteps } from "./src/scaffold/next-steps.js";
6
6
  export type { ScaffoldAppFileKey, ScaffoldPageKey, ScaffoldPluginSpec, ScaffoldPreset, ScaffoldPresetName, ScaffoldReadmeLevel, ScaffoldThemeSpec, } from "./src/scaffold/presets.js";
7
- export { isScaffoldPresetName, resolveScaffoldPreset, SCAFFOLD_DEFAULT_PRESET, SCAFFOLD_PRESET_NAMES, scaffoldPresets, } from "./src/scaffold/presets.js";
7
+ export { empty, isScaffoldPresetName, minimal, resolveScaffoldPreset, SCAFFOLD_DEFAULT_PRESET, SCAFFOLD_PRESET_NAMES, scaffoldPresets, showcase, starter, } from "./src/scaffold/presets.js";
8
8
  export { createRiebeckiteSsg, defaultSsgEntry, riebeckiteSsgExtensionMap, } from "./src/ssg.js";
9
9
  export type { RiebeckiteSsgOptions } from "./src/ssg_plugin.js";
10
10
  export { riebeckiteSsg } from "./src/ssg_plugin.js";