@riebeckite/plugin-plantuml 0.0.32 → 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
@@ -20,7 +20,7 @@ export default defineConfig({
20
20
  });
21
21
  ```
22
22
 
23
- `plantuml` is also exported under the alias `plantumlPlugin`.
23
+ `plantuml` is also exported under the alias `plantuml`.
24
24
 
25
25
  ## Live example
26
26
 
@@ -100,7 +100,7 @@ Encoding failures are reported with `file.message(...)`. Diagnostics use
100
100
  ## Exports
101
101
 
102
102
  - `plantuml(options?)` — plugin factory
103
- - `plantumlPlugin` — alias of `plantuml`
103
+ - `plantuml` — alias of `plantuml`
104
104
  - Types: `PlantumlOptions`, `PlantumlFormat`
105
105
 
106
106
  ## See also
package/README_ja.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  [English](./README.md)
8
8
 
9
- ## 設定する
9
+ ## 使い方
10
10
 
11
11
  ```ts
12
12
  import { defineConfig } from "@riebeckite/core";
@@ -18,7 +18,7 @@ export default defineConfig({
18
18
  });
19
19
  ```
20
20
 
21
- `plantuml` は `plantumlPlugin` という別名でもエクスポートしています。
21
+ `plantuml` は `plantuml` という別名でもエクスポートしています。
22
22
 
23
23
  ## 実行例
24
24
 
@@ -35,7 +35,7 @@ Bob --> Alice: Hi
35
35
  ```
36
36
  ````
37
37
 
38
- #### 実行例
38
+ #### 描画結果
39
39
 
40
40
  ```plantuml
41
41
  @startuml
@@ -71,7 +71,7 @@ Bob --> Alice: Hi
71
71
 
72
72
  ## 出力される HTML / CSS
73
73
 
74
- プラグインは `style.css` を公開し、`rb-plantuml`、`rb-plantuml__frame`、`rb-plantuml__image`、`rb-plantuml__caption`、`rb-plantuml__fallback` という安定したクラス名で出力します。CSS 変数 `--rb-color-*` があればそれに追従し、`html[data-theme="dark"]`、または `data-theme` が無いときの `prefers-color-scheme: dark` で暗色に切り替わります。
74
+ プラグインは `style.css` を公開し、`rb-plantuml`、`rb-plantuml__frame`、`rb-plantuml__image`、`rb-plantuml__caption`、`rb-plantuml__fallback` という安定したクラス名で出力します。CSS 変数 `--rb-color-*` があればそれに追従し、`html[data-theme="dark"]`、または `data-theme` が無いときの `prefers-color-scheme: dark` で暗い配色に切り替わります。
75
75
 
76
76
  ## 診断
77
77
 
@@ -86,7 +86,7 @@ Bob --> Alice: Hi
86
86
  ## 主なエクスポート
87
87
 
88
88
  - `plantuml(options?)`: プラグインを作成する
89
- - `plantumlPlugin`: `plantuml` の別名
89
+ - `plantuml`: `plantuml` の別名
90
90
  - 型: `PlantumlOptions`、`PlantumlFormat`
91
91
 
92
92
  ## 関連資料
package/dist/index.d.ts CHANGED
@@ -7,4 +7,3 @@ export type { PlantumlFormat, PlantumlOptions } from "./src/types.js";
7
7
  * required while building and no client bundle is shipped.
8
8
  */
9
9
  export declare function plantuml(options?: PlantumlOptions): import("@riebeckite/core").RiebeckitePlugin<PlantumlOptions>;
10
- export declare const plantumlPlugin: typeof plantuml;
package/dist/index.js CHANGED
@@ -37,8 +37,7 @@ var init_hast = __esm({
37
37
  // src/plantuml-encoder.ts
38
38
  var plantuml_encoder_exports = {};
39
39
  __export(plantuml_encoder_exports, {
40
- encodePlantuml: () => encodePlantuml,
41
- encodePlantumlBase64: () => encodePlantumlBase64
40
+ encodePlantuml: () => encodePlantuml
42
41
  });
43
42
  async function encodePlantuml(source) {
44
43
  const { deflateRawSync } = await import("node:zlib");
@@ -143,10 +142,14 @@ function buildFigure(input) {
143
142
  );
144
143
  if (input.fallback) {
145
144
  children.push(
146
- element("details", { className: "rb-plantuml__fallback" }, [
147
- element("summary", {}, [text("Diagram source")]),
148
- element("pre", {}, [element("code", {}, [text(input.source)])])
149
- ])
145
+ element(
146
+ "details",
147
+ { className: "rb-plantuml__fallback rb-source-fallback" },
148
+ [
149
+ element("summary", {}, [text("Diagram source")]),
150
+ element("pre", {}, [element("code", {}, [text(input.source)])])
151
+ ]
152
+ )
150
153
  );
151
154
  }
152
155
  if (input.caption) {
@@ -240,7 +243,6 @@ function plantuml(options = {}) {
240
243
  ]
241
244
  });
242
245
  }
243
- var plantumlPlugin = plantuml;
244
246
  function validatePlantumlOptions(options) {
245
247
  if (!options) return [];
246
248
  const issues = [];
@@ -271,6 +273,5 @@ function rehypePlantumlLazy(options = {}) {
271
273
  };
272
274
  }
273
275
  export {
274
- plantuml,
275
- plantumlPlugin
276
+ plantuml
276
277
  };
@@ -32,9 +32,3 @@
32
32
  */
33
33
  /** Encodes PlantUML source into the server URL path segment. */
34
34
  export declare function encodePlantuml(source: string): Promise<string>;
35
- /**
36
- * Re-encodes raw DEFLATE bytes with PlantUML's custom base64 alphabet.
37
- * Exposed separately from the compression step so it can be reasoned about
38
- * (and tested) without a Node runtime.
39
- */
40
- export declare function encodePlantumlBase64(bytes: Uint8Array): string;
@@ -36,7 +36,7 @@ export type TextNode = {
36
36
  type: "text";
37
37
  value: string;
38
38
  };
39
- export type RawNode = {
39
+ type RawNode = {
40
40
  type: "raw";
41
41
  value: string;
42
42
  };
@@ -44,3 +44,4 @@ export type HastNode = ElementNode | TextNode | RawNode | {
44
44
  type: string;
45
45
  [key: string]: unknown;
46
46
  };
47
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-plantuml",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,8 +15,8 @@
15
15
  "./style.css": "./style.css"
16
16
  },
17
17
  "dependencies": {
18
- "@riebeckite/core": "0.0.32",
19
- "@riebeckite/diagram": "0.0.32"
18
+ "@riebeckite/core": "0.0.33",
19
+ "@riebeckite/diagram": "0.0.33"
20
20
  },
21
21
  "publishConfig": {
22
22
  "access": "public"
package/style.css CHANGED
@@ -41,29 +41,6 @@
41
41
  font-size: 0.875rem;
42
42
  }
43
43
 
44
- .rb-plantuml__fallback {
45
- align-self: stretch;
46
- border-top: 1px solid var(--rb-plantuml-rule);
47
- color: var(--rb-plantuml-muted);
48
- font-size: 0.8125rem;
49
- text-align: left;
50
- }
51
-
52
- .rb-plantuml__fallback summary {
53
- cursor: pointer;
54
- padding: 0.5rem 0;
55
- }
56
-
57
- .rb-plantuml__fallback pre {
58
- overflow: auto;
59
- margin: 0;
60
- padding: 0.75rem;
61
- border-top: 1px solid var(--rb-plantuml-rule);
62
- color: var(--rb-plantuml-ink);
63
- background: color-mix(in srgb, var(--rb-plantuml-ink) 6%, transparent);
64
- text-align: left;
65
- }
66
-
67
44
  .rb-plantuml__frame:empty::before {
68
45
  content: "Diagram could not be rendered.";
69
46
  color: var(--rb-plantuml-muted);