fontisan 0.2.13 → 0.2.16

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.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +56 -196
  3. data/Gemfile +1 -1
  4. data/docs/.gitignore +17 -0
  5. data/docs/.vitepress/config.ts +317 -0
  6. data/docs/.vitepress/theme/components/ApiMethod.vue +127 -0
  7. data/docs/.vitepress/theme/components/Badge.vue +51 -0
  8. data/docs/.vitepress/theme/components/FeatureComparison.vue +87 -0
  9. data/docs/.vitepress/theme/components/HeroCodeBlock.vue +98 -0
  10. data/docs/.vitepress/theme/components/WithinHero.vue +30 -0
  11. data/docs/.vitepress/theme/index.ts +22 -0
  12. data/docs/.vitepress/theme/style.css +330 -0
  13. data/docs/api/conversion-options.md +141 -0
  14. data/docs/api/converters/curve-converter.md +34 -0
  15. data/docs/api/converters/hint-converter.md +34 -0
  16. data/docs/api/converters/outline-converter.md +27 -0
  17. data/docs/api/font-loader.md +111 -0
  18. data/docs/api/font-writer.md +103 -0
  19. data/docs/api/index.md +79 -0
  20. data/docs/api/models/glyph-accessor.md +43 -0
  21. data/docs/api/models/glyph.md +40 -0
  22. data/docs/api/models/table-analyzer.md +35 -0
  23. data/docs/api/sfnt-font.md +53 -0
  24. data/docs/api/type1-font.md +43 -0
  25. data/docs/api/validators/font-validator.md +31 -0
  26. data/docs/api/validators/helper.md +36 -0
  27. data/docs/api/validators/profile.md +39 -0
  28. data/docs/cli/convert.md +87 -0
  29. data/docs/cli/dump-table.md +110 -0
  30. data/docs/cli/export.md +176 -0
  31. data/docs/cli/features.md +124 -0
  32. data/docs/cli/glyphs.md +90 -0
  33. data/docs/cli/index.md +208 -0
  34. data/docs/cli/info.md +254 -0
  35. data/docs/cli/instance.md +122 -0
  36. data/docs/cli/ls.md +95 -0
  37. data/docs/cli/optical-size.md +94 -0
  38. data/docs/cli/pack.md +125 -0
  39. data/docs/cli/scripts.md +105 -0
  40. data/docs/cli/subset.md +39 -0
  41. data/docs/cli/tables.md +84 -0
  42. data/docs/cli/unicode.md +101 -0
  43. data/docs/cli/validate.md +48 -0
  44. data/docs/cli/variable.md +126 -0
  45. data/docs/cli/version.md +46 -0
  46. data/docs/guide/cli/convert.md +108 -0
  47. data/docs/guide/cli/export.md +138 -0
  48. data/docs/guide/cli/index.md +99 -0
  49. data/docs/guide/cli/info.md +144 -0
  50. data/docs/guide/cli/pack.md +155 -0
  51. data/docs/guide/cli/subset.md +118 -0
  52. data/docs/guide/cli/validate.md +139 -0
  53. data/docs/guide/color-fonts/bitmaps.md +177 -0
  54. data/docs/guide/color-fonts/colr-cpal.md +175 -0
  55. data/docs/guide/color-fonts/index.md +140 -0
  56. data/docs/guide/color-fonts/svg.md +154 -0
  57. data/docs/guide/color.md +51 -0
  58. data/docs/guide/comparisons/font-validator.md +222 -0
  59. data/docs/guide/comparisons/fonttools.md +200 -0
  60. data/docs/guide/comparisons/index.md +83 -0
  61. data/docs/guide/comparisons/lcdf-typetools.md +205 -0
  62. data/docs/guide/contributing.md +279 -0
  63. data/docs/guide/conversion/collections.md +251 -0
  64. data/docs/guide/conversion/curves.md +246 -0
  65. data/docs/guide/conversion/index.md +157 -0
  66. data/docs/guide/conversion/options.md +251 -0
  67. data/docs/guide/conversion/ttf-otf.md +184 -0
  68. data/docs/guide/conversion/type1.md +208 -0
  69. data/docs/guide/conversion/web.md +240 -0
  70. data/docs/guide/conversion.md +39 -0
  71. data/docs/guide/formats/collections.md +147 -0
  72. data/docs/guide/formats/dfont.md +99 -0
  73. data/docs/guide/formats/index.md +65 -0
  74. data/docs/guide/formats/otf.md +103 -0
  75. data/docs/guide/formats/svg.md +97 -0
  76. data/docs/guide/formats/ttf.md +105 -0
  77. data/docs/guide/formats/type1.md +118 -0
  78. data/docs/guide/formats/woff.md +115 -0
  79. data/docs/guide/hinting/autohint.md +141 -0
  80. data/docs/guide/hinting/conversion.md +161 -0
  81. data/docs/guide/hinting/index.md +86 -0
  82. data/docs/guide/hinting/postscript.md +149 -0
  83. data/docs/guide/hinting/truetype.md +135 -0
  84. data/docs/guide/hinting.md +44 -0
  85. data/docs/guide/index.md +152 -0
  86. data/docs/guide/installation.md +116 -0
  87. data/docs/guide/migrations/extract-ttc.md +549 -0
  88. data/docs/guide/migrations/font-validator.md +260 -0
  89. data/docs/guide/migrations/fonttools.md +208 -0
  90. data/docs/guide/migrations/index.md +64 -0
  91. data/docs/guide/migrations/otfinfo.md +197 -0
  92. data/docs/guide/quick-start.md +204 -0
  93. data/docs/guide/type1.md +58 -0
  94. data/docs/guide/universal-outline.md +151 -0
  95. data/docs/guide/validation/custom.md +195 -0
  96. data/docs/guide/validation/helpers.md +188 -0
  97. data/docs/guide/validation/index.md +132 -0
  98. data/docs/guide/validation/profiles.md +156 -0
  99. data/docs/guide/validation.md +47 -0
  100. data/docs/guide/variable-fonts/advanced.md +231 -0
  101. data/docs/guide/variable-fonts/axes.md +209 -0
  102. data/docs/guide/variable-fonts/conversion.md +197 -0
  103. data/docs/guide/variable-fonts/index.md +84 -0
  104. data/docs/guide/variable-fonts/instances.md +187 -0
  105. data/docs/guide/variable-fonts/named-instances.md +194 -0
  106. data/docs/guide/variable-fonts/static.md +168 -0
  107. data/docs/guide/variable.md +58 -0
  108. data/docs/guide/woff.md +59 -0
  109. data/docs/index.md +136 -0
  110. data/docs/lychee.toml +37 -0
  111. data/docs/package-lock.json +2560 -0
  112. data/docs/package.json +15 -0
  113. data/docs/public/apple-touch-icon.png +0 -0
  114. data/docs/public/favicon-96x96.png +0 -0
  115. data/docs/public/favicon.ico +0 -0
  116. data/docs/public/favicon.svg +1 -0
  117. data/docs/public/logo-full.svg +1 -0
  118. data/docs/public/logo.svg +1 -0
  119. data/docs/public/site.webmanifest +21 -0
  120. data/docs/public/web-app-manifest-192x192.png +0 -0
  121. data/docs/public/web-app-manifest-512x512.png +0 -0
  122. data/fontisan.gemspec +1 -1
  123. data/lib/fontisan/commands/features_command.rb +0 -1
  124. data/lib/fontisan/commands/info_command.rb +5 -5
  125. data/lib/fontisan/commands/scripts_command.rb +0 -1
  126. data/lib/fontisan/converters/format_converter.rb +2 -1
  127. data/lib/fontisan/converters/type1_converter.rb +65 -60
  128. data/lib/fontisan/hints/hint_converter.rb +2 -1
  129. data/lib/fontisan/loading_modes.rb +0 -2
  130. data/lib/fontisan/open_type_font.rb +0 -40
  131. data/lib/fontisan/sfnt_font.rb +41 -22
  132. data/lib/fontisan/tables/glyf/compound_glyph.rb +0 -1
  133. data/lib/fontisan/true_type_collection.rb +8 -8
  134. data/lib/fontisan/true_type_font.rb +1 -59
  135. data/lib/fontisan/type1/afm_parser.rb +2 -1
  136. data/lib/fontisan/type1/cff_to_type1_converter.rb +24 -19
  137. data/lib/fontisan/type1/private_dict.rb +28 -7
  138. data/lib/fontisan/type1/seac_expander.rb +22 -17
  139. data/lib/fontisan/variable/delta_applicator.rb +3 -3
  140. data/lib/fontisan/variation/optimizer.rb +0 -1
  141. data/lib/fontisan/version.rb +1 -1
  142. data/lib/fontisan/woff2_font.rb +2 -2
  143. data/lib/fontisan/woff_font.rb +3 -3
  144. data/lib/fontisan.rb +3 -2
  145. metadata +122 -4
@@ -0,0 +1,317 @@
1
+ import { defineConfig } from "vitepress";
2
+
3
+ // https://vitepress.dev/reference/site-config
4
+ export default defineConfig({
5
+ lang: "en-US",
6
+
7
+ // https://vitepress.dev/guide/routing#generating-clean-url
8
+ cleanUrls: true,
9
+
10
+ title: "Fontisan",
11
+ description:
12
+ "The most comprehensive font processing library for Ruby — 100% Pure Ruby, no Python, no C++, no C# dependencies.",
13
+
14
+ lastUpdated: true,
15
+
16
+ // Base path for deployment (e.g., /fontisan/ for fontist.org/fontisan/)
17
+ base: process.env.BASE_PATH || "/fontisan/",
18
+
19
+ head: [
20
+ [
21
+ "link",
22
+ { rel: "icon", type: "image/png", href: "/favicon-96x96.png", sizes: "96x96" },
23
+ ],
24
+ ["link", { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }],
25
+ ["link", { rel: "shortcut icon", href: "/favicon.ico" }],
26
+ [
27
+ "link",
28
+ { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" },
29
+ ],
30
+ ["link", { rel: "manifest", href: "/site.webmanifest" }],
31
+ ["meta", { property: "og:type", content: "website" }],
32
+ ["meta", { property: "og:title", content: "Fontisan" }],
33
+ [
34
+ "meta",
35
+ {
36
+ property: "og:description",
37
+ content:
38
+ "The most comprehensive font processing library for Ruby — 100% Pure Ruby.",
39
+ },
40
+ ],
41
+ ["meta", { property: "og:image", content: "/logo-full.svg" }],
42
+ ["meta", { name: "twitter:card", content: "summary_large_image" }],
43
+ ],
44
+
45
+ // https://vitepress.dev/reference/default-theme-config
46
+ themeConfig: {
47
+ logo: "/logo-full.svg",
48
+ siteTitle: false,
49
+
50
+ // Local search with MiniSearch
51
+ search: {
52
+ provider: "local",
53
+ options: {
54
+ detailedView: true,
55
+ miniSearch: {
56
+ searchOptions: {
57
+ fuzzy: 0.2,
58
+ prefix: true,
59
+ boost: { title: 4, text: 2, titles: 1 },
60
+ },
61
+ },
62
+ },
63
+ },
64
+
65
+ // Top navigation (minimal: 4 items)
66
+ nav: [
67
+ { text: "← Fontist.org", link: "https://www.fontist.org" },
68
+ { text: "Guide", link: "/guide/" },
69
+ { text: "CLI", link: "/cli/" },
70
+ { text: "API", link: "/api/" },
71
+ { text: "Fontist", link: "https://www.fontist.org/fontist/", target: "_self" },
72
+ { text: "Formulas", link: "https://www.fontist.org/formulas/", target: "_self" },
73
+ ],
74
+
75
+ // Sidebar configuration
76
+ sidebar: {
77
+ "/guide/": [
78
+ {
79
+ text: "Getting Started",
80
+ items: [
81
+ { text: "Introduction", link: "/guide/" },
82
+ { text: "Installation", link: "/guide/installation" },
83
+ { text: "Quick Start", link: "/guide/quick-start" },
84
+ ],
85
+ },
86
+ {
87
+ text: "CLI Reference",
88
+ collapsed: true,
89
+ items: [
90
+ { text: "Overview", link: "/guide/cli/" },
91
+ { text: "convert", link: "/guide/cli/convert" },
92
+ { text: "info", link: "/guide/cli/info" },
93
+ { text: "validate", link: "/guide/cli/validate" },
94
+ { text: "subset", link: "/guide/cli/subset" },
95
+ { text: "pack/unpack", link: "/guide/cli/pack" },
96
+ { text: "export", link: "/guide/cli/export" },
97
+ ],
98
+ },
99
+ {
100
+ text: "Font Formats",
101
+ collapsed: true,
102
+ items: [
103
+ { text: "Overview", link: "/guide/formats/" },
104
+ { text: "TrueType (TTF)", link: "/guide/formats/ttf" },
105
+ { text: "OpenType (OTF)", link: "/guide/formats/otf" },
106
+ { text: "Type 1 (PFB/PFA)", link: "/guide/formats/type1" },
107
+ { text: "WOFF & WOFF2", link: "/guide/formats/woff" },
108
+ { text: "Collections (TTC/OTC)", link: "/guide/formats/collections" },
109
+ { text: "Apple dfont", link: "/guide/formats/dfont" },
110
+ { text: "SVG Fonts", link: "/guide/formats/svg" },
111
+ ],
112
+ },
113
+ {
114
+ text: "Conversion Guide",
115
+ collapsed: true,
116
+ items: [
117
+ { text: "Overview", link: "/guide/conversion/" },
118
+ { text: "TTF ↔ OTF", link: "/guide/conversion/ttf-otf" },
119
+ { text: "Type 1 → Modern", link: "/guide/conversion/type1" },
120
+ { text: "Web Formats", link: "/guide/conversion/web" },
121
+ { text: "Collections", link: "/guide/conversion/collections" },
122
+ { text: "Curve Conversion", link: "/guide/conversion/curves" },
123
+ { text: "Options Reference", link: "/guide/conversion/options" },
124
+ ],
125
+ },
126
+ {
127
+ text: "Validation",
128
+ collapsed: true,
129
+ items: [
130
+ { text: "Overview", link: "/guide/validation/" },
131
+ { text: "Validation Profiles", link: "/guide/validation/profiles" },
132
+ { text: "Validation Helpers", link: "/guide/validation/helpers" },
133
+ { text: "Custom Validators", link: "/guide/validation/custom" },
134
+ ],
135
+ },
136
+ {
137
+ text: "Variable Fonts",
138
+ collapsed: true,
139
+ items: [
140
+ { text: "Overview", link: "/guide/variable-fonts/" },
141
+ { text: "Axes & Instances", link: "/guide/variable-fonts/axes" },
142
+ { text: "Instance Generation", link: "/guide/variable-fonts/instances" },
143
+ { text: "Format Conversion", link: "/guide/variable-fonts/conversion" },
144
+ { text: "Named Instances", link: "/guide/variable-fonts/named-instances" },
145
+ { text: "Static Fonts", link: "/guide/variable-fonts/static" },
146
+ { text: "Advanced Topics", link: "/guide/variable-fonts/advanced" },
147
+ ],
148
+ },
149
+ {
150
+ text: "Font Hinting",
151
+ collapsed: true,
152
+ items: [
153
+ { text: "Overview", link: "/guide/hinting/" },
154
+ { text: "TrueType Hinting", link: "/guide/hinting/truetype" },
155
+ { text: "PostScript Hinting", link: "/guide/hinting/postscript" },
156
+ { text: "Hint Conversion", link: "/guide/hinting/conversion" },
157
+ { text: "Autohint", link: "/guide/hinting/autohint" },
158
+ ],
159
+ },
160
+ {
161
+ text: "Color Fonts",
162
+ collapsed: true,
163
+ items: [
164
+ { text: "Overview", link: "/guide/color-fonts/" },
165
+ { text: "COLR/CPAL", link: "/guide/color-fonts/colr-cpal" },
166
+ { text: "sbix & CBDT", link: "/guide/color-fonts/bitmaps" },
167
+ { text: "SVG Color", link: "/guide/color-fonts/svg" },
168
+ ],
169
+ },
170
+ {
171
+ text: "Migration Guides",
172
+ collapsed: true,
173
+ items: [
174
+ { text: "Overview", link: "/guide/migrations/" },
175
+ { text: "From fonttools (Python)", link: "/guide/migrations/fonttools" },
176
+ { text: "From extract_ttc", link: "/guide/migrations/extract-ttc" },
177
+ { text: "From otfinfo", link: "/guide/migrations/otfinfo" },
178
+ { text: "From Font-Validator", link: "/guide/migrations/font-validator" },
179
+ ],
180
+ },
181
+ {
182
+ text: "Feature Comparisons",
183
+ collapsed: true,
184
+ items: [
185
+ { text: "Overview", link: "/guide/comparisons/" },
186
+ { text: "vs fonttools", link: "/guide/comparisons/fonttools" },
187
+ { text: "vs lcdf-typetools", link: "/guide/comparisons/lcdf-typetools" },
188
+ { text: "vs Font-Validator", link: "/guide/comparisons/font-validator" },
189
+ ],
190
+ },
191
+ {
192
+ text: "Advanced Topics",
193
+ collapsed: true,
194
+ items: [
195
+ { text: "Universal Outline Model", link: "/guide/universal-outline" },
196
+ ],
197
+ },
198
+ {
199
+ text: "Contributing",
200
+ collapsed: true,
201
+ items: [
202
+ { text: "Contributing Guide", link: "/guide/contributing" },
203
+ ],
204
+ },
205
+ ],
206
+ "/cli/": [
207
+ {
208
+ text: "CLI Reference",
209
+ items: [
210
+ { text: "Overview", link: "/cli/" },
211
+ ],
212
+ },
213
+ {
214
+ text: "Font Information",
215
+ collapsed: true,
216
+ items: [
217
+ { text: "info", link: "/cli/info" },
218
+ { text: "ls", link: "/cli/ls" },
219
+ { text: "tables", link: "/cli/tables" },
220
+ { text: "glyphs", link: "/cli/glyphs" },
221
+ { text: "unicode", link: "/cli/unicode" },
222
+ { text: "scripts", link: "/cli/scripts" },
223
+ { text: "features", link: "/cli/features" },
224
+ { text: "variable", link: "/cli/variable" },
225
+ { text: "optical-size", link: "/cli/optical-size" },
226
+ ],
227
+ },
228
+ {
229
+ text: "Font Operations",
230
+ collapsed: true,
231
+ items: [
232
+ { text: "convert", link: "/cli/convert" },
233
+ { text: "subset", link: "/cli/subset" },
234
+ { text: "validate", link: "/cli/validate" },
235
+ { text: "instance", link: "/cli/instance" },
236
+ { text: "export", link: "/cli/export" },
237
+ { text: "dump-table", link: "/cli/dump-table" },
238
+ ],
239
+ },
240
+ {
241
+ text: "Collection Operations",
242
+ collapsed: true,
243
+ items: [
244
+ { text: "pack/unpack", link: "/cli/pack" },
245
+ ],
246
+ },
247
+ {
248
+ text: "Utilities",
249
+ collapsed: true,
250
+ items: [
251
+ { text: "version", link: "/cli/version" },
252
+ ],
253
+ },
254
+ ],
255
+ "/api/": [
256
+ {
257
+ text: "API Reference",
258
+ items: [
259
+ { text: "Overview", link: "/api/" },
260
+ ],
261
+ },
262
+ {
263
+ text: "Core Classes",
264
+ collapsed: true,
265
+ items: [
266
+ { text: "FontLoader", link: "/api/font-loader" },
267
+ { text: "FontWriter", link: "/api/font-writer" },
268
+ { text: "ConversionOptions", link: "/api/conversion-options" },
269
+ { text: "SfntFont", link: "/api/sfnt-font" },
270
+ { text: "Type1Font", link: "/api/type1-font" },
271
+ ],
272
+ },
273
+ {
274
+ text: "Converters",
275
+ collapsed: true,
276
+ items: [
277
+ { text: "OutlineConverter", link: "/api/converters/outline-converter" },
278
+ { text: "CurveConverter", link: "/api/converters/curve-converter" },
279
+ { text: "HintConverter", link: "/api/converters/hint-converter" },
280
+ ],
281
+ },
282
+ {
283
+ text: "Validators",
284
+ collapsed: true,
285
+ items: [
286
+ { text: "FontValidator", link: "/api/validators/font-validator" },
287
+ { text: "ValidationProfile", link: "/api/validators/profile" },
288
+ { text: "ValidationHelper", link: "/api/validators/helper" },
289
+ ],
290
+ },
291
+ {
292
+ text: "Models",
293
+ collapsed: true,
294
+ items: [
295
+ { text: "Glyph", link: "/api/models/glyph" },
296
+ { text: "GlyphAccessor", link: "/api/models/glyph-accessor" },
297
+ { text: "TableAnalyzer", link: "/api/models/table-analyzer" },
298
+ ],
299
+ },
300
+ ],
301
+ },
302
+
303
+ socialLinks: [
304
+ { icon: "github", link: "https://github.com/fontist/fontisan" },
305
+ ],
306
+
307
+ footer: {
308
+ message: 'Fontisan is a [Ribose](https://open.ribose.com/) project',
309
+ copyright: `Copyright © 2026 Ribose Group Inc. All rights reserved.`,
310
+ },
311
+
312
+ editLink: {
313
+ pattern: "https://github.com/fontist/fontisan/edit/main/docs/:path",
314
+ text: "Edit this page on GitHub",
315
+ },
316
+ },
317
+ });
@@ -0,0 +1,127 @@
1
+ <template>
2
+ <div class="api-method">
3
+ <div class="method-header">
4
+ <code class="method-signature">
5
+ <span class="method-name">{{ name }}</span
6
+ ><span class="method-params"
7
+ >({{ params.map((p) => p.name).join(", ") }})</span
8
+ >
9
+ </code>
10
+ <span v-if="returns" class="method-returns"> → {{ returns }}</span>
11
+ </div>
12
+ <p v-if="description" class="method-description">{{ description }}</p>
13
+ <div v-if="params.length" class="method-params-list">
14
+ <h4>Parameters</h4>
15
+ <ul>
16
+ <li v-for="param in params" :key="param.name">
17
+ <code>{{ param.name }}</code>
18
+ <span v-if="param.type" class="param-type">: {{ param.type }}</span>
19
+ <span v-if="param.required" class="param-required">*</span>
20
+ <span v-if="param.description" class="param-desc"
21
+ >— {{ param.description }}</span
22
+ >
23
+ </li>
24
+ </ul>
25
+ </div>
26
+ <div v-if="example" class="method-example">
27
+ <h4>Example</h4>
28
+ <pre><code :class="`language-${exampleLang}`">{{ example }}</code></pre>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script setup lang="ts">
34
+ interface Param {
35
+ name: string;
36
+ type?: string;
37
+ required?: boolean;
38
+ description?: string;
39
+ }
40
+
41
+ defineProps<{
42
+ name: string;
43
+ params?: Param[];
44
+ returns?: string;
45
+ description?: string;
46
+ example?: string;
47
+ exampleLang?: string;
48
+ }>();
49
+ </script>
50
+
51
+ <style scoped>
52
+ .api-method {
53
+ margin: 1.5rem 0;
54
+ padding: 1rem;
55
+ border: 1px solid var(--vp-c-divider);
56
+ border-radius: 8px;
57
+ background: var(--vp-c-bg-soft);
58
+ }
59
+
60
+ .method-header {
61
+ display: flex;
62
+ align-items: center;
63
+ gap: 0.5rem;
64
+ flex-wrap: wrap;
65
+ }
66
+
67
+ .method-signature {
68
+ font-size: 1rem;
69
+ font-weight: 500;
70
+ }
71
+
72
+ .method-name {
73
+ color: var(--vp-c-brand-1);
74
+ }
75
+
76
+ .method-params {
77
+ color: var(--vp-c-text-2);
78
+ }
79
+
80
+ .method-returns {
81
+ color: var(--vp-c-text-2);
82
+ font-size: 0.9rem;
83
+ }
84
+
85
+ .method-description {
86
+ margin: 0.75rem 0 0;
87
+ color: var(--vp-c-text-2);
88
+ }
89
+
90
+ .method-params-list h4,
91
+ .method-example h4 {
92
+ margin: 1rem 0 0.5rem;
93
+ font-size: 0.85rem;
94
+ font-weight: 600;
95
+ color: var(--vp-c-text-1);
96
+ }
97
+
98
+ .method-params-list ul {
99
+ margin: 0;
100
+ padding-left: 1.5rem;
101
+ list-style: disc;
102
+ }
103
+
104
+ .method-params-list li {
105
+ margin: 0.25rem 0;
106
+ }
107
+
108
+ .param-type {
109
+ color: var(--vp-c-text-3);
110
+ }
111
+
112
+ .param-required {
113
+ color: var(--vp-c-danger-1);
114
+ }
115
+
116
+ .param-desc {
117
+ color: var(--vp-c-text-2);
118
+ }
119
+
120
+ .method-example pre {
121
+ margin: 0.5rem 0;
122
+ padding: 1rem;
123
+ background: var(--vp-c-bg-alt);
124
+ border-radius: 6px;
125
+ overflow-x: auto;
126
+ }
127
+ </style>
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <span :class="['badge', type]">
3
+ <slot />
4
+ </span>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ defineProps<{
9
+ type?: "tip" | "warning" | "danger" | "info" | "pure-ruby";
10
+ }>();
11
+ </script>
12
+
13
+ <style scoped>
14
+ .badge {
15
+ display: inline-flex;
16
+ align-items: center;
17
+ padding: 0.125rem 0.5rem;
18
+ border-radius: 9999px;
19
+ font-size: 0.75rem;
20
+ font-weight: 600;
21
+ line-height: 1.25rem;
22
+ }
23
+
24
+ .tip {
25
+ background-color: var(--vp-c-brand-soft);
26
+ color: var(--vp-c-brand-1);
27
+ }
28
+
29
+ .warning {
30
+ background-color: rgba(255, 197, 61, 0.14);
31
+ color: var(--vp-c-warning-1);
32
+ }
33
+
34
+ .danger {
35
+ background-color: rgba(244, 63, 94, 0.14);
36
+ color: var(--vp-c-danger-1);
37
+ }
38
+
39
+ .info {
40
+ background-color: rgba(96, 165, 250, 0.14);
41
+ color: var(--vp-c-info-1);
42
+ }
43
+
44
+ .pure-ruby {
45
+ background: linear-gradient(135deg, var(--fontist-rose), #d4718a);
46
+ color: white;
47
+ font-weight: 700;
48
+ text-transform: uppercase;
49
+ letter-spacing: 0.05em;
50
+ }
51
+ </style>
@@ -0,0 +1,87 @@
1
+ <template>
2
+ <table class="feature-comparison">
3
+ <thead>
4
+ <tr>
5
+ <th>Feature</th>
6
+ <th v-for="tool in tools" :key="tool">{{ tool }}</th>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <tr v-for="feature in features" :key="feature.name">
11
+ <td class="feature-name">{{ feature.name }}</td>
12
+ <td
13
+ v-for="(tool, index) in tools"
14
+ :key="tool"
15
+ :class="getSupportClass(feature.support[index])"
16
+ >
17
+ <span class="support-icon">{{ getSupportIcon(feature.support[index]) }}</span>
18
+ <span v-if="feature.notes?.[index]" class="note">{{ feature.notes[index] }}</span>
19
+ </td>
20
+ </tr>
21
+ </tbody>
22
+ </table>
23
+ </template>
24
+
25
+ <script setup lang="ts">
26
+ interface Feature {
27
+ name: string;
28
+ support: boolean[];
29
+ notes?: string[];
30
+ }
31
+
32
+ defineProps<{
33
+ tools: string[];
34
+ features: Feature[];
35
+ }>();
36
+
37
+ function getSupportIcon(supported: boolean): string {
38
+ return supported ? "✓" : "✗";
39
+ }
40
+
41
+ function getSupportClass(supported: boolean): string {
42
+ return supported ? "supported" : "not-supported";
43
+ }
44
+ </script>
45
+
46
+ <style scoped>
47
+ .feature-comparison {
48
+ width: 100%;
49
+ border-collapse: collapse;
50
+ margin: 1rem 0;
51
+ }
52
+
53
+ .feature-comparison th,
54
+ .feature-comparison td {
55
+ padding: 0.75rem 1rem;
56
+ text-align: left;
57
+ border-bottom: 1px solid var(--vp-c-divider);
58
+ }
59
+
60
+ .feature-comparison th {
61
+ background: var(--vp-c-bg-soft);
62
+ font-weight: 600;
63
+ }
64
+
65
+ .feature-name {
66
+ font-weight: 500;
67
+ }
68
+
69
+ .supported {
70
+ color: var(--vp-c-green-1);
71
+ }
72
+
73
+ .not-supported {
74
+ color: var(--vp-c-red-1);
75
+ }
76
+
77
+ .support-icon {
78
+ font-weight: bold;
79
+ }
80
+
81
+ .note {
82
+ display: block;
83
+ font-size: 0.85rem;
84
+ color: var(--vp-c-text-2);
85
+ margin-top: 0.25rem;
86
+ }
87
+ </style>
@@ -0,0 +1,98 @@
1
+ <script setup>
2
+ defineProps({
3
+ title: {
4
+ type: String,
5
+ default: 'Terminal'
6
+ }
7
+ })
8
+ </script>
9
+
10
+ <template>
11
+ <div class="hero-code-block">
12
+ <div class="code-header">
13
+ <span class="dot"></span>
14
+ <span class="dot"></span>
15
+ <span class="dot"></span>
16
+ <span class="code-title">{{ title }}</span>
17
+ </div>
18
+ <div class="code-content"><slot /></div>
19
+ </div>
20
+ </template>
21
+
22
+ <style scoped>
23
+ .hero-code-block {
24
+ background: var(--vp-c-bg-soft);
25
+ border: 1px solid var(--vp-c-divider);
26
+ border-radius: 12px;
27
+ overflow: hidden;
28
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
29
+ max-width: 550px;
30
+ width: 100%;
31
+ font-size: 0.85rem;
32
+ }
33
+
34
+ @media (max-width: 768px) {
35
+ .hero-code-block {
36
+ max-width: 100%;
37
+ font-size: 0.8rem;
38
+ }
39
+ }
40
+
41
+ .code-header {
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 0.5rem;
45
+ padding: 0.75rem 1rem;
46
+ background: var(--vp-c-bg-alt);
47
+ border-bottom: 1px solid var(--vp-c-divider);
48
+ }
49
+
50
+ .dot {
51
+ width: 12px;
52
+ height: 12px;
53
+ border-radius: 50%;
54
+ flex-shrink: 0;
55
+ }
56
+
57
+ .dot:nth-child(1) { background: #ff5f56; }
58
+ .dot:nth-child(2) { background: #ffbd2e; }
59
+ .dot:nth-child(3) { background: #28c840; }
60
+
61
+ .code-title {
62
+ margin-left: auto;
63
+ font-size: 0.8rem;
64
+ color: var(--vp-c-text-3);
65
+ }
66
+
67
+ .code-content {
68
+ margin: 0;
69
+ padding: 1.25rem;
70
+ font-family: var(--vp-font-family-mono);
71
+ font-size: inherit;
72
+ line-height: 1.7;
73
+ overflow-x: auto;
74
+ -webkit-overflow-scrolling: touch;
75
+ }
76
+
77
+ .code-content :deep(.line) {
78
+ display: block;
79
+ }
80
+
81
+ .code-content :deep(.prompt) {
82
+ color: var(--vp-c-brand-1);
83
+ font-weight: 500;
84
+ }
85
+
86
+ .code-content :deep(.success) {
87
+ color: #28c840;
88
+ }
89
+
90
+ .code-content :deep(.comment) {
91
+ color: var(--vp-c-text-3);
92
+ font-style: italic;
93
+ }
94
+
95
+ .code-content :deep(.cmd) {
96
+ font-weight: 600;
97
+ }
98
+ </style>