@riebeckite/theme-fieldnotes 0.0.0-stage → 0.0.35

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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright Rerurate_514
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,71 @@
1
- # Temporary Holding Version
1
+ # @riebeckite/theme-fieldnotes
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <!-- Generated from docs/docs/themes/fieldnotes.md. Edit the canonical documentation in docs/docs/themes and run `pnpm docs:sync`. -->
4
+
5
+ [日本語](./README_ja.md)
6
+
7
+ ## Overview
8
+
9
+ `@riebeckite/theme-fieldnotes` provides the official **Fieldnotes** theme. Its theme identity is `fieldnotes`. A notebook-inspired reading surface with paper and annotation details.
10
+
11
+ ## Installation
12
+
13
+ ```sh
14
+ npm install @riebeckite/theme-fieldnotes
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```ts
20
+ import { defineConfig } from "@riebeckite/core";
21
+ import { fieldnotesTheme } from "@riebeckite/theme-fieldnotes";
22
+
23
+ export default defineConfig({
24
+ theme: fieldnotesTheme({
25
+ colorMode: "system",
26
+ preset: "journal",
27
+ settings: { typography: "system" },
28
+ }),
29
+ });
30
+ ```
31
+
32
+ ## Common options
33
+
34
+ | Property | Values | Description |
35
+ | --- | --- | --- |
36
+ | `colorMode` | `"light"`, `"dark"`, `"system"` | Chooses the color mode. `"system"` follows the browser preference. |
37
+ | `layout` | `"article"`, `"sidebar"`, `"full-width"` | Chooses the page layout. |
38
+ | `preset` | `journal`, `laboratory`, `archive` | Applies a named set of theme settings before explicit `settings`. |
39
+ | `settings` | object | Overrides the settings listed below. Unknown keys and invalid values are rejected. |
40
+ | `stylesheets` | string array | Loads site-owned stylesheets after the theme CSS. |
41
+
42
+ Resolution order is schema defaults, then the selected preset, then explicit `settings`.
43
+
44
+ ## Theme settings
45
+
46
+ | Property | Type | Default and allowed values | Effect |
47
+ | --- | --- | --- | --- |
48
+ | `typography` | select | `"system"` — `system`, `serif`, `sans`, `mono` | Selects the article typeface. |
49
+ | `fontSize` | slider | `1.05` — 0.95–1.25, step 0.05 | Article text size in rem. |
50
+ | `lineHeight` | slider | `1.8` — 1.5–2.1, step 0.05 | Article line height. |
51
+ | `paperStyle` | select | `"ruled"` — `plain`, `grid`, `ruled`, `dotted` | Selects the paper background pattern. |
52
+ | `inkColor` | color | `"#304a62"` | Primary writing and annotation color. |
53
+ | `marginRule` | boolean | `true` | Shows the notebook margin rule. |
54
+ | `indexMarks` | boolean | `true` | Shows notebook index marks. |
55
+ | `texture` | boolean | `true` | Shows the paper texture. |
56
+
57
+ ## Presets
58
+
59
+ | Preset | Label | Applied settings |
60
+ | --- | --- | --- |
61
+ | `journal` | Journal | `{ paperStyle: "ruled", marginRule: true }` |
62
+ | `laboratory` | Laboratory | `{ paperStyle: "grid", indexMarks: true }` |
63
+ | `archive` | Archive | `{ paperStyle: "plain", texture: false, marginRule: false }` |
64
+
65
+ ## CSS and attributes
66
+
67
+ The root receives `data-rb-theme="fieldnotes"`, `data-rb-mode` for an explicit light or dark mode, and `data-rb-layout`. Every setting is reflected as `data-rb-setting-<name>`; color, number, and slider settings are also available as safe `--rb-setting-<name>` custom properties.
68
+
69
+ ## See also
70
+
71
+ [Theme API](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/theme-api.md) and [Writing a theme](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/themes/writing-a-theme.md).
package/README_ja.md ADDED
@@ -0,0 +1,71 @@
1
+ # @riebeckite/theme-fieldnotes
2
+
3
+ <!-- Generated from docs/docs/themes/fieldnotes.ja.md. Edit the canonical documentation in docs/docs/themes and run `pnpm docs:sync`. -->
4
+
5
+ [English](./README.md)
6
+
7
+ ## 概要
8
+
9
+ `@riebeckite/theme-fieldnotes` は公式テーマ **Fieldnotes** を提供します。テーマ ID は `fieldnotes` です。紙面や注釈の表現を備えた、ノートブック風のテーマです。
10
+
11
+ ## インストール
12
+
13
+ ```sh
14
+ npm install @riebeckite/theme-fieldnotes
15
+ ```
16
+
17
+ ## 使い方
18
+
19
+ ```ts
20
+ import { defineConfig } from "@riebeckite/core";
21
+ import { fieldnotesTheme } from "@riebeckite/theme-fieldnotes";
22
+
23
+ export default defineConfig({
24
+ theme: fieldnotesTheme({
25
+ colorMode: "system",
26
+ preset: "journal",
27
+ settings: { typography: "system" },
28
+ }),
29
+ });
30
+ ```
31
+
32
+ ## 共通オプション
33
+
34
+ | プロパティ | 値 | 説明 |
35
+ | --- | --- | --- |
36
+ | `colorMode` | `"light"`、`"dark"`、`"system"` | カラーモードを選びます。`"system"` はブラウザの設定に従います。 |
37
+ | `layout` | `"article"`、`"sidebar"`、`"full-width"` | ページレイアウトを選びます。 |
38
+ | `preset` | `journal`、`laboratory`、`archive` | 明示した `settings` より先に、名前付きのテーマ設定セットを適用します。 |
39
+ | `settings` | object | 下記の設定を上書きします。不明なキーや不正な値は拒否されます。 |
40
+ | `stylesheets` | string array | テーマ CSS の後にサイト固有のスタイルシートを読み込みます。 |
41
+
42
+ 設定スキーマの既定値、選択したプリセット、明示した `settings` の順に適用されます。
43
+
44
+ ## テーマ設定
45
+
46
+ | プロパティ | 型 | 既定値と選択値 | 効果 |
47
+ | --- | --- | --- | --- |
48
+ | `typography` | select | 既定値 `"system"` — `system`、`serif`、`sans`、`mono` | 本文の書体を選びます。 |
49
+ | `fontSize` | slider | 既定値 `1.05` — 0.95–1.25、刻み 0.05 | 本文の文字サイズを rem で設定します。 |
50
+ | `lineHeight` | slider | 既定値 `1.8` — 1.5–2.1、刻み 0.05 | 本文の行間を設定します。 |
51
+ | `paperStyle` | select | 既定値 `"ruled"` — `plain`、`grid`、`ruled`、`dotted` | 紙面の背景パターンを選びます。 |
52
+ | `inkColor` | color | 既定値 `"#304a62"` | 本文や注釈の主な色を設定します。 |
53
+ | `marginRule` | boolean | 既定値 `true` | ノートのマージン罫線を表示します。 |
54
+ | `indexMarks` | boolean | 既定値 `true` | ノートのインデックスマークを表示します。 |
55
+ | `texture` | boolean | 既定値 `true` | 紙の質感を表示します。 |
56
+
57
+ ## プリセット
58
+
59
+ | プリセット | ラベル | 適用する設定 |
60
+ | --- | --- | --- |
61
+ | `journal` | Journal | `{ paperStyle: "ruled", marginRule: true }` |
62
+ | `laboratory` | Laboratory | `{ paperStyle: "grid", indexMarks: true }` |
63
+ | `archive` | Archive | `{ paperStyle: "plain", texture: false, marginRule: false }` |
64
+
65
+ ## CSS と属性
66
+
67
+ ルートには `data-rb-theme="fieldnotes"`、明示的にライトまたはダークを選んだ場合は `data-rb-mode`、そして `data-rb-layout` が設定されます。すべての設定は `data-rb-setting-<name>` 属性に反映されます。color、number、slider 型の設定は安全な `--rb-setting-<name>` カスタムプロパティとしても利用できます。
68
+
69
+ ## 関連情報
70
+
71
+ [Theme API](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/theme-api.md) と [テーマを書く](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/themes/writing-a-theme.ja.md) を参照してください。
@@ -0,0 +1,79 @@
1
+ export declare const fieldnotesTheme: import("@riebeckite/core").ThemeDefinition<{
2
+ readonly typography: {
3
+ readonly type: "select";
4
+ readonly label: "Typography";
5
+ readonly default: "system";
6
+ readonly options: readonly [{
7
+ readonly value: "system";
8
+ readonly label: "System";
9
+ }, {
10
+ readonly value: "serif";
11
+ readonly label: "Serif";
12
+ }, {
13
+ readonly value: "sans";
14
+ readonly label: "Sans";
15
+ }, {
16
+ readonly value: "mono";
17
+ readonly label: "Mono";
18
+ }];
19
+ };
20
+ readonly fontSize: {
21
+ readonly type: "slider";
22
+ readonly label: "Font size";
23
+ readonly description: "Article text size in rem.";
24
+ readonly default: 1.05;
25
+ readonly min: 0.95;
26
+ readonly max: 1.25;
27
+ readonly step: 0.05;
28
+ };
29
+ readonly lineHeight: {
30
+ readonly type: "slider";
31
+ readonly label: "Line height";
32
+ readonly description: "Article line height.";
33
+ readonly default: 1.8;
34
+ readonly min: 1.5;
35
+ readonly max: 2.1;
36
+ readonly step: 0.05;
37
+ };
38
+ readonly paperStyle: {
39
+ readonly type: "select";
40
+ readonly label: "Paper style";
41
+ readonly default: "ruled";
42
+ readonly options: readonly [{
43
+ readonly value: "plain";
44
+ readonly label: "Plain";
45
+ }, {
46
+ readonly value: "grid";
47
+ readonly label: "Grid";
48
+ }, {
49
+ readonly value: "ruled";
50
+ readonly label: "Ruled";
51
+ }, {
52
+ readonly value: "dotted";
53
+ readonly label: "Dotted";
54
+ }];
55
+ };
56
+ readonly inkColor: {
57
+ readonly type: "color";
58
+ readonly label: "Ink color";
59
+ readonly description: "Primary writing and annotation color.";
60
+ readonly default: "#304a62";
61
+ readonly light: "#304a62";
62
+ readonly dark: "#b8d8ed";
63
+ };
64
+ readonly marginRule: {
65
+ readonly type: "boolean";
66
+ readonly label: "Margin rule";
67
+ readonly default: true;
68
+ };
69
+ readonly indexMarks: {
70
+ readonly type: "boolean";
71
+ readonly label: "Index marks";
72
+ readonly default: true;
73
+ };
74
+ readonly texture: {
75
+ readonly type: "boolean";
76
+ readonly label: "Paper texture";
77
+ readonly default: true;
78
+ };
79
+ }>;
@@ -0,0 +1,76 @@
1
+ // src/index.ts
2
+ import { defineTheme, defineThemeSettings } from "@riebeckite/core";
3
+ var fieldnotesTheme = defineTheme({
4
+ name: "fieldnotes",
5
+ styles: [{ moduleSpecifier: "@riebeckite/theme-fieldnotes/style.css" }],
6
+ settings: defineThemeSettings({
7
+ typography: {
8
+ type: "select",
9
+ label: "Typography",
10
+ default: "system",
11
+ options: [
12
+ { value: "system", label: "System" },
13
+ { value: "serif", label: "Serif" },
14
+ { value: "sans", label: "Sans" },
15
+ { value: "mono", label: "Mono" }
16
+ ]
17
+ },
18
+ fontSize: {
19
+ type: "slider",
20
+ label: "Font size",
21
+ description: "Article text size in rem.",
22
+ default: 1.05,
23
+ min: 0.95,
24
+ max: 1.25,
25
+ step: 0.05
26
+ },
27
+ lineHeight: {
28
+ type: "slider",
29
+ label: "Line height",
30
+ description: "Article line height.",
31
+ default: 1.8,
32
+ min: 1.5,
33
+ max: 2.1,
34
+ step: 0.05
35
+ },
36
+ paperStyle: {
37
+ type: "select",
38
+ label: "Paper style",
39
+ default: "ruled",
40
+ options: [
41
+ { value: "plain", label: "Plain" },
42
+ { value: "grid", label: "Grid" },
43
+ { value: "ruled", label: "Ruled" },
44
+ { value: "dotted", label: "Dotted" }
45
+ ]
46
+ },
47
+ inkColor: {
48
+ type: "color",
49
+ label: "Ink color",
50
+ description: "Primary writing and annotation color.",
51
+ default: "#304a62",
52
+ light: "#304a62",
53
+ dark: "#b8d8ed"
54
+ },
55
+ marginRule: { type: "boolean", label: "Margin rule", default: true },
56
+ indexMarks: { type: "boolean", label: "Index marks", default: true },
57
+ texture: { type: "boolean", label: "Paper texture", default: true }
58
+ }),
59
+ presets: {
60
+ journal: {
61
+ label: "Journal",
62
+ settings: { paperStyle: "ruled", marginRule: true }
63
+ },
64
+ laboratory: {
65
+ label: "Laboratory",
66
+ settings: { paperStyle: "grid", indexMarks: true }
67
+ },
68
+ archive: {
69
+ label: "Archive",
70
+ settings: { paperStyle: "plain", texture: false, marginRule: false }
71
+ }
72
+ }
73
+ });
74
+ export {
75
+ fieldnotesTheme
76
+ };
package/package.json CHANGED
@@ -1,6 +1,57 @@
1
1
  {
2
2
  "name": "@riebeckite/theme-fieldnotes",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.35",
4
+ "license": "Apache-2.0",
5
+ "type": "module",
6
+ "main": "./dist/src/index.js",
7
+ "types": "./dist/src/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/src/index.d.ts",
11
+ "import": "./dist/src/index.js",
12
+ "source": "./src/index.ts",
13
+ "default": "./dist/src/index.js"
14
+ },
15
+ "./style.css": "./styles/theme.css",
16
+ "./styles/theme.css": "./styles/theme.css"
17
+ },
18
+ "dependencies": {
19
+ "@riebeckite/core": "0.0.35"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "files": [
25
+ "LICENSE",
26
+ "README.md",
27
+ "README_ja.md",
28
+ "dist",
29
+ "styles"
30
+ ],
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/Rerurate514/riebeckite.git",
34
+ "directory": "packages/themes/fieldnotes"
35
+ },
36
+ "homepage": "https://github.com/Rerurate514/riebeckite#readme",
37
+ "bugs": {
38
+ "url": "https://github.com/Rerurate514/riebeckite/issues"
39
+ },
40
+ "description": "A research notebook CSS theme for Riebeckite sites.",
41
+ "keywords": [
42
+ "riebeckite",
43
+ "theme",
44
+ "css",
45
+ "notebook",
46
+ "research"
47
+ ],
48
+ "engines": {
49
+ "node": "^20.19.0 || >=22.12.0"
50
+ },
51
+ "sideEffects": [
52
+ "./styles/*.css"
53
+ ],
54
+ "scripts": {
55
+ "build": "node ../../../scripts/build_package.mjs"
56
+ }
6
57
  }
@@ -0,0 +1,340 @@
1
+ @theme {
2
+ --font-sans: var(--rb-font-body);
3
+ --font-serif: var(--rb-font-heading);
4
+ --font-mono: var(--rb-font-mono);
5
+ --color-rb-paper: var(--rb-color-paper);
6
+ --color-rb-ink: var(--rb-color-ink);
7
+ --color-rb-muted: var(--rb-color-muted);
8
+ --color-rb-accent: var(--rb-color-accent);
9
+ --color-rb-surface: var(--rb-color-surface);
10
+ }
11
+ @layer base {
12
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] {
13
+ color-scheme: light;
14
+ --rb-color-paper: #f7f1df;
15
+ --rb-color-surface: #fdf9ec;
16
+ --rb-color-surface-hover: #eee5cf;
17
+ --rb-color-ink: var(--rb-setting-ink-color, #304a62);
18
+ --rb-color-muted: #6d716b;
19
+ --rb-color-accent: #a44832;
20
+ --rb-color-link: #315b79;
21
+ --rb-color-focus: #a44832;
22
+ --rb-color-selected: #f2d88c;
23
+ --rb-color-border: #d5c9ad;
24
+ --rb-color-border-strong: #a99c7f;
25
+ --rb-color-danger: #a33f32;
26
+ --rb-color-success: #427052;
27
+ --rb-color-code-background: #2a3c4b;
28
+ --rb-color-code-ink: #f7f1df;
29
+ --rb-color-code-inline: #e9e1ca;
30
+ --rb-color-overlay: rgb(25 32 35 / 0.64);
31
+ --rb-font-body: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
32
+ --rb-font-heading:
33
+ ui-monospace, "SFMono-Regular", Consolas, "Noto Sans Mono CJK JP",
34
+ monospace;
35
+ --rb-font-mono:
36
+ "SFMono-Regular", Consolas, "Noto Sans Mono CJK JP", monospace;
37
+ --rb-layout-page-max: 84rem;
38
+ --rb-layout-article-max: 46rem;
39
+ --rb-layout-sidebar: 15rem;
40
+ --rb-layout-gap: 2.5rem;
41
+ --rb-radius-sm: 0;
42
+ --rb-radius-md: 0;
43
+ }
44
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"][data-rb-mode="dark"] {
45
+ color-scheme: dark;
46
+ --rb-color-paper: #1e2527;
47
+ --rb-color-surface: #283235;
48
+ --rb-color-surface-hover: #354346;
49
+ --rb-color-ink: var(--rb-setting-ink-color, #b8d8ed);
50
+ --rb-color-muted: #b1b8ad;
51
+ --rb-color-accent: #e3997e;
52
+ --rb-color-link: #a9d5ee;
53
+ --rb-color-focus: #ffc0a8;
54
+ --rb-color-selected: #605329;
55
+ --rb-color-border: #536264;
56
+ --rb-color-border-strong: #829092;
57
+ --rb-color-danger: #ff9e8d;
58
+ --rb-color-success: #91cb9d;
59
+ --rb-color-code-background: #11191b;
60
+ --rb-color-code-ink: #e8f1ef;
61
+ --rb-color-code-inline: #354346;
62
+ --rb-color-overlay: rgb(0 0 0 / 0.75);
63
+ }
64
+ @media (prefers-color-scheme: dark) {
65
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]:not([data-rb-mode]) {
66
+ color-scheme: dark;
67
+ --rb-color-paper: #1e2527;
68
+ --rb-color-surface: #283235;
69
+ --rb-color-surface-hover: #354346;
70
+ --rb-color-ink: var(--rb-setting-ink-color, #b8d8ed);
71
+ --rb-color-muted: #b1b8ad;
72
+ --rb-color-accent: #e3997e;
73
+ --rb-color-link: #a9d5ee;
74
+ --rb-color-focus: #ffc0a8;
75
+ --rb-color-selected: #605329;
76
+ --rb-color-border: #536264;
77
+ --rb-color-border-strong: #829092;
78
+ --rb-color-danger: #ff9e8d;
79
+ --rb-color-success: #91cb9d;
80
+ --rb-color-code-background: #11191b;
81
+ --rb-color-code-ink: #e8f1ef;
82
+ --rb-color-code-inline: #354346;
83
+ --rb-color-overlay: rgb(0 0 0 / 0.75);
84
+ }
85
+ }
86
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] {
87
+ background: var(--rb-color-paper);
88
+ color: var(--rb-color-ink);
89
+ font-family: var(--rb-font-body);
90
+ accent-color: var(--rb-color-accent);
91
+ caret-color: var(--rb-color-accent);
92
+ }
93
+ }
94
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] {
95
+ --rb-fieldnotes-texture: radial-gradient(
96
+ circle at 1px 1px,
97
+ color-mix(in srgb, var(--rb-color-ink) 9%, transparent) 0.45px,
98
+ transparent 0.6px
99
+ );
100
+ background-image:
101
+ var(--rb-fieldnotes-texture),
102
+ linear-gradient(
103
+ to bottom,
104
+ transparent 1.75rem,
105
+ color-mix(in srgb, var(--rb-color-border) 52%, transparent) 1.8rem
106
+ );
107
+ background-size:
108
+ 5px 5px,
109
+ 100% 1.8rem;
110
+ }
111
+ :is(
112
+ :root,
113
+ .rb-theme-root
114
+ )[data-rb-theme="fieldnotes"][data-rb-setting-paper-style="plain"] {
115
+ background-image: var(--rb-fieldnotes-texture);
116
+ background-size: 5px 5px;
117
+ }
118
+ :is(
119
+ :root,
120
+ .rb-theme-root
121
+ )[data-rb-theme="fieldnotes"][data-rb-setting-paper-style="grid"] {
122
+ background-image:
123
+ var(--rb-fieldnotes-texture),
124
+ linear-gradient(var(--rb-color-border) 1px, transparent 1px),
125
+ linear-gradient(90deg, var(--rb-color-border) 1px, transparent 1px);
126
+ background-size:
127
+ 5px 5px,
128
+ 1.5rem 1.5rem,
129
+ 1.5rem 1.5rem;
130
+ }
131
+ :is(
132
+ :root,
133
+ .rb-theme-root
134
+ )[data-rb-theme="fieldnotes"][data-rb-setting-paper-style="dotted"] {
135
+ background-image:
136
+ var(--rb-fieldnotes-texture),
137
+ radial-gradient(
138
+ circle,
139
+ color-mix(in srgb, var(--rb-color-border) 75%, transparent) 1px,
140
+ transparent 1.1px
141
+ );
142
+ background-size:
143
+ 5px 5px,
144
+ 1rem 1rem;
145
+ }
146
+ :is(
147
+ :root,
148
+ .rb-theme-root
149
+ )[data-rb-theme="fieldnotes"][data-rb-setting-texture="false"] {
150
+ --rb-fieldnotes-texture: none;
151
+ }
152
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] ::selection {
153
+ background: var(--rb-color-selected);
154
+ color: var(--rb-color-ink);
155
+ }
156
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] :focus-visible {
157
+ outline: 2px solid var(--rb-color-focus);
158
+ outline-offset: 3px;
159
+ }
160
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rb-article {
161
+ position: relative;
162
+ font-size: calc(var(--rb-setting-font-size, 1.05) * 1rem);
163
+ line-height: var(--rb-setting-line-height, 1.8);
164
+ }
165
+
166
+ :is(
167
+ :root,
168
+ .rb-theme-root
169
+ )[data-rb-theme="fieldnotes"][data-rb-setting-typography="mono"]
170
+ .rb-article {
171
+ font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
172
+ }
173
+
174
+ :is(
175
+ :root,
176
+ .rb-theme-root
177
+ )[data-rb-theme="fieldnotes"][data-rb-setting-typography="system"]
178
+ .rb-article,
179
+ :is(
180
+ :root,
181
+ .rb-theme-root
182
+ )[data-rb-theme="fieldnotes"][data-rb-setting-typography="sans"]
183
+ .rb-article {
184
+ font-family: ui-sans-serif, system-ui, sans-serif;
185
+ }
186
+ :is(
187
+ :root,
188
+ .rb-theme-root
189
+ )[data-rb-theme="fieldnotes"][data-rb-setting-margin-rule="true"]
190
+ .rb-article {
191
+ border-left: 1px solid var(--rb-color-accent);
192
+ padding-left: clamp(1rem, 4vw, 3rem);
193
+ }
194
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rb-article-header {
195
+ margin-bottom: 2.6rem;
196
+ padding-bottom: 1rem;
197
+ border-bottom: 2px double var(--rb-color-border-strong);
198
+ }
199
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rb-article-header h1 {
200
+ font-family: var(--rb-font-heading);
201
+ font-size: clamp(1.8rem, 1.35rem + 2vw, 3rem);
202
+ font-weight: 600;
203
+ line-height: 1.18;
204
+ letter-spacing: -0.035em;
205
+ text-wrap: balance;
206
+ }
207
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rb-article-meta {
208
+ color: var(--rb-color-muted);
209
+ font-family: var(--rb-font-mono);
210
+ font-size: 0.75rem;
211
+ letter-spacing: 0.04em;
212
+ }
213
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rb-article-content h2 {
214
+ display: flex;
215
+ align-items: baseline;
216
+ gap: 0.65rem;
217
+ margin-top: 3.4rem;
218
+ font-family: var(--rb-font-heading);
219
+ font-size: 1.35rem;
220
+ font-weight: 600;
221
+ letter-spacing: 0.02em;
222
+ }
223
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
224
+ .rb-article-content
225
+ h2::before {
226
+ color: var(--rb-color-accent);
227
+ content: "//";
228
+ font-size: 0.8em;
229
+ }
230
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rb-article-content h3 {
231
+ margin-top: 2.3rem;
232
+ color: var(--rb-color-muted);
233
+ font-family: var(--rb-font-heading);
234
+ font-size: 0.9rem;
235
+ letter-spacing: 0.08em;
236
+ text-transform: uppercase;
237
+ }
238
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rb-article-content a {
239
+ color: var(--rb-color-link);
240
+ text-decoration-color: color-mix(in srgb, currentColor 50%, transparent);
241
+ text-decoration-thickness: 1px;
242
+ text-underline-offset: 0.2em;
243
+ }
244
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
245
+ .rb-article-content
246
+ blockquote {
247
+ margin: 2rem 0;
248
+ padding: 0.4rem 1.15rem;
249
+ border-left: 2px solid var(--rb-color-accent);
250
+ color: var(--rb-color-muted);
251
+ font-style: italic;
252
+ }
253
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
254
+ .rb-article-content
255
+ :is(pre, code) {
256
+ font-family: var(--rb-font-mono);
257
+ }
258
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
259
+ .rb-article-content
260
+ :not(pre)
261
+ > code {
262
+ padding: 0.1em 0.28em;
263
+ background: var(--rb-color-code-inline);
264
+ }
265
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
266
+ .rb-article-content
267
+ pre:not(:where(.rr-code *)) {
268
+ overflow-x: auto;
269
+ padding: 1rem 1.2rem;
270
+ border: 1px solid var(--rb-color-border-strong);
271
+ background: var(--rb-color-code-background);
272
+ color: var(--rb-color-code-ink);
273
+ }
274
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
275
+ .rb-article-content
276
+ table {
277
+ display: table;
278
+ width: max-content;
279
+ min-width: 100%;
280
+ border-collapse: collapse;
281
+ font-size: 0.93em;
282
+ }
283
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
284
+ .rb-article-content
285
+ :is(th, td) {
286
+ padding: 0.55rem 0.7rem;
287
+ border-bottom: 1px solid var(--rb-color-border-strong);
288
+ text-align: left;
289
+ }
290
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rb-article-content th {
291
+ font-family: var(--rb-font-mono);
292
+ font-size: 0.8em;
293
+ }
294
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
295
+ :is(
296
+ .rr-table-of-contents,
297
+ .rr-backlinks,
298
+ .rr-callout,
299
+ .rr-search,
300
+ .rr-code,
301
+ .rr-code-tabs,
302
+ .rr-query
303
+ ) {
304
+ border: 1px solid var(--rb-color-border-strong);
305
+ border-radius: 0;
306
+ background: color-mix(in srgb, var(--rb-color-surface) 90%, transparent);
307
+ }
308
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] .rr-callout {
309
+ padding: 1.5rem 2rem;
310
+ border-left: 3px solid var(--rb-color-accent);
311
+ }
312
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"]
313
+ .rb-article-content
314
+ > :is(.rr-callout, .rb-table-scroll, pre, .rr-code)
315
+ + :is(.rr-callout, .rb-table-scroll, pre, .rr-code) {
316
+ margin-block-start: 2.5rem;
317
+ }
318
+ :is(
319
+ :root,
320
+ .rb-theme-root
321
+ )[data-rb-theme="fieldnotes"][data-rb-setting-index-marks="false"]
322
+ .rb-article-content
323
+ h2::before {
324
+ display: none;
325
+ }
326
+ @media (max-width: 48rem) {
327
+ :is(
328
+ :root,
329
+ .rb-theme-root
330
+ )[data-rb-theme="fieldnotes"][data-rb-setting-margin-rule="true"]
331
+ .rb-article {
332
+ padding-left: 1rem;
333
+ }
334
+ }
335
+ @media (prefers-reduced-motion: reduce) {
336
+ :is(:root, .rb-theme-root)[data-rb-theme="fieldnotes"] * {
337
+ scroll-behavior: auto;
338
+ transition-duration: 0s;
339
+ }
340
+ }