@ampless/plugin-reading-time 0.1.0-beta.31 → 0.1.0-beta.32

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.ja.md CHANGED
@@ -62,7 +62,7 @@ export default defineConfig({
62
62
 
63
63
  - `data-words` — 生の語数(CJK 正規化後)。
64
64
  - `data-minutes` — 推定読了時間(分)。常に 1 以上。
65
- - クラス名 `ampless-reading-time` は安定しており、CSS によるスタイリングに利用できます。
65
+ - クラス名 `ampless-reading-time` は安定しており、CSS によるスタイリングに利用できます。site テンプレートの `globals.css` に控えめな既定スタイル(muted な小さめテキスト)が同梱されます。ゼロ詳細度(`:where()`)なので、テーマ CSS で自由に上書きできます。
66
66
 
67
67
  ## 語数カウント
68
68
 
@@ -89,6 +89,6 @@ export default defineConfig({
89
89
 
90
90
  ## v1 では対応しないこと
91
91
 
92
- - **テーマ CSS** — `<p>` 要素には安定したクラス名(`ampless-reading-time`)が付与されるのでテーマ側でスタイリングできます。デフォルト CSS は注入しません。
93
- - **ロケール別ラベル** — `labelTemplate` は全ロケール共通の単一文字列です。多言語サイトでは `instanceId` を別にしてプラグインを 2 回登録し、テーマ側でスロットを条件分岐させることで対応できます。
92
+ - **テーマ固有の CSS** — プラグイン自体はテーマごとのスタイルを持ちません。site テンプレートの `globals.css` にニュートラルな既定スタイル(muted な小さめテキスト)がゼロ詳細度(`:where()`)で同梱されるのみで、それ以上の見た目は安定クラス名(`ampless-reading-time`)を使ったテーマ CSS の担当です。
93
+ - **ロケール別ラベル** — `labelTemplate` は全ロケール共通の単一文字列です。プラグインを複数回登録しても解決になりません(全 instance が同じ position バケットに描画されるため、テーマがロケール別のスロットを選べません)。
94
94
  - **文字種別 WPM のカスタマイズ** — `wordsPerMinute` 設定は一律適用されます。アラビア語とラテン語で別レートを設定するなど、文字種別の細かな調整は deferred です。
package/README.md CHANGED
@@ -62,7 +62,7 @@ The plugin emits a single `<p>` element:
62
62
 
63
63
  - `data-words` — raw word count (after CJK normalization).
64
64
  - `data-minutes` — computed reading time in minutes (always ≥ 1).
65
- - The class `ampless-reading-time` is stable and suitable for CSS targeting.
65
+ - The class `ampless-reading-time` is stable and suitable for CSS targeting. A modest default style (muted, smaller text) ships in the site template's `globals.css`, at zero specificity (`:where()`) so theme CSS can freely override it.
66
66
 
67
67
  ## Word counting
68
68
 
@@ -89,6 +89,6 @@ The label string is HTML-escaped after placeholder substitution. Characters `< >
89
89
 
90
90
  ## What it does not do (v1)
91
91
 
92
- - **Theme CSS** — The `<p>` element carries a stable class name (`ampless-reading-time`) for theme authors to style. No default CSS is injected.
93
- - **Locale-aware labels** — The `labelTemplate` is a single string shared across all locales. Multi-locale setups can register the plugin twice with distinct `instanceId` values and theme-side conditionally render the correct slot.
92
+ - **Theme-specific CSS** — the plugin ships no per-theme styling. A neutral default (muted, smaller text) comes from the site template's `globals.css` at zero specificity (`:where()`); anything beyond that is up to theme CSS via the stable `ampless-reading-time` class.
93
+ - **Locale-aware labels** — The `labelTemplate` is a single string shared across all locales. Registering multiple instances does not help: all instances render into the same position bucket, so themes cannot pick a per-locale slot.
94
94
  - **Custom WPM per script** — The `wordsPerMinute` setting applies uniformly. Fine-grained per-script tuning (e.g. different rates for Arabic vs. Latin) is deferred.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampless/plugin-reading-time",
3
- "version": "0.1.0-beta.31",
3
+ "version": "0.1.0-beta.32",
4
4
  "description": "Reading-time badge plugin for ampless — estimates read time from post content and injects a configurable label before or after the post body",
5
5
  "license": "MIT",
6
6
  "type": "module",