@bieberkit/plugin-theme 0.0.1 → 0.6.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,45 @@
1
+ <!--
2
+ BieberKit
3
+
4
+ @file plugins/theme/CHANGELOG.md
5
+ @description Release history generated from changesets for @bieberkit/plugin-theme.
6
+ @author Bieber Kieu <kieutrongthien@gmail.com>
7
+ @generated pnpm changeset version (license header normalized)
8
+ @copyright Copyright (c) 2026 Bieber Kieu
9
+ @license Apache-2.0
10
+
11
+ Licensed under the Apache License, Version 2.0 (the "License");
12
+ you may not use this file except in compliance with the License.
13
+ You may obtain a copy of the License at
14
+
15
+ http://www.apache.org/licenses/LICENSE-2.0
16
+
17
+ Unless required by applicable law or agreed to in writing, software
18
+ distributed under the License is distributed on an "AS IS" BASIS,
19
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ See the License for the specific language governing permissions and
21
+ limitations under the License.
22
+
23
+ SPDX-License-Identifier: Apache-2.0
24
+ -->
25
+
26
+ # @bieberkit/plugin-theme
27
+
28
+ ## 0.6.0
29
+
30
+ ### Minor Changes
31
+
32
+ - f8dcdec: Add `--template cms` with localized pages and articles, categories, tags, menus, SEO, redirects and a public theme. The public site is enabled by default. Use `--no-site` for an API and admin project.
33
+
34
+ After creating a CMS project, run `pnpm exec bieberkit migrate:make`, `pnpm exec bieberkit migrate` and `pnpm exec bieberkit db:seed` to publish the starter homepage and article and add the main menu. Rerunning the seed preserves existing editorial content.
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [2b2bd1c]
39
+ - Updated dependencies [f8dcdec]
40
+ - Updated dependencies [4958f26]
41
+ - Updated dependencies [594f5db]
42
+ - Updated dependencies [ab624de]
43
+ - Updated dependencies [f1811d7]
44
+ - @bieberkit/content@0.6.0
45
+ - @bieberkit/core@0.6.0
package/README.md CHANGED
@@ -1,3 +1,29 @@
1
- # @bieberkit/plugin-theme
1
+ <!--
2
+ BieberKit
2
3
 
3
- Reserved for the first BieberKit release of this package. The release will be available under `beta`.
4
+ @file plugins/theme/README.md
5
+ @description Explains how the CMS starter uses the default public site theme.
6
+ @author Bieber Kieu <kieutrongthien@gmail.com>
7
+ @copyright Copyright (c) 2026 Bieber Kieu
8
+ @license Apache-2.0
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ SPDX-License-Identifier: Apache-2.0
23
+ -->
24
+
25
+ # CMS site theme
26
+
27
+ The CMS starter uses this theme for published pages and articles. The layout renders the project title, an optional menu and the page content. The call-to-action and quote renderers retain the content renderer’s links, inline formatting and attribution.
28
+
29
+ The generated site imports `SiteLayout` and `blockComponents` from `@bieberkit/plugin-theme/site` and loads `@bieberkit/plugin-theme/site.css` as a stylesheet. To use a different theme, update the generated site’s `src/theme.tsx`. The stored documents can stay as they are.
@@ -0,0 +1,26 @@
1
+ /**
2
+ * BieberKit
3
+ *
4
+ * @file plugins/theme/src/index.ts
5
+ * @description Declares the backend entry for the public site theme.
6
+ * @author Bieber Kieu <kieutrongthien@gmail.com>
7
+ * @copyright Copyright (c) 2026 Bieber Kieu
8
+ * @license Apache-2.0
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ *
22
+ * SPDX-License-Identifier: Apache-2.0
23
+ */
24
+ import { PluginDef } from "@bieberkit/core";
25
+ declare const plugin: PluginDef;
26
+ export { plugin as default };
package/dist/index.js ADDED
@@ -0,0 +1,36 @@
1
+ import { definePlugin } from "@bieberkit/core";
2
+ // src/index.ts
3
+ /**
4
+ * BieberKit
5
+ *
6
+ * @file plugins/theme/src/index.ts
7
+ * @description Declares the backend entry for the public site theme.
8
+ * @author Bieber Kieu <kieutrongthien@gmail.com>
9
+ * @copyright Copyright (c) 2026 Bieber Kieu
10
+ * @license Apache-2.0
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ *
24
+ * SPDX-License-Identifier: Apache-2.0
25
+ */
26
+ const plugin = definePlugin({
27
+ name: "@bieberkit/plugin-theme",
28
+ version: "0.6.0",
29
+ core: "*",
30
+ dialects: [
31
+ "postgres",
32
+ "mysql",
33
+ "sqlite"
34
+ ]
35
+ });
36
+ export { plugin as default };
package/dist/site.css ADDED
@@ -0,0 +1,137 @@
1
+ /**
2
+ * BieberKit
3
+ *
4
+ * @file plugins/theme/site/site.css
5
+ * @description Styles the CMS site and its content blocks with responsive layout and native controls.
6
+ * @author Bieber Kieu <kieutrongthien@gmail.com>
7
+ * @copyright Copyright (c) 2026 Bieber Kieu
8
+ * @license Apache-2.0
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ *
22
+ * SPDX-License-Identifier: Apache-2.0
23
+ */
24
+
25
+ body {
26
+ margin: 0;
27
+ }
28
+
29
+ .bk-theme {
30
+ --bk-site-text: #202b25;
31
+ --bk-site-muted: #46564d;
32
+ --bk-site-accent: #17543d;
33
+ --bk-site-paper: #faf8f4;
34
+ --bk-site-wash: #eaf2eb;
35
+ --bk-site-line: #c7d3c9;
36
+ min-block-size: 100vh;
37
+ color: var(--bk-site-text);
38
+ background: var(--bk-site-paper);
39
+ font-family: system-ui, sans-serif;
40
+ font-size: 1rem;
41
+ line-height: 1.6;
42
+ overflow-wrap: anywhere;
43
+ }
44
+
45
+ .bk-theme-header,
46
+ .bk-theme > main {
47
+ box-sizing: border-box;
48
+ inline-size: min(100%, 70rem);
49
+ margin-inline: auto;
50
+ padding-inline: clamp(1.25rem, 5vw, 3.5rem);
51
+ }
52
+
53
+ .bk-theme-header {
54
+ display: flex;
55
+ flex-wrap: wrap;
56
+ align-items: center;
57
+ justify-content: space-between;
58
+ gap: 0.25rem 1.5rem;
59
+ padding-block: 1rem;
60
+ border-block-end: 1px solid var(--bk-site-line);
61
+ }
62
+
63
+ .bk-theme-brand {
64
+ font-size: 1.125rem;
65
+ font-weight: 750;
66
+ }
67
+
68
+ .bk-theme-header nav {
69
+ display: flex;
70
+ flex-wrap: wrap;
71
+ gap: 0 1rem;
72
+ }
73
+
74
+ .bk-theme-header a,
75
+ .bk-theme-callout a {
76
+ display: inline-flex;
77
+ min-block-size: 2.75rem;
78
+ align-items: center;
79
+ }
80
+
81
+ .bk-theme a {
82
+ color: var(--bk-site-accent);
83
+ text-underline-offset: 0.2em;
84
+ }
85
+
86
+ .bk-theme a:focus-visible {
87
+ outline: 2px solid currentColor;
88
+ outline-offset: 3px;
89
+ }
90
+
91
+ .bk-theme > main {
92
+ max-inline-size: 48rem;
93
+ padding-block: clamp(2.5rem, 7vw, 5rem);
94
+ }
95
+
96
+ .bk-theme h1,
97
+ .bk-theme h2,
98
+ .bk-theme h3 {
99
+ font-family: Georgia, serif;
100
+ line-height: 1.12;
101
+ }
102
+
103
+ .bk-theme h1 {
104
+ margin: 0 0 0.4em;
105
+ font-size: clamp(2.4rem, 7vw, 4.25rem);
106
+ }
107
+
108
+ .bk-theme :is(img, video, iframe) {
109
+ max-inline-size: 100%;
110
+ }
111
+
112
+ .bk-theme-callout,
113
+ .bk-theme-quote {
114
+ margin-block: 1.5rem;
115
+ padding: 1rem 1.25rem;
116
+ border-inline-start: 0.25rem solid var(--bk-site-accent);
117
+ background: var(--bk-site-wash);
118
+ }
119
+
120
+ .bk-theme-callout p,
121
+ .bk-theme-quote :is(figure, blockquote, p) {
122
+ margin: 0;
123
+ }
124
+
125
+ .bk-theme-callout a {
126
+ font-weight: 650;
127
+ }
128
+
129
+ .bk-theme-quote blockquote {
130
+ font-family: Georgia, serif;
131
+ font-size: 1.25rem;
132
+ }
133
+
134
+ .bk-theme-quote figcaption {
135
+ margin-block-start: 0.5rem;
136
+ color: var(--bk-site-muted);
137
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * BieberKit
3
+ *
4
+ * @file plugins/theme/site/site.css.d.ts
5
+ * @description Declares the theme stylesheet as a side-effect import.
6
+ * @author Bieber Kieu <kieutrongthien@gmail.com>
7
+ * @copyright Copyright (c) 2026 Bieber Kieu
8
+ * @license Apache-2.0
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ *
22
+ * SPDX-License-Identifier: Apache-2.0
23
+ */
24
+
25
+ // oxlint-disable-next-line unicorn/require-module-specifiers
26
+ export {};
package/dist/site.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ /**
2
+ * BieberKit
3
+ *
4
+ * @file plugins/theme/site/index.tsx
5
+ * @description Provides the CMS site layout and themed content blocks.
6
+ * @author Bieber Kieu <kieutrongthien@gmail.com>
7
+ * @copyright Copyright (c) 2026 Bieber Kieu
8
+ * @license Apache-2.0
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ *
22
+ * SPDX-License-Identifier: Apache-2.0
23
+ */
24
+ import { BlockComponents } from "@bieberkit/content/react";
25
+ import { ReactNode } from "react";
26
+ export interface SiteLayoutProps {
27
+ readonly title: string;
28
+ readonly items: readonly {
29
+ readonly label: string;
30
+ readonly href: string;
31
+ }[];
32
+ readonly children?: ReactNode;
33
+ }
34
+ export declare function SiteLayout({ title, items, children }: SiteLayoutProps): ReactNode;
35
+ export declare const blockComponents: BlockComponents;
package/dist/site.js ADDED
@@ -0,0 +1,57 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ // site/index.tsx
3
+ /**
4
+ * BieberKit
5
+ *
6
+ * @file plugins/theme/site/index.tsx
7
+ * @description Provides the CMS site layout and themed content blocks.
8
+ * @author Bieber Kieu <kieutrongthien@gmail.com>
9
+ * @copyright Copyright (c) 2026 Bieber Kieu
10
+ * @license Apache-2.0
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ *
24
+ * SPDX-License-Identifier: Apache-2.0
25
+ */
26
+ function SiteLayout({ title, items, children }) {
27
+ return /* @__PURE__ */ jsxs("div", {
28
+ className: "bk-theme",
29
+ children: [/* @__PURE__ */ jsxs("header", {
30
+ className: "bk-theme-header",
31
+ children: [/* @__PURE__ */ jsx("div", {
32
+ className: "bk-theme-brand",
33
+ children: title
34
+ }), items.length > 0 && /* @__PURE__ */ jsx("nav", {
35
+ "aria-label": "Main navigation",
36
+ children: items.map(({ label, href }, index) => /* @__PURE__ */ jsx("a", {
37
+ href,
38
+ children: label
39
+ }, index))
40
+ })]
41
+ }), /* @__PURE__ */ jsx("main", {
42
+ id: "top",
43
+ children
44
+ })]
45
+ });
46
+ }
47
+ const blockComponents = {
48
+ cta: ({ children }) => /* @__PURE__ */ jsx("div", {
49
+ className: "bk-theme-callout",
50
+ children
51
+ }),
52
+ quote: ({ children }) => /* @__PURE__ */ jsx("div", {
53
+ className: "bk-theme-quote",
54
+ children
55
+ })
56
+ };
57
+ export { SiteLayout, blockComponents };
package/package.json CHANGED
@@ -1,19 +1,87 @@
1
1
  {
2
2
  "name": "@bieberkit/plugin-theme",
3
- "version": "0.0.1",
4
- "description": "Reserved for the first BieberKit release of this package.",
3
+ "version": "0.6.0",
4
+ "description": "Provides the default public site layout and content block renderers.",
5
+ "keywords": [
6
+ "bieberkit",
7
+ "bieberkit-plugin"
8
+ ],
9
+ "homepage": "https://github.com/kieutrongthien/bieberkit#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/kieutrongthien/bieberkit/issues"
12
+ },
5
13
  "license": "Apache-2.0",
6
14
  "author": "Bieber Kieu <kieutrongthien@gmail.com>",
7
- "homepage": "https://github.com/kieutrongthien/bieberkit#readme",
8
15
  "repository": {
9
16
  "type": "git",
10
17
  "url": "git+https://github.com/kieutrongthien/bieberkit.git",
11
18
  "directory": "plugins/theme"
12
19
  },
13
20
  "files": [
14
- "NOTICE"
21
+ "dist",
22
+ "NOTICE",
23
+ "CHANGELOG.md"
15
24
  ],
25
+ "type": "module",
26
+ "sideEffects": [
27
+ "**/*.css"
28
+ ],
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "default": "./dist/index.js"
33
+ },
34
+ "./site": {
35
+ "types": "./dist/site.d.ts",
36
+ "default": "./dist/site.js"
37
+ },
38
+ "./site.css": {
39
+ "types": "./dist/site.css.d.ts",
40
+ "default": "./dist/site.css"
41
+ },
42
+ "./package.json": "./package.json"
43
+ },
16
44
  "publishConfig": {
17
- "registry": "https://registry.npmjs.org/"
45
+ "access": "public"
46
+ },
47
+ "dependencies": {
48
+ "@bieberkit/content": "0.6.0",
49
+ "@bieberkit/core": "0.6.0"
50
+ },
51
+ "devDependencies": {
52
+ "@types/react": "19.3.0",
53
+ "@types/react-dom": "19.3.0",
54
+ "react": "19.3.1",
55
+ "react-dom": "19.3.1"
56
+ },
57
+ "peerDependencies": {
58
+ "react": "^19.2.4"
59
+ },
60
+ "peerDependenciesMeta": {
61
+ "react": {
62
+ "optional": true
63
+ }
64
+ },
65
+ "engines": {
66
+ "node": ">=24.12"
67
+ },
68
+ "bieberkit": {
69
+ "core": "*",
70
+ "dialects": [
71
+ "mysql",
72
+ "postgres",
73
+ "sqlite"
74
+ ],
75
+ "requires": {},
76
+ "conflicts": [],
77
+ "env": [],
78
+ "tables": [],
79
+ "routes": [],
80
+ "permissions": [],
81
+ "admin": []
82
+ },
83
+ "scripts": {
84
+ "build": "tsdown && node --conditions=@bieberkit/source ../../tools/plugin-manifests.ts --write --plugin .",
85
+ "typecheck": "tsc --noEmit -p tsconfig.json"
18
86
  }
19
87
  }