@kubohiroya/turbowarp-document-editor 0.0.0-stage → 0.1.0-rc.2
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 +373 -0
- package/NOTICE +15 -0
- package/README.ja.md +68 -0
- package/README.md +85 -2
- package/dist/node/cli.d.ts +20 -0
- package/dist/node/cli.d.ts.map +1 -0
- package/dist/node/cli.js +56 -0
- package/dist/node/cli.js.map +1 -0
- package/dist/node/host.d.ts +15 -0
- package/dist/node/host.d.ts.map +1 -0
- package/dist/node/host.js +366 -0
- package/dist/node/host.js.map +1 -0
- package/dist/node/schema.d.ts +10 -0
- package/dist/node/schema.d.ts.map +1 -0
- package/dist/node/schema.js +28 -0
- package/dist/node/schema.js.map +1 -0
- package/dist/node/types.d.ts +42 -0
- package/dist/node/types.d.ts.map +1 -0
- package/dist/node/types.js +2 -0
- package/dist/node/types.js.map +1 -0
- package/dist/node/vscode.d.ts +18 -0
- package/dist/node/vscode.d.ts.map +1 -0
- package/dist/node/vscode.js +171 -0
- package/dist/node/vscode.js.map +1 -0
- package/dist/scripts/copy-css.d.ts +2 -0
- package/dist/scripts/copy-css.d.ts.map +1 -0
- package/dist/scripts/copy-css.js +4 -0
- package/dist/scripts/copy-css.js.map +1 -0
- package/dist/src/block-preview.d.ts +14 -0
- package/dist/src/block-preview.d.ts.map +1 -0
- package/dist/src/block-preview.js +321 -0
- package/dist/src/block-preview.js.map +1 -0
- package/dist/src/client.d.ts +27 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/client.js +1191 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/dialog-window.d.ts +12 -0
- package/dist/src/dialog-window.d.ts.map +1 -0
- package/dist/src/dialog-window.js +134 -0
- package/dist/src/dialog-window.js.map +1 -0
- package/dist/src/document.d.ts +3 -0
- package/dist/src/document.d.ts.map +1 -0
- package/dist/src/document.js +6 -0
- package/dist/src/document.js.map +1 -0
- package/dist/src/feature-flags.d.ts +5 -0
- package/dist/src/feature-flags.d.ts.map +1 -0
- package/dist/src/feature-flags.js +6 -0
- package/dist/src/feature-flags.js.map +1 -0
- package/dist/src/focus-document.d.ts +12 -0
- package/dist/src/focus-document.d.ts.map +1 -0
- package/dist/src/focus-document.js +38 -0
- package/dist/src/focus-document.js.map +1 -0
- package/dist/src/hat-entry.d.ts +22 -0
- package/dist/src/hat-entry.d.ts.map +1 -0
- package/dist/src/hat-entry.js +164 -0
- package/dist/src/hat-entry.js.map +1 -0
- package/dist/src/index.d.ts +32 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +16 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/provider-bootstrap.d.ts +7 -0
- package/dist/src/provider-bootstrap.d.ts.map +1 -0
- package/dist/src/provider-bootstrap.js +6 -0
- package/dist/src/provider-bootstrap.js.map +1 -0
- package/dist/src/root-shape.d.ts +14 -0
- package/dist/src/root-shape.d.ts.map +1 -0
- package/dist/src/root-shape.js +24 -0
- package/dist/src/root-shape.js.map +1 -0
- package/dist/src/styles.d.ts +2 -0
- package/dist/src/styles.d.ts.map +1 -0
- package/dist/src/styles.js +4 -0
- package/dist/src/styles.js.map +1 -0
- package/dist/src/types.d.ts +66 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/ui.css +75 -0
- package/dist/src/workspace-patch.d.ts +4 -0
- package/dist/src/workspace-patch.d.ts.map +1 -0
- package/dist/src/workspace-patch.js +77 -0
- package/dist/src/workspace-patch.js.map +1 -0
- package/dist/webpack4.cjs +36 -0
- package/dist/webpack4.cjs.map +1 -0
- package/dist/webpack4.d.cts +26 -0
- package/dist/webpack4.d.cts.map +1 -0
- package/docs/license-provenance.md +69 -0
- package/node/cli.ts +55 -0
- package/node/host.ts +303 -0
- package/node/schema.ts +27 -0
- package/node/types.ts +28 -0
- package/node/vscode.ts +174 -0
- package/package.json +132 -4
- package/scripts/copy-css.ts +3 -0
- package/src/block-preview.ts +257 -0
- package/src/client.ts +1235 -0
- package/src/dialog-window.ts +125 -0
- package/src/document.ts +8 -0
- package/src/feature-flags.ts +5 -0
- package/src/focus-document.ts +42 -0
- package/src/hat-entry.ts +121 -0
- package/src/index.ts +19 -0
- package/src/provider-bootstrap.ts +8 -0
- package/src/root-shape.ts +25 -0
- package/src/styles.ts +3 -0
- package/src/types.ts +46 -0
- package/src/ui.css +75 -0
- package/src/workspace-patch.ts +66 -0
- package/tsconfig.json +30 -0
- package/webpack4.cts +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
Mozilla Public License Version 2.0
|
|
2
|
+
==================================
|
|
3
|
+
|
|
4
|
+
1. Definitions
|
|
5
|
+
--------------
|
|
6
|
+
|
|
7
|
+
1.1. "Contributor"
|
|
8
|
+
means each individual or legal entity that creates, contributes to
|
|
9
|
+
the creation of, or owns Covered Software.
|
|
10
|
+
|
|
11
|
+
1.2. "Contributor Version"
|
|
12
|
+
means the combination of the Contributions of others (if any) used
|
|
13
|
+
by a Contributor and that particular Contributor's Contribution.
|
|
14
|
+
|
|
15
|
+
1.3. "Contribution"
|
|
16
|
+
means Covered Software of a particular Contributor.
|
|
17
|
+
|
|
18
|
+
1.4. "Covered Software"
|
|
19
|
+
means Source Code Form to which the initial Contributor has attached
|
|
20
|
+
the notice in Exhibit A, the Executable Form of such Source Code
|
|
21
|
+
Form, and Modifications of such Source Code Form, in each case
|
|
22
|
+
including portions thereof.
|
|
23
|
+
|
|
24
|
+
1.5. "Incompatible With Secondary Licenses"
|
|
25
|
+
means
|
|
26
|
+
|
|
27
|
+
(a) that the initial Contributor has attached the notice described
|
|
28
|
+
in Exhibit B to the Covered Software; or
|
|
29
|
+
|
|
30
|
+
(b) that the Covered Software was made available under the terms of
|
|
31
|
+
version 1.1 or earlier of the License, but not also under the
|
|
32
|
+
terms of a Secondary License.
|
|
33
|
+
|
|
34
|
+
1.6. "Executable Form"
|
|
35
|
+
means any form of the work other than Source Code Form.
|
|
36
|
+
|
|
37
|
+
1.7. "Larger Work"
|
|
38
|
+
means a work that combines Covered Software with other material, in
|
|
39
|
+
a separate file or files, that is not Covered Software.
|
|
40
|
+
|
|
41
|
+
1.8. "License"
|
|
42
|
+
means this document.
|
|
43
|
+
|
|
44
|
+
1.9. "Licensable"
|
|
45
|
+
means having the right to grant, to the maximum extent possible,
|
|
46
|
+
whether at the time of the initial grant or subsequently, any and
|
|
47
|
+
all of the rights conveyed by this License.
|
|
48
|
+
|
|
49
|
+
1.10. "Modifications"
|
|
50
|
+
means any of the following:
|
|
51
|
+
|
|
52
|
+
(a) any file in Source Code Form that results from an addition to,
|
|
53
|
+
deletion from, or modification of the contents of Covered
|
|
54
|
+
Software; or
|
|
55
|
+
|
|
56
|
+
(b) any new file in Source Code Form that contains any Covered
|
|
57
|
+
Software.
|
|
58
|
+
|
|
59
|
+
1.11. "Patent Claims" of a Contributor
|
|
60
|
+
means any patent claim(s), including without limitation, method,
|
|
61
|
+
process, and apparatus claims, in any patent Licensable by such
|
|
62
|
+
Contributor that would be infringed, but for the grant of the
|
|
63
|
+
License, by the making, using, selling, offering for sale, having
|
|
64
|
+
made, import, or transfer of either its Contributions or its
|
|
65
|
+
Contributor Version.
|
|
66
|
+
|
|
67
|
+
1.12. "Secondary License"
|
|
68
|
+
means either the GNU General Public License, Version 2.0, the GNU
|
|
69
|
+
Lesser General Public License, Version 2.1, the GNU Affero General
|
|
70
|
+
Public License, Version 3.0, or any later versions of those
|
|
71
|
+
licenses.
|
|
72
|
+
|
|
73
|
+
1.13. "Source Code Form"
|
|
74
|
+
means the form of the work preferred for making modifications.
|
|
75
|
+
|
|
76
|
+
1.14. "You" (or "Your")
|
|
77
|
+
means an individual or a legal entity exercising rights under this
|
|
78
|
+
License. For legal entities, "You" includes any entity that
|
|
79
|
+
controls, is controlled by, or is under common control with You. For
|
|
80
|
+
purposes of this definition, "control" means (a) the power, direct
|
|
81
|
+
or indirect, to cause the direction or management of such entity,
|
|
82
|
+
whether by contract or otherwise, or (b) ownership of more than
|
|
83
|
+
fifty percent (50%) of the outstanding shares or beneficial
|
|
84
|
+
ownership of such entity.
|
|
85
|
+
|
|
86
|
+
2. License Grants and Conditions
|
|
87
|
+
--------------------------------
|
|
88
|
+
|
|
89
|
+
2.1. Grants
|
|
90
|
+
|
|
91
|
+
Each Contributor hereby grants You a world-wide, royalty-free,
|
|
92
|
+
non-exclusive license:
|
|
93
|
+
|
|
94
|
+
(a) under intellectual property rights (other than patent or trademark)
|
|
95
|
+
Licensable by such Contributor to use, reproduce, make available,
|
|
96
|
+
modify, display, perform, distribute, and otherwise exploit its
|
|
97
|
+
Contributions, either on an unmodified basis, with Modifications, or
|
|
98
|
+
as part of a Larger Work; and
|
|
99
|
+
|
|
100
|
+
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
|
101
|
+
for sale, have made, import, and otherwise transfer either its
|
|
102
|
+
Contributions or its Contributor Version.
|
|
103
|
+
|
|
104
|
+
2.2. Effective Date
|
|
105
|
+
|
|
106
|
+
The licenses granted in Section 2.1 with respect to any Contribution
|
|
107
|
+
become effective for each Contribution on the date the Contributor first
|
|
108
|
+
distributes such Contribution.
|
|
109
|
+
|
|
110
|
+
2.3. Limitations on Grant Scope
|
|
111
|
+
|
|
112
|
+
The licenses granted in this Section 2 are the only rights granted under
|
|
113
|
+
this License. No additional rights or licenses will be implied from the
|
|
114
|
+
distribution or licensing of Covered Software under this License.
|
|
115
|
+
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
|
116
|
+
Contributor:
|
|
117
|
+
|
|
118
|
+
(a) for any code that a Contributor has removed from Covered Software;
|
|
119
|
+
or
|
|
120
|
+
|
|
121
|
+
(b) for infringements caused by: (i) Your and any other third party's
|
|
122
|
+
modifications of Covered Software, or (ii) the combination of its
|
|
123
|
+
Contributions with other software (except as part of its Contributor
|
|
124
|
+
Version); or
|
|
125
|
+
|
|
126
|
+
(c) under Patent Claims infringed by Covered Software in the absence of
|
|
127
|
+
its Contributions.
|
|
128
|
+
|
|
129
|
+
This License does not grant any rights in the trademarks, service marks,
|
|
130
|
+
or logos of any Contributor (except as may be necessary to comply with
|
|
131
|
+
the notice requirements in Section 3.4).
|
|
132
|
+
|
|
133
|
+
2.4. Subsequent Licenses
|
|
134
|
+
|
|
135
|
+
No Contributor makes additional grants as a result of Your choice to
|
|
136
|
+
distribute the Covered Software under a subsequent version of this
|
|
137
|
+
License (see Section 10.2) or under the terms of a Secondary License (if
|
|
138
|
+
permitted under the terms of Section 3.3).
|
|
139
|
+
|
|
140
|
+
2.5. Representation
|
|
141
|
+
|
|
142
|
+
Each Contributor represents that the Contributor believes its
|
|
143
|
+
Contributions are its original creation(s) or it has sufficient rights
|
|
144
|
+
to grant the rights to its Contributions conveyed by this License.
|
|
145
|
+
|
|
146
|
+
2.6. Fair Use
|
|
147
|
+
|
|
148
|
+
This License is not intended to limit any rights You have under
|
|
149
|
+
applicable copyright doctrines of fair use, fair dealing, or other
|
|
150
|
+
equivalents.
|
|
151
|
+
|
|
152
|
+
2.7. Conditions
|
|
153
|
+
|
|
154
|
+
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
|
155
|
+
in Section 2.1.
|
|
156
|
+
|
|
157
|
+
3. Responsibilities
|
|
158
|
+
-------------------
|
|
159
|
+
|
|
160
|
+
3.1. Distribution of Source Form
|
|
161
|
+
|
|
162
|
+
All distribution of Covered Software in Source Code Form, including any
|
|
163
|
+
Modifications that You create or to which You contribute, must be under
|
|
164
|
+
the terms of this License. You must inform recipients that the Source
|
|
165
|
+
Code Form of the Covered Software is governed by the terms of this
|
|
166
|
+
License, and how they can obtain a copy of this License. You may not
|
|
167
|
+
attempt to alter or restrict the recipients' rights in the Source Code
|
|
168
|
+
Form.
|
|
169
|
+
|
|
170
|
+
3.2. Distribution of Executable Form
|
|
171
|
+
|
|
172
|
+
If You distribute Covered Software in Executable Form then:
|
|
173
|
+
|
|
174
|
+
(a) such Covered Software must also be made available in Source Code
|
|
175
|
+
Form, as described in Section 3.1, and You must inform recipients of
|
|
176
|
+
the Executable Form how they can obtain a copy of such Source Code
|
|
177
|
+
Form by reasonable means in a timely manner, at a charge no more
|
|
178
|
+
than the cost of distribution to the recipient; and
|
|
179
|
+
|
|
180
|
+
(b) You may distribute such Executable Form under the terms of this
|
|
181
|
+
License, or sublicense it under different terms, provided that the
|
|
182
|
+
license for the Executable Form does not attempt to limit or alter
|
|
183
|
+
the recipients' rights in the Source Code Form under this License.
|
|
184
|
+
|
|
185
|
+
3.3. Distribution of a Larger Work
|
|
186
|
+
|
|
187
|
+
You may create and distribute a Larger Work under terms of Your choice,
|
|
188
|
+
provided that You also comply with the requirements of this License for
|
|
189
|
+
the Covered Software. If the Larger Work is a combination of Covered
|
|
190
|
+
Software with a work governed by one or more Secondary Licenses, and the
|
|
191
|
+
Covered Software is not Incompatible With Secondary Licenses, this
|
|
192
|
+
License permits You to additionally distribute such Covered Software
|
|
193
|
+
under the terms of such Secondary License(s), so that the recipient of
|
|
194
|
+
the Larger Work may, at their option, further distribute the Covered
|
|
195
|
+
Software under the terms of either this License or such Secondary
|
|
196
|
+
License(s).
|
|
197
|
+
|
|
198
|
+
3.4. Notices
|
|
199
|
+
|
|
200
|
+
You may not remove or alter the substance of any license notices
|
|
201
|
+
(including copyright notices, patent notices, disclaimers of warranty,
|
|
202
|
+
or limitations of liability) contained within the Source Code Form of
|
|
203
|
+
the Covered Software, except that You may alter any license notices to
|
|
204
|
+
the extent required to remedy known factual inaccuracies.
|
|
205
|
+
|
|
206
|
+
3.5. Application of Additional Terms
|
|
207
|
+
|
|
208
|
+
You may choose to offer, and to charge a fee for, warranty, support,
|
|
209
|
+
indemnity or liability obligations to one or more recipients of Covered
|
|
210
|
+
Software. However, You may do so only on Your own behalf, and not on
|
|
211
|
+
behalf of any Contributor. You must make it absolutely clear that any
|
|
212
|
+
such warranty, support, indemnity, or liability obligation is offered by
|
|
213
|
+
You alone, and You hereby agree to indemnify every Contributor for any
|
|
214
|
+
liability incurred by such Contributor as a result of warranty, support,
|
|
215
|
+
indemnity or liability terms You offer. You may include additional
|
|
216
|
+
disclaimers of warranty and limitations of liability specific to any
|
|
217
|
+
jurisdiction.
|
|
218
|
+
|
|
219
|
+
4. Inability to Comply Due to Statute or Regulation
|
|
220
|
+
---------------------------------------------------
|
|
221
|
+
|
|
222
|
+
If it is impossible for You to comply with any of the terms of this
|
|
223
|
+
License with respect to some or all of the Covered Software due to
|
|
224
|
+
statute, judicial order, or regulation then You must: (a) comply with
|
|
225
|
+
the terms of this License to the maximum extent possible; and (b)
|
|
226
|
+
describe the limitations and the code they affect. Such description must
|
|
227
|
+
be placed in a text file included with all distributions of the Covered
|
|
228
|
+
Software under this License. Except to the extent prohibited by statute
|
|
229
|
+
or regulation, such description must be sufficiently detailed for a
|
|
230
|
+
recipient of ordinary skill to be able to understand it.
|
|
231
|
+
|
|
232
|
+
5. Termination
|
|
233
|
+
--------------
|
|
234
|
+
|
|
235
|
+
5.1. The rights granted under this License will terminate automatically
|
|
236
|
+
if You fail to comply with any of its terms. However, if You become
|
|
237
|
+
compliant, then the rights granted under this License from a particular
|
|
238
|
+
Contributor are reinstated (a) provisionally, unless and until such
|
|
239
|
+
Contributor explicitly and finally terminates Your grants, and (b) on an
|
|
240
|
+
ongoing basis, if such Contributor fails to notify You of the
|
|
241
|
+
non-compliance by some reasonable means prior to 60 days after You have
|
|
242
|
+
come back into compliance. Moreover, Your grants from a particular
|
|
243
|
+
Contributor are reinstated on an ongoing basis if such Contributor
|
|
244
|
+
notifies You of the non-compliance by some reasonable means, this is the
|
|
245
|
+
first time You have received notice of non-compliance with this License
|
|
246
|
+
from such Contributor, and You become compliant prior to 30 days after
|
|
247
|
+
Your receipt of the notice.
|
|
248
|
+
|
|
249
|
+
5.2. If You initiate litigation against any entity by asserting a patent
|
|
250
|
+
infringement claim (excluding declaratory judgment actions,
|
|
251
|
+
counter-claims, and cross-claims) alleging that a Contributor Version
|
|
252
|
+
directly or indirectly infringes any patent, then the rights granted to
|
|
253
|
+
You by any and all Contributors for the Covered Software under Section
|
|
254
|
+
2.1 of this License shall terminate.
|
|
255
|
+
|
|
256
|
+
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
|
257
|
+
end user license agreements (excluding distributors and resellers) which
|
|
258
|
+
have been validly granted by You or Your distributors under this License
|
|
259
|
+
prior to termination shall survive termination.
|
|
260
|
+
|
|
261
|
+
************************************************************************
|
|
262
|
+
* *
|
|
263
|
+
* 6. Disclaimer of Warranty *
|
|
264
|
+
* ------------------------- *
|
|
265
|
+
* *
|
|
266
|
+
* Covered Software is provided under this License on an "as is" *
|
|
267
|
+
* basis, without warranty of any kind, either expressed, implied, or *
|
|
268
|
+
* statutory, including, without limitation, warranties that the *
|
|
269
|
+
* Covered Software is free of defects, merchantable, fit for a *
|
|
270
|
+
* particular purpose or non-infringing. The entire risk as to the *
|
|
271
|
+
* quality and performance of the Covered Software is with You. *
|
|
272
|
+
* Should any Covered Software prove defective in any respect, You *
|
|
273
|
+
* (not any Contributor) assume the cost of any necessary servicing, *
|
|
274
|
+
* repair, or correction. This disclaimer of warranty constitutes an *
|
|
275
|
+
* essential part of this License. No use of any Covered Software is *
|
|
276
|
+
* authorized under this License except under this disclaimer. *
|
|
277
|
+
* *
|
|
278
|
+
************************************************************************
|
|
279
|
+
|
|
280
|
+
************************************************************************
|
|
281
|
+
* *
|
|
282
|
+
* 7. Limitation of Liability *
|
|
283
|
+
* -------------------------- *
|
|
284
|
+
* *
|
|
285
|
+
* Under no circumstances and under no legal theory, whether tort *
|
|
286
|
+
* (including negligence), contract, or otherwise, shall any *
|
|
287
|
+
* Contributor, or anyone who distributes Covered Software as *
|
|
288
|
+
* permitted above, be liable to You for any direct, indirect, *
|
|
289
|
+
* special, incidental, or consequential damages of any character *
|
|
290
|
+
* including, without limitation, damages for lost profits, loss of *
|
|
291
|
+
* goodwill, work stoppage, computer failure or malfunction, or any *
|
|
292
|
+
* and all other commercial damages or losses, even if such party *
|
|
293
|
+
* shall have been informed of the possibility of such damages. This *
|
|
294
|
+
* limitation of liability shall not apply to liability for death or *
|
|
295
|
+
* personal injury resulting from such party's negligence to the *
|
|
296
|
+
* extent applicable law prohibits such limitation. Some *
|
|
297
|
+
* jurisdictions do not allow the exclusion or limitation of *
|
|
298
|
+
* incidental or consequential damages, so this exclusion and *
|
|
299
|
+
* limitation may not apply to You. *
|
|
300
|
+
* *
|
|
301
|
+
************************************************************************
|
|
302
|
+
|
|
303
|
+
8. Litigation
|
|
304
|
+
-------------
|
|
305
|
+
|
|
306
|
+
Any litigation relating to this License may be brought only in the
|
|
307
|
+
courts of a jurisdiction where the defendant maintains its principal
|
|
308
|
+
place of business and such litigation shall be governed by laws of that
|
|
309
|
+
jurisdiction, without reference to its conflict-of-law provisions.
|
|
310
|
+
Nothing in this Section shall prevent a party's ability to bring
|
|
311
|
+
cross-claims or counter-claims.
|
|
312
|
+
|
|
313
|
+
9. Miscellaneous
|
|
314
|
+
----------------
|
|
315
|
+
|
|
316
|
+
This License represents the complete agreement concerning the subject
|
|
317
|
+
matter hereof. If any provision of this License is held to be
|
|
318
|
+
unenforceable, such provision shall be reformed only to the extent
|
|
319
|
+
necessary to make it enforceable. Any law or regulation which provides
|
|
320
|
+
that the language of a contract shall be construed against the drafter
|
|
321
|
+
shall not be used to construe this License against a Contributor.
|
|
322
|
+
|
|
323
|
+
10. Versions of the License
|
|
324
|
+
---------------------------
|
|
325
|
+
|
|
326
|
+
10.1. New Versions
|
|
327
|
+
|
|
328
|
+
Mozilla Foundation is the license steward. Except as provided in Section
|
|
329
|
+
10.3, no one other than the license steward has the right to modify or
|
|
330
|
+
publish new versions of this License. Each version will be given a
|
|
331
|
+
distinguishing version number.
|
|
332
|
+
|
|
333
|
+
10.2. Effect of New Versions
|
|
334
|
+
|
|
335
|
+
You may distribute the Covered Software under the terms of the version
|
|
336
|
+
of the License under which You originally received the Covered Software,
|
|
337
|
+
or under the terms of any subsequent version published by the license
|
|
338
|
+
steward.
|
|
339
|
+
|
|
340
|
+
10.3. Modified Versions
|
|
341
|
+
|
|
342
|
+
If you create software not governed by this License, and you want to
|
|
343
|
+
create a new license for such software, you may create and use a
|
|
344
|
+
modified version of this License if you rename the license and remove
|
|
345
|
+
any references to the name of the license steward (except to note that
|
|
346
|
+
such modified license differs from this License).
|
|
347
|
+
|
|
348
|
+
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
|
349
|
+
Licenses
|
|
350
|
+
|
|
351
|
+
If You choose to distribute Source Code Form that is Incompatible With
|
|
352
|
+
Secondary Licenses under the terms of this version of the License, the
|
|
353
|
+
notice described in Exhibit B of this License must be attached.
|
|
354
|
+
|
|
355
|
+
Exhibit A - Source Code Form License Notice
|
|
356
|
+
-------------------------------------------
|
|
357
|
+
|
|
358
|
+
This Source Code Form is subject to the terms of the Mozilla Public
|
|
359
|
+
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
360
|
+
file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
361
|
+
|
|
362
|
+
If it is not possible or desirable to put the notice in a particular
|
|
363
|
+
file, then You may include the notice in a location (such as a LICENSE
|
|
364
|
+
file in a relevant directory) where a recipient would be likely to look
|
|
365
|
+
for such a notice.
|
|
366
|
+
|
|
367
|
+
You may add additional accurate notices of copyright ownership.
|
|
368
|
+
|
|
369
|
+
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
|
370
|
+
---------------------------------------------------------
|
|
371
|
+
|
|
372
|
+
This Source Code Form is "Incompatible With Secondary Licenses", as
|
|
373
|
+
defined by the Mozilla Public License, v. 2.0.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
turbowarp-document-editor
|
|
2
|
+
Copyright (c) 2026 Hiroya Kubo
|
|
3
|
+
|
|
4
|
+
The maintained document editor implementation is licensed under MPL-2.0.
|
|
5
|
+
It was developed for the TurboWarp-Plus-Editor document-editing feature and
|
|
6
|
+
extracted into this independent package. The copyright holder authorized
|
|
7
|
+
this package's MPL-2.0 distribution on 2026-11-01.
|
|
8
|
+
|
|
9
|
+
This package does not include the implementation of scratch-gui,
|
|
10
|
+
scratch-vm or scratch-blocks. These host APIs are supplied by the caller.
|
|
11
|
+
Host distributions and dependencies retain their respective licenses.
|
|
12
|
+
|
|
13
|
+
Earlier repository revisions distributed under GPL-3.0-or-later remain
|
|
14
|
+
available under the grants made for those revisions. This change does
|
|
15
|
+
not revoke those grants or relicense third-party dependencies.
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# turbowarp-document-editor
|
|
2
|
+
|
|
3
|
+
[English](README.md)
|
|
4
|
+
|
|
5
|
+
TurboWarpのデータソースを編集する共通UIと、ローカル外部エディタ連携を提供します。
|
|
6
|
+
|
|
7
|
+
## 依存の方向
|
|
8
|
+
|
|
9
|
+
- `turbowarp-document-source`:SB3内ファイル・HTTPS参照・共通ブロック・スキーマ専用ブロックの参照契約と更新候補を扱います。
|
|
10
|
+
- `turbowarp-document-editor`:ダイアログ、非同期タブプレビュー、形式変換の確認、検証と保存、外部エディタ連携を提供します。
|
|
11
|
+
- `scratch-gui`フォーク:共通UIをマウントし、VM・Blockly・言語・起動時フラグを渡します。
|
|
12
|
+
- `turbowarp-plus-editor`:固定したGUIをビルドしてGitHub Pagesで配信します。編集UIを追加注入しません。
|
|
13
|
+
|
|
14
|
+
本パッケージはGUI・配信サイト・紙芝居Appに依存しません。スキーマ・ガイドURL・表示名・台本変換・実行時の解釈は、文書を所有する機能拡張が登録します。紙芝居Appの場合は「紙芝居台本データ」、それ以外では汎用の「データソース」を表示できます。
|
|
15
|
+
|
|
16
|
+
## GUIへの組み込み
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import {mountDocumentEditor, readDocumentEditorFlags,
|
|
20
|
+
registerDocumentSourceRootHatShape} from '@kubohiroya/turbowarp-document-editor';
|
|
21
|
+
|
|
22
|
+
// Read once during startup. Both flags are off by default.
|
|
23
|
+
const flags = readDocumentEditorFlags(location.search);
|
|
24
|
+
registerDocumentSourceRootHatShape(Blockly);
|
|
25
|
+
const editor = flags.embeddedYamlEditor ? mountDocumentEditor({
|
|
26
|
+
vm,
|
|
27
|
+
document,
|
|
28
|
+
language: 'ja',
|
|
29
|
+
documentSources: flags.documentSources,
|
|
30
|
+
getScratch: () => ({vm, gui: {getBlockly: async () => Blockly}})
|
|
31
|
+
}) : null;
|
|
32
|
+
// Dispose when the host is unmounted or its VM is replaced.
|
|
33
|
+
// editor?.dispose();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`twPlusYamlEditor=1`で編集UIを、`twPlusDocumentSource=1`で参照元変更を有効にします。GUIは起動時に固定し、SB3から有効化しません。ルートハットの接続不可の形はフラグOFFでも登録します。
|
|
37
|
+
|
|
38
|
+
スタイルはマウント時に一度挿入します。ホストがCSSを別途読み込む場合は `injectStyles: false` と `@kubohiroya/turbowarp-document-editor/style.css` を使用できます。Webpack 4では `@kubohiroya/turbowarp-document-editor/webpack4` の `withDocumentEditorWebpack4(config)` でサブパスの解決とホストのBabel対象を追加します。
|
|
39
|
+
|
|
40
|
+
## 保存と変換
|
|
41
|
+
|
|
42
|
+
タブ切替は非同期で、古い応答を破棄します。同一セッションのプレビュー候補を保存時にも使います。キャンセル・閉じるではVMを変更しません。保存は所有者の検証と差分適用を呼び出し、関係するブロック・文書メタデータだけを更新します。SB3全体の圧縮・再読込・作品の停止はしません。
|
|
43
|
+
|
|
44
|
+
HTTPS文書はプレビュー時に取得し、保存時は検証した候補を再利用します。URL参照をSB3内ファイルへ取り込む操作も所有者の候補処理を通ります。
|
|
45
|
+
|
|
46
|
+
## 外部エディタ連携
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npx @kubohiroya/turbowarp-document-editor --site-dir /absolute/path/to/built-gui
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
標準では `/editor.html` を開きます。配信サイトは `startDocumentEditorHost` に `publicPath` と `editorPath` を渡せます。ブラウザでの変更は保存を押すまで作品に反映しません。
|
|
53
|
+
|
|
54
|
+
連携ホストは127.0.0.1に限定し、Origin・Host・セッショントークンを検査します。専用ディレクトリ内の文書だけをVSCodeへ渡し、JSON Schema設定もセッションごとに分離します。既存の連携プロトコル名は互換性のため維持しています。
|
|
55
|
+
|
|
56
|
+
## 検証・切戻し
|
|
57
|
+
|
|
58
|
+
`npm test` は変換プレビュー・差分適用・外部編集ホストを検証します。`npm run test:browser` は日英・狭幅・ウィンドウ操作・非同期競合・保存・キャンセルをChromeで検証します。ネイティブVSCodeの起動テストは含みません。
|
|
59
|
+
|
|
60
|
+
切戻しは起動フラグをOFFにして再読込するか、GUI側の固定依存SHAを戻します。フラグOFFでも文書・ハットのデータは保持します。
|
|
61
|
+
|
|
62
|
+
## TypeScriptでの開発
|
|
63
|
+
|
|
64
|
+
本体・Node連携・Webpackアダプター・テストをTypeScriptで管理します。`npm run typecheck`はstrict設定で検証し、`npm run build`は`dist/`にJavaScript・型宣言・スタイルを生成します。GUIは生成済みJavaScriptを参照し、TypeScriptローダーは不要です。Git依存のインストール時もprepareでビルドします。
|
|
65
|
+
|
|
66
|
+
## ライセンス
|
|
67
|
+
|
|
68
|
+
MPL-2.0。[LICENSE](LICENSE)、[NOTICE](NOTICE)、[コード由来の確認記録](docs/license-provenance.md)を参照してください。GUI配布物のライセンス条件と依存パッケージの通知は引き続き維持します。
|
package/README.md
CHANGED
|
@@ -1,3 +1,86 @@
|
|
|
1
|
-
#
|
|
1
|
+
# turbowarp-document-editor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Reusable document editing UI and a local external-editor companion for TurboWarp GUI hosts.
|
|
4
|
+
|
|
5
|
+
[日本語](README.ja.md)
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
| Package | Responsibility |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `turbowarp-document-source` | References and update candidates for SB3 files, HTTPS sources, YAML blocks, and schema-specific blocks |
|
|
12
|
+
| `turbowarp-document-editor` | Document dialog, asynchronous previews, conversion confirmation, validation/save actions, and external editing |
|
|
13
|
+
| scratch-gui fork | Mounts the UI and supplies the VM, Blockly, language, and startup flags |
|
|
14
|
+
| `turbowarp-plus-editor` | Pins, builds, and distributes the GUI |
|
|
15
|
+
|
|
16
|
+
This package does not depend on the GUI, distribution site, or Kamishibai App. A document owner registers its schema, guide URL, localized title, conversions, validation, and project updates. For example, the Kamishibai owner supplies “Kamishibai script data”; other owners can use the neutral “Data source” title.
|
|
17
|
+
|
|
18
|
+
## Host integration
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import {
|
|
22
|
+
mountDocumentEditor,
|
|
23
|
+
readDocumentEditorFlags,
|
|
24
|
+
registerDocumentSourceRootHatShape
|
|
25
|
+
} from '@kubohiroya/turbowarp-document-editor';
|
|
26
|
+
|
|
27
|
+
// Resolve once at host startup. Both flags are disabled by default.
|
|
28
|
+
const flags = readDocumentEditorFlags(location.search);
|
|
29
|
+
registerDocumentSourceRootHatShape(Blockly);
|
|
30
|
+
const editor = flags.embeddedYamlEditor ? mountDocumentEditor({
|
|
31
|
+
vm,
|
|
32
|
+
document,
|
|
33
|
+
language: 'en',
|
|
34
|
+
documentSources: flags.documentSources,
|
|
35
|
+
getScratch: () => ({vm, gui: {getBlockly: async () => Blockly}})
|
|
36
|
+
}) : null;
|
|
37
|
+
|
|
38
|
+
// Dispose when the host unmounts or replaces its VM.
|
|
39
|
+
editor?.dispose();
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`twPlusYamlEditor=1` enables editing; `twPlusDocumentSource=1` enables source-location changes. The host resolves these flags once; project data cannot enable them. Register the disconnected root-hat shape even when editing is disabled.
|
|
43
|
+
|
|
44
|
+
The package inserts its stylesheet once when mounted. Hosts that load CSS themselves can use `injectStyles: false` and `@kubohiroya/turbowarp-document-editor/style.css`.
|
|
45
|
+
|
|
46
|
+
For Webpack 4, wrap the host configuration with `withDocumentEditorWebpack4` from `@kubohiroya/turbowarp-document-editor/webpack4`. The adapter resolves package subpaths and includes the compiled ESM in the host's existing Babel rule. GUI hosts consume generated JavaScript and declaration files; they do not need a TypeScript loader.
|
|
47
|
+
|
|
48
|
+
## Save and conversion behavior
|
|
49
|
+
|
|
50
|
+
Tab previews run asynchronously and discard obsolete responses. Save reuses the exact candidate produced for the current preview. Cancel and close leave the VM unchanged.
|
|
51
|
+
|
|
52
|
+
Save delegates validation and differential updates to the document owner. It updates the affected document metadata and blocks without compressing/reloading the entire SB3 or stopping the project. Downloading an SB3 remains the GUI's standard file operation.
|
|
53
|
+
|
|
54
|
+
An HTTPS source is fetched for preview. Save reuses the validated fetched candidate; importing that source into the SB3 also uses the owner's candidate and commit protocol.
|
|
55
|
+
|
|
56
|
+
## External editing
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
npx @kubohiroya/turbowarp-document-editor --site-dir /absolute/path/to/built-gui
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The companion opens `/editor.html` by default. Distributions can inject `publicPath` and `editorPath` through `startDocumentEditorHost`. External edits are not applied to the project until the dialog's Save action.
|
|
63
|
+
|
|
64
|
+
The host listens only on `127.0.0.1` and checks Origin, Host, and session tokens. It passes only private session files to VSCode and isolates each document's JSON Schema settings. Existing protocol names are retained for compatibility.
|
|
65
|
+
|
|
66
|
+
## TypeScript development
|
|
67
|
+
|
|
68
|
+
All maintained application, companion, integration-adapter, and test code is TypeScript. Build output is generated under `dist/`; ESM browser/Node entries, the CommonJS Webpack adapter, declaration files, and the stylesheet are included in the package.
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
npm ci
|
|
72
|
+
npm run typecheck
|
|
73
|
+
npm run build
|
|
74
|
+
npm test
|
|
75
|
+
npx playwright install chromium
|
|
76
|
+
npm run test:browser
|
|
77
|
+
npm run pack:check
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Tests cover previews, differential commits, the companion host, Japanese/English layouts, narrow screens, window controls, cancellation, and asynchronous races. They stub native VSCode launch; they do not launch the desktop editor.
|
|
81
|
+
|
|
82
|
+
To roll back, disable the host's startup flags and reload, or restore the previous pinned package SHA. Existing SB3 documents and external working files remain intact.
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
MPL-2.0. See [LICENSE](LICENSE), [NOTICE](NOTICE), and the [source provenance review](docs/license-provenance.md). The GUI distribution retains its own license obligations; dependency notices must be preserved.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import type { DocumentEditorHostOptions } from './types.ts';
|
|
3
|
+
export declare function parseArguments(args: string[]): {
|
|
4
|
+
siteDirectory: string;
|
|
5
|
+
dataDirectory?: string;
|
|
6
|
+
port?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function main(args?: string[], defaults?: Partial<DocumentEditorHostOptions> & {
|
|
9
|
+
label?: string;
|
|
10
|
+
}): Promise<Readonly<{
|
|
11
|
+
url: `${string}${string}?twPlusYamlEditor=1`;
|
|
12
|
+
apiOrigin: string;
|
|
13
|
+
dataDirectory: string;
|
|
14
|
+
profileDirectory: string;
|
|
15
|
+
userDataDirectory: string;
|
|
16
|
+
extensionsDirectory: string;
|
|
17
|
+
profileSeparated: boolean;
|
|
18
|
+
close(): Promise<void>;
|
|
19
|
+
}>>;
|
|
20
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../node/cli.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAa,yBAAyB,EAAC,MAAM,YAAY,CAAC;AAMtE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;;;;EAgB5C;AAED,wBAAsB,IAAI,CAAC,IAAI,WAAwB,EAAE,QAAQ,GAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAM;;;;;;;;;IAgB5H"}
|
package/dist/node/cli.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { realpathSync } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { startDocumentEditorHost } from "./host.js";
|
|
6
|
+
export function parseArguments(args) {
|
|
7
|
+
const options = {};
|
|
8
|
+
const fields = new Map([['--site-dir', 'siteDirectory'], ['--data-dir', 'dataDirectory'], ['--port', 'port']]);
|
|
9
|
+
for (let i = 0; i < args.length; i++) {
|
|
10
|
+
const field = fields.get(args[i]);
|
|
11
|
+
if (!field || options[field] !== undefined || !args[i + 1] || args[i + 1].startsWith('--')) {
|
|
12
|
+
throw new TypeError('Use --site-dir DIR [--data-dir DIR] [--port PORT].');
|
|
13
|
+
}
|
|
14
|
+
const value = args[++i];
|
|
15
|
+
if (field === 'port') {
|
|
16
|
+
if (!/^\d+$/.test(value) || Number(value) > 65535)
|
|
17
|
+
throw new TypeError('Invalid port.');
|
|
18
|
+
options.port = Number(value);
|
|
19
|
+
}
|
|
20
|
+
else
|
|
21
|
+
options[field] = path.resolve(value);
|
|
22
|
+
}
|
|
23
|
+
if (!options.siteDirectory)
|
|
24
|
+
throw new TypeError('--site-dir is required.');
|
|
25
|
+
return { ...options, siteDirectory: options.siteDirectory };
|
|
26
|
+
}
|
|
27
|
+
export async function main(args = process.argv.slice(2), defaults = {}) {
|
|
28
|
+
const host = await startDocumentEditorHost({ ...defaults, ...parseArguments(args) });
|
|
29
|
+
console.log(`${defaults.label || "Document Editor"}: ${host.url}`);
|
|
30
|
+
console.log(`YAML working files are retained in: ${host.dataDirectory}`);
|
|
31
|
+
console.log(`Private VSCode profile: ${host.profileDirectory}`);
|
|
32
|
+
let stopping = false;
|
|
33
|
+
const stop = async () => {
|
|
34
|
+
if (stopping)
|
|
35
|
+
return;
|
|
36
|
+
stopping = true;
|
|
37
|
+
await host.close();
|
|
38
|
+
process.removeListener('SIGINT', stop);
|
|
39
|
+
process.removeListener('SIGTERM', stop);
|
|
40
|
+
};
|
|
41
|
+
process.on('SIGINT', stop);
|
|
42
|
+
process.on('SIGTERM', stop);
|
|
43
|
+
return host;
|
|
44
|
+
}
|
|
45
|
+
function isMainModule() {
|
|
46
|
+
try {
|
|
47
|
+
return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (isMainModule()) {
|
|
54
|
+
main().catch(error => { console.error(error.message); process.exitCode = 1; });
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../node/cli.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DocumentEditorHostOptions } from './types.ts';
|
|
2
|
+
export declare const maxSourceBytes: number;
|
|
3
|
+
export declare const apiPrefix = "/__twpe_yaml";
|
|
4
|
+
export declare function startDocumentEditorHost({ siteDirectory, dataDirectory, launchEditor, port, publicPath, editorPath }: DocumentEditorHostOptions): Promise<Readonly<{
|
|
5
|
+
url: `${string}${string}?twPlusYamlEditor=1`;
|
|
6
|
+
apiOrigin: string;
|
|
7
|
+
dataDirectory: string;
|
|
8
|
+
profileDirectory: string;
|
|
9
|
+
userDataDirectory: string;
|
|
10
|
+
extensionsDirectory: string;
|
|
11
|
+
profileSeparated: boolean;
|
|
12
|
+
close(): Promise<void>;
|
|
13
|
+
}>>;
|
|
14
|
+
export { startDocumentEditorHost as startYamlEditorHost };
|
|
15
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../node/host.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,yBAAyB,EAAgB,MAAM,YAAY,CAAC;AAazE,eAAO,MAAM,cAAc,QAAkB,CAAC;AAC9C,eAAO,MAAM,SAAS,iBAAiB,CAAC;AAgFxC,wBAAsB,uBAAuB,CAAC,EAAC,aAAa,EAAE,aAAa,EAAE,YAA2B,EAAE,IAAQ,EAAE,UAAgB,EAAE,UAA2B,EAAC,EAAE,yBAAyB;;;;;;;;;IA2M5L;AAED,OAAO,EAAC,uBAAuB,IAAI,mBAAmB,EAAC,CAAC"}
|