ksk-design-system 2.0.0 → 2.0.1
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/MIGRATION.md
CHANGED
|
@@ -116,7 +116,7 @@ install に失敗しうるため、SemVer どおり major に倒した。
|
|
|
116
116
|
|
|
117
117
|
## v1 系内の minor 変更(参考)
|
|
118
118
|
|
|
119
|
-
###
|
|
119
|
+
### v1.70.0 — `ResponsiveOverlayFrame` に `preset="plain"` を追加(issue #486)
|
|
120
120
|
|
|
121
121
|
`side="bottom"` の経路は必ず `BottomSheetFrame` の preset を通るため、
|
|
122
122
|
`sm:`(640px 以上)でフロートカード化し、内側 padding も落ちる(`p-0`)。
|
|
@@ -162,7 +162,7 @@ install に失敗しうるため、SemVer どおり major に倒した。
|
|
|
162
162
|
- `desktopPosition` は `"center"` / `"top"` のみ。`"fullscreen"` は plain の
|
|
163
163
|
幅指定と噛み合わないため型で禁止している。
|
|
164
164
|
|
|
165
|
-
###
|
|
165
|
+
### v1.69.0 — `ResponsiveOverlayFrame` が float / float-glass シートを受けられるようになった(issue #479)
|
|
166
166
|
|
|
167
167
|
#472 で入った `ResponsiveOverlayFrame` は内部で `BottomSheetFrame`(`side="bottom"` 固定)を
|
|
168
168
|
使うため、左右・下に余白を持つカード型のシート(`side="float"` / `"float-glass"`)を
|
|
@@ -226,7 +226,7 @@ global CSS(`!important`)を残す必要があった。
|
|
|
226
226
|
`side="bottom"` 専用なので、`snapPoints` と float 系の併用は snap もデスクトップ変換も
|
|
227
227
|
効かない「何も起きない」組み合わせになる。どちらかに寄せること。
|
|
228
228
|
|
|
229
|
-
###
|
|
229
|
+
### v1.67.0 — `ResponsiveOverlayFrame` 追加(`BottomSheetFrame` + 消費側デスクトップ CSS からの移行 / issue #472)
|
|
230
230
|
|
|
231
231
|
`BottomSheetFrame` はモバイルの preset(`mobile-full` / `mobile-page` /
|
|
232
232
|
`mobile-form`)を持つ一方でデスクトップでは中央モーダルにならず、消費側は
|
|
@@ -298,7 +298,7 @@ global CSS で `position` / `transform` / `width` / `max-height` / `radius` を
|
|
|
298
298
|
既存の `BottomSheetFrame` / `ResponsiveDialogContent` は非推奨ではない
|
|
299
299
|
(モバイル専用面・preset 不要の面では引き続きそのまま使う)。
|
|
300
300
|
|
|
301
|
-
###
|
|
301
|
+
### v1.62.0 — `typescript` が必須依存から optional peer dependency になった(issue #409)
|
|
302
302
|
|
|
303
303
|
CLI の1ルール(P046)のためだけに typescript(24MB)が全 consumer の
|
|
304
304
|
node_modules に入っていたのを解消した。install サイズが減り、`ksk-ds lint` の
|
|
@@ -311,7 +311,7 @@ node_modules に入っていたのを解消した。install サイズが減り
|
|
|
311
311
|
typescript を追加すること
|
|
312
312
|
|
|
313
313
|
|
|
314
|
-
###
|
|
314
|
+
### v1.62.0 — `ksk-ds lint` の severity 語彙が `warn` → `warning` に統一(要確認)
|
|
315
315
|
|
|
316
316
|
`--format json` の `results[].severity` と text 出力の severity 表記が、これまで
|
|
317
317
|
`"warn"` と `"warning"` で不統一だった(contract の `contracts/rules.json` は
|
|
@@ -335,7 +335,7 @@ text 出力の要約行も `0 error / 3 warn` → `0 error / 3 warning` に変
|
|
|
335
335
|
- **未知のオプションはエラー終了**(従来は黙って捨てられ、CI に書いた
|
|
336
336
|
`--strict` が無言で効かないまま緑になっていた)
|
|
337
337
|
|
|
338
|
-
###
|
|
338
|
+
### v1.62.0 — `ksk-ds lint` の escape がルール単位・行単位で書けるようになった
|
|
339
339
|
|
|
340
340
|
ファイル全体・全ルールを無期限に外す `// ksk-ds-allow-custom-ui: 理由` は
|
|
341
341
|
後方互換で残るが**非推奨**。新規はルール単位を使う(issue #405):
|
|
@@ -351,7 +351,7 @@ ignore は効かない。あわせて escape マーカーは**文字列リテラ
|
|
|
351
351
|
無効化されていた)。既に short な理由を書いていたファイルは lint が復活するので、
|
|
352
352
|
理由を書き足すか違反を直すこと。
|
|
353
353
|
|
|
354
|
-
###
|
|
354
|
+
### v1.62.0 — 自動生成物と DS 自身のトークン CSS を lint 対象外にした
|
|
355
355
|
|
|
356
356
|
- 先頭 12 行に自動生成マーカー(`AUTO-GENERATED` / `DO NOT EDIT` / `自動生成` 等)を
|
|
357
357
|
持つファイルは全ルールを skip する(issue #408)。直す先は生成物ではなく生成元。
|
|
@@ -359,7 +359,7 @@ ignore は効かない。あわせて escape マーカーは**文字列リテラ
|
|
|
359
359
|
トークン定義 CSS を対象外にする(issue #407)。`vendor/ksk-design-system/**` のように
|
|
360
360
|
DS を再梱包しているリポで P049 が大量に出ていたのが解消する。
|
|
361
361
|
|
|
362
|
-
###
|
|
362
|
+
### v1.62.0 — `Footer` の `paymentIcons` 既定値が空になった(挙動変更)
|
|
363
363
|
|
|
364
364
|
`Footer` は `paymentIcons` を省略すると `["VISA", "Master", "JCB", "AmEx", "PayPay", "LINE Pay"]`
|
|
365
365
|
の決済バッジを既定で描画していた。EC 以外のプロダクトでも「取り扱っていない決済手段」が
|
|
@@ -376,7 +376,7 @@ ignore は効かない。あわせて escape マーカーは**文字列リテラ
|
|
|
376
376
|
|
|
377
377
|
`paymentIcons` を明示的に渡していた箇所は影響なし。
|
|
378
378
|
|
|
379
|
-
###
|
|
379
|
+
### v1.60.0 — `postinstall` による AI ルールファイル自動設置を廃止(要確認)
|
|
380
380
|
|
|
381
381
|
これまで `npm install ksk-design-system` の `postinstall` フックが、消費側の
|
|
382
382
|
プロジェクトルートに `CLAUDE.md` / `AGENTS.md`(`node_modules` 内の DS ルールを指す
|
|
@@ -397,7 +397,7 @@ npx ksk-ds init --force # 既存ファイルを最新テンプレートで上
|
|
|
397
397
|
`postinstall` を持つ限りバージョンを上げても判定が引き継がれる。あわせて
|
|
398
398
|
`INIT_CWD` 参照も削除し、書き込み先はコマンドを実行したディレクトリに固定した。
|
|
399
399
|
|
|
400
|
-
###
|
|
400
|
+
### v1.49.0 — PillToggle の onChange/onValueChange 統一(破壊変更なし)
|
|
401
401
|
|
|
402
402
|
`PillToggle` のみ他コンポーネント(Switch 等の native 系を除く)と異なり `onValueChange`
|
|
403
403
|
を主 API として案内していたため、`onChange` に統一した(issue #264⑥)。
|
|
@@ -414,7 +414,7 @@ npx ksk-ds init --force # 既存ファイルを最新テンプレートで上
|
|
|
414
414
|
`onChange` と `onValueChange` を両方渡した場合は `onChange` が優先される。
|
|
415
415
|
`onValueChange` は将来のメジャーバージョンで削除予定。
|
|
416
416
|
|
|
417
|
-
###
|
|
417
|
+
### v1.49.0 — Tailwind 4.1 以上が必要(要確認)
|
|
418
418
|
|
|
419
419
|
preset に DS 内部ユーティリティの safelist(`src/styles/source-safelist.css`・自動生成)を同梱した(issue #258)。
|
|
420
420
|
これにより、消費側の `@source ".../ksk-design-system/dist"` の設定漏れやパスずれで
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"name": "KSK Design System — Semantic Token Hex Cache",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"description": "semantic / semanticDark トークン(var(--Primitive-*) 参照)を実 hex に解決したサイドカー生成物。hex はデフォルト(Blue)テーマでの解決値であり、Brand 系(meta.themeDependentKeys に列挙)はテーマ差し替え(orange/green/violet 等)で実色が変わる。テーマ別の完全解決値は `ksk-design-system/native` エクスポート(バンドル済み native トークンモジュール)の themes を参照。tokens.json 本体のスキーマは変更せず、AI がこのファイルだけで実色を把握できるようにし、primitive 値の変更による semantic 実色のドリフトを --check で機械検出する。",
|
|
6
6
|
"generatedBy": "scripts/generate-token-hex-cache.mjs",
|
|
7
7
|
"theme": "default",
|
package/dist/index.js
CHANGED
|
@@ -1022,13 +1022,30 @@ function $t(e, t) {
|
|
|
1022
1022
|
e && typeof e == "object" && (e.current = t);
|
|
1023
1023
|
}
|
|
1024
1024
|
function en(e, t) {
|
|
1025
|
-
|
|
1026
|
-
e
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1025
|
+
let n = u.useRef(e), r = u.useRef(t), i = u.useRef(null), a = u.useRef(null), o = u.useRef(null), s = u.useCallback(() => {
|
|
1026
|
+
let e = o.current;
|
|
1027
|
+
e && (o.current = null, e.cleanup ? e.cleanup() : $t(e.ref, null));
|
|
1028
|
+
}, []), c = u.useCallback((e, t) => {
|
|
1029
|
+
o.current = {
|
|
1030
|
+
ref: e,
|
|
1031
|
+
cleanup: $t(e, t)
|
|
1030
1032
|
};
|
|
1031
|
-
}, [
|
|
1033
|
+
}, []);
|
|
1034
|
+
return u.useInsertionEffect(() => {
|
|
1035
|
+
n.current = e, r.current = t;
|
|
1036
|
+
let l = i.current;
|
|
1037
|
+
if (l != null) {
|
|
1038
|
+
if (a.current !== e) {
|
|
1039
|
+
let t = a.current;
|
|
1040
|
+
a.current = e, t?.(null), e(l);
|
|
1041
|
+
}
|
|
1042
|
+
o.current?.ref !== t && (s(), c(t, l));
|
|
1043
|
+
}
|
|
1044
|
+
}), u.useCallback((e) => (i.current = e, a.current = e == null ? null : n.current, n.current(e), s(), e != null && c(r.current, e), () => {
|
|
1045
|
+
i.current = null;
|
|
1046
|
+
let e = a.current;
|
|
1047
|
+
a.current = null, e?.(null), s();
|
|
1048
|
+
}), [c, s]);
|
|
1032
1049
|
}
|
|
1033
1050
|
//#endregion
|
|
1034
1051
|
//#region src/lib/title-level.tsx
|
|
@@ -12689,8 +12706,8 @@ function of(e) {
|
|
|
12689
12706
|
}
|
|
12690
12707
|
var sf = "min(85dvh, 46rem)", cf = "min(90dvh, 46rem)";
|
|
12691
12708
|
function lf(e, t, n) {
|
|
12692
|
-
let r = u.useRef(null), [i, a] = u.useState(
|
|
12693
|
-
r.current = e, a(
|
|
12709
|
+
let r = u.useRef(null), [i, a] = u.useState(null), o = u.useCallback((e) => {
|
|
12710
|
+
r.current = e, a(e);
|
|
12694
12711
|
}, []), [s, c] = u.useState();
|
|
12695
12712
|
return u.useLayoutEffect(() => {
|
|
12696
12713
|
let n = r.current;
|
|
@@ -13,6 +13,25 @@ import { type SheetSurface } from "./sheet-surface";
|
|
|
13
13
|
* float 系では `preset` は効かず、代わりに `padding` が効く。
|
|
14
14
|
*/
|
|
15
15
|
type ResponsiveOverlaySide = "bottom" | "float" | "float-glass";
|
|
16
|
+
/**
|
|
17
|
+
* 面に実際に効いている `max-height`(実測値)。
|
|
18
|
+
*
|
|
19
|
+
* 既定キャップは className でも上書きできる(desktopClassName の max-h ユーティリティ)。
|
|
20
|
+
* inline style は className より強いので、経路の既定値だけを見て畳むと
|
|
21
|
+
* consumer が締めたキャップを緩めてしまう(#487 の Codex レビュー指摘)。
|
|
22
|
+
* 補正が当たっていない間の computed 値を読めば、className / inline style /
|
|
23
|
+
* 経路の既定のどれで決まっていても「いま効いているキャップ」が取れる。
|
|
24
|
+
*
|
|
25
|
+
* 補正が当たっている間は自分の inline 値を読み返してしまうので、その間だけ
|
|
26
|
+
* inline の max-height を外して測り、すぐ戻す(layout effect の中なので
|
|
27
|
+
* 塗り替えは挟まらない)。「Sheet からの切り替え直後にすでにキーボードが
|
|
28
|
+
* 出ている」(iPad を境界跨ぎで回転した等)ケースでも初回から実測できる
|
|
29
|
+
* ようにするため、active を理由に測定を諦めない(#487 の Codex レビュー指摘)。
|
|
30
|
+
*/
|
|
31
|
+
export declare function useEffectiveMaxHeight(active: boolean, consumerInlineMaxHeight: string, classSignature: string): {
|
|
32
|
+
setElement: (node: HTMLDivElement | null) => void;
|
|
33
|
+
measured: string | undefined;
|
|
34
|
+
};
|
|
16
35
|
/**
|
|
17
36
|
* ズームを打ち消したソフトキーボード高さ(レイアウト px / issue #487)。
|
|
18
37
|
*
|
|
@@ -17,6 +17,13 @@ export declare function assignRef<T>(ref: React.Ref<T> | undefined, node: T | nu
|
|
|
17
17
|
* - consumer が cleanup を返していれば、それを呼ぶ
|
|
18
18
|
* - 返していなければ(object ref / 旧来のコールバック ref)`null` を書き戻す
|
|
19
19
|
*
|
|
20
|
+
* **返すコールバック ref の identity は固定する**(issue #516)。React は
|
|
21
|
+
* コールバック ref の identity が render 間で変わると detach → re-attach を
|
|
22
|
+
* 行うため、`internal` / `external` を依存にして毎 render 作り直すと、
|
|
23
|
+
* consumer が毎 render 新しい関数を渡す呼び出し面(Radix の composeRefs が
|
|
24
|
+
* 生成する合成関数など)で ref chain 全体の付け外しが増える。identity を
|
|
25
|
+
* 固定し、差し替えは insertion effect で node を付け替えることで吸収する。
|
|
26
|
+
*
|
|
20
27
|
* @param internal 内部側の setter。attach 時に node、detach 時に null で呼ばれる
|
|
21
28
|
* @param external consumer から渡された ref(未指定可)
|
|
22
29
|
*/
|