@riebeckite/plugin-shortcodes 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
@@ -39,7 +39,7 @@ Styles ship in `style.css`.
39
39
 
40
40
  ::kbd[Ctrl+S]
41
41
 
42
- ::youtube[id=dQw4w9WgXcQ]
42
+ ::youtube{id=dQw4w9WgXcQ}
43
43
 
44
44
  :::note[Heads up]{type=warning}
45
45
  Container bodies support **Markdown**.
@@ -200,30 +200,30 @@ Display images with optional captions and dimensions using semantic `<figure>` m
200
200
  Embed YouTube videos using the privacy-enhanced `youtube-nocookie.com` domain.
201
201
 
202
202
  ```md
203
- ::youtube[id=dQw4w9WgXcQ]
203
+ ::youtube{id=dQw4w9WgXcQ}
204
204
  ```
205
205
 
206
- ::youtube[id=dQw4w9WgXcQ]
206
+ ::youtube{id=dQw4w9WgXcQ}
207
207
 
208
208
  ### Vimeo
209
209
 
210
210
  Embed Vimeo videos with the `dnt=1` privacy parameter.
211
211
 
212
212
  ```md
213
- ::vimeo[id=76979871]
213
+ ::vimeo{id=76979871}
214
214
  ```
215
215
 
216
- ::vimeo[id=76979871]
216
+ ::vimeo{id=76979871}
217
217
 
218
218
  ### GitHub Gist
219
219
 
220
220
  Embed GitHub Gist code snippets directly into a page. A fallback link is provided for environments where JavaScript is disabled.
221
221
 
222
222
  ```md
223
- ::gist{user=octocat id=aa5a315d61ae9438b18d}
223
+ ::gist{user=octocat id=6cad326836d38bd3a7ae}
224
224
  ```
225
225
 
226
- ::gist{user=octocat id=aa5a315d61ae9438b18d}
226
+ ::gist{user=octocat id=6cad326836d38bd3a7ae}
227
227
 
228
228
  ### Link Card
229
229
 
@@ -282,7 +282,7 @@ input themselves — `escapeHtml` and `escapeHtmlAttribute` are re-exported from
282
282
 
283
283
  ## Exports
284
284
 
285
- - `shortcodes(options?)` / `shortcodesPlugin` — plugin factory
285
+ - `shortcodes(options?)` / `shortcodes` — plugin factory
286
286
  - `remarkShortcodes(options?)` — standalone remark transform
287
287
  - `renderShortcode(request, options)` — render a single shortcode
288
288
  - `resolveShortcodeOptions(options?)` — normalize options
package/README_ja.md CHANGED
@@ -38,7 +38,7 @@ export default defineConfig({
38
38
 
39
39
  ::kbd[Ctrl+S]
40
40
 
41
- ::youtube[id=dQw4w9WgXcQ]
41
+ ::youtube{id=dQw4w9WgXcQ}
42
42
 
43
43
  :::note[補足]{type=warning}
44
44
  コンテナの本文では **Markdown** が使えます。
@@ -76,7 +76,7 @@ export default defineConfig({
76
76
 
77
77
  ## 実際のレンダリング
78
78
 
79
- 以下の例では、組み込みショートコード全12種類の使い方を紹介します。各例では Markdown の記法と、その直下にショートコード自体を記載しています。Shortcodes プラグインが有効な場合、実際のレンダリング結果を確認できます。
79
+ 以下の例では、組み込みショートコード 12 種類の使い方を紹介します。各例では Markdown の記法を示し、その直下にショートコード自体を置いています。Shortcodes プラグインが有効な場合、実際のレンダリング結果を確認できます。
80
80
 
81
81
  ### バッジ(badge)
82
82
 
@@ -199,30 +199,30 @@ export default defineConfig({
199
199
  プライバシーに配慮した `youtube-nocookie.com` ドメインを使用して、YouTube 動画を埋め込めます。
200
200
 
201
201
  ```md
202
- ::youtube[id=dQw4w9WgXcQ]
202
+ ::youtube{id=dQw4w9WgXcQ}
203
203
  ```
204
204
 
205
- ::youtube[id=dQw4w9WgXcQ]
205
+ ::youtube{id=dQw4w9WgXcQ}
206
206
 
207
207
  ### Vimeo
208
208
 
209
209
  `dnt=1` プライバシーパラメータを使用して、Vimeo 動画を埋め込めます。
210
210
 
211
211
  ```md
212
- ::vimeo[id=76979871]
212
+ ::vimeo{id=76979871}
213
213
  ```
214
214
 
215
- ::vimeo[id=76979871]
215
+ ::vimeo{id=76979871}
216
216
 
217
217
  ### GitHub Gist
218
218
 
219
219
  GitHub Gist のコードスニペットをページ内に直接埋め込めます。JavaScript が無効な環境では、代替リンクが提供されます。
220
220
 
221
221
  ```md
222
- ::gist{user=octocat id=aa5a315d61ae9438b18d}
222
+ ::gist{user=octocat id=6cad326836d38bd3a7ae}
223
223
  ```
224
224
 
225
- ::gist{user=octocat id=aa5a315d61ae9438b18d}
225
+ ::gist{user=octocat id=6cad326836d38bd3a7ae}
226
226
 
227
227
  ### リンクカード(link-card)
228
228
 
@@ -244,7 +244,7 @@ GitHub Gist のコードスニペットをページ内に直接埋め込めま
244
244
 
245
245
  ::file[サンプルPDF]{url="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" name="sample.pdf" size="13 KB"}
246
246
 
247
- 上記のコードブロックは元の Markdown 記法を示しています。その直下のショートコードは、Shortcodes プラグインを有効にした Riebeckite で処理された際の、実際のレンダリングを確認するための例です。
247
+ 上のコードブロックは元の Markdown 記法です。その直下のショートコードは、Shortcodes プラグインを有効にした Riebeckite が実際にどう描画するかを示す例です。
248
248
 
249
249
  ## オプション
250
250
 
@@ -281,7 +281,7 @@ container }` を受け取り、文字列を返します。独自レンダラー
281
281
 
282
282
  ## エクスポート
283
283
 
284
- - `shortcodes(options?)` / `shortcodesPlugin`:プラグインファクトリ
284
+ - `shortcodes(options?)` / `shortcodes`:プラグインファクトリ
285
285
  - `remarkShortcodes(options?)`:単体で使える remark トランスフォーム
286
286
  - `renderShortcode(request, options)`:単一ショートコードの描画
287
287
  - `resolveShortcodeOptions(options?)`:オプションの正規化
package/dist/index.d.ts CHANGED
@@ -5,4 +5,3 @@ import type { ShortcodeOptions } from "./src/types.js";
5
5
  export type { DirectiveNode, RemarkShortcodesOptions, ResolvedShortcodeOptions, ShortcodeAttributes, ShortcodeOptions, ShortcodeRenderer, ShortcodeRenderInput, ShortcodeRenderRequest, } from "./src/types.js";
6
6
  export { builtinInlineShortcodes, builtinShortcodeNames, builtinShortcodes, containsShortcodeDirective, createShortcodeRenderContext, DEFAULT_SHORTCODE_CLASS_NAME, DIAGNOSTIC_INLINE_UNSUPPORTED, DIAGNOSTIC_INVALID, DIAGNOSTIC_UNKNOWN, isInlineShortcode, remarkShortcodes, renderShortcode, resolveShortcodeOptions, SHORTCODE_CHILDREN_MARKER, SHORTCODES_SOURCE, };
7
7
  export declare function shortcodes(options?: ShortcodeOptions): import("@riebeckite/core").RiebeckitePlugin<ShortcodeOptions>;
8
- export declare const shortcodesPlugin: typeof shortcodes;
package/dist/index.js CHANGED
@@ -622,7 +622,6 @@ function shortcodes(options = {}) {
622
622
  ]
623
623
  });
624
624
  }
625
- var shortcodesPlugin = shortcodes;
626
625
  export {
627
626
  DEFAULT_SHORTCODE_CLASS_NAME,
628
627
  DIAGNOSTIC_INLINE_UNSUPPORTED,
@@ -639,6 +638,5 @@ export {
639
638
  remarkShortcodes,
640
639
  renderShortcode,
641
640
  resolveShortcodeOptions,
642
- shortcodes,
643
- shortcodesPlugin
641
+ shortcodes
644
642
  };
@@ -59,9 +59,10 @@ export type RemarkShortcodesOptions = ShortcodeOptions & {
59
59
  contentIndex?: Map<string, string>;
60
60
  contentSource?: ContentSource;
61
61
  };
62
- export type DirectiveName = "textDirective" | "leafDirective" | "containerDirective";
62
+ type DirectiveName = "textDirective" | "leafDirective" | "containerDirective";
63
63
  export type DirectiveNode = Parent & {
64
64
  type: DirectiveName;
65
65
  name: string;
66
66
  attributes?: Record<string, unknown>;
67
67
  };
68
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-shortcodes",
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",
@@ -15,13 +15,13 @@
15
15
  "./style.css": "./style.css"
16
16
  },
17
17
  "dependencies": {
18
+ "@riebeckite/core": "0.0.33",
18
19
  "@types/mdast": "^4.0.4",
19
- "unist-util-visit": "^5.1.0",
20
- "@riebeckite/core": "0.0.31"
20
+ "unist-util-visit": "^5.1.0"
21
21
  },
22
22
  "devDependencies": {
23
- "tsx": "^4.22.4",
24
- "@riebeckite/test": "0.0.31"
23
+ "@riebeckite/test": "0.0.33",
24
+ "tsx": "^4.22.4"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"