@riebeckite/plugin-code-tabs 0.0.31 → 0.0.33

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 CHANGED
@@ -46,6 +46,18 @@ console.log("Hello");
46
46
 
47
47
  Regular code blocks without `tab="..."` are not changed.
48
48
 
49
+ ## Live example
50
+
51
+ The two adjacent blocks below form one tab group.
52
+
53
+ ~~~ts tab="TypeScript"
54
+ const greeting: string = "Hello";
55
+ ~~~
56
+
57
+ ~~~js tab="JavaScript"
58
+ const greeting = "Hello";
59
+ ~~~
60
+
49
61
  ## Grouping rules
50
62
 
51
63
  Adjacent `tab="..."` code blocks become one group. Any other content ends the
package/README_ja.md CHANGED
@@ -32,7 +32,19 @@ console.log("Hello");
32
32
  ```
33
33
  ````
34
34
 
35
- `tab` を持つコードブロックが連続している間だけ、一つのタブグループになります。段落、見出し、画像などが間に入ると別のグループです。`tab` のないコードブロックは変更しません。
35
+ `tab` を持つコードブロックが連続している間だけ、1 つのタブグループになります。段落、見出し、画像などが間に入ると別のグループです。`tab` のないコードブロックは変更しません。
36
+
37
+ ## 実行例
38
+
39
+ 隣接する次の 2 つのブロックは、1 つのタブグループになります。
40
+
41
+ ~~~ts tab="TypeScript"
42
+ const greeting: string = "Hello";
43
+ ~~~
44
+
45
+ ~~~js tab="JavaScript"
46
+ const greeting = "Hello";
47
+ ~~~
36
48
 
37
49
  ## オプションとアクセシビリティ
38
50
 
@@ -47,7 +59,7 @@ console.log("Hello");
47
59
  ## 公開 API
48
60
 
49
61
  - `codeTabs(options?)`:プラグインファクトリ
50
- - `rehypeCodeTabs(options?)`:Rehype 変換
62
+ - `rehypeCodeTabs(options?)`:rehype 変換
51
63
  - `initCodeTabs(options?)`:ブラウザ初期化関数
52
64
  - `CodeTabsOptions`、`CodeTabsClientOptions`:型
53
65
 
package/dist/index.js CHANGED
@@ -118,7 +118,8 @@ function buildTabGroup(group, options, groupId) {
118
118
  ariaLabelledBy: `${groupId}-tab-${index}`,
119
119
  dataCodeTabsPanel: "true",
120
120
  dataCodeTabsLabel: tab.label,
121
- dataActive: index === 0 ? "true" : "false"
121
+ dataActive: index === 0 ? "true" : "false",
122
+ hidden: index !== 0
122
123
  },
123
124
  [tab.node]
124
125
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-code-tabs",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "./style.css": "./style.css"
22
22
  },
23
23
  "dependencies": {
24
- "@riebeckite/core": "0.0.31"
24
+ "@riebeckite/core": "0.0.33"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"