@cosense-toolbox/tailwind 0.1.0-beta.2 → 0.1.0-beta.4

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.
Files changed (2) hide show
  1. package/README.md +2 -9
  2. package/package.json +7 -5
package/README.md CHANGED
@@ -93,14 +93,7 @@ class 名は `toHtml` の既定 (`classNames` を渡さなかったとき) に
93
93
  - 記号を並べると、それらをすべて持つ装飾に当たる。`cosense-deco-[-/]:` は `[-/ 文字]` など
94
94
  - 下線の記号 `_` は `cosense-deco-[\_]:` と書く。Tailwind は `[...]` の中の `_` を空白に変えるため
95
95
  - `"` は class 属性の中に書けないので使えない
96
- - パーサーが既定で装飾として読む記号は `*` `/` `-` `_` の 4 つだけ。`|` などほかの記号の装飾を使うときは、パースのときに [`customDecorations`](https://cosense-toolbox.qaynam.dev/parser/extend/) で記号を足す
97
-
98
- ```js
99
- // astro.config.mjs (@cosense-toolbox/astro)
100
- import { customDecorations } from "@cosense-toolbox/parser/extensions"
101
-
102
- cosense({ parseOptions: { extensions: [customDecorations(["|"])] } })
103
- ```
96
+ - パーサーは Cosense の文字装飾の記号 (`!"#%&'()*+,-./{|}<>_~=`) をすべて装飾として読む。見た目が付くのは `*` `/` `-` `_` だけなので、`|` などほかの記号の見た目はここで付ける
104
97
 
105
98
  ## 一部だけ外す
106
99
 
@@ -160,7 +153,7 @@ bun run compare # style.css とプラグインで、ブラウザの計算済
160
153
  `bun run compare` は、parser の記法仕様のページをすべて描画し、style.css で表示したものとプラグインで表示したものの全要素のスタイルを突き合わせる。あわせて、modifier がどれも対象の要素で既定のスタイルに勝つことを確かめる。
161
154
  Chromium が要るので、`npx playwright install chromium` で入れるか、手元の Chromium を `CHROMIUM_PATH` で渡す。
162
155
 
163
- `examples/astro-blog` はこのパッケージの `dist/` を読む。プラグインを直したら `bun run build` してから example を動かす。作り直さないと、新しい modifier は Tailwind に知られていない variant として黙って捨てられる。
156
+ `examples/astro-blog` は npm に公開された版を使う。直したプラグインを example で試すときは、`bun run build` してから `bun link` でつなぐ ([手元のパッケージで試す](../../examples/astro-blog/README.md#手元のパッケージで試す))。作り直さないと、新しい modifier は Tailwind に知られていない variant として黙って捨てられる。
164
157
 
165
158
  ## ライセンス
166
159
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosense-toolbox/tailwind",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.4",
4
4
  "description": "Tailwind CSS plugin: add class=\"cosense\" and the Cosense notation HTML inside it gets the default look.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,17 +36,20 @@
36
36
  "dev": "tsdown --watch",
37
37
  "typecheck": "tsc --noEmit",
38
38
  "test": "vitest run",
39
- "prepublishOnly": "bun run build"
39
+ "prepublishOnly": "bun run build",
40
+ "lint": "eslint .",
41
+ "format:check": "prettier --check . --ignore-path ../../.gitignore --ignore-path ../../.prettierignore"
40
42
  },
41
43
  "peerDependencies": {
42
44
  "tailwindcss": ">=4.0.0"
43
45
  },
44
46
  "devDependencies": {
45
- "@cosense-toolbox/parser": "0.1.0-beta.2",
47
+ "@cosense-toolbox/parser": "0.1.0-beta.4",
48
+ "@cosense-toolbox/style": "0.1.0-beta.4",
46
49
  "@tailwindcss/node": "^4.3.3",
47
50
  "effect": "^3.22.1",
48
- "postcss": "^8.5.28",
49
51
  "playwright-core": "^1.56.1",
52
+ "postcss": "^8.5.28",
50
53
  "postcss-selector-parser": "^7.1.6",
51
54
  "tailwindcss": "^4.3.3",
52
55
  "tsdown": "^0.22.14",
@@ -55,7 +58,6 @@
55
58
  },
56
59
  "publishConfig": {
57
60
  "access": "public",
58
- "tag": "beta",
59
61
  "registry": "https://registry.npmjs.org/"
60
62
  },
61
63
  "keywords": [