@niche-works/style-layouts 0.2.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/LICENSE +21 -0
- package/README.ja.md +320 -0
- package/README.md +320 -0
- package/_virtual/_rolldown/runtime.cjs +29 -0
- package/balance/index.cjs +4 -0
- package/balance/index.d.cts +3 -0
- package/balance/index.d.mts +3 -0
- package/balance/index.mjs +4 -0
- package/center/index.cjs +4 -0
- package/center/index.d.cts +3 -0
- package/center/index.d.mts +3 -0
- package/center/index.mjs +4 -0
- package/constants.cjs +59 -0
- package/constants.d.cts +2 -0
- package/constants.d.mts +2 -0
- package/constants.mjs +3 -0
- package/core/_constants.cjs +94 -0
- package/core/_constants.d.cts +83 -0
- package/core/_constants.d.mts +83 -0
- package/core/_constants.mjs +86 -0
- package/core/_internal/applyChildCount.cjs +26 -0
- package/core/_internal/applyChildCount.d.cts +11 -0
- package/core/_internal/applyChildCount.d.mts +12 -0
- package/core/_internal/applyChildCount.mjs +24 -0
- package/core/_internal/applyChildRatio.cjs +22 -0
- package/core/_internal/applyChildRatio.d.cts +11 -0
- package/core/_internal/applyChildRatio.d.mts +12 -0
- package/core/_internal/applyChildRatio.mjs +20 -0
- package/core/_internal/applyChildSize.cjs +27 -0
- package/core/_internal/applyChildSize.d.cts +11 -0
- package/core/_internal/applyChildSize.d.mts +12 -0
- package/core/_internal/applyChildSize.mjs +25 -0
- package/core/_internal/applyGap.cjs +30 -0
- package/core/_internal/applyGap.d.cts +12 -0
- package/core/_internal/applyGap.d.mts +13 -0
- package/core/_internal/applyGap.mjs +28 -0
- package/core/_internal/hasValue.cjs +15 -0
- package/core/_internal/hasValue.d.cts +8 -0
- package/core/_internal/hasValue.d.mts +9 -0
- package/core/_internal/hasValue.mjs +14 -0
- package/core/_internal/mergeLayoutResults.cjs +18 -0
- package/core/_internal/mergeLayoutResults.d.cts +5 -0
- package/core/_internal/mergeLayoutResults.d.mts +6 -0
- package/core/_internal/mergeLayoutResults.mjs +16 -0
- package/core/_internal/unit.cjs +16 -0
- package/core/_internal/unit.d.cts +10 -0
- package/core/_internal/unit.d.mts +11 -0
- package/core/_internal/unit.mjs +15 -0
- package/core/_internal/warnIfUnsupported.cjs +15 -0
- package/core/_internal/warnIfUnsupported.d.cts +3 -0
- package/core/_internal/warnIfUnsupported.d.mts +4 -0
- package/core/_internal/warnIfUnsupported.mjs +14 -0
- package/core/_styles.scss.cjs +1 -0
- package/core/_styles.scss.d.cts +1 -0
- package/core/_styles.scss.d.mts +1 -0
- package/core/_styles.scss.mjs +3 -0
- package/core/_types.cjs +0 -0
- package/core/_types.d.cts +123 -0
- package/core/_types.d.mts +123 -0
- package/core/_types.mjs +1 -0
- package/core/balance/balance.cjs +35 -0
- package/core/balance/balance.d.cts +11 -0
- package/core/balance/balance.d.mts +12 -0
- package/core/balance/balance.mjs +32 -0
- package/core/balance/index.cjs +3 -0
- package/core/balance/index.d.cts +3 -0
- package/core/balance/index.d.mts +3 -0
- package/core/balance/index.mjs +3 -0
- package/core/balance/styles.css +113 -0
- package/core/balance/types.cjs +0 -0
- package/core/balance/types.d.cts +21 -0
- package/core/balance/types.d.mts +21 -0
- package/core/balance/types.mjs +1 -0
- package/core/center/center.cjs +31 -0
- package/core/center/center.d.cts +11 -0
- package/core/center/center.d.mts +12 -0
- package/core/center/center.mjs +28 -0
- package/core/center/index.cjs +3 -0
- package/core/center/index.d.cts +3 -0
- package/core/center/index.d.mts +3 -0
- package/core/center/index.mjs +3 -0
- package/core/center/styles.css +166 -0
- package/core/center/types.cjs +0 -0
- package/core/center/types.d.cts +9 -0
- package/core/center/types.d.mts +9 -0
- package/core/center/types.mjs +1 -0
- package/core/constants.cjs +362 -0
- package/core/constants.d.cts +316 -0
- package/core/constants.d.mts +316 -0
- package/core/constants.mjs +305 -0
- package/core/flow/flow.cjs +71 -0
- package/core/flow/flow.d.cts +12 -0
- package/core/flow/flow.d.mts +13 -0
- package/core/flow/flow.mjs +68 -0
- package/core/flow/index.cjs +3 -0
- package/core/flow/index.d.cts +3 -0
- package/core/flow/index.d.mts +3 -0
- package/core/flow/index.mjs +3 -0
- package/core/flow/styles.css +166 -0
- package/core/flow/types.cjs +0 -0
- package/core/flow/types.d.cts +21 -0
- package/core/flow/types.d.mts +21 -0
- package/core/flow/types.mjs +1 -0
- package/core/index.cjs +20 -0
- package/core/index.d.cts +20 -0
- package/core/index.d.mts +20 -0
- package/core/index.mjs +11 -0
- package/core/layer/index.cjs +3 -0
- package/core/layer/index.d.cts +3 -0
- package/core/layer/index.d.mts +3 -0
- package/core/layer/index.mjs +3 -0
- package/core/layer/layer.cjs +34 -0
- package/core/layer/layer.d.cts +13 -0
- package/core/layer/layer.d.mts +14 -0
- package/core/layer/layer.mjs +31 -0
- package/core/layer/styles.css +64 -0
- package/core/layer/types.cjs +0 -0
- package/core/layer/types.d.cts +13 -0
- package/core/layer/types.d.mts +13 -0
- package/core/layer/types.mjs +1 -0
- package/core/matrix/index.cjs +3 -0
- package/core/matrix/index.d.cts +3 -0
- package/core/matrix/index.d.mts +3 -0
- package/core/matrix/index.mjs +3 -0
- package/core/matrix/matrix.cjs +110 -0
- package/core/matrix/matrix.d.cts +11 -0
- package/core/matrix/matrix.d.mts +12 -0
- package/core/matrix/matrix.mjs +107 -0
- package/core/matrix/styles.css +63 -0
- package/core/matrix/types.cjs +0 -0
- package/core/matrix/types.d.cts +46 -0
- package/core/matrix/types.d.mts +46 -0
- package/core/matrix/types.mjs +1 -0
- package/core/pack/index.cjs +3 -0
- package/core/pack/index.d.cts +3 -0
- package/core/pack/index.d.mts +3 -0
- package/core/pack/index.mjs +3 -0
- package/core/pack/pack.cjs +27 -0
- package/core/pack/pack.d.cts +11 -0
- package/core/pack/pack.d.mts +12 -0
- package/core/pack/pack.mjs +24 -0
- package/core/pack/styles.css +36 -0
- package/core/pack/types.cjs +0 -0
- package/core/pack/types.d.cts +6 -0
- package/core/pack/types.d.mts +6 -0
- package/core/pack/types.mjs +1 -0
- package/core/pin/index.cjs +3 -0
- package/core/pin/index.d.cts +3 -0
- package/core/pin/index.d.mts +3 -0
- package/core/pin/index.mjs +3 -0
- package/core/pin/pin.cjs +23 -0
- package/core/pin/pin.d.cts +11 -0
- package/core/pin/pin.d.mts +12 -0
- package/core/pin/pin.mjs +23 -0
- package/core/pin/styles.css +18 -0
- package/core/pin/types.cjs +0 -0
- package/core/pin/types.d.cts +6 -0
- package/core/pin/types.d.mts +6 -0
- package/core/pin/types.mjs +1 -0
- package/core/stack/index.cjs +3 -0
- package/core/stack/index.d.cts +3 -0
- package/core/stack/index.d.mts +3 -0
- package/core/stack/index.mjs +3 -0
- package/core/stack/stack.cjs +99 -0
- package/core/stack/stack.d.cts +11 -0
- package/core/stack/stack.d.mts +12 -0
- package/core/stack/stack.mjs +96 -0
- package/core/stack/styles.css +175 -0
- package/core/stack/types.cjs +0 -0
- package/core/stack/types.d.cts +21 -0
- package/core/stack/types.d.mts +21 -0
- package/core/stack/types.mjs +1 -0
- package/core/styles.css +917 -0
- package/core/tile/index.cjs +3 -0
- package/core/tile/index.d.cts +3 -0
- package/core/tile/index.d.mts +3 -0
- package/core/tile/index.mjs +3 -0
- package/core/tile/styles.css +108 -0
- package/core/tile/tile.cjs +86 -0
- package/core/tile/tile.d.cts +12 -0
- package/core/tile/tile.d.mts +13 -0
- package/core/tile/tile.mjs +83 -0
- package/core/tile/types.cjs +0 -0
- package/core/tile/types.d.cts +9 -0
- package/core/tile/types.d.mts +9 -0
- package/core/tile/types.mjs +1 -0
- package/core/types.cjs +0 -0
- package/core/types.d.cts +23 -0
- package/core/types.d.mts +23 -0
- package/core/types.mjs +1 -0
- package/flow/index.cjs +4 -0
- package/flow/index.d.cts +3 -0
- package/flow/index.d.mts +3 -0
- package/flow/index.mjs +4 -0
- package/index.cjs +20 -0
- package/index.d.cts +20 -0
- package/index.d.mts +20 -0
- package/index.mjs +11 -0
- package/layer/index.cjs +4 -0
- package/layer/index.d.cts +3 -0
- package/layer/index.d.mts +3 -0
- package/layer/index.mjs +4 -0
- package/matrix/index.cjs +4 -0
- package/matrix/index.d.cts +3 -0
- package/matrix/index.d.mts +3 -0
- package/matrix/index.mjs +4 -0
- package/pack/index.cjs +4 -0
- package/pack/index.d.cts +3 -0
- package/pack/index.d.mts +3 -0
- package/pack/index.mjs +4 -0
- package/package.json +51 -0
- package/pin/index.cjs +4 -0
- package/pin/index.d.cts +3 -0
- package/pin/index.d.mts +3 -0
- package/pin/index.mjs +4 -0
- package/stack/index.cjs +4 -0
- package/stack/index.d.cts +3 -0
- package/stack/index.d.mts +3 -0
- package/stack/index.mjs +4 -0
- package/tile/index.cjs +4 -0
- package/tile/index.d.cts +3 -0
- package/tile/index.d.mts +3 -0
- package/tile/index.mjs +4 -0
- package/types.cjs +0 -0
- package/types.d.cts +2 -0
- package/types.d.mts +2 -0
- package/types.mjs +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mitsuhiro Seino
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
# @niche-works/style-layouts
|
|
2
|
+
|
|
3
|
+
`@niche-works/style-layouts` は、CSSによる子要素のレイアウト制御に特化したニッチなライブラリです。\
|
|
4
|
+
オプションに応じたクラス名とCSS変数をオブジェクトとして返します。フレームワーク非依存でSSRにも対応しています。
|
|
5
|
+
|
|
6
|
+
**[English README is available here](./README.md)**
|
|
7
|
+
|
|
8
|
+
## 特徴
|
|
9
|
+
|
|
10
|
+
- フレームワーク非依存(あらゆるJS環境で動作)
|
|
11
|
+
- SSR対応(クラス名とインラインスタイルオブジェクトを返すだけ)
|
|
12
|
+
- TypeScriptによる完全な型サポート
|
|
13
|
+
|
|
14
|
+
## インストール
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @niche-works/style-layouts
|
|
18
|
+
# または
|
|
19
|
+
pnpm add @niche-works/style-layouts
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 使い方
|
|
23
|
+
|
|
24
|
+
各レイアウト関数は `{ className, style }` オブジェクトを返します。コンテナ要素に適用してください。
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { stack } from '@niche-works/style-layouts';
|
|
28
|
+
|
|
29
|
+
const { className, style } = stack({
|
|
30
|
+
direction: 'x',
|
|
31
|
+
alignX: 'center',
|
|
32
|
+
alignY: 'middle',
|
|
33
|
+
gap: 16,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// className: "nws-layout-stack nws-layout-direction-x ..."
|
|
37
|
+
// style: { "--nws-layout-gapX": "16px", ... }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<div class="nws-layout-stack ..." style="--nws-layout-gapX: 16px; ...">
|
|
42
|
+
<div>Item 1</div>
|
|
43
|
+
<div>Item 2</div>
|
|
44
|
+
</div>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### CSSの読み込み
|
|
48
|
+
|
|
49
|
+
デフォルトのインポートではCSSが自動的に読み込まれます。
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { stack } from '@niche-works/style-layouts';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
CSSと関数を個別に管理したい場合は `core` ディレクトリ配下のモジュールを使用してください。
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { stack } from '@niche-works/style-layouts/core';
|
|
59
|
+
|
|
60
|
+
// 全レイアウトをまとめてインポート
|
|
61
|
+
import '@niche-works/style-layouts/core/styles.css';
|
|
62
|
+
|
|
63
|
+
// 必要なレイアウトのみインポート
|
|
64
|
+
import '@niche-works/style-layouts/core/stack.css';
|
|
65
|
+
import '@niche-works/style-layouts/core/tile.css';
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## レイアウト種別
|
|
69
|
+
|
|
70
|
+
### `stack`
|
|
71
|
+
|
|
72
|
+
子要素を縦または横方向に一列に並べます。
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { stack } from '@niche-works/style-layouts';
|
|
76
|
+
|
|
77
|
+
const { className, style } = stack({
|
|
78
|
+
direction: 'x',
|
|
79
|
+
alignX: 'left',
|
|
80
|
+
alignY: 'top',
|
|
81
|
+
adjustX: 'grow',
|
|
82
|
+
gap: 8,
|
|
83
|
+
childSizeX: 200,
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### `flow`
|
|
88
|
+
|
|
89
|
+
`stack`と同様ですが、コンテナサイズを超えた場合に子要素を折り返します。
|
|
90
|
+
|
|
91
|
+
> 交差軸方向の `adjustX` / `adjustY` に `grow`、`shrink`、`fit` は指定できません。
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import { flow } from '@niche-works/style-layouts';
|
|
95
|
+
|
|
96
|
+
const { className, style } = flow({
|
|
97
|
+
direction: 'x',
|
|
98
|
+
alignX: 'left',
|
|
99
|
+
alignY: 'top',
|
|
100
|
+
adjustX: 'fit',
|
|
101
|
+
gap: 8,
|
|
102
|
+
childSizeX: 200,
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### `tile`
|
|
107
|
+
|
|
108
|
+
子要素のサイズを基準にして格子状に並べます。列数は親要素のサイズと子要素のサイズに応じて自動で決まります。
|
|
109
|
+
|
|
110
|
+
> **注意:** このレイアウトはコンテナのサイズが外部から確定していることを前提としています。`width: max-content` など、子要素によってサイズが決まる親要素では、パーセンテージ値が意図通りに動作しない場合があります。
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
import { tile } from '@niche-works/style-layouts';
|
|
114
|
+
|
|
115
|
+
const { className, style } = tile({
|
|
116
|
+
direction: 'x',
|
|
117
|
+
adjustX: 'fit',
|
|
118
|
+
gap: 8,
|
|
119
|
+
childSizeX: 200,
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### `matrix`
|
|
124
|
+
|
|
125
|
+
列数・行数を指定して子要素を格子状に並べます。
|
|
126
|
+
|
|
127
|
+
各軸で `childCount` または `tracks` のどちらか一方が必須です(両方は指定不可)。
|
|
128
|
+
|
|
129
|
+
> **注意:** `tile` と同様に、コンテナのサイズが外部から確定していることを前提としています。
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
import { matrix } from '@niche-works/style-layouts';
|
|
133
|
+
|
|
134
|
+
const { className, style } = matrix({
|
|
135
|
+
direction: 'x',
|
|
136
|
+
adjustX: 'fit',
|
|
137
|
+
gap: 8,
|
|
138
|
+
childSizeX: 200,
|
|
139
|
+
childCountX: 3,
|
|
140
|
+
childCountY: 2,
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// グリッドトラックを直接指定する場合
|
|
144
|
+
matrix({
|
|
145
|
+
tracksX: ['1fr', '2fr', '1fr'],
|
|
146
|
+
childCountY: 3,
|
|
147
|
+
});
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### `center`
|
|
151
|
+
|
|
152
|
+
子要素を親要素の中央に配置します。\
|
|
153
|
+
親要素が子要素より小さくなった場合でも、先頭の子要素が親要素の外にはみ出さずに表示されます。
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
import { center } from '@niche-works/style-layouts';
|
|
157
|
+
|
|
158
|
+
const { className, style } = center({
|
|
159
|
+
direction: 'x',
|
|
160
|
+
adjustX: 'shrink',
|
|
161
|
+
gap: 8,
|
|
162
|
+
childSizeY: 200,
|
|
163
|
+
childRatioX: 1.6,
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### `pack`
|
|
168
|
+
|
|
169
|
+
子要素を親要素のサイズに合わせて均等にサイズ調整し並べます。
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import { pack } from '@niche-works/style-layouts';
|
|
173
|
+
|
|
174
|
+
const { className, style } = pack({
|
|
175
|
+
direction: 'x',
|
|
176
|
+
gap: 8,
|
|
177
|
+
});
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### `balance`
|
|
181
|
+
|
|
182
|
+
子要素を一列に均等に並べます。
|
|
183
|
+
|
|
184
|
+
- `adjust` なし: 子要素のサイズを維持したまま、余白を均等に配分します
|
|
185
|
+
- `adjust` あり: 子要素のサイズを調整してコンテナを満たします
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
import { balance } from '@niche-works/style-layouts';
|
|
189
|
+
|
|
190
|
+
const { className, style } = balance({
|
|
191
|
+
direction: 'x',
|
|
192
|
+
adjustX: 'grow',
|
|
193
|
+
childSizeX: 200,
|
|
194
|
+
gap: 8,
|
|
195
|
+
});
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### `layer`
|
|
199
|
+
|
|
200
|
+
子要素を重ねて全て同じ位置に配置します。
|
|
201
|
+
|
|
202
|
+
> `alignX` / `alignY` に `space-between`、`space-around`、`space-evenly` は指定できません。
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
import { layer } from '@niche-works/style-layouts';
|
|
206
|
+
|
|
207
|
+
const { className, style } = layer({
|
|
208
|
+
alignX: 'center',
|
|
209
|
+
adjustX: 'shrink',
|
|
210
|
+
childSizeY: 200,
|
|
211
|
+
childRatioX: 1.6,
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### `pin`
|
|
216
|
+
|
|
217
|
+
子要素を指定の座標に配置します。子要素は `top` / `left` / `bottom` / `right` スタイルで位置を指定してください。
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
import { pin } from '@niche-works/style-layouts';
|
|
221
|
+
|
|
222
|
+
const { className, style } = pin({
|
|
223
|
+
childSizeX: 100,
|
|
224
|
+
childSizeY: 80,
|
|
225
|
+
});
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## オプション
|
|
229
|
+
|
|
230
|
+
### レイアウト別対応表
|
|
231
|
+
|
|
232
|
+
| オプション | stack | flow | tile | matrix | center | pack | balance | layer | pin |
|
|
233
|
+
| ------------- | :---: | :--: | :--: | :----: | :----: | :--: | :-----: | :---: | :-: |
|
|
234
|
+
| `direction` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
235
|
+
| `alignX` | ✓ | ✓ | ✓ | ✓ | — | — | ✓ | ✓ | — |
|
|
236
|
+
| `alignY` | ✓ | ✓ | ✓ | ✓ | — | — | ✓ | ✓ | — |
|
|
237
|
+
| `adjustX` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | — |
|
|
238
|
+
| `adjustY` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | — |
|
|
239
|
+
| `gap` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
240
|
+
| `gapX` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
241
|
+
| `gapY` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
242
|
+
| `childSizeX` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ |
|
|
243
|
+
| `childSizeY` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ |
|
|
244
|
+
| `childRatioX` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ |
|
|
245
|
+
| `childRatioY` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ |
|
|
246
|
+
| `childCountX` | — | — | — | ✓ | — | — | — | — | — |
|
|
247
|
+
| `childCountY` | — | — | — | ✓ | — | — | — | — | — |
|
|
248
|
+
| `tracksX` | — | — | — | ✓ | — | — | — | — | — |
|
|
249
|
+
| `tracksY` | — | — | — | ✓ | — | — | — | — | — |
|
|
250
|
+
|
|
251
|
+
### オプション一覧
|
|
252
|
+
|
|
253
|
+
| オプション | 型 | 説明 |
|
|
254
|
+
| -------------- | ------------------------ | ------------------------------------------------ |
|
|
255
|
+
| `direction?` | `'x' \| 'y'` | 主軸の方向 (デフォルト `'x'`) |
|
|
256
|
+
| `alignX?` | [`AlignX`](#alignx-の値) | 子要素の横位置 (デフォルト `'left'`) |
|
|
257
|
+
| `alignY?` | [`AlignY`](#aligny-の値) | 子要素の縦位置 (デフォルト `'top'`) |
|
|
258
|
+
| `adjustX?` | [`Adjust`](#adjust-の値) | 子要素の横方向のサイズ調整 (デフォルト `'none'`) |
|
|
259
|
+
| `adjustY?` | [`Adjust`](#adjust-の値) | 子要素の縦方向のサイズ調整 (デフォルト `'none'`) |
|
|
260
|
+
| `gap?` | `number` | 子要素間の余白 (px,横縦共通) |
|
|
261
|
+
| `gapX?` | `number` | 子要素間の余白 (px,横方向) |
|
|
262
|
+
| `gapY?` | `number` | 子要素間の余白 (px,縦方向) |
|
|
263
|
+
| `childSizeX?` | `number` | 子要素の幅 (px) |
|
|
264
|
+
| `childSizeY?` | `number` | 子要素の高さ (px) |
|
|
265
|
+
| `childRatioX?` | `number` | 子要素の幅の比 |
|
|
266
|
+
| `childRatioY?` | `number` | 子要素の高さの比 |
|
|
267
|
+
| `childCountX?` | `number` | 子要素の横方向の数 |
|
|
268
|
+
| `childCountY?` | `number` | 子要素の縦方向の数 |
|
|
269
|
+
| `tracksX?` | `(string \| number)[]` | 子要素の横方向の個々のサイズ |
|
|
270
|
+
| `tracksY?` | `(string \| number)[]` | 子要素の縦方向の個々のサイズ |
|
|
271
|
+
|
|
272
|
+
### `AlignX` の値
|
|
273
|
+
|
|
274
|
+
| 値 | 横方向の位置 |
|
|
275
|
+
| ----------------- | ---------------- |
|
|
276
|
+
| `'left'` | 左寄せ |
|
|
277
|
+
| `'center'` | 中央寄せ |
|
|
278
|
+
| `'right'` | 右寄せ |
|
|
279
|
+
| `'space-between'` | 両端揃え |
|
|
280
|
+
| `'space-around'` | 両端余白あり均等 |
|
|
281
|
+
| `'space-evenly'` | 完全均等 |
|
|
282
|
+
|
|
283
|
+
### `AlignY` の値
|
|
284
|
+
|
|
285
|
+
| 値 | 縦方向の位置 |
|
|
286
|
+
| ----------------- | ---------------- |
|
|
287
|
+
| `'top'` | 上寄せ |
|
|
288
|
+
| `'middle'` | 中央寄せ |
|
|
289
|
+
| `'bottom'` | 下寄せ |
|
|
290
|
+
| `'space-between'` | 両端揃え |
|
|
291
|
+
| `'space-around'` | 両端余白あり均等 |
|
|
292
|
+
| `'space-evenly'` | 完全均等 |
|
|
293
|
+
|
|
294
|
+
### `Adjust` の値
|
|
295
|
+
|
|
296
|
+
| 値 | 子が親より小さい時 | 子が親より大きい時 |
|
|
297
|
+
| ---------- | ------------------ | ------------------ |
|
|
298
|
+
| `'none'` | そのまま | そのまま |
|
|
299
|
+
| `'grow'` | 伸びる | そのまま |
|
|
300
|
+
| `'shrink'` | そのまま | 縮む |
|
|
301
|
+
| `'fit'` | 伸びる | 縮む |
|
|
302
|
+
|
|
303
|
+
> **注意:** 子要素に個別の幅や高さが設定されている場合、その値が優先されるため上記の動作にならないことがあります。
|
|
304
|
+
|
|
305
|
+
## 戻り値
|
|
306
|
+
|
|
307
|
+
全てのレイアウト関数は `StyleLayoutResult` を返します。
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
type StyleLayoutResult = {
|
|
311
|
+
className?: string;
|
|
312
|
+
style?: {
|
|
313
|
+
[key: `--${string}`]: string | number | undefined;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## ライセンス
|
|
319
|
+
|
|
320
|
+
MIT
|
package/README.md
ADDED
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
# @niche-works/style-layouts
|
|
2
|
+
|
|
3
|
+
`@niche-works/style-layouts` is a niche library specialized in controlling child element layout with CSS.
|
|
4
|
+
It returns class names and CSS custom properties as an object based on the given options. Framework-agnostic and SSR-compatible.
|
|
5
|
+
|
|
6
|
+
**[日本語のREADMEはこちら](./README.ja.md)**
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- Framework-agnostic (works with any JS environment)
|
|
11
|
+
- SSR-compatible (returns plain class names and inline style objects)
|
|
12
|
+
- Fully typed with TypeScript
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @niche-works/style-layouts
|
|
18
|
+
# or
|
|
19
|
+
pnpm add @niche-works/style-layouts
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Each layout function returns a `{ className, style }` object. Apply them to a container element.
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { stack } from '@niche-works/style-layouts';
|
|
28
|
+
|
|
29
|
+
const { className, style } = stack({
|
|
30
|
+
direction: 'x',
|
|
31
|
+
alignX: 'center',
|
|
32
|
+
alignY: 'middle',
|
|
33
|
+
gap: 16,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// className: "nws-layout-stack nws-layout-direction-x ..."
|
|
37
|
+
// style: { "--nws-layout-gapX": "16px", ... }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<div class="nws-layout-stack ..." style="--nws-layout-gapX: 16px; ...">
|
|
42
|
+
<div>Item 1</div>
|
|
43
|
+
<div>Item 2</div>
|
|
44
|
+
</div>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### CSS
|
|
48
|
+
|
|
49
|
+
The default import automatically includes the CSS.
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { stack } from '@niche-works/style-layouts';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If you want to manage CSS and functions separately, use the modules under the `core` directory.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { stack } from '@niche-works/style-layouts/core';
|
|
59
|
+
|
|
60
|
+
// Import all layouts at once
|
|
61
|
+
import '@niche-works/style-layouts/core/styles.css';
|
|
62
|
+
|
|
63
|
+
// Or import only what you need
|
|
64
|
+
import '@niche-works/style-layouts/core/stack.css';
|
|
65
|
+
import '@niche-works/style-layouts/core/tile.css';
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Layout Types
|
|
69
|
+
|
|
70
|
+
### `stack`
|
|
71
|
+
|
|
72
|
+
Arranges child elements in a single row or column.
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { stack } from '@niche-works/style-layouts';
|
|
76
|
+
|
|
77
|
+
const { className, style } = stack({
|
|
78
|
+
direction: 'x',
|
|
79
|
+
alignX: 'left',
|
|
80
|
+
alignY: 'top',
|
|
81
|
+
adjustX: 'grow',
|
|
82
|
+
gap: 8,
|
|
83
|
+
childSizeX: 200,
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### `flow`
|
|
88
|
+
|
|
89
|
+
Like `stack`, but wraps child elements when they exceed the container size.
|
|
90
|
+
|
|
91
|
+
> `grow`, `shrink`, and `fit` cannot be specified for `adjustX` / `adjustY` on the cross axis.
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import { flow } from '@niche-works/style-layouts';
|
|
95
|
+
|
|
96
|
+
const { className, style } = flow({
|
|
97
|
+
direction: 'x',
|
|
98
|
+
alignX: 'left',
|
|
99
|
+
alignY: 'top',
|
|
100
|
+
adjustX: 'fit',
|
|
101
|
+
gap: 8,
|
|
102
|
+
childSizeX: 200,
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### `tile`
|
|
107
|
+
|
|
108
|
+
Arranges child elements in a grid based on child element size. The number of columns is determined automatically based on the container and child sizes.
|
|
109
|
+
|
|
110
|
+
> **Note:** This layout assumes the container size is determined externally. Containers sized by their own content (e.g. `width: max-content`) may cause unexpected behavior with percentage-based values.
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
import { tile } from '@niche-works/style-layouts';
|
|
114
|
+
|
|
115
|
+
const { className, style } = tile({
|
|
116
|
+
direction: 'x',
|
|
117
|
+
adjustX: 'fit',
|
|
118
|
+
gap: 8,
|
|
119
|
+
childSizeX: 200,
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### `matrix`
|
|
124
|
+
|
|
125
|
+
Arranges child elements in a grid with explicit column and row counts.
|
|
126
|
+
|
|
127
|
+
Either `childCount` or `tracks` is required per axis (not both).
|
|
128
|
+
|
|
129
|
+
> **Note:** Like `tile`, this layout assumes the container size is determined externally.
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
import { matrix } from '@niche-works/style-layouts';
|
|
133
|
+
|
|
134
|
+
const { className, style } = matrix({
|
|
135
|
+
direction: 'x',
|
|
136
|
+
adjustX: 'fit',
|
|
137
|
+
gap: 8,
|
|
138
|
+
childSizeX: 200,
|
|
139
|
+
childCountX: 3,
|
|
140
|
+
childCountY: 2,
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// Using explicit track templates
|
|
144
|
+
matrix({
|
|
145
|
+
tracksX: ['1fr', '2fr', '1fr'],
|
|
146
|
+
childCountY: 3,
|
|
147
|
+
});
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### `center`
|
|
151
|
+
|
|
152
|
+
Places child elements at the center of the container.
|
|
153
|
+
Even when the container becomes smaller than the child elements, the first child element remains visible within the container without overflow.
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
import { center } from '@niche-works/style-layouts';
|
|
157
|
+
|
|
158
|
+
const { className, style } = center({
|
|
159
|
+
direction: 'x',
|
|
160
|
+
adjustX: 'shrink',
|
|
161
|
+
gap: 8,
|
|
162
|
+
childSizeY: 200,
|
|
163
|
+
childRatioX: 1.6,
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### `pack`
|
|
168
|
+
|
|
169
|
+
Sizes child elements equally to fill the container.
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import { pack } from '@niche-works/style-layouts';
|
|
173
|
+
|
|
174
|
+
const { className, style } = pack({
|
|
175
|
+
direction: 'x',
|
|
176
|
+
gap: 8,
|
|
177
|
+
});
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### `balance`
|
|
181
|
+
|
|
182
|
+
Arranges child elements evenly in a single row or column.
|
|
183
|
+
|
|
184
|
+
- Without `adjust`: maintains child size and distributes space evenly between items
|
|
185
|
+
- With `adjust`: adjusts child size to fill the container evenly
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
import { balance } from '@niche-works/style-layouts';
|
|
189
|
+
|
|
190
|
+
const { className, style } = balance({
|
|
191
|
+
direction: 'x',
|
|
192
|
+
adjustX: 'grow',
|
|
193
|
+
childSizeX: 200,
|
|
194
|
+
gap: 8,
|
|
195
|
+
});
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### `layer`
|
|
199
|
+
|
|
200
|
+
Stacks child elements on top of each other at the same position.
|
|
201
|
+
|
|
202
|
+
> `space-between`, `space-around`, and `space-evenly` cannot be specified for `alignX` / `alignY`.
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
import { layer } from '@niche-works/style-layouts';
|
|
206
|
+
|
|
207
|
+
const { className, style } = layer({
|
|
208
|
+
alignX: 'center',
|
|
209
|
+
adjustX: 'shrink',
|
|
210
|
+
childSizeY: 200,
|
|
211
|
+
childRatioX: 1.6,
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### `pin`
|
|
216
|
+
|
|
217
|
+
Positions child elements at specified coordinates. Each child element should have its position set via `top` / `left` / `bottom` / `right` styles.
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
import { pin } from '@niche-works/style-layouts';
|
|
221
|
+
|
|
222
|
+
const { className, style } = pin({
|
|
223
|
+
childSizeX: 100,
|
|
224
|
+
childSizeY: 80,
|
|
225
|
+
});
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Options
|
|
229
|
+
|
|
230
|
+
### Options by Layout
|
|
231
|
+
|
|
232
|
+
| Option | stack | flow | tile | matrix | center | pack | balance | layer | pin |
|
|
233
|
+
| ------------- | :---: | :--: | :--: | :----: | :----: | :--: | :-----: | :---: | :-: |
|
|
234
|
+
| `direction` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
235
|
+
| `alignX` | ✓ | ✓ | ✓ | ✓ | — | — | ✓ | ✓ | — |
|
|
236
|
+
| `alignY` | ✓ | ✓ | ✓ | ✓ | — | — | ✓ | ✓ | — |
|
|
237
|
+
| `adjustX` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | — |
|
|
238
|
+
| `adjustY` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | — |
|
|
239
|
+
| `gap` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
240
|
+
| `gapX` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
241
|
+
| `gapY` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
242
|
+
| `childSizeX` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ |
|
|
243
|
+
| `childSizeY` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ |
|
|
244
|
+
| `childRatioX` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ |
|
|
245
|
+
| `childRatioY` | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ |
|
|
246
|
+
| `childCountX` | — | — | — | ✓ | — | — | — | — | — |
|
|
247
|
+
| `childCountY` | — | — | — | ✓ | — | — | — | — | — |
|
|
248
|
+
| `tracksX` | — | — | — | ✓ | — | — | — | — | — |
|
|
249
|
+
| `tracksY` | — | — | — | ✓ | — | — | — | — | — |
|
|
250
|
+
|
|
251
|
+
### Options Reference
|
|
252
|
+
|
|
253
|
+
| Option | Type | Description |
|
|
254
|
+
| -------------- | -------------------------- | ---------------------------------------------------------- |
|
|
255
|
+
| `direction?` | `'x' \| 'y'` | Main axis direction (default: `'x'`) |
|
|
256
|
+
| `alignX?` | [`AlignX`](#alignx-values) | Horizontal alignment of children (default: `'left'`) |
|
|
257
|
+
| `alignY?` | [`AlignY`](#aligny-values) | Vertical alignment of children (default: `'top'`) |
|
|
258
|
+
| `adjustX?` | [`Adjust`](#adjust-values) | Horizontal size adjustment of children (default: `'none'`) |
|
|
259
|
+
| `adjustY?` | [`Adjust`](#adjust-values) | Vertical size adjustment of children (default: `'none'`) |
|
|
260
|
+
| `gap?` | `number` | Gap between children in px (both axes) |
|
|
261
|
+
| `gapX?` | `number` | Gap between children in px (horizontal) |
|
|
262
|
+
| `gapY?` | `number` | Gap between children in px (vertical) |
|
|
263
|
+
| `childSizeX?` | `number` | Width of child elements in px |
|
|
264
|
+
| `childSizeY?` | `number` | Height of child elements in px |
|
|
265
|
+
| `childRatioX?` | `number` | Horizontal ratio of child elements |
|
|
266
|
+
| `childRatioY?` | `number` | Vertical ratio of child elements |
|
|
267
|
+
| `childCountX?` | `number` | Number of children in horizontal direction |
|
|
268
|
+
| `childCountY?` | `number` | Number of children in vertical direction |
|
|
269
|
+
| `tracksX?` | `(string \| number)[]` | Individual sizes of children (horizontal) |
|
|
270
|
+
| `tracksY?` | `(string \| number)[]` | Individual sizes of children (vertical) |
|
|
271
|
+
|
|
272
|
+
### `AlignX` Values
|
|
273
|
+
|
|
274
|
+
| Value | Horizontal Position |
|
|
275
|
+
| ----------------- | -------------------------- |
|
|
276
|
+
| `'left'` | Align to left |
|
|
277
|
+
| `'center'` | Align to center |
|
|
278
|
+
| `'right'` | Align to right |
|
|
279
|
+
| `'space-between'` | Space between items |
|
|
280
|
+
| `'space-around'` | Space around items |
|
|
281
|
+
| `'space-evenly'` | Space evenly between items |
|
|
282
|
+
|
|
283
|
+
### `AlignY` Values
|
|
284
|
+
|
|
285
|
+
| Value | Vertical Position |
|
|
286
|
+
| ----------------- | -------------------------- |
|
|
287
|
+
| `'top'` | Align to top |
|
|
288
|
+
| `'middle'` | Align to middle |
|
|
289
|
+
| `'bottom'` | Align to bottom |
|
|
290
|
+
| `'space-between'` | Space between items |
|
|
291
|
+
| `'space-around'` | Space around items |
|
|
292
|
+
| `'space-evenly'` | Space evenly between items |
|
|
293
|
+
|
|
294
|
+
### `Adjust` Values
|
|
295
|
+
|
|
296
|
+
| Value | Child smaller than parent | Child larger than parent |
|
|
297
|
+
| ---------- | ------------------------- | ------------------------ |
|
|
298
|
+
| `'none'` | No change | No change |
|
|
299
|
+
| `'grow'` | Grows to fill | No change |
|
|
300
|
+
| `'shrink'` | No change | Shrinks to fit |
|
|
301
|
+
| `'fit'` | Grows to fill | Shrinks to fit |
|
|
302
|
+
|
|
303
|
+
> **Note:** If individual width or height is set on a child element, that value takes precedence and the behavior described above may not apply.
|
|
304
|
+
|
|
305
|
+
## Return Value
|
|
306
|
+
|
|
307
|
+
All layout functions return a `StyleLayoutResult`:
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
type StyleLayoutResult = {
|
|
311
|
+
className?: string;
|
|
312
|
+
style?: {
|
|
313
|
+
[key: `--${string}`]: string | number | undefined;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## License
|
|
319
|
+
|
|
320
|
+
MIT
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|