@burger-editor/blocks 4.0.0-alpha.2 → 4.0.0-alpha.22
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.md +51 -58
- package/dist/index.js +1066 -429
- package/package.json +12 -11
- package/types.d.ts +7 -0
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -4,82 +4,75 @@
|
|
|
4
4
|
|
|
5
5
|
ブロックエディタの標準ブロックと標準アイテムを提供するパッケージです。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<div data-bge-name="{ブロック名}" data-bge-container="inline:center:wrap">
|
|
13
|
-
<div data-bge-group>
|
|
14
|
-
<div data-bge-item>{アイテムの01HTML}</div>
|
|
15
|
-
<div data-bge-item>{アイテムの02HTML}</div>
|
|
16
|
-
</div>
|
|
17
|
-
<div data-bge-group>
|
|
18
|
-
<div data-bge-item>{アイテムの01HTML}</div>
|
|
19
|
-
<div data-bge-item>{アイテムの02HTML}</div>
|
|
20
|
-
</div>
|
|
21
|
-
<div data-bge-group>
|
|
22
|
-
<div data-bge-item>{アイテムの01HTML}</div>
|
|
23
|
-
<div data-bge-item>{アイテムの02HTML}</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### ブロックを構成する要素
|
|
7
|
+
> **ℹ️ ブロックの構造仕様について**
|
|
8
|
+
> ブロックの構造管理は[@burger-editor/core](../core/)で行われています。
|
|
9
|
+
> ブロック構造の詳細仕様については [@burger-editor/core のREADME](../core/README.md#ブロックの仕様) を参照してください。
|
|
29
10
|
|
|
30
|
-
|
|
11
|
+
## 提供されるアイテム
|
|
31
12
|
|
|
32
|
-
|
|
13
|
+
このパッケージでは以下のアイテムを提供しています:
|
|
33
14
|
|
|
34
|
-
|
|
15
|
+
- **button** - ボタン
|
|
16
|
+
- **details** - 折りたたみ要素
|
|
17
|
+
- **download-file** - ダウンロードファイル
|
|
18
|
+
- **google-maps** - Google Maps 埋め込み
|
|
19
|
+
- **hr** - 水平線
|
|
20
|
+
- **image** - 画像
|
|
21
|
+
- **table** - テーブル
|
|
22
|
+
- **title-h2** - 大見出し(h2)
|
|
23
|
+
- **title-h3** - 中見出し(h3)
|
|
24
|
+
- **wysiwyg** - リッチテキストエディタ
|
|
25
|
+
- **youtube** - YouTube 動画埋め込み
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
## 提供されるブロックカタログ
|
|
37
28
|
|
|
38
|
-
|
|
29
|
+
このパッケージではデフォルトのブロックカタログを提供しています:
|
|
39
30
|
|
|
40
|
-
|
|
41
|
-
- `inline`: インライン方向に並べる( `display: block flex;` )
|
|
42
|
-
- `float`: 先頭のアイテムを回り込みさせる
|
|
31
|
+
### 見出し
|
|
43
32
|
|
|
44
|
-
|
|
33
|
+
- **大見出し** (h2) - title-h2 アイテムを使用
|
|
34
|
+
- **中見出し** (h3) - title-h3 アイテムを使用
|
|
45
35
|
|
|
46
|
-
|
|
36
|
+
### 基本ブロック
|
|
47
37
|
|
|
48
|
-
|
|
38
|
+
- **テキスト** (wysiwyg) - wysiwyg アイテムを使用
|
|
39
|
+
- **画像** (image) - image アイテムを使用
|
|
40
|
+
- **折りたたみ** (disclosure) - details アイテムを使用
|
|
41
|
+
- **テーブル** (table) - table アイテムを使用
|
|
42
|
+
- **YouTube** (youtube) - youtube アイテムを使用
|
|
49
43
|
|
|
50
|
-
|
|
44
|
+
### カード
|
|
51
45
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
- `end`: 右寄せ( `justify-content: end;` )
|
|
55
|
-
- `between`: 両端寄せ( `justify-content: space-between;` )
|
|
56
|
-
- `around`: 左右余白均等( `justify-content: space-around;` )
|
|
57
|
-
- `evenly`: 要素間均等( `justify-content: space-evenly;` )
|
|
58
|
-
- `align-center`: 垂直中央寄せ( `align-items: center;` )
|
|
59
|
-
- `align-start`: 上寄せ( `align-items: start;` )
|
|
60
|
-
- `align-end`: 下寄せ( `align-items: end;` )
|
|
61
|
-
- `align-stretch`: 伸縮( `align-items: stretch;` )
|
|
62
|
-
- `align-baseline`: ベースライン( `align-items: baseline;` )
|
|
63
|
-
- `wrap`: 折り返し( `flex-wrap: wrap;` )
|
|
64
|
-
- `nowrap`: 折り返さない( `flex-wrap: nowrap;` )
|
|
46
|
+
- **画像 + テキスト** (image-text) - image と wysiwyg アイテムを3列グリッドで組み合わせ
|
|
47
|
+
- **テキスト+画像+テキスト** (text-image-text) - wysiwyg、image、wysiwyg を3列グリッドで組み合わせ
|
|
65
48
|
|
|
66
|
-
|
|
49
|
+
### 画像+テキスト
|
|
67
50
|
|
|
68
|
-
|
|
51
|
+
- **画像右寄せ: テキスト回り込み** (text-float-image-end) - 画像が右に浮動し、テキストが回り込み
|
|
52
|
+
- **画像左寄せ: テキスト回り込み** (text-float-image-start) - 画像が左に浮動し、テキストが回り込み
|
|
53
|
+
- **画像右寄せ: テキスト回り込み無し** (text-start-image-end) - テキストと画像を左右に配置(回り込み無し)
|
|
54
|
+
- **画像左寄せ: テキスト回り込み無し** (image-start-text-end) - 画像とテキストを左右に配置(回り込み無し)
|
|
69
55
|
|
|
70
|
-
|
|
71
|
-
- `end`: 右寄せ( `float: inline-end;` )
|
|
56
|
+
### ボタン
|
|
72
57
|
|
|
73
|
-
|
|
58
|
+
- **ボタン** (button) - button アイテムを3つ横並びで配置
|
|
59
|
+
- **テキストリンク** (button) - リンク形式のボタンを3つ配置
|
|
60
|
+
- **ファイルダウンロード** (file) - download-file アイテムを3つ横並びで配置
|
|
61
|
+
- **コンテンツナビゲーション** (content-navigation) - ページ内リンクボタンを4列グリッドで8つ配置
|
|
74
62
|
|
|
75
|
-
|
|
63
|
+
### その他
|
|
76
64
|
|
|
77
|
-
-
|
|
65
|
+
- **Google Maps** (google-maps) - google-maps アイテムを使用
|
|
66
|
+
- **区切り線** (hr) - hr アイテムを使用
|
|
78
67
|
|
|
79
|
-
|
|
68
|
+
## 使用方法
|
|
80
69
|
|
|
81
|
-
|
|
70
|
+
```typescript
|
|
71
|
+
import { items, defaultCatalog } from '@burger-editor/blocks';
|
|
82
72
|
|
|
83
|
-
|
|
73
|
+
// アイテムの使用
|
|
74
|
+
const wysiwygItem = items.wysiwyg;
|
|
84
75
|
|
|
85
|
-
|
|
76
|
+
// ブロックカタログの使用
|
|
77
|
+
const catalog = defaultCatalog;
|
|
78
|
+
```
|