@kubohiroya/turbowarp-text-lines 0.1.1 → 0.2.0
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/LICENSE +371 -2
- package/README.md +23 -11
- package/dist/text-lines.js +109 -74
- package/package.json +40 -7
- package/.github/workflows/ci.yml +0 -21
- package/.github/workflows/pages.yml +0 -37
- package/docs/assets/favicon.svg +0 -4
- package/docs/assets/styles.css +0 -444
- package/docs/index.html +0 -153
- package/docs/ja/index.html +0 -154
- package/pnpm-workspace.yaml +0 -4
- package/scripts/generate-readme.mjs +0 -67
- package/src/block-definitions.json +0 -34
- package/src/extension.ts +0 -99
- package/src/globals.d.ts +0 -26
- package/src/index.ts +0 -7
- package/tests/extension.test.ts +0 -168
- package/tsconfig.json +0 -14
- package/vite.config.ts +0 -15
package/.github/workflows/ci.yml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
check:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
- uses: actions/setup-node@v4
|
|
14
|
-
with:
|
|
15
|
-
node-version: 22
|
|
16
|
-
- run: npm install
|
|
17
|
-
- run: npm run check
|
|
18
|
-
- uses: actions/upload-artifact@v4
|
|
19
|
-
with:
|
|
20
|
-
name: text-lines-dist
|
|
21
|
-
path: dist/
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: Deploy user documentation
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
paths:
|
|
7
|
-
- docs/**
|
|
8
|
-
- .github/workflows/pages.yml
|
|
9
|
-
workflow_dispatch:
|
|
10
|
-
|
|
11
|
-
permissions:
|
|
12
|
-
contents: read
|
|
13
|
-
pages: write
|
|
14
|
-
id-token: write
|
|
15
|
-
|
|
16
|
-
concurrency:
|
|
17
|
-
group: pages
|
|
18
|
-
cancel-in-progress: false
|
|
19
|
-
|
|
20
|
-
jobs:
|
|
21
|
-
deploy:
|
|
22
|
-
environment:
|
|
23
|
-
name: github-pages
|
|
24
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
25
|
-
runs-on: ubuntu-latest
|
|
26
|
-
steps:
|
|
27
|
-
- name: Check out repository
|
|
28
|
-
uses: actions/checkout@v6
|
|
29
|
-
- name: Configure GitHub Pages
|
|
30
|
-
uses: actions/configure-pages@v5
|
|
31
|
-
- name: Upload documentation
|
|
32
|
-
uses: actions/upload-pages-artifact@v4
|
|
33
|
-
with:
|
|
34
|
-
path: docs
|
|
35
|
-
- name: Deploy documentation
|
|
36
|
-
id: deployment
|
|
37
|
-
uses: actions/deploy-pages@v4
|
package/docs/assets/favicon.svg
DELETED
package/docs/assets/styles.css
DELETED
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
color-scheme: light;
|
|
3
|
-
--ink: #18212b;
|
|
4
|
-
--muted: #556270;
|
|
5
|
-
--paper: #f7f8fb;
|
|
6
|
-
--surface: #ffffff;
|
|
7
|
-
--line: #dce3ea;
|
|
8
|
-
--extension: #5b80a5;
|
|
9
|
-
--extension-dark: #3f658a;
|
|
10
|
-
--extension-soft: #e9f1f8;
|
|
11
|
-
--list: #ff8c1a;
|
|
12
|
-
--list-dark: #d96f00;
|
|
13
|
-
--shadow: 0 18px 45px rgba(28, 48, 68, 0.1);
|
|
14
|
-
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
15
|
-
line-height: 1.65;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
* {
|
|
19
|
-
box-sizing: border-box;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
html {
|
|
23
|
-
scroll-behavior: smooth;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
body {
|
|
27
|
-
margin: 0;
|
|
28
|
-
color: var(--ink);
|
|
29
|
-
background:
|
|
30
|
-
radial-gradient(circle at 8% 0%, rgba(91, 128, 165, 0.13), transparent 28rem),
|
|
31
|
-
var(--paper);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
a {
|
|
35
|
-
color: var(--extension-dark);
|
|
36
|
-
text-underline-offset: 0.18em;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
a:hover {
|
|
40
|
-
text-decoration-thickness: 0.14em;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
code {
|
|
44
|
-
font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
|
|
45
|
-
font-size: 0.92em;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.site-header {
|
|
49
|
-
position: sticky;
|
|
50
|
-
z-index: 10;
|
|
51
|
-
top: 0;
|
|
52
|
-
border-bottom: 1px solid rgba(220, 227, 234, 0.9);
|
|
53
|
-
background: rgba(247, 248, 251, 0.92);
|
|
54
|
-
backdrop-filter: blur(16px);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.nav,
|
|
58
|
-
main,
|
|
59
|
-
.site-footer {
|
|
60
|
-
width: min(70rem, calc(100% - 2rem));
|
|
61
|
-
margin-inline: auto;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.nav {
|
|
65
|
-
min-height: 4rem;
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
justify-content: space-between;
|
|
69
|
-
gap: 1rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.brand {
|
|
73
|
-
display: inline-flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
gap: 0.7rem;
|
|
76
|
-
color: var(--ink);
|
|
77
|
-
font-weight: 760;
|
|
78
|
-
text-decoration: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.brand-mark {
|
|
82
|
-
width: 2rem;
|
|
83
|
-
height: 2rem;
|
|
84
|
-
display: grid;
|
|
85
|
-
place-items: center;
|
|
86
|
-
border-radius: 0.6rem;
|
|
87
|
-
color: white;
|
|
88
|
-
background: var(--extension);
|
|
89
|
-
box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
|
|
90
|
-
font-size: 0.75rem;
|
|
91
|
-
letter-spacing: -0.08em;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.nav-links {
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
gap: 1rem;
|
|
98
|
-
font-size: 0.92rem;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.language-link {
|
|
102
|
-
display: inline-flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
min-height: 2.35rem;
|
|
105
|
-
padding: 0.25rem 0.8rem;
|
|
106
|
-
border: 1px solid var(--line);
|
|
107
|
-
border-radius: 999px;
|
|
108
|
-
background: var(--surface);
|
|
109
|
-
text-decoration: none;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.hero {
|
|
113
|
-
padding: clamp(4rem, 10vw, 7rem) 0 3.5rem;
|
|
114
|
-
text-align: center;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.eyebrow {
|
|
118
|
-
margin: 0 0 0.65rem;
|
|
119
|
-
color: var(--extension-dark);
|
|
120
|
-
font-size: 0.82rem;
|
|
121
|
-
font-weight: 800;
|
|
122
|
-
letter-spacing: 0.12em;
|
|
123
|
-
text-transform: uppercase;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
h1,
|
|
127
|
-
h2,
|
|
128
|
-
h3 {
|
|
129
|
-
line-height: 1.18;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
h1 {
|
|
133
|
-
max-width: 13ch;
|
|
134
|
-
margin: 0 auto;
|
|
135
|
-
font-size: clamp(2.6rem, 8vw, 5.5rem);
|
|
136
|
-
letter-spacing: -0.055em;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.lead {
|
|
140
|
-
max-width: 41rem;
|
|
141
|
-
margin: 1.25rem auto 0;
|
|
142
|
-
color: var(--muted);
|
|
143
|
-
font-size: clamp(1.05rem, 2vw, 1.25rem);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.hero-actions {
|
|
147
|
-
display: flex;
|
|
148
|
-
flex-wrap: wrap;
|
|
149
|
-
justify-content: center;
|
|
150
|
-
gap: 0.8rem;
|
|
151
|
-
margin-top: 1.8rem;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.button {
|
|
155
|
-
display: inline-flex;
|
|
156
|
-
align-items: center;
|
|
157
|
-
justify-content: center;
|
|
158
|
-
min-height: 3rem;
|
|
159
|
-
padding: 0.55rem 1.1rem;
|
|
160
|
-
border: 1px solid var(--line);
|
|
161
|
-
border-radius: 0.75rem;
|
|
162
|
-
color: var(--ink);
|
|
163
|
-
background: var(--surface);
|
|
164
|
-
font-weight: 700;
|
|
165
|
-
text-decoration: none;
|
|
166
|
-
box-shadow: 0 5px 16px rgba(28, 48, 68, 0.07);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.button.primary {
|
|
170
|
-
border-color: var(--extension-dark);
|
|
171
|
-
color: #ffffff;
|
|
172
|
-
background: var(--extension);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.section {
|
|
176
|
-
padding: 3.4rem 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.section-heading {
|
|
180
|
-
max-width: 42rem;
|
|
181
|
-
margin-bottom: 1.8rem;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.section-heading h2 {
|
|
185
|
-
margin: 0;
|
|
186
|
-
font-size: clamp(2rem, 5vw, 3.1rem);
|
|
187
|
-
letter-spacing: -0.035em;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.section-heading p {
|
|
191
|
-
margin: 0.75rem 0 0;
|
|
192
|
-
color: var(--muted);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.quick-start,
|
|
196
|
-
.block-grid,
|
|
197
|
-
.notes-grid {
|
|
198
|
-
display: grid;
|
|
199
|
-
gap: 1rem;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.quick-start {
|
|
203
|
-
grid-template-columns: repeat(3, 1fr);
|
|
204
|
-
counter-reset: step;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.step,
|
|
208
|
-
.block-card,
|
|
209
|
-
.note-card {
|
|
210
|
-
border: 1px solid var(--line);
|
|
211
|
-
border-radius: 1rem;
|
|
212
|
-
background: var(--surface);
|
|
213
|
-
box-shadow: 0 8px 26px rgba(28, 48, 68, 0.06);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.step {
|
|
217
|
-
position: relative;
|
|
218
|
-
padding: 1.35rem;
|
|
219
|
-
counter-increment: step;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.step::before {
|
|
223
|
-
content: counter(step);
|
|
224
|
-
width: 2rem;
|
|
225
|
-
height: 2rem;
|
|
226
|
-
display: grid;
|
|
227
|
-
place-items: center;
|
|
228
|
-
margin-bottom: 1rem;
|
|
229
|
-
border-radius: 999px;
|
|
230
|
-
color: white;
|
|
231
|
-
background: var(--extension);
|
|
232
|
-
font-weight: 800;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.step h3,
|
|
236
|
-
.block-card h3,
|
|
237
|
-
.note-card h3 {
|
|
238
|
-
margin: 0;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.step p,
|
|
242
|
-
.block-card p,
|
|
243
|
-
.note-card p {
|
|
244
|
-
margin: 0.55rem 0 0;
|
|
245
|
-
color: var(--muted);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.diagram {
|
|
249
|
-
overflow: hidden;
|
|
250
|
-
margin: 0;
|
|
251
|
-
border: 1px solid var(--line);
|
|
252
|
-
border-radius: 1.25rem;
|
|
253
|
-
background: var(--surface);
|
|
254
|
-
box-shadow: var(--shadow);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.diagram-input {
|
|
258
|
-
padding: 1.5rem;
|
|
259
|
-
border-bottom: 1px solid var(--line);
|
|
260
|
-
background: #f2f5f8;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.diagram-label {
|
|
264
|
-
display: block;
|
|
265
|
-
margin-bottom: 0.45rem;
|
|
266
|
-
color: var(--muted);
|
|
267
|
-
font-size: 0.78rem;
|
|
268
|
-
font-weight: 800;
|
|
269
|
-
letter-spacing: 0.08em;
|
|
270
|
-
text-transform: uppercase;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.text-sample {
|
|
274
|
-
display: grid;
|
|
275
|
-
gap: 0.28rem;
|
|
276
|
-
max-width: 21rem;
|
|
277
|
-
margin: 0;
|
|
278
|
-
padding: 1rem;
|
|
279
|
-
border: 1px solid #cfd7df;
|
|
280
|
-
border-radius: 0.75rem;
|
|
281
|
-
background: white;
|
|
282
|
-
font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
|
|
283
|
-
line-height: 1.35;
|
|
284
|
-
white-space: pre-line;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.diagram-path {
|
|
288
|
-
display: grid;
|
|
289
|
-
grid-template-columns: minmax(15rem, 1fr) 3rem minmax(12rem, 0.75fr);
|
|
290
|
-
align-items: center;
|
|
291
|
-
gap: 1rem;
|
|
292
|
-
padding: 1.35rem 1.5rem;
|
|
293
|
-
border-bottom: 1px solid var(--line);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.diagram-path:last-child {
|
|
297
|
-
border-bottom: 0;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.arrow {
|
|
301
|
-
color: var(--extension);
|
|
302
|
-
font-size: 2rem;
|
|
303
|
-
font-weight: 900;
|
|
304
|
-
text-align: center;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.scratch-block {
|
|
308
|
-
position: relative;
|
|
309
|
-
padding: 0.72rem 1rem;
|
|
310
|
-
border: 1px solid var(--extension-dark);
|
|
311
|
-
border-radius: 0.65rem;
|
|
312
|
-
color: white;
|
|
313
|
-
background: var(--extension);
|
|
314
|
-
font-weight: 680;
|
|
315
|
-
box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.scratch-block.reporter {
|
|
319
|
-
border-radius: 999px;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.argument {
|
|
323
|
-
display: inline-block;
|
|
324
|
-
margin: 0 0.14rem;
|
|
325
|
-
padding: 0.12rem 0.48rem;
|
|
326
|
-
border-radius: 999px;
|
|
327
|
-
color: var(--ink);
|
|
328
|
-
background: white;
|
|
329
|
-
font-weight: 600;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.result {
|
|
333
|
-
padding: 0.85rem 1rem;
|
|
334
|
-
border: 1px solid #bfd1e1;
|
|
335
|
-
border-radius: 0.75rem;
|
|
336
|
-
background: var(--extension-soft);
|
|
337
|
-
font-weight: 760;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.list-result {
|
|
341
|
-
border-color: #ffd3a3;
|
|
342
|
-
background: #fff3e5;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.list-result ol {
|
|
346
|
-
margin: 0.45rem 0 0;
|
|
347
|
-
padding-left: 1.65rem;
|
|
348
|
-
font-weight: 500;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.diagram figcaption {
|
|
352
|
-
padding: 1rem 1.5rem;
|
|
353
|
-
border-top: 1px solid var(--line);
|
|
354
|
-
color: var(--muted);
|
|
355
|
-
background: #fbfcfd;
|
|
356
|
-
font-size: 0.92rem;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.block-grid {
|
|
360
|
-
grid-template-columns: repeat(3, 1fr);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.block-card {
|
|
364
|
-
overflow: hidden;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.block-card .scratch-block {
|
|
368
|
-
margin: 1.25rem;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.block-copy {
|
|
372
|
-
padding: 0 1.25rem 1.35rem;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.block-copy ul {
|
|
376
|
-
margin: 0.85rem 0 0;
|
|
377
|
-
padding-left: 1.2rem;
|
|
378
|
-
color: var(--muted);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.notes-grid {
|
|
382
|
-
grid-template-columns: repeat(2, 1fr);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.note-card {
|
|
386
|
-
padding: 1.35rem;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.callout {
|
|
390
|
-
margin-top: 1rem;
|
|
391
|
-
padding: 1rem 1.1rem;
|
|
392
|
-
border-left: 0.3rem solid var(--list);
|
|
393
|
-
border-radius: 0.35rem 0.75rem 0.75rem 0.35rem;
|
|
394
|
-
background: #fff3e5;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.callout strong {
|
|
398
|
-
color: #874500;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.site-footer {
|
|
402
|
-
display: flex;
|
|
403
|
-
justify-content: space-between;
|
|
404
|
-
gap: 1rem;
|
|
405
|
-
margin-top: 3rem;
|
|
406
|
-
padding: 2rem 0 3rem;
|
|
407
|
-
border-top: 1px solid var(--line);
|
|
408
|
-
color: var(--muted);
|
|
409
|
-
font-size: 0.9rem;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.site-footer p {
|
|
413
|
-
margin: 0;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
@media (max-width: 48rem) {
|
|
417
|
-
.quick-start,
|
|
418
|
-
.block-grid,
|
|
419
|
-
.notes-grid {
|
|
420
|
-
grid-template-columns: 1fr;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.diagram-path {
|
|
424
|
-
grid-template-columns: 1fr;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.arrow {
|
|
428
|
-
transform: rotate(90deg);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.nav-links > a:not(.language-link) {
|
|
432
|
-
display: none;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.site-footer {
|
|
436
|
-
flex-direction: column;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
@media (prefers-reduced-motion: reduce) {
|
|
441
|
-
html {
|
|
442
|
-
scroll-behavior: auto;
|
|
443
|
-
}
|
|
444
|
-
}
|
package/docs/index.html
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<meta name="description" content="Illustrated user guide for the TurboWarp Text Lines extension.">
|
|
7
|
-
<title>Text Lines — User Guide</title>
|
|
8
|
-
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml">
|
|
9
|
-
<link rel="stylesheet" href="assets/styles.css">
|
|
10
|
-
<link rel="alternate" hreflang="en" href="https://kubohiroya.github.io/turbowarp-text-lines/">
|
|
11
|
-
<link rel="alternate" hreflang="ja" href="https://kubohiroya.github.io/turbowarp-text-lines/ja/">
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<header class="site-header">
|
|
15
|
-
<nav class="nav" aria-label="Main navigation">
|
|
16
|
-
<a class="brand" href="#top">
|
|
17
|
-
<span class="brand-mark" aria-hidden="true">≡</span>
|
|
18
|
-
<span>Text Lines</span>
|
|
19
|
-
</a>
|
|
20
|
-
<div class="nav-links">
|
|
21
|
-
<a href="#start">Get started</a>
|
|
22
|
-
<a href="#blocks">Blocks</a>
|
|
23
|
-
<a class="language-link" href="ja/" lang="ja" hreflang="ja">日本語</a>
|
|
24
|
-
</div>
|
|
25
|
-
</nav>
|
|
26
|
-
</header>
|
|
27
|
-
|
|
28
|
-
<main id="top">
|
|
29
|
-
<section class="hero">
|
|
30
|
-
<p class="eyebrow">TurboWarp extension guide</p>
|
|
31
|
-
<h1>Turn text into lines.</h1>
|
|
32
|
-
<p class="lead">Count lines, read one line, or copy every line into a Scratch list with three focused blocks.</p>
|
|
33
|
-
<div class="hero-actions">
|
|
34
|
-
<a class="button primary" href="#start">Start using Text Lines</a>
|
|
35
|
-
<a class="button" href="https://github.com/kubohiroya/turbowarp-text-lines">View source on GitHub</a>
|
|
36
|
-
</div>
|
|
37
|
-
</section>
|
|
38
|
-
|
|
39
|
-
<section class="section" id="start">
|
|
40
|
-
<div class="section-heading">
|
|
41
|
-
<p class="eyebrow">Quick start</p>
|
|
42
|
-
<h2>Load the extension</h2>
|
|
43
|
-
<p>Text Lines writes directly to Scratch lists, so it must run without the extension sandbox.</p>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="quick-start">
|
|
46
|
-
<article class="step">
|
|
47
|
-
<h3>Download</h3>
|
|
48
|
-
<p>Get <a href="https://github.com/kubohiroya/turbowarp-text-lines/blob/main/dist/text-lines.js"><code>text-lines.js</code></a> from the repository.</p>
|
|
49
|
-
</article>
|
|
50
|
-
<article class="step">
|
|
51
|
-
<h3>Add to TurboWarp</h3>
|
|
52
|
-
<p>In TurboWarp Desktop, open Extensions, choose Custom Extension, then load the downloaded file.</p>
|
|
53
|
-
</article>
|
|
54
|
-
<article class="step">
|
|
55
|
-
<h3>Allow list access</h3>
|
|
56
|
-
<p>Enable <strong>Run extension without sandbox</strong> when TurboWarp asks for permission.</p>
|
|
57
|
-
</article>
|
|
58
|
-
</div>
|
|
59
|
-
</section>
|
|
60
|
-
|
|
61
|
-
<section class="section" aria-labelledby="how-heading">
|
|
62
|
-
<div class="section-heading">
|
|
63
|
-
<p class="eyebrow">How it works</p>
|
|
64
|
-
<h2 id="how-heading">One input, three useful results</h2>
|
|
65
|
-
<p>Text Lines separates the input wherever it finds a line ending, then uses the resulting lines in the block you choose.</p>
|
|
66
|
-
</div>
|
|
67
|
-
<figure class="diagram" aria-labelledby="diagram-caption">
|
|
68
|
-
<div class="diagram-input">
|
|
69
|
-
<span class="diagram-label">Input text</span>
|
|
70
|
-
<pre class="text-sample">Apple
|
|
71
|
-
Banana
|
|
72
|
-
Cherry</pre>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="diagram-path">
|
|
75
|
-
<div class="scratch-block reporter">number of lines in <span class="argument">text</span></div>
|
|
76
|
-
<div class="arrow" aria-hidden="true">→</div>
|
|
77
|
-
<div class="result"><span class="diagram-label">Reports</span>3</div>
|
|
78
|
-
</div>
|
|
79
|
-
<div class="diagram-path">
|
|
80
|
-
<div class="scratch-block reporter">line <span class="argument">2</span> of <span class="argument">text</span></div>
|
|
81
|
-
<div class="arrow" aria-hidden="true">→</div>
|
|
82
|
-
<div class="result"><span class="diagram-label">Reports</span>Banana</div>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="diagram-path">
|
|
85
|
-
<div class="scratch-block">put lines of <span class="argument">text</span> into list <span class="argument">items</span></div>
|
|
86
|
-
<div class="arrow" aria-hidden="true">→</div>
|
|
87
|
-
<div class="result list-result">
|
|
88
|
-
<span class="diagram-label">List “items” becomes</span>
|
|
89
|
-
<ol><li>Apple</li><li>Banana</li><li>Cherry</li></ol>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
<figcaption id="diagram-caption">The list block replaces the list’s existing items. The two rounded reporter blocks only return a value.</figcaption>
|
|
93
|
-
</figure>
|
|
94
|
-
</section>
|
|
95
|
-
|
|
96
|
-
<section class="section" id="blocks">
|
|
97
|
-
<div class="section-heading">
|
|
98
|
-
<p class="eyebrow">Block reference</p>
|
|
99
|
-
<h2>Choose the result you need</h2>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="block-grid">
|
|
102
|
-
<article class="block-card">
|
|
103
|
-
<div class="scratch-block reporter">number of lines in <span class="argument">text</span></div>
|
|
104
|
-
<div class="block-copy">
|
|
105
|
-
<h3>Count lines</h3>
|
|
106
|
-
<p>Returns how many lines the input contains.</p>
|
|
107
|
-
<ul><li>A blank input is one empty line.</li><li>A final line ending adds an empty last line.</li></ul>
|
|
108
|
-
</div>
|
|
109
|
-
</article>
|
|
110
|
-
<article class="block-card">
|
|
111
|
-
<div class="scratch-block reporter">line <span class="argument">1</span> of <span class="argument">text</span></div>
|
|
112
|
-
<div class="block-copy">
|
|
113
|
-
<h3>Read one line</h3>
|
|
114
|
-
<p>Returns the line at the requested position.</p>
|
|
115
|
-
<ul><li>Line numbering starts at 1.</li><li>Invalid line numbers return an empty string.</li></ul>
|
|
116
|
-
</div>
|
|
117
|
-
</article>
|
|
118
|
-
<article class="block-card">
|
|
119
|
-
<div class="scratch-block">put lines of <span class="argument">text</span> into list <span class="argument">list</span></div>
|
|
120
|
-
<div class="block-copy">
|
|
121
|
-
<h3>Fill a list</h3>
|
|
122
|
-
<p>Splits the input and writes each line as one list item.</p>
|
|
123
|
-
<ul><li>Choose a stage or sprite list from the menu.</li><li>Existing list items are replaced.</li></ul>
|
|
124
|
-
</div>
|
|
125
|
-
</article>
|
|
126
|
-
</div>
|
|
127
|
-
</section>
|
|
128
|
-
|
|
129
|
-
<section class="section" aria-labelledby="details-heading">
|
|
130
|
-
<div class="section-heading">
|
|
131
|
-
<p class="eyebrow">Details</p>
|
|
132
|
-
<h2 id="details-heading">Line endings and list safety</h2>
|
|
133
|
-
</div>
|
|
134
|
-
<div class="notes-grid">
|
|
135
|
-
<article class="note-card">
|
|
136
|
-
<h3>Works across platforms</h3>
|
|
137
|
-
<p>LF (<code>\n</code>), CRLF (<code>\r\n</code>), and CR (<code>\r</code>) are all treated as a single line ending.</p>
|
|
138
|
-
</article>
|
|
139
|
-
<article class="note-card">
|
|
140
|
-
<h3>List changes are immediate</h3>
|
|
141
|
-
<p>The selected list is updated as soon as the command block runs, and list monitors refresh automatically.</p>
|
|
142
|
-
<div class="callout"><strong>Before running:</strong> copy any list contents you need to keep. The block replaces them.</div>
|
|
143
|
-
</article>
|
|
144
|
-
</div>
|
|
145
|
-
</section>
|
|
146
|
-
</main>
|
|
147
|
-
|
|
148
|
-
<footer class="site-footer">
|
|
149
|
-
<p>Text Lines for TurboWarp</p>
|
|
150
|
-
<p><a href="https://github.com/kubohiroya/turbowarp-text-lines">Source code and license</a></p>
|
|
151
|
-
</footer>
|
|
152
|
-
</body>
|
|
153
|
-
</html>
|